cdp_sdk/
api.rs

1#[allow(unused_imports)]
2use progenitor_middleware_client::{encode_path, ClientHooks, OperationInfo, RequestBuilderExt};
3#[allow(unused_imports)]
4pub use progenitor_middleware_client::{ByteStream, ClientInfo, Error, ResponseValue};
5/// Types used as operation parameters and responses.
6#[allow(clippy::all)]
7pub mod types {
8    /// Error types.
9    pub mod error {
10        /// Error from a `TryFrom` or `FromStr` implementation.
11        pub struct ConversionError(::std::borrow::Cow<'static, str>);
12        impl ::std::error::Error for ConversionError {}
13        impl ::std::fmt::Display for ConversionError {
14            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
15                ::std::fmt::Display::fmt(&self.0, f)
16            }
17        }
18        impl ::std::fmt::Debug for ConversionError {
19            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
20                ::std::fmt::Debug::fmt(&self.0, f)
21            }
22        }
23        impl From<&'static str> for ConversionError {
24            fn from(value: &'static str) -> Self {
25                Self(value.into())
26            }
27        }
28        impl From<String> for ConversionError {
29            fn from(value: String) -> Self {
30                Self(value.into())
31            }
32        }
33    }
34    ///Contract ABI Specification following Solidity's external JSON interface format.
35    ///
36    /// <details><summary>JSON schema</summary>
37    ///
38    /// ```json
39    ///{
40    ///  "description": "Contract ABI Specification following Solidity's external JSON interface format.",
41    ///  "examples": [
42    ///    [
43    ///      {
44    ///        "inputs": [
45    ///          {
46    ///            "internalType": "address",
47    ///            "name": "spender",
48    ///            "type": "address"
49    ///          },
50    ///          {
51    ///            "internalType": "uint256",
52    ///            "name": "amount",
53    ///            "type": "uint256"
54    ///          }
55    ///        ],
56    ///        "name": "approve",
57    ///        "outputs": [
58    ///          {
59    ///            "internalType": "bool",
60    ///            "name": null,
61    ///            "type": "bool"
62    ///          }
63    ///        ],
64    ///        "stateMutability": "nonpayable",
65    ///        "type": "function"
66    ///      },
67    ///      {
68    ///        "anonymous": false,
69    ///        "inputs": [
70    ///          {
71    ///            "indexed": true,
72    ///            "internalType": "address",
73    ///            "name": "from",
74    ///            "type": "address"
75    ///          }
76    ///        ],
77    ///        "name": "Transfer",
78    ///        "type": "event"
79    ///      },
80    ///      {
81    ///        "inputs": [
82    ///          {
83    ///            "internalType": "address",
84    ///            "name": "spender",
85    ///            "type": "address"
86    ///          }
87    ///        ],
88    ///        "name": "ERC20InvalidSpender",
89    ///        "type": "error"
90    ///      }
91    ///    ]
92    ///  ],
93    ///  "type": "array",
94    ///  "items": {
95    ///    "oneOf": [
96    ///      {
97    ///        "$ref": "#/components/schemas/AbiFunction"
98    ///      },
99    ///      {
100    ///        "$ref": "#/components/schemas/AbiInput"
101    ///      }
102    ///    ]
103    ///  },
104    ///  "x-audience": "public"
105    ///}
106    /// ```
107    /// </details>
108    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
109    #[serde(transparent)]
110    pub struct Abi(pub ::std::vec::Vec<AbiItem>);
111    impl ::std::ops::Deref for Abi {
112        type Target = ::std::vec::Vec<AbiItem>;
113        fn deref(&self) -> &::std::vec::Vec<AbiItem> {
114            &self.0
115        }
116    }
117    impl ::std::convert::From<Abi> for ::std::vec::Vec<AbiItem> {
118        fn from(value: Abi) -> Self {
119            value.0
120        }
121    }
122    impl ::std::convert::From<&Abi> for Abi {
123        fn from(value: &Abi) -> Self {
124            value.clone()
125        }
126    }
127    impl ::std::convert::From<::std::vec::Vec<AbiItem>> for Abi {
128        fn from(value: ::std::vec::Vec<AbiItem>) -> Self {
129            Self(value)
130        }
131    }
132    ///ABI function type for contract functions.
133    ///
134    /// <details><summary>JSON schema</summary>
135    ///
136    /// ```json
137    ///{
138    ///  "title": "AbiFunction",
139    ///  "description": "ABI function type for contract functions.",
140    ///  "examples": [
141    ///    {
142    ///      "inputs": [
143    ///        {
144    ///          "internalType": "address",
145    ///          "name": "owner",
146    ///          "type": "address"
147    ///        }
148    ///      ],
149    ///      "name": "balanceOf",
150    ///      "outputs": [
151    ///        {
152    ///          "internalType": "uint256",
153    ///          "name": null,
154    ///          "type": "uint256"
155    ///        }
156    ///      ],
157    ///      "stateMutability": "view",
158    ///      "type": "function"
159    ///    }
160    ///  ],
161    ///  "type": "object",
162    ///  "required": [
163    ///    "inputs",
164    ///    "name",
165    ///    "outputs",
166    ///    "stateMutability",
167    ///    "type"
168    ///  ],
169    ///  "properties": {
170    ///    "constant": {
171    ///      "description": "Deprecated. Use pure or view from stateMutability instead.",
172    ///      "examples": [
173    ///        false
174    ///      ],
175    ///      "type": "boolean"
176    ///    },
177    ///    "gas": {
178    ///      "description": "Deprecated. Vyper used to provide gas estimates.",
179    ///      "examples": [
180    ///        0
181    ///      ],
182    ///      "type": "integer"
183    ///    },
184    ///    "inputs": {
185    ///      "description": "The list of ABI parameters used for this function.",
186    ///      "examples": [
187    ///        [
188    ///          {
189    ///            "internalType": "address",
190    ///            "name": "spender",
191    ///            "type": "address"
192    ///          }
193    ///        ]
194    ///      ],
195    ///      "type": "array",
196    ///      "items": {
197    ///        "$ref": "#/components/schemas/AbiParameter"
198    ///      }
199    ///    },
200    ///    "name": {
201    ///      "description": "The name of the ABI function.",
202    ///      "examples": [
203    ///        "approve"
204    ///      ],
205    ///      "type": "string"
206    ///    },
207    ///    "outputs": {
208    ///      "description": "The values returned by this function.",
209    ///      "examples": [
210    ///        {
211    ///          "internalType": "bool",
212    ///          "name": "",
213    ///          "type": "bool"
214    ///        }
215    ///      ],
216    ///      "type": "array",
217    ///      "items": {
218    ///        "$ref": "#/components/schemas/AbiParameter"
219    ///      }
220    ///    },
221    ///    "payable": {
222    ///      "description": "Deprecated. Use payable or nonpayable from `stateMutability` instead.",
223    ///      "examples": [
224    ///        false
225    ///      ],
226    ///      "type": "boolean"
227    ///    },
228    ///    "stateMutability": {
229    ///      "$ref": "#/components/schemas/AbiStateMutability"
230    ///    },
231    ///    "type": {
232    ///      "description": "The type of the ABI item, must be `function`.",
233    ///      "examples": [
234    ///        "function"
235    ///      ],
236    ///      "type": "string",
237    ///      "enum": [
238    ///        "function"
239    ///      ]
240    ///    }
241    ///  },
242    ///  "x-audience": "public"
243    ///}
244    /// ```
245    /// </details>
246    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
247    pub struct AbiFunction {
248        ///Deprecated. Use pure or view from stateMutability instead.
249        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
250        pub constant: ::std::option::Option<bool>,
251        ///Deprecated. Vyper used to provide gas estimates.
252        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
253        pub gas: ::std::option::Option<i64>,
254        ///The list of ABI parameters used for this function.
255        pub inputs: ::std::vec::Vec<AbiParameter>,
256        ///The name of the ABI function.
257        pub name: ::std::string::String,
258        ///The values returned by this function.
259        pub outputs: ::std::vec::Vec<AbiParameter>,
260        ///Deprecated. Use payable or nonpayable from `stateMutability` instead.
261        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
262        pub payable: ::std::option::Option<bool>,
263        #[serde(rename = "stateMutability")]
264        pub state_mutability: AbiStateMutability,
265        ///The type of the ABI item, must be `function`.
266        #[serde(rename = "type")]
267        pub type_: AbiFunctionType,
268    }
269    impl ::std::convert::From<&AbiFunction> for AbiFunction {
270        fn from(value: &AbiFunction) -> Self {
271            value.clone()
272        }
273    }
274    impl AbiFunction {
275        pub fn builder() -> builder::AbiFunction {
276            Default::default()
277        }
278    }
279    ///The type of the ABI item, must be `function`.
280    ///
281    /// <details><summary>JSON schema</summary>
282    ///
283    /// ```json
284    ///{
285    ///  "description": "The type of the ABI item, must be `function`.",
286    ///  "examples": [
287    ///    "function"
288    ///  ],
289    ///  "type": "string",
290    ///  "enum": [
291    ///    "function"
292    ///  ]
293    ///}
294    /// ```
295    /// </details>
296    #[derive(
297        ::serde::Deserialize,
298        ::serde::Serialize,
299        Clone,
300        Copy,
301        Debug,
302        Eq,
303        Hash,
304        Ord,
305        PartialEq,
306        PartialOrd,
307    )]
308    pub enum AbiFunctionType {
309        #[serde(rename = "function")]
310        Function,
311    }
312    impl ::std::convert::From<&Self> for AbiFunctionType {
313        fn from(value: &AbiFunctionType) -> Self {
314            value.clone()
315        }
316    }
317    impl ::std::fmt::Display for AbiFunctionType {
318        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
319            match *self {
320                Self::Function => f.write_str("function"),
321            }
322        }
323    }
324    impl ::std::str::FromStr for AbiFunctionType {
325        type Err = self::error::ConversionError;
326        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
327            match value {
328                "function" => Ok(Self::Function),
329                _ => Err("invalid value".into()),
330            }
331        }
332    }
333    impl ::std::convert::TryFrom<&str> for AbiFunctionType {
334        type Error = self::error::ConversionError;
335        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
336            value.parse()
337        }
338    }
339    impl ::std::convert::TryFrom<&::std::string::String> for AbiFunctionType {
340        type Error = self::error::ConversionError;
341        fn try_from(
342            value: &::std::string::String,
343        ) -> ::std::result::Result<Self, self::error::ConversionError> {
344            value.parse()
345        }
346    }
347    impl ::std::convert::TryFrom<::std::string::String> for AbiFunctionType {
348        type Error = self::error::ConversionError;
349        fn try_from(
350            value: ::std::string::String,
351        ) -> ::std::result::Result<Self, self::error::ConversionError> {
352            value.parse()
353        }
354    }
355    ///Generic ABI item type encapsulating all other types besides `function`.
356    ///
357    /// <details><summary>JSON schema</summary>
358    ///
359    /// ```json
360    ///{
361    ///  "title": "AbiInput",
362    ///  "description": "Generic ABI item type encapsulating all other types besides `function`.",
363    ///  "type": "object",
364    ///  "required": [
365    ///    "type"
366    ///  ],
367    ///  "properties": {
368    ///    "additionalProperties": {
369    ///      "description": "For additional information on the ABI JSON specification, see [the Solidity documentation](https://docs.soliditylang.org/en/latest/abi-spec.html#json).",
370    ///      "examples": [
371    ///        {
372    ///          "inputs": [
373    ///            {
374    ///              "internalType": "address",
375    ///              "name": "spender",
376    ///              "type": "address"
377    ///            }
378    ///          ],
379    ///          "name": "ERC20InvalidSpender",
380    ///          "type": "error"
381    ///        }
382    ///      ]
383    ///    },
384    ///    "type": {
385    ///      "description": "The type of the ABI item.",
386    ///      "examples": [
387    ///        "constructor"
388    ///      ],
389    ///      "type": "string",
390    ///      "enum": [
391    ///        "constructor",
392    ///        "error",
393    ///        "event",
394    ///        "fallback",
395    ///        "receive"
396    ///      ]
397    ///    }
398    ///  },
399    ///  "x-audience": "public"
400    ///}
401    /// ```
402    /// </details>
403    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
404    pub struct AbiInput {
405        ///For additional information on the ABI JSON specification, see [the Solidity documentation](https://docs.soliditylang.org/en/latest/abi-spec.html#json).
406        #[serde(
407            rename = "additionalProperties",
408            default,
409            skip_serializing_if = "::std::option::Option::is_none"
410        )]
411        pub additional_properties: ::std::option::Option<::serde_json::Value>,
412        ///The type of the ABI item.
413        #[serde(rename = "type")]
414        pub type_: AbiInputType,
415    }
416    impl ::std::convert::From<&AbiInput> for AbiInput {
417        fn from(value: &AbiInput) -> Self {
418            value.clone()
419        }
420    }
421    impl AbiInput {
422        pub fn builder() -> builder::AbiInput {
423            Default::default()
424        }
425    }
426    ///The type of the ABI item.
427    ///
428    /// <details><summary>JSON schema</summary>
429    ///
430    /// ```json
431    ///{
432    ///  "description": "The type of the ABI item.",
433    ///  "examples": [
434    ///    "constructor"
435    ///  ],
436    ///  "type": "string",
437    ///  "enum": [
438    ///    "constructor",
439    ///    "error",
440    ///    "event",
441    ///    "fallback",
442    ///    "receive"
443    ///  ]
444    ///}
445    /// ```
446    /// </details>
447    #[derive(
448        ::serde::Deserialize,
449        ::serde::Serialize,
450        Clone,
451        Copy,
452        Debug,
453        Eq,
454        Hash,
455        Ord,
456        PartialEq,
457        PartialOrd,
458    )]
459    pub enum AbiInputType {
460        #[serde(rename = "constructor")]
461        Constructor,
462        #[serde(rename = "error")]
463        Error,
464        #[serde(rename = "event")]
465        Event,
466        #[serde(rename = "fallback")]
467        Fallback,
468        #[serde(rename = "receive")]
469        Receive,
470    }
471    impl ::std::convert::From<&Self> for AbiInputType {
472        fn from(value: &AbiInputType) -> Self {
473            value.clone()
474        }
475    }
476    impl ::std::fmt::Display for AbiInputType {
477        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
478            match *self {
479                Self::Constructor => f.write_str("constructor"),
480                Self::Error => f.write_str("error"),
481                Self::Event => f.write_str("event"),
482                Self::Fallback => f.write_str("fallback"),
483                Self::Receive => f.write_str("receive"),
484            }
485        }
486    }
487    impl ::std::str::FromStr for AbiInputType {
488        type Err = self::error::ConversionError;
489        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
490            match value {
491                "constructor" => Ok(Self::Constructor),
492                "error" => Ok(Self::Error),
493                "event" => Ok(Self::Event),
494                "fallback" => Ok(Self::Fallback),
495                "receive" => Ok(Self::Receive),
496                _ => Err("invalid value".into()),
497            }
498        }
499    }
500    impl ::std::convert::TryFrom<&str> for AbiInputType {
501        type Error = self::error::ConversionError;
502        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
503            value.parse()
504        }
505    }
506    impl ::std::convert::TryFrom<&::std::string::String> for AbiInputType {
507        type Error = self::error::ConversionError;
508        fn try_from(
509            value: &::std::string::String,
510        ) -> ::std::result::Result<Self, self::error::ConversionError> {
511            value.parse()
512        }
513    }
514    impl ::std::convert::TryFrom<::std::string::String> for AbiInputType {
515        type Error = self::error::ConversionError;
516        fn try_from(
517            value: ::std::string::String,
518        ) -> ::std::result::Result<Self, self::error::ConversionError> {
519            value.parse()
520        }
521    }
522    ///`AbiItem`
523    ///
524    /// <details><summary>JSON schema</summary>
525    ///
526    /// ```json
527    ///{
528    ///  "oneOf": [
529    ///    {
530    ///      "$ref": "#/components/schemas/AbiFunction"
531    ///    },
532    ///    {
533    ///      "$ref": "#/components/schemas/AbiInput"
534    ///    }
535    ///  ]
536    ///}
537    /// ```
538    /// </details>
539    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
540    #[serde(untagged)]
541    pub enum AbiItem {
542        Function(AbiFunction),
543        Input(AbiInput),
544    }
545    impl ::std::convert::From<&Self> for AbiItem {
546        fn from(value: &AbiItem) -> Self {
547            value.clone()
548        }
549    }
550    impl ::std::convert::From<AbiFunction> for AbiItem {
551        fn from(value: AbiFunction) -> Self {
552            Self::Function(value)
553        }
554    }
555    impl ::std::convert::From<AbiInput> for AbiItem {
556        fn from(value: AbiInput) -> Self {
557            Self::Input(value)
558        }
559    }
560    ///Parameter definition for ABI functions, errors, and constructors.
561    ///
562    /// <details><summary>JSON schema</summary>
563    ///
564    /// ```json
565    ///{
566    ///  "description": "Parameter definition for ABI functions, errors, and constructors.",
567    ///  "examples": [
568    ///    {
569    ///      "internalType": "uint256",
570    ///      "name": "tokenId",
571    ///      "type": "uint256"
572    ///    }
573    ///  ],
574    ///  "type": "object",
575    ///  "required": [
576    ///    "type"
577    ///  ],
578    ///  "properties": {
579    ///    "components": {
580    ///      "description": "Used for tuple types.",
581    ///      "examples": [
582    ///        [
583    ///          {
584    ///            "name": "x",
585    ///            "type": "uint256"
586    ///          }
587    ///        ]
588    ///      ],
589    ///      "type": "array",
590    ///      "items": {
591    ///        "$ref": "#/components/schemas/AbiParameter"
592    ///      }
593    ///    },
594    ///    "internalType": {
595    ///      "description": "The internal Solidity type used by the compiler.",
596    ///      "examples": [
597    ///        "uint256"
598    ///      ],
599    ///      "type": "string"
600    ///    },
601    ///    "name": {
602    ///      "description": "The name of the parameter.",
603    ///      "examples": [
604    ///        "tokenId"
605    ///      ],
606    ///      "type": "string"
607    ///    },
608    ///    "type": {
609    ///      "description": "The canonical type of the parameter.",
610    ///      "examples": [
611    ///        "uint256"
612    ///      ],
613    ///      "type": "string"
614    ///    }
615    ///  },
616    ///  "x-audience": "public"
617    ///}
618    /// ```
619    /// </details>
620    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
621    pub struct AbiParameter {
622        ///Used for tuple types.
623        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
624        pub components: ::std::vec::Vec<AbiParameter>,
625        ///The internal Solidity type used by the compiler.
626        #[serde(
627            rename = "internalType",
628            default,
629            skip_serializing_if = "::std::option::Option::is_none"
630        )]
631        pub internal_type: ::std::option::Option<::std::string::String>,
632        ///The name of the parameter.
633        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
634        pub name: ::std::option::Option<::std::string::String>,
635        ///The canonical type of the parameter.
636        #[serde(rename = "type")]
637        pub type_: ::std::string::String,
638    }
639    impl ::std::convert::From<&AbiParameter> for AbiParameter {
640        fn from(value: &AbiParameter) -> Self {
641            value.clone()
642        }
643    }
644    impl AbiParameter {
645        pub fn builder() -> builder::AbiParameter {
646            Default::default()
647        }
648    }
649    ///State mutability of a function in Solidity.
650    ///
651    /// <details><summary>JSON schema</summary>
652    ///
653    /// ```json
654    ///{
655    ///  "description": "State mutability of a function in Solidity.",
656    ///  "examples": [
657    ///    "view"
658    ///  ],
659    ///  "type": "string",
660    ///  "enum": [
661    ///    "pure",
662    ///    "view",
663    ///    "nonpayable",
664    ///    "payable"
665    ///  ],
666    ///  "x-audience": "public"
667    ///}
668    /// ```
669    /// </details>
670    #[derive(
671        ::serde::Deserialize,
672        ::serde::Serialize,
673        Clone,
674        Copy,
675        Debug,
676        Eq,
677        Hash,
678        Ord,
679        PartialEq,
680        PartialOrd,
681    )]
682    pub enum AbiStateMutability {
683        #[serde(rename = "pure")]
684        Pure,
685        #[serde(rename = "view")]
686        View,
687        #[serde(rename = "nonpayable")]
688        Nonpayable,
689        #[serde(rename = "payable")]
690        Payable,
691    }
692    impl ::std::convert::From<&Self> for AbiStateMutability {
693        fn from(value: &AbiStateMutability) -> Self {
694            value.clone()
695        }
696    }
697    impl ::std::fmt::Display for AbiStateMutability {
698        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
699            match *self {
700                Self::Pure => f.write_str("pure"),
701                Self::View => f.write_str("view"),
702                Self::Nonpayable => f.write_str("nonpayable"),
703                Self::Payable => f.write_str("payable"),
704            }
705        }
706    }
707    impl ::std::str::FromStr for AbiStateMutability {
708        type Err = self::error::ConversionError;
709        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
710            match value {
711                "pure" => Ok(Self::Pure),
712                "view" => Ok(Self::View),
713                "nonpayable" => Ok(Self::Nonpayable),
714                "payable" => Ok(Self::Payable),
715                _ => Err("invalid value".into()),
716            }
717        }
718    }
719    impl ::std::convert::TryFrom<&str> for AbiStateMutability {
720        type Error = self::error::ConversionError;
721        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
722            value.parse()
723        }
724    }
725    impl ::std::convert::TryFrom<&::std::string::String> for AbiStateMutability {
726        type Error = self::error::ConversionError;
727        fn try_from(
728            value: &::std::string::String,
729        ) -> ::std::result::Result<Self, self::error::ConversionError> {
730            value.parse()
731        }
732    }
733    impl ::std::convert::TryFrom<::std::string::String> for AbiStateMutability {
734        type Error = self::error::ConversionError;
735        fn try_from(
736            value: ::std::string::String,
737        ) -> ::std::result::Result<Self, self::error::ConversionError> {
738            value.parse()
739        }
740    }
741    ///Response containing token addresses that an account has received.
742    ///
743    /// <details><summary>JSON schema</summary>
744    ///
745    /// ```json
746    ///{
747    ///  "description": "Response containing token addresses that an account has received.",
748    ///  "type": "object",
749    ///  "properties": {
750    ///    "accountAddress": {
751    ///      "description": "The account address that was queried.",
752    ///      "examples": [
753    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
754    ///      ],
755    ///      "type": "string"
756    ///    },
757    ///    "tokenAddresses": {
758    ///      "description": "List of token contract addresses that the account has received.",
759    ///      "examples": [
760    ///        [
761    ///          "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
762    ///          "0x4200000000000000000000000000000000000006",
763    ///          "0x0000000000000000000000000000000000000000"
764    ///        ]
765    ///      ],
766    ///      "type": "array",
767    ///      "items": {
768    ///        "description": "Token contract address.",
769    ///        "type": "string",
770    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
771    ///      }
772    ///    },
773    ///    "totalCount": {
774    ///      "description": "Total number of unique token addresses discovered.",
775    ///      "examples": [
776    ///        15
777    ///      ],
778    ///      "type": "integer",
779    ///      "minimum": 0.0
780    ///    }
781    ///  }
782    ///}
783    /// ```
784    /// </details>
785    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
786    pub struct AccountTokenAddressesResponse {
787        ///The account address that was queried.
788        #[serde(
789            rename = "accountAddress",
790            default,
791            skip_serializing_if = "::std::option::Option::is_none"
792        )]
793        pub account_address: ::std::option::Option<::std::string::String>,
794        ///List of token contract addresses that the account has received.
795        #[serde(
796            rename = "tokenAddresses",
797            default,
798            skip_serializing_if = "::std::vec::Vec::is_empty"
799        )]
800        pub token_addresses: ::std::vec::Vec<AccountTokenAddressesResponseTokenAddressesItem>,
801        ///Total number of unique token addresses discovered.
802        #[serde(
803            rename = "totalCount",
804            default,
805            skip_serializing_if = "::std::option::Option::is_none"
806        )]
807        pub total_count: ::std::option::Option<u64>,
808    }
809    impl ::std::convert::From<&AccountTokenAddressesResponse> for AccountTokenAddressesResponse {
810        fn from(value: &AccountTokenAddressesResponse) -> Self {
811            value.clone()
812        }
813    }
814    impl ::std::default::Default for AccountTokenAddressesResponse {
815        fn default() -> Self {
816            Self {
817                account_address: Default::default(),
818                token_addresses: Default::default(),
819                total_count: Default::default(),
820            }
821        }
822    }
823    impl AccountTokenAddressesResponse {
824        pub fn builder() -> builder::AccountTokenAddressesResponse {
825            Default::default()
826        }
827    }
828    ///Token contract address.
829    ///
830    /// <details><summary>JSON schema</summary>
831    ///
832    /// ```json
833    ///{
834    ///  "description": "Token contract address.",
835    ///  "type": "string",
836    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
837    ///}
838    /// ```
839    /// </details>
840    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
841    #[serde(transparent)]
842    pub struct AccountTokenAddressesResponseTokenAddressesItem(::std::string::String);
843    impl ::std::ops::Deref for AccountTokenAddressesResponseTokenAddressesItem {
844        type Target = ::std::string::String;
845        fn deref(&self) -> &::std::string::String {
846            &self.0
847        }
848    }
849    impl ::std::convert::From<AccountTokenAddressesResponseTokenAddressesItem>
850        for ::std::string::String
851    {
852        fn from(value: AccountTokenAddressesResponseTokenAddressesItem) -> Self {
853            value.0
854        }
855    }
856    impl ::std::convert::From<&AccountTokenAddressesResponseTokenAddressesItem>
857        for AccountTokenAddressesResponseTokenAddressesItem
858    {
859        fn from(value: &AccountTokenAddressesResponseTokenAddressesItem) -> Self {
860            value.clone()
861        }
862    }
863    impl ::std::str::FromStr for AccountTokenAddressesResponseTokenAddressesItem {
864        type Err = self::error::ConversionError;
865        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
866            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
867                ::std::sync::LazyLock::new(|| {
868                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
869                });
870            if PATTERN.find(value).is_none() {
871                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
872            }
873            Ok(Self(value.to_string()))
874        }
875    }
876    impl ::std::convert::TryFrom<&str> for AccountTokenAddressesResponseTokenAddressesItem {
877        type Error = self::error::ConversionError;
878        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
879            value.parse()
880        }
881    }
882    impl ::std::convert::TryFrom<&::std::string::String>
883        for AccountTokenAddressesResponseTokenAddressesItem
884    {
885        type Error = self::error::ConversionError;
886        fn try_from(
887            value: &::std::string::String,
888        ) -> ::std::result::Result<Self, self::error::ConversionError> {
889            value.parse()
890        }
891    }
892    impl ::std::convert::TryFrom<::std::string::String>
893        for AccountTokenAddressesResponseTokenAddressesItem
894    {
895        type Error = self::error::ConversionError;
896        fn try_from(
897            value: ::std::string::String,
898        ) -> ::std::result::Result<Self, self::error::ConversionError> {
899            value.parse()
900        }
901    }
902    impl<'de> ::serde::Deserialize<'de> for AccountTokenAddressesResponseTokenAddressesItem {
903        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
904        where
905            D: ::serde::Deserializer<'de>,
906        {
907            ::std::string::String::deserialize(deserializer)?
908                .parse()
909                .map_err(|e: self::error::ConversionError| {
910                    <D::Error as ::serde::de::Error>::custom(e.to_string())
911                })
912        }
913    }
914    ///Information about how the end user is authenticated.
915    ///
916    /// <details><summary>JSON schema</summary>
917    ///
918    /// ```json
919    ///{
920    ///  "description": "Information about how the end user is authenticated.",
921    ///  "oneOf": [
922    ///    {
923    ///      "$ref": "#/components/schemas/EmailAuthentication"
924    ///    },
925    ///    {
926    ///      "$ref": "#/components/schemas/SmsAuthentication"
927    ///    },
928    ///    {
929    ///      "$ref": "#/components/schemas/DeveloperJWTAuthentication"
930    ///    },
931    ///    {
932    ///      "$ref": "#/components/schemas/OAuth2Authentication"
933    ///    }
934    ///  ]
935    ///}
936    /// ```
937    /// </details>
938    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
939    #[serde(untagged)]
940    pub enum AuthenticationMethod {
941        EmailAuthentication(EmailAuthentication),
942        SmsAuthentication(SmsAuthentication),
943        DeveloperJwtAuthentication(DeveloperJwtAuthentication),
944        OAuth2Authentication(OAuth2Authentication),
945    }
946    impl ::std::convert::From<&Self> for AuthenticationMethod {
947        fn from(value: &AuthenticationMethod) -> Self {
948            value.clone()
949        }
950    }
951    impl ::std::convert::From<EmailAuthentication> for AuthenticationMethod {
952        fn from(value: EmailAuthentication) -> Self {
953            Self::EmailAuthentication(value)
954        }
955    }
956    impl ::std::convert::From<SmsAuthentication> for AuthenticationMethod {
957        fn from(value: SmsAuthentication) -> Self {
958            Self::SmsAuthentication(value)
959        }
960    }
961    impl ::std::convert::From<DeveloperJwtAuthentication> for AuthenticationMethod {
962        fn from(value: DeveloperJwtAuthentication) -> Self {
963            Self::DeveloperJwtAuthentication(value)
964        }
965    }
966    impl ::std::convert::From<OAuth2Authentication> for AuthenticationMethod {
967        fn from(value: OAuth2Authentication) -> Self {
968            Self::OAuth2Authentication(value)
969        }
970    }
971    ///The list of valid authentication methods linked to the end user.
972    ///
973    /// <details><summary>JSON schema</summary>
974    ///
975    /// ```json
976    ///{
977    ///  "description": "The list of valid authentication methods linked to the end user.",
978    ///  "examples": [
979    ///    [
980    ///      {
981    ///        "email": "user@example.com",
982    ///        "type": "email"
983    ///      },
984    ///      {
985    ///        "phoneNumber": "+12055555555",
986    ///        "type": "sms"
987    ///      },
988    ///      {
989    ///        "kid": "NjVBRjY5MDlCMUIwNzU4RTA2QzZFMDQ4QzQ2MDAyQjVDNjk1RTM2Qg",
990    ///        "sub": "e051beeb-7163-4527-a5b6-35e301529ff2",
991    ///        "type": "jwt"
992    ///      },
993    ///      {
994    ///        "email": "test.user@gmail.com",
995    ///        "sub": "115346410074741490243",
996    ///        "type": "google"
997    ///      }
998    ///    ]
999    ///  ],
1000    ///  "type": "array",
1001    ///  "items": {
1002    ///    "$ref": "#/components/schemas/AuthenticationMethod"
1003    ///  }
1004    ///}
1005    /// ```
1006    /// </details>
1007    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1008    #[serde(transparent)]
1009    pub struct AuthenticationMethods(pub ::std::vec::Vec<AuthenticationMethod>);
1010    impl ::std::ops::Deref for AuthenticationMethods {
1011        type Target = ::std::vec::Vec<AuthenticationMethod>;
1012        fn deref(&self) -> &::std::vec::Vec<AuthenticationMethod> {
1013            &self.0
1014        }
1015    }
1016    impl ::std::convert::From<AuthenticationMethods> for ::std::vec::Vec<AuthenticationMethod> {
1017        fn from(value: AuthenticationMethods) -> Self {
1018            value.0
1019        }
1020    }
1021    impl ::std::convert::From<&AuthenticationMethods> for AuthenticationMethods {
1022        fn from(value: &AuthenticationMethods) -> Self {
1023            value.clone()
1024        }
1025    }
1026    impl ::std::convert::From<::std::vec::Vec<AuthenticationMethod>> for AuthenticationMethods {
1027        fn from(value: ::std::vec::Vec<AuthenticationMethod>) -> Self {
1028            Self(value)
1029        }
1030    }
1031    ///`CommonSwapResponse`
1032    ///
1033    /// <details><summary>JSON schema</summary>
1034    ///
1035    /// ```json
1036    ///{
1037    ///  "examples": [
1038    ///    {
1039    ///      "blockNumber": "17038723",
1040    ///      "fees": {
1041    ///        "gasFee": {
1042    ///          "amount": "1000000000000000000",
1043    ///          "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
1044    ///        },
1045    ///        "protocolFee": {
1046    ///          "amount": "1000000000000000000",
1047    ///          "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
1048    ///        }
1049    ///      },
1050    ///      "fromAmount": "1000000000000000000",
1051    ///      "fromToken": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
1052    ///      "issues": {
1053    ///        "allowance": {
1054    ///          "currentAllowance": "1000000000",
1055    ///          "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1056    ///        },
1057    ///        "balance": {
1058    ///          "currentBalance": "1000000000000000000",
1059    ///          "requiredBalance": "1000000000000000000",
1060    ///          "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
1061    ///        },
1062    ///        "simulationIncomplete": false
1063    ///      },
1064    ///      "liquidityAvailable": true,
1065    ///      "minToAmount": "900000000000000000",
1066    ///      "toAmount": "1000000000000000000",
1067    ///      "toToken": "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
1068    ///    }
1069    ///  ],
1070    ///  "type": "object",
1071    ///  "required": [
1072    ///    "blockNumber",
1073    ///    "fees",
1074    ///    "fromAmount",
1075    ///    "fromToken",
1076    ///    "issues",
1077    ///    "liquidityAvailable",
1078    ///    "minToAmount",
1079    ///    "toAmount",
1080    ///    "toToken"
1081    ///  ],
1082    ///  "properties": {
1083    ///    "blockNumber": {
1084    ///      "description": "The block number at which the liquidity conditions were examined.",
1085    ///      "examples": [
1086    ///        "17038723"
1087    ///      ],
1088    ///      "type": "string",
1089    ///      "pattern": "^[1-9]\\d*$"
1090    ///    },
1091    ///    "fees": {
1092    ///      "description": "The estimated fees for the swap.",
1093    ///      "examples": [
1094    ///        {
1095    ///          "gasFee": {
1096    ///            "amount": "1000000000000000000",
1097    ///            "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
1098    ///          },
1099    ///          "protocolFee": {
1100    ///            "amount": "1000000000000000000",
1101    ///            "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
1102    ///          }
1103    ///        }
1104    ///      ],
1105    ///      "type": "object",
1106    ///      "required": [
1107    ///        "gasFee",
1108    ///        "protocolFee"
1109    ///      ],
1110    ///      "properties": {
1111    ///        "gasFee": {
1112    ///          "description": "The estimated gas fee for the swap.",
1113    ///          "type": [
1114    ///            "object",
1115    ///            "null"
1116    ///          ],
1117    ///          "allOf": [
1118    ///            {
1119    ///              "$ref": "#/components/schemas/TokenFee"
1120    ///            }
1121    ///          ]
1122    ///        },
1123    ///        "protocolFee": {
1124    ///          "description": "The estimated protocol fee for the swap.",
1125    ///          "type": [
1126    ///            "object",
1127    ///            "null"
1128    ///          ],
1129    ///          "allOf": [
1130    ///            {
1131    ///              "$ref": "#/components/schemas/TokenFee"
1132    ///            }
1133    ///          ]
1134    ///        }
1135    ///      }
1136    ///    },
1137    ///    "fromAmount": {
1138    ///      "description": "The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.",
1139    ///      "examples": [
1140    ///        "1000000000000000000"
1141    ///      ],
1142    ///      "type": "string",
1143    ///      "pattern": "^(0|[1-9]\\d*)$"
1144    ///    },
1145    ///    "fromToken": {
1146    ///      "description": "The 0x-prefixed contract address of the token that will be sent.",
1147    ///      "examples": [
1148    ///        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
1149    ///      ],
1150    ///      "type": "string",
1151    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
1152    ///    },
1153    ///    "issues": {
1154    ///      "description": "An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.",
1155    ///      "examples": [
1156    ///        {
1157    ///          "allowance": {
1158    ///            "currentAllowance": "1000000000",
1159    ///            "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1160    ///          },
1161    ///          "balance": {
1162    ///            "currentBalance": "900000000000000000",
1163    ///            "requiredBalance": "1000000000000000000",
1164    ///            "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
1165    ///          },
1166    ///          "simulationIncomplete": false
1167    ///        }
1168    ///      ],
1169    ///      "type": "object",
1170    ///      "required": [
1171    ///        "allowance",
1172    ///        "balance",
1173    ///        "simulationIncomplete"
1174    ///      ],
1175    ///      "properties": {
1176    ///        "allowance": {
1177    ///          "description": "Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.",
1178    ///          "examples": [
1179    ///            {
1180    ///              "currentAllowance": "1000000000",
1181    ///              "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1182    ///            }
1183    ///          ],
1184    ///          "type": [
1185    ///            "object",
1186    ///            "null"
1187    ///          ],
1188    ///          "required": [
1189    ///            "currentAllowance",
1190    ///            "spender"
1191    ///          ],
1192    ///          "properties": {
1193    ///            "currentAllowance": {
1194    ///              "description": "The current allowance of the `fromToken` by the `taker`.",
1195    ///              "examples": [
1196    ///                "1000000000"
1197    ///              ],
1198    ///              "type": "string",
1199    ///              "pattern": "^\\d+$"
1200    ///            },
1201    ///            "spender": {
1202    ///              "description": "The 0x-prefixed address of to set the allowance on.",
1203    ///              "examples": [
1204    ///                "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1205    ///              ],
1206    ///              "type": "string",
1207    ///              "pattern": "^0x[a-fA-F0-9]{40}$"
1208    ///            }
1209    ///          }
1210    ///        },
1211    ///        "balance": {
1212    ///          "description": "Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.",
1213    ///          "examples": [
1214    ///            {
1215    ///              "currentBalance": "1000000000000000000",
1216    ///              "requiredBalance": "1000000000000000000",
1217    ///              "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
1218    ///            }
1219    ///          ],
1220    ///          "type": [
1221    ///            "object",
1222    ///            "null"
1223    ///          ],
1224    ///          "required": [
1225    ///            "currentBalance",
1226    ///            "requiredBalance",
1227    ///            "token"
1228    ///          ],
1229    ///          "properties": {
1230    ///            "currentBalance": {
1231    ///              "description": "The current balance of the `fromToken` by the `taker`.",
1232    ///              "examples": [
1233    ///                "10000000"
1234    ///              ],
1235    ///              "type": "string",
1236    ///              "pattern": "^\\d+$"
1237    ///            },
1238    ///            "requiredBalance": {
1239    ///              "description": "The amount of the token that the `taker` must hold.",
1240    ///              "examples": [
1241    ///                "1000000000000000000"
1242    ///              ],
1243    ///              "type": "string",
1244    ///              "pattern": "^\\d+$"
1245    ///            },
1246    ///            "token": {
1247    ///              "description": "The 0x-prefixed contract address of the token.",
1248    ///              "type": "string",
1249    ///              "pattern": "^0x[a-fA-F0-9]{40}$"
1250    ///            }
1251    ///          }
1252    ///        },
1253    ///        "simulationIncomplete": {
1254    ///          "description": "This is set to true when the transaction cannot be validated. This can happen when the taker has an insufficient balance of the `fromToken`. Note that this does not necessarily mean that the trade will revert.",
1255    ///          "examples": [
1256    ///            false
1257    ///          ],
1258    ///          "type": "boolean"
1259    ///        }
1260    ///      }
1261    ///    },
1262    ///    "liquidityAvailable": {
1263    ///      "description": "Whether sufficient liquidity is available to settle the swap. All other fields in the response will be empty if this is false.",
1264    ///      "examples": [
1265    ///        true
1266    ///      ],
1267    ///      "type": "boolean",
1268    ///      "enum": [
1269    ///        true
1270    ///      ]
1271    ///    },
1272    ///    "minToAmount": {
1273    ///      "description": "The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.",
1274    ///      "examples": [
1275    ///        "900000000000000000"
1276    ///      ],
1277    ///      "type": "string",
1278    ///      "pattern": "^(0|[1-9]\\d*)$"
1279    ///    },
1280    ///    "toAmount": {
1281    ///      "description": "The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.",
1282    ///      "examples": [
1283    ///        "1000000000000000000"
1284    ///      ],
1285    ///      "type": "string",
1286    ///      "pattern": "^(0|[1-9]\\d*)$"
1287    ///    },
1288    ///    "toToken": {
1289    ///      "description": "The 0x-prefixed contract address of the token that will be received.",
1290    ///      "examples": [
1291    ///        "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
1292    ///      ],
1293    ///      "type": "string",
1294    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
1295    ///    }
1296    ///  }
1297    ///}
1298    /// ```
1299    /// </details>
1300    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1301    pub struct CommonSwapResponse {
1302        ///The block number at which the liquidity conditions were examined.
1303        #[serde(rename = "blockNumber")]
1304        pub block_number: CommonSwapResponseBlockNumber,
1305        pub fees: CommonSwapResponseFees,
1306        ///The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
1307        #[serde(rename = "fromAmount")]
1308        pub from_amount: CommonSwapResponseFromAmount,
1309        ///The 0x-prefixed contract address of the token that will be sent.
1310        #[serde(rename = "fromToken")]
1311        pub from_token: CommonSwapResponseFromToken,
1312        pub issues: CommonSwapResponseIssues,
1313        ///Whether sufficient liquidity is available to settle the swap. All other fields in the response will be empty if this is false.
1314        #[serde(rename = "liquidityAvailable")]
1315        pub liquidity_available: bool,
1316        ///The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.
1317        #[serde(rename = "minToAmount")]
1318        pub min_to_amount: CommonSwapResponseMinToAmount,
1319        ///The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.
1320        #[serde(rename = "toAmount")]
1321        pub to_amount: CommonSwapResponseToAmount,
1322        ///The 0x-prefixed contract address of the token that will be received.
1323        #[serde(rename = "toToken")]
1324        pub to_token: CommonSwapResponseToToken,
1325    }
1326    impl ::std::convert::From<&CommonSwapResponse> for CommonSwapResponse {
1327        fn from(value: &CommonSwapResponse) -> Self {
1328            value.clone()
1329        }
1330    }
1331    impl CommonSwapResponse {
1332        pub fn builder() -> builder::CommonSwapResponse {
1333            Default::default()
1334        }
1335    }
1336    ///The block number at which the liquidity conditions were examined.
1337    ///
1338    /// <details><summary>JSON schema</summary>
1339    ///
1340    /// ```json
1341    ///{
1342    ///  "description": "The block number at which the liquidity conditions were examined.",
1343    ///  "examples": [
1344    ///    "17038723"
1345    ///  ],
1346    ///  "type": "string",
1347    ///  "pattern": "^[1-9]\\d*$"
1348    ///}
1349    /// ```
1350    /// </details>
1351    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1352    #[serde(transparent)]
1353    pub struct CommonSwapResponseBlockNumber(::std::string::String);
1354    impl ::std::ops::Deref for CommonSwapResponseBlockNumber {
1355        type Target = ::std::string::String;
1356        fn deref(&self) -> &::std::string::String {
1357            &self.0
1358        }
1359    }
1360    impl ::std::convert::From<CommonSwapResponseBlockNumber> for ::std::string::String {
1361        fn from(value: CommonSwapResponseBlockNumber) -> Self {
1362            value.0
1363        }
1364    }
1365    impl ::std::convert::From<&CommonSwapResponseBlockNumber> for CommonSwapResponseBlockNumber {
1366        fn from(value: &CommonSwapResponseBlockNumber) -> Self {
1367            value.clone()
1368        }
1369    }
1370    impl ::std::str::FromStr for CommonSwapResponseBlockNumber {
1371        type Err = self::error::ConversionError;
1372        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1373            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
1374                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[1-9]\\d*$").unwrap());
1375            if PATTERN.find(value).is_none() {
1376                return Err("doesn't match pattern \"^[1-9]\\d*$\"".into());
1377            }
1378            Ok(Self(value.to_string()))
1379        }
1380    }
1381    impl ::std::convert::TryFrom<&str> for CommonSwapResponseBlockNumber {
1382        type Error = self::error::ConversionError;
1383        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1384            value.parse()
1385        }
1386    }
1387    impl ::std::convert::TryFrom<&::std::string::String> for CommonSwapResponseBlockNumber {
1388        type Error = self::error::ConversionError;
1389        fn try_from(
1390            value: &::std::string::String,
1391        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1392            value.parse()
1393        }
1394    }
1395    impl ::std::convert::TryFrom<::std::string::String> for CommonSwapResponseBlockNumber {
1396        type Error = self::error::ConversionError;
1397        fn try_from(
1398            value: ::std::string::String,
1399        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1400            value.parse()
1401        }
1402    }
1403    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseBlockNumber {
1404        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1405        where
1406            D: ::serde::Deserializer<'de>,
1407        {
1408            ::std::string::String::deserialize(deserializer)?
1409                .parse()
1410                .map_err(|e: self::error::ConversionError| {
1411                    <D::Error as ::serde::de::Error>::custom(e.to_string())
1412                })
1413        }
1414    }
1415    ///The estimated fees for the swap.
1416    ///
1417    /// <details><summary>JSON schema</summary>
1418    ///
1419    /// ```json
1420    ///{
1421    ///  "description": "The estimated fees for the swap.",
1422    ///  "examples": [
1423    ///    {
1424    ///      "gasFee": {
1425    ///        "amount": "1000000000000000000",
1426    ///        "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
1427    ///      },
1428    ///      "protocolFee": {
1429    ///        "amount": "1000000000000000000",
1430    ///        "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
1431    ///      }
1432    ///    }
1433    ///  ],
1434    ///  "type": "object",
1435    ///  "required": [
1436    ///    "gasFee",
1437    ///    "protocolFee"
1438    ///  ],
1439    ///  "properties": {
1440    ///    "gasFee": {
1441    ///      "description": "The estimated gas fee for the swap.",
1442    ///      "type": [
1443    ///        "object",
1444    ///        "null"
1445    ///      ],
1446    ///      "allOf": [
1447    ///        {
1448    ///          "$ref": "#/components/schemas/TokenFee"
1449    ///        }
1450    ///      ]
1451    ///    },
1452    ///    "protocolFee": {
1453    ///      "description": "The estimated protocol fee for the swap.",
1454    ///      "type": [
1455    ///        "object",
1456    ///        "null"
1457    ///      ],
1458    ///      "allOf": [
1459    ///        {
1460    ///          "$ref": "#/components/schemas/TokenFee"
1461    ///        }
1462    ///      ]
1463    ///    }
1464    ///  }
1465    ///}
1466    /// ```
1467    /// </details>
1468    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1469    pub struct CommonSwapResponseFees {
1470        ///The estimated gas fee for the swap.
1471        #[serde(rename = "gasFee")]
1472        pub gas_fee: ::std::option::Option<TokenFee>,
1473        ///The estimated protocol fee for the swap.
1474        #[serde(rename = "protocolFee")]
1475        pub protocol_fee: ::std::option::Option<TokenFee>,
1476    }
1477    impl ::std::convert::From<&CommonSwapResponseFees> for CommonSwapResponseFees {
1478        fn from(value: &CommonSwapResponseFees) -> Self {
1479            value.clone()
1480        }
1481    }
1482    impl CommonSwapResponseFees {
1483        pub fn builder() -> builder::CommonSwapResponseFees {
1484            Default::default()
1485        }
1486    }
1487    ///The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
1488    ///
1489    /// <details><summary>JSON schema</summary>
1490    ///
1491    /// ```json
1492    ///{
1493    ///  "description": "The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.",
1494    ///  "examples": [
1495    ///    "1000000000000000000"
1496    ///  ],
1497    ///  "type": "string",
1498    ///  "pattern": "^(0|[1-9]\\d*)$"
1499    ///}
1500    /// ```
1501    /// </details>
1502    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1503    #[serde(transparent)]
1504    pub struct CommonSwapResponseFromAmount(::std::string::String);
1505    impl ::std::ops::Deref for CommonSwapResponseFromAmount {
1506        type Target = ::std::string::String;
1507        fn deref(&self) -> &::std::string::String {
1508            &self.0
1509        }
1510    }
1511    impl ::std::convert::From<CommonSwapResponseFromAmount> for ::std::string::String {
1512        fn from(value: CommonSwapResponseFromAmount) -> Self {
1513            value.0
1514        }
1515    }
1516    impl ::std::convert::From<&CommonSwapResponseFromAmount> for CommonSwapResponseFromAmount {
1517        fn from(value: &CommonSwapResponseFromAmount) -> Self {
1518            value.clone()
1519        }
1520    }
1521    impl ::std::str::FromStr for CommonSwapResponseFromAmount {
1522        type Err = self::error::ConversionError;
1523        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1524            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
1525                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
1526            if PATTERN.find(value).is_none() {
1527                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
1528            }
1529            Ok(Self(value.to_string()))
1530        }
1531    }
1532    impl ::std::convert::TryFrom<&str> for CommonSwapResponseFromAmount {
1533        type Error = self::error::ConversionError;
1534        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1535            value.parse()
1536        }
1537    }
1538    impl ::std::convert::TryFrom<&::std::string::String> for CommonSwapResponseFromAmount {
1539        type Error = self::error::ConversionError;
1540        fn try_from(
1541            value: &::std::string::String,
1542        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1543            value.parse()
1544        }
1545    }
1546    impl ::std::convert::TryFrom<::std::string::String> for CommonSwapResponseFromAmount {
1547        type Error = self::error::ConversionError;
1548        fn try_from(
1549            value: ::std::string::String,
1550        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1551            value.parse()
1552        }
1553    }
1554    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseFromAmount {
1555        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1556        where
1557            D: ::serde::Deserializer<'de>,
1558        {
1559            ::std::string::String::deserialize(deserializer)?
1560                .parse()
1561                .map_err(|e: self::error::ConversionError| {
1562                    <D::Error as ::serde::de::Error>::custom(e.to_string())
1563                })
1564        }
1565    }
1566    ///The 0x-prefixed contract address of the token that will be sent.
1567    ///
1568    /// <details><summary>JSON schema</summary>
1569    ///
1570    /// ```json
1571    ///{
1572    ///  "description": "The 0x-prefixed contract address of the token that will be sent.",
1573    ///  "examples": [
1574    ///    "0x6B175474E89094C44Da98b954EedeAC495271d0F"
1575    ///  ],
1576    ///  "type": "string",
1577    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
1578    ///}
1579    /// ```
1580    /// </details>
1581    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1582    #[serde(transparent)]
1583    pub struct CommonSwapResponseFromToken(::std::string::String);
1584    impl ::std::ops::Deref for CommonSwapResponseFromToken {
1585        type Target = ::std::string::String;
1586        fn deref(&self) -> &::std::string::String {
1587            &self.0
1588        }
1589    }
1590    impl ::std::convert::From<CommonSwapResponseFromToken> for ::std::string::String {
1591        fn from(value: CommonSwapResponseFromToken) -> Self {
1592            value.0
1593        }
1594    }
1595    impl ::std::convert::From<&CommonSwapResponseFromToken> for CommonSwapResponseFromToken {
1596        fn from(value: &CommonSwapResponseFromToken) -> Self {
1597            value.clone()
1598        }
1599    }
1600    impl ::std::str::FromStr for CommonSwapResponseFromToken {
1601        type Err = self::error::ConversionError;
1602        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1603            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
1604                ::std::sync::LazyLock::new(|| {
1605                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
1606                });
1607            if PATTERN.find(value).is_none() {
1608                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
1609            }
1610            Ok(Self(value.to_string()))
1611        }
1612    }
1613    impl ::std::convert::TryFrom<&str> for CommonSwapResponseFromToken {
1614        type Error = self::error::ConversionError;
1615        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1616            value.parse()
1617        }
1618    }
1619    impl ::std::convert::TryFrom<&::std::string::String> for CommonSwapResponseFromToken {
1620        type Error = self::error::ConversionError;
1621        fn try_from(
1622            value: &::std::string::String,
1623        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1624            value.parse()
1625        }
1626    }
1627    impl ::std::convert::TryFrom<::std::string::String> for CommonSwapResponseFromToken {
1628        type Error = self::error::ConversionError;
1629        fn try_from(
1630            value: ::std::string::String,
1631        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1632            value.parse()
1633        }
1634    }
1635    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseFromToken {
1636        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1637        where
1638            D: ::serde::Deserializer<'de>,
1639        {
1640            ::std::string::String::deserialize(deserializer)?
1641                .parse()
1642                .map_err(|e: self::error::ConversionError| {
1643                    <D::Error as ::serde::de::Error>::custom(e.to_string())
1644                })
1645        }
1646    }
1647    ///An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.
1648    ///
1649    /// <details><summary>JSON schema</summary>
1650    ///
1651    /// ```json
1652    ///{
1653    ///  "description": "An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.",
1654    ///  "examples": [
1655    ///    {
1656    ///      "allowance": {
1657    ///        "currentAllowance": "1000000000",
1658    ///        "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1659    ///      },
1660    ///      "balance": {
1661    ///        "currentBalance": "900000000000000000",
1662    ///        "requiredBalance": "1000000000000000000",
1663    ///        "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
1664    ///      },
1665    ///      "simulationIncomplete": false
1666    ///    }
1667    ///  ],
1668    ///  "type": "object",
1669    ///  "required": [
1670    ///    "allowance",
1671    ///    "balance",
1672    ///    "simulationIncomplete"
1673    ///  ],
1674    ///  "properties": {
1675    ///    "allowance": {
1676    ///      "description": "Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.",
1677    ///      "examples": [
1678    ///        {
1679    ///          "currentAllowance": "1000000000",
1680    ///          "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1681    ///        }
1682    ///      ],
1683    ///      "type": [
1684    ///        "object",
1685    ///        "null"
1686    ///      ],
1687    ///      "required": [
1688    ///        "currentAllowance",
1689    ///        "spender"
1690    ///      ],
1691    ///      "properties": {
1692    ///        "currentAllowance": {
1693    ///          "description": "The current allowance of the `fromToken` by the `taker`.",
1694    ///          "examples": [
1695    ///            "1000000000"
1696    ///          ],
1697    ///          "type": "string",
1698    ///          "pattern": "^\\d+$"
1699    ///        },
1700    ///        "spender": {
1701    ///          "description": "The 0x-prefixed address of to set the allowance on.",
1702    ///          "examples": [
1703    ///            "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1704    ///          ],
1705    ///          "type": "string",
1706    ///          "pattern": "^0x[a-fA-F0-9]{40}$"
1707    ///        }
1708    ///      }
1709    ///    },
1710    ///    "balance": {
1711    ///      "description": "Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.",
1712    ///      "examples": [
1713    ///        {
1714    ///          "currentBalance": "1000000000000000000",
1715    ///          "requiredBalance": "1000000000000000000",
1716    ///          "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
1717    ///        }
1718    ///      ],
1719    ///      "type": [
1720    ///        "object",
1721    ///        "null"
1722    ///      ],
1723    ///      "required": [
1724    ///        "currentBalance",
1725    ///        "requiredBalance",
1726    ///        "token"
1727    ///      ],
1728    ///      "properties": {
1729    ///        "currentBalance": {
1730    ///          "description": "The current balance of the `fromToken` by the `taker`.",
1731    ///          "examples": [
1732    ///            "10000000"
1733    ///          ],
1734    ///          "type": "string",
1735    ///          "pattern": "^\\d+$"
1736    ///        },
1737    ///        "requiredBalance": {
1738    ///          "description": "The amount of the token that the `taker` must hold.",
1739    ///          "examples": [
1740    ///            "1000000000000000000"
1741    ///          ],
1742    ///          "type": "string",
1743    ///          "pattern": "^\\d+$"
1744    ///        },
1745    ///        "token": {
1746    ///          "description": "The 0x-prefixed contract address of the token.",
1747    ///          "type": "string",
1748    ///          "pattern": "^0x[a-fA-F0-9]{40}$"
1749    ///        }
1750    ///      }
1751    ///    },
1752    ///    "simulationIncomplete": {
1753    ///      "description": "This is set to true when the transaction cannot be validated. This can happen when the taker has an insufficient balance of the `fromToken`. Note that this does not necessarily mean that the trade will revert.",
1754    ///      "examples": [
1755    ///        false
1756    ///      ],
1757    ///      "type": "boolean"
1758    ///    }
1759    ///  }
1760    ///}
1761    /// ```
1762    /// </details>
1763    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1764    pub struct CommonSwapResponseIssues {
1765        ///Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.
1766        pub allowance: ::std::option::Option<CommonSwapResponseIssuesAllowance>,
1767        ///Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.
1768        pub balance: ::std::option::Option<CommonSwapResponseIssuesBalance>,
1769        ///This is set to true when the transaction cannot be validated. This can happen when the taker has an insufficient balance of the `fromToken`. Note that this does not necessarily mean that the trade will revert.
1770        #[serde(rename = "simulationIncomplete")]
1771        pub simulation_incomplete: bool,
1772    }
1773    impl ::std::convert::From<&CommonSwapResponseIssues> for CommonSwapResponseIssues {
1774        fn from(value: &CommonSwapResponseIssues) -> Self {
1775            value.clone()
1776        }
1777    }
1778    impl CommonSwapResponseIssues {
1779        pub fn builder() -> builder::CommonSwapResponseIssues {
1780            Default::default()
1781        }
1782    }
1783    ///Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.
1784    ///
1785    /// <details><summary>JSON schema</summary>
1786    ///
1787    /// ```json
1788    ///{
1789    ///  "description": "Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.",
1790    ///  "examples": [
1791    ///    {
1792    ///      "currentAllowance": "1000000000",
1793    ///      "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1794    ///    }
1795    ///  ],
1796    ///  "type": "object",
1797    ///  "required": [
1798    ///    "currentAllowance",
1799    ///    "spender"
1800    ///  ],
1801    ///  "properties": {
1802    ///    "currentAllowance": {
1803    ///      "description": "The current allowance of the `fromToken` by the `taker`.",
1804    ///      "examples": [
1805    ///        "1000000000"
1806    ///      ],
1807    ///      "type": "string",
1808    ///      "pattern": "^\\d+$"
1809    ///    },
1810    ///    "spender": {
1811    ///      "description": "The 0x-prefixed address of to set the allowance on.",
1812    ///      "examples": [
1813    ///        "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1814    ///      ],
1815    ///      "type": "string",
1816    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
1817    ///    }
1818    ///  }
1819    ///}
1820    /// ```
1821    /// </details>
1822    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1823    pub struct CommonSwapResponseIssuesAllowance {
1824        ///The current allowance of the `fromToken` by the `taker`.
1825        #[serde(rename = "currentAllowance")]
1826        pub current_allowance: CommonSwapResponseIssuesAllowanceCurrentAllowance,
1827        ///The 0x-prefixed address of to set the allowance on.
1828        pub spender: CommonSwapResponseIssuesAllowanceSpender,
1829    }
1830    impl ::std::convert::From<&CommonSwapResponseIssuesAllowance>
1831        for CommonSwapResponseIssuesAllowance
1832    {
1833        fn from(value: &CommonSwapResponseIssuesAllowance) -> Self {
1834            value.clone()
1835        }
1836    }
1837    impl CommonSwapResponseIssuesAllowance {
1838        pub fn builder() -> builder::CommonSwapResponseIssuesAllowance {
1839            Default::default()
1840        }
1841    }
1842    ///The current allowance of the `fromToken` by the `taker`.
1843    ///
1844    /// <details><summary>JSON schema</summary>
1845    ///
1846    /// ```json
1847    ///{
1848    ///  "description": "The current allowance of the `fromToken` by the `taker`.",
1849    ///  "examples": [
1850    ///    "1000000000"
1851    ///  ],
1852    ///  "type": "string",
1853    ///  "pattern": "^\\d+$"
1854    ///}
1855    /// ```
1856    /// </details>
1857    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1858    #[serde(transparent)]
1859    pub struct CommonSwapResponseIssuesAllowanceCurrentAllowance(::std::string::String);
1860    impl ::std::ops::Deref for CommonSwapResponseIssuesAllowanceCurrentAllowance {
1861        type Target = ::std::string::String;
1862        fn deref(&self) -> &::std::string::String {
1863            &self.0
1864        }
1865    }
1866    impl ::std::convert::From<CommonSwapResponseIssuesAllowanceCurrentAllowance>
1867        for ::std::string::String
1868    {
1869        fn from(value: CommonSwapResponseIssuesAllowanceCurrentAllowance) -> Self {
1870            value.0
1871        }
1872    }
1873    impl ::std::convert::From<&CommonSwapResponseIssuesAllowanceCurrentAllowance>
1874        for CommonSwapResponseIssuesAllowanceCurrentAllowance
1875    {
1876        fn from(value: &CommonSwapResponseIssuesAllowanceCurrentAllowance) -> Self {
1877            value.clone()
1878        }
1879    }
1880    impl ::std::str::FromStr for CommonSwapResponseIssuesAllowanceCurrentAllowance {
1881        type Err = self::error::ConversionError;
1882        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1883            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
1884                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
1885            if PATTERN.find(value).is_none() {
1886                return Err("doesn't match pattern \"^\\d+$\"".into());
1887            }
1888            Ok(Self(value.to_string()))
1889        }
1890    }
1891    impl ::std::convert::TryFrom<&str> for CommonSwapResponseIssuesAllowanceCurrentAllowance {
1892        type Error = self::error::ConversionError;
1893        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1894            value.parse()
1895        }
1896    }
1897    impl ::std::convert::TryFrom<&::std::string::String>
1898        for CommonSwapResponseIssuesAllowanceCurrentAllowance
1899    {
1900        type Error = self::error::ConversionError;
1901        fn try_from(
1902            value: &::std::string::String,
1903        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1904            value.parse()
1905        }
1906    }
1907    impl ::std::convert::TryFrom<::std::string::String>
1908        for CommonSwapResponseIssuesAllowanceCurrentAllowance
1909    {
1910        type Error = self::error::ConversionError;
1911        fn try_from(
1912            value: ::std::string::String,
1913        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1914            value.parse()
1915        }
1916    }
1917    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseIssuesAllowanceCurrentAllowance {
1918        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1919        where
1920            D: ::serde::Deserializer<'de>,
1921        {
1922            ::std::string::String::deserialize(deserializer)?
1923                .parse()
1924                .map_err(|e: self::error::ConversionError| {
1925                    <D::Error as ::serde::de::Error>::custom(e.to_string())
1926                })
1927        }
1928    }
1929    ///The 0x-prefixed address of to set the allowance on.
1930    ///
1931    /// <details><summary>JSON schema</summary>
1932    ///
1933    /// ```json
1934    ///{
1935    ///  "description": "The 0x-prefixed address of to set the allowance on.",
1936    ///  "examples": [
1937    ///    "0x000000000022D473030F116dDEE9F6B43aC78BA3"
1938    ///  ],
1939    ///  "type": "string",
1940    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
1941    ///}
1942    /// ```
1943    /// </details>
1944    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1945    #[serde(transparent)]
1946    pub struct CommonSwapResponseIssuesAllowanceSpender(::std::string::String);
1947    impl ::std::ops::Deref for CommonSwapResponseIssuesAllowanceSpender {
1948        type Target = ::std::string::String;
1949        fn deref(&self) -> &::std::string::String {
1950            &self.0
1951        }
1952    }
1953    impl ::std::convert::From<CommonSwapResponseIssuesAllowanceSpender> for ::std::string::String {
1954        fn from(value: CommonSwapResponseIssuesAllowanceSpender) -> Self {
1955            value.0
1956        }
1957    }
1958    impl ::std::convert::From<&CommonSwapResponseIssuesAllowanceSpender>
1959        for CommonSwapResponseIssuesAllowanceSpender
1960    {
1961        fn from(value: &CommonSwapResponseIssuesAllowanceSpender) -> Self {
1962            value.clone()
1963        }
1964    }
1965    impl ::std::str::FromStr for CommonSwapResponseIssuesAllowanceSpender {
1966        type Err = self::error::ConversionError;
1967        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1968            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
1969                ::std::sync::LazyLock::new(|| {
1970                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
1971                });
1972            if PATTERN.find(value).is_none() {
1973                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
1974            }
1975            Ok(Self(value.to_string()))
1976        }
1977    }
1978    impl ::std::convert::TryFrom<&str> for CommonSwapResponseIssuesAllowanceSpender {
1979        type Error = self::error::ConversionError;
1980        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1981            value.parse()
1982        }
1983    }
1984    impl ::std::convert::TryFrom<&::std::string::String> for CommonSwapResponseIssuesAllowanceSpender {
1985        type Error = self::error::ConversionError;
1986        fn try_from(
1987            value: &::std::string::String,
1988        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1989            value.parse()
1990        }
1991    }
1992    impl ::std::convert::TryFrom<::std::string::String> for CommonSwapResponseIssuesAllowanceSpender {
1993        type Error = self::error::ConversionError;
1994        fn try_from(
1995            value: ::std::string::String,
1996        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1997            value.parse()
1998        }
1999    }
2000    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseIssuesAllowanceSpender {
2001        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2002        where
2003            D: ::serde::Deserializer<'de>,
2004        {
2005            ::std::string::String::deserialize(deserializer)?
2006                .parse()
2007                .map_err(|e: self::error::ConversionError| {
2008                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2009                })
2010        }
2011    }
2012    ///Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.
2013    ///
2014    /// <details><summary>JSON schema</summary>
2015    ///
2016    /// ```json
2017    ///{
2018    ///  "description": "Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.",
2019    ///  "examples": [
2020    ///    {
2021    ///      "currentBalance": "1000000000000000000",
2022    ///      "requiredBalance": "1000000000000000000",
2023    ///      "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
2024    ///    }
2025    ///  ],
2026    ///  "type": "object",
2027    ///  "required": [
2028    ///    "currentBalance",
2029    ///    "requiredBalance",
2030    ///    "token"
2031    ///  ],
2032    ///  "properties": {
2033    ///    "currentBalance": {
2034    ///      "description": "The current balance of the `fromToken` by the `taker`.",
2035    ///      "examples": [
2036    ///        "10000000"
2037    ///      ],
2038    ///      "type": "string",
2039    ///      "pattern": "^\\d+$"
2040    ///    },
2041    ///    "requiredBalance": {
2042    ///      "description": "The amount of the token that the `taker` must hold.",
2043    ///      "examples": [
2044    ///        "1000000000000000000"
2045    ///      ],
2046    ///      "type": "string",
2047    ///      "pattern": "^\\d+$"
2048    ///    },
2049    ///    "token": {
2050    ///      "description": "The 0x-prefixed contract address of the token.",
2051    ///      "type": "string",
2052    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
2053    ///    }
2054    ///  }
2055    ///}
2056    /// ```
2057    /// </details>
2058    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2059    pub struct CommonSwapResponseIssuesBalance {
2060        ///The current balance of the `fromToken` by the `taker`.
2061        #[serde(rename = "currentBalance")]
2062        pub current_balance: CommonSwapResponseIssuesBalanceCurrentBalance,
2063        ///The amount of the token that the `taker` must hold.
2064        #[serde(rename = "requiredBalance")]
2065        pub required_balance: CommonSwapResponseIssuesBalanceRequiredBalance,
2066        ///The 0x-prefixed contract address of the token.
2067        pub token: CommonSwapResponseIssuesBalanceToken,
2068    }
2069    impl ::std::convert::From<&CommonSwapResponseIssuesBalance> for CommonSwapResponseIssuesBalance {
2070        fn from(value: &CommonSwapResponseIssuesBalance) -> Self {
2071            value.clone()
2072        }
2073    }
2074    impl CommonSwapResponseIssuesBalance {
2075        pub fn builder() -> builder::CommonSwapResponseIssuesBalance {
2076            Default::default()
2077        }
2078    }
2079    ///The current balance of the `fromToken` by the `taker`.
2080    ///
2081    /// <details><summary>JSON schema</summary>
2082    ///
2083    /// ```json
2084    ///{
2085    ///  "description": "The current balance of the `fromToken` by the `taker`.",
2086    ///  "examples": [
2087    ///    "10000000"
2088    ///  ],
2089    ///  "type": "string",
2090    ///  "pattern": "^\\d+$"
2091    ///}
2092    /// ```
2093    /// </details>
2094    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2095    #[serde(transparent)]
2096    pub struct CommonSwapResponseIssuesBalanceCurrentBalance(::std::string::String);
2097    impl ::std::ops::Deref for CommonSwapResponseIssuesBalanceCurrentBalance {
2098        type Target = ::std::string::String;
2099        fn deref(&self) -> &::std::string::String {
2100            &self.0
2101        }
2102    }
2103    impl ::std::convert::From<CommonSwapResponseIssuesBalanceCurrentBalance> for ::std::string::String {
2104        fn from(value: CommonSwapResponseIssuesBalanceCurrentBalance) -> Self {
2105            value.0
2106        }
2107    }
2108    impl ::std::convert::From<&CommonSwapResponseIssuesBalanceCurrentBalance>
2109        for CommonSwapResponseIssuesBalanceCurrentBalance
2110    {
2111        fn from(value: &CommonSwapResponseIssuesBalanceCurrentBalance) -> Self {
2112            value.clone()
2113        }
2114    }
2115    impl ::std::str::FromStr for CommonSwapResponseIssuesBalanceCurrentBalance {
2116        type Err = self::error::ConversionError;
2117        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2118            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
2119                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
2120            if PATTERN.find(value).is_none() {
2121                return Err("doesn't match pattern \"^\\d+$\"".into());
2122            }
2123            Ok(Self(value.to_string()))
2124        }
2125    }
2126    impl ::std::convert::TryFrom<&str> for CommonSwapResponseIssuesBalanceCurrentBalance {
2127        type Error = self::error::ConversionError;
2128        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2129            value.parse()
2130        }
2131    }
2132    impl ::std::convert::TryFrom<&::std::string::String>
2133        for CommonSwapResponseIssuesBalanceCurrentBalance
2134    {
2135        type Error = self::error::ConversionError;
2136        fn try_from(
2137            value: &::std::string::String,
2138        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2139            value.parse()
2140        }
2141    }
2142    impl ::std::convert::TryFrom<::std::string::String>
2143        for CommonSwapResponseIssuesBalanceCurrentBalance
2144    {
2145        type Error = self::error::ConversionError;
2146        fn try_from(
2147            value: ::std::string::String,
2148        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2149            value.parse()
2150        }
2151    }
2152    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseIssuesBalanceCurrentBalance {
2153        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2154        where
2155            D: ::serde::Deserializer<'de>,
2156        {
2157            ::std::string::String::deserialize(deserializer)?
2158                .parse()
2159                .map_err(|e: self::error::ConversionError| {
2160                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2161                })
2162        }
2163    }
2164    ///The amount of the token that the `taker` must hold.
2165    ///
2166    /// <details><summary>JSON schema</summary>
2167    ///
2168    /// ```json
2169    ///{
2170    ///  "description": "The amount of the token that the `taker` must hold.",
2171    ///  "examples": [
2172    ///    "1000000000000000000"
2173    ///  ],
2174    ///  "type": "string",
2175    ///  "pattern": "^\\d+$"
2176    ///}
2177    /// ```
2178    /// </details>
2179    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2180    #[serde(transparent)]
2181    pub struct CommonSwapResponseIssuesBalanceRequiredBalance(::std::string::String);
2182    impl ::std::ops::Deref for CommonSwapResponseIssuesBalanceRequiredBalance {
2183        type Target = ::std::string::String;
2184        fn deref(&self) -> &::std::string::String {
2185            &self.0
2186        }
2187    }
2188    impl ::std::convert::From<CommonSwapResponseIssuesBalanceRequiredBalance>
2189        for ::std::string::String
2190    {
2191        fn from(value: CommonSwapResponseIssuesBalanceRequiredBalance) -> Self {
2192            value.0
2193        }
2194    }
2195    impl ::std::convert::From<&CommonSwapResponseIssuesBalanceRequiredBalance>
2196        for CommonSwapResponseIssuesBalanceRequiredBalance
2197    {
2198        fn from(value: &CommonSwapResponseIssuesBalanceRequiredBalance) -> Self {
2199            value.clone()
2200        }
2201    }
2202    impl ::std::str::FromStr for CommonSwapResponseIssuesBalanceRequiredBalance {
2203        type Err = self::error::ConversionError;
2204        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2205            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
2206                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
2207            if PATTERN.find(value).is_none() {
2208                return Err("doesn't match pattern \"^\\d+$\"".into());
2209            }
2210            Ok(Self(value.to_string()))
2211        }
2212    }
2213    impl ::std::convert::TryFrom<&str> for CommonSwapResponseIssuesBalanceRequiredBalance {
2214        type Error = self::error::ConversionError;
2215        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2216            value.parse()
2217        }
2218    }
2219    impl ::std::convert::TryFrom<&::std::string::String>
2220        for CommonSwapResponseIssuesBalanceRequiredBalance
2221    {
2222        type Error = self::error::ConversionError;
2223        fn try_from(
2224            value: &::std::string::String,
2225        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2226            value.parse()
2227        }
2228    }
2229    impl ::std::convert::TryFrom<::std::string::String>
2230        for CommonSwapResponseIssuesBalanceRequiredBalance
2231    {
2232        type Error = self::error::ConversionError;
2233        fn try_from(
2234            value: ::std::string::String,
2235        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2236            value.parse()
2237        }
2238    }
2239    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseIssuesBalanceRequiredBalance {
2240        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2241        where
2242            D: ::serde::Deserializer<'de>,
2243        {
2244            ::std::string::String::deserialize(deserializer)?
2245                .parse()
2246                .map_err(|e: self::error::ConversionError| {
2247                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2248                })
2249        }
2250    }
2251    ///The 0x-prefixed contract address of the token.
2252    ///
2253    /// <details><summary>JSON schema</summary>
2254    ///
2255    /// ```json
2256    ///{
2257    ///  "description": "The 0x-prefixed contract address of the token.",
2258    ///  "type": "string",
2259    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
2260    ///}
2261    /// ```
2262    /// </details>
2263    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2264    #[serde(transparent)]
2265    pub struct CommonSwapResponseIssuesBalanceToken(::std::string::String);
2266    impl ::std::ops::Deref for CommonSwapResponseIssuesBalanceToken {
2267        type Target = ::std::string::String;
2268        fn deref(&self) -> &::std::string::String {
2269            &self.0
2270        }
2271    }
2272    impl ::std::convert::From<CommonSwapResponseIssuesBalanceToken> for ::std::string::String {
2273        fn from(value: CommonSwapResponseIssuesBalanceToken) -> Self {
2274            value.0
2275        }
2276    }
2277    impl ::std::convert::From<&CommonSwapResponseIssuesBalanceToken>
2278        for CommonSwapResponseIssuesBalanceToken
2279    {
2280        fn from(value: &CommonSwapResponseIssuesBalanceToken) -> Self {
2281            value.clone()
2282        }
2283    }
2284    impl ::std::str::FromStr for CommonSwapResponseIssuesBalanceToken {
2285        type Err = self::error::ConversionError;
2286        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2287            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
2288                ::std::sync::LazyLock::new(|| {
2289                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
2290                });
2291            if PATTERN.find(value).is_none() {
2292                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
2293            }
2294            Ok(Self(value.to_string()))
2295        }
2296    }
2297    impl ::std::convert::TryFrom<&str> for CommonSwapResponseIssuesBalanceToken {
2298        type Error = self::error::ConversionError;
2299        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2300            value.parse()
2301        }
2302    }
2303    impl ::std::convert::TryFrom<&::std::string::String> for CommonSwapResponseIssuesBalanceToken {
2304        type Error = self::error::ConversionError;
2305        fn try_from(
2306            value: &::std::string::String,
2307        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2308            value.parse()
2309        }
2310    }
2311    impl ::std::convert::TryFrom<::std::string::String> for CommonSwapResponseIssuesBalanceToken {
2312        type Error = self::error::ConversionError;
2313        fn try_from(
2314            value: ::std::string::String,
2315        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2316            value.parse()
2317        }
2318    }
2319    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseIssuesBalanceToken {
2320        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2321        where
2322            D: ::serde::Deserializer<'de>,
2323        {
2324            ::std::string::String::deserialize(deserializer)?
2325                .parse()
2326                .map_err(|e: self::error::ConversionError| {
2327                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2328                })
2329        }
2330    }
2331    ///The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.
2332    ///
2333    /// <details><summary>JSON schema</summary>
2334    ///
2335    /// ```json
2336    ///{
2337    ///  "description": "The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.",
2338    ///  "examples": [
2339    ///    "900000000000000000"
2340    ///  ],
2341    ///  "type": "string",
2342    ///  "pattern": "^(0|[1-9]\\d*)$"
2343    ///}
2344    /// ```
2345    /// </details>
2346    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2347    #[serde(transparent)]
2348    pub struct CommonSwapResponseMinToAmount(::std::string::String);
2349    impl ::std::ops::Deref for CommonSwapResponseMinToAmount {
2350        type Target = ::std::string::String;
2351        fn deref(&self) -> &::std::string::String {
2352            &self.0
2353        }
2354    }
2355    impl ::std::convert::From<CommonSwapResponseMinToAmount> for ::std::string::String {
2356        fn from(value: CommonSwapResponseMinToAmount) -> Self {
2357            value.0
2358        }
2359    }
2360    impl ::std::convert::From<&CommonSwapResponseMinToAmount> for CommonSwapResponseMinToAmount {
2361        fn from(value: &CommonSwapResponseMinToAmount) -> Self {
2362            value.clone()
2363        }
2364    }
2365    impl ::std::str::FromStr for CommonSwapResponseMinToAmount {
2366        type Err = self::error::ConversionError;
2367        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2368            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
2369                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
2370            if PATTERN.find(value).is_none() {
2371                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
2372            }
2373            Ok(Self(value.to_string()))
2374        }
2375    }
2376    impl ::std::convert::TryFrom<&str> for CommonSwapResponseMinToAmount {
2377        type Error = self::error::ConversionError;
2378        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2379            value.parse()
2380        }
2381    }
2382    impl ::std::convert::TryFrom<&::std::string::String> for CommonSwapResponseMinToAmount {
2383        type Error = self::error::ConversionError;
2384        fn try_from(
2385            value: &::std::string::String,
2386        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2387            value.parse()
2388        }
2389    }
2390    impl ::std::convert::TryFrom<::std::string::String> for CommonSwapResponseMinToAmount {
2391        type Error = self::error::ConversionError;
2392        fn try_from(
2393            value: ::std::string::String,
2394        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2395            value.parse()
2396        }
2397    }
2398    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseMinToAmount {
2399        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2400        where
2401            D: ::serde::Deserializer<'de>,
2402        {
2403            ::std::string::String::deserialize(deserializer)?
2404                .parse()
2405                .map_err(|e: self::error::ConversionError| {
2406                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2407                })
2408        }
2409    }
2410    ///The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.
2411    ///
2412    /// <details><summary>JSON schema</summary>
2413    ///
2414    /// ```json
2415    ///{
2416    ///  "description": "The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.",
2417    ///  "examples": [
2418    ///    "1000000000000000000"
2419    ///  ],
2420    ///  "type": "string",
2421    ///  "pattern": "^(0|[1-9]\\d*)$"
2422    ///}
2423    /// ```
2424    /// </details>
2425    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2426    #[serde(transparent)]
2427    pub struct CommonSwapResponseToAmount(::std::string::String);
2428    impl ::std::ops::Deref for CommonSwapResponseToAmount {
2429        type Target = ::std::string::String;
2430        fn deref(&self) -> &::std::string::String {
2431            &self.0
2432        }
2433    }
2434    impl ::std::convert::From<CommonSwapResponseToAmount> for ::std::string::String {
2435        fn from(value: CommonSwapResponseToAmount) -> Self {
2436            value.0
2437        }
2438    }
2439    impl ::std::convert::From<&CommonSwapResponseToAmount> for CommonSwapResponseToAmount {
2440        fn from(value: &CommonSwapResponseToAmount) -> Self {
2441            value.clone()
2442        }
2443    }
2444    impl ::std::str::FromStr for CommonSwapResponseToAmount {
2445        type Err = self::error::ConversionError;
2446        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2447            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
2448                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
2449            if PATTERN.find(value).is_none() {
2450                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
2451            }
2452            Ok(Self(value.to_string()))
2453        }
2454    }
2455    impl ::std::convert::TryFrom<&str> for CommonSwapResponseToAmount {
2456        type Error = self::error::ConversionError;
2457        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2458            value.parse()
2459        }
2460    }
2461    impl ::std::convert::TryFrom<&::std::string::String> for CommonSwapResponseToAmount {
2462        type Error = self::error::ConversionError;
2463        fn try_from(
2464            value: &::std::string::String,
2465        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2466            value.parse()
2467        }
2468    }
2469    impl ::std::convert::TryFrom<::std::string::String> for CommonSwapResponseToAmount {
2470        type Error = self::error::ConversionError;
2471        fn try_from(
2472            value: ::std::string::String,
2473        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2474            value.parse()
2475        }
2476    }
2477    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseToAmount {
2478        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2479        where
2480            D: ::serde::Deserializer<'de>,
2481        {
2482            ::std::string::String::deserialize(deserializer)?
2483                .parse()
2484                .map_err(|e: self::error::ConversionError| {
2485                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2486                })
2487        }
2488    }
2489    ///The 0x-prefixed contract address of the token that will be received.
2490    ///
2491    /// <details><summary>JSON schema</summary>
2492    ///
2493    /// ```json
2494    ///{
2495    ///  "description": "The 0x-prefixed contract address of the token that will be received.",
2496    ///  "examples": [
2497    ///    "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
2498    ///  ],
2499    ///  "type": "string",
2500    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
2501    ///}
2502    /// ```
2503    /// </details>
2504    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2505    #[serde(transparent)]
2506    pub struct CommonSwapResponseToToken(::std::string::String);
2507    impl ::std::ops::Deref for CommonSwapResponseToToken {
2508        type Target = ::std::string::String;
2509        fn deref(&self) -> &::std::string::String {
2510            &self.0
2511        }
2512    }
2513    impl ::std::convert::From<CommonSwapResponseToToken> for ::std::string::String {
2514        fn from(value: CommonSwapResponseToToken) -> Self {
2515            value.0
2516        }
2517    }
2518    impl ::std::convert::From<&CommonSwapResponseToToken> for CommonSwapResponseToToken {
2519        fn from(value: &CommonSwapResponseToToken) -> Self {
2520            value.clone()
2521        }
2522    }
2523    impl ::std::str::FromStr for CommonSwapResponseToToken {
2524        type Err = self::error::ConversionError;
2525        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2526            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
2527                ::std::sync::LazyLock::new(|| {
2528                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
2529                });
2530            if PATTERN.find(value).is_none() {
2531                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
2532            }
2533            Ok(Self(value.to_string()))
2534        }
2535    }
2536    impl ::std::convert::TryFrom<&str> for CommonSwapResponseToToken {
2537        type Error = self::error::ConversionError;
2538        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2539            value.parse()
2540        }
2541    }
2542    impl ::std::convert::TryFrom<&::std::string::String> for CommonSwapResponseToToken {
2543        type Error = self::error::ConversionError;
2544        fn try_from(
2545            value: &::std::string::String,
2546        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2547            value.parse()
2548        }
2549    }
2550    impl ::std::convert::TryFrom<::std::string::String> for CommonSwapResponseToToken {
2551        type Error = self::error::ConversionError;
2552        fn try_from(
2553            value: ::std::string::String,
2554        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2555            value.parse()
2556        }
2557    }
2558    impl<'de> ::serde::Deserialize<'de> for CommonSwapResponseToToken {
2559        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2560        where
2561            D: ::serde::Deserializer<'de>,
2562        {
2563            ::std::string::String::deserialize(deserializer)?
2564                .parse()
2565                .map_err(|e: self::error::ConversionError| {
2566                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2567                })
2568        }
2569    }
2570    ///`CreateEndUserBody`
2571    ///
2572    /// <details><summary>JSON schema</summary>
2573    ///
2574    /// ```json
2575    ///{
2576    ///  "type": "object",
2577    ///  "required": [
2578    ///    "authenticationMethods"
2579    ///  ],
2580    ///  "properties": {
2581    ///    "authenticationMethods": {
2582    ///      "$ref": "#/components/schemas/AuthenticationMethods"
2583    ///    },
2584    ///    "evmAccount": {
2585    ///      "description": "Configuration for creating an EVM account for the end user.",
2586    ///      "type": "object",
2587    ///      "properties": {
2588    ///        "createSmartAccount": {
2589    ///          "description": "If true, creates an EVM smart account and a default EVM EOA account as the owner. If false, only a EVM EOA account is created.",
2590    ///          "default": false,
2591    ///          "examples": [
2592    ///            true
2593    ///          ],
2594    ///          "type": "boolean"
2595    ///        }
2596    ///      }
2597    ///    },
2598    ///    "solanaAccount": {
2599    ///      "description": "Configuration for creating a Solana account for the end user.",
2600    ///      "type": "object",
2601    ///      "properties": {
2602    ///        "createSmartAccount": {
2603    ///          "description": "Only false is a valid option since currently smart accounts on Solana are not supported.",
2604    ///          "default": false,
2605    ///          "examples": [
2606    ///            false
2607    ///          ],
2608    ///          "type": "boolean"
2609    ///        }
2610    ///      }
2611    ///    },
2612    ///    "userId": {
2613    ///      "description": "A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.\n\nIf `userId` is not provided in the request, the server will generate a random UUID.",
2614    ///      "examples": [
2615    ///        "e051beeb-7163-4527-a5b6-35e301529ff2"
2616    ///      ],
2617    ///      "type": "string",
2618    ///      "pattern": "^[a-zA-Z0-9-]{1,100}$"
2619    ///    }
2620    ///  }
2621    ///}
2622    /// ```
2623    /// </details>
2624    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2625    pub struct CreateEndUserBody {
2626        #[serde(rename = "authenticationMethods")]
2627        pub authentication_methods: AuthenticationMethods,
2628        #[serde(
2629            rename = "evmAccount",
2630            default,
2631            skip_serializing_if = "::std::option::Option::is_none"
2632        )]
2633        pub evm_account: ::std::option::Option<CreateEndUserBodyEvmAccount>,
2634        #[serde(
2635            rename = "solanaAccount",
2636            default,
2637            skip_serializing_if = "::std::option::Option::is_none"
2638        )]
2639        pub solana_account: ::std::option::Option<CreateEndUserBodySolanaAccount>,
2640        /**A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.
2641
2642        If `userId` is not provided in the request, the server will generate a random UUID.*/
2643        #[serde(
2644            rename = "userId",
2645            default,
2646            skip_serializing_if = "::std::option::Option::is_none"
2647        )]
2648        pub user_id: ::std::option::Option<CreateEndUserBodyUserId>,
2649    }
2650    impl ::std::convert::From<&CreateEndUserBody> for CreateEndUserBody {
2651        fn from(value: &CreateEndUserBody) -> Self {
2652            value.clone()
2653        }
2654    }
2655    impl CreateEndUserBody {
2656        pub fn builder() -> builder::CreateEndUserBody {
2657            Default::default()
2658        }
2659    }
2660    ///Configuration for creating an EVM account for the end user.
2661    ///
2662    /// <details><summary>JSON schema</summary>
2663    ///
2664    /// ```json
2665    ///{
2666    ///  "description": "Configuration for creating an EVM account for the end user.",
2667    ///  "type": "object",
2668    ///  "properties": {
2669    ///    "createSmartAccount": {
2670    ///      "description": "If true, creates an EVM smart account and a default EVM EOA account as the owner. If false, only a EVM EOA account is created.",
2671    ///      "default": false,
2672    ///      "examples": [
2673    ///        true
2674    ///      ],
2675    ///      "type": "boolean"
2676    ///    }
2677    ///  }
2678    ///}
2679    /// ```
2680    /// </details>
2681    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2682    pub struct CreateEndUserBodyEvmAccount {
2683        ///If true, creates an EVM smart account and a default EVM EOA account as the owner. If false, only a EVM EOA account is created.
2684        #[serde(rename = "createSmartAccount", default)]
2685        pub create_smart_account: bool,
2686    }
2687    impl ::std::convert::From<&CreateEndUserBodyEvmAccount> for CreateEndUserBodyEvmAccount {
2688        fn from(value: &CreateEndUserBodyEvmAccount) -> Self {
2689            value.clone()
2690        }
2691    }
2692    impl ::std::default::Default for CreateEndUserBodyEvmAccount {
2693        fn default() -> Self {
2694            Self {
2695                create_smart_account: Default::default(),
2696            }
2697        }
2698    }
2699    impl CreateEndUserBodyEvmAccount {
2700        pub fn builder() -> builder::CreateEndUserBodyEvmAccount {
2701            Default::default()
2702        }
2703    }
2704    ///Configuration for creating a Solana account for the end user.
2705    ///
2706    /// <details><summary>JSON schema</summary>
2707    ///
2708    /// ```json
2709    ///{
2710    ///  "description": "Configuration for creating a Solana account for the end user.",
2711    ///  "type": "object",
2712    ///  "properties": {
2713    ///    "createSmartAccount": {
2714    ///      "description": "Only false is a valid option since currently smart accounts on Solana are not supported.",
2715    ///      "default": false,
2716    ///      "examples": [
2717    ///        false
2718    ///      ],
2719    ///      "type": "boolean"
2720    ///    }
2721    ///  }
2722    ///}
2723    /// ```
2724    /// </details>
2725    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2726    pub struct CreateEndUserBodySolanaAccount {
2727        ///Only false is a valid option since currently smart accounts on Solana are not supported.
2728        #[serde(rename = "createSmartAccount", default)]
2729        pub create_smart_account: bool,
2730    }
2731    impl ::std::convert::From<&CreateEndUserBodySolanaAccount> for CreateEndUserBodySolanaAccount {
2732        fn from(value: &CreateEndUserBodySolanaAccount) -> Self {
2733            value.clone()
2734        }
2735    }
2736    impl ::std::default::Default for CreateEndUserBodySolanaAccount {
2737        fn default() -> Self {
2738            Self {
2739                create_smart_account: Default::default(),
2740            }
2741        }
2742    }
2743    impl CreateEndUserBodySolanaAccount {
2744        pub fn builder() -> builder::CreateEndUserBodySolanaAccount {
2745            Default::default()
2746        }
2747    }
2748    /**A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.
2749
2750    If `userId` is not provided in the request, the server will generate a random UUID.*/
2751    ///
2752    /// <details><summary>JSON schema</summary>
2753    ///
2754    /// ```json
2755    ///{
2756    ///  "description": "A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.\n\nIf `userId` is not provided in the request, the server will generate a random UUID.",
2757    ///  "examples": [
2758    ///    "e051beeb-7163-4527-a5b6-35e301529ff2"
2759    ///  ],
2760    ///  "type": "string",
2761    ///  "pattern": "^[a-zA-Z0-9-]{1,100}$"
2762    ///}
2763    /// ```
2764    /// </details>
2765    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2766    #[serde(transparent)]
2767    pub struct CreateEndUserBodyUserId(::std::string::String);
2768    impl ::std::ops::Deref for CreateEndUserBodyUserId {
2769        type Target = ::std::string::String;
2770        fn deref(&self) -> &::std::string::String {
2771            &self.0
2772        }
2773    }
2774    impl ::std::convert::From<CreateEndUserBodyUserId> for ::std::string::String {
2775        fn from(value: CreateEndUserBodyUserId) -> Self {
2776            value.0
2777        }
2778    }
2779    impl ::std::convert::From<&CreateEndUserBodyUserId> for CreateEndUserBodyUserId {
2780        fn from(value: &CreateEndUserBodyUserId) -> Self {
2781            value.clone()
2782        }
2783    }
2784    impl ::std::str::FromStr for CreateEndUserBodyUserId {
2785        type Err = self::error::ConversionError;
2786        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2787            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
2788                ::std::sync::LazyLock::new(|| {
2789                    ::regress::Regex::new("^[a-zA-Z0-9-]{1,100}$").unwrap()
2790                });
2791            if PATTERN.find(value).is_none() {
2792                return Err("doesn't match pattern \"^[a-zA-Z0-9-]{1,100}$\"".into());
2793            }
2794            Ok(Self(value.to_string()))
2795        }
2796    }
2797    impl ::std::convert::TryFrom<&str> for CreateEndUserBodyUserId {
2798        type Error = self::error::ConversionError;
2799        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2800            value.parse()
2801        }
2802    }
2803    impl ::std::convert::TryFrom<&::std::string::String> for CreateEndUserBodyUserId {
2804        type Error = self::error::ConversionError;
2805        fn try_from(
2806            value: &::std::string::String,
2807        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2808            value.parse()
2809        }
2810    }
2811    impl ::std::convert::TryFrom<::std::string::String> for CreateEndUserBodyUserId {
2812        type Error = self::error::ConversionError;
2813        fn try_from(
2814            value: ::std::string::String,
2815        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2816            value.parse()
2817        }
2818    }
2819    impl<'de> ::serde::Deserialize<'de> for CreateEndUserBodyUserId {
2820        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2821        where
2822            D: ::serde::Deserializer<'de>,
2823        {
2824            ::std::string::String::deserialize(deserializer)?
2825                .parse()
2826                .map_err(|e: self::error::ConversionError| {
2827                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2828                })
2829        }
2830    }
2831    ///`CreateEndUserXIdempotencyKey`
2832    ///
2833    /// <details><summary>JSON schema</summary>
2834    ///
2835    /// ```json
2836    ///{
2837    ///  "type": "string",
2838    ///  "maxLength": 36,
2839    ///  "minLength": 36,
2840    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
2841    ///}
2842    /// ```
2843    /// </details>
2844    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2845    #[serde(transparent)]
2846    pub struct CreateEndUserXIdempotencyKey(::std::string::String);
2847    impl ::std::ops::Deref for CreateEndUserXIdempotencyKey {
2848        type Target = ::std::string::String;
2849        fn deref(&self) -> &::std::string::String {
2850            &self.0
2851        }
2852    }
2853    impl ::std::convert::From<CreateEndUserXIdempotencyKey> for ::std::string::String {
2854        fn from(value: CreateEndUserXIdempotencyKey) -> Self {
2855            value.0
2856        }
2857    }
2858    impl ::std::convert::From<&CreateEndUserXIdempotencyKey> for CreateEndUserXIdempotencyKey {
2859        fn from(value: &CreateEndUserXIdempotencyKey) -> Self {
2860            value.clone()
2861        }
2862    }
2863    impl ::std::str::FromStr for CreateEndUserXIdempotencyKey {
2864        type Err = self::error::ConversionError;
2865        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2866            if value.chars().count() > 36usize {
2867                return Err("longer than 36 characters".into());
2868            }
2869            if value.chars().count() < 36usize {
2870                return Err("shorter than 36 characters".into());
2871            }
2872            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
2873                ::std::sync::LazyLock::new(|| {
2874                    ::regress::Regex::new(
2875                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
2876                    )
2877                    .unwrap()
2878                });
2879            if PATTERN.find(value).is_none() {
2880                return Err(
2881                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
2882                        .into(),
2883                );
2884            }
2885            Ok(Self(value.to_string()))
2886        }
2887    }
2888    impl ::std::convert::TryFrom<&str> for CreateEndUserXIdempotencyKey {
2889        type Error = self::error::ConversionError;
2890        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2891            value.parse()
2892        }
2893    }
2894    impl ::std::convert::TryFrom<&::std::string::String> for CreateEndUserXIdempotencyKey {
2895        type Error = self::error::ConversionError;
2896        fn try_from(
2897            value: &::std::string::String,
2898        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2899            value.parse()
2900        }
2901    }
2902    impl ::std::convert::TryFrom<::std::string::String> for CreateEndUserXIdempotencyKey {
2903        type Error = self::error::ConversionError;
2904        fn try_from(
2905            value: ::std::string::String,
2906        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2907            value.parse()
2908        }
2909    }
2910    impl<'de> ::serde::Deserialize<'de> for CreateEndUserXIdempotencyKey {
2911        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
2912        where
2913            D: ::serde::Deserializer<'de>,
2914        {
2915            ::std::string::String::deserialize(deserializer)?
2916                .parse()
2917                .map_err(|e: self::error::ConversionError| {
2918                    <D::Error as ::serde::de::Error>::custom(e.to_string())
2919                })
2920        }
2921    }
2922    ///`CreateEvmAccountBody`
2923    ///
2924    /// <details><summary>JSON schema</summary>
2925    ///
2926    /// ```json
2927    ///{
2928    ///  "type": "object",
2929    ///  "properties": {
2930    ///    "accountPolicy": {
2931    ///      "description": "The ID of the account-level policy to apply to the account.",
2932    ///      "examples": [
2933    ///        "123e4567-e89b-12d3-a456-426614174000"
2934    ///      ],
2935    ///      "type": "string",
2936    ///      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
2937    ///      "x-audience": "public"
2938    ///    },
2939    ///    "name": {
2940    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
2941    ///      "examples": [
2942    ///        "my-wallet"
2943    ///      ],
2944    ///      "type": "string",
2945    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
2946    ///    }
2947    ///  }
2948    ///}
2949    /// ```
2950    /// </details>
2951    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2952    pub struct CreateEvmAccountBody {
2953        ///The ID of the account-level policy to apply to the account.
2954        #[serde(
2955            rename = "accountPolicy",
2956            default,
2957            skip_serializing_if = "::std::option::Option::is_none"
2958        )]
2959        pub account_policy: ::std::option::Option<CreateEvmAccountBodyAccountPolicy>,
2960        /**An optional name for the account.
2961        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
2962        Account names must be unique across all EVM accounts in the developer's CDP Project.*/
2963        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2964        pub name: ::std::option::Option<CreateEvmAccountBodyName>,
2965    }
2966    impl ::std::convert::From<&CreateEvmAccountBody> for CreateEvmAccountBody {
2967        fn from(value: &CreateEvmAccountBody) -> Self {
2968            value.clone()
2969        }
2970    }
2971    impl ::std::default::Default for CreateEvmAccountBody {
2972        fn default() -> Self {
2973            Self {
2974                account_policy: Default::default(),
2975                name: Default::default(),
2976            }
2977        }
2978    }
2979    impl CreateEvmAccountBody {
2980        pub fn builder() -> builder::CreateEvmAccountBody {
2981            Default::default()
2982        }
2983    }
2984    ///The ID of the account-level policy to apply to the account.
2985    ///
2986    /// <details><summary>JSON schema</summary>
2987    ///
2988    /// ```json
2989    ///{
2990    ///  "description": "The ID of the account-level policy to apply to the account.",
2991    ///  "examples": [
2992    ///    "123e4567-e89b-12d3-a456-426614174000"
2993    ///  ],
2994    ///  "type": "string",
2995    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
2996    ///  "x-audience": "public"
2997    ///}
2998    /// ```
2999    /// </details>
3000    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3001    #[serde(transparent)]
3002    pub struct CreateEvmAccountBodyAccountPolicy(::std::string::String);
3003    impl ::std::ops::Deref for CreateEvmAccountBodyAccountPolicy {
3004        type Target = ::std::string::String;
3005        fn deref(&self) -> &::std::string::String {
3006            &self.0
3007        }
3008    }
3009    impl ::std::convert::From<CreateEvmAccountBodyAccountPolicy> for ::std::string::String {
3010        fn from(value: CreateEvmAccountBodyAccountPolicy) -> Self {
3011            value.0
3012        }
3013    }
3014    impl ::std::convert::From<&CreateEvmAccountBodyAccountPolicy>
3015        for CreateEvmAccountBodyAccountPolicy
3016    {
3017        fn from(value: &CreateEvmAccountBodyAccountPolicy) -> Self {
3018            value.clone()
3019        }
3020    }
3021    impl ::std::str::FromStr for CreateEvmAccountBodyAccountPolicy {
3022        type Err = self::error::ConversionError;
3023        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3024            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
3025                || {
3026                    ::regress::Regex::new(
3027                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
3028                    )
3029                    .unwrap()
3030                },
3031            );
3032            if PATTERN.find(value).is_none() {
3033                return Err(
3034                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
3035                        .into(),
3036                );
3037            }
3038            Ok(Self(value.to_string()))
3039        }
3040    }
3041    impl ::std::convert::TryFrom<&str> for CreateEvmAccountBodyAccountPolicy {
3042        type Error = self::error::ConversionError;
3043        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3044            value.parse()
3045        }
3046    }
3047    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmAccountBodyAccountPolicy {
3048        type Error = self::error::ConversionError;
3049        fn try_from(
3050            value: &::std::string::String,
3051        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3052            value.parse()
3053        }
3054    }
3055    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmAccountBodyAccountPolicy {
3056        type Error = self::error::ConversionError;
3057        fn try_from(
3058            value: ::std::string::String,
3059        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3060            value.parse()
3061        }
3062    }
3063    impl<'de> ::serde::Deserialize<'de> for CreateEvmAccountBodyAccountPolicy {
3064        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3065        where
3066            D: ::serde::Deserializer<'de>,
3067        {
3068            ::std::string::String::deserialize(deserializer)?
3069                .parse()
3070                .map_err(|e: self::error::ConversionError| {
3071                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3072                })
3073        }
3074    }
3075    /**An optional name for the account.
3076    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
3077    Account names must be unique across all EVM accounts in the developer's CDP Project.*/
3078    ///
3079    /// <details><summary>JSON schema</summary>
3080    ///
3081    /// ```json
3082    ///{
3083    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
3084    ///  "examples": [
3085    ///    "my-wallet"
3086    ///  ],
3087    ///  "type": "string",
3088    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
3089    ///}
3090    /// ```
3091    /// </details>
3092    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3093    #[serde(transparent)]
3094    pub struct CreateEvmAccountBodyName(::std::string::String);
3095    impl ::std::ops::Deref for CreateEvmAccountBodyName {
3096        type Target = ::std::string::String;
3097        fn deref(&self) -> &::std::string::String {
3098            &self.0
3099        }
3100    }
3101    impl ::std::convert::From<CreateEvmAccountBodyName> for ::std::string::String {
3102        fn from(value: CreateEvmAccountBodyName) -> Self {
3103            value.0
3104        }
3105    }
3106    impl ::std::convert::From<&CreateEvmAccountBodyName> for CreateEvmAccountBodyName {
3107        fn from(value: &CreateEvmAccountBodyName) -> Self {
3108            value.clone()
3109        }
3110    }
3111    impl ::std::str::FromStr for CreateEvmAccountBodyName {
3112        type Err = self::error::ConversionError;
3113        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3114            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3115                ::std::sync::LazyLock::new(|| {
3116                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
3117                });
3118            if PATTERN.find(value).is_none() {
3119                return Err(
3120                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
3121                );
3122            }
3123            Ok(Self(value.to_string()))
3124        }
3125    }
3126    impl ::std::convert::TryFrom<&str> for CreateEvmAccountBodyName {
3127        type Error = self::error::ConversionError;
3128        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3129            value.parse()
3130        }
3131    }
3132    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmAccountBodyName {
3133        type Error = self::error::ConversionError;
3134        fn try_from(
3135            value: &::std::string::String,
3136        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3137            value.parse()
3138        }
3139    }
3140    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmAccountBodyName {
3141        type Error = self::error::ConversionError;
3142        fn try_from(
3143            value: ::std::string::String,
3144        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3145            value.parse()
3146        }
3147    }
3148    impl<'de> ::serde::Deserialize<'de> for CreateEvmAccountBodyName {
3149        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3150        where
3151            D: ::serde::Deserializer<'de>,
3152        {
3153            ::std::string::String::deserialize(deserializer)?
3154                .parse()
3155                .map_err(|e: self::error::ConversionError| {
3156                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3157                })
3158        }
3159    }
3160    ///`CreateEvmAccountXIdempotencyKey`
3161    ///
3162    /// <details><summary>JSON schema</summary>
3163    ///
3164    /// ```json
3165    ///{
3166    ///  "type": "string",
3167    ///  "maxLength": 36,
3168    ///  "minLength": 36,
3169    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
3170    ///}
3171    /// ```
3172    /// </details>
3173    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3174    #[serde(transparent)]
3175    pub struct CreateEvmAccountXIdempotencyKey(::std::string::String);
3176    impl ::std::ops::Deref for CreateEvmAccountXIdempotencyKey {
3177        type Target = ::std::string::String;
3178        fn deref(&self) -> &::std::string::String {
3179            &self.0
3180        }
3181    }
3182    impl ::std::convert::From<CreateEvmAccountXIdempotencyKey> for ::std::string::String {
3183        fn from(value: CreateEvmAccountXIdempotencyKey) -> Self {
3184            value.0
3185        }
3186    }
3187    impl ::std::convert::From<&CreateEvmAccountXIdempotencyKey> for CreateEvmAccountXIdempotencyKey {
3188        fn from(value: &CreateEvmAccountXIdempotencyKey) -> Self {
3189            value.clone()
3190        }
3191    }
3192    impl ::std::str::FromStr for CreateEvmAccountXIdempotencyKey {
3193        type Err = self::error::ConversionError;
3194        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3195            if value.chars().count() > 36usize {
3196                return Err("longer than 36 characters".into());
3197            }
3198            if value.chars().count() < 36usize {
3199                return Err("shorter than 36 characters".into());
3200            }
3201            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3202                ::std::sync::LazyLock::new(|| {
3203                    ::regress::Regex::new(
3204                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
3205                    )
3206                    .unwrap()
3207                });
3208            if PATTERN.find(value).is_none() {
3209                return Err(
3210                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
3211                        .into(),
3212                );
3213            }
3214            Ok(Self(value.to_string()))
3215        }
3216    }
3217    impl ::std::convert::TryFrom<&str> for CreateEvmAccountXIdempotencyKey {
3218        type Error = self::error::ConversionError;
3219        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3220            value.parse()
3221        }
3222    }
3223    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmAccountXIdempotencyKey {
3224        type Error = self::error::ConversionError;
3225        fn try_from(
3226            value: &::std::string::String,
3227        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3228            value.parse()
3229        }
3230    }
3231    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmAccountXIdempotencyKey {
3232        type Error = self::error::ConversionError;
3233        fn try_from(
3234            value: ::std::string::String,
3235        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3236            value.parse()
3237        }
3238    }
3239    impl<'de> ::serde::Deserialize<'de> for CreateEvmAccountXIdempotencyKey {
3240        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3241        where
3242            D: ::serde::Deserializer<'de>,
3243        {
3244            ::std::string::String::deserialize(deserializer)?
3245                .parse()
3246                .map_err(|e: self::error::ConversionError| {
3247                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3248                })
3249        }
3250    }
3251    ///`CreateEvmSmartAccountBody`
3252    ///
3253    /// <details><summary>JSON schema</summary>
3254    ///
3255    /// ```json
3256    ///{
3257    ///  "type": "object",
3258    ///  "required": [
3259    ///    "owners"
3260    ///  ],
3261    ///  "properties": {
3262    ///    "name": {
3263    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
3264    ///      "examples": [
3265    ///        "my-smart-wallet"
3266    ///      ],
3267    ///      "type": "string",
3268    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
3269    ///    },
3270    ///    "owners": {
3271    ///      "description": "Today, only a single owner can be set for a Smart Account, but this is an array to allow setting multiple owners in the future.",
3272    ///      "examples": [
3273    ///        [
3274    ///          "0xfc807D1bE4997e5C7B33E4d8D57e60c5b0f02B1a"
3275    ///        ]
3276    ///      ],
3277    ///      "type": "array",
3278    ///      "items": {
3279    ///        "type": "string",
3280    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
3281    ///      }
3282    ///    }
3283    ///  }
3284    ///}
3285    /// ```
3286    /// </details>
3287    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3288    pub struct CreateEvmSmartAccountBody {
3289        /**An optional name for the account.
3290        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
3291        Account names must be unique across all EVM accounts in the developer's CDP Project.*/
3292        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3293        pub name: ::std::option::Option<CreateEvmSmartAccountBodyName>,
3294        ///Today, only a single owner can be set for a Smart Account, but this is an array to allow setting multiple owners in the future.
3295        pub owners: ::std::vec::Vec<CreateEvmSmartAccountBodyOwnersItem>,
3296    }
3297    impl ::std::convert::From<&CreateEvmSmartAccountBody> for CreateEvmSmartAccountBody {
3298        fn from(value: &CreateEvmSmartAccountBody) -> Self {
3299            value.clone()
3300        }
3301    }
3302    impl CreateEvmSmartAccountBody {
3303        pub fn builder() -> builder::CreateEvmSmartAccountBody {
3304            Default::default()
3305        }
3306    }
3307    /**An optional name for the account.
3308    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
3309    Account names must be unique across all EVM accounts in the developer's CDP Project.*/
3310    ///
3311    /// <details><summary>JSON schema</summary>
3312    ///
3313    /// ```json
3314    ///{
3315    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
3316    ///  "examples": [
3317    ///    "my-smart-wallet"
3318    ///  ],
3319    ///  "type": "string",
3320    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
3321    ///}
3322    /// ```
3323    /// </details>
3324    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3325    #[serde(transparent)]
3326    pub struct CreateEvmSmartAccountBodyName(::std::string::String);
3327    impl ::std::ops::Deref for CreateEvmSmartAccountBodyName {
3328        type Target = ::std::string::String;
3329        fn deref(&self) -> &::std::string::String {
3330            &self.0
3331        }
3332    }
3333    impl ::std::convert::From<CreateEvmSmartAccountBodyName> for ::std::string::String {
3334        fn from(value: CreateEvmSmartAccountBodyName) -> Self {
3335            value.0
3336        }
3337    }
3338    impl ::std::convert::From<&CreateEvmSmartAccountBodyName> for CreateEvmSmartAccountBodyName {
3339        fn from(value: &CreateEvmSmartAccountBodyName) -> Self {
3340            value.clone()
3341        }
3342    }
3343    impl ::std::str::FromStr for CreateEvmSmartAccountBodyName {
3344        type Err = self::error::ConversionError;
3345        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3346            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3347                ::std::sync::LazyLock::new(|| {
3348                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
3349                });
3350            if PATTERN.find(value).is_none() {
3351                return Err(
3352                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
3353                );
3354            }
3355            Ok(Self(value.to_string()))
3356        }
3357    }
3358    impl ::std::convert::TryFrom<&str> for CreateEvmSmartAccountBodyName {
3359        type Error = self::error::ConversionError;
3360        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3361            value.parse()
3362        }
3363    }
3364    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSmartAccountBodyName {
3365        type Error = self::error::ConversionError;
3366        fn try_from(
3367            value: &::std::string::String,
3368        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3369            value.parse()
3370        }
3371    }
3372    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSmartAccountBodyName {
3373        type Error = self::error::ConversionError;
3374        fn try_from(
3375            value: ::std::string::String,
3376        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3377            value.parse()
3378        }
3379    }
3380    impl<'de> ::serde::Deserialize<'de> for CreateEvmSmartAccountBodyName {
3381        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3382        where
3383            D: ::serde::Deserializer<'de>,
3384        {
3385            ::std::string::String::deserialize(deserializer)?
3386                .parse()
3387                .map_err(|e: self::error::ConversionError| {
3388                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3389                })
3390        }
3391    }
3392    ///`CreateEvmSmartAccountBodyOwnersItem`
3393    ///
3394    /// <details><summary>JSON schema</summary>
3395    ///
3396    /// ```json
3397    ///{
3398    ///  "type": "string",
3399    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
3400    ///}
3401    /// ```
3402    /// </details>
3403    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3404    #[serde(transparent)]
3405    pub struct CreateEvmSmartAccountBodyOwnersItem(::std::string::String);
3406    impl ::std::ops::Deref for CreateEvmSmartAccountBodyOwnersItem {
3407        type Target = ::std::string::String;
3408        fn deref(&self) -> &::std::string::String {
3409            &self.0
3410        }
3411    }
3412    impl ::std::convert::From<CreateEvmSmartAccountBodyOwnersItem> for ::std::string::String {
3413        fn from(value: CreateEvmSmartAccountBodyOwnersItem) -> Self {
3414            value.0
3415        }
3416    }
3417    impl ::std::convert::From<&CreateEvmSmartAccountBodyOwnersItem>
3418        for CreateEvmSmartAccountBodyOwnersItem
3419    {
3420        fn from(value: &CreateEvmSmartAccountBodyOwnersItem) -> Self {
3421            value.clone()
3422        }
3423    }
3424    impl ::std::str::FromStr for CreateEvmSmartAccountBodyOwnersItem {
3425        type Err = self::error::ConversionError;
3426        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3427            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3428                ::std::sync::LazyLock::new(|| {
3429                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
3430                });
3431            if PATTERN.find(value).is_none() {
3432                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
3433            }
3434            Ok(Self(value.to_string()))
3435        }
3436    }
3437    impl ::std::convert::TryFrom<&str> for CreateEvmSmartAccountBodyOwnersItem {
3438        type Error = self::error::ConversionError;
3439        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3440            value.parse()
3441        }
3442    }
3443    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSmartAccountBodyOwnersItem {
3444        type Error = self::error::ConversionError;
3445        fn try_from(
3446            value: &::std::string::String,
3447        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3448            value.parse()
3449        }
3450    }
3451    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSmartAccountBodyOwnersItem {
3452        type Error = self::error::ConversionError;
3453        fn try_from(
3454            value: ::std::string::String,
3455        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3456            value.parse()
3457        }
3458    }
3459    impl<'de> ::serde::Deserialize<'de> for CreateEvmSmartAccountBodyOwnersItem {
3460        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3461        where
3462            D: ::serde::Deserializer<'de>,
3463        {
3464            ::std::string::String::deserialize(deserializer)?
3465                .parse()
3466                .map_err(|e: self::error::ConversionError| {
3467                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3468                })
3469        }
3470    }
3471    ///`CreateEvmSmartAccountXIdempotencyKey`
3472    ///
3473    /// <details><summary>JSON schema</summary>
3474    ///
3475    /// ```json
3476    ///{
3477    ///  "type": "string",
3478    ///  "maxLength": 36,
3479    ///  "minLength": 36,
3480    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
3481    ///}
3482    /// ```
3483    /// </details>
3484    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3485    #[serde(transparent)]
3486    pub struct CreateEvmSmartAccountXIdempotencyKey(::std::string::String);
3487    impl ::std::ops::Deref for CreateEvmSmartAccountXIdempotencyKey {
3488        type Target = ::std::string::String;
3489        fn deref(&self) -> &::std::string::String {
3490            &self.0
3491        }
3492    }
3493    impl ::std::convert::From<CreateEvmSmartAccountXIdempotencyKey> for ::std::string::String {
3494        fn from(value: CreateEvmSmartAccountXIdempotencyKey) -> Self {
3495            value.0
3496        }
3497    }
3498    impl ::std::convert::From<&CreateEvmSmartAccountXIdempotencyKey>
3499        for CreateEvmSmartAccountXIdempotencyKey
3500    {
3501        fn from(value: &CreateEvmSmartAccountXIdempotencyKey) -> Self {
3502            value.clone()
3503        }
3504    }
3505    impl ::std::str::FromStr for CreateEvmSmartAccountXIdempotencyKey {
3506        type Err = self::error::ConversionError;
3507        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3508            if value.chars().count() > 36usize {
3509                return Err("longer than 36 characters".into());
3510            }
3511            if value.chars().count() < 36usize {
3512                return Err("shorter than 36 characters".into());
3513            }
3514            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3515                ::std::sync::LazyLock::new(|| {
3516                    ::regress::Regex::new(
3517                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
3518                    )
3519                    .unwrap()
3520                });
3521            if PATTERN.find(value).is_none() {
3522                return Err(
3523                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
3524                        .into(),
3525                );
3526            }
3527            Ok(Self(value.to_string()))
3528        }
3529    }
3530    impl ::std::convert::TryFrom<&str> for CreateEvmSmartAccountXIdempotencyKey {
3531        type Error = self::error::ConversionError;
3532        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3533            value.parse()
3534        }
3535    }
3536    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSmartAccountXIdempotencyKey {
3537        type Error = self::error::ConversionError;
3538        fn try_from(
3539            value: &::std::string::String,
3540        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3541            value.parse()
3542        }
3543    }
3544    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSmartAccountXIdempotencyKey {
3545        type Error = self::error::ConversionError;
3546        fn try_from(
3547            value: ::std::string::String,
3548        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3549            value.parse()
3550        }
3551    }
3552    impl<'de> ::serde::Deserialize<'de> for CreateEvmSmartAccountXIdempotencyKey {
3553        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3554        where
3555            D: ::serde::Deserializer<'de>,
3556        {
3557            ::std::string::String::deserialize(deserializer)?
3558                .parse()
3559                .map_err(|e: self::error::ConversionError| {
3560                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3561                })
3562        }
3563    }
3564    ///`CreateEvmSwapQuoteBody`
3565    ///
3566    /// <details><summary>JSON schema</summary>
3567    ///
3568    /// ```json
3569    ///{
3570    ///  "type": "object",
3571    ///  "required": [
3572    ///    "fromAmount",
3573    ///    "fromToken",
3574    ///    "network",
3575    ///    "taker",
3576    ///    "toToken"
3577    ///  ],
3578    ///  "properties": {
3579    ///    "fromAmount": {
3580    ///      "description": "The amount of the `fromToken` to send in atomic units of the token. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.",
3581    ///      "examples": [
3582    ///        "1000000000000000000"
3583    ///      ],
3584    ///      "type": "string",
3585    ///      "pattern": "^\\d+$"
3586    ///    },
3587    ///    "fromToken": {
3588    ///      "description": "The 0x-prefixed contract address of the token to send.",
3589    ///      "examples": [
3590    ///        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
3591    ///      ],
3592    ///      "type": "string",
3593    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
3594    ///    },
3595    ///    "gasPrice": {
3596    ///      "description": "The target gas price for the swap transaction, in Wei. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. If not provided, the API will use an estimate based on the current network conditions.",
3597    ///      "examples": [
3598    ///        "1000000000"
3599    ///      ],
3600    ///      "type": "string",
3601    ///      "pattern": "^\\d+$"
3602    ///    },
3603    ///    "network": {
3604    ///      "$ref": "#/components/schemas/EvmSwapsNetwork"
3605    ///    },
3606    ///    "signerAddress": {
3607    ///      "description": "The 0x-prefixed Externally Owned Account (EOA) address that will sign the `Permit2` EIP-712 permit message. This is only needed if `taker` is a smart contract.",
3608    ///      "examples": [
3609    ///        "0x922f49447d8a07e3bd95bd0d56f35241523fbab8"
3610    ///      ],
3611    ///      "type": "string",
3612    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
3613    ///    },
3614    ///    "slippageBps": {
3615    ///      "description": "The maximum acceptable slippage of the `toToken` in basis points. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100 bps (i.e., 1%).",
3616    ///      "default": 100,
3617    ///      "examples": [
3618    ///        100
3619    ///      ],
3620    ///      "type": "integer",
3621    ///      "maximum": 10000.0,
3622    ///      "minimum": 0.0
3623    ///    },
3624    ///    "taker": {
3625    ///      "description": "The 0x-prefixed address that holds the `fromToken` balance and has the `Permit2` allowance set for the swap.",
3626    ///      "examples": [
3627    ///        "0xAc0974bec39a17e36ba4a6b4d238ff944bacb478"
3628    ///      ],
3629    ///      "type": "string",
3630    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
3631    ///    },
3632    ///    "toToken": {
3633    ///      "description": "The 0x-prefixed contract address of the token to receive.",
3634    ///      "examples": [
3635    ///        "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
3636    ///      ],
3637    ///      "type": "string",
3638    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
3639    ///    }
3640    ///  }
3641    ///}
3642    /// ```
3643    /// </details>
3644    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3645    pub struct CreateEvmSwapQuoteBody {
3646        ///The amount of the `fromToken` to send in atomic units of the token. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
3647        #[serde(rename = "fromAmount")]
3648        pub from_amount: CreateEvmSwapQuoteBodyFromAmount,
3649        ///The 0x-prefixed contract address of the token to send.
3650        #[serde(rename = "fromToken")]
3651        pub from_token: CreateEvmSwapQuoteBodyFromToken,
3652        ///The target gas price for the swap transaction, in Wei. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. If not provided, the API will use an estimate based on the current network conditions.
3653        #[serde(
3654            rename = "gasPrice",
3655            default,
3656            skip_serializing_if = "::std::option::Option::is_none"
3657        )]
3658        pub gas_price: ::std::option::Option<CreateEvmSwapQuoteBodyGasPrice>,
3659        pub network: EvmSwapsNetwork,
3660        ///The 0x-prefixed Externally Owned Account (EOA) address that will sign the `Permit2` EIP-712 permit message. This is only needed if `taker` is a smart contract.
3661        #[serde(
3662            rename = "signerAddress",
3663            default,
3664            skip_serializing_if = "::std::option::Option::is_none"
3665        )]
3666        pub signer_address: ::std::option::Option<CreateEvmSwapQuoteBodySignerAddress>,
3667        ///The maximum acceptable slippage of the `toToken` in basis points. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100 bps (i.e., 1%).
3668        #[serde(rename = "slippageBps", default = "defaults::default_u64::<i64, 100>")]
3669        pub slippage_bps: i64,
3670        ///The 0x-prefixed address that holds the `fromToken` balance and has the `Permit2` allowance set for the swap.
3671        pub taker: CreateEvmSwapQuoteBodyTaker,
3672        ///The 0x-prefixed contract address of the token to receive.
3673        #[serde(rename = "toToken")]
3674        pub to_token: CreateEvmSwapQuoteBodyToToken,
3675    }
3676    impl ::std::convert::From<&CreateEvmSwapQuoteBody> for CreateEvmSwapQuoteBody {
3677        fn from(value: &CreateEvmSwapQuoteBody) -> Self {
3678            value.clone()
3679        }
3680    }
3681    impl CreateEvmSwapQuoteBody {
3682        pub fn builder() -> builder::CreateEvmSwapQuoteBody {
3683            Default::default()
3684        }
3685    }
3686    ///The amount of the `fromToken` to send in atomic units of the token. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
3687    ///
3688    /// <details><summary>JSON schema</summary>
3689    ///
3690    /// ```json
3691    ///{
3692    ///  "description": "The amount of the `fromToken` to send in atomic units of the token. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.",
3693    ///  "examples": [
3694    ///    "1000000000000000000"
3695    ///  ],
3696    ///  "type": "string",
3697    ///  "pattern": "^\\d+$"
3698    ///}
3699    /// ```
3700    /// </details>
3701    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3702    #[serde(transparent)]
3703    pub struct CreateEvmSwapQuoteBodyFromAmount(::std::string::String);
3704    impl ::std::ops::Deref for CreateEvmSwapQuoteBodyFromAmount {
3705        type Target = ::std::string::String;
3706        fn deref(&self) -> &::std::string::String {
3707            &self.0
3708        }
3709    }
3710    impl ::std::convert::From<CreateEvmSwapQuoteBodyFromAmount> for ::std::string::String {
3711        fn from(value: CreateEvmSwapQuoteBodyFromAmount) -> Self {
3712            value.0
3713        }
3714    }
3715    impl ::std::convert::From<&CreateEvmSwapQuoteBodyFromAmount> for CreateEvmSwapQuoteBodyFromAmount {
3716        fn from(value: &CreateEvmSwapQuoteBodyFromAmount) -> Self {
3717            value.clone()
3718        }
3719    }
3720    impl ::std::str::FromStr for CreateEvmSwapQuoteBodyFromAmount {
3721        type Err = self::error::ConversionError;
3722        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3723            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3724                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
3725            if PATTERN.find(value).is_none() {
3726                return Err("doesn't match pattern \"^\\d+$\"".into());
3727            }
3728            Ok(Self(value.to_string()))
3729        }
3730    }
3731    impl ::std::convert::TryFrom<&str> for CreateEvmSwapQuoteBodyFromAmount {
3732        type Error = self::error::ConversionError;
3733        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3734            value.parse()
3735        }
3736    }
3737    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSwapQuoteBodyFromAmount {
3738        type Error = self::error::ConversionError;
3739        fn try_from(
3740            value: &::std::string::String,
3741        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3742            value.parse()
3743        }
3744    }
3745    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSwapQuoteBodyFromAmount {
3746        type Error = self::error::ConversionError;
3747        fn try_from(
3748            value: ::std::string::String,
3749        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3750            value.parse()
3751        }
3752    }
3753    impl<'de> ::serde::Deserialize<'de> for CreateEvmSwapQuoteBodyFromAmount {
3754        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3755        where
3756            D: ::serde::Deserializer<'de>,
3757        {
3758            ::std::string::String::deserialize(deserializer)?
3759                .parse()
3760                .map_err(|e: self::error::ConversionError| {
3761                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3762                })
3763        }
3764    }
3765    ///The 0x-prefixed contract address of the token to send.
3766    ///
3767    /// <details><summary>JSON schema</summary>
3768    ///
3769    /// ```json
3770    ///{
3771    ///  "description": "The 0x-prefixed contract address of the token to send.",
3772    ///  "examples": [
3773    ///    "0x6B175474E89094C44Da98b954EedeAC495271d0F"
3774    ///  ],
3775    ///  "type": "string",
3776    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
3777    ///}
3778    /// ```
3779    /// </details>
3780    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3781    #[serde(transparent)]
3782    pub struct CreateEvmSwapQuoteBodyFromToken(::std::string::String);
3783    impl ::std::ops::Deref for CreateEvmSwapQuoteBodyFromToken {
3784        type Target = ::std::string::String;
3785        fn deref(&self) -> &::std::string::String {
3786            &self.0
3787        }
3788    }
3789    impl ::std::convert::From<CreateEvmSwapQuoteBodyFromToken> for ::std::string::String {
3790        fn from(value: CreateEvmSwapQuoteBodyFromToken) -> Self {
3791            value.0
3792        }
3793    }
3794    impl ::std::convert::From<&CreateEvmSwapQuoteBodyFromToken> for CreateEvmSwapQuoteBodyFromToken {
3795        fn from(value: &CreateEvmSwapQuoteBodyFromToken) -> Self {
3796            value.clone()
3797        }
3798    }
3799    impl ::std::str::FromStr for CreateEvmSwapQuoteBodyFromToken {
3800        type Err = self::error::ConversionError;
3801        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3802            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3803                ::std::sync::LazyLock::new(|| {
3804                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
3805                });
3806            if PATTERN.find(value).is_none() {
3807                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
3808            }
3809            Ok(Self(value.to_string()))
3810        }
3811    }
3812    impl ::std::convert::TryFrom<&str> for CreateEvmSwapQuoteBodyFromToken {
3813        type Error = self::error::ConversionError;
3814        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3815            value.parse()
3816        }
3817    }
3818    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSwapQuoteBodyFromToken {
3819        type Error = self::error::ConversionError;
3820        fn try_from(
3821            value: &::std::string::String,
3822        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3823            value.parse()
3824        }
3825    }
3826    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSwapQuoteBodyFromToken {
3827        type Error = self::error::ConversionError;
3828        fn try_from(
3829            value: ::std::string::String,
3830        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3831            value.parse()
3832        }
3833    }
3834    impl<'de> ::serde::Deserialize<'de> for CreateEvmSwapQuoteBodyFromToken {
3835        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3836        where
3837            D: ::serde::Deserializer<'de>,
3838        {
3839            ::std::string::String::deserialize(deserializer)?
3840                .parse()
3841                .map_err(|e: self::error::ConversionError| {
3842                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3843                })
3844        }
3845    }
3846    ///The target gas price for the swap transaction, in Wei. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. If not provided, the API will use an estimate based on the current network conditions.
3847    ///
3848    /// <details><summary>JSON schema</summary>
3849    ///
3850    /// ```json
3851    ///{
3852    ///  "description": "The target gas price for the swap transaction, in Wei. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. If not provided, the API will use an estimate based on the current network conditions.",
3853    ///  "examples": [
3854    ///    "1000000000"
3855    ///  ],
3856    ///  "type": "string",
3857    ///  "pattern": "^\\d+$"
3858    ///}
3859    /// ```
3860    /// </details>
3861    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3862    #[serde(transparent)]
3863    pub struct CreateEvmSwapQuoteBodyGasPrice(::std::string::String);
3864    impl ::std::ops::Deref for CreateEvmSwapQuoteBodyGasPrice {
3865        type Target = ::std::string::String;
3866        fn deref(&self) -> &::std::string::String {
3867            &self.0
3868        }
3869    }
3870    impl ::std::convert::From<CreateEvmSwapQuoteBodyGasPrice> for ::std::string::String {
3871        fn from(value: CreateEvmSwapQuoteBodyGasPrice) -> Self {
3872            value.0
3873        }
3874    }
3875    impl ::std::convert::From<&CreateEvmSwapQuoteBodyGasPrice> for CreateEvmSwapQuoteBodyGasPrice {
3876        fn from(value: &CreateEvmSwapQuoteBodyGasPrice) -> Self {
3877            value.clone()
3878        }
3879    }
3880    impl ::std::str::FromStr for CreateEvmSwapQuoteBodyGasPrice {
3881        type Err = self::error::ConversionError;
3882        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3883            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3884                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
3885            if PATTERN.find(value).is_none() {
3886                return Err("doesn't match pattern \"^\\d+$\"".into());
3887            }
3888            Ok(Self(value.to_string()))
3889        }
3890    }
3891    impl ::std::convert::TryFrom<&str> for CreateEvmSwapQuoteBodyGasPrice {
3892        type Error = self::error::ConversionError;
3893        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3894            value.parse()
3895        }
3896    }
3897    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSwapQuoteBodyGasPrice {
3898        type Error = self::error::ConversionError;
3899        fn try_from(
3900            value: &::std::string::String,
3901        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3902            value.parse()
3903        }
3904    }
3905    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSwapQuoteBodyGasPrice {
3906        type Error = self::error::ConversionError;
3907        fn try_from(
3908            value: ::std::string::String,
3909        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3910            value.parse()
3911        }
3912    }
3913    impl<'de> ::serde::Deserialize<'de> for CreateEvmSwapQuoteBodyGasPrice {
3914        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3915        where
3916            D: ::serde::Deserializer<'de>,
3917        {
3918            ::std::string::String::deserialize(deserializer)?
3919                .parse()
3920                .map_err(|e: self::error::ConversionError| {
3921                    <D::Error as ::serde::de::Error>::custom(e.to_string())
3922                })
3923        }
3924    }
3925    ///The 0x-prefixed Externally Owned Account (EOA) address that will sign the `Permit2` EIP-712 permit message. This is only needed if `taker` is a smart contract.
3926    ///
3927    /// <details><summary>JSON schema</summary>
3928    ///
3929    /// ```json
3930    ///{
3931    ///  "description": "The 0x-prefixed Externally Owned Account (EOA) address that will sign the `Permit2` EIP-712 permit message. This is only needed if `taker` is a smart contract.",
3932    ///  "examples": [
3933    ///    "0x922f49447d8a07e3bd95bd0d56f35241523fbab8"
3934    ///  ],
3935    ///  "type": "string",
3936    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
3937    ///}
3938    /// ```
3939    /// </details>
3940    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3941    #[serde(transparent)]
3942    pub struct CreateEvmSwapQuoteBodySignerAddress(::std::string::String);
3943    impl ::std::ops::Deref for CreateEvmSwapQuoteBodySignerAddress {
3944        type Target = ::std::string::String;
3945        fn deref(&self) -> &::std::string::String {
3946            &self.0
3947        }
3948    }
3949    impl ::std::convert::From<CreateEvmSwapQuoteBodySignerAddress> for ::std::string::String {
3950        fn from(value: CreateEvmSwapQuoteBodySignerAddress) -> Self {
3951            value.0
3952        }
3953    }
3954    impl ::std::convert::From<&CreateEvmSwapQuoteBodySignerAddress>
3955        for CreateEvmSwapQuoteBodySignerAddress
3956    {
3957        fn from(value: &CreateEvmSwapQuoteBodySignerAddress) -> Self {
3958            value.clone()
3959        }
3960    }
3961    impl ::std::str::FromStr for CreateEvmSwapQuoteBodySignerAddress {
3962        type Err = self::error::ConversionError;
3963        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3964            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
3965                ::std::sync::LazyLock::new(|| {
3966                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
3967                });
3968            if PATTERN.find(value).is_none() {
3969                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
3970            }
3971            Ok(Self(value.to_string()))
3972        }
3973    }
3974    impl ::std::convert::TryFrom<&str> for CreateEvmSwapQuoteBodySignerAddress {
3975        type Error = self::error::ConversionError;
3976        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3977            value.parse()
3978        }
3979    }
3980    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSwapQuoteBodySignerAddress {
3981        type Error = self::error::ConversionError;
3982        fn try_from(
3983            value: &::std::string::String,
3984        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3985            value.parse()
3986        }
3987    }
3988    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSwapQuoteBodySignerAddress {
3989        type Error = self::error::ConversionError;
3990        fn try_from(
3991            value: ::std::string::String,
3992        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3993            value.parse()
3994        }
3995    }
3996    impl<'de> ::serde::Deserialize<'de> for CreateEvmSwapQuoteBodySignerAddress {
3997        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3998        where
3999            D: ::serde::Deserializer<'de>,
4000        {
4001            ::std::string::String::deserialize(deserializer)?
4002                .parse()
4003                .map_err(|e: self::error::ConversionError| {
4004                    <D::Error as ::serde::de::Error>::custom(e.to_string())
4005                })
4006        }
4007    }
4008    ///The 0x-prefixed address that holds the `fromToken` balance and has the `Permit2` allowance set for the swap.
4009    ///
4010    /// <details><summary>JSON schema</summary>
4011    ///
4012    /// ```json
4013    ///{
4014    ///  "description": "The 0x-prefixed address that holds the `fromToken` balance and has the `Permit2` allowance set for the swap.",
4015    ///  "examples": [
4016    ///    "0xAc0974bec39a17e36ba4a6b4d238ff944bacb478"
4017    ///  ],
4018    ///  "type": "string",
4019    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
4020    ///}
4021    /// ```
4022    /// </details>
4023    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4024    #[serde(transparent)]
4025    pub struct CreateEvmSwapQuoteBodyTaker(::std::string::String);
4026    impl ::std::ops::Deref for CreateEvmSwapQuoteBodyTaker {
4027        type Target = ::std::string::String;
4028        fn deref(&self) -> &::std::string::String {
4029            &self.0
4030        }
4031    }
4032    impl ::std::convert::From<CreateEvmSwapQuoteBodyTaker> for ::std::string::String {
4033        fn from(value: CreateEvmSwapQuoteBodyTaker) -> Self {
4034            value.0
4035        }
4036    }
4037    impl ::std::convert::From<&CreateEvmSwapQuoteBodyTaker> for CreateEvmSwapQuoteBodyTaker {
4038        fn from(value: &CreateEvmSwapQuoteBodyTaker) -> Self {
4039            value.clone()
4040        }
4041    }
4042    impl ::std::str::FromStr for CreateEvmSwapQuoteBodyTaker {
4043        type Err = self::error::ConversionError;
4044        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4045            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
4046                ::std::sync::LazyLock::new(|| {
4047                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
4048                });
4049            if PATTERN.find(value).is_none() {
4050                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
4051            }
4052            Ok(Self(value.to_string()))
4053        }
4054    }
4055    impl ::std::convert::TryFrom<&str> for CreateEvmSwapQuoteBodyTaker {
4056        type Error = self::error::ConversionError;
4057        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4058            value.parse()
4059        }
4060    }
4061    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSwapQuoteBodyTaker {
4062        type Error = self::error::ConversionError;
4063        fn try_from(
4064            value: &::std::string::String,
4065        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4066            value.parse()
4067        }
4068    }
4069    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSwapQuoteBodyTaker {
4070        type Error = self::error::ConversionError;
4071        fn try_from(
4072            value: ::std::string::String,
4073        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4074            value.parse()
4075        }
4076    }
4077    impl<'de> ::serde::Deserialize<'de> for CreateEvmSwapQuoteBodyTaker {
4078        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
4079        where
4080            D: ::serde::Deserializer<'de>,
4081        {
4082            ::std::string::String::deserialize(deserializer)?
4083                .parse()
4084                .map_err(|e: self::error::ConversionError| {
4085                    <D::Error as ::serde::de::Error>::custom(e.to_string())
4086                })
4087        }
4088    }
4089    ///The 0x-prefixed contract address of the token to receive.
4090    ///
4091    /// <details><summary>JSON schema</summary>
4092    ///
4093    /// ```json
4094    ///{
4095    ///  "description": "The 0x-prefixed contract address of the token to receive.",
4096    ///  "examples": [
4097    ///    "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
4098    ///  ],
4099    ///  "type": "string",
4100    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
4101    ///}
4102    /// ```
4103    /// </details>
4104    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4105    #[serde(transparent)]
4106    pub struct CreateEvmSwapQuoteBodyToToken(::std::string::String);
4107    impl ::std::ops::Deref for CreateEvmSwapQuoteBodyToToken {
4108        type Target = ::std::string::String;
4109        fn deref(&self) -> &::std::string::String {
4110            &self.0
4111        }
4112    }
4113    impl ::std::convert::From<CreateEvmSwapQuoteBodyToToken> for ::std::string::String {
4114        fn from(value: CreateEvmSwapQuoteBodyToToken) -> Self {
4115            value.0
4116        }
4117    }
4118    impl ::std::convert::From<&CreateEvmSwapQuoteBodyToToken> for CreateEvmSwapQuoteBodyToToken {
4119        fn from(value: &CreateEvmSwapQuoteBodyToToken) -> Self {
4120            value.clone()
4121        }
4122    }
4123    impl ::std::str::FromStr for CreateEvmSwapQuoteBodyToToken {
4124        type Err = self::error::ConversionError;
4125        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4126            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
4127                ::std::sync::LazyLock::new(|| {
4128                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
4129                });
4130            if PATTERN.find(value).is_none() {
4131                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
4132            }
4133            Ok(Self(value.to_string()))
4134        }
4135    }
4136    impl ::std::convert::TryFrom<&str> for CreateEvmSwapQuoteBodyToToken {
4137        type Error = self::error::ConversionError;
4138        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4139            value.parse()
4140        }
4141    }
4142    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSwapQuoteBodyToToken {
4143        type Error = self::error::ConversionError;
4144        fn try_from(
4145            value: &::std::string::String,
4146        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4147            value.parse()
4148        }
4149    }
4150    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSwapQuoteBodyToToken {
4151        type Error = self::error::ConversionError;
4152        fn try_from(
4153            value: ::std::string::String,
4154        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4155            value.parse()
4156        }
4157    }
4158    impl<'de> ::serde::Deserialize<'de> for CreateEvmSwapQuoteBodyToToken {
4159        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
4160        where
4161            D: ::serde::Deserializer<'de>,
4162        {
4163            ::std::string::String::deserialize(deserializer)?
4164                .parse()
4165                .map_err(|e: self::error::ConversionError| {
4166                    <D::Error as ::serde::de::Error>::custom(e.to_string())
4167                })
4168        }
4169    }
4170    ///`CreateEvmSwapQuoteXIdempotencyKey`
4171    ///
4172    /// <details><summary>JSON schema</summary>
4173    ///
4174    /// ```json
4175    ///{
4176    ///  "type": "string",
4177    ///  "maxLength": 36,
4178    ///  "minLength": 36,
4179    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
4180    ///}
4181    /// ```
4182    /// </details>
4183    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4184    #[serde(transparent)]
4185    pub struct CreateEvmSwapQuoteXIdempotencyKey(::std::string::String);
4186    impl ::std::ops::Deref for CreateEvmSwapQuoteXIdempotencyKey {
4187        type Target = ::std::string::String;
4188        fn deref(&self) -> &::std::string::String {
4189            &self.0
4190        }
4191    }
4192    impl ::std::convert::From<CreateEvmSwapQuoteXIdempotencyKey> for ::std::string::String {
4193        fn from(value: CreateEvmSwapQuoteXIdempotencyKey) -> Self {
4194            value.0
4195        }
4196    }
4197    impl ::std::convert::From<&CreateEvmSwapQuoteXIdempotencyKey>
4198        for CreateEvmSwapQuoteXIdempotencyKey
4199    {
4200        fn from(value: &CreateEvmSwapQuoteXIdempotencyKey) -> Self {
4201            value.clone()
4202        }
4203    }
4204    impl ::std::str::FromStr for CreateEvmSwapQuoteXIdempotencyKey {
4205        type Err = self::error::ConversionError;
4206        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4207            if value.chars().count() > 36usize {
4208                return Err("longer than 36 characters".into());
4209            }
4210            if value.chars().count() < 36usize {
4211                return Err("shorter than 36 characters".into());
4212            }
4213            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
4214                ::std::sync::LazyLock::new(|| {
4215                    ::regress::Regex::new(
4216                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
4217                    )
4218                    .unwrap()
4219                });
4220            if PATTERN.find(value).is_none() {
4221                return Err(
4222                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
4223                        .into(),
4224                );
4225            }
4226            Ok(Self(value.to_string()))
4227        }
4228    }
4229    impl ::std::convert::TryFrom<&str> for CreateEvmSwapQuoteXIdempotencyKey {
4230        type Error = self::error::ConversionError;
4231        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4232            value.parse()
4233        }
4234    }
4235    impl ::std::convert::TryFrom<&::std::string::String> for CreateEvmSwapQuoteXIdempotencyKey {
4236        type Error = self::error::ConversionError;
4237        fn try_from(
4238            value: &::std::string::String,
4239        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4240            value.parse()
4241        }
4242    }
4243    impl ::std::convert::TryFrom<::std::string::String> for CreateEvmSwapQuoteXIdempotencyKey {
4244        type Error = self::error::ConversionError;
4245        fn try_from(
4246            value: ::std::string::String,
4247        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4248            value.parse()
4249        }
4250    }
4251    impl<'de> ::serde::Deserialize<'de> for CreateEvmSwapQuoteXIdempotencyKey {
4252        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
4253        where
4254            D: ::serde::Deserializer<'de>,
4255        {
4256            ::std::string::String::deserialize(deserializer)?
4257                .parse()
4258                .map_err(|e: self::error::ConversionError| {
4259                    <D::Error as ::serde::de::Error>::custom(e.to_string())
4260                })
4261        }
4262    }
4263    ///`CreateOnrampOrderBody`
4264    ///
4265    /// <details><summary>JSON schema</summary>
4266    ///
4267    /// ```json
4268    ///{
4269    ///  "type": "object",
4270    ///  "required": [
4271    ///    "agreementAcceptedAt",
4272    ///    "destinationAddress",
4273    ///    "destinationNetwork",
4274    ///    "email",
4275    ///    "partnerUserRef",
4276    ///    "paymentCurrency",
4277    ///    "paymentMethod",
4278    ///    "phoneNumber",
4279    ///    "phoneNumberVerifiedAt",
4280    ///    "purchaseCurrency"
4281    ///  ],
4282    ///  "properties": {
4283    ///    "agreementAcceptedAt": {
4284    ///      "description": "The timestamp of when the user acknowledged that by using Coinbase Onramp they are accepting the Coinbase Terms  (https://www.coinbase.com/legal/guest-checkout/us), User Agreement (https://www.coinbase.com/legal/user_agreement),  and Privacy Policy (https://www.coinbase.com/legal/privacy).",
4285    ///      "examples": [
4286    ///        "2025-04-24T00:00:00Z"
4287    ///      ],
4288    ///      "type": "string",
4289    ///      "format": "date-time"
4290    ///    },
4291    ///    "clientIp": {
4292    ///      "description": "The IP address of the end user requesting the onramp transaction.",
4293    ///      "examples": [
4294    ///        "127.0.0.1"
4295    ///      ],
4296    ///      "type": "string"
4297    ///    },
4298    ///    "destinationAddress": {
4299    ///      "description": "The address the purchased crypto will be sent to.",
4300    ///      "examples": [
4301    ///        "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
4302    ///      ],
4303    ///      "type": "string"
4304    ///    },
4305    ///    "destinationNetwork": {
4306    ///      "description": "The name of the crypto network the purchased currency will be sent on.\n\nUse the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported networks for your user's location.",
4307    ///      "examples": [
4308    ///        "base"
4309    ///      ],
4310    ///      "type": "string"
4311    ///    },
4312    ///    "domain": {
4313    ///      "description": "The domain that the Apple Pay button will be rendered on. Required when using the `GUEST_CHECKOUT_APPLE_PAY`  payment method and embedding the payment link in an iframe.",
4314    ///      "examples": [
4315    ///        "pay.coinbase.com"
4316    ///      ],
4317    ///      "type": "string"
4318    ///    },
4319    ///    "email": {
4320    ///      "description": "The verified email address of the user requesting the onramp transaction. This email must be verified by your app (via OTP) before being used with the Onramp API.",
4321    ///      "examples": [
4322    ///        "test@example.com"
4323    ///      ],
4324    ///      "type": "string"
4325    ///    },
4326    ///    "isQuote": {
4327    ///      "description": "If true, this API will return a quote without creating any transaction.",
4328    ///      "default": false,
4329    ///      "type": "boolean"
4330    ///    },
4331    ///    "partnerOrderRef": {
4332    ///      "description": "Optional partner order reference ID.",
4333    ///      "examples": [
4334    ///        "order-1234"
4335    ///      ],
4336    ///      "type": "string"
4337    ///    },
4338    ///    "partnerUserRef": {
4339    ///      "description": "A unique string that represents the user in your app. This can be used to link individual transactions  together so you can retrieve the transaction history for your users. Prefix this string with “sandbox-”  (e.g. \"sandbox-user-1234\") to perform a sandbox transaction which will allow you to test your integration  without any real transfer of funds.\n\nThis value can be used with with [Onramp User Transactions API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-onramp-transactions-by-id) to retrieve all transactions created by the user.",
4340    ///      "examples": [
4341    ///        "user-1234"
4342    ///      ],
4343    ///      "type": "string"
4344    ///    },
4345    ///    "paymentAmount": {
4346    ///      "description": "A string representing the amount of fiat the user wishes to pay in exchange for crypto. When using  this parameter, the returned quote will be inclusive of fees i.e. the user will pay this exact amount  of the payment currency.",
4347    ///      "examples": [
4348    ///        "100.00"
4349    ///      ],
4350    ///      "type": "string"
4351    ///    },
4352    ///    "paymentCurrency": {
4353    ///      "description": "The fiat currency to be converted to crypto.",
4354    ///      "examples": [
4355    ///        "USD"
4356    ///      ],
4357    ///      "type": "string"
4358    ///    },
4359    ///    "paymentMethod": {
4360    ///      "$ref": "#/components/schemas/OnrampOrderPaymentMethodTypeId"
4361    ///    },
4362    ///    "phoneNumber": {
4363    ///      "description": "The phone number of the user requesting the onramp transaction in E.164 format. This phone number must  be verified by your app (via OTP) before being used with the Onramp API.\n\nPlease refer to the [Onramp docs](https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/apple-pay-onramp-api) for more details on phone number verification requirements and best practices.",
4364    ///      "examples": [
4365    ///        "+12055555555"
4366    ///      ],
4367    ///      "type": "string"
4368    ///    },
4369    ///    "phoneNumberVerifiedAt": {
4370    ///      "description": "Timestamp of when the user's phone number was verified via OTP. User phone number must be verified  every 60 days. If this timestamp is older than 60 days, an error will be returned.",
4371    ///      "examples": [
4372    ///        "2025-04-24T00:00:00Z"
4373    ///      ],
4374    ///      "type": "string",
4375    ///      "format": "date-time"
4376    ///    },
4377    ///    "purchaseAmount": {
4378    ///      "description": "A string representing the amount of crypto the user wishes to purchase. When using this parameter the  returned quote will be exclusive of fees i.e. the user will receive this exact amount of the purchase  currency.",
4379    ///      "examples": [
4380    ///        "10.000000"
4381    ///      ],
4382    ///      "type": "string"
4383    ///    },
4384    ///    "purchaseCurrency": {
4385    ///      "description": "The ticker (e.g. `BTC`, `USDC`, `SOL`) or the Coinbase UUID (e.g. `d85dce9b-5b73-5c3c-8978-522ce1d1c1b4`)  of the crypto asset to be purchased.\n\nUse the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported purchase currencies for your user's location.",
4386    ///      "examples": [
4387    ///        "USDC"
4388    ///      ],
4389    ///      "type": "string"
4390    ///    }
4391    ///  }
4392    ///}
4393    /// ```
4394    /// </details>
4395    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4396    pub struct CreateOnrampOrderBody {
4397        ///The timestamp of when the user acknowledged that by using Coinbase Onramp they are accepting the Coinbase Terms  (https://www.coinbase.com/legal/guest-checkout/us), User Agreement (https://www.coinbase.com/legal/user_agreement),  and Privacy Policy (https://www.coinbase.com/legal/privacy).
4398        #[serde(rename = "agreementAcceptedAt")]
4399        pub agreement_accepted_at: ::chrono::DateTime<::chrono::offset::Utc>,
4400        ///The IP address of the end user requesting the onramp transaction.
4401        #[serde(
4402            rename = "clientIp",
4403            default,
4404            skip_serializing_if = "::std::option::Option::is_none"
4405        )]
4406        pub client_ip: ::std::option::Option<::std::string::String>,
4407        ///The address the purchased crypto will be sent to.
4408        #[serde(rename = "destinationAddress")]
4409        pub destination_address: ::std::string::String,
4410        /**The name of the crypto network the purchased currency will be sent on.
4411
4412        Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported networks for your user's location.*/
4413        #[serde(rename = "destinationNetwork")]
4414        pub destination_network: ::std::string::String,
4415        ///The domain that the Apple Pay button will be rendered on. Required when using the `GUEST_CHECKOUT_APPLE_PAY`  payment method and embedding the payment link in an iframe.
4416        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4417        pub domain: ::std::option::Option<::std::string::String>,
4418        ///The verified email address of the user requesting the onramp transaction. This email must be verified by your app (via OTP) before being used with the Onramp API.
4419        pub email: ::std::string::String,
4420        ///If true, this API will return a quote without creating any transaction.
4421        #[serde(rename = "isQuote", default)]
4422        pub is_quote: bool,
4423        ///Optional partner order reference ID.
4424        #[serde(
4425            rename = "partnerOrderRef",
4426            default,
4427            skip_serializing_if = "::std::option::Option::is_none"
4428        )]
4429        pub partner_order_ref: ::std::option::Option<::std::string::String>,
4430        /**A unique string that represents the user in your app. This can be used to link individual transactions  together so you can retrieve the transaction history for your users. Prefix this string with “sandbox-”  (e.g. "sandbox-user-1234") to perform a sandbox transaction which will allow you to test your integration  without any real transfer of funds.
4431
4432        This value can be used with with [Onramp User Transactions API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-onramp-transactions-by-id) to retrieve all transactions created by the user.*/
4433        #[serde(rename = "partnerUserRef")]
4434        pub partner_user_ref: ::std::string::String,
4435        ///A string representing the amount of fiat the user wishes to pay in exchange for crypto. When using  this parameter, the returned quote will be inclusive of fees i.e. the user will pay this exact amount  of the payment currency.
4436        #[serde(
4437            rename = "paymentAmount",
4438            default,
4439            skip_serializing_if = "::std::option::Option::is_none"
4440        )]
4441        pub payment_amount: ::std::option::Option<::std::string::String>,
4442        ///The fiat currency to be converted to crypto.
4443        #[serde(rename = "paymentCurrency")]
4444        pub payment_currency: ::std::string::String,
4445        #[serde(rename = "paymentMethod")]
4446        pub payment_method: OnrampOrderPaymentMethodTypeId,
4447        /**The phone number of the user requesting the onramp transaction in E.164 format. This phone number must  be verified by your app (via OTP) before being used with the Onramp API.
4448
4449        Please refer to the [Onramp docs](https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/apple-pay-onramp-api) for more details on phone number verification requirements and best practices.*/
4450        #[serde(rename = "phoneNumber")]
4451        pub phone_number: ::std::string::String,
4452        ///Timestamp of when the user's phone number was verified via OTP. User phone number must be verified  every 60 days. If this timestamp is older than 60 days, an error will be returned.
4453        #[serde(rename = "phoneNumberVerifiedAt")]
4454        pub phone_number_verified_at: ::chrono::DateTime<::chrono::offset::Utc>,
4455        ///A string representing the amount of crypto the user wishes to purchase. When using this parameter the  returned quote will be exclusive of fees i.e. the user will receive this exact amount of the purchase  currency.
4456        #[serde(
4457            rename = "purchaseAmount",
4458            default,
4459            skip_serializing_if = "::std::option::Option::is_none"
4460        )]
4461        pub purchase_amount: ::std::option::Option<::std::string::String>,
4462        /**The ticker (e.g. `BTC`, `USDC`, `SOL`) or the Coinbase UUID (e.g. `d85dce9b-5b73-5c3c-8978-522ce1d1c1b4`)  of the crypto asset to be purchased.
4463
4464        Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported purchase currencies for your user's location.*/
4465        #[serde(rename = "purchaseCurrency")]
4466        pub purchase_currency: ::std::string::String,
4467    }
4468    impl ::std::convert::From<&CreateOnrampOrderBody> for CreateOnrampOrderBody {
4469        fn from(value: &CreateOnrampOrderBody) -> Self {
4470            value.clone()
4471        }
4472    }
4473    impl CreateOnrampOrderBody {
4474        pub fn builder() -> builder::CreateOnrampOrderBody {
4475            Default::default()
4476        }
4477    }
4478    ///`CreateOnrampOrderResponse`
4479    ///
4480    /// <details><summary>JSON schema</summary>
4481    ///
4482    /// ```json
4483    ///{
4484    ///  "type": "object",
4485    ///  "required": [
4486    ///    "order"
4487    ///  ],
4488    ///  "properties": {
4489    ///    "order": {
4490    ///      "$ref": "#/components/schemas/OnrampOrder"
4491    ///    },
4492    ///    "paymentLink": {
4493    ///      "$ref": "#/components/schemas/OnrampPaymentLink"
4494    ///    }
4495    ///  }
4496    ///}
4497    /// ```
4498    /// </details>
4499    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4500    pub struct CreateOnrampOrderResponse {
4501        pub order: OnrampOrder,
4502        #[serde(
4503            rename = "paymentLink",
4504            default,
4505            skip_serializing_if = "::std::option::Option::is_none"
4506        )]
4507        pub payment_link: ::std::option::Option<OnrampPaymentLink>,
4508    }
4509    impl ::std::convert::From<&CreateOnrampOrderResponse> for CreateOnrampOrderResponse {
4510        fn from(value: &CreateOnrampOrderResponse) -> Self {
4511            value.clone()
4512        }
4513    }
4514    impl CreateOnrampOrderResponse {
4515        pub fn builder() -> builder::CreateOnrampOrderResponse {
4516            Default::default()
4517        }
4518    }
4519    ///`CreateOnrampSessionBody`
4520    ///
4521    /// <details><summary>JSON schema</summary>
4522    ///
4523    /// ```json
4524    ///{
4525    ///  "type": "object",
4526    ///  "required": [
4527    ///    "destinationAddress",
4528    ///    "destinationNetwork",
4529    ///    "purchaseCurrency"
4530    ///  ],
4531    ///  "properties": {
4532    ///    "clientIp": {
4533    ///      "description": "The IP address of the end user requesting the onramp transaction.",
4534    ///      "examples": [
4535    ///        "127.0.0.1"
4536    ///      ],
4537    ///      "type": "string"
4538    ///    },
4539    ///    "country": {
4540    ///      "description": "The ISO 3166-1 two letter country code (e.g. US).",
4541    ///      "examples": [
4542    ///        "US"
4543    ///      ],
4544    ///      "type": "string"
4545    ///    },
4546    ///    "destinationAddress": {
4547    ///      "description": "The address the purchased crypto will be sent to.",
4548    ///      "examples": [
4549    ///        "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
4550    ///      ],
4551    ///      "type": "string"
4552    ///    },
4553    ///    "destinationNetwork": {
4554    ///      "description": "The name of the crypto network the purchased currency will be sent on.\n\nUse the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported networks for your user's location.",
4555    ///      "examples": [
4556    ///        "base"
4557    ///      ],
4558    ///      "type": "string"
4559    ///    },
4560    ///    "partnerUserRef": {
4561    ///      "description": "A unique string that represents the user in your app. This can be used to link individual transactions together so you can retrieve the transaction history for your users. Prefix this string with “sandbox-”  (e.g. \"sandbox-user-1234\") to perform a sandbox transaction which will allow you to test your integration  without any real transfer of funds.\n\nThis value can be used with with [Onramp User Transactions API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-onramp-transactions-by-id) to retrieve all transactions created by the user.",
4562    ///      "examples": [
4563    ///        "user-1234"
4564    ///      ],
4565    ///      "type": "string"
4566    ///    },
4567    ///    "paymentAmount": {
4568    ///      "description": "A string representing the amount of fiat the user wishes to pay in exchange for crypto.",
4569    ///      "examples": [
4570    ///        "100.00"
4571    ///      ],
4572    ///      "type": "string"
4573    ///    },
4574    ///    "paymentCurrency": {
4575    ///      "description": "The fiat currency to be converted to crypto.",
4576    ///      "examples": [
4577    ///        "USD"
4578    ///      ],
4579    ///      "type": "string"
4580    ///    },
4581    ///    "paymentMethod": {
4582    ///      "$ref": "#/components/schemas/OnrampQuotePaymentMethodTypeId"
4583    ///    },
4584    ///    "purchaseCurrency": {
4585    ///      "description": "The ticker (e.g. `BTC`, `USDC`, `SOL`) or the Coinbase UUID (e.g. `d85dce9b-5b73-5c3c-8978-522ce1d1c1b4`)  of the crypto asset to be purchased.\n\nUse the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported purchase currencies for your user's location.",
4586    ///      "examples": [
4587    ///        "USDC"
4588    ///      ],
4589    ///      "type": "string"
4590    ///    },
4591    ///    "redirectUrl": {
4592    ///      "description": "URI to redirect the user to when they successfully complete a transaction. This URI will be embedded in the returned onramp URI as a query parameter.",
4593    ///      "examples": [
4594    ///        "https://example.com/success"
4595    ///      ],
4596    ///      "allOf": [
4597    ///        {
4598    ///          "$ref": "#/components/schemas/Uri"
4599    ///        }
4600    ///      ]
4601    ///    },
4602    ///    "subdivision": {
4603    ///      "description": "The ISO 3166-2 two letter state code (e.g. NY). Only required for US.",
4604    ///      "examples": [
4605    ///        "NY"
4606    ///      ],
4607    ///      "type": "string"
4608    ///    }
4609    ///  }
4610    ///}
4611    /// ```
4612    /// </details>
4613    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4614    pub struct CreateOnrampSessionBody {
4615        ///The IP address of the end user requesting the onramp transaction.
4616        #[serde(
4617            rename = "clientIp",
4618            default,
4619            skip_serializing_if = "::std::option::Option::is_none"
4620        )]
4621        pub client_ip: ::std::option::Option<::std::string::String>,
4622        ///The ISO 3166-1 two letter country code (e.g. US).
4623        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4624        pub country: ::std::option::Option<::std::string::String>,
4625        ///The address the purchased crypto will be sent to.
4626        #[serde(rename = "destinationAddress")]
4627        pub destination_address: ::std::string::String,
4628        /**The name of the crypto network the purchased currency will be sent on.
4629
4630        Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported networks for your user's location.*/
4631        #[serde(rename = "destinationNetwork")]
4632        pub destination_network: ::std::string::String,
4633        /**A unique string that represents the user in your app. This can be used to link individual transactions together so you can retrieve the transaction history for your users. Prefix this string with “sandbox-”  (e.g. "sandbox-user-1234") to perform a sandbox transaction which will allow you to test your integration  without any real transfer of funds.
4634
4635        This value can be used with with [Onramp User Transactions API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-onramp-transactions-by-id) to retrieve all transactions created by the user.*/
4636        #[serde(
4637            rename = "partnerUserRef",
4638            default,
4639            skip_serializing_if = "::std::option::Option::is_none"
4640        )]
4641        pub partner_user_ref: ::std::option::Option<::std::string::String>,
4642        ///A string representing the amount of fiat the user wishes to pay in exchange for crypto.
4643        #[serde(
4644            rename = "paymentAmount",
4645            default,
4646            skip_serializing_if = "::std::option::Option::is_none"
4647        )]
4648        pub payment_amount: ::std::option::Option<::std::string::String>,
4649        ///The fiat currency to be converted to crypto.
4650        #[serde(
4651            rename = "paymentCurrency",
4652            default,
4653            skip_serializing_if = "::std::option::Option::is_none"
4654        )]
4655        pub payment_currency: ::std::option::Option<::std::string::String>,
4656        #[serde(
4657            rename = "paymentMethod",
4658            default,
4659            skip_serializing_if = "::std::option::Option::is_none"
4660        )]
4661        pub payment_method: ::std::option::Option<OnrampQuotePaymentMethodTypeId>,
4662        /**The ticker (e.g. `BTC`, `USDC`, `SOL`) or the Coinbase UUID (e.g. `d85dce9b-5b73-5c3c-8978-522ce1d1c1b4`)  of the crypto asset to be purchased.
4663
4664        Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported purchase currencies for your user's location.*/
4665        #[serde(rename = "purchaseCurrency")]
4666        pub purchase_currency: ::std::string::String,
4667        ///URI to redirect the user to when they successfully complete a transaction. This URI will be embedded in the returned onramp URI as a query parameter.
4668        #[serde(
4669            rename = "redirectUrl",
4670            default,
4671            skip_serializing_if = "::std::option::Option::is_none"
4672        )]
4673        pub redirect_url: ::std::option::Option<Uri>,
4674        ///The ISO 3166-2 two letter state code (e.g. NY). Only required for US.
4675        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4676        pub subdivision: ::std::option::Option<::std::string::String>,
4677    }
4678    impl ::std::convert::From<&CreateOnrampSessionBody> for CreateOnrampSessionBody {
4679        fn from(value: &CreateOnrampSessionBody) -> Self {
4680            value.clone()
4681        }
4682    }
4683    impl CreateOnrampSessionBody {
4684        pub fn builder() -> builder::CreateOnrampSessionBody {
4685            Default::default()
4686        }
4687    }
4688    ///`CreateOnrampSessionResponse`
4689    ///
4690    /// <details><summary>JSON schema</summary>
4691    ///
4692    /// ```json
4693    ///{
4694    ///  "type": "object",
4695    ///  "required": [
4696    ///    "session"
4697    ///  ],
4698    ///  "properties": {
4699    ///    "quote": {
4700    ///      "$ref": "#/components/schemas/OnrampQuote"
4701    ///    },
4702    ///    "session": {
4703    ///      "$ref": "#/components/schemas/OnrampSession"
4704    ///    }
4705    ///  }
4706    ///}
4707    /// ```
4708    /// </details>
4709    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4710    pub struct CreateOnrampSessionResponse {
4711        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4712        pub quote: ::std::option::Option<OnrampQuote>,
4713        pub session: OnrampSession,
4714    }
4715    impl ::std::convert::From<&CreateOnrampSessionResponse> for CreateOnrampSessionResponse {
4716        fn from(value: &CreateOnrampSessionResponse) -> Self {
4717            value.clone()
4718        }
4719    }
4720    impl CreateOnrampSessionResponse {
4721        pub fn builder() -> builder::CreateOnrampSessionResponse {
4722            Default::default()
4723        }
4724    }
4725    ///`CreatePolicyBody`
4726    ///
4727    /// <details><summary>JSON schema</summary>
4728    ///
4729    /// ```json
4730    ///{
4731    ///  "type": "object",
4732    ///  "required": [
4733    ///    "rules",
4734    ///    "scope"
4735    ///  ],
4736    ///  "properties": {
4737    ///    "description": {
4738    ///      "description": "An optional human-readable description for the policy.\nPolicy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.",
4739    ///      "examples": [
4740    ///        "Default policy"
4741    ///      ],
4742    ///      "type": "string",
4743    ///      "pattern": "^[A-Za-z0-9 ,.]{1,50}$"
4744    ///    },
4745    ///    "rules": {
4746    ///      "description": "A list of rules that comprise the policy. There is a limit of 10 rules per policy.",
4747    ///      "type": "array",
4748    ///      "items": {
4749    ///        "$ref": "#/components/schemas/Rule"
4750    ///      }
4751    ///    },
4752    ///    "scope": {
4753    ///      "description": "The scope of the policy.",
4754    ///      "examples": [
4755    ///        "project"
4756    ///      ],
4757    ///      "type": "string",
4758    ///      "enum": [
4759    ///        "project",
4760    ///        "account"
4761    ///      ]
4762    ///    }
4763    ///  }
4764    ///}
4765    /// ```
4766    /// </details>
4767    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4768    pub struct CreatePolicyBody {
4769        /**An optional human-readable description for the policy.
4770        Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.*/
4771        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4772        pub description: ::std::option::Option<CreatePolicyBodyDescription>,
4773        ///A list of rules that comprise the policy. There is a limit of 10 rules per policy.
4774        pub rules: ::std::vec::Vec<Rule>,
4775        ///The scope of the policy.
4776        pub scope: CreatePolicyBodyScope,
4777    }
4778    impl ::std::convert::From<&CreatePolicyBody> for CreatePolicyBody {
4779        fn from(value: &CreatePolicyBody) -> Self {
4780            value.clone()
4781        }
4782    }
4783    impl CreatePolicyBody {
4784        pub fn builder() -> builder::CreatePolicyBody {
4785            Default::default()
4786        }
4787    }
4788    /**An optional human-readable description for the policy.
4789    Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.*/
4790    ///
4791    /// <details><summary>JSON schema</summary>
4792    ///
4793    /// ```json
4794    ///{
4795    ///  "description": "An optional human-readable description for the policy.\nPolicy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.",
4796    ///  "examples": [
4797    ///    "Default policy"
4798    ///  ],
4799    ///  "type": "string",
4800    ///  "pattern": "^[A-Za-z0-9 ,.]{1,50}$"
4801    ///}
4802    /// ```
4803    /// </details>
4804    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4805    #[serde(transparent)]
4806    pub struct CreatePolicyBodyDescription(::std::string::String);
4807    impl ::std::ops::Deref for CreatePolicyBodyDescription {
4808        type Target = ::std::string::String;
4809        fn deref(&self) -> &::std::string::String {
4810            &self.0
4811        }
4812    }
4813    impl ::std::convert::From<CreatePolicyBodyDescription> for ::std::string::String {
4814        fn from(value: CreatePolicyBodyDescription) -> Self {
4815            value.0
4816        }
4817    }
4818    impl ::std::convert::From<&CreatePolicyBodyDescription> for CreatePolicyBodyDescription {
4819        fn from(value: &CreatePolicyBodyDescription) -> Self {
4820            value.clone()
4821        }
4822    }
4823    impl ::std::str::FromStr for CreatePolicyBodyDescription {
4824        type Err = self::error::ConversionError;
4825        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4826            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
4827                ::std::sync::LazyLock::new(|| {
4828                    ::regress::Regex::new("^[A-Za-z0-9 ,.]{1,50}$").unwrap()
4829                });
4830            if PATTERN.find(value).is_none() {
4831                return Err("doesn't match pattern \"^[A-Za-z0-9 ,.]{1,50}$\"".into());
4832            }
4833            Ok(Self(value.to_string()))
4834        }
4835    }
4836    impl ::std::convert::TryFrom<&str> for CreatePolicyBodyDescription {
4837        type Error = self::error::ConversionError;
4838        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4839            value.parse()
4840        }
4841    }
4842    impl ::std::convert::TryFrom<&::std::string::String> for CreatePolicyBodyDescription {
4843        type Error = self::error::ConversionError;
4844        fn try_from(
4845            value: &::std::string::String,
4846        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4847            value.parse()
4848        }
4849    }
4850    impl ::std::convert::TryFrom<::std::string::String> for CreatePolicyBodyDescription {
4851        type Error = self::error::ConversionError;
4852        fn try_from(
4853            value: ::std::string::String,
4854        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4855            value.parse()
4856        }
4857    }
4858    impl<'de> ::serde::Deserialize<'de> for CreatePolicyBodyDescription {
4859        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
4860        where
4861            D: ::serde::Deserializer<'de>,
4862        {
4863            ::std::string::String::deserialize(deserializer)?
4864                .parse()
4865                .map_err(|e: self::error::ConversionError| {
4866                    <D::Error as ::serde::de::Error>::custom(e.to_string())
4867                })
4868        }
4869    }
4870    ///The scope of the policy.
4871    ///
4872    /// <details><summary>JSON schema</summary>
4873    ///
4874    /// ```json
4875    ///{
4876    ///  "description": "The scope of the policy.",
4877    ///  "examples": [
4878    ///    "project"
4879    ///  ],
4880    ///  "type": "string",
4881    ///  "enum": [
4882    ///    "project",
4883    ///    "account"
4884    ///  ]
4885    ///}
4886    /// ```
4887    /// </details>
4888    #[derive(
4889        ::serde::Deserialize,
4890        ::serde::Serialize,
4891        Clone,
4892        Copy,
4893        Debug,
4894        Eq,
4895        Hash,
4896        Ord,
4897        PartialEq,
4898        PartialOrd,
4899    )]
4900    pub enum CreatePolicyBodyScope {
4901        #[serde(rename = "project")]
4902        Project,
4903        #[serde(rename = "account")]
4904        Account,
4905    }
4906    impl ::std::convert::From<&Self> for CreatePolicyBodyScope {
4907        fn from(value: &CreatePolicyBodyScope) -> Self {
4908            value.clone()
4909        }
4910    }
4911    impl ::std::fmt::Display for CreatePolicyBodyScope {
4912        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4913            match *self {
4914                Self::Project => f.write_str("project"),
4915                Self::Account => f.write_str("account"),
4916            }
4917        }
4918    }
4919    impl ::std::str::FromStr for CreatePolicyBodyScope {
4920        type Err = self::error::ConversionError;
4921        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4922            match value {
4923                "project" => Ok(Self::Project),
4924                "account" => Ok(Self::Account),
4925                _ => Err("invalid value".into()),
4926            }
4927        }
4928    }
4929    impl ::std::convert::TryFrom<&str> for CreatePolicyBodyScope {
4930        type Error = self::error::ConversionError;
4931        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4932            value.parse()
4933        }
4934    }
4935    impl ::std::convert::TryFrom<&::std::string::String> for CreatePolicyBodyScope {
4936        type Error = self::error::ConversionError;
4937        fn try_from(
4938            value: &::std::string::String,
4939        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4940            value.parse()
4941        }
4942    }
4943    impl ::std::convert::TryFrom<::std::string::String> for CreatePolicyBodyScope {
4944        type Error = self::error::ConversionError;
4945        fn try_from(
4946            value: ::std::string::String,
4947        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4948            value.parse()
4949        }
4950    }
4951    ///`CreatePolicyXIdempotencyKey`
4952    ///
4953    /// <details><summary>JSON schema</summary>
4954    ///
4955    /// ```json
4956    ///{
4957    ///  "type": "string",
4958    ///  "maxLength": 36,
4959    ///  "minLength": 36,
4960    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
4961    ///}
4962    /// ```
4963    /// </details>
4964    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4965    #[serde(transparent)]
4966    pub struct CreatePolicyXIdempotencyKey(::std::string::String);
4967    impl ::std::ops::Deref for CreatePolicyXIdempotencyKey {
4968        type Target = ::std::string::String;
4969        fn deref(&self) -> &::std::string::String {
4970            &self.0
4971        }
4972    }
4973    impl ::std::convert::From<CreatePolicyXIdempotencyKey> for ::std::string::String {
4974        fn from(value: CreatePolicyXIdempotencyKey) -> Self {
4975            value.0
4976        }
4977    }
4978    impl ::std::convert::From<&CreatePolicyXIdempotencyKey> for CreatePolicyXIdempotencyKey {
4979        fn from(value: &CreatePolicyXIdempotencyKey) -> Self {
4980            value.clone()
4981        }
4982    }
4983    impl ::std::str::FromStr for CreatePolicyXIdempotencyKey {
4984        type Err = self::error::ConversionError;
4985        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4986            if value.chars().count() > 36usize {
4987                return Err("longer than 36 characters".into());
4988            }
4989            if value.chars().count() < 36usize {
4990                return Err("shorter than 36 characters".into());
4991            }
4992            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
4993                ::std::sync::LazyLock::new(|| {
4994                    ::regress::Regex::new(
4995                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
4996                    )
4997                    .unwrap()
4998                });
4999            if PATTERN.find(value).is_none() {
5000                return Err(
5001                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
5002                        .into(),
5003                );
5004            }
5005            Ok(Self(value.to_string()))
5006        }
5007    }
5008    impl ::std::convert::TryFrom<&str> for CreatePolicyXIdempotencyKey {
5009        type Error = self::error::ConversionError;
5010        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5011            value.parse()
5012        }
5013    }
5014    impl ::std::convert::TryFrom<&::std::string::String> for CreatePolicyXIdempotencyKey {
5015        type Error = self::error::ConversionError;
5016        fn try_from(
5017            value: &::std::string::String,
5018        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5019            value.parse()
5020        }
5021    }
5022    impl ::std::convert::TryFrom<::std::string::String> for CreatePolicyXIdempotencyKey {
5023        type Error = self::error::ConversionError;
5024        fn try_from(
5025            value: ::std::string::String,
5026        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5027            value.parse()
5028        }
5029    }
5030    impl<'de> ::serde::Deserialize<'de> for CreatePolicyXIdempotencyKey {
5031        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5032        where
5033            D: ::serde::Deserializer<'de>,
5034        {
5035            ::std::string::String::deserialize(deserializer)?
5036                .parse()
5037                .map_err(|e: self::error::ConversionError| {
5038                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5039                })
5040        }
5041    }
5042    ///`CreateSolanaAccountBody`
5043    ///
5044    /// <details><summary>JSON schema</summary>
5045    ///
5046    /// ```json
5047    ///{
5048    ///  "type": "object",
5049    ///  "properties": {
5050    ///    "accountPolicy": {
5051    ///      "description": "The ID of the account-level policy to apply to the account.",
5052    ///      "examples": [
5053    ///        "123e4567-e89b-12d3-a456-426614174000"
5054    ///      ],
5055    ///      "type": "string",
5056    ///      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
5057    ///      "x-audience": "public"
5058    ///    },
5059    ///    "name": {
5060    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all Solana accounts in the developer's CDP Project.",
5061    ///      "examples": [
5062    ///        "my-wallet"
5063    ///      ],
5064    ///      "type": "string",
5065    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
5066    ///    }
5067    ///  }
5068    ///}
5069    /// ```
5070    /// </details>
5071    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5072    pub struct CreateSolanaAccountBody {
5073        ///The ID of the account-level policy to apply to the account.
5074        #[serde(
5075            rename = "accountPolicy",
5076            default,
5077            skip_serializing_if = "::std::option::Option::is_none"
5078        )]
5079        pub account_policy: ::std::option::Option<CreateSolanaAccountBodyAccountPolicy>,
5080        /**An optional name for the account.
5081        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
5082        Account names must be unique across all Solana accounts in the developer's CDP Project.*/
5083        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5084        pub name: ::std::option::Option<CreateSolanaAccountBodyName>,
5085    }
5086    impl ::std::convert::From<&CreateSolanaAccountBody> for CreateSolanaAccountBody {
5087        fn from(value: &CreateSolanaAccountBody) -> Self {
5088            value.clone()
5089        }
5090    }
5091    impl ::std::default::Default for CreateSolanaAccountBody {
5092        fn default() -> Self {
5093            Self {
5094                account_policy: Default::default(),
5095                name: Default::default(),
5096            }
5097        }
5098    }
5099    impl CreateSolanaAccountBody {
5100        pub fn builder() -> builder::CreateSolanaAccountBody {
5101            Default::default()
5102        }
5103    }
5104    ///The ID of the account-level policy to apply to the account.
5105    ///
5106    /// <details><summary>JSON schema</summary>
5107    ///
5108    /// ```json
5109    ///{
5110    ///  "description": "The ID of the account-level policy to apply to the account.",
5111    ///  "examples": [
5112    ///    "123e4567-e89b-12d3-a456-426614174000"
5113    ///  ],
5114    ///  "type": "string",
5115    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
5116    ///  "x-audience": "public"
5117    ///}
5118    /// ```
5119    /// </details>
5120    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5121    #[serde(transparent)]
5122    pub struct CreateSolanaAccountBodyAccountPolicy(::std::string::String);
5123    impl ::std::ops::Deref for CreateSolanaAccountBodyAccountPolicy {
5124        type Target = ::std::string::String;
5125        fn deref(&self) -> &::std::string::String {
5126            &self.0
5127        }
5128    }
5129    impl ::std::convert::From<CreateSolanaAccountBodyAccountPolicy> for ::std::string::String {
5130        fn from(value: CreateSolanaAccountBodyAccountPolicy) -> Self {
5131            value.0
5132        }
5133    }
5134    impl ::std::convert::From<&CreateSolanaAccountBodyAccountPolicy>
5135        for CreateSolanaAccountBodyAccountPolicy
5136    {
5137        fn from(value: &CreateSolanaAccountBodyAccountPolicy) -> Self {
5138            value.clone()
5139        }
5140    }
5141    impl ::std::str::FromStr for CreateSolanaAccountBodyAccountPolicy {
5142        type Err = self::error::ConversionError;
5143        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5144            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
5145                || {
5146                    ::regress::Regex::new(
5147                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
5148                    )
5149                    .unwrap()
5150                },
5151            );
5152            if PATTERN.find(value).is_none() {
5153                return Err(
5154                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
5155                        .into(),
5156                );
5157            }
5158            Ok(Self(value.to_string()))
5159        }
5160    }
5161    impl ::std::convert::TryFrom<&str> for CreateSolanaAccountBodyAccountPolicy {
5162        type Error = self::error::ConversionError;
5163        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5164            value.parse()
5165        }
5166    }
5167    impl ::std::convert::TryFrom<&::std::string::String> for CreateSolanaAccountBodyAccountPolicy {
5168        type Error = self::error::ConversionError;
5169        fn try_from(
5170            value: &::std::string::String,
5171        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5172            value.parse()
5173        }
5174    }
5175    impl ::std::convert::TryFrom<::std::string::String> for CreateSolanaAccountBodyAccountPolicy {
5176        type Error = self::error::ConversionError;
5177        fn try_from(
5178            value: ::std::string::String,
5179        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5180            value.parse()
5181        }
5182    }
5183    impl<'de> ::serde::Deserialize<'de> for CreateSolanaAccountBodyAccountPolicy {
5184        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5185        where
5186            D: ::serde::Deserializer<'de>,
5187        {
5188            ::std::string::String::deserialize(deserializer)?
5189                .parse()
5190                .map_err(|e: self::error::ConversionError| {
5191                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5192                })
5193        }
5194    }
5195    /**An optional name for the account.
5196    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
5197    Account names must be unique across all Solana accounts in the developer's CDP Project.*/
5198    ///
5199    /// <details><summary>JSON schema</summary>
5200    ///
5201    /// ```json
5202    ///{
5203    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all Solana accounts in the developer's CDP Project.",
5204    ///  "examples": [
5205    ///    "my-wallet"
5206    ///  ],
5207    ///  "type": "string",
5208    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
5209    ///}
5210    /// ```
5211    /// </details>
5212    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5213    #[serde(transparent)]
5214    pub struct CreateSolanaAccountBodyName(::std::string::String);
5215    impl ::std::ops::Deref for CreateSolanaAccountBodyName {
5216        type Target = ::std::string::String;
5217        fn deref(&self) -> &::std::string::String {
5218            &self.0
5219        }
5220    }
5221    impl ::std::convert::From<CreateSolanaAccountBodyName> for ::std::string::String {
5222        fn from(value: CreateSolanaAccountBodyName) -> Self {
5223            value.0
5224        }
5225    }
5226    impl ::std::convert::From<&CreateSolanaAccountBodyName> for CreateSolanaAccountBodyName {
5227        fn from(value: &CreateSolanaAccountBodyName) -> Self {
5228            value.clone()
5229        }
5230    }
5231    impl ::std::str::FromStr for CreateSolanaAccountBodyName {
5232        type Err = self::error::ConversionError;
5233        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5234            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
5235                ::std::sync::LazyLock::new(|| {
5236                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
5237                });
5238            if PATTERN.find(value).is_none() {
5239                return Err(
5240                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
5241                );
5242            }
5243            Ok(Self(value.to_string()))
5244        }
5245    }
5246    impl ::std::convert::TryFrom<&str> for CreateSolanaAccountBodyName {
5247        type Error = self::error::ConversionError;
5248        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5249            value.parse()
5250        }
5251    }
5252    impl ::std::convert::TryFrom<&::std::string::String> for CreateSolanaAccountBodyName {
5253        type Error = self::error::ConversionError;
5254        fn try_from(
5255            value: &::std::string::String,
5256        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5257            value.parse()
5258        }
5259    }
5260    impl ::std::convert::TryFrom<::std::string::String> for CreateSolanaAccountBodyName {
5261        type Error = self::error::ConversionError;
5262        fn try_from(
5263            value: ::std::string::String,
5264        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5265            value.parse()
5266        }
5267    }
5268    impl<'de> ::serde::Deserialize<'de> for CreateSolanaAccountBodyName {
5269        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5270        where
5271            D: ::serde::Deserializer<'de>,
5272        {
5273            ::std::string::String::deserialize(deserializer)?
5274                .parse()
5275                .map_err(|e: self::error::ConversionError| {
5276                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5277                })
5278        }
5279    }
5280    ///`CreateSolanaAccountXIdempotencyKey`
5281    ///
5282    /// <details><summary>JSON schema</summary>
5283    ///
5284    /// ```json
5285    ///{
5286    ///  "type": "string",
5287    ///  "maxLength": 36,
5288    ///  "minLength": 36,
5289    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
5290    ///}
5291    /// ```
5292    /// </details>
5293    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5294    #[serde(transparent)]
5295    pub struct CreateSolanaAccountXIdempotencyKey(::std::string::String);
5296    impl ::std::ops::Deref for CreateSolanaAccountXIdempotencyKey {
5297        type Target = ::std::string::String;
5298        fn deref(&self) -> &::std::string::String {
5299            &self.0
5300        }
5301    }
5302    impl ::std::convert::From<CreateSolanaAccountXIdempotencyKey> for ::std::string::String {
5303        fn from(value: CreateSolanaAccountXIdempotencyKey) -> Self {
5304            value.0
5305        }
5306    }
5307    impl ::std::convert::From<&CreateSolanaAccountXIdempotencyKey>
5308        for CreateSolanaAccountXIdempotencyKey
5309    {
5310        fn from(value: &CreateSolanaAccountXIdempotencyKey) -> Self {
5311            value.clone()
5312        }
5313    }
5314    impl ::std::str::FromStr for CreateSolanaAccountXIdempotencyKey {
5315        type Err = self::error::ConversionError;
5316        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5317            if value.chars().count() > 36usize {
5318                return Err("longer than 36 characters".into());
5319            }
5320            if value.chars().count() < 36usize {
5321                return Err("shorter than 36 characters".into());
5322            }
5323            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
5324                ::std::sync::LazyLock::new(|| {
5325                    ::regress::Regex::new(
5326                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
5327                    )
5328                    .unwrap()
5329                });
5330            if PATTERN.find(value).is_none() {
5331                return Err(
5332                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
5333                        .into(),
5334                );
5335            }
5336            Ok(Self(value.to_string()))
5337        }
5338    }
5339    impl ::std::convert::TryFrom<&str> for CreateSolanaAccountXIdempotencyKey {
5340        type Error = self::error::ConversionError;
5341        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5342            value.parse()
5343        }
5344    }
5345    impl ::std::convert::TryFrom<&::std::string::String> for CreateSolanaAccountXIdempotencyKey {
5346        type Error = self::error::ConversionError;
5347        fn try_from(
5348            value: &::std::string::String,
5349        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5350            value.parse()
5351        }
5352    }
5353    impl ::std::convert::TryFrom<::std::string::String> for CreateSolanaAccountXIdempotencyKey {
5354        type Error = self::error::ConversionError;
5355        fn try_from(
5356            value: ::std::string::String,
5357        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5358            value.parse()
5359        }
5360    }
5361    impl<'de> ::serde::Deserialize<'de> for CreateSolanaAccountXIdempotencyKey {
5362        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5363        where
5364            D: ::serde::Deserializer<'de>,
5365        {
5366            ::std::string::String::deserialize(deserializer)?
5367                .parse()
5368                .map_err(|e: self::error::ConversionError| {
5369                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5370                })
5371        }
5372    }
5373    ///`CreateSpendPermissionAddress`
5374    ///
5375    /// <details><summary>JSON schema</summary>
5376    ///
5377    /// ```json
5378    ///{
5379    ///  "type": "string",
5380    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
5381    ///}
5382    /// ```
5383    /// </details>
5384    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5385    #[serde(transparent)]
5386    pub struct CreateSpendPermissionAddress(::std::string::String);
5387    impl ::std::ops::Deref for CreateSpendPermissionAddress {
5388        type Target = ::std::string::String;
5389        fn deref(&self) -> &::std::string::String {
5390            &self.0
5391        }
5392    }
5393    impl ::std::convert::From<CreateSpendPermissionAddress> for ::std::string::String {
5394        fn from(value: CreateSpendPermissionAddress) -> Self {
5395            value.0
5396        }
5397    }
5398    impl ::std::convert::From<&CreateSpendPermissionAddress> for CreateSpendPermissionAddress {
5399        fn from(value: &CreateSpendPermissionAddress) -> Self {
5400            value.clone()
5401        }
5402    }
5403    impl ::std::str::FromStr for CreateSpendPermissionAddress {
5404        type Err = self::error::ConversionError;
5405        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5406            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
5407                ::std::sync::LazyLock::new(|| {
5408                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
5409                });
5410            if PATTERN.find(value).is_none() {
5411                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
5412            }
5413            Ok(Self(value.to_string()))
5414        }
5415    }
5416    impl ::std::convert::TryFrom<&str> for CreateSpendPermissionAddress {
5417        type Error = self::error::ConversionError;
5418        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5419            value.parse()
5420        }
5421    }
5422    impl ::std::convert::TryFrom<&::std::string::String> for CreateSpendPermissionAddress {
5423        type Error = self::error::ConversionError;
5424        fn try_from(
5425            value: &::std::string::String,
5426        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5427            value.parse()
5428        }
5429    }
5430    impl ::std::convert::TryFrom<::std::string::String> for CreateSpendPermissionAddress {
5431        type Error = self::error::ConversionError;
5432        fn try_from(
5433            value: ::std::string::String,
5434        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5435            value.parse()
5436        }
5437    }
5438    impl<'de> ::serde::Deserialize<'de> for CreateSpendPermissionAddress {
5439        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5440        where
5441            D: ::serde::Deserializer<'de>,
5442        {
5443            ::std::string::String::deserialize(deserializer)?
5444                .parse()
5445                .map_err(|e: self::error::ConversionError| {
5446                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5447                })
5448        }
5449    }
5450    ///Request parameters for creating a Spend Permission.
5451    ///
5452    /// <details><summary>JSON schema</summary>
5453    ///
5454    /// ```json
5455    ///{
5456    ///  "description": "Request parameters for creating a Spend Permission.",
5457    ///  "type": "object",
5458    ///  "required": [
5459    ///    "allowance",
5460    ///    "end",
5461    ///    "network",
5462    ///    "period",
5463    ///    "spender",
5464    ///    "start",
5465    ///    "token"
5466    ///  ],
5467    ///  "properties": {
5468    ///    "allowance": {
5469    ///      "description": "Maximum allowed value to spend, in atomic units for the specified token, within each period.",
5470    ///      "examples": [
5471    ///        "1000000000000000000"
5472    ///      ],
5473    ///      "type": "string"
5474    ///    },
5475    ///    "end": {
5476    ///      "description": "The expiration time for this spend permission, in Unix seconds.",
5477    ///      "examples": [
5478    ///        "281474976710655"
5479    ///      ],
5480    ///      "type": "string"
5481    ///    },
5482    ///    "extraData": {
5483    ///      "description": "Arbitrary data to include in the permission.",
5484    ///      "examples": [
5485    ///        "0x"
5486    ///      ],
5487    ///      "type": "string"
5488    ///    },
5489    ///    "network": {
5490    ///      "$ref": "#/components/schemas/SpendPermissionNetwork"
5491    ///    },
5492    ///    "paymasterUrl": {
5493    ///      "description": "The paymaster URL of the spend permission.",
5494    ///      "examples": [
5495    ///        "https://paymaster.cdp.coinbase.com"
5496    ///      ],
5497    ///      "allOf": [
5498    ///        {
5499    ///          "$ref": "#/components/schemas/Url"
5500    ///        }
5501    ///      ]
5502    ///    },
5503    ///    "period": {
5504    ///      "description": "Time duration for resetting used allowance on a recurring basis (seconds).",
5505    ///      "examples": [
5506    ///        "86400"
5507    ///      ],
5508    ///      "type": "string"
5509    ///    },
5510    ///    "salt": {
5511    ///      "description": "An arbitrary salt to differentiate unique spend permissions with otherwise identical data.",
5512    ///      "examples": [
5513    ///        "95959551014433038874972658238091428449162862973207257628575040053304171156143"
5514    ///      ],
5515    ///      "type": "string"
5516    ///    },
5517    ///    "spender": {
5518    ///      "description": "Entity that can spend account's tokens. Can be either a Smart Account or an EOA.",
5519    ///      "examples": [
5520    ///        "0x9Fb909eA400c2b8D99Be292DADf07e63B814527c"
5521    ///      ],
5522    ///      "type": "string",
5523    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
5524    ///    },
5525    ///    "start": {
5526    ///      "description": "The start time for this spend permission, in Unix seconds.",
5527    ///      "examples": [
5528    ///        "0"
5529    ///      ],
5530    ///      "type": "string"
5531    ///    },
5532    ///    "token": {
5533    ///      "description": "ERC-7528 native token address (e.g. \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\" for native ETH), or an  ERC-20 contract address.",
5534    ///      "examples": [
5535    ///        "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
5536    ///      ],
5537    ///      "type": "string",
5538    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
5539    ///    }
5540    ///  }
5541    ///}
5542    /// ```
5543    /// </details>
5544    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5545    pub struct CreateSpendPermissionRequest {
5546        ///Maximum allowed value to spend, in atomic units for the specified token, within each period.
5547        pub allowance: ::std::string::String,
5548        ///The expiration time for this spend permission, in Unix seconds.
5549        pub end: ::std::string::String,
5550        ///Arbitrary data to include in the permission.
5551        #[serde(
5552            rename = "extraData",
5553            default,
5554            skip_serializing_if = "::std::option::Option::is_none"
5555        )]
5556        pub extra_data: ::std::option::Option<::std::string::String>,
5557        pub network: SpendPermissionNetwork,
5558        ///The paymaster URL of the spend permission.
5559        #[serde(
5560            rename = "paymasterUrl",
5561            default,
5562            skip_serializing_if = "::std::option::Option::is_none"
5563        )]
5564        pub paymaster_url: ::std::option::Option<Url>,
5565        ///Time duration for resetting used allowance on a recurring basis (seconds).
5566        pub period: ::std::string::String,
5567        ///An arbitrary salt to differentiate unique spend permissions with otherwise identical data.
5568        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5569        pub salt: ::std::option::Option<::std::string::String>,
5570        ///Entity that can spend account's tokens. Can be either a Smart Account or an EOA.
5571        pub spender: CreateSpendPermissionRequestSpender,
5572        ///The start time for this spend permission, in Unix seconds.
5573        pub start: ::std::string::String,
5574        ///ERC-7528 native token address (e.g. "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" for native ETH), or an  ERC-20 contract address.
5575        pub token: CreateSpendPermissionRequestToken,
5576    }
5577    impl ::std::convert::From<&CreateSpendPermissionRequest> for CreateSpendPermissionRequest {
5578        fn from(value: &CreateSpendPermissionRequest) -> Self {
5579            value.clone()
5580        }
5581    }
5582    impl CreateSpendPermissionRequest {
5583        pub fn builder() -> builder::CreateSpendPermissionRequest {
5584            Default::default()
5585        }
5586    }
5587    ///Entity that can spend account's tokens. Can be either a Smart Account or an EOA.
5588    ///
5589    /// <details><summary>JSON schema</summary>
5590    ///
5591    /// ```json
5592    ///{
5593    ///  "description": "Entity that can spend account's tokens. Can be either a Smart Account or an EOA.",
5594    ///  "examples": [
5595    ///    "0x9Fb909eA400c2b8D99Be292DADf07e63B814527c"
5596    ///  ],
5597    ///  "type": "string",
5598    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
5599    ///}
5600    /// ```
5601    /// </details>
5602    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5603    #[serde(transparent)]
5604    pub struct CreateSpendPermissionRequestSpender(::std::string::String);
5605    impl ::std::ops::Deref for CreateSpendPermissionRequestSpender {
5606        type Target = ::std::string::String;
5607        fn deref(&self) -> &::std::string::String {
5608            &self.0
5609        }
5610    }
5611    impl ::std::convert::From<CreateSpendPermissionRequestSpender> for ::std::string::String {
5612        fn from(value: CreateSpendPermissionRequestSpender) -> Self {
5613            value.0
5614        }
5615    }
5616    impl ::std::convert::From<&CreateSpendPermissionRequestSpender>
5617        for CreateSpendPermissionRequestSpender
5618    {
5619        fn from(value: &CreateSpendPermissionRequestSpender) -> Self {
5620            value.clone()
5621        }
5622    }
5623    impl ::std::str::FromStr for CreateSpendPermissionRequestSpender {
5624        type Err = self::error::ConversionError;
5625        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5626            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
5627                ::std::sync::LazyLock::new(|| {
5628                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
5629                });
5630            if PATTERN.find(value).is_none() {
5631                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
5632            }
5633            Ok(Self(value.to_string()))
5634        }
5635    }
5636    impl ::std::convert::TryFrom<&str> for CreateSpendPermissionRequestSpender {
5637        type Error = self::error::ConversionError;
5638        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5639            value.parse()
5640        }
5641    }
5642    impl ::std::convert::TryFrom<&::std::string::String> for CreateSpendPermissionRequestSpender {
5643        type Error = self::error::ConversionError;
5644        fn try_from(
5645            value: &::std::string::String,
5646        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5647            value.parse()
5648        }
5649    }
5650    impl ::std::convert::TryFrom<::std::string::String> for CreateSpendPermissionRequestSpender {
5651        type Error = self::error::ConversionError;
5652        fn try_from(
5653            value: ::std::string::String,
5654        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5655            value.parse()
5656        }
5657    }
5658    impl<'de> ::serde::Deserialize<'de> for CreateSpendPermissionRequestSpender {
5659        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5660        where
5661            D: ::serde::Deserializer<'de>,
5662        {
5663            ::std::string::String::deserialize(deserializer)?
5664                .parse()
5665                .map_err(|e: self::error::ConversionError| {
5666                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5667                })
5668        }
5669    }
5670    ///ERC-7528 native token address (e.g. "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" for native ETH), or an  ERC-20 contract address.
5671    ///
5672    /// <details><summary>JSON schema</summary>
5673    ///
5674    /// ```json
5675    ///{
5676    ///  "description": "ERC-7528 native token address (e.g. \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\" for native ETH), or an  ERC-20 contract address.",
5677    ///  "examples": [
5678    ///    "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
5679    ///  ],
5680    ///  "type": "string",
5681    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
5682    ///}
5683    /// ```
5684    /// </details>
5685    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5686    #[serde(transparent)]
5687    pub struct CreateSpendPermissionRequestToken(::std::string::String);
5688    impl ::std::ops::Deref for CreateSpendPermissionRequestToken {
5689        type Target = ::std::string::String;
5690        fn deref(&self) -> &::std::string::String {
5691            &self.0
5692        }
5693    }
5694    impl ::std::convert::From<CreateSpendPermissionRequestToken> for ::std::string::String {
5695        fn from(value: CreateSpendPermissionRequestToken) -> Self {
5696            value.0
5697        }
5698    }
5699    impl ::std::convert::From<&CreateSpendPermissionRequestToken>
5700        for CreateSpendPermissionRequestToken
5701    {
5702        fn from(value: &CreateSpendPermissionRequestToken) -> Self {
5703            value.clone()
5704        }
5705    }
5706    impl ::std::str::FromStr for CreateSpendPermissionRequestToken {
5707        type Err = self::error::ConversionError;
5708        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5709            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
5710                ::std::sync::LazyLock::new(|| {
5711                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
5712                });
5713            if PATTERN.find(value).is_none() {
5714                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
5715            }
5716            Ok(Self(value.to_string()))
5717        }
5718    }
5719    impl ::std::convert::TryFrom<&str> for CreateSpendPermissionRequestToken {
5720        type Error = self::error::ConversionError;
5721        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5722            value.parse()
5723        }
5724    }
5725    impl ::std::convert::TryFrom<&::std::string::String> for CreateSpendPermissionRequestToken {
5726        type Error = self::error::ConversionError;
5727        fn try_from(
5728            value: &::std::string::String,
5729        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5730            value.parse()
5731        }
5732    }
5733    impl ::std::convert::TryFrom<::std::string::String> for CreateSpendPermissionRequestToken {
5734        type Error = self::error::ConversionError;
5735        fn try_from(
5736            value: ::std::string::String,
5737        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5738            value.parse()
5739        }
5740    }
5741    impl<'de> ::serde::Deserialize<'de> for CreateSpendPermissionRequestToken {
5742        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5743        where
5744            D: ::serde::Deserializer<'de>,
5745        {
5746            ::std::string::String::deserialize(deserializer)?
5747                .parse()
5748                .map_err(|e: self::error::ConversionError| {
5749                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5750                })
5751        }
5752    }
5753    ///`CreateSpendPermissionXIdempotencyKey`
5754    ///
5755    /// <details><summary>JSON schema</summary>
5756    ///
5757    /// ```json
5758    ///{
5759    ///  "type": "string",
5760    ///  "maxLength": 36,
5761    ///  "minLength": 36,
5762    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
5763    ///}
5764    /// ```
5765    /// </details>
5766    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5767    #[serde(transparent)]
5768    pub struct CreateSpendPermissionXIdempotencyKey(::std::string::String);
5769    impl ::std::ops::Deref for CreateSpendPermissionXIdempotencyKey {
5770        type Target = ::std::string::String;
5771        fn deref(&self) -> &::std::string::String {
5772            &self.0
5773        }
5774    }
5775    impl ::std::convert::From<CreateSpendPermissionXIdempotencyKey> for ::std::string::String {
5776        fn from(value: CreateSpendPermissionXIdempotencyKey) -> Self {
5777            value.0
5778        }
5779    }
5780    impl ::std::convert::From<&CreateSpendPermissionXIdempotencyKey>
5781        for CreateSpendPermissionXIdempotencyKey
5782    {
5783        fn from(value: &CreateSpendPermissionXIdempotencyKey) -> Self {
5784            value.clone()
5785        }
5786    }
5787    impl ::std::str::FromStr for CreateSpendPermissionXIdempotencyKey {
5788        type Err = self::error::ConversionError;
5789        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5790            if value.chars().count() > 36usize {
5791                return Err("longer than 36 characters".into());
5792            }
5793            if value.chars().count() < 36usize {
5794                return Err("shorter than 36 characters".into());
5795            }
5796            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
5797                ::std::sync::LazyLock::new(|| {
5798                    ::regress::Regex::new(
5799                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
5800                    )
5801                    .unwrap()
5802                });
5803            if PATTERN.find(value).is_none() {
5804                return Err(
5805                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
5806                        .into(),
5807                );
5808            }
5809            Ok(Self(value.to_string()))
5810        }
5811    }
5812    impl ::std::convert::TryFrom<&str> for CreateSpendPermissionXIdempotencyKey {
5813        type Error = self::error::ConversionError;
5814        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5815            value.parse()
5816        }
5817    }
5818    impl ::std::convert::TryFrom<&::std::string::String> for CreateSpendPermissionXIdempotencyKey {
5819        type Error = self::error::ConversionError;
5820        fn try_from(
5821            value: &::std::string::String,
5822        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5823            value.parse()
5824        }
5825    }
5826    impl ::std::convert::TryFrom<::std::string::String> for CreateSpendPermissionXIdempotencyKey {
5827        type Error = self::error::ConversionError;
5828        fn try_from(
5829            value: ::std::string::String,
5830        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5831            value.parse()
5832        }
5833    }
5834    impl<'de> ::serde::Deserialize<'de> for CreateSpendPermissionXIdempotencyKey {
5835        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5836        where
5837            D: ::serde::Deserializer<'de>,
5838        {
5839            ::std::string::String::deserialize(deserializer)?
5840                .parse()
5841                .map_err(|e: self::error::ConversionError| {
5842                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5843                })
5844        }
5845    }
5846    ///`CreateSwapQuoteResponse`
5847    ///
5848    /// <details><summary>JSON schema</summary>
5849    ///
5850    /// ```json
5851    ///{
5852    ///  "title": "CreateSwapQuoteResponse",
5853    ///  "allOf": [
5854    ///    {
5855    ///      "type": "object",
5856    ///      "required": [
5857    ///        "permit2",
5858    ///        "transaction"
5859    ///      ],
5860    ///      "properties": {
5861    ///        "permit2": {
5862    ///          "description": "The approval object which contains the necessary fields to submit an approval for this transaction. Null if the `fromToken` is the native token or the transaction is a native token wrap / unwrap.",
5863    ///          "type": [
5864    ///            "object",
5865    ///            "null"
5866    ///          ],
5867    ///          "required": [
5868    ///            "eip712",
5869    ///            "hash"
5870    ///          ],
5871    ///          "properties": {
5872    ///            "eip712": {
5873    ///              "$ref": "#/components/schemas/EIP712Message"
5874    ///            },
5875    ///            "hash": {
5876    ///              "description": "The hash for the approval according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712). Computing the hash of the `eip712` field should match the value of this field.",
5877    ///              "examples": [
5878    ///                "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
5879    ///              ],
5880    ///              "type": "string",
5881    ///              "pattern": "^0x[a-fA-F0-9]{64}$"
5882    ///            }
5883    ///          }
5884    ///        },
5885    ///        "transaction": {
5886    ///          "description": "The details of the transaction to be signed and submitted to execute the swap.",
5887    ///          "type": "object",
5888    ///          "required": [
5889    ///            "data",
5890    ///            "gas",
5891    ///            "gasPrice",
5892    ///            "to",
5893    ///            "value"
5894    ///          ],
5895    ///          "properties": {
5896    ///            "data": {
5897    ///              "description": "The hex-encoded call data to send to the contract.",
5898    ///              "examples": [
5899    ///                "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
5900    ///              ],
5901    ///              "type": "string"
5902    ///            },
5903    ///            "gas": {
5904    ///              "description": "The estimated gas limit that should be used to send the transaction to guarantee settlement.",
5905    ///              "examples": [
5906    ///                "100000"
5907    ///              ],
5908    ///              "type": "string",
5909    ///              "pattern": "^\\d+$"
5910    ///            },
5911    ///            "gasPrice": {
5912    ///              "description": "The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.",
5913    ///              "examples": [
5914    ///                "1000000000"
5915    ///              ],
5916    ///              "type": "string",
5917    ///              "pattern": "^\\d+$"
5918    ///            },
5919    ///            "to": {
5920    ///              "description": "The 0x-prefixed address of the contract to call.",
5921    ///              "examples": [
5922    ///                "0x000000000022D473030F116dDEE9F6B43aC78BA3"
5923    ///              ],
5924    ///              "type": "string",
5925    ///              "pattern": "^0x[a-fA-F0-9]{40}$"
5926    ///            },
5927    ///            "value": {
5928    ///              "description": "The value of the transaction in Wei.",
5929    ///              "examples": [
5930    ///                "1000000000000000000"
5931    ///              ],
5932    ///              "type": "string",
5933    ///              "pattern": "^\\d+$"
5934    ///            }
5935    ///          }
5936    ///        }
5937    ///      }
5938    ///    },
5939    ///    {
5940    ///      "$ref": "#/components/schemas/CommonSwapResponse"
5941    ///    }
5942    ///  ]
5943    ///}
5944    /// ```
5945    /// </details>
5946    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5947    pub struct CreateSwapQuoteResponse {
5948        ///The block number at which the liquidity conditions were examined.
5949        #[serde(rename = "blockNumber")]
5950        pub block_number: CreateSwapQuoteResponseBlockNumber,
5951        pub fees: CreateSwapQuoteResponseFees,
5952        ///The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
5953        #[serde(rename = "fromAmount")]
5954        pub from_amount: CreateSwapQuoteResponseFromAmount,
5955        ///The 0x-prefixed contract address of the token that will be sent.
5956        #[serde(rename = "fromToken")]
5957        pub from_token: CreateSwapQuoteResponseFromToken,
5958        pub issues: CreateSwapQuoteResponseIssues,
5959        ///Whether sufficient liquidity is available to settle the swap. All other fields in the response will be empty if this is false.
5960        #[serde(rename = "liquidityAvailable")]
5961        pub liquidity_available: bool,
5962        ///The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.
5963        #[serde(rename = "minToAmount")]
5964        pub min_to_amount: CreateSwapQuoteResponseMinToAmount,
5965        ///The approval object which contains the necessary fields to submit an approval for this transaction. Null if the `fromToken` is the native token or the transaction is a native token wrap / unwrap.
5966        pub permit2: ::std::option::Option<CreateSwapQuoteResponsePermit2>,
5967        ///The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.
5968        #[serde(rename = "toAmount")]
5969        pub to_amount: CreateSwapQuoteResponseToAmount,
5970        ///The 0x-prefixed contract address of the token that will be received.
5971        #[serde(rename = "toToken")]
5972        pub to_token: CreateSwapQuoteResponseToToken,
5973        pub transaction: CreateSwapQuoteResponseTransaction,
5974    }
5975    impl ::std::convert::From<&CreateSwapQuoteResponse> for CreateSwapQuoteResponse {
5976        fn from(value: &CreateSwapQuoteResponse) -> Self {
5977            value.clone()
5978        }
5979    }
5980    impl CreateSwapQuoteResponse {
5981        pub fn builder() -> builder::CreateSwapQuoteResponse {
5982            Default::default()
5983        }
5984    }
5985    ///The block number at which the liquidity conditions were examined.
5986    ///
5987    /// <details><summary>JSON schema</summary>
5988    ///
5989    /// ```json
5990    ///{
5991    ///  "description": "The block number at which the liquidity conditions were examined.",
5992    ///  "examples": [
5993    ///    "17038723"
5994    ///  ],
5995    ///  "type": "string",
5996    ///  "pattern": "^[1-9]\\d*$"
5997    ///}
5998    /// ```
5999    /// </details>
6000    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6001    #[serde(transparent)]
6002    pub struct CreateSwapQuoteResponseBlockNumber(::std::string::String);
6003    impl ::std::ops::Deref for CreateSwapQuoteResponseBlockNumber {
6004        type Target = ::std::string::String;
6005        fn deref(&self) -> &::std::string::String {
6006            &self.0
6007        }
6008    }
6009    impl ::std::convert::From<CreateSwapQuoteResponseBlockNumber> for ::std::string::String {
6010        fn from(value: CreateSwapQuoteResponseBlockNumber) -> Self {
6011            value.0
6012        }
6013    }
6014    impl ::std::convert::From<&CreateSwapQuoteResponseBlockNumber>
6015        for CreateSwapQuoteResponseBlockNumber
6016    {
6017        fn from(value: &CreateSwapQuoteResponseBlockNumber) -> Self {
6018            value.clone()
6019        }
6020    }
6021    impl ::std::str::FromStr for CreateSwapQuoteResponseBlockNumber {
6022        type Err = self::error::ConversionError;
6023        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6024            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
6025                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[1-9]\\d*$").unwrap());
6026            if PATTERN.find(value).is_none() {
6027                return Err("doesn't match pattern \"^[1-9]\\d*$\"".into());
6028            }
6029            Ok(Self(value.to_string()))
6030        }
6031    }
6032    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseBlockNumber {
6033        type Error = self::error::ConversionError;
6034        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6035            value.parse()
6036        }
6037    }
6038    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseBlockNumber {
6039        type Error = self::error::ConversionError;
6040        fn try_from(
6041            value: &::std::string::String,
6042        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6043            value.parse()
6044        }
6045    }
6046    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseBlockNumber {
6047        type Error = self::error::ConversionError;
6048        fn try_from(
6049            value: ::std::string::String,
6050        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6051            value.parse()
6052        }
6053    }
6054    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseBlockNumber {
6055        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6056        where
6057            D: ::serde::Deserializer<'de>,
6058        {
6059            ::std::string::String::deserialize(deserializer)?
6060                .parse()
6061                .map_err(|e: self::error::ConversionError| {
6062                    <D::Error as ::serde::de::Error>::custom(e.to_string())
6063                })
6064        }
6065    }
6066    ///The estimated fees for the swap.
6067    ///
6068    /// <details><summary>JSON schema</summary>
6069    ///
6070    /// ```json
6071    ///{
6072    ///  "description": "The estimated fees for the swap.",
6073    ///  "examples": [
6074    ///    {
6075    ///      "gasFee": {
6076    ///        "amount": "1000000000000000000",
6077    ///        "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
6078    ///      },
6079    ///      "protocolFee": {
6080    ///        "amount": "1000000000000000000",
6081    ///        "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
6082    ///      }
6083    ///    }
6084    ///  ],
6085    ///  "type": "object",
6086    ///  "required": [
6087    ///    "gasFee",
6088    ///    "protocolFee"
6089    ///  ],
6090    ///  "properties": {
6091    ///    "gasFee": {
6092    ///      "description": "The estimated gas fee for the swap.",
6093    ///      "type": [
6094    ///        "object",
6095    ///        "null"
6096    ///      ],
6097    ///      "allOf": [
6098    ///        {
6099    ///          "$ref": "#/components/schemas/TokenFee"
6100    ///        }
6101    ///      ]
6102    ///    },
6103    ///    "protocolFee": {
6104    ///      "description": "The estimated protocol fee for the swap.",
6105    ///      "type": [
6106    ///        "object",
6107    ///        "null"
6108    ///      ],
6109    ///      "allOf": [
6110    ///        {
6111    ///          "$ref": "#/components/schemas/TokenFee"
6112    ///        }
6113    ///      ]
6114    ///    }
6115    ///  }
6116    ///}
6117    /// ```
6118    /// </details>
6119    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6120    pub struct CreateSwapQuoteResponseFees {
6121        ///The estimated gas fee for the swap.
6122        #[serde(rename = "gasFee")]
6123        pub gas_fee: ::std::option::Option<TokenFee>,
6124        ///The estimated protocol fee for the swap.
6125        #[serde(rename = "protocolFee")]
6126        pub protocol_fee: ::std::option::Option<TokenFee>,
6127    }
6128    impl ::std::convert::From<&CreateSwapQuoteResponseFees> for CreateSwapQuoteResponseFees {
6129        fn from(value: &CreateSwapQuoteResponseFees) -> Self {
6130            value.clone()
6131        }
6132    }
6133    impl CreateSwapQuoteResponseFees {
6134        pub fn builder() -> builder::CreateSwapQuoteResponseFees {
6135            Default::default()
6136        }
6137    }
6138    ///The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
6139    ///
6140    /// <details><summary>JSON schema</summary>
6141    ///
6142    /// ```json
6143    ///{
6144    ///  "description": "The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.",
6145    ///  "examples": [
6146    ///    "1000000000000000000"
6147    ///  ],
6148    ///  "type": "string",
6149    ///  "pattern": "^(0|[1-9]\\d*)$"
6150    ///}
6151    /// ```
6152    /// </details>
6153    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6154    #[serde(transparent)]
6155    pub struct CreateSwapQuoteResponseFromAmount(::std::string::String);
6156    impl ::std::ops::Deref for CreateSwapQuoteResponseFromAmount {
6157        type Target = ::std::string::String;
6158        fn deref(&self) -> &::std::string::String {
6159            &self.0
6160        }
6161    }
6162    impl ::std::convert::From<CreateSwapQuoteResponseFromAmount> for ::std::string::String {
6163        fn from(value: CreateSwapQuoteResponseFromAmount) -> Self {
6164            value.0
6165        }
6166    }
6167    impl ::std::convert::From<&CreateSwapQuoteResponseFromAmount>
6168        for CreateSwapQuoteResponseFromAmount
6169    {
6170        fn from(value: &CreateSwapQuoteResponseFromAmount) -> Self {
6171            value.clone()
6172        }
6173    }
6174    impl ::std::str::FromStr for CreateSwapQuoteResponseFromAmount {
6175        type Err = self::error::ConversionError;
6176        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6177            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
6178                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
6179            if PATTERN.find(value).is_none() {
6180                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
6181            }
6182            Ok(Self(value.to_string()))
6183        }
6184    }
6185    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseFromAmount {
6186        type Error = self::error::ConversionError;
6187        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6188            value.parse()
6189        }
6190    }
6191    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseFromAmount {
6192        type Error = self::error::ConversionError;
6193        fn try_from(
6194            value: &::std::string::String,
6195        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6196            value.parse()
6197        }
6198    }
6199    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseFromAmount {
6200        type Error = self::error::ConversionError;
6201        fn try_from(
6202            value: ::std::string::String,
6203        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6204            value.parse()
6205        }
6206    }
6207    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseFromAmount {
6208        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6209        where
6210            D: ::serde::Deserializer<'de>,
6211        {
6212            ::std::string::String::deserialize(deserializer)?
6213                .parse()
6214                .map_err(|e: self::error::ConversionError| {
6215                    <D::Error as ::serde::de::Error>::custom(e.to_string())
6216                })
6217        }
6218    }
6219    ///The 0x-prefixed contract address of the token that will be sent.
6220    ///
6221    /// <details><summary>JSON schema</summary>
6222    ///
6223    /// ```json
6224    ///{
6225    ///  "description": "The 0x-prefixed contract address of the token that will be sent.",
6226    ///  "examples": [
6227    ///    "0x6B175474E89094C44Da98b954EedeAC495271d0F"
6228    ///  ],
6229    ///  "type": "string",
6230    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
6231    ///}
6232    /// ```
6233    /// </details>
6234    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6235    #[serde(transparent)]
6236    pub struct CreateSwapQuoteResponseFromToken(::std::string::String);
6237    impl ::std::ops::Deref for CreateSwapQuoteResponseFromToken {
6238        type Target = ::std::string::String;
6239        fn deref(&self) -> &::std::string::String {
6240            &self.0
6241        }
6242    }
6243    impl ::std::convert::From<CreateSwapQuoteResponseFromToken> for ::std::string::String {
6244        fn from(value: CreateSwapQuoteResponseFromToken) -> Self {
6245            value.0
6246        }
6247    }
6248    impl ::std::convert::From<&CreateSwapQuoteResponseFromToken> for CreateSwapQuoteResponseFromToken {
6249        fn from(value: &CreateSwapQuoteResponseFromToken) -> Self {
6250            value.clone()
6251        }
6252    }
6253    impl ::std::str::FromStr for CreateSwapQuoteResponseFromToken {
6254        type Err = self::error::ConversionError;
6255        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6256            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
6257                ::std::sync::LazyLock::new(|| {
6258                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
6259                });
6260            if PATTERN.find(value).is_none() {
6261                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
6262            }
6263            Ok(Self(value.to_string()))
6264        }
6265    }
6266    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseFromToken {
6267        type Error = self::error::ConversionError;
6268        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6269            value.parse()
6270        }
6271    }
6272    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseFromToken {
6273        type Error = self::error::ConversionError;
6274        fn try_from(
6275            value: &::std::string::String,
6276        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6277            value.parse()
6278        }
6279    }
6280    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseFromToken {
6281        type Error = self::error::ConversionError;
6282        fn try_from(
6283            value: ::std::string::String,
6284        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6285            value.parse()
6286        }
6287    }
6288    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseFromToken {
6289        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6290        where
6291            D: ::serde::Deserializer<'de>,
6292        {
6293            ::std::string::String::deserialize(deserializer)?
6294                .parse()
6295                .map_err(|e: self::error::ConversionError| {
6296                    <D::Error as ::serde::de::Error>::custom(e.to_string())
6297                })
6298        }
6299    }
6300    ///An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.
6301    ///
6302    /// <details><summary>JSON schema</summary>
6303    ///
6304    /// ```json
6305    ///{
6306    ///  "description": "An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.",
6307    ///  "examples": [
6308    ///    {
6309    ///      "allowance": {
6310    ///        "currentAllowance": "1000000000",
6311    ///        "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
6312    ///      },
6313    ///      "balance": {
6314    ///        "currentBalance": "900000000000000000",
6315    ///        "requiredBalance": "1000000000000000000",
6316    ///        "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
6317    ///      },
6318    ///      "simulationIncomplete": false
6319    ///    }
6320    ///  ],
6321    ///  "type": "object",
6322    ///  "required": [
6323    ///    "allowance",
6324    ///    "balance",
6325    ///    "simulationIncomplete"
6326    ///  ],
6327    ///  "properties": {
6328    ///    "allowance": {
6329    ///      "description": "Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.",
6330    ///      "examples": [
6331    ///        {
6332    ///          "currentAllowance": "1000000000",
6333    ///          "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
6334    ///        }
6335    ///      ],
6336    ///      "type": [
6337    ///        "object",
6338    ///        "null"
6339    ///      ],
6340    ///      "required": [
6341    ///        "currentAllowance",
6342    ///        "spender"
6343    ///      ],
6344    ///      "properties": {
6345    ///        "currentAllowance": {
6346    ///          "description": "The current allowance of the `fromToken` by the `taker`.",
6347    ///          "examples": [
6348    ///            "1000000000"
6349    ///          ],
6350    ///          "type": "string",
6351    ///          "pattern": "^\\d+$"
6352    ///        },
6353    ///        "spender": {
6354    ///          "description": "The 0x-prefixed address of to set the allowance on.",
6355    ///          "examples": [
6356    ///            "0x000000000022D473030F116dDEE9F6B43aC78BA3"
6357    ///          ],
6358    ///          "type": "string",
6359    ///          "pattern": "^0x[a-fA-F0-9]{40}$"
6360    ///        }
6361    ///      }
6362    ///    },
6363    ///    "balance": {
6364    ///      "description": "Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.",
6365    ///      "examples": [
6366    ///        {
6367    ///          "currentBalance": "1000000000000000000",
6368    ///          "requiredBalance": "1000000000000000000",
6369    ///          "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
6370    ///        }
6371    ///      ],
6372    ///      "type": [
6373    ///        "object",
6374    ///        "null"
6375    ///      ],
6376    ///      "required": [
6377    ///        "currentBalance",
6378    ///        "requiredBalance",
6379    ///        "token"
6380    ///      ],
6381    ///      "properties": {
6382    ///        "currentBalance": {
6383    ///          "description": "The current balance of the `fromToken` by the `taker`.",
6384    ///          "examples": [
6385    ///            "10000000"
6386    ///          ],
6387    ///          "type": "string",
6388    ///          "pattern": "^\\d+$"
6389    ///        },
6390    ///        "requiredBalance": {
6391    ///          "description": "The amount of the token that the `taker` must hold.",
6392    ///          "examples": [
6393    ///            "1000000000000000000"
6394    ///          ],
6395    ///          "type": "string",
6396    ///          "pattern": "^\\d+$"
6397    ///        },
6398    ///        "token": {
6399    ///          "description": "The 0x-prefixed contract address of the token.",
6400    ///          "type": "string",
6401    ///          "pattern": "^0x[a-fA-F0-9]{40}$"
6402    ///        }
6403    ///      }
6404    ///    },
6405    ///    "simulationIncomplete": {
6406    ///      "description": "This is set to true when the transaction cannot be validated. This can happen when the taker has an insufficient balance of the `fromToken`. Note that this does not necessarily mean that the trade will revert.",
6407    ///      "examples": [
6408    ///        false
6409    ///      ],
6410    ///      "type": "boolean"
6411    ///    }
6412    ///  }
6413    ///}
6414    /// ```
6415    /// </details>
6416    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6417    pub struct CreateSwapQuoteResponseIssues {
6418        ///Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.
6419        pub allowance: ::std::option::Option<CreateSwapQuoteResponseIssuesAllowance>,
6420        ///Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.
6421        pub balance: ::std::option::Option<CreateSwapQuoteResponseIssuesBalance>,
6422        ///This is set to true when the transaction cannot be validated. This can happen when the taker has an insufficient balance of the `fromToken`. Note that this does not necessarily mean that the trade will revert.
6423        #[serde(rename = "simulationIncomplete")]
6424        pub simulation_incomplete: bool,
6425    }
6426    impl ::std::convert::From<&CreateSwapQuoteResponseIssues> for CreateSwapQuoteResponseIssues {
6427        fn from(value: &CreateSwapQuoteResponseIssues) -> Self {
6428            value.clone()
6429        }
6430    }
6431    impl CreateSwapQuoteResponseIssues {
6432        pub fn builder() -> builder::CreateSwapQuoteResponseIssues {
6433            Default::default()
6434        }
6435    }
6436    ///Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.
6437    ///
6438    /// <details><summary>JSON schema</summary>
6439    ///
6440    /// ```json
6441    ///{
6442    ///  "description": "Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.",
6443    ///  "examples": [
6444    ///    {
6445    ///      "currentAllowance": "1000000000",
6446    ///      "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
6447    ///    }
6448    ///  ],
6449    ///  "type": "object",
6450    ///  "required": [
6451    ///    "currentAllowance",
6452    ///    "spender"
6453    ///  ],
6454    ///  "properties": {
6455    ///    "currentAllowance": {
6456    ///      "description": "The current allowance of the `fromToken` by the `taker`.",
6457    ///      "examples": [
6458    ///        "1000000000"
6459    ///      ],
6460    ///      "type": "string",
6461    ///      "pattern": "^\\d+$"
6462    ///    },
6463    ///    "spender": {
6464    ///      "description": "The 0x-prefixed address of to set the allowance on.",
6465    ///      "examples": [
6466    ///        "0x000000000022D473030F116dDEE9F6B43aC78BA3"
6467    ///      ],
6468    ///      "type": "string",
6469    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
6470    ///    }
6471    ///  }
6472    ///}
6473    /// ```
6474    /// </details>
6475    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6476    pub struct CreateSwapQuoteResponseIssuesAllowance {
6477        ///The current allowance of the `fromToken` by the `taker`.
6478        #[serde(rename = "currentAllowance")]
6479        pub current_allowance: CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance,
6480        ///The 0x-prefixed address of to set the allowance on.
6481        pub spender: CreateSwapQuoteResponseIssuesAllowanceSpender,
6482    }
6483    impl ::std::convert::From<&CreateSwapQuoteResponseIssuesAllowance>
6484        for CreateSwapQuoteResponseIssuesAllowance
6485    {
6486        fn from(value: &CreateSwapQuoteResponseIssuesAllowance) -> Self {
6487            value.clone()
6488        }
6489    }
6490    impl CreateSwapQuoteResponseIssuesAllowance {
6491        pub fn builder() -> builder::CreateSwapQuoteResponseIssuesAllowance {
6492            Default::default()
6493        }
6494    }
6495    ///The current allowance of the `fromToken` by the `taker`.
6496    ///
6497    /// <details><summary>JSON schema</summary>
6498    ///
6499    /// ```json
6500    ///{
6501    ///  "description": "The current allowance of the `fromToken` by the `taker`.",
6502    ///  "examples": [
6503    ///    "1000000000"
6504    ///  ],
6505    ///  "type": "string",
6506    ///  "pattern": "^\\d+$"
6507    ///}
6508    /// ```
6509    /// </details>
6510    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6511    #[serde(transparent)]
6512    pub struct CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance(::std::string::String);
6513    impl ::std::ops::Deref for CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance {
6514        type Target = ::std::string::String;
6515        fn deref(&self) -> &::std::string::String {
6516            &self.0
6517        }
6518    }
6519    impl ::std::convert::From<CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance>
6520        for ::std::string::String
6521    {
6522        fn from(value: CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance) -> Self {
6523            value.0
6524        }
6525    }
6526    impl ::std::convert::From<&CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance>
6527        for CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance
6528    {
6529        fn from(value: &CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance) -> Self {
6530            value.clone()
6531        }
6532    }
6533    impl ::std::str::FromStr for CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance {
6534        type Err = self::error::ConversionError;
6535        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6536            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
6537                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
6538            if PATTERN.find(value).is_none() {
6539                return Err("doesn't match pattern \"^\\d+$\"".into());
6540            }
6541            Ok(Self(value.to_string()))
6542        }
6543    }
6544    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance {
6545        type Error = self::error::ConversionError;
6546        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6547            value.parse()
6548        }
6549    }
6550    impl ::std::convert::TryFrom<&::std::string::String>
6551        for CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance
6552    {
6553        type Error = self::error::ConversionError;
6554        fn try_from(
6555            value: &::std::string::String,
6556        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6557            value.parse()
6558        }
6559    }
6560    impl ::std::convert::TryFrom<::std::string::String>
6561        for CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance
6562    {
6563        type Error = self::error::ConversionError;
6564        fn try_from(
6565            value: ::std::string::String,
6566        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6567            value.parse()
6568        }
6569    }
6570    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance {
6571        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6572        where
6573            D: ::serde::Deserializer<'de>,
6574        {
6575            ::std::string::String::deserialize(deserializer)?
6576                .parse()
6577                .map_err(|e: self::error::ConversionError| {
6578                    <D::Error as ::serde::de::Error>::custom(e.to_string())
6579                })
6580        }
6581    }
6582    ///The 0x-prefixed address of to set the allowance on.
6583    ///
6584    /// <details><summary>JSON schema</summary>
6585    ///
6586    /// ```json
6587    ///{
6588    ///  "description": "The 0x-prefixed address of to set the allowance on.",
6589    ///  "examples": [
6590    ///    "0x000000000022D473030F116dDEE9F6B43aC78BA3"
6591    ///  ],
6592    ///  "type": "string",
6593    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
6594    ///}
6595    /// ```
6596    /// </details>
6597    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6598    #[serde(transparent)]
6599    pub struct CreateSwapQuoteResponseIssuesAllowanceSpender(::std::string::String);
6600    impl ::std::ops::Deref for CreateSwapQuoteResponseIssuesAllowanceSpender {
6601        type Target = ::std::string::String;
6602        fn deref(&self) -> &::std::string::String {
6603            &self.0
6604        }
6605    }
6606    impl ::std::convert::From<CreateSwapQuoteResponseIssuesAllowanceSpender> for ::std::string::String {
6607        fn from(value: CreateSwapQuoteResponseIssuesAllowanceSpender) -> Self {
6608            value.0
6609        }
6610    }
6611    impl ::std::convert::From<&CreateSwapQuoteResponseIssuesAllowanceSpender>
6612        for CreateSwapQuoteResponseIssuesAllowanceSpender
6613    {
6614        fn from(value: &CreateSwapQuoteResponseIssuesAllowanceSpender) -> Self {
6615            value.clone()
6616        }
6617    }
6618    impl ::std::str::FromStr for CreateSwapQuoteResponseIssuesAllowanceSpender {
6619        type Err = self::error::ConversionError;
6620        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6621            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
6622                ::std::sync::LazyLock::new(|| {
6623                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
6624                });
6625            if PATTERN.find(value).is_none() {
6626                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
6627            }
6628            Ok(Self(value.to_string()))
6629        }
6630    }
6631    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseIssuesAllowanceSpender {
6632        type Error = self::error::ConversionError;
6633        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6634            value.parse()
6635        }
6636    }
6637    impl ::std::convert::TryFrom<&::std::string::String>
6638        for CreateSwapQuoteResponseIssuesAllowanceSpender
6639    {
6640        type Error = self::error::ConversionError;
6641        fn try_from(
6642            value: &::std::string::String,
6643        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6644            value.parse()
6645        }
6646    }
6647    impl ::std::convert::TryFrom<::std::string::String>
6648        for CreateSwapQuoteResponseIssuesAllowanceSpender
6649    {
6650        type Error = self::error::ConversionError;
6651        fn try_from(
6652            value: ::std::string::String,
6653        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6654            value.parse()
6655        }
6656    }
6657    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseIssuesAllowanceSpender {
6658        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6659        where
6660            D: ::serde::Deserializer<'de>,
6661        {
6662            ::std::string::String::deserialize(deserializer)?
6663                .parse()
6664                .map_err(|e: self::error::ConversionError| {
6665                    <D::Error as ::serde::de::Error>::custom(e.to_string())
6666                })
6667        }
6668    }
6669    ///Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.
6670    ///
6671    /// <details><summary>JSON schema</summary>
6672    ///
6673    /// ```json
6674    ///{
6675    ///  "description": "Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.",
6676    ///  "examples": [
6677    ///    {
6678    ///      "currentBalance": "1000000000000000000",
6679    ///      "requiredBalance": "1000000000000000000",
6680    ///      "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
6681    ///    }
6682    ///  ],
6683    ///  "type": "object",
6684    ///  "required": [
6685    ///    "currentBalance",
6686    ///    "requiredBalance",
6687    ///    "token"
6688    ///  ],
6689    ///  "properties": {
6690    ///    "currentBalance": {
6691    ///      "description": "The current balance of the `fromToken` by the `taker`.",
6692    ///      "examples": [
6693    ///        "10000000"
6694    ///      ],
6695    ///      "type": "string",
6696    ///      "pattern": "^\\d+$"
6697    ///    },
6698    ///    "requiredBalance": {
6699    ///      "description": "The amount of the token that the `taker` must hold.",
6700    ///      "examples": [
6701    ///        "1000000000000000000"
6702    ///      ],
6703    ///      "type": "string",
6704    ///      "pattern": "^\\d+$"
6705    ///    },
6706    ///    "token": {
6707    ///      "description": "The 0x-prefixed contract address of the token.",
6708    ///      "type": "string",
6709    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
6710    ///    }
6711    ///  }
6712    ///}
6713    /// ```
6714    /// </details>
6715    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6716    pub struct CreateSwapQuoteResponseIssuesBalance {
6717        ///The current balance of the `fromToken` by the `taker`.
6718        #[serde(rename = "currentBalance")]
6719        pub current_balance: CreateSwapQuoteResponseIssuesBalanceCurrentBalance,
6720        ///The amount of the token that the `taker` must hold.
6721        #[serde(rename = "requiredBalance")]
6722        pub required_balance: CreateSwapQuoteResponseIssuesBalanceRequiredBalance,
6723        ///The 0x-prefixed contract address of the token.
6724        pub token: CreateSwapQuoteResponseIssuesBalanceToken,
6725    }
6726    impl ::std::convert::From<&CreateSwapQuoteResponseIssuesBalance>
6727        for CreateSwapQuoteResponseIssuesBalance
6728    {
6729        fn from(value: &CreateSwapQuoteResponseIssuesBalance) -> Self {
6730            value.clone()
6731        }
6732    }
6733    impl CreateSwapQuoteResponseIssuesBalance {
6734        pub fn builder() -> builder::CreateSwapQuoteResponseIssuesBalance {
6735            Default::default()
6736        }
6737    }
6738    ///The current balance of the `fromToken` by the `taker`.
6739    ///
6740    /// <details><summary>JSON schema</summary>
6741    ///
6742    /// ```json
6743    ///{
6744    ///  "description": "The current balance of the `fromToken` by the `taker`.",
6745    ///  "examples": [
6746    ///    "10000000"
6747    ///  ],
6748    ///  "type": "string",
6749    ///  "pattern": "^\\d+$"
6750    ///}
6751    /// ```
6752    /// </details>
6753    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6754    #[serde(transparent)]
6755    pub struct CreateSwapQuoteResponseIssuesBalanceCurrentBalance(::std::string::String);
6756    impl ::std::ops::Deref for CreateSwapQuoteResponseIssuesBalanceCurrentBalance {
6757        type Target = ::std::string::String;
6758        fn deref(&self) -> &::std::string::String {
6759            &self.0
6760        }
6761    }
6762    impl ::std::convert::From<CreateSwapQuoteResponseIssuesBalanceCurrentBalance>
6763        for ::std::string::String
6764    {
6765        fn from(value: CreateSwapQuoteResponseIssuesBalanceCurrentBalance) -> Self {
6766            value.0
6767        }
6768    }
6769    impl ::std::convert::From<&CreateSwapQuoteResponseIssuesBalanceCurrentBalance>
6770        for CreateSwapQuoteResponseIssuesBalanceCurrentBalance
6771    {
6772        fn from(value: &CreateSwapQuoteResponseIssuesBalanceCurrentBalance) -> Self {
6773            value.clone()
6774        }
6775    }
6776    impl ::std::str::FromStr for CreateSwapQuoteResponseIssuesBalanceCurrentBalance {
6777        type Err = self::error::ConversionError;
6778        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6779            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
6780                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
6781            if PATTERN.find(value).is_none() {
6782                return Err("doesn't match pattern \"^\\d+$\"".into());
6783            }
6784            Ok(Self(value.to_string()))
6785        }
6786    }
6787    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseIssuesBalanceCurrentBalance {
6788        type Error = self::error::ConversionError;
6789        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6790            value.parse()
6791        }
6792    }
6793    impl ::std::convert::TryFrom<&::std::string::String>
6794        for CreateSwapQuoteResponseIssuesBalanceCurrentBalance
6795    {
6796        type Error = self::error::ConversionError;
6797        fn try_from(
6798            value: &::std::string::String,
6799        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6800            value.parse()
6801        }
6802    }
6803    impl ::std::convert::TryFrom<::std::string::String>
6804        for CreateSwapQuoteResponseIssuesBalanceCurrentBalance
6805    {
6806        type Error = self::error::ConversionError;
6807        fn try_from(
6808            value: ::std::string::String,
6809        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6810            value.parse()
6811        }
6812    }
6813    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseIssuesBalanceCurrentBalance {
6814        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6815        where
6816            D: ::serde::Deserializer<'de>,
6817        {
6818            ::std::string::String::deserialize(deserializer)?
6819                .parse()
6820                .map_err(|e: self::error::ConversionError| {
6821                    <D::Error as ::serde::de::Error>::custom(e.to_string())
6822                })
6823        }
6824    }
6825    ///The amount of the token that the `taker` must hold.
6826    ///
6827    /// <details><summary>JSON schema</summary>
6828    ///
6829    /// ```json
6830    ///{
6831    ///  "description": "The amount of the token that the `taker` must hold.",
6832    ///  "examples": [
6833    ///    "1000000000000000000"
6834    ///  ],
6835    ///  "type": "string",
6836    ///  "pattern": "^\\d+$"
6837    ///}
6838    /// ```
6839    /// </details>
6840    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6841    #[serde(transparent)]
6842    pub struct CreateSwapQuoteResponseIssuesBalanceRequiredBalance(::std::string::String);
6843    impl ::std::ops::Deref for CreateSwapQuoteResponseIssuesBalanceRequiredBalance {
6844        type Target = ::std::string::String;
6845        fn deref(&self) -> &::std::string::String {
6846            &self.0
6847        }
6848    }
6849    impl ::std::convert::From<CreateSwapQuoteResponseIssuesBalanceRequiredBalance>
6850        for ::std::string::String
6851    {
6852        fn from(value: CreateSwapQuoteResponseIssuesBalanceRequiredBalance) -> Self {
6853            value.0
6854        }
6855    }
6856    impl ::std::convert::From<&CreateSwapQuoteResponseIssuesBalanceRequiredBalance>
6857        for CreateSwapQuoteResponseIssuesBalanceRequiredBalance
6858    {
6859        fn from(value: &CreateSwapQuoteResponseIssuesBalanceRequiredBalance) -> Self {
6860            value.clone()
6861        }
6862    }
6863    impl ::std::str::FromStr for CreateSwapQuoteResponseIssuesBalanceRequiredBalance {
6864        type Err = self::error::ConversionError;
6865        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6866            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
6867                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
6868            if PATTERN.find(value).is_none() {
6869                return Err("doesn't match pattern \"^\\d+$\"".into());
6870            }
6871            Ok(Self(value.to_string()))
6872        }
6873    }
6874    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseIssuesBalanceRequiredBalance {
6875        type Error = self::error::ConversionError;
6876        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6877            value.parse()
6878        }
6879    }
6880    impl ::std::convert::TryFrom<&::std::string::String>
6881        for CreateSwapQuoteResponseIssuesBalanceRequiredBalance
6882    {
6883        type Error = self::error::ConversionError;
6884        fn try_from(
6885            value: &::std::string::String,
6886        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6887            value.parse()
6888        }
6889    }
6890    impl ::std::convert::TryFrom<::std::string::String>
6891        for CreateSwapQuoteResponseIssuesBalanceRequiredBalance
6892    {
6893        type Error = self::error::ConversionError;
6894        fn try_from(
6895            value: ::std::string::String,
6896        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6897            value.parse()
6898        }
6899    }
6900    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseIssuesBalanceRequiredBalance {
6901        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6902        where
6903            D: ::serde::Deserializer<'de>,
6904        {
6905            ::std::string::String::deserialize(deserializer)?
6906                .parse()
6907                .map_err(|e: self::error::ConversionError| {
6908                    <D::Error as ::serde::de::Error>::custom(e.to_string())
6909                })
6910        }
6911    }
6912    ///The 0x-prefixed contract address of the token.
6913    ///
6914    /// <details><summary>JSON schema</summary>
6915    ///
6916    /// ```json
6917    ///{
6918    ///  "description": "The 0x-prefixed contract address of the token.",
6919    ///  "type": "string",
6920    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
6921    ///}
6922    /// ```
6923    /// </details>
6924    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
6925    #[serde(transparent)]
6926    pub struct CreateSwapQuoteResponseIssuesBalanceToken(::std::string::String);
6927    impl ::std::ops::Deref for CreateSwapQuoteResponseIssuesBalanceToken {
6928        type Target = ::std::string::String;
6929        fn deref(&self) -> &::std::string::String {
6930            &self.0
6931        }
6932    }
6933    impl ::std::convert::From<CreateSwapQuoteResponseIssuesBalanceToken> for ::std::string::String {
6934        fn from(value: CreateSwapQuoteResponseIssuesBalanceToken) -> Self {
6935            value.0
6936        }
6937    }
6938    impl ::std::convert::From<&CreateSwapQuoteResponseIssuesBalanceToken>
6939        for CreateSwapQuoteResponseIssuesBalanceToken
6940    {
6941        fn from(value: &CreateSwapQuoteResponseIssuesBalanceToken) -> Self {
6942            value.clone()
6943        }
6944    }
6945    impl ::std::str::FromStr for CreateSwapQuoteResponseIssuesBalanceToken {
6946        type Err = self::error::ConversionError;
6947        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6948            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
6949                ::std::sync::LazyLock::new(|| {
6950                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
6951                });
6952            if PATTERN.find(value).is_none() {
6953                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
6954            }
6955            Ok(Self(value.to_string()))
6956        }
6957    }
6958    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseIssuesBalanceToken {
6959        type Error = self::error::ConversionError;
6960        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6961            value.parse()
6962        }
6963    }
6964    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseIssuesBalanceToken {
6965        type Error = self::error::ConversionError;
6966        fn try_from(
6967            value: &::std::string::String,
6968        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6969            value.parse()
6970        }
6971    }
6972    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseIssuesBalanceToken {
6973        type Error = self::error::ConversionError;
6974        fn try_from(
6975            value: ::std::string::String,
6976        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6977            value.parse()
6978        }
6979    }
6980    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseIssuesBalanceToken {
6981        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
6982        where
6983            D: ::serde::Deserializer<'de>,
6984        {
6985            ::std::string::String::deserialize(deserializer)?
6986                .parse()
6987                .map_err(|e: self::error::ConversionError| {
6988                    <D::Error as ::serde::de::Error>::custom(e.to_string())
6989                })
6990        }
6991    }
6992    ///The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.
6993    ///
6994    /// <details><summary>JSON schema</summary>
6995    ///
6996    /// ```json
6997    ///{
6998    ///  "description": "The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.",
6999    ///  "examples": [
7000    ///    "900000000000000000"
7001    ///  ],
7002    ///  "type": "string",
7003    ///  "pattern": "^(0|[1-9]\\d*)$"
7004    ///}
7005    /// ```
7006    /// </details>
7007    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7008    #[serde(transparent)]
7009    pub struct CreateSwapQuoteResponseMinToAmount(::std::string::String);
7010    impl ::std::ops::Deref for CreateSwapQuoteResponseMinToAmount {
7011        type Target = ::std::string::String;
7012        fn deref(&self) -> &::std::string::String {
7013            &self.0
7014        }
7015    }
7016    impl ::std::convert::From<CreateSwapQuoteResponseMinToAmount> for ::std::string::String {
7017        fn from(value: CreateSwapQuoteResponseMinToAmount) -> Self {
7018            value.0
7019        }
7020    }
7021    impl ::std::convert::From<&CreateSwapQuoteResponseMinToAmount>
7022        for CreateSwapQuoteResponseMinToAmount
7023    {
7024        fn from(value: &CreateSwapQuoteResponseMinToAmount) -> Self {
7025            value.clone()
7026        }
7027    }
7028    impl ::std::str::FromStr for CreateSwapQuoteResponseMinToAmount {
7029        type Err = self::error::ConversionError;
7030        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7031            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7032                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
7033            if PATTERN.find(value).is_none() {
7034                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
7035            }
7036            Ok(Self(value.to_string()))
7037        }
7038    }
7039    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseMinToAmount {
7040        type Error = self::error::ConversionError;
7041        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7042            value.parse()
7043        }
7044    }
7045    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseMinToAmount {
7046        type Error = self::error::ConversionError;
7047        fn try_from(
7048            value: &::std::string::String,
7049        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7050            value.parse()
7051        }
7052    }
7053    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseMinToAmount {
7054        type Error = self::error::ConversionError;
7055        fn try_from(
7056            value: ::std::string::String,
7057        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7058            value.parse()
7059        }
7060    }
7061    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseMinToAmount {
7062        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7063        where
7064            D: ::serde::Deserializer<'de>,
7065        {
7066            ::std::string::String::deserialize(deserializer)?
7067                .parse()
7068                .map_err(|e: self::error::ConversionError| {
7069                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7070                })
7071        }
7072    }
7073    ///The approval object which contains the necessary fields to submit an approval for this transaction. Null if the `fromToken` is the native token or the transaction is a native token wrap / unwrap.
7074    ///
7075    /// <details><summary>JSON schema</summary>
7076    ///
7077    /// ```json
7078    ///{
7079    ///  "description": "The approval object which contains the necessary fields to submit an approval for this transaction. Null if the `fromToken` is the native token or the transaction is a native token wrap / unwrap.",
7080    ///  "type": "object",
7081    ///  "required": [
7082    ///    "eip712",
7083    ///    "hash"
7084    ///  ],
7085    ///  "properties": {
7086    ///    "eip712": {
7087    ///      "$ref": "#/components/schemas/EIP712Message"
7088    ///    },
7089    ///    "hash": {
7090    ///      "description": "The hash for the approval according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712). Computing the hash of the `eip712` field should match the value of this field.",
7091    ///      "examples": [
7092    ///        "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
7093    ///      ],
7094    ///      "type": "string",
7095    ///      "pattern": "^0x[a-fA-F0-9]{64}$"
7096    ///    }
7097    ///  }
7098    ///}
7099    /// ```
7100    /// </details>
7101    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7102    pub struct CreateSwapQuoteResponsePermit2 {
7103        pub eip712: Eip712Message,
7104        ///The hash for the approval according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712). Computing the hash of the `eip712` field should match the value of this field.
7105        pub hash: CreateSwapQuoteResponsePermit2Hash,
7106    }
7107    impl ::std::convert::From<&CreateSwapQuoteResponsePermit2> for CreateSwapQuoteResponsePermit2 {
7108        fn from(value: &CreateSwapQuoteResponsePermit2) -> Self {
7109            value.clone()
7110        }
7111    }
7112    impl CreateSwapQuoteResponsePermit2 {
7113        pub fn builder() -> builder::CreateSwapQuoteResponsePermit2 {
7114            Default::default()
7115        }
7116    }
7117    ///The hash for the approval according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712). Computing the hash of the `eip712` field should match the value of this field.
7118    ///
7119    /// <details><summary>JSON schema</summary>
7120    ///
7121    /// ```json
7122    ///{
7123    ///  "description": "The hash for the approval according to [EIP-712](https://eips.ethereum.org/EIPS/eip-712). Computing the hash of the `eip712` field should match the value of this field.",
7124    ///  "examples": [
7125    ///    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
7126    ///  ],
7127    ///  "type": "string",
7128    ///  "pattern": "^0x[a-fA-F0-9]{64}$"
7129    ///}
7130    /// ```
7131    /// </details>
7132    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7133    #[serde(transparent)]
7134    pub struct CreateSwapQuoteResponsePermit2Hash(::std::string::String);
7135    impl ::std::ops::Deref for CreateSwapQuoteResponsePermit2Hash {
7136        type Target = ::std::string::String;
7137        fn deref(&self) -> &::std::string::String {
7138            &self.0
7139        }
7140    }
7141    impl ::std::convert::From<CreateSwapQuoteResponsePermit2Hash> for ::std::string::String {
7142        fn from(value: CreateSwapQuoteResponsePermit2Hash) -> Self {
7143            value.0
7144        }
7145    }
7146    impl ::std::convert::From<&CreateSwapQuoteResponsePermit2Hash>
7147        for CreateSwapQuoteResponsePermit2Hash
7148    {
7149        fn from(value: &CreateSwapQuoteResponsePermit2Hash) -> Self {
7150            value.clone()
7151        }
7152    }
7153    impl ::std::str::FromStr for CreateSwapQuoteResponsePermit2Hash {
7154        type Err = self::error::ConversionError;
7155        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7156            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7157                ::std::sync::LazyLock::new(|| {
7158                    ::regress::Regex::new("^0x[a-fA-F0-9]{64}$").unwrap()
7159                });
7160            if PATTERN.find(value).is_none() {
7161                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{64}$\"".into());
7162            }
7163            Ok(Self(value.to_string()))
7164        }
7165    }
7166    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponsePermit2Hash {
7167        type Error = self::error::ConversionError;
7168        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7169            value.parse()
7170        }
7171    }
7172    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponsePermit2Hash {
7173        type Error = self::error::ConversionError;
7174        fn try_from(
7175            value: &::std::string::String,
7176        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7177            value.parse()
7178        }
7179    }
7180    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponsePermit2Hash {
7181        type Error = self::error::ConversionError;
7182        fn try_from(
7183            value: ::std::string::String,
7184        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7185            value.parse()
7186        }
7187    }
7188    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponsePermit2Hash {
7189        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7190        where
7191            D: ::serde::Deserializer<'de>,
7192        {
7193            ::std::string::String::deserialize(deserializer)?
7194                .parse()
7195                .map_err(|e: self::error::ConversionError| {
7196                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7197                })
7198        }
7199    }
7200    ///The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.
7201    ///
7202    /// <details><summary>JSON schema</summary>
7203    ///
7204    /// ```json
7205    ///{
7206    ///  "description": "The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.",
7207    ///  "examples": [
7208    ///    "1000000000000000000"
7209    ///  ],
7210    ///  "type": "string",
7211    ///  "pattern": "^(0|[1-9]\\d*)$"
7212    ///}
7213    /// ```
7214    /// </details>
7215    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7216    #[serde(transparent)]
7217    pub struct CreateSwapQuoteResponseToAmount(::std::string::String);
7218    impl ::std::ops::Deref for CreateSwapQuoteResponseToAmount {
7219        type Target = ::std::string::String;
7220        fn deref(&self) -> &::std::string::String {
7221            &self.0
7222        }
7223    }
7224    impl ::std::convert::From<CreateSwapQuoteResponseToAmount> for ::std::string::String {
7225        fn from(value: CreateSwapQuoteResponseToAmount) -> Self {
7226            value.0
7227        }
7228    }
7229    impl ::std::convert::From<&CreateSwapQuoteResponseToAmount> for CreateSwapQuoteResponseToAmount {
7230        fn from(value: &CreateSwapQuoteResponseToAmount) -> Self {
7231            value.clone()
7232        }
7233    }
7234    impl ::std::str::FromStr for CreateSwapQuoteResponseToAmount {
7235        type Err = self::error::ConversionError;
7236        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7237            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7238                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
7239            if PATTERN.find(value).is_none() {
7240                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
7241            }
7242            Ok(Self(value.to_string()))
7243        }
7244    }
7245    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseToAmount {
7246        type Error = self::error::ConversionError;
7247        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7248            value.parse()
7249        }
7250    }
7251    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseToAmount {
7252        type Error = self::error::ConversionError;
7253        fn try_from(
7254            value: &::std::string::String,
7255        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7256            value.parse()
7257        }
7258    }
7259    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseToAmount {
7260        type Error = self::error::ConversionError;
7261        fn try_from(
7262            value: ::std::string::String,
7263        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7264            value.parse()
7265        }
7266    }
7267    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseToAmount {
7268        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7269        where
7270            D: ::serde::Deserializer<'de>,
7271        {
7272            ::std::string::String::deserialize(deserializer)?
7273                .parse()
7274                .map_err(|e: self::error::ConversionError| {
7275                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7276                })
7277        }
7278    }
7279    ///The 0x-prefixed contract address of the token that will be received.
7280    ///
7281    /// <details><summary>JSON schema</summary>
7282    ///
7283    /// ```json
7284    ///{
7285    ///  "description": "The 0x-prefixed contract address of the token that will be received.",
7286    ///  "examples": [
7287    ///    "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
7288    ///  ],
7289    ///  "type": "string",
7290    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
7291    ///}
7292    /// ```
7293    /// </details>
7294    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7295    #[serde(transparent)]
7296    pub struct CreateSwapQuoteResponseToToken(::std::string::String);
7297    impl ::std::ops::Deref for CreateSwapQuoteResponseToToken {
7298        type Target = ::std::string::String;
7299        fn deref(&self) -> &::std::string::String {
7300            &self.0
7301        }
7302    }
7303    impl ::std::convert::From<CreateSwapQuoteResponseToToken> for ::std::string::String {
7304        fn from(value: CreateSwapQuoteResponseToToken) -> Self {
7305            value.0
7306        }
7307    }
7308    impl ::std::convert::From<&CreateSwapQuoteResponseToToken> for CreateSwapQuoteResponseToToken {
7309        fn from(value: &CreateSwapQuoteResponseToToken) -> Self {
7310            value.clone()
7311        }
7312    }
7313    impl ::std::str::FromStr for CreateSwapQuoteResponseToToken {
7314        type Err = self::error::ConversionError;
7315        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7316            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7317                ::std::sync::LazyLock::new(|| {
7318                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
7319                });
7320            if PATTERN.find(value).is_none() {
7321                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
7322            }
7323            Ok(Self(value.to_string()))
7324        }
7325    }
7326    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseToToken {
7327        type Error = self::error::ConversionError;
7328        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7329            value.parse()
7330        }
7331    }
7332    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseToToken {
7333        type Error = self::error::ConversionError;
7334        fn try_from(
7335            value: &::std::string::String,
7336        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7337            value.parse()
7338        }
7339    }
7340    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseToToken {
7341        type Error = self::error::ConversionError;
7342        fn try_from(
7343            value: ::std::string::String,
7344        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7345            value.parse()
7346        }
7347    }
7348    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseToToken {
7349        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7350        where
7351            D: ::serde::Deserializer<'de>,
7352        {
7353            ::std::string::String::deserialize(deserializer)?
7354                .parse()
7355                .map_err(|e: self::error::ConversionError| {
7356                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7357                })
7358        }
7359    }
7360    ///The details of the transaction to be signed and submitted to execute the swap.
7361    ///
7362    /// <details><summary>JSON schema</summary>
7363    ///
7364    /// ```json
7365    ///{
7366    ///  "description": "The details of the transaction to be signed and submitted to execute the swap.",
7367    ///  "type": "object",
7368    ///  "required": [
7369    ///    "data",
7370    ///    "gas",
7371    ///    "gasPrice",
7372    ///    "to",
7373    ///    "value"
7374    ///  ],
7375    ///  "properties": {
7376    ///    "data": {
7377    ///      "description": "The hex-encoded call data to send to the contract.",
7378    ///      "examples": [
7379    ///        "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
7380    ///      ],
7381    ///      "type": "string"
7382    ///    },
7383    ///    "gas": {
7384    ///      "description": "The estimated gas limit that should be used to send the transaction to guarantee settlement.",
7385    ///      "examples": [
7386    ///        "100000"
7387    ///      ],
7388    ///      "type": "string",
7389    ///      "pattern": "^\\d+$"
7390    ///    },
7391    ///    "gasPrice": {
7392    ///      "description": "The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.",
7393    ///      "examples": [
7394    ///        "1000000000"
7395    ///      ],
7396    ///      "type": "string",
7397    ///      "pattern": "^\\d+$"
7398    ///    },
7399    ///    "to": {
7400    ///      "description": "The 0x-prefixed address of the contract to call.",
7401    ///      "examples": [
7402    ///        "0x000000000022D473030F116dDEE9F6B43aC78BA3"
7403    ///      ],
7404    ///      "type": "string",
7405    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
7406    ///    },
7407    ///    "value": {
7408    ///      "description": "The value of the transaction in Wei.",
7409    ///      "examples": [
7410    ///        "1000000000000000000"
7411    ///      ],
7412    ///      "type": "string",
7413    ///      "pattern": "^\\d+$"
7414    ///    }
7415    ///  }
7416    ///}
7417    /// ```
7418    /// </details>
7419    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7420    pub struct CreateSwapQuoteResponseTransaction {
7421        ///The hex-encoded call data to send to the contract.
7422        pub data: ::std::string::String,
7423        ///The estimated gas limit that should be used to send the transaction to guarantee settlement.
7424        pub gas: CreateSwapQuoteResponseTransactionGas,
7425        ///The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.
7426        #[serde(rename = "gasPrice")]
7427        pub gas_price: CreateSwapQuoteResponseTransactionGasPrice,
7428        ///The 0x-prefixed address of the contract to call.
7429        pub to: CreateSwapQuoteResponseTransactionTo,
7430        ///The value of the transaction in Wei.
7431        pub value: CreateSwapQuoteResponseTransactionValue,
7432    }
7433    impl ::std::convert::From<&CreateSwapQuoteResponseTransaction>
7434        for CreateSwapQuoteResponseTransaction
7435    {
7436        fn from(value: &CreateSwapQuoteResponseTransaction) -> Self {
7437            value.clone()
7438        }
7439    }
7440    impl CreateSwapQuoteResponseTransaction {
7441        pub fn builder() -> builder::CreateSwapQuoteResponseTransaction {
7442            Default::default()
7443        }
7444    }
7445    ///The estimated gas limit that should be used to send the transaction to guarantee settlement.
7446    ///
7447    /// <details><summary>JSON schema</summary>
7448    ///
7449    /// ```json
7450    ///{
7451    ///  "description": "The estimated gas limit that should be used to send the transaction to guarantee settlement.",
7452    ///  "examples": [
7453    ///    "100000"
7454    ///  ],
7455    ///  "type": "string",
7456    ///  "pattern": "^\\d+$"
7457    ///}
7458    /// ```
7459    /// </details>
7460    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7461    #[serde(transparent)]
7462    pub struct CreateSwapQuoteResponseTransactionGas(::std::string::String);
7463    impl ::std::ops::Deref for CreateSwapQuoteResponseTransactionGas {
7464        type Target = ::std::string::String;
7465        fn deref(&self) -> &::std::string::String {
7466            &self.0
7467        }
7468    }
7469    impl ::std::convert::From<CreateSwapQuoteResponseTransactionGas> for ::std::string::String {
7470        fn from(value: CreateSwapQuoteResponseTransactionGas) -> Self {
7471            value.0
7472        }
7473    }
7474    impl ::std::convert::From<&CreateSwapQuoteResponseTransactionGas>
7475        for CreateSwapQuoteResponseTransactionGas
7476    {
7477        fn from(value: &CreateSwapQuoteResponseTransactionGas) -> Self {
7478            value.clone()
7479        }
7480    }
7481    impl ::std::str::FromStr for CreateSwapQuoteResponseTransactionGas {
7482        type Err = self::error::ConversionError;
7483        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7484            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7485                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
7486            if PATTERN.find(value).is_none() {
7487                return Err("doesn't match pattern \"^\\d+$\"".into());
7488            }
7489            Ok(Self(value.to_string()))
7490        }
7491    }
7492    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseTransactionGas {
7493        type Error = self::error::ConversionError;
7494        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7495            value.parse()
7496        }
7497    }
7498    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseTransactionGas {
7499        type Error = self::error::ConversionError;
7500        fn try_from(
7501            value: &::std::string::String,
7502        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7503            value.parse()
7504        }
7505    }
7506    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseTransactionGas {
7507        type Error = self::error::ConversionError;
7508        fn try_from(
7509            value: ::std::string::String,
7510        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7511            value.parse()
7512        }
7513    }
7514    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseTransactionGas {
7515        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7516        where
7517            D: ::serde::Deserializer<'de>,
7518        {
7519            ::std::string::String::deserialize(deserializer)?
7520                .parse()
7521                .map_err(|e: self::error::ConversionError| {
7522                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7523                })
7524        }
7525    }
7526    ///The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.
7527    ///
7528    /// <details><summary>JSON schema</summary>
7529    ///
7530    /// ```json
7531    ///{
7532    ///  "description": "The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.",
7533    ///  "examples": [
7534    ///    "1000000000"
7535    ///  ],
7536    ///  "type": "string",
7537    ///  "pattern": "^\\d+$"
7538    ///}
7539    /// ```
7540    /// </details>
7541    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7542    #[serde(transparent)]
7543    pub struct CreateSwapQuoteResponseTransactionGasPrice(::std::string::String);
7544    impl ::std::ops::Deref for CreateSwapQuoteResponseTransactionGasPrice {
7545        type Target = ::std::string::String;
7546        fn deref(&self) -> &::std::string::String {
7547            &self.0
7548        }
7549    }
7550    impl ::std::convert::From<CreateSwapQuoteResponseTransactionGasPrice> for ::std::string::String {
7551        fn from(value: CreateSwapQuoteResponseTransactionGasPrice) -> Self {
7552            value.0
7553        }
7554    }
7555    impl ::std::convert::From<&CreateSwapQuoteResponseTransactionGasPrice>
7556        for CreateSwapQuoteResponseTransactionGasPrice
7557    {
7558        fn from(value: &CreateSwapQuoteResponseTransactionGasPrice) -> Self {
7559            value.clone()
7560        }
7561    }
7562    impl ::std::str::FromStr for CreateSwapQuoteResponseTransactionGasPrice {
7563        type Err = self::error::ConversionError;
7564        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7565            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7566                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
7567            if PATTERN.find(value).is_none() {
7568                return Err("doesn't match pattern \"^\\d+$\"".into());
7569            }
7570            Ok(Self(value.to_string()))
7571        }
7572    }
7573    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseTransactionGasPrice {
7574        type Error = self::error::ConversionError;
7575        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7576            value.parse()
7577        }
7578    }
7579    impl ::std::convert::TryFrom<&::std::string::String>
7580        for CreateSwapQuoteResponseTransactionGasPrice
7581    {
7582        type Error = self::error::ConversionError;
7583        fn try_from(
7584            value: &::std::string::String,
7585        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7586            value.parse()
7587        }
7588    }
7589    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseTransactionGasPrice {
7590        type Error = self::error::ConversionError;
7591        fn try_from(
7592            value: ::std::string::String,
7593        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7594            value.parse()
7595        }
7596    }
7597    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseTransactionGasPrice {
7598        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7599        where
7600            D: ::serde::Deserializer<'de>,
7601        {
7602            ::std::string::String::deserialize(deserializer)?
7603                .parse()
7604                .map_err(|e: self::error::ConversionError| {
7605                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7606                })
7607        }
7608    }
7609    ///The 0x-prefixed address of the contract to call.
7610    ///
7611    /// <details><summary>JSON schema</summary>
7612    ///
7613    /// ```json
7614    ///{
7615    ///  "description": "The 0x-prefixed address of the contract to call.",
7616    ///  "examples": [
7617    ///    "0x000000000022D473030F116dDEE9F6B43aC78BA3"
7618    ///  ],
7619    ///  "type": "string",
7620    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
7621    ///}
7622    /// ```
7623    /// </details>
7624    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7625    #[serde(transparent)]
7626    pub struct CreateSwapQuoteResponseTransactionTo(::std::string::String);
7627    impl ::std::ops::Deref for CreateSwapQuoteResponseTransactionTo {
7628        type Target = ::std::string::String;
7629        fn deref(&self) -> &::std::string::String {
7630            &self.0
7631        }
7632    }
7633    impl ::std::convert::From<CreateSwapQuoteResponseTransactionTo> for ::std::string::String {
7634        fn from(value: CreateSwapQuoteResponseTransactionTo) -> Self {
7635            value.0
7636        }
7637    }
7638    impl ::std::convert::From<&CreateSwapQuoteResponseTransactionTo>
7639        for CreateSwapQuoteResponseTransactionTo
7640    {
7641        fn from(value: &CreateSwapQuoteResponseTransactionTo) -> Self {
7642            value.clone()
7643        }
7644    }
7645    impl ::std::str::FromStr for CreateSwapQuoteResponseTransactionTo {
7646        type Err = self::error::ConversionError;
7647        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7648            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7649                ::std::sync::LazyLock::new(|| {
7650                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
7651                });
7652            if PATTERN.find(value).is_none() {
7653                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
7654            }
7655            Ok(Self(value.to_string()))
7656        }
7657    }
7658    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseTransactionTo {
7659        type Error = self::error::ConversionError;
7660        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7661            value.parse()
7662        }
7663    }
7664    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseTransactionTo {
7665        type Error = self::error::ConversionError;
7666        fn try_from(
7667            value: &::std::string::String,
7668        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7669            value.parse()
7670        }
7671    }
7672    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseTransactionTo {
7673        type Error = self::error::ConversionError;
7674        fn try_from(
7675            value: ::std::string::String,
7676        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7677            value.parse()
7678        }
7679    }
7680    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseTransactionTo {
7681        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7682        where
7683            D: ::serde::Deserializer<'de>,
7684        {
7685            ::std::string::String::deserialize(deserializer)?
7686                .parse()
7687                .map_err(|e: self::error::ConversionError| {
7688                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7689                })
7690        }
7691    }
7692    ///The value of the transaction in Wei.
7693    ///
7694    /// <details><summary>JSON schema</summary>
7695    ///
7696    /// ```json
7697    ///{
7698    ///  "description": "The value of the transaction in Wei.",
7699    ///  "examples": [
7700    ///    "1000000000000000000"
7701    ///  ],
7702    ///  "type": "string",
7703    ///  "pattern": "^\\d+$"
7704    ///}
7705    /// ```
7706    /// </details>
7707    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7708    #[serde(transparent)]
7709    pub struct CreateSwapQuoteResponseTransactionValue(::std::string::String);
7710    impl ::std::ops::Deref for CreateSwapQuoteResponseTransactionValue {
7711        type Target = ::std::string::String;
7712        fn deref(&self) -> &::std::string::String {
7713            &self.0
7714        }
7715    }
7716    impl ::std::convert::From<CreateSwapQuoteResponseTransactionValue> for ::std::string::String {
7717        fn from(value: CreateSwapQuoteResponseTransactionValue) -> Self {
7718            value.0
7719        }
7720    }
7721    impl ::std::convert::From<&CreateSwapQuoteResponseTransactionValue>
7722        for CreateSwapQuoteResponseTransactionValue
7723    {
7724        fn from(value: &CreateSwapQuoteResponseTransactionValue) -> Self {
7725            value.clone()
7726        }
7727    }
7728    impl ::std::str::FromStr for CreateSwapQuoteResponseTransactionValue {
7729        type Err = self::error::ConversionError;
7730        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7731            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7732                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
7733            if PATTERN.find(value).is_none() {
7734                return Err("doesn't match pattern \"^\\d+$\"".into());
7735            }
7736            Ok(Self(value.to_string()))
7737        }
7738    }
7739    impl ::std::convert::TryFrom<&str> for CreateSwapQuoteResponseTransactionValue {
7740        type Error = self::error::ConversionError;
7741        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7742            value.parse()
7743        }
7744    }
7745    impl ::std::convert::TryFrom<&::std::string::String> for CreateSwapQuoteResponseTransactionValue {
7746        type Error = self::error::ConversionError;
7747        fn try_from(
7748            value: &::std::string::String,
7749        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7750            value.parse()
7751        }
7752    }
7753    impl ::std::convert::TryFrom<::std::string::String> for CreateSwapQuoteResponseTransactionValue {
7754        type Error = self::error::ConversionError;
7755        fn try_from(
7756            value: ::std::string::String,
7757        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7758            value.parse()
7759        }
7760    }
7761    impl<'de> ::serde::Deserialize<'de> for CreateSwapQuoteResponseTransactionValue {
7762        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7763        where
7764            D: ::serde::Deserializer<'de>,
7765        {
7766            ::std::string::String::deserialize(deserializer)?
7767                .parse()
7768                .map_err(|e: self::error::ConversionError| {
7769                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7770                })
7771        }
7772    }
7773    ///A wrapper for the response of a swap quote operation.
7774    ///
7775    /// <details><summary>JSON schema</summary>
7776    ///
7777    /// ```json
7778    ///{
7779    ///  "description": "A wrapper for the response of a swap quote operation.",
7780    ///  "oneOf": [
7781    ///    {
7782    ///      "$ref": "#/components/schemas/CreateSwapQuoteResponse"
7783    ///    },
7784    ///    {
7785    ///      "$ref": "#/components/schemas/SwapUnavailableResponse"
7786    ///    }
7787    ///  ]
7788    ///}
7789    /// ```
7790    /// </details>
7791    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7792    #[serde(untagged)]
7793    pub enum CreateSwapQuoteResponseWrapper {
7794        CreateSwapQuoteResponse(CreateSwapQuoteResponse),
7795        SwapUnavailableResponse(SwapUnavailableResponse),
7796    }
7797    impl ::std::convert::From<&Self> for CreateSwapQuoteResponseWrapper {
7798        fn from(value: &CreateSwapQuoteResponseWrapper) -> Self {
7799            value.clone()
7800        }
7801    }
7802    impl ::std::convert::From<CreateSwapQuoteResponse> for CreateSwapQuoteResponseWrapper {
7803        fn from(value: CreateSwapQuoteResponse) -> Self {
7804            Self::CreateSwapQuoteResponse(value)
7805        }
7806    }
7807    impl ::std::convert::From<SwapUnavailableResponse> for CreateSwapQuoteResponseWrapper {
7808        fn from(value: SwapUnavailableResponse) -> Self {
7809            Self::SwapUnavailableResponse(value)
7810        }
7811    }
7812    ///`DeletePolicyPolicyId`
7813    ///
7814    /// <details><summary>JSON schema</summary>
7815    ///
7816    /// ```json
7817    ///{
7818    ///  "type": "string",
7819    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
7820    ///}
7821    /// ```
7822    /// </details>
7823    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7824    #[serde(transparent)]
7825    pub struct DeletePolicyPolicyId(::std::string::String);
7826    impl ::std::ops::Deref for DeletePolicyPolicyId {
7827        type Target = ::std::string::String;
7828        fn deref(&self) -> &::std::string::String {
7829            &self.0
7830        }
7831    }
7832    impl ::std::convert::From<DeletePolicyPolicyId> for ::std::string::String {
7833        fn from(value: DeletePolicyPolicyId) -> Self {
7834            value.0
7835        }
7836    }
7837    impl ::std::convert::From<&DeletePolicyPolicyId> for DeletePolicyPolicyId {
7838        fn from(value: &DeletePolicyPolicyId) -> Self {
7839            value.clone()
7840        }
7841    }
7842    impl ::std::str::FromStr for DeletePolicyPolicyId {
7843        type Err = self::error::ConversionError;
7844        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7845            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
7846                || {
7847                    ::regress::Regex::new(
7848                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
7849                    )
7850                    .unwrap()
7851                },
7852            );
7853            if PATTERN.find(value).is_none() {
7854                return Err(
7855                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
7856                        .into(),
7857                );
7858            }
7859            Ok(Self(value.to_string()))
7860        }
7861    }
7862    impl ::std::convert::TryFrom<&str> for DeletePolicyPolicyId {
7863        type Error = self::error::ConversionError;
7864        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7865            value.parse()
7866        }
7867    }
7868    impl ::std::convert::TryFrom<&::std::string::String> for DeletePolicyPolicyId {
7869        type Error = self::error::ConversionError;
7870        fn try_from(
7871            value: &::std::string::String,
7872        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7873            value.parse()
7874        }
7875    }
7876    impl ::std::convert::TryFrom<::std::string::String> for DeletePolicyPolicyId {
7877        type Error = self::error::ConversionError;
7878        fn try_from(
7879            value: ::std::string::String,
7880        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7881            value.parse()
7882        }
7883    }
7884    impl<'de> ::serde::Deserialize<'de> for DeletePolicyPolicyId {
7885        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7886        where
7887            D: ::serde::Deserializer<'de>,
7888        {
7889            ::std::string::String::deserialize(deserializer)?
7890                .parse()
7891                .map_err(|e: self::error::ConversionError| {
7892                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7893                })
7894        }
7895    }
7896    ///`DeletePolicyXIdempotencyKey`
7897    ///
7898    /// <details><summary>JSON schema</summary>
7899    ///
7900    /// ```json
7901    ///{
7902    ///  "type": "string",
7903    ///  "maxLength": 36,
7904    ///  "minLength": 36,
7905    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
7906    ///}
7907    /// ```
7908    /// </details>
7909    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7910    #[serde(transparent)]
7911    pub struct DeletePolicyXIdempotencyKey(::std::string::String);
7912    impl ::std::ops::Deref for DeletePolicyXIdempotencyKey {
7913        type Target = ::std::string::String;
7914        fn deref(&self) -> &::std::string::String {
7915            &self.0
7916        }
7917    }
7918    impl ::std::convert::From<DeletePolicyXIdempotencyKey> for ::std::string::String {
7919        fn from(value: DeletePolicyXIdempotencyKey) -> Self {
7920            value.0
7921        }
7922    }
7923    impl ::std::convert::From<&DeletePolicyXIdempotencyKey> for DeletePolicyXIdempotencyKey {
7924        fn from(value: &DeletePolicyXIdempotencyKey) -> Self {
7925            value.clone()
7926        }
7927    }
7928    impl ::std::str::FromStr for DeletePolicyXIdempotencyKey {
7929        type Err = self::error::ConversionError;
7930        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7931            if value.chars().count() > 36usize {
7932                return Err("longer than 36 characters".into());
7933            }
7934            if value.chars().count() < 36usize {
7935                return Err("shorter than 36 characters".into());
7936            }
7937            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
7938                ::std::sync::LazyLock::new(|| {
7939                    ::regress::Regex::new(
7940                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
7941                    )
7942                    .unwrap()
7943                });
7944            if PATTERN.find(value).is_none() {
7945                return Err(
7946                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
7947                        .into(),
7948                );
7949            }
7950            Ok(Self(value.to_string()))
7951        }
7952    }
7953    impl ::std::convert::TryFrom<&str> for DeletePolicyXIdempotencyKey {
7954        type Error = self::error::ConversionError;
7955        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7956            value.parse()
7957        }
7958    }
7959    impl ::std::convert::TryFrom<&::std::string::String> for DeletePolicyXIdempotencyKey {
7960        type Error = self::error::ConversionError;
7961        fn try_from(
7962            value: &::std::string::String,
7963        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7964            value.parse()
7965        }
7966    }
7967    impl ::std::convert::TryFrom<::std::string::String> for DeletePolicyXIdempotencyKey {
7968        type Error = self::error::ConversionError;
7969        fn try_from(
7970            value: ::std::string::String,
7971        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7972            value.parse()
7973        }
7974    }
7975    impl<'de> ::serde::Deserialize<'de> for DeletePolicyXIdempotencyKey {
7976        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
7977        where
7978            D: ::serde::Deserializer<'de>,
7979        {
7980            ::std::string::String::deserialize(deserializer)?
7981                .parse()
7982                .map_err(|e: self::error::ConversionError| {
7983                    <D::Error as ::serde::de::Error>::custom(e.to_string())
7984                })
7985        }
7986    }
7987    ///Information about an end user who authenticates using a JWT issued by the developer.
7988    ///
7989    /// <details><summary>JSON schema</summary>
7990    ///
7991    /// ```json
7992    ///{
7993    ///  "title": "DeveloperJWTAuthentication",
7994    ///  "description": "Information about an end user who authenticates using a JWT issued by the developer.",
7995    ///  "type": "object",
7996    ///  "required": [
7997    ///    "kid",
7998    ///    "sub",
7999    ///    "type"
8000    ///  ],
8001    ///  "properties": {
8002    ///    "kid": {
8003    ///      "description": "The key ID of the JWK used to sign the JWT.",
8004    ///      "examples": [
8005    ///        "NjVBRjY5MDlCMUIwNzU4RTA2QzZFMDQ4QzQ2MDAyQjVDNjk1RTM2Qg"
8006    ///      ],
8007    ///      "type": "string"
8008    ///    },
8009    ///    "sub": {
8010    ///      "description": "The unique identifier for the end user that is captured in the `sub` claim of the JWT.",
8011    ///      "examples": [
8012    ///        "e051beeb-7163-4527-a5b6-35e301529ff2"
8013    ///      ],
8014    ///      "type": "string"
8015    ///    },
8016    ///    "type": {
8017    ///      "description": "The type of authentication information.",
8018    ///      "examples": [
8019    ///        "jwt"
8020    ///      ],
8021    ///      "type": "string",
8022    ///      "enum": [
8023    ///        "jwt"
8024    ///      ]
8025    ///    }
8026    ///  }
8027    ///}
8028    /// ```
8029    /// </details>
8030    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8031    pub struct DeveloperJwtAuthentication {
8032        ///The key ID of the JWK used to sign the JWT.
8033        pub kid: ::std::string::String,
8034        ///The unique identifier for the end user that is captured in the `sub` claim of the JWT.
8035        pub sub: ::std::string::String,
8036        ///The type of authentication information.
8037        #[serde(rename = "type")]
8038        pub type_: DeveloperJwtAuthenticationType,
8039    }
8040    impl ::std::convert::From<&DeveloperJwtAuthentication> for DeveloperJwtAuthentication {
8041        fn from(value: &DeveloperJwtAuthentication) -> Self {
8042            value.clone()
8043        }
8044    }
8045    impl DeveloperJwtAuthentication {
8046        pub fn builder() -> builder::DeveloperJwtAuthentication {
8047            Default::default()
8048        }
8049    }
8050    ///The type of authentication information.
8051    ///
8052    /// <details><summary>JSON schema</summary>
8053    ///
8054    /// ```json
8055    ///{
8056    ///  "description": "The type of authentication information.",
8057    ///  "examples": [
8058    ///    "jwt"
8059    ///  ],
8060    ///  "type": "string",
8061    ///  "enum": [
8062    ///    "jwt"
8063    ///  ]
8064    ///}
8065    /// ```
8066    /// </details>
8067    #[derive(
8068        ::serde::Deserialize,
8069        ::serde::Serialize,
8070        Clone,
8071        Copy,
8072        Debug,
8073        Eq,
8074        Hash,
8075        Ord,
8076        PartialEq,
8077        PartialOrd,
8078    )]
8079    pub enum DeveloperJwtAuthenticationType {
8080        #[serde(rename = "jwt")]
8081        Jwt,
8082    }
8083    impl ::std::convert::From<&Self> for DeveloperJwtAuthenticationType {
8084        fn from(value: &DeveloperJwtAuthenticationType) -> Self {
8085            value.clone()
8086        }
8087    }
8088    impl ::std::fmt::Display for DeveloperJwtAuthenticationType {
8089        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8090            match *self {
8091                Self::Jwt => f.write_str("jwt"),
8092            }
8093        }
8094    }
8095    impl ::std::str::FromStr for DeveloperJwtAuthenticationType {
8096        type Err = self::error::ConversionError;
8097        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8098            match value {
8099                "jwt" => Ok(Self::Jwt),
8100                _ => Err("invalid value".into()),
8101            }
8102        }
8103    }
8104    impl ::std::convert::TryFrom<&str> for DeveloperJwtAuthenticationType {
8105        type Error = self::error::ConversionError;
8106        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8107            value.parse()
8108        }
8109    }
8110    impl ::std::convert::TryFrom<&::std::string::String> for DeveloperJwtAuthenticationType {
8111        type Error = self::error::ConversionError;
8112        fn try_from(
8113            value: &::std::string::String,
8114        ) -> ::std::result::Result<Self, self::error::ConversionError> {
8115            value.parse()
8116        }
8117    }
8118    impl ::std::convert::TryFrom<::std::string::String> for DeveloperJwtAuthenticationType {
8119        type Error = self::error::ConversionError;
8120        fn try_from(
8121            value: ::std::string::String,
8122        ) -> ::std::result::Result<Self, self::error::ConversionError> {
8123            value.parse()
8124        }
8125    }
8126    ///The domain of the EIP-712 typed data.
8127    ///
8128    /// <details><summary>JSON schema</summary>
8129    ///
8130    /// ```json
8131    ///{
8132    ///  "description": "The domain of the EIP-712 typed data.",
8133    ///  "examples": [
8134    ///    {
8135    ///      "chainId": 1,
8136    ///      "name": "Permit2",
8137    ///      "verifyingContract": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
8138    ///    }
8139    ///  ],
8140    ///  "type": "object",
8141    ///  "properties": {
8142    ///    "chainId": {
8143    ///      "description": "The chain ID of the EVM network.",
8144    ///      "examples": [
8145    ///        1
8146    ///      ],
8147    ///      "type": "integer",
8148    ///      "format": "int64"
8149    ///    },
8150    ///    "name": {
8151    ///      "description": "The name of the DApp or protocol.",
8152    ///      "examples": [
8153    ///        "Permit2"
8154    ///      ],
8155    ///      "type": "string"
8156    ///    },
8157    ///    "salt": {
8158    ///      "description": "The optional 32-byte 0x-prefixed hex salt for domain separation.",
8159    ///      "examples": [
8160    ///        "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
8161    ///      ],
8162    ///      "type": "string",
8163    ///      "pattern": "^0x[a-fA-F0-9]{64}$"
8164    ///    },
8165    ///    "verifyingContract": {
8166    ///      "description": "The 0x-prefixed EVM address of the verifying smart contract.",
8167    ///      "examples": [
8168    ///        "0x000000000022D473030F116dDEE9F6B43aC78BA3"
8169    ///      ],
8170    ///      "type": "string",
8171    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
8172    ///    },
8173    ///    "version": {
8174    ///      "description": "The version of the DApp or protocol.",
8175    ///      "examples": [
8176    ///        "1"
8177    ///      ],
8178    ///      "type": "string"
8179    ///    }
8180    ///  }
8181    ///}
8182    /// ```
8183    /// </details>
8184    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8185    pub struct Eip712Domain {
8186        ///The chain ID of the EVM network.
8187        #[serde(
8188            rename = "chainId",
8189            default,
8190            skip_serializing_if = "::std::option::Option::is_none"
8191        )]
8192        pub chain_id: ::std::option::Option<i64>,
8193        ///The name of the DApp or protocol.
8194        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8195        pub name: ::std::option::Option<::std::string::String>,
8196        ///The optional 32-byte 0x-prefixed hex salt for domain separation.
8197        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8198        pub salt: ::std::option::Option<Eip712DomainSalt>,
8199        ///The 0x-prefixed EVM address of the verifying smart contract.
8200        #[serde(
8201            rename = "verifyingContract",
8202            default,
8203            skip_serializing_if = "::std::option::Option::is_none"
8204        )]
8205        pub verifying_contract: ::std::option::Option<Eip712DomainVerifyingContract>,
8206        ///The version of the DApp or protocol.
8207        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8208        pub version: ::std::option::Option<::std::string::String>,
8209    }
8210    impl ::std::convert::From<&Eip712Domain> for Eip712Domain {
8211        fn from(value: &Eip712Domain) -> Self {
8212            value.clone()
8213        }
8214    }
8215    impl ::std::default::Default for Eip712Domain {
8216        fn default() -> Self {
8217            Self {
8218                chain_id: Default::default(),
8219                name: Default::default(),
8220                salt: Default::default(),
8221                verifying_contract: Default::default(),
8222                version: Default::default(),
8223            }
8224        }
8225    }
8226    impl Eip712Domain {
8227        pub fn builder() -> builder::Eip712Domain {
8228            Default::default()
8229        }
8230    }
8231    ///The optional 32-byte 0x-prefixed hex salt for domain separation.
8232    ///
8233    /// <details><summary>JSON schema</summary>
8234    ///
8235    /// ```json
8236    ///{
8237    ///  "description": "The optional 32-byte 0x-prefixed hex salt for domain separation.",
8238    ///  "examples": [
8239    ///    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
8240    ///  ],
8241    ///  "type": "string",
8242    ///  "pattern": "^0x[a-fA-F0-9]{64}$"
8243    ///}
8244    /// ```
8245    /// </details>
8246    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8247    #[serde(transparent)]
8248    pub struct Eip712DomainSalt(::std::string::String);
8249    impl ::std::ops::Deref for Eip712DomainSalt {
8250        type Target = ::std::string::String;
8251        fn deref(&self) -> &::std::string::String {
8252            &self.0
8253        }
8254    }
8255    impl ::std::convert::From<Eip712DomainSalt> for ::std::string::String {
8256        fn from(value: Eip712DomainSalt) -> Self {
8257            value.0
8258        }
8259    }
8260    impl ::std::convert::From<&Eip712DomainSalt> for Eip712DomainSalt {
8261        fn from(value: &Eip712DomainSalt) -> Self {
8262            value.clone()
8263        }
8264    }
8265    impl ::std::str::FromStr for Eip712DomainSalt {
8266        type Err = self::error::ConversionError;
8267        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8268            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
8269                ::std::sync::LazyLock::new(|| {
8270                    ::regress::Regex::new("^0x[a-fA-F0-9]{64}$").unwrap()
8271                });
8272            if PATTERN.find(value).is_none() {
8273                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{64}$\"".into());
8274            }
8275            Ok(Self(value.to_string()))
8276        }
8277    }
8278    impl ::std::convert::TryFrom<&str> for Eip712DomainSalt {
8279        type Error = self::error::ConversionError;
8280        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8281            value.parse()
8282        }
8283    }
8284    impl ::std::convert::TryFrom<&::std::string::String> for Eip712DomainSalt {
8285        type Error = self::error::ConversionError;
8286        fn try_from(
8287            value: &::std::string::String,
8288        ) -> ::std::result::Result<Self, self::error::ConversionError> {
8289            value.parse()
8290        }
8291    }
8292    impl ::std::convert::TryFrom<::std::string::String> for Eip712DomainSalt {
8293        type Error = self::error::ConversionError;
8294        fn try_from(
8295            value: ::std::string::String,
8296        ) -> ::std::result::Result<Self, self::error::ConversionError> {
8297            value.parse()
8298        }
8299    }
8300    impl<'de> ::serde::Deserialize<'de> for Eip712DomainSalt {
8301        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
8302        where
8303            D: ::serde::Deserializer<'de>,
8304        {
8305            ::std::string::String::deserialize(deserializer)?
8306                .parse()
8307                .map_err(|e: self::error::ConversionError| {
8308                    <D::Error as ::serde::de::Error>::custom(e.to_string())
8309                })
8310        }
8311    }
8312    ///The 0x-prefixed EVM address of the verifying smart contract.
8313    ///
8314    /// <details><summary>JSON schema</summary>
8315    ///
8316    /// ```json
8317    ///{
8318    ///  "description": "The 0x-prefixed EVM address of the verifying smart contract.",
8319    ///  "examples": [
8320    ///    "0x000000000022D473030F116dDEE9F6B43aC78BA3"
8321    ///  ],
8322    ///  "type": "string",
8323    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
8324    ///}
8325    /// ```
8326    /// </details>
8327    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
8328    #[serde(transparent)]
8329    pub struct Eip712DomainVerifyingContract(::std::string::String);
8330    impl ::std::ops::Deref for Eip712DomainVerifyingContract {
8331        type Target = ::std::string::String;
8332        fn deref(&self) -> &::std::string::String {
8333            &self.0
8334        }
8335    }
8336    impl ::std::convert::From<Eip712DomainVerifyingContract> for ::std::string::String {
8337        fn from(value: Eip712DomainVerifyingContract) -> Self {
8338            value.0
8339        }
8340    }
8341    impl ::std::convert::From<&Eip712DomainVerifyingContract> for Eip712DomainVerifyingContract {
8342        fn from(value: &Eip712DomainVerifyingContract) -> Self {
8343            value.clone()
8344        }
8345    }
8346    impl ::std::str::FromStr for Eip712DomainVerifyingContract {
8347        type Err = self::error::ConversionError;
8348        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8349            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
8350                ::std::sync::LazyLock::new(|| {
8351                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
8352                });
8353            if PATTERN.find(value).is_none() {
8354                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
8355            }
8356            Ok(Self(value.to_string()))
8357        }
8358    }
8359    impl ::std::convert::TryFrom<&str> for Eip712DomainVerifyingContract {
8360        type Error = self::error::ConversionError;
8361        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8362            value.parse()
8363        }
8364    }
8365    impl ::std::convert::TryFrom<&::std::string::String> for Eip712DomainVerifyingContract {
8366        type Error = self::error::ConversionError;
8367        fn try_from(
8368            value: &::std::string::String,
8369        ) -> ::std::result::Result<Self, self::error::ConversionError> {
8370            value.parse()
8371        }
8372    }
8373    impl ::std::convert::TryFrom<::std::string::String> for Eip712DomainVerifyingContract {
8374        type Error = self::error::ConversionError;
8375        fn try_from(
8376            value: ::std::string::String,
8377        ) -> ::std::result::Result<Self, self::error::ConversionError> {
8378            value.parse()
8379        }
8380    }
8381    impl<'de> ::serde::Deserialize<'de> for Eip712DomainVerifyingContract {
8382        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
8383        where
8384            D: ::serde::Deserializer<'de>,
8385        {
8386            ::std::string::String::deserialize(deserializer)?
8387                .parse()
8388                .map_err(|e: self::error::ConversionError| {
8389                    <D::Error as ::serde::de::Error>::custom(e.to_string())
8390                })
8391        }
8392    }
8393    ///The message to sign using EIP-712.
8394    ///
8395    /// <details><summary>JSON schema</summary>
8396    ///
8397    /// ```json
8398    ///{
8399    ///  "description": "The message to sign using EIP-712.",
8400    ///  "examples": [
8401    ///    {
8402    ///      "domain": {
8403    ///        "chainId": 1,
8404    ///        "name": "Permit2",
8405    ///        "verifyingContract": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
8406    ///      },
8407    ///      "message": {
8408    ///        "deadline": "1717123200",
8409    ///        "nonce": "123456",
8410    ///        "permitted": {
8411    ///          "amount": "1000000",
8412    ///          "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
8413    ///        },
8414    ///        "spender": "0xFfFfFfFFfFFfFFfFFfFFFFFffFFFffffFfFFFfFf"
8415    ///      },
8416    ///      "primaryType": "PermitTransferFrom",
8417    ///      "types": {
8418    ///        "EIP712Domain": [
8419    ///          {
8420    ///            "name": "name",
8421    ///            "type": "string"
8422    ///          },
8423    ///          {
8424    ///            "name": "chainId",
8425    ///            "type": "uint256"
8426    ///          },
8427    ///          {
8428    ///            "name": "verifyingContract",
8429    ///            "type": "address"
8430    ///          }
8431    ///        ],
8432    ///        "PermitTransferFrom": [
8433    ///          {
8434    ///            "name": "permitted",
8435    ///            "type": "TokenPermissions"
8436    ///          },
8437    ///          {
8438    ///            "name": "spender",
8439    ///            "type": "address"
8440    ///          },
8441    ///          {
8442    ///            "name": "nonce",
8443    ///            "type": "uint256"
8444    ///          },
8445    ///          {
8446    ///            "name": "deadline",
8447    ///            "type": "uint256"
8448    ///          }
8449    ///        ],
8450    ///        "TokenPermissions": [
8451    ///          {
8452    ///            "name": "token",
8453    ///            "type": "address"
8454    ///          },
8455    ///          {
8456    ///            "name": "amount",
8457    ///            "type": "uint256"
8458    ///          }
8459    ///        ]
8460    ///      }
8461    ///    }
8462    ///  ],
8463    ///  "type": "object",
8464    ///  "required": [
8465    ///    "domain",
8466    ///    "message",
8467    ///    "primaryType",
8468    ///    "types"
8469    ///  ],
8470    ///  "properties": {
8471    ///    "domain": {
8472    ///      "$ref": "#/components/schemas/EIP712Domain"
8473    ///    },
8474    ///    "message": {
8475    ///      "description": "The message to sign. The structure of this message must match the `primaryType` struct in the `types` object.",
8476    ///      "examples": [
8477    ///        {
8478    ///          "deadline": "1716239020",
8479    ///          "nonce": "0",
8480    ///          "permitted": {
8481    ///            "amount": "1000000",
8482    ///            "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
8483    ///          },
8484    ///          "spender": "0x1111111254EEB25477B68fb85Ed929f73A960582"
8485    ///        }
8486    ///      ],
8487    ///      "type": "object"
8488    ///    },
8489    ///    "primaryType": {
8490    ///      "description": "The primary type of the message. This is the name of the struct in the `types` object that is the root of the message.",
8491    ///      "examples": [
8492    ///        "PermitTransferFrom"
8493    ///      ],
8494    ///      "type": "string"
8495    ///    },
8496    ///    "types": {
8497    ///      "$ref": "#/components/schemas/EIP712Types"
8498    ///    }
8499    ///  }
8500    ///}
8501    /// ```
8502    /// </details>
8503    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8504    pub struct Eip712Message {
8505        pub domain: Eip712Domain,
8506        ///The message to sign. The structure of this message must match the `primaryType` struct in the `types` object.
8507        pub message: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
8508        ///The primary type of the message. This is the name of the struct in the `types` object that is the root of the message.
8509        #[serde(rename = "primaryType")]
8510        pub primary_type: ::std::string::String,
8511        pub types: Eip712Types,
8512    }
8513    impl ::std::convert::From<&Eip712Message> for Eip712Message {
8514        fn from(value: &Eip712Message) -> Self {
8515            value.clone()
8516        }
8517    }
8518    impl Eip712Message {
8519        pub fn builder() -> builder::Eip712Message {
8520            Default::default()
8521        }
8522    }
8523    /**A mapping of struct names to an array of type objects (name + type).
8524    Each key corresponds to a type name (e.g., "`EIP712Domain`", "`PermitTransferFrom`").
8525    */
8526    ///
8527    /// <details><summary>JSON schema</summary>
8528    ///
8529    /// ```json
8530    ///{
8531    ///  "description": "A mapping of struct names to an array of type objects (name + type).\nEach key corresponds to a type name (e.g., \"`EIP712Domain`\", \"`PermitTransferFrom`\").\n",
8532    ///  "examples": [
8533    ///    {
8534    ///      "EIP712Domain": [
8535    ///        {
8536    ///          "name": "name",
8537    ///          "type": "string"
8538    ///        },
8539    ///        {
8540    ///          "name": "chainId",
8541    ///          "type": "uint256"
8542    ///        },
8543    ///        {
8544    ///          "name": "verifyingContract",
8545    ///          "type": "address"
8546    ///        }
8547    ///      ],
8548    ///      "PermitTransferFrom": [
8549    ///        {
8550    ///          "name": "permitted",
8551    ///          "type": "TokenPermissions"
8552    ///        },
8553    ///        {
8554    ///          "name": "spender",
8555    ///          "type": "address"
8556    ///        },
8557    ///        {
8558    ///          "name": "nonce",
8559    ///          "type": "uint256"
8560    ///        },
8561    ///        {
8562    ///          "name": "deadline",
8563    ///          "type": "uint256"
8564    ///        }
8565    ///      ],
8566    ///      "TokenPermissions": [
8567    ///        {
8568    ///          "name": "token",
8569    ///          "type": "address"
8570    ///        },
8571    ///        {
8572    ///          "name": "amount",
8573    ///          "type": "uint256"
8574    ///        }
8575    ///      ]
8576    ///    }
8577    ///  ],
8578    ///  "type": "object"
8579    ///}
8580    /// ```
8581    /// </details>
8582    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8583    #[serde(transparent)]
8584    pub struct Eip712Types(pub ::serde_json::Map<::std::string::String, ::serde_json::Value>);
8585    impl ::std::ops::Deref for Eip712Types {
8586        type Target = ::serde_json::Map<::std::string::String, ::serde_json::Value>;
8587        fn deref(&self) -> &::serde_json::Map<::std::string::String, ::serde_json::Value> {
8588            &self.0
8589        }
8590    }
8591    impl ::std::convert::From<Eip712Types>
8592        for ::serde_json::Map<::std::string::String, ::serde_json::Value>
8593    {
8594        fn from(value: Eip712Types) -> Self {
8595            value.0
8596        }
8597    }
8598    impl ::std::convert::From<&Eip712Types> for Eip712Types {
8599        fn from(value: &Eip712Types) -> Self {
8600            value.clone()
8601        }
8602    }
8603    impl ::std::convert::From<::serde_json::Map<::std::string::String, ::serde_json::Value>>
8604        for Eip712Types
8605    {
8606        fn from(value: ::serde_json::Map<::std::string::String, ::serde_json::Value>) -> Self {
8607            Self(value)
8608        }
8609    }
8610    ///Information about an end user who authenticates using a one-time password sent to their email address.
8611    ///
8612    /// <details><summary>JSON schema</summary>
8613    ///
8614    /// ```json
8615    ///{
8616    ///  "title": "EmailAuthentication",
8617    ///  "description": "Information about an end user who authenticates using a one-time password sent to their email address.",
8618    ///  "type": "object",
8619    ///  "required": [
8620    ///    "email",
8621    ///    "type"
8622    ///  ],
8623    ///  "properties": {
8624    ///    "email": {
8625    ///      "description": "The email address of the end user.",
8626    ///      "examples": [
8627    ///        "user@example.com"
8628    ///      ],
8629    ///      "type": "string",
8630    ///      "format": "email"
8631    ///    },
8632    ///    "type": {
8633    ///      "description": "The type of authentication information.",
8634    ///      "examples": [
8635    ///        "email"
8636    ///      ],
8637    ///      "type": "string",
8638    ///      "enum": [
8639    ///        "email"
8640    ///      ]
8641    ///    }
8642    ///  }
8643    ///}
8644    /// ```
8645    /// </details>
8646    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8647    pub struct EmailAuthentication {
8648        ///The email address of the end user.
8649        pub email: ::std::string::String,
8650        ///The type of authentication information.
8651        #[serde(rename = "type")]
8652        pub type_: EmailAuthenticationType,
8653    }
8654    impl ::std::convert::From<&EmailAuthentication> for EmailAuthentication {
8655        fn from(value: &EmailAuthentication) -> Self {
8656            value.clone()
8657        }
8658    }
8659    impl EmailAuthentication {
8660        pub fn builder() -> builder::EmailAuthentication {
8661            Default::default()
8662        }
8663    }
8664    ///The type of authentication information.
8665    ///
8666    /// <details><summary>JSON schema</summary>
8667    ///
8668    /// ```json
8669    ///{
8670    ///  "description": "The type of authentication information.",
8671    ///  "examples": [
8672    ///    "email"
8673    ///  ],
8674    ///  "type": "string",
8675    ///  "enum": [
8676    ///    "email"
8677    ///  ]
8678    ///}
8679    /// ```
8680    /// </details>
8681    #[derive(
8682        ::serde::Deserialize,
8683        ::serde::Serialize,
8684        Clone,
8685        Copy,
8686        Debug,
8687        Eq,
8688        Hash,
8689        Ord,
8690        PartialEq,
8691        PartialOrd,
8692    )]
8693    pub enum EmailAuthenticationType {
8694        #[serde(rename = "email")]
8695        Email,
8696    }
8697    impl ::std::convert::From<&Self> for EmailAuthenticationType {
8698        fn from(value: &EmailAuthenticationType) -> Self {
8699            value.clone()
8700        }
8701    }
8702    impl ::std::fmt::Display for EmailAuthenticationType {
8703        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8704            match *self {
8705                Self::Email => f.write_str("email"),
8706            }
8707        }
8708    }
8709    impl ::std::str::FromStr for EmailAuthenticationType {
8710        type Err = self::error::ConversionError;
8711        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8712            match value {
8713                "email" => Ok(Self::Email),
8714                _ => Err("invalid value".into()),
8715            }
8716        }
8717    }
8718    impl ::std::convert::TryFrom<&str> for EmailAuthenticationType {
8719        type Error = self::error::ConversionError;
8720        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
8721            value.parse()
8722        }
8723    }
8724    impl ::std::convert::TryFrom<&::std::string::String> for EmailAuthenticationType {
8725        type Error = self::error::ConversionError;
8726        fn try_from(
8727            value: &::std::string::String,
8728        ) -> ::std::result::Result<Self, self::error::ConversionError> {
8729            value.parse()
8730        }
8731    }
8732    impl ::std::convert::TryFrom<::std::string::String> for EmailAuthenticationType {
8733        type Error = self::error::ConversionError;
8734        fn try_from(
8735            value: ::std::string::String,
8736        ) -> ::std::result::Result<Self, self::error::ConversionError> {
8737            value.parse()
8738        }
8739    }
8740    ///Information about the end user.
8741    ///
8742    /// <details><summary>JSON schema</summary>
8743    ///
8744    /// ```json
8745    ///{
8746    ///  "description": "Information about the end user.",
8747    ///  "type": "object",
8748    ///  "required": [
8749    ///    "authenticationMethods",
8750    ///    "createdAt",
8751    ///    "evmAccountObjects",
8752    ///    "evmAccounts",
8753    ///    "evmSmartAccountObjects",
8754    ///    "evmSmartAccounts",
8755    ///    "solanaAccountObjects",
8756    ///    "solanaAccounts",
8757    ///    "userId"
8758    ///  ],
8759    ///  "properties": {
8760    ///    "authenticationMethods": {
8761    ///      "$ref": "#/components/schemas/AuthenticationMethods"
8762    ///    },
8763    ///    "createdAt": {
8764    ///      "description": "The date and time when the end user was created, in ISO 8601 format.",
8765    ///      "examples": [
8766    ///        "2025-01-15T10:30:00Z"
8767    ///      ],
8768    ///      "type": "string",
8769    ///      "format": "date-time"
8770    ///    },
8771    ///    "evmAccountObjects": {
8772    ///      "description": "The list of EVM accounts associated with the end user. End users can have up to 10 EVM accounts.",
8773    ///      "examples": [
8774    ///        [
8775    ///          {
8776    ///            "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
8777    ///            "createdAt": "2025-01-15T10:30:00Z"
8778    ///          },
8779    ///          {
8780    ///            "address": "0x1234567890abcdef1234567890abcdef12345678",
8781    ///            "createdAt": "2025-01-15T11:00:00Z"
8782    ///          }
8783    ///        ]
8784    ///      ],
8785    ///      "type": "array",
8786    ///      "items": {
8787    ///        "$ref": "#/components/schemas/EndUserEvmAccount"
8788    ///      }
8789    ///    },
8790    ///    "evmAccounts": {
8791    ///      "description": "**DEPRECATED**: Use `evmAccountObjects` instead for richer account information. The list of EVM account addresses associated with the end user. End users can have up to 10 EVM accounts.",
8792    ///      "deprecated": true,
8793    ///      "examples": [
8794    ///        [
8795    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
8796    ///        ]
8797    ///      ],
8798    ///      "type": "array",
8799    ///      "items": {
8800    ///        "description": "The address of the EVM account associated with the end user.",
8801    ///        "examples": [
8802    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
8803    ///        ],
8804    ///        "type": "string",
8805    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
8806    ///      }
8807    ///    },
8808    ///    "evmSmartAccountObjects": {
8809    ///      "description": "The list of EVM smart accounts associated with the end user. Each EVM EOA can own one smart account.",
8810    ///      "examples": [
8811    ///        [
8812    ///          {
8813    ///            "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
8814    ///            "createdAt": "2025-01-15T12:00:00Z",
8815    ///            "ownerAddresses": [
8816    ///              "0x1234567890abcdef1234567890abcdef12345678",
8817    ///              "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"
8818    ///            ]
8819    ///          }
8820    ///        ]
8821    ///      ],
8822    ///      "type": "array",
8823    ///      "items": {
8824    ///        "$ref": "#/components/schemas/EndUserEvmSmartAccount"
8825    ///      }
8826    ///    },
8827    ///    "evmSmartAccounts": {
8828    ///      "description": "**DEPRECATED**: Use `evmSmartAccountObjects` instead for richer account information including owner relationships. The list of EVM smart account addresses associated with the end user. Each EVM EOA can own one smart account.",
8829    ///      "deprecated": true,
8830    ///      "examples": [
8831    ///        [
8832    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
8833    ///        ]
8834    ///      ],
8835    ///      "type": "array",
8836    ///      "items": {
8837    ///        "description": "The address of the EVM smart account associated with the end user.",
8838    ///        "examples": [
8839    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
8840    ///        ],
8841    ///        "type": "string",
8842    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
8843    ///      }
8844    ///    },
8845    ///    "solanaAccountObjects": {
8846    ///      "description": "The list of Solana accounts associated with the end user. End users can have up to 10 Solana accounts.",
8847    ///      "examples": [
8848    ///        [
8849    ///          {
8850    ///            "address": "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT",
8851    ///            "createdAt": "2025-01-15T10:30:00Z"
8852    ///          },
8853    ///          {
8854    ///            "address": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
8855    ///            "createdAt": "2025-01-15T11:30:00Z"
8856    ///          }
8857    ///        ]
8858    ///      ],
8859    ///      "type": "array",
8860    ///      "items": {
8861    ///        "$ref": "#/components/schemas/EndUserSolanaAccount"
8862    ///      }
8863    ///    },
8864    ///    "solanaAccounts": {
8865    ///      "description": "**DEPRECATED**: Use `solanaAccountObjects` instead for richer account information. The list of Solana account addresses associated with the end user. End users can have up to 10 Solana accounts.",
8866    ///      "deprecated": true,
8867    ///      "examples": [
8868    ///        [
8869    ///          "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
8870    ///        ]
8871    ///      ],
8872    ///      "type": "array",
8873    ///      "items": {
8874    ///        "description": "The base58 encoded address of the Solana account associated with the end user.",
8875    ///        "examples": [
8876    ///          "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
8877    ///        ],
8878    ///        "type": "string",
8879    ///        "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
8880    ///      }
8881    ///    },
8882    ///    "userId": {
8883    ///      "description": "A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.",
8884    ///      "examples": [
8885    ///        "e051beeb-7163-4527-a5b6-35e301529ff2"
8886    ///      ],
8887    ///      "type": "string",
8888    ///      "pattern": "^[a-zA-Z0-9-]{1,100}$"
8889    ///    }
8890    ///  }
8891    ///}
8892    /// ```
8893    /// </details>
8894    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8895    pub struct EndUser {
8896        #[serde(rename = "authenticationMethods")]
8897        pub authentication_methods: AuthenticationMethods,
8898        ///The date and time when the end user was created, in ISO 8601 format.
8899        #[serde(rename = "createdAt")]
8900        pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
8901        ///The list of EVM accounts associated with the end user. End users can have up to 10 EVM accounts.
8902        #[serde(rename = "evmAccountObjects")]
8903        pub evm_account_objects: ::std::vec::Vec<EndUserEvmAccount>,
8904        ///**DEPRECATED**: Use `evmAccountObjects` instead for richer account information. The list of EVM account addresses associated with the end user. End users can have up to 10 EVM accounts.
8905        #[serde(rename = "evmAccounts")]
8906        pub evm_accounts: ::std::vec::Vec<EndUserEvmAccountsItem>,
8907        ///The list of EVM smart accounts associated with the end user. Each EVM EOA can own one smart account.
8908        #[serde(rename = "evmSmartAccountObjects")]
8909        pub evm_smart_account_objects: ::std::vec::Vec<EndUserEvmSmartAccount>,
8910        ///**DEPRECATED**: Use `evmSmartAccountObjects` instead for richer account information including owner relationships. The list of EVM smart account addresses associated with the end user. Each EVM EOA can own one smart account.
8911        #[serde(rename = "evmSmartAccounts")]
8912        pub evm_smart_accounts: ::std::vec::Vec<EndUserEvmSmartAccountsItem>,
8913        ///The list of Solana accounts associated with the end user. End users can have up to 10 Solana accounts.
8914        #[serde(rename = "solanaAccountObjects")]
8915        pub solana_account_objects: ::std::vec::Vec<EndUserSolanaAccount>,
8916        ///**DEPRECATED**: Use `solanaAccountObjects` instead for richer account information. The list of Solana account addresses associated with the end user. End users can have up to 10 Solana accounts.
8917        #[serde(rename = "solanaAccounts")]
8918        pub solana_accounts: ::std::vec::Vec<EndUserSolanaAccountsItem>,
8919        ///A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.
8920        #[serde(rename = "userId")]
8921        pub user_id: EndUserUserId,
8922    }
8923    impl ::std::convert::From<&EndUser> for EndUser {
8924        fn from(value: &EndUser) -> Self {
8925            value.clone()
8926        }
8927    }
8928    impl EndUser {
8929        pub fn builder() -> builder::EndUser {
8930            Default::default()
8931        }
8932    }
8933    ///Information about an EVM account associated with an end user.
8934    ///
8935    /// <details><summary>JSON schema</summary>
8936    ///
8937    /// ```json
8938    ///{
8939    ///  "description": "Information about an EVM account associated with an end user.",
8940    ///  "type": "object",
8941    ///  "required": [
8942    ///    "address",
8943    ///    "createdAt"
8944    ///  ],
8945    ///  "properties": {
8946    ///    "address": {
8947    ///      "description": "The address of the EVM account.",
8948    ///      "examples": [
8949    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
8950    ///      ],
8951    ///      "type": "string",
8952    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
8953    ///    },
8954    ///    "createdAt": {
8955    ///      "description": "The date and time when the account was created, in ISO 8601 format.",
8956    ///      "examples": [
8957    ///        "2025-01-15T10:30:00Z"
8958    ///      ],
8959    ///      "type": "string",
8960    ///      "format": "date-time"
8961    ///    }
8962    ///  }
8963    ///}
8964    /// ```
8965    /// </details>
8966    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8967    pub struct EndUserEvmAccount {
8968        ///The address of the EVM account.
8969        pub address: EndUserEvmAccountAddress,
8970        ///The date and time when the account was created, in ISO 8601 format.
8971        #[serde(rename = "createdAt")]
8972        pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
8973    }
8974    impl ::std::convert::From<&EndUserEvmAccount> for EndUserEvmAccount {
8975        fn from(value: &EndUserEvmAccount) -> Self {
8976            value.clone()
8977        }
8978    }
8979    impl EndUserEvmAccount {
8980        pub fn builder() -> builder::EndUserEvmAccount {
8981            Default::default()
8982        }
8983    }
8984    ///The address of the EVM account.
8985    ///
8986    /// <details><summary>JSON schema</summary>
8987    ///
8988    /// ```json
8989    ///{
8990    ///  "description": "The address of the EVM account.",
8991    ///  "examples": [
8992    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
8993    ///  ],
8994    ///  "type": "string",
8995    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
8996    ///}
8997    /// ```
8998    /// </details>
8999    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9000    #[serde(transparent)]
9001    pub struct EndUserEvmAccountAddress(::std::string::String);
9002    impl ::std::ops::Deref for EndUserEvmAccountAddress {
9003        type Target = ::std::string::String;
9004        fn deref(&self) -> &::std::string::String {
9005            &self.0
9006        }
9007    }
9008    impl ::std::convert::From<EndUserEvmAccountAddress> for ::std::string::String {
9009        fn from(value: EndUserEvmAccountAddress) -> Self {
9010            value.0
9011        }
9012    }
9013    impl ::std::convert::From<&EndUserEvmAccountAddress> for EndUserEvmAccountAddress {
9014        fn from(value: &EndUserEvmAccountAddress) -> Self {
9015            value.clone()
9016        }
9017    }
9018    impl ::std::str::FromStr for EndUserEvmAccountAddress {
9019        type Err = self::error::ConversionError;
9020        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9021            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
9022                ::std::sync::LazyLock::new(|| {
9023                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
9024                });
9025            if PATTERN.find(value).is_none() {
9026                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
9027            }
9028            Ok(Self(value.to_string()))
9029        }
9030    }
9031    impl ::std::convert::TryFrom<&str> for EndUserEvmAccountAddress {
9032        type Error = self::error::ConversionError;
9033        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9034            value.parse()
9035        }
9036    }
9037    impl ::std::convert::TryFrom<&::std::string::String> for EndUserEvmAccountAddress {
9038        type Error = self::error::ConversionError;
9039        fn try_from(
9040            value: &::std::string::String,
9041        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9042            value.parse()
9043        }
9044    }
9045    impl ::std::convert::TryFrom<::std::string::String> for EndUserEvmAccountAddress {
9046        type Error = self::error::ConversionError;
9047        fn try_from(
9048            value: ::std::string::String,
9049        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9050            value.parse()
9051        }
9052    }
9053    impl<'de> ::serde::Deserialize<'de> for EndUserEvmAccountAddress {
9054        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
9055        where
9056            D: ::serde::Deserializer<'de>,
9057        {
9058            ::std::string::String::deserialize(deserializer)?
9059                .parse()
9060                .map_err(|e: self::error::ConversionError| {
9061                    <D::Error as ::serde::de::Error>::custom(e.to_string())
9062                })
9063        }
9064    }
9065    ///The address of the EVM account associated with the end user.
9066    ///
9067    /// <details><summary>JSON schema</summary>
9068    ///
9069    /// ```json
9070    ///{
9071    ///  "description": "The address of the EVM account associated with the end user.",
9072    ///  "examples": [
9073    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
9074    ///  ],
9075    ///  "type": "string",
9076    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
9077    ///}
9078    /// ```
9079    /// </details>
9080    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9081    #[serde(transparent)]
9082    pub struct EndUserEvmAccountsItem(::std::string::String);
9083    impl ::std::ops::Deref for EndUserEvmAccountsItem {
9084        type Target = ::std::string::String;
9085        fn deref(&self) -> &::std::string::String {
9086            &self.0
9087        }
9088    }
9089    impl ::std::convert::From<EndUserEvmAccountsItem> for ::std::string::String {
9090        fn from(value: EndUserEvmAccountsItem) -> Self {
9091            value.0
9092        }
9093    }
9094    impl ::std::convert::From<&EndUserEvmAccountsItem> for EndUserEvmAccountsItem {
9095        fn from(value: &EndUserEvmAccountsItem) -> Self {
9096            value.clone()
9097        }
9098    }
9099    impl ::std::str::FromStr for EndUserEvmAccountsItem {
9100        type Err = self::error::ConversionError;
9101        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9102            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
9103                ::std::sync::LazyLock::new(|| {
9104                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
9105                });
9106            if PATTERN.find(value).is_none() {
9107                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
9108            }
9109            Ok(Self(value.to_string()))
9110        }
9111    }
9112    impl ::std::convert::TryFrom<&str> for EndUserEvmAccountsItem {
9113        type Error = self::error::ConversionError;
9114        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9115            value.parse()
9116        }
9117    }
9118    impl ::std::convert::TryFrom<&::std::string::String> for EndUserEvmAccountsItem {
9119        type Error = self::error::ConversionError;
9120        fn try_from(
9121            value: &::std::string::String,
9122        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9123            value.parse()
9124        }
9125    }
9126    impl ::std::convert::TryFrom<::std::string::String> for EndUserEvmAccountsItem {
9127        type Error = self::error::ConversionError;
9128        fn try_from(
9129            value: ::std::string::String,
9130        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9131            value.parse()
9132        }
9133    }
9134    impl<'de> ::serde::Deserialize<'de> for EndUserEvmAccountsItem {
9135        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
9136        where
9137            D: ::serde::Deserializer<'de>,
9138        {
9139            ::std::string::String::deserialize(deserializer)?
9140                .parse()
9141                .map_err(|e: self::error::ConversionError| {
9142                    <D::Error as ::serde::de::Error>::custom(e.to_string())
9143                })
9144        }
9145    }
9146    ///Information about an EVM smart account associated with an end user.
9147    ///
9148    /// <details><summary>JSON schema</summary>
9149    ///
9150    /// ```json
9151    ///{
9152    ///  "description": "Information about an EVM smart account associated with an end user.",
9153    ///  "type": "object",
9154    ///  "required": [
9155    ///    "address",
9156    ///    "createdAt",
9157    ///    "ownerAddresses"
9158    ///  ],
9159    ///  "properties": {
9160    ///    "address": {
9161    ///      "description": "The address of the EVM smart account.",
9162    ///      "examples": [
9163    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
9164    ///      ],
9165    ///      "type": "string",
9166    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
9167    ///    },
9168    ///    "createdAt": {
9169    ///      "description": "The date and time when the account was created, in ISO 8601 format.",
9170    ///      "examples": [
9171    ///        "2025-01-15T10:30:00Z"
9172    ///      ],
9173    ///      "type": "string",
9174    ///      "format": "date-time"
9175    ///    },
9176    ///    "ownerAddresses": {
9177    ///      "description": "The addresses of the EVM EOA accounts that own this smart account. Smart accounts can have multiple owners, such as when spend permissions are enabled.",
9178    ///      "examples": [
9179    ///        [
9180    ///          "0x1234567890abcdef1234567890abcdef12345678",
9181    ///          "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"
9182    ///        ]
9183    ///      ],
9184    ///      "type": "array",
9185    ///      "items": {
9186    ///        "description": "The address of an EVM EOA account that owns this smart account.",
9187    ///        "examples": [
9188    ///          "0x1234567890abcdef1234567890abcdef12345678"
9189    ///        ],
9190    ///        "type": "string",
9191    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
9192    ///      }
9193    ///    }
9194    ///  }
9195    ///}
9196    /// ```
9197    /// </details>
9198    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9199    pub struct EndUserEvmSmartAccount {
9200        ///The address of the EVM smart account.
9201        pub address: EndUserEvmSmartAccountAddress,
9202        ///The date and time when the account was created, in ISO 8601 format.
9203        #[serde(rename = "createdAt")]
9204        pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
9205        ///The addresses of the EVM EOA accounts that own this smart account. Smart accounts can have multiple owners, such as when spend permissions are enabled.
9206        #[serde(rename = "ownerAddresses")]
9207        pub owner_addresses: ::std::vec::Vec<EndUserEvmSmartAccountOwnerAddressesItem>,
9208    }
9209    impl ::std::convert::From<&EndUserEvmSmartAccount> for EndUserEvmSmartAccount {
9210        fn from(value: &EndUserEvmSmartAccount) -> Self {
9211            value.clone()
9212        }
9213    }
9214    impl EndUserEvmSmartAccount {
9215        pub fn builder() -> builder::EndUserEvmSmartAccount {
9216            Default::default()
9217        }
9218    }
9219    ///The address of the EVM smart account.
9220    ///
9221    /// <details><summary>JSON schema</summary>
9222    ///
9223    /// ```json
9224    ///{
9225    ///  "description": "The address of the EVM smart account.",
9226    ///  "examples": [
9227    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
9228    ///  ],
9229    ///  "type": "string",
9230    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
9231    ///}
9232    /// ```
9233    /// </details>
9234    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9235    #[serde(transparent)]
9236    pub struct EndUserEvmSmartAccountAddress(::std::string::String);
9237    impl ::std::ops::Deref for EndUserEvmSmartAccountAddress {
9238        type Target = ::std::string::String;
9239        fn deref(&self) -> &::std::string::String {
9240            &self.0
9241        }
9242    }
9243    impl ::std::convert::From<EndUserEvmSmartAccountAddress> for ::std::string::String {
9244        fn from(value: EndUserEvmSmartAccountAddress) -> Self {
9245            value.0
9246        }
9247    }
9248    impl ::std::convert::From<&EndUserEvmSmartAccountAddress> for EndUserEvmSmartAccountAddress {
9249        fn from(value: &EndUserEvmSmartAccountAddress) -> Self {
9250            value.clone()
9251        }
9252    }
9253    impl ::std::str::FromStr for EndUserEvmSmartAccountAddress {
9254        type Err = self::error::ConversionError;
9255        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9256            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
9257                ::std::sync::LazyLock::new(|| {
9258                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
9259                });
9260            if PATTERN.find(value).is_none() {
9261                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
9262            }
9263            Ok(Self(value.to_string()))
9264        }
9265    }
9266    impl ::std::convert::TryFrom<&str> for EndUserEvmSmartAccountAddress {
9267        type Error = self::error::ConversionError;
9268        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9269            value.parse()
9270        }
9271    }
9272    impl ::std::convert::TryFrom<&::std::string::String> for EndUserEvmSmartAccountAddress {
9273        type Error = self::error::ConversionError;
9274        fn try_from(
9275            value: &::std::string::String,
9276        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9277            value.parse()
9278        }
9279    }
9280    impl ::std::convert::TryFrom<::std::string::String> for EndUserEvmSmartAccountAddress {
9281        type Error = self::error::ConversionError;
9282        fn try_from(
9283            value: ::std::string::String,
9284        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9285            value.parse()
9286        }
9287    }
9288    impl<'de> ::serde::Deserialize<'de> for EndUserEvmSmartAccountAddress {
9289        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
9290        where
9291            D: ::serde::Deserializer<'de>,
9292        {
9293            ::std::string::String::deserialize(deserializer)?
9294                .parse()
9295                .map_err(|e: self::error::ConversionError| {
9296                    <D::Error as ::serde::de::Error>::custom(e.to_string())
9297                })
9298        }
9299    }
9300    ///The address of an EVM EOA account that owns this smart account.
9301    ///
9302    /// <details><summary>JSON schema</summary>
9303    ///
9304    /// ```json
9305    ///{
9306    ///  "description": "The address of an EVM EOA account that owns this smart account.",
9307    ///  "examples": [
9308    ///    "0x1234567890abcdef1234567890abcdef12345678"
9309    ///  ],
9310    ///  "type": "string",
9311    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
9312    ///}
9313    /// ```
9314    /// </details>
9315    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9316    #[serde(transparent)]
9317    pub struct EndUserEvmSmartAccountOwnerAddressesItem(::std::string::String);
9318    impl ::std::ops::Deref for EndUserEvmSmartAccountOwnerAddressesItem {
9319        type Target = ::std::string::String;
9320        fn deref(&self) -> &::std::string::String {
9321            &self.0
9322        }
9323    }
9324    impl ::std::convert::From<EndUserEvmSmartAccountOwnerAddressesItem> for ::std::string::String {
9325        fn from(value: EndUserEvmSmartAccountOwnerAddressesItem) -> Self {
9326            value.0
9327        }
9328    }
9329    impl ::std::convert::From<&EndUserEvmSmartAccountOwnerAddressesItem>
9330        for EndUserEvmSmartAccountOwnerAddressesItem
9331    {
9332        fn from(value: &EndUserEvmSmartAccountOwnerAddressesItem) -> Self {
9333            value.clone()
9334        }
9335    }
9336    impl ::std::str::FromStr for EndUserEvmSmartAccountOwnerAddressesItem {
9337        type Err = self::error::ConversionError;
9338        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9339            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
9340                ::std::sync::LazyLock::new(|| {
9341                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
9342                });
9343            if PATTERN.find(value).is_none() {
9344                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
9345            }
9346            Ok(Self(value.to_string()))
9347        }
9348    }
9349    impl ::std::convert::TryFrom<&str> for EndUserEvmSmartAccountOwnerAddressesItem {
9350        type Error = self::error::ConversionError;
9351        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9352            value.parse()
9353        }
9354    }
9355    impl ::std::convert::TryFrom<&::std::string::String> for EndUserEvmSmartAccountOwnerAddressesItem {
9356        type Error = self::error::ConversionError;
9357        fn try_from(
9358            value: &::std::string::String,
9359        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9360            value.parse()
9361        }
9362    }
9363    impl ::std::convert::TryFrom<::std::string::String> for EndUserEvmSmartAccountOwnerAddressesItem {
9364        type Error = self::error::ConversionError;
9365        fn try_from(
9366            value: ::std::string::String,
9367        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9368            value.parse()
9369        }
9370    }
9371    impl<'de> ::serde::Deserialize<'de> for EndUserEvmSmartAccountOwnerAddressesItem {
9372        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
9373        where
9374            D: ::serde::Deserializer<'de>,
9375        {
9376            ::std::string::String::deserialize(deserializer)?
9377                .parse()
9378                .map_err(|e: self::error::ConversionError| {
9379                    <D::Error as ::serde::de::Error>::custom(e.to_string())
9380                })
9381        }
9382    }
9383    ///The address of the EVM smart account associated with the end user.
9384    ///
9385    /// <details><summary>JSON schema</summary>
9386    ///
9387    /// ```json
9388    ///{
9389    ///  "description": "The address of the EVM smart account associated with the end user.",
9390    ///  "examples": [
9391    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
9392    ///  ],
9393    ///  "type": "string",
9394    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
9395    ///}
9396    /// ```
9397    /// </details>
9398    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9399    #[serde(transparent)]
9400    pub struct EndUserEvmSmartAccountsItem(::std::string::String);
9401    impl ::std::ops::Deref for EndUserEvmSmartAccountsItem {
9402        type Target = ::std::string::String;
9403        fn deref(&self) -> &::std::string::String {
9404            &self.0
9405        }
9406    }
9407    impl ::std::convert::From<EndUserEvmSmartAccountsItem> for ::std::string::String {
9408        fn from(value: EndUserEvmSmartAccountsItem) -> Self {
9409            value.0
9410        }
9411    }
9412    impl ::std::convert::From<&EndUserEvmSmartAccountsItem> for EndUserEvmSmartAccountsItem {
9413        fn from(value: &EndUserEvmSmartAccountsItem) -> Self {
9414            value.clone()
9415        }
9416    }
9417    impl ::std::str::FromStr for EndUserEvmSmartAccountsItem {
9418        type Err = self::error::ConversionError;
9419        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9420            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
9421                ::std::sync::LazyLock::new(|| {
9422                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
9423                });
9424            if PATTERN.find(value).is_none() {
9425                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
9426            }
9427            Ok(Self(value.to_string()))
9428        }
9429    }
9430    impl ::std::convert::TryFrom<&str> for EndUserEvmSmartAccountsItem {
9431        type Error = self::error::ConversionError;
9432        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9433            value.parse()
9434        }
9435    }
9436    impl ::std::convert::TryFrom<&::std::string::String> for EndUserEvmSmartAccountsItem {
9437        type Error = self::error::ConversionError;
9438        fn try_from(
9439            value: &::std::string::String,
9440        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9441            value.parse()
9442        }
9443    }
9444    impl ::std::convert::TryFrom<::std::string::String> for EndUserEvmSmartAccountsItem {
9445        type Error = self::error::ConversionError;
9446        fn try_from(
9447            value: ::std::string::String,
9448        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9449            value.parse()
9450        }
9451    }
9452    impl<'de> ::serde::Deserialize<'de> for EndUserEvmSmartAccountsItem {
9453        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
9454        where
9455            D: ::serde::Deserializer<'de>,
9456        {
9457            ::std::string::String::deserialize(deserializer)?
9458                .parse()
9459                .map_err(|e: self::error::ConversionError| {
9460                    <D::Error as ::serde::de::Error>::custom(e.to_string())
9461                })
9462        }
9463    }
9464    ///Information about a Solana account associated with an end user.
9465    ///
9466    /// <details><summary>JSON schema</summary>
9467    ///
9468    /// ```json
9469    ///{
9470    ///  "description": "Information about a Solana account associated with an end user.",
9471    ///  "type": "object",
9472    ///  "required": [
9473    ///    "address",
9474    ///    "createdAt"
9475    ///  ],
9476    ///  "properties": {
9477    ///    "address": {
9478    ///      "description": "The base58 encoded address of the Solana account.",
9479    ///      "examples": [
9480    ///        "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
9481    ///      ],
9482    ///      "type": "string",
9483    ///      "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
9484    ///    },
9485    ///    "createdAt": {
9486    ///      "description": "The date and time when the account was created, in ISO 8601 format.",
9487    ///      "examples": [
9488    ///        "2025-01-15T10:30:00Z"
9489    ///      ],
9490    ///      "type": "string",
9491    ///      "format": "date-time"
9492    ///    }
9493    ///  }
9494    ///}
9495    /// ```
9496    /// </details>
9497    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9498    pub struct EndUserSolanaAccount {
9499        ///The base58 encoded address of the Solana account.
9500        pub address: EndUserSolanaAccountAddress,
9501        ///The date and time when the account was created, in ISO 8601 format.
9502        #[serde(rename = "createdAt")]
9503        pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
9504    }
9505    impl ::std::convert::From<&EndUserSolanaAccount> for EndUserSolanaAccount {
9506        fn from(value: &EndUserSolanaAccount) -> Self {
9507            value.clone()
9508        }
9509    }
9510    impl EndUserSolanaAccount {
9511        pub fn builder() -> builder::EndUserSolanaAccount {
9512            Default::default()
9513        }
9514    }
9515    ///The base58 encoded address of the Solana account.
9516    ///
9517    /// <details><summary>JSON schema</summary>
9518    ///
9519    /// ```json
9520    ///{
9521    ///  "description": "The base58 encoded address of the Solana account.",
9522    ///  "examples": [
9523    ///    "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
9524    ///  ],
9525    ///  "type": "string",
9526    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
9527    ///}
9528    /// ```
9529    /// </details>
9530    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9531    #[serde(transparent)]
9532    pub struct EndUserSolanaAccountAddress(::std::string::String);
9533    impl ::std::ops::Deref for EndUserSolanaAccountAddress {
9534        type Target = ::std::string::String;
9535        fn deref(&self) -> &::std::string::String {
9536            &self.0
9537        }
9538    }
9539    impl ::std::convert::From<EndUserSolanaAccountAddress> for ::std::string::String {
9540        fn from(value: EndUserSolanaAccountAddress) -> Self {
9541            value.0
9542        }
9543    }
9544    impl ::std::convert::From<&EndUserSolanaAccountAddress> for EndUserSolanaAccountAddress {
9545        fn from(value: &EndUserSolanaAccountAddress) -> Self {
9546            value.clone()
9547        }
9548    }
9549    impl ::std::str::FromStr for EndUserSolanaAccountAddress {
9550        type Err = self::error::ConversionError;
9551        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9552            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
9553                ::std::sync::LazyLock::new(|| {
9554                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
9555                });
9556            if PATTERN.find(value).is_none() {
9557                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
9558            }
9559            Ok(Self(value.to_string()))
9560        }
9561    }
9562    impl ::std::convert::TryFrom<&str> for EndUserSolanaAccountAddress {
9563        type Error = self::error::ConversionError;
9564        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9565            value.parse()
9566        }
9567    }
9568    impl ::std::convert::TryFrom<&::std::string::String> for EndUserSolanaAccountAddress {
9569        type Error = self::error::ConversionError;
9570        fn try_from(
9571            value: &::std::string::String,
9572        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9573            value.parse()
9574        }
9575    }
9576    impl ::std::convert::TryFrom<::std::string::String> for EndUserSolanaAccountAddress {
9577        type Error = self::error::ConversionError;
9578        fn try_from(
9579            value: ::std::string::String,
9580        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9581            value.parse()
9582        }
9583    }
9584    impl<'de> ::serde::Deserialize<'de> for EndUserSolanaAccountAddress {
9585        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
9586        where
9587            D: ::serde::Deserializer<'de>,
9588        {
9589            ::std::string::String::deserialize(deserializer)?
9590                .parse()
9591                .map_err(|e: self::error::ConversionError| {
9592                    <D::Error as ::serde::de::Error>::custom(e.to_string())
9593                })
9594        }
9595    }
9596    ///The base58 encoded address of the Solana account associated with the end user.
9597    ///
9598    /// <details><summary>JSON schema</summary>
9599    ///
9600    /// ```json
9601    ///{
9602    ///  "description": "The base58 encoded address of the Solana account associated with the end user.",
9603    ///  "examples": [
9604    ///    "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
9605    ///  ],
9606    ///  "type": "string",
9607    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
9608    ///}
9609    /// ```
9610    /// </details>
9611    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9612    #[serde(transparent)]
9613    pub struct EndUserSolanaAccountsItem(::std::string::String);
9614    impl ::std::ops::Deref for EndUserSolanaAccountsItem {
9615        type Target = ::std::string::String;
9616        fn deref(&self) -> &::std::string::String {
9617            &self.0
9618        }
9619    }
9620    impl ::std::convert::From<EndUserSolanaAccountsItem> for ::std::string::String {
9621        fn from(value: EndUserSolanaAccountsItem) -> Self {
9622            value.0
9623        }
9624    }
9625    impl ::std::convert::From<&EndUserSolanaAccountsItem> for EndUserSolanaAccountsItem {
9626        fn from(value: &EndUserSolanaAccountsItem) -> Self {
9627            value.clone()
9628        }
9629    }
9630    impl ::std::str::FromStr for EndUserSolanaAccountsItem {
9631        type Err = self::error::ConversionError;
9632        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9633            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
9634                ::std::sync::LazyLock::new(|| {
9635                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
9636                });
9637            if PATTERN.find(value).is_none() {
9638                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
9639            }
9640            Ok(Self(value.to_string()))
9641        }
9642    }
9643    impl ::std::convert::TryFrom<&str> for EndUserSolanaAccountsItem {
9644        type Error = self::error::ConversionError;
9645        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9646            value.parse()
9647        }
9648    }
9649    impl ::std::convert::TryFrom<&::std::string::String> for EndUserSolanaAccountsItem {
9650        type Error = self::error::ConversionError;
9651        fn try_from(
9652            value: &::std::string::String,
9653        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9654            value.parse()
9655        }
9656    }
9657    impl ::std::convert::TryFrom<::std::string::String> for EndUserSolanaAccountsItem {
9658        type Error = self::error::ConversionError;
9659        fn try_from(
9660            value: ::std::string::String,
9661        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9662            value.parse()
9663        }
9664    }
9665    impl<'de> ::serde::Deserialize<'de> for EndUserSolanaAccountsItem {
9666        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
9667        where
9668            D: ::serde::Deserializer<'de>,
9669        {
9670            ::std::string::String::deserialize(deserializer)?
9671                .parse()
9672                .map_err(|e: self::error::ConversionError| {
9673                    <D::Error as ::serde::de::Error>::custom(e.to_string())
9674                })
9675        }
9676    }
9677    ///A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.
9678    ///
9679    /// <details><summary>JSON schema</summary>
9680    ///
9681    /// ```json
9682    ///{
9683    ///  "description": "A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.",
9684    ///  "examples": [
9685    ///    "e051beeb-7163-4527-a5b6-35e301529ff2"
9686    ///  ],
9687    ///  "type": "string",
9688    ///  "pattern": "^[a-zA-Z0-9-]{1,100}$"
9689    ///}
9690    /// ```
9691    /// </details>
9692    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9693    #[serde(transparent)]
9694    pub struct EndUserUserId(::std::string::String);
9695    impl ::std::ops::Deref for EndUserUserId {
9696        type Target = ::std::string::String;
9697        fn deref(&self) -> &::std::string::String {
9698            &self.0
9699        }
9700    }
9701    impl ::std::convert::From<EndUserUserId> for ::std::string::String {
9702        fn from(value: EndUserUserId) -> Self {
9703            value.0
9704        }
9705    }
9706    impl ::std::convert::From<&EndUserUserId> for EndUserUserId {
9707        fn from(value: &EndUserUserId) -> Self {
9708            value.clone()
9709        }
9710    }
9711    impl ::std::str::FromStr for EndUserUserId {
9712        type Err = self::error::ConversionError;
9713        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9714            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
9715                ::std::sync::LazyLock::new(|| {
9716                    ::regress::Regex::new("^[a-zA-Z0-9-]{1,100}$").unwrap()
9717                });
9718            if PATTERN.find(value).is_none() {
9719                return Err("doesn't match pattern \"^[a-zA-Z0-9-]{1,100}$\"".into());
9720            }
9721            Ok(Self(value.to_string()))
9722        }
9723    }
9724    impl ::std::convert::TryFrom<&str> for EndUserUserId {
9725        type Error = self::error::ConversionError;
9726        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
9727            value.parse()
9728        }
9729    }
9730    impl ::std::convert::TryFrom<&::std::string::String> for EndUserUserId {
9731        type Error = self::error::ConversionError;
9732        fn try_from(
9733            value: &::std::string::String,
9734        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9735            value.parse()
9736        }
9737    }
9738    impl ::std::convert::TryFrom<::std::string::String> for EndUserUserId {
9739        type Error = self::error::ConversionError;
9740        fn try_from(
9741            value: ::std::string::String,
9742        ) -> ::std::result::Result<Self, self::error::ConversionError> {
9743            value.parse()
9744        }
9745    }
9746    impl<'de> ::serde::Deserialize<'de> for EndUserUserId {
9747        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
9748        where
9749            D: ::serde::Deserializer<'de>,
9750        {
9751            ::std::string::String::deserialize(deserializer)?
9752                .parse()
9753                .map_err(|e: self::error::ConversionError| {
9754                    <D::Error as ::serde::de::Error>::custom(e.to_string())
9755                })
9756        }
9757    }
9758    ///An error response including the code for the type of error and a human-readable message describing the error.
9759    ///
9760    /// <details><summary>JSON schema</summary>
9761    ///
9762    /// ```json
9763    ///{
9764    ///  "description": "An error response including the code for the type of error and a human-readable message describing the error.",
9765    ///  "examples": [
9766    ///    {
9767    ///      "correlationId": "41deb8d59a9dc9a7-IAD",
9768    ///      "errorLink": "https://docs.cdp.coinbase.com/api-reference/v2/errors#invalid-request",
9769    ///      "errorMessage": "Invalid request.",
9770    ///      "errorType": "invalid_request"
9771    ///    }
9772    ///  ],
9773    ///  "type": "object",
9774    ///  "required": [
9775    ///    "errorMessage",
9776    ///    "errorType"
9777    ///  ],
9778    ///  "properties": {
9779    ///    "correlationId": {
9780    ///      "description": "A unique identifier for the request that generated the error. This can be used to help debug issues with the API.",
9781    ///      "examples": [
9782    ///        "41deb8d59a9dc9a7-IAD"
9783    ///      ],
9784    ///      "type": "string"
9785    ///    },
9786    ///    "errorLink": {
9787    ///      "description": "A link to the corresponding error documentation.",
9788    ///      "examples": [
9789    ///        "https://docs.cdp.coinbase.com/api-reference/v2/errors#invalid-request"
9790    ///      ],
9791    ///      "allOf": [
9792    ///        {
9793    ///          "$ref": "#/components/schemas/Url"
9794    ///        }
9795    ///      ]
9796    ///    },
9797    ///    "errorMessage": {
9798    ///      "description": "The error message.",
9799    ///      "examples": [
9800    ///        "Unable to create EVM account"
9801    ///      ],
9802    ///      "type": "string"
9803    ///    },
9804    ///    "errorType": {
9805    ///      "$ref": "#/components/schemas/ErrorType"
9806    ///    }
9807    ///  }
9808    ///}
9809    /// ```
9810    /// </details>
9811    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
9812    pub struct Error {
9813        ///A unique identifier for the request that generated the error. This can be used to help debug issues with the API.
9814        #[serde(
9815            rename = "correlationId",
9816            default,
9817            skip_serializing_if = "::std::option::Option::is_none"
9818        )]
9819        pub correlation_id: ::std::option::Option<::std::string::String>,
9820        ///A link to the corresponding error documentation.
9821        #[serde(
9822            rename = "errorLink",
9823            default,
9824            skip_serializing_if = "::std::option::Option::is_none"
9825        )]
9826        pub error_link: ::std::option::Option<Url>,
9827        ///The error message.
9828        #[serde(rename = "errorMessage")]
9829        pub error_message: ::std::string::String,
9830        #[serde(rename = "errorType")]
9831        pub error_type: ErrorType,
9832    }
9833    impl ::std::convert::From<&Error> for Error {
9834        fn from(value: &Error) -> Self {
9835            value.clone()
9836        }
9837    }
9838    impl Error {
9839        pub fn builder() -> builder::Error {
9840            Default::default()
9841        }
9842    }
9843    ///The code that indicates the type of error that occurred. These error codes can be used to determine how to handle the error.
9844    ///
9845    /// <details><summary>JSON schema</summary>
9846    ///
9847    /// ```json
9848    ///{
9849    ///  "description": "The code that indicates the type of error that occurred. These error codes can be used to determine how to handle the error.",
9850    ///  "examples": [
9851    ///    "invalid_request"
9852    ///  ],
9853    ///  "type": "string",
9854    ///  "enum": [
9855    ///    "already_exists",
9856    ///    "bad_gateway",
9857    ///    "faucet_limit_exceeded",
9858    ///    "forbidden",
9859    ///    "idempotency_error",
9860    ///    "internal_server_error",
9861    ///    "invalid_request",
9862    ///    "invalid_sql_query",
9863    ///    "invalid_signature",
9864    ///    "malformed_transaction",
9865    ///    "not_found",
9866    ///    "payment_method_required",
9867    ///    "rate_limit_exceeded",
9868    ///    "request_canceled",
9869    ///    "service_unavailable",
9870    ///    "timed_out",
9871    ///    "unauthorized",
9872    ///    "policy_violation",
9873    ///    "policy_in_use",
9874    ///    "account_limit_exceeded",
9875    ///    "network_not_tradable",
9876    ///    "guest_permission_denied",
9877    ///    "guest_region_forbidden",
9878    ///    "guest_transaction_limit",
9879    ///    "guest_transaction_count",
9880    ///    "phone_number_verification_expired",
9881    ///    "document_verification_failed",
9882    ///    "recipient_allowlist_violation",
9883    ///    "recipient_allowlist_pending",
9884    ///    "travel_rules_recipient_violation",
9885    ///    "transfer_amount_out_of_bounds",
9886    ///    "transfer_recipient_address_invalid",
9887    ///    "transfer_quote_expired",
9888    ///    "mfa_already_enrolled",
9889    ///    "mfa_invalid_code",
9890    ///    "mfa_flow_expired",
9891    ///    "mfa_required",
9892    ///    "mfa_not_enrolled"
9893    ///  ],
9894    ///  "x-error-instructions": {
9895    ///    "already_exists": "This error occurs when trying to create a resource that already exists.\n\n**Steps to resolve:**\n1. Check if the resource exists before creation\n2. Use GET endpoints to verify resource state\n3. Use unique identifiers/names for resources",
9896    ///    "bad_gateway": "This error occurs when the CDP API is unable to connect to the backend service.\n\n**Steps to resolve:**\n1. Retry your request after a short delay\n2. If persistent, contact CDP support with:\n   - The timestamp of the error\n   - Request details\n3. Consider implementing retry logic with an exponential backoff\n\n**Note:** These errors are automatically logged and monitored by CDP.",
9897    ///    "document_verification_failed": "This error occurs when the user has not verified their identity for their coinbase.com account.\n**Steps to resolve:**\n1. Verify your coinbase account identity with valid documents at https://www.coinbase.com/settings/account-levels.",
9898    ///    "faucet_limit_exceeded": "This error occurs when you've exceeded the faucet request limits.\n\n**Steps to resolve:**\n1. Wait for the time window to reset\n2. Use funds more efficiently in your testing\n\nFor more information on faucet limits, please visit the [EVM Faucet endpoint](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/faucets/request-funds-on-evm-test-networks) or the [Solana Faucet endpoint](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/faucets/request-funds-on-solana-devnet).",
9899    ///    "forbidden": "This error occurs when you don't have permission to access the resource.\n\n**Steps to resolve:**\n1. Verify your permissions to access the resource\n2. Ensure that you are the owner of the requested resource",
9900    ///    "guest_permission_denied": "This error occurs when the user is not allowed to complete onramp transactions as a guest.\n\n**Steps to resolve:**\n1. Redirect the user to create a Coinbase account to buy and send crypto.",
9901    ///    "guest_region_forbidden": "This error occurs when guest onramp transactions are not allowed in the user's region.\n\n**Steps to resolve:**\n1. Redirect the user to create a Coinbase account to buy and send crypto.",
9902    ///    "guest_transaction_count": "This error occurs when the user has reached the lifetime guest onramp transaction count limit.\n\n**Steps to resolve:**\n1. Redirect the user to create a Coinbase account to buy and send crypto.",
9903    ///    "guest_transaction_limit": "This error occurs when the user has reached the weekly guest onramp transaction limit.\n\n**Steps to resolve:**\n1. Inform the user they have reached their weekly limit and will have to wait until next week.",
9904    ///    "idempotency_error": "This error occurs when an idempotency key is reused with different parameters.\n\n**Steps to resolve:**\n1. Generate a new UUID v4 for each unique request\n2. Only reuse idempotency keys for exact request duplicates\n3. Track used keys within your application\n\n**Example idempotency key implementation:**\n```typescript lines wrap\nimport { v4 as uuidv4 } from 'uuid';\n\nfunction createIdempotencyKey() {\n  return uuidv4();\n}\n```",
9905    ///    "internal_server_error": "This indicates an unexpected error that occurred on the CDP servers.\n\n**Important**: If you encounter this error, please note that your operation's status should be treated as unknown by your application, as it could have been a success within the CDP back-end.\n\n**Steps to resolve:**\n1. Retry your request after a short delay\n2. If persistent, contact CDP support with:\n   - Your correlation ID\n   - Timestamp of the error\n   - Request details\n3. Consider implementing retry logic with an exponential backoff\n\n**Note:** These errors are automatically logged and monitored by CDP.",
9906    ///    "invalid_request": "This error occurs when the request is malformed or contains invalid data, including issues with the request body, query parameters, path parameters, or headers.\n\n**Steps to resolve:**\n1. Check all required fields and parameters are present\n2. Ensure request body (if applicable) follows the correct schema\n3. Verify all parameter formats match the API specification:\n   - Query parameters\n   - Path parameters\n   - Request headers\n4. Validate any addresses, IDs, or other formatted strings meet requirements\n\n**Common validation issues:**\n- Missing required parameters\n- Invalid parameter types or formats\n- Malformed JSON in request body\n- Invalid enum values",
9907    ///    "invalid_signature": "This error occurs when the signature provided for the given user operation is invalid.\n\n**Steps to resolve:**\n1. Verify the signature was generated by the correct owner account\n2. Ensure the signature corresponds to the exact user operation hash\n3. Check that the signature format matches the expected format\n4. Confirm you're using the correct network for the Smart Account\n\n**Common causes:**\n- Using wrong owner account to sign\n- Signing modified/incorrect user operation data\n- Malformed signature encoding\n- Network mismatch between signature and broadcast",
9908    ///    "invalid_sql_query": "This error occurs when the SQL query is invalid or not allowed.\n\n**Common causes:**\n- Using non-SELECT SQL statements (INSERT, UPDATE, DELETE, etc.)\n- Invalid table or column names\n- Syntax errors in SQL query\n- Query exceeds character limit\n- Too many JOIN operations",
9909    ///    "malformed_transaction": "This error occurs when the transaction data provided is not properly formatted or is invalid.\n\n**Steps to resolve:**\n1. Verify transaction encoding:\n   - **EVM networks**: Check RLP encoding is correct\n   - **Solana**: Validate base64 encoding\n2. Ensure all required transaction fields are present\n3. Validate transaction parameters are within acceptable ranges\n4. Check that the transaction type is supported on the target network (see our [Supported Networks](https://docs.cdp.coinbase.com/get-started/supported-networks) page for more details)\n\n**Common causes:**\n- Invalid hex encoding for EVM transactions\n- Missing required transaction fields\n- Incorrect parameter formats\n- Unsupported transaction types\n- Network-specific transaction format mismatches",
9910    ///    "mfa_already_enrolled": "This error occurs when attempting to enroll in an MFA method that the user has already enrolled in.\n\n**Steps to resolve:**\n1. Check if the user is already enrolled in the MFA method before initiating enrollment\n2. To update or reset MFA, remove the existing enrollment first (if supported)\n3. Use a different MFA method if multiple options are available",
9911    ///    "mfa_flow_expired": "This error occurs when the MFA enrollment or verification session has expired.\n\n**Steps to resolve:**\n1. Restart the MFA enrollment or verification flow\n2. Complete the flow within the allowed time window (typically 5 minutes)\n3. Ensure the user doesn't leave the flow idle for extended periods\n\n**Note:** MFA sessions expire automatically for security purposes.",
9912    ///    "mfa_invalid_code": "This error occurs when the MFA code provided is incorrect or has already been used.\n\n**Steps to resolve:**\n1. Verify the user entered the correct code from their authenticator app\n2. Ensure the code is current (TOTP codes expire after 30 seconds)\n3. Check that the device time is synchronized correctly\n4. Ask the user to generate a new code and try again\n\n**Common causes:**\n- Typing errors in the 6-digit code\n- Using an expired TOTP code\n- Device clock drift on user's authenticator app\n- Attempting to reuse a previously submitted code",
9913    ///    "mfa_not_enrolled": "This error occurs when attempting to verify MFA for a user who has not enrolled in any MFA method.\n\n**Steps to resolve:**\n1. Check if the user has enrolled in MFA before attempting verification\n2. Guide the user through MFA enrollment first using the `/mfa/enroll/{mfaMethod}/init` endpoint\n3. Complete enrollment before requiring MFA verification",
9914    ///    "mfa_required": "This error occurs when attempting to perform a sensitive operation that requires MFA verification, but the user has not completed MFA verification.\n\n**Steps to resolve:**\n1. Initiate the MFA verification flow using the `/mfa/verify/{mfaMethod}/init` endpoint\n2. Prompt the user to enter their MFA code\n3. Submit the verification using the `/mfa/verify/{mfaMethod}/submit` endpoint\n4. Use the returned access token with MFA claim for the sensitive operation\n5. Retry the original request with the new MFA-verified token\n\n**Operations requiring MFA:**\n- Transactions Sign/Send\n- Key export\n- Account management actions (when configured)",
9915    ///    "network_not_tradable": "This error occurs when the selected asset cannot be purchased on the selected network in the user's location.\n\n**Steps to resolve:**\n1. Verify the asset is tradable on the selected network\n2. Check the user's location to ensure it is allowed to purchase the asset on the selected network\n\n**Common causes:**\n- Users in NY are not allowed to purchase USDC on any network other than Ethereum",
9916    ///    "not_found": "This error occurs when the resource specified in your request doesn't exist or you don't have access to it.\n\n**Steps to resolve:**\n1. Verify the resource ID/address/account exists\n2. Check your permissions to access the resource\n3. Ensure you're using the correct network/environment\n4. Confirm the resource hasn't been deleted\n\n**Common causes:**\n- Mistyped addresses\n- Accessing resources from the wrong CDP project\n- Resource was deleted or hasn't been created yet",
9917    ///    "payment_method_required": "This error occurs when a payment method is required to complete the requested operation but none is configured or available.\n\n**Steps to resolve:**\n1. Add a valid payment method to your account using the [CDP Portal](https://portal.cdp.coinbase.com)\n2. Ensure your payment method is valid and not expired\n\n**Common causes:**\n- No payment method configured on the account\n- Payment method is expired",
9918    ///    "phone_number_verification_expired": "This error occurs when the user's phone number verification has expired. Use of guest Onramp requires the user's\nphone number to be verified every 60 days.\n\n**Steps to resolve:**\n1. Re-verify the user's phone number via OTP.\n2. Retry the request with the phoneNumberVerifiedAt field set to new verification timestamp.",
9919    ///    "policy_in_use": "This error occurs when trying to delete a Policy that is currently in use by at least one project or account.\n\n**Steps to resolve:**\n1. Update project or accounts to remove references to the Policy in question.\n2. Retry your delete request.",
9920    ///    "rate_limit_exceeded": "This error occurs when you've exceeded the API rate limits.\n\n**Steps to resolve:**\n1. Implement exponential backoff\n2. Cache responses where possible\n3. Wait for rate limit window to reset\n\n**Best practices:**\n```typescript lines wrap\nasync function withRetry(fn: () => Promise<any>) {\n  let delay = 1000;\n  while (true) {\n    try {\n      return await fn();\n    } catch (e) {\n      if (e.errorType === \"rate_limit_exceeded\") {\n        await sleep(delay);\n        delay *= 2;\n        continue;\n      }\n      throw e;\n    }\n  }\n}\n```",
9921    ///    "recipient_allowlist_pending": "This error occurs when the user is not allowed to receive funds at this address, because changes to their coinbase account allowlist are pending.\n**Steps to resolve:**\n1. Wait approximately 2 days for updates to take effect.",
9922    ///    "recipient_allowlist_violation": "This error occurs when the user is not allowed to receive funds at this address, according to their coinbase account allowlist.\n**Steps to resolve:**\n1. Either disable the allowlist or add the wallet address at https://www.coinbase.com/settings/allowlist\n2. Wait approximately 2 days for updates to take effect.",
9923    ///    "request_canceled": "This error occurs when the client cancels an in-progress request before it completes.\n\n**Steps to resolve:**\n1. Check client-side timeout configurations\n2. Review request cancellation logic in your code\n3. Consider increasing timeout thresholds for long-running operations\n4. Implement request tracking to identify premature cancellations\n\n**Best practices:**\n```typescript lines wrap\nasync function withTimeout<T>(promise: Promise<T>, timeoutMs: number): Promise<T> {\n  const timeout = new Promise((_, reject) => {\n    setTimeout(() => {\n      reject(new Error(\"Operation timed out\"));\n    }, timeoutMs);\n  });\n\n  try {\n    return await Promise.race([promise, timeout]);\n  } catch (error) {\n    // Handle timeout or cancellation\n    throw error;\n  }\n}\n```",
9924    ///    "service_unavailable": "This error occurs when the CDP API is temporarily unable to handle requests due to maintenance or high load.\n\n**Steps to resolve:**\n1. Retry your request after a short delay\n2. If persistent, contact CDP support with:\n   - The timestamp of the error\n   - Request details\n3. Consider implementing retry logic with an exponential backoff\n\n**Note:** These errors are automatically logged and monitored by CDP.",
9925    ///    "timed_out": "This error occurs when a request exceeds the maximum allowed processing time.\n\n**Steps to resolve:**\n1. Break down large requests into smaller chunks (if applicable)\n2. Implement retry logic with exponential backoff\n3. Use streaming endpoints for large data sets\n\n**Example retry implementation:**\n```typescript lines wrap\nasync function withRetryAndTimeout<T>(\n  operation: () => Promise<T>,\n  maxRetries = 3,\n  timeout = 30000,\n): Promise<T> {\n  let attempts = 0;\n  while (attempts < maxRetries) {\n    try {\n      return await Promise.race([\n        operation(),\n        new Promise((_, reject) =>\n          setTimeout(() => reject(new Error(\"Timeout\")), timeout)\n        ),\n      ]);\n    } catch (error) {\n      attempts++;\n      if (attempts === maxRetries) throw error;\n      // Exponential backoff\n      await new Promise(resolve =>\n        setTimeout(resolve, Math.pow(2, attempts) * 1000)\n      );\n    }\n  }\n  throw new Error(\"Max retries exceeded\");\n}\n```",
9926    ///    "transfer_amount_out_of_bounds": "This error occurs when the transfer amount is less than $1 USD equivalent amount or greater than the maximum transfer amount for the account.\n\n**Steps to resolve:**\n1. Verify the transfer amount is greater than $1 USD equivalent amount.\n2. Confirm that the account has sufficient funds to cover the transfer amount.",
9927    ///    "transfer_quote_expired": "This error occurs when the transfer quote has expired.\n**Steps to resolve:**\n1. Create a new quoted transfer and retry the request.",
9928    ///    "transfer_recipient_address_invalid": "This error occurs when the recipient address is invalid for the specified network.\n**Steps to resolve:**\n1. Verify the network is supported for the transfer.\n2. Confirm that the recipient address is valid for the specified network.",
9929    ///    "travel_rules_recipient_violation": "This error occurs when the user is not allowed to receive funds at this address, because it violates travel rules.\n**Steps to resolve:**\n1. Ensure your desired transfer is not blocked by local travel regulations.",
9930    ///    "unauthorized": "This error occurs when authentication fails.\n\n**Steps to resolve:**\n1. Verify your CDP API credentials:\n   - Check that your API key is valid\n   - Check that your Wallet Secret is properly configured\n2. Validate JWT token:\n   - Not expired\n   - Properly signed\n   - Contains required claims\n3. Check request headers:\n   - Authorization header present\n   - X-Wallet-Auth header included when required\n\n**Security note:** Never share your Wallet Secret or API keys."
9931    ///  }
9932    ///}
9933    /// ```
9934    /// </details>
9935    #[derive(
9936        ::serde::Deserialize,
9937        ::serde::Serialize,
9938        Clone,
9939        Copy,
9940        Debug,
9941        Eq,
9942        Hash,
9943        Ord,
9944        PartialEq,
9945        PartialOrd,
9946    )]
9947    pub enum ErrorType {
9948        #[serde(rename = "already_exists")]
9949        AlreadyExists,
9950        #[serde(rename = "bad_gateway")]
9951        BadGateway,
9952        #[serde(rename = "faucet_limit_exceeded")]
9953        FaucetLimitExceeded,
9954        #[serde(rename = "forbidden")]
9955        Forbidden,
9956        #[serde(rename = "idempotency_error")]
9957        IdempotencyError,
9958        #[serde(rename = "internal_server_error")]
9959        InternalServerError,
9960        #[serde(rename = "invalid_request")]
9961        InvalidRequest,
9962        #[serde(rename = "invalid_sql_query")]
9963        InvalidSqlQuery,
9964        #[serde(rename = "invalid_signature")]
9965        InvalidSignature,
9966        #[serde(rename = "malformed_transaction")]
9967        MalformedTransaction,
9968        #[serde(rename = "not_found")]
9969        NotFound,
9970        #[serde(rename = "payment_method_required")]
9971        PaymentMethodRequired,
9972        #[serde(rename = "rate_limit_exceeded")]
9973        RateLimitExceeded,
9974        #[serde(rename = "request_canceled")]
9975        RequestCanceled,
9976        #[serde(rename = "service_unavailable")]
9977        ServiceUnavailable,
9978        #[serde(rename = "timed_out")]
9979        TimedOut,
9980        #[serde(rename = "unauthorized")]
9981        Unauthorized,
9982        #[serde(rename = "policy_violation")]
9983        PolicyViolation,
9984        #[serde(rename = "policy_in_use")]
9985        PolicyInUse,
9986        #[serde(rename = "account_limit_exceeded")]
9987        AccountLimitExceeded,
9988        #[serde(rename = "network_not_tradable")]
9989        NetworkNotTradable,
9990        #[serde(rename = "guest_permission_denied")]
9991        GuestPermissionDenied,
9992        #[serde(rename = "guest_region_forbidden")]
9993        GuestRegionForbidden,
9994        #[serde(rename = "guest_transaction_limit")]
9995        GuestTransactionLimit,
9996        #[serde(rename = "guest_transaction_count")]
9997        GuestTransactionCount,
9998        #[serde(rename = "phone_number_verification_expired")]
9999        PhoneNumberVerificationExpired,
10000        #[serde(rename = "document_verification_failed")]
10001        DocumentVerificationFailed,
10002        #[serde(rename = "recipient_allowlist_violation")]
10003        RecipientAllowlistViolation,
10004        #[serde(rename = "recipient_allowlist_pending")]
10005        RecipientAllowlistPending,
10006        #[serde(rename = "travel_rules_recipient_violation")]
10007        TravelRulesRecipientViolation,
10008        #[serde(rename = "transfer_amount_out_of_bounds")]
10009        TransferAmountOutOfBounds,
10010        #[serde(rename = "transfer_recipient_address_invalid")]
10011        TransferRecipientAddressInvalid,
10012        #[serde(rename = "transfer_quote_expired")]
10013        TransferQuoteExpired,
10014        #[serde(rename = "mfa_already_enrolled")]
10015        MfaAlreadyEnrolled,
10016        #[serde(rename = "mfa_invalid_code")]
10017        MfaInvalidCode,
10018        #[serde(rename = "mfa_flow_expired")]
10019        MfaFlowExpired,
10020        #[serde(rename = "mfa_required")]
10021        MfaRequired,
10022        #[serde(rename = "mfa_not_enrolled")]
10023        MfaNotEnrolled,
10024    }
10025    impl ::std::convert::From<&Self> for ErrorType {
10026        fn from(value: &ErrorType) -> Self {
10027            value.clone()
10028        }
10029    }
10030    impl ::std::fmt::Display for ErrorType {
10031        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10032            match *self {
10033                Self::AlreadyExists => f.write_str("already_exists"),
10034                Self::BadGateway => f.write_str("bad_gateway"),
10035                Self::FaucetLimitExceeded => f.write_str("faucet_limit_exceeded"),
10036                Self::Forbidden => f.write_str("forbidden"),
10037                Self::IdempotencyError => f.write_str("idempotency_error"),
10038                Self::InternalServerError => f.write_str("internal_server_error"),
10039                Self::InvalidRequest => f.write_str("invalid_request"),
10040                Self::InvalidSqlQuery => f.write_str("invalid_sql_query"),
10041                Self::InvalidSignature => f.write_str("invalid_signature"),
10042                Self::MalformedTransaction => f.write_str("malformed_transaction"),
10043                Self::NotFound => f.write_str("not_found"),
10044                Self::PaymentMethodRequired => f.write_str("payment_method_required"),
10045                Self::RateLimitExceeded => f.write_str("rate_limit_exceeded"),
10046                Self::RequestCanceled => f.write_str("request_canceled"),
10047                Self::ServiceUnavailable => f.write_str("service_unavailable"),
10048                Self::TimedOut => f.write_str("timed_out"),
10049                Self::Unauthorized => f.write_str("unauthorized"),
10050                Self::PolicyViolation => f.write_str("policy_violation"),
10051                Self::PolicyInUse => f.write_str("policy_in_use"),
10052                Self::AccountLimitExceeded => f.write_str("account_limit_exceeded"),
10053                Self::NetworkNotTradable => f.write_str("network_not_tradable"),
10054                Self::GuestPermissionDenied => f.write_str("guest_permission_denied"),
10055                Self::GuestRegionForbidden => f.write_str("guest_region_forbidden"),
10056                Self::GuestTransactionLimit => f.write_str("guest_transaction_limit"),
10057                Self::GuestTransactionCount => f.write_str("guest_transaction_count"),
10058                Self::PhoneNumberVerificationExpired => {
10059                    f.write_str("phone_number_verification_expired")
10060                }
10061                Self::DocumentVerificationFailed => f.write_str("document_verification_failed"),
10062                Self::RecipientAllowlistViolation => f.write_str("recipient_allowlist_violation"),
10063                Self::RecipientAllowlistPending => f.write_str("recipient_allowlist_pending"),
10064                Self::TravelRulesRecipientViolation => {
10065                    f.write_str("travel_rules_recipient_violation")
10066                }
10067                Self::TransferAmountOutOfBounds => f.write_str("transfer_amount_out_of_bounds"),
10068                Self::TransferRecipientAddressInvalid => {
10069                    f.write_str("transfer_recipient_address_invalid")
10070                }
10071                Self::TransferQuoteExpired => f.write_str("transfer_quote_expired"),
10072                Self::MfaAlreadyEnrolled => f.write_str("mfa_already_enrolled"),
10073                Self::MfaInvalidCode => f.write_str("mfa_invalid_code"),
10074                Self::MfaFlowExpired => f.write_str("mfa_flow_expired"),
10075                Self::MfaRequired => f.write_str("mfa_required"),
10076                Self::MfaNotEnrolled => f.write_str("mfa_not_enrolled"),
10077            }
10078        }
10079    }
10080    impl ::std::str::FromStr for ErrorType {
10081        type Err = self::error::ConversionError;
10082        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10083            match value {
10084                "already_exists" => Ok(Self::AlreadyExists),
10085                "bad_gateway" => Ok(Self::BadGateway),
10086                "faucet_limit_exceeded" => Ok(Self::FaucetLimitExceeded),
10087                "forbidden" => Ok(Self::Forbidden),
10088                "idempotency_error" => Ok(Self::IdempotencyError),
10089                "internal_server_error" => Ok(Self::InternalServerError),
10090                "invalid_request" => Ok(Self::InvalidRequest),
10091                "invalid_sql_query" => Ok(Self::InvalidSqlQuery),
10092                "invalid_signature" => Ok(Self::InvalidSignature),
10093                "malformed_transaction" => Ok(Self::MalformedTransaction),
10094                "not_found" => Ok(Self::NotFound),
10095                "payment_method_required" => Ok(Self::PaymentMethodRequired),
10096                "rate_limit_exceeded" => Ok(Self::RateLimitExceeded),
10097                "request_canceled" => Ok(Self::RequestCanceled),
10098                "service_unavailable" => Ok(Self::ServiceUnavailable),
10099                "timed_out" => Ok(Self::TimedOut),
10100                "unauthorized" => Ok(Self::Unauthorized),
10101                "policy_violation" => Ok(Self::PolicyViolation),
10102                "policy_in_use" => Ok(Self::PolicyInUse),
10103                "account_limit_exceeded" => Ok(Self::AccountLimitExceeded),
10104                "network_not_tradable" => Ok(Self::NetworkNotTradable),
10105                "guest_permission_denied" => Ok(Self::GuestPermissionDenied),
10106                "guest_region_forbidden" => Ok(Self::GuestRegionForbidden),
10107                "guest_transaction_limit" => Ok(Self::GuestTransactionLimit),
10108                "guest_transaction_count" => Ok(Self::GuestTransactionCount),
10109                "phone_number_verification_expired" => Ok(Self::PhoneNumberVerificationExpired),
10110                "document_verification_failed" => Ok(Self::DocumentVerificationFailed),
10111                "recipient_allowlist_violation" => Ok(Self::RecipientAllowlistViolation),
10112                "recipient_allowlist_pending" => Ok(Self::RecipientAllowlistPending),
10113                "travel_rules_recipient_violation" => Ok(Self::TravelRulesRecipientViolation),
10114                "transfer_amount_out_of_bounds" => Ok(Self::TransferAmountOutOfBounds),
10115                "transfer_recipient_address_invalid" => Ok(Self::TransferRecipientAddressInvalid),
10116                "transfer_quote_expired" => Ok(Self::TransferQuoteExpired),
10117                "mfa_already_enrolled" => Ok(Self::MfaAlreadyEnrolled),
10118                "mfa_invalid_code" => Ok(Self::MfaInvalidCode),
10119                "mfa_flow_expired" => Ok(Self::MfaFlowExpired),
10120                "mfa_required" => Ok(Self::MfaRequired),
10121                "mfa_not_enrolled" => Ok(Self::MfaNotEnrolled),
10122                _ => Err("invalid value".into()),
10123            }
10124        }
10125    }
10126    impl ::std::convert::TryFrom<&str> for ErrorType {
10127        type Error = self::error::ConversionError;
10128        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10129            value.parse()
10130        }
10131    }
10132    impl ::std::convert::TryFrom<&::std::string::String> for ErrorType {
10133        type Error = self::error::ConversionError;
10134        fn try_from(
10135            value: &::std::string::String,
10136        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10137            value.parse()
10138        }
10139    }
10140    impl ::std::convert::TryFrom<::std::string::String> for ErrorType {
10141        type Error = self::error::ConversionError;
10142        fn try_from(
10143            value: ::std::string::String,
10144        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10145            value.parse()
10146        }
10147    }
10148    ///A schema for specifying a criterion for the `value` field of an EVM transaction.
10149    ///
10150    /// <details><summary>JSON schema</summary>
10151    ///
10152    /// ```json
10153    ///{
10154    ///  "title": "EthValueCriterion",
10155    ///  "description": "A schema for specifying a criterion for the `value` field of an EVM transaction.",
10156    ///  "type": "object",
10157    ///  "required": [
10158    ///    "ethValue",
10159    ///    "operator",
10160    ///    "type"
10161    ///  ],
10162    ///  "properties": {
10163    ///    "ethValue": {
10164    ///      "description": "The amount of ETH, in wei, that the transaction's `value` field should be compared to.",
10165    ///      "examples": [
10166    ///        "1000000000000000000"
10167    ///      ],
10168    ///      "type": "string",
10169    ///      "pattern": "^[0-9]+$"
10170    ///    },
10171    ///    "operator": {
10172    ///      "description": "The operator to use for the comparison. The transaction's `value` field will be on the left-hand side of the operator, and the `ethValue` field will be on the right-hand side.",
10173    ///      "examples": [
10174    ///        "<="
10175    ///      ],
10176    ///      "type": "string",
10177    ///      "enum": [
10178    ///        "GreaterThan",
10179    ///        "GreaterThanOrEqual",
10180    ///        "LessThan",
10181    ///        "LessThanOrEqual",
10182    ///        "Equal"
10183    ///      ]
10184    ///    },
10185    ///    "type": {
10186    ///      "description": "The type of criterion to use. This should be `ethValue`.",
10187    ///      "examples": [
10188    ///        "ethValue"
10189    ///      ],
10190    ///      "type": "string",
10191    ///      "enum": [
10192    ///        "ethValue"
10193    ///      ]
10194    ///    }
10195    ///  }
10196    ///}
10197    /// ```
10198    /// </details>
10199    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10200    pub struct EthValueCriterion {
10201        ///The amount of ETH, in wei, that the transaction's `value` field should be compared to.
10202        #[serde(rename = "ethValue")]
10203        pub eth_value: EthValueCriterionEthValue,
10204        ///The operator to use for the comparison. The transaction's `value` field will be on the left-hand side of the operator, and the `ethValue` field will be on the right-hand side.
10205        pub operator: EthValueCriterionOperator,
10206        ///The type of criterion to use. This should be `ethValue`.
10207        #[serde(rename = "type")]
10208        pub type_: EthValueCriterionType,
10209    }
10210    impl ::std::convert::From<&EthValueCriterion> for EthValueCriterion {
10211        fn from(value: &EthValueCriterion) -> Self {
10212            value.clone()
10213        }
10214    }
10215    impl EthValueCriterion {
10216        pub fn builder() -> builder::EthValueCriterion {
10217            Default::default()
10218        }
10219    }
10220    ///The amount of ETH, in wei, that the transaction's `value` field should be compared to.
10221    ///
10222    /// <details><summary>JSON schema</summary>
10223    ///
10224    /// ```json
10225    ///{
10226    ///  "description": "The amount of ETH, in wei, that the transaction's `value` field should be compared to.",
10227    ///  "examples": [
10228    ///    "1000000000000000000"
10229    ///  ],
10230    ///  "type": "string",
10231    ///  "pattern": "^[0-9]+$"
10232    ///}
10233    /// ```
10234    /// </details>
10235    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10236    #[serde(transparent)]
10237    pub struct EthValueCriterionEthValue(::std::string::String);
10238    impl ::std::ops::Deref for EthValueCriterionEthValue {
10239        type Target = ::std::string::String;
10240        fn deref(&self) -> &::std::string::String {
10241            &self.0
10242        }
10243    }
10244    impl ::std::convert::From<EthValueCriterionEthValue> for ::std::string::String {
10245        fn from(value: EthValueCriterionEthValue) -> Self {
10246            value.0
10247        }
10248    }
10249    impl ::std::convert::From<&EthValueCriterionEthValue> for EthValueCriterionEthValue {
10250        fn from(value: &EthValueCriterionEthValue) -> Self {
10251            value.clone()
10252        }
10253    }
10254    impl ::std::str::FromStr for EthValueCriterionEthValue {
10255        type Err = self::error::ConversionError;
10256        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10257            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
10258                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[0-9]+$").unwrap());
10259            if PATTERN.find(value).is_none() {
10260                return Err("doesn't match pattern \"^[0-9]+$\"".into());
10261            }
10262            Ok(Self(value.to_string()))
10263        }
10264    }
10265    impl ::std::convert::TryFrom<&str> for EthValueCriterionEthValue {
10266        type Error = self::error::ConversionError;
10267        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10268            value.parse()
10269        }
10270    }
10271    impl ::std::convert::TryFrom<&::std::string::String> for EthValueCriterionEthValue {
10272        type Error = self::error::ConversionError;
10273        fn try_from(
10274            value: &::std::string::String,
10275        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10276            value.parse()
10277        }
10278    }
10279    impl ::std::convert::TryFrom<::std::string::String> for EthValueCriterionEthValue {
10280        type Error = self::error::ConversionError;
10281        fn try_from(
10282            value: ::std::string::String,
10283        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10284            value.parse()
10285        }
10286    }
10287    impl<'de> ::serde::Deserialize<'de> for EthValueCriterionEthValue {
10288        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
10289        where
10290            D: ::serde::Deserializer<'de>,
10291        {
10292            ::std::string::String::deserialize(deserializer)?
10293                .parse()
10294                .map_err(|e: self::error::ConversionError| {
10295                    <D::Error as ::serde::de::Error>::custom(e.to_string())
10296                })
10297        }
10298    }
10299    ///The operator to use for the comparison. The transaction's `value` field will be on the left-hand side of the operator, and the `ethValue` field will be on the right-hand side.
10300    ///
10301    /// <details><summary>JSON schema</summary>
10302    ///
10303    /// ```json
10304    ///{
10305    ///  "description": "The operator to use for the comparison. The transaction's `value` field will be on the left-hand side of the operator, and the `ethValue` field will be on the right-hand side.",
10306    ///  "examples": [
10307    ///    "<="
10308    ///  ],
10309    ///  "type": "string",
10310    ///  "enum": [
10311    ///    "GreaterThan",
10312    ///    "GreaterThanOrEqual",
10313    ///    "LessThan",
10314    ///    "LessThanOrEqual",
10315    ///    "Equal"
10316    ///  ]
10317    ///}
10318    /// ```
10319    /// </details>
10320    #[derive(
10321        ::serde::Deserialize,
10322        ::serde::Serialize,
10323        Clone,
10324        Copy,
10325        Debug,
10326        Eq,
10327        Hash,
10328        Ord,
10329        PartialEq,
10330        PartialOrd,
10331    )]
10332    pub enum EthValueCriterionOperator {
10333        GreaterThan,
10334        GreaterThanOrEqual,
10335        LessThan,
10336        LessThanOrEqual,
10337        Equal,
10338    }
10339    impl ::std::convert::From<&Self> for EthValueCriterionOperator {
10340        fn from(value: &EthValueCriterionOperator) -> Self {
10341            value.clone()
10342        }
10343    }
10344    impl ::std::fmt::Display for EthValueCriterionOperator {
10345        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10346            match *self {
10347                Self::GreaterThan => f.write_str("GreaterThan"),
10348                Self::GreaterThanOrEqual => f.write_str("GreaterThanOrEqual"),
10349                Self::LessThan => f.write_str("LessThan"),
10350                Self::LessThanOrEqual => f.write_str("LessThanOrEqual"),
10351                Self::Equal => f.write_str("Equal"),
10352            }
10353        }
10354    }
10355    impl ::std::str::FromStr for EthValueCriterionOperator {
10356        type Err = self::error::ConversionError;
10357        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10358            match value {
10359                "GreaterThan" => Ok(Self::GreaterThan),
10360                "GreaterThanOrEqual" => Ok(Self::GreaterThanOrEqual),
10361                "LessThan" => Ok(Self::LessThan),
10362                "LessThanOrEqual" => Ok(Self::LessThanOrEqual),
10363                "Equal" => Ok(Self::Equal),
10364                _ => Err("invalid value".into()),
10365            }
10366        }
10367    }
10368    impl ::std::convert::TryFrom<&str> for EthValueCriterionOperator {
10369        type Error = self::error::ConversionError;
10370        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10371            value.parse()
10372        }
10373    }
10374    impl ::std::convert::TryFrom<&::std::string::String> for EthValueCriterionOperator {
10375        type Error = self::error::ConversionError;
10376        fn try_from(
10377            value: &::std::string::String,
10378        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10379            value.parse()
10380        }
10381    }
10382    impl ::std::convert::TryFrom<::std::string::String> for EthValueCriterionOperator {
10383        type Error = self::error::ConversionError;
10384        fn try_from(
10385            value: ::std::string::String,
10386        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10387            value.parse()
10388        }
10389    }
10390    ///The type of criterion to use. This should be `ethValue`.
10391    ///
10392    /// <details><summary>JSON schema</summary>
10393    ///
10394    /// ```json
10395    ///{
10396    ///  "description": "The type of criterion to use. This should be `ethValue`.",
10397    ///  "examples": [
10398    ///    "ethValue"
10399    ///  ],
10400    ///  "type": "string",
10401    ///  "enum": [
10402    ///    "ethValue"
10403    ///  ]
10404    ///}
10405    /// ```
10406    /// </details>
10407    #[derive(
10408        ::serde::Deserialize,
10409        ::serde::Serialize,
10410        Clone,
10411        Copy,
10412        Debug,
10413        Eq,
10414        Hash,
10415        Ord,
10416        PartialEq,
10417        PartialOrd,
10418    )]
10419    pub enum EthValueCriterionType {
10420        #[serde(rename = "ethValue")]
10421        EthValue,
10422    }
10423    impl ::std::convert::From<&Self> for EthValueCriterionType {
10424        fn from(value: &EthValueCriterionType) -> Self {
10425            value.clone()
10426        }
10427    }
10428    impl ::std::fmt::Display for EthValueCriterionType {
10429        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10430            match *self {
10431                Self::EthValue => f.write_str("ethValue"),
10432            }
10433        }
10434    }
10435    impl ::std::str::FromStr for EthValueCriterionType {
10436        type Err = self::error::ConversionError;
10437        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10438            match value {
10439                "ethValue" => Ok(Self::EthValue),
10440                _ => Err("invalid value".into()),
10441            }
10442        }
10443    }
10444    impl ::std::convert::TryFrom<&str> for EthValueCriterionType {
10445        type Error = self::error::ConversionError;
10446        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10447            value.parse()
10448        }
10449    }
10450    impl ::std::convert::TryFrom<&::std::string::String> for EthValueCriterionType {
10451        type Error = self::error::ConversionError;
10452        fn try_from(
10453            value: &::std::string::String,
10454        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10455            value.parse()
10456        }
10457    }
10458    impl ::std::convert::TryFrom<::std::string::String> for EthValueCriterionType {
10459        type Error = self::error::ConversionError;
10460        fn try_from(
10461            value: ::std::string::String,
10462        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10463            value.parse()
10464        }
10465    }
10466    ///`EvmAccount`
10467    ///
10468    /// <details><summary>JSON schema</summary>
10469    ///
10470    /// ```json
10471    ///{
10472    ///  "type": "object",
10473    ///  "required": [
10474    ///    "address"
10475    ///  ],
10476    ///  "properties": {
10477    ///    "address": {
10478    ///      "description": "The 0x-prefixed, checksum EVM address.",
10479    ///      "examples": [
10480    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
10481    ///      ],
10482    ///      "type": "string",
10483    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
10484    ///    },
10485    ///    "createdAt": {
10486    ///      "description": "The UTC ISO 8601 timestamp at which the account was created.",
10487    ///      "examples": [
10488    ///        "2025-03-25T12:00:00Z"
10489    ///      ],
10490    ///      "type": "string",
10491    ///      "format": "date-time"
10492    ///    },
10493    ///    "name": {
10494    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names are guaranteed to be unique across all EVM accounts in the developer's CDP Project.",
10495    ///      "examples": [
10496    ///        "my-account"
10497    ///      ],
10498    ///      "type": "string",
10499    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
10500    ///    },
10501    ///    "policies": {
10502    ///      "description": "The list of policy IDs that apply to the account. This will include both the project-level policy and the account-level policy, if one exists.",
10503    ///      "examples": [
10504    ///        [
10505    ///          "123e4567-e89b-12d3-a456-426614174000"
10506    ///        ]
10507    ///      ],
10508    ///      "type": "array",
10509    ///      "items": {
10510    ///        "type": "string",
10511    ///        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
10512    ///      },
10513    ///      "x-audience": "public"
10514    ///    },
10515    ///    "updatedAt": {
10516    ///      "description": "The UTC ISO 8601 timestamp at which the account was last updated.",
10517    ///      "examples": [
10518    ///        "2025-03-26T12:00:00Z"
10519    ///      ],
10520    ///      "type": "string",
10521    ///      "format": "date-time"
10522    ///    }
10523    ///  }
10524    ///}
10525    /// ```
10526    /// </details>
10527    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10528    pub struct EvmAccount {
10529        ///The 0x-prefixed, checksum EVM address.
10530        pub address: EvmAccountAddress,
10531        ///The UTC ISO 8601 timestamp at which the account was created.
10532        #[serde(
10533            rename = "createdAt",
10534            default,
10535            skip_serializing_if = "::std::option::Option::is_none"
10536        )]
10537        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
10538        /**An optional name for the account.
10539        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
10540        Account names are guaranteed to be unique across all EVM accounts in the developer's CDP Project.*/
10541        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10542        pub name: ::std::option::Option<EvmAccountName>,
10543        ///The list of policy IDs that apply to the account. This will include both the project-level policy and the account-level policy, if one exists.
10544        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
10545        pub policies: ::std::vec::Vec<EvmAccountPoliciesItem>,
10546        ///The UTC ISO 8601 timestamp at which the account was last updated.
10547        #[serde(
10548            rename = "updatedAt",
10549            default,
10550            skip_serializing_if = "::std::option::Option::is_none"
10551        )]
10552        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
10553    }
10554    impl ::std::convert::From<&EvmAccount> for EvmAccount {
10555        fn from(value: &EvmAccount) -> Self {
10556            value.clone()
10557        }
10558    }
10559    impl EvmAccount {
10560        pub fn builder() -> builder::EvmAccount {
10561            Default::default()
10562        }
10563    }
10564    ///The 0x-prefixed, checksum EVM address.
10565    ///
10566    /// <details><summary>JSON schema</summary>
10567    ///
10568    /// ```json
10569    ///{
10570    ///  "description": "The 0x-prefixed, checksum EVM address.",
10571    ///  "examples": [
10572    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
10573    ///  ],
10574    ///  "type": "string",
10575    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
10576    ///}
10577    /// ```
10578    /// </details>
10579    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10580    #[serde(transparent)]
10581    pub struct EvmAccountAddress(::std::string::String);
10582    impl ::std::ops::Deref for EvmAccountAddress {
10583        type Target = ::std::string::String;
10584        fn deref(&self) -> &::std::string::String {
10585            &self.0
10586        }
10587    }
10588    impl ::std::convert::From<EvmAccountAddress> for ::std::string::String {
10589        fn from(value: EvmAccountAddress) -> Self {
10590            value.0
10591        }
10592    }
10593    impl ::std::convert::From<&EvmAccountAddress> for EvmAccountAddress {
10594        fn from(value: &EvmAccountAddress) -> Self {
10595            value.clone()
10596        }
10597    }
10598    impl ::std::str::FromStr for EvmAccountAddress {
10599        type Err = self::error::ConversionError;
10600        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10601            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
10602                ::std::sync::LazyLock::new(|| {
10603                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
10604                });
10605            if PATTERN.find(value).is_none() {
10606                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
10607            }
10608            Ok(Self(value.to_string()))
10609        }
10610    }
10611    impl ::std::convert::TryFrom<&str> for EvmAccountAddress {
10612        type Error = self::error::ConversionError;
10613        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10614            value.parse()
10615        }
10616    }
10617    impl ::std::convert::TryFrom<&::std::string::String> for EvmAccountAddress {
10618        type Error = self::error::ConversionError;
10619        fn try_from(
10620            value: &::std::string::String,
10621        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10622            value.parse()
10623        }
10624    }
10625    impl ::std::convert::TryFrom<::std::string::String> for EvmAccountAddress {
10626        type Error = self::error::ConversionError;
10627        fn try_from(
10628            value: ::std::string::String,
10629        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10630            value.parse()
10631        }
10632    }
10633    impl<'de> ::serde::Deserialize<'de> for EvmAccountAddress {
10634        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
10635        where
10636            D: ::serde::Deserializer<'de>,
10637        {
10638            ::std::string::String::deserialize(deserializer)?
10639                .parse()
10640                .map_err(|e: self::error::ConversionError| {
10641                    <D::Error as ::serde::de::Error>::custom(e.to_string())
10642                })
10643        }
10644    }
10645    /**An optional name for the account.
10646    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
10647    Account names are guaranteed to be unique across all EVM accounts in the developer's CDP Project.*/
10648    ///
10649    /// <details><summary>JSON schema</summary>
10650    ///
10651    /// ```json
10652    ///{
10653    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names are guaranteed to be unique across all EVM accounts in the developer's CDP Project.",
10654    ///  "examples": [
10655    ///    "my-account"
10656    ///  ],
10657    ///  "type": "string",
10658    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
10659    ///}
10660    /// ```
10661    /// </details>
10662    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10663    #[serde(transparent)]
10664    pub struct EvmAccountName(::std::string::String);
10665    impl ::std::ops::Deref for EvmAccountName {
10666        type Target = ::std::string::String;
10667        fn deref(&self) -> &::std::string::String {
10668            &self.0
10669        }
10670    }
10671    impl ::std::convert::From<EvmAccountName> for ::std::string::String {
10672        fn from(value: EvmAccountName) -> Self {
10673            value.0
10674        }
10675    }
10676    impl ::std::convert::From<&EvmAccountName> for EvmAccountName {
10677        fn from(value: &EvmAccountName) -> Self {
10678            value.clone()
10679        }
10680    }
10681    impl ::std::str::FromStr for EvmAccountName {
10682        type Err = self::error::ConversionError;
10683        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10684            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
10685                ::std::sync::LazyLock::new(|| {
10686                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
10687                });
10688            if PATTERN.find(value).is_none() {
10689                return Err(
10690                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
10691                );
10692            }
10693            Ok(Self(value.to_string()))
10694        }
10695    }
10696    impl ::std::convert::TryFrom<&str> for EvmAccountName {
10697        type Error = self::error::ConversionError;
10698        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10699            value.parse()
10700        }
10701    }
10702    impl ::std::convert::TryFrom<&::std::string::String> for EvmAccountName {
10703        type Error = self::error::ConversionError;
10704        fn try_from(
10705            value: &::std::string::String,
10706        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10707            value.parse()
10708        }
10709    }
10710    impl ::std::convert::TryFrom<::std::string::String> for EvmAccountName {
10711        type Error = self::error::ConversionError;
10712        fn try_from(
10713            value: ::std::string::String,
10714        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10715            value.parse()
10716        }
10717    }
10718    impl<'de> ::serde::Deserialize<'de> for EvmAccountName {
10719        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
10720        where
10721            D: ::serde::Deserializer<'de>,
10722        {
10723            ::std::string::String::deserialize(deserializer)?
10724                .parse()
10725                .map_err(|e: self::error::ConversionError| {
10726                    <D::Error as ::serde::de::Error>::custom(e.to_string())
10727                })
10728        }
10729    }
10730    ///`EvmAccountPoliciesItem`
10731    ///
10732    /// <details><summary>JSON schema</summary>
10733    ///
10734    /// ```json
10735    ///{
10736    ///  "type": "string",
10737    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
10738    ///}
10739    /// ```
10740    /// </details>
10741    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10742    #[serde(transparent)]
10743    pub struct EvmAccountPoliciesItem(::std::string::String);
10744    impl ::std::ops::Deref for EvmAccountPoliciesItem {
10745        type Target = ::std::string::String;
10746        fn deref(&self) -> &::std::string::String {
10747            &self.0
10748        }
10749    }
10750    impl ::std::convert::From<EvmAccountPoliciesItem> for ::std::string::String {
10751        fn from(value: EvmAccountPoliciesItem) -> Self {
10752            value.0
10753        }
10754    }
10755    impl ::std::convert::From<&EvmAccountPoliciesItem> for EvmAccountPoliciesItem {
10756        fn from(value: &EvmAccountPoliciesItem) -> Self {
10757            value.clone()
10758        }
10759    }
10760    impl ::std::str::FromStr for EvmAccountPoliciesItem {
10761        type Err = self::error::ConversionError;
10762        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10763            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
10764                || {
10765                    ::regress::Regex::new(
10766                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
10767                    )
10768                    .unwrap()
10769                },
10770            );
10771            if PATTERN.find(value).is_none() {
10772                return Err(
10773                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
10774                        .into(),
10775                );
10776            }
10777            Ok(Self(value.to_string()))
10778        }
10779    }
10780    impl ::std::convert::TryFrom<&str> for EvmAccountPoliciesItem {
10781        type Error = self::error::ConversionError;
10782        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10783            value.parse()
10784        }
10785    }
10786    impl ::std::convert::TryFrom<&::std::string::String> for EvmAccountPoliciesItem {
10787        type Error = self::error::ConversionError;
10788        fn try_from(
10789            value: &::std::string::String,
10790        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10791            value.parse()
10792        }
10793    }
10794    impl ::std::convert::TryFrom<::std::string::String> for EvmAccountPoliciesItem {
10795        type Error = self::error::ConversionError;
10796        fn try_from(
10797            value: ::std::string::String,
10798        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10799            value.parse()
10800        }
10801    }
10802    impl<'de> ::serde::Deserialize<'de> for EvmAccountPoliciesItem {
10803        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
10804        where
10805            D: ::serde::Deserializer<'de>,
10806        {
10807            ::std::string::String::deserialize(deserializer)?
10808                .parse()
10809                .map_err(|e: self::error::ConversionError| {
10810                    <D::Error as ::serde::de::Error>::custom(e.to_string())
10811                })
10812        }
10813    }
10814    ///A schema for specifying a criterion for the `to` field of an EVM transaction.
10815    ///
10816    /// <details><summary>JSON schema</summary>
10817    ///
10818    /// ```json
10819    ///{
10820    ///  "title": "EvmAddressCriterion",
10821    ///  "description": "A schema for specifying a criterion for the `to` field of an EVM transaction.",
10822    ///  "type": "object",
10823    ///  "required": [
10824    ///    "addresses",
10825    ///    "operator",
10826    ///    "type"
10827    ///  ],
10828    ///  "properties": {
10829    ///    "addresses": {
10830    ///      "description": "A list of 0x-prefixed EVM addresses that the transaction's `to` field should be compared to. There is a limit of 300 addresses per criterion.",
10831    ///      "examples": [
10832    ///        [
10833    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
10834    ///          "0x1234567890123456789012345678901234567890"
10835    ///        ]
10836    ///      ],
10837    ///      "type": "array",
10838    ///      "items": {
10839    ///        "description": "The 0x-prefixed EVM address that the transaction's `to` field should be compared to.",
10840    ///        "type": "string",
10841    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
10842    ///      }
10843    ///    },
10844    ///    "operator": {
10845    ///      "description": "The operator to use for the comparison. The transaction's `to` field will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
10846    ///      "examples": [
10847    ///        "in"
10848    ///      ],
10849    ///      "type": "string",
10850    ///      "enum": [
10851    ///        "in",
10852    ///        "not in"
10853    ///      ]
10854    ///    },
10855    ///    "type": {
10856    ///      "description": "The type of criterion to use. This should be `evmAddress`.",
10857    ///      "examples": [
10858    ///        "evmAddress"
10859    ///      ],
10860    ///      "type": "string",
10861    ///      "enum": [
10862    ///        "evmAddress"
10863    ///      ]
10864    ///    }
10865    ///  },
10866    ///  "x-audience": "public"
10867    ///}
10868    /// ```
10869    /// </details>
10870    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
10871    pub struct EvmAddressCriterion {
10872        ///A list of 0x-prefixed EVM addresses that the transaction's `to` field should be compared to. There is a limit of 300 addresses per criterion.
10873        pub addresses: ::std::vec::Vec<EvmAddressCriterionAddressesItem>,
10874        ///The operator to use for the comparison. The transaction's `to` field will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
10875        pub operator: EvmAddressCriterionOperator,
10876        ///The type of criterion to use. This should be `evmAddress`.
10877        #[serde(rename = "type")]
10878        pub type_: EvmAddressCriterionType,
10879    }
10880    impl ::std::convert::From<&EvmAddressCriterion> for EvmAddressCriterion {
10881        fn from(value: &EvmAddressCriterion) -> Self {
10882            value.clone()
10883        }
10884    }
10885    impl EvmAddressCriterion {
10886        pub fn builder() -> builder::EvmAddressCriterion {
10887            Default::default()
10888        }
10889    }
10890    ///The 0x-prefixed EVM address that the transaction's `to` field should be compared to.
10891    ///
10892    /// <details><summary>JSON schema</summary>
10893    ///
10894    /// ```json
10895    ///{
10896    ///  "description": "The 0x-prefixed EVM address that the transaction's `to` field should be compared to.",
10897    ///  "type": "string",
10898    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
10899    ///}
10900    /// ```
10901    /// </details>
10902    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
10903    #[serde(transparent)]
10904    pub struct EvmAddressCriterionAddressesItem(::std::string::String);
10905    impl ::std::ops::Deref for EvmAddressCriterionAddressesItem {
10906        type Target = ::std::string::String;
10907        fn deref(&self) -> &::std::string::String {
10908            &self.0
10909        }
10910    }
10911    impl ::std::convert::From<EvmAddressCriterionAddressesItem> for ::std::string::String {
10912        fn from(value: EvmAddressCriterionAddressesItem) -> Self {
10913            value.0
10914        }
10915    }
10916    impl ::std::convert::From<&EvmAddressCriterionAddressesItem> for EvmAddressCriterionAddressesItem {
10917        fn from(value: &EvmAddressCriterionAddressesItem) -> Self {
10918            value.clone()
10919        }
10920    }
10921    impl ::std::str::FromStr for EvmAddressCriterionAddressesItem {
10922        type Err = self::error::ConversionError;
10923        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10924            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
10925                ::std::sync::LazyLock::new(|| {
10926                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
10927                });
10928            if PATTERN.find(value).is_none() {
10929                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
10930            }
10931            Ok(Self(value.to_string()))
10932        }
10933    }
10934    impl ::std::convert::TryFrom<&str> for EvmAddressCriterionAddressesItem {
10935        type Error = self::error::ConversionError;
10936        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10937            value.parse()
10938        }
10939    }
10940    impl ::std::convert::TryFrom<&::std::string::String> for EvmAddressCriterionAddressesItem {
10941        type Error = self::error::ConversionError;
10942        fn try_from(
10943            value: &::std::string::String,
10944        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10945            value.parse()
10946        }
10947    }
10948    impl ::std::convert::TryFrom<::std::string::String> for EvmAddressCriterionAddressesItem {
10949        type Error = self::error::ConversionError;
10950        fn try_from(
10951            value: ::std::string::String,
10952        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10953            value.parse()
10954        }
10955    }
10956    impl<'de> ::serde::Deserialize<'de> for EvmAddressCriterionAddressesItem {
10957        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
10958        where
10959            D: ::serde::Deserializer<'de>,
10960        {
10961            ::std::string::String::deserialize(deserializer)?
10962                .parse()
10963                .map_err(|e: self::error::ConversionError| {
10964                    <D::Error as ::serde::de::Error>::custom(e.to_string())
10965                })
10966        }
10967    }
10968    ///The operator to use for the comparison. The transaction's `to` field will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
10969    ///
10970    /// <details><summary>JSON schema</summary>
10971    ///
10972    /// ```json
10973    ///{
10974    ///  "description": "The operator to use for the comparison. The transaction's `to` field will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
10975    ///  "examples": [
10976    ///    "in"
10977    ///  ],
10978    ///  "type": "string",
10979    ///  "enum": [
10980    ///    "in",
10981    ///    "not in"
10982    ///  ]
10983    ///}
10984    /// ```
10985    /// </details>
10986    #[derive(
10987        ::serde::Deserialize,
10988        ::serde::Serialize,
10989        Clone,
10990        Copy,
10991        Debug,
10992        Eq,
10993        Hash,
10994        Ord,
10995        PartialEq,
10996        PartialOrd,
10997    )]
10998    pub enum EvmAddressCriterionOperator {
10999        #[serde(rename = "in")]
11000        In,
11001        #[serde(rename = "not in")]
11002        NotIn,
11003    }
11004    impl ::std::convert::From<&Self> for EvmAddressCriterionOperator {
11005        fn from(value: &EvmAddressCriterionOperator) -> Self {
11006            value.clone()
11007        }
11008    }
11009    impl ::std::fmt::Display for EvmAddressCriterionOperator {
11010        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11011            match *self {
11012                Self::In => f.write_str("in"),
11013                Self::NotIn => f.write_str("not in"),
11014            }
11015        }
11016    }
11017    impl ::std::str::FromStr for EvmAddressCriterionOperator {
11018        type Err = self::error::ConversionError;
11019        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11020            match value {
11021                "in" => Ok(Self::In),
11022                "not in" => Ok(Self::NotIn),
11023                _ => Err("invalid value".into()),
11024            }
11025        }
11026    }
11027    impl ::std::convert::TryFrom<&str> for EvmAddressCriterionOperator {
11028        type Error = self::error::ConversionError;
11029        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11030            value.parse()
11031        }
11032    }
11033    impl ::std::convert::TryFrom<&::std::string::String> for EvmAddressCriterionOperator {
11034        type Error = self::error::ConversionError;
11035        fn try_from(
11036            value: &::std::string::String,
11037        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11038            value.parse()
11039        }
11040    }
11041    impl ::std::convert::TryFrom<::std::string::String> for EvmAddressCriterionOperator {
11042        type Error = self::error::ConversionError;
11043        fn try_from(
11044            value: ::std::string::String,
11045        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11046            value.parse()
11047        }
11048    }
11049    ///The type of criterion to use. This should be `evmAddress`.
11050    ///
11051    /// <details><summary>JSON schema</summary>
11052    ///
11053    /// ```json
11054    ///{
11055    ///  "description": "The type of criterion to use. This should be `evmAddress`.",
11056    ///  "examples": [
11057    ///    "evmAddress"
11058    ///  ],
11059    ///  "type": "string",
11060    ///  "enum": [
11061    ///    "evmAddress"
11062    ///  ]
11063    ///}
11064    /// ```
11065    /// </details>
11066    #[derive(
11067        ::serde::Deserialize,
11068        ::serde::Serialize,
11069        Clone,
11070        Copy,
11071        Debug,
11072        Eq,
11073        Hash,
11074        Ord,
11075        PartialEq,
11076        PartialOrd,
11077    )]
11078    pub enum EvmAddressCriterionType {
11079        #[serde(rename = "evmAddress")]
11080        EvmAddress,
11081    }
11082    impl ::std::convert::From<&Self> for EvmAddressCriterionType {
11083        fn from(value: &EvmAddressCriterionType) -> Self {
11084            value.clone()
11085        }
11086    }
11087    impl ::std::fmt::Display for EvmAddressCriterionType {
11088        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11089            match *self {
11090                Self::EvmAddress => f.write_str("evmAddress"),
11091            }
11092        }
11093    }
11094    impl ::std::str::FromStr for EvmAddressCriterionType {
11095        type Err = self::error::ConversionError;
11096        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11097            match value {
11098                "evmAddress" => Ok(Self::EvmAddress),
11099                _ => Err("invalid value".into()),
11100            }
11101        }
11102    }
11103    impl ::std::convert::TryFrom<&str> for EvmAddressCriterionType {
11104        type Error = self::error::ConversionError;
11105        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11106            value.parse()
11107        }
11108    }
11109    impl ::std::convert::TryFrom<&::std::string::String> for EvmAddressCriterionType {
11110        type Error = self::error::ConversionError;
11111        fn try_from(
11112            value: &::std::string::String,
11113        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11114            value.parse()
11115        }
11116    }
11117    impl ::std::convert::TryFrom<::std::string::String> for EvmAddressCriterionType {
11118        type Error = self::error::ConversionError;
11119        fn try_from(
11120            value: ::std::string::String,
11121        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11122            value.parse()
11123        }
11124    }
11125    ///`EvmCall`
11126    ///
11127    /// <details><summary>JSON schema</summary>
11128    ///
11129    /// ```json
11130    ///{
11131    ///  "type": "object",
11132    ///  "required": [
11133    ///    "data",
11134    ///    "to",
11135    ///    "value"
11136    ///  ],
11137    ///  "properties": {
11138    ///    "data": {
11139    ///      "description": "The call data to send. This is the hex-encoded data of the function call consisting of the method selector and the function arguments.",
11140    ///      "examples": [
11141    ///        "0xa9059cbb000000000000000000000000fc807d1be4997e5c7b33e4d8d57e60c5b0f02b1a0000000000000000000000000000000000000000000000000000000000000064"
11142    ///      ],
11143    ///      "type": "string",
11144    ///      "pattern": "^0x[0-9a-fA-F]*$"
11145    ///    },
11146    ///    "overrideGasLimit": {
11147    ///      "description": "The override gas limit to use for the call instead of the bundler's estimated gas limit.",
11148    ///      "examples": [
11149    ///        "100000"
11150    ///      ],
11151    ///      "type": "string"
11152    ///    },
11153    ///    "to": {
11154    ///      "description": "The address the call is directed to.",
11155    ///      "examples": [
11156    ///        "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
11157    ///      ],
11158    ///      "type": "string",
11159    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
11160    ///    },
11161    ///    "value": {
11162    ///      "description": "The amount of ETH to send with the call, in wei.",
11163    ///      "examples": [
11164    ///        "0"
11165    ///      ],
11166    ///      "type": "string"
11167    ///    }
11168    ///  }
11169    ///}
11170    /// ```
11171    /// </details>
11172    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11173    pub struct EvmCall {
11174        ///The call data to send. This is the hex-encoded data of the function call consisting of the method selector and the function arguments.
11175        pub data: EvmCallData,
11176        ///The override gas limit to use for the call instead of the bundler's estimated gas limit.
11177        #[serde(
11178            rename = "overrideGasLimit",
11179            default,
11180            skip_serializing_if = "::std::option::Option::is_none"
11181        )]
11182        pub override_gas_limit: ::std::option::Option<::std::string::String>,
11183        ///The address the call is directed to.
11184        pub to: EvmCallTo,
11185        ///The amount of ETH to send with the call, in wei.
11186        pub value: ::std::string::String,
11187    }
11188    impl ::std::convert::From<&EvmCall> for EvmCall {
11189        fn from(value: &EvmCall) -> Self {
11190            value.clone()
11191        }
11192    }
11193    impl EvmCall {
11194        pub fn builder() -> builder::EvmCall {
11195            Default::default()
11196        }
11197    }
11198    ///The call data to send. This is the hex-encoded data of the function call consisting of the method selector and the function arguments.
11199    ///
11200    /// <details><summary>JSON schema</summary>
11201    ///
11202    /// ```json
11203    ///{
11204    ///  "description": "The call data to send. This is the hex-encoded data of the function call consisting of the method selector and the function arguments.",
11205    ///  "examples": [
11206    ///    "0xa9059cbb000000000000000000000000fc807d1be4997e5c7b33e4d8d57e60c5b0f02b1a0000000000000000000000000000000000000000000000000000000000000064"
11207    ///  ],
11208    ///  "type": "string",
11209    ///  "pattern": "^0x[0-9a-fA-F]*$"
11210    ///}
11211    /// ```
11212    /// </details>
11213    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11214    #[serde(transparent)]
11215    pub struct EvmCallData(::std::string::String);
11216    impl ::std::ops::Deref for EvmCallData {
11217        type Target = ::std::string::String;
11218        fn deref(&self) -> &::std::string::String {
11219            &self.0
11220        }
11221    }
11222    impl ::std::convert::From<EvmCallData> for ::std::string::String {
11223        fn from(value: EvmCallData) -> Self {
11224            value.0
11225        }
11226    }
11227    impl ::std::convert::From<&EvmCallData> for EvmCallData {
11228        fn from(value: &EvmCallData) -> Self {
11229            value.clone()
11230        }
11231    }
11232    impl ::std::str::FromStr for EvmCallData {
11233        type Err = self::error::ConversionError;
11234        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11235            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
11236                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^0x[0-9a-fA-F]*$").unwrap());
11237            if PATTERN.find(value).is_none() {
11238                return Err("doesn't match pattern \"^0x[0-9a-fA-F]*$\"".into());
11239            }
11240            Ok(Self(value.to_string()))
11241        }
11242    }
11243    impl ::std::convert::TryFrom<&str> for EvmCallData {
11244        type Error = self::error::ConversionError;
11245        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11246            value.parse()
11247        }
11248    }
11249    impl ::std::convert::TryFrom<&::std::string::String> for EvmCallData {
11250        type Error = self::error::ConversionError;
11251        fn try_from(
11252            value: &::std::string::String,
11253        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11254            value.parse()
11255        }
11256    }
11257    impl ::std::convert::TryFrom<::std::string::String> for EvmCallData {
11258        type Error = self::error::ConversionError;
11259        fn try_from(
11260            value: ::std::string::String,
11261        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11262            value.parse()
11263        }
11264    }
11265    impl<'de> ::serde::Deserialize<'de> for EvmCallData {
11266        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
11267        where
11268            D: ::serde::Deserializer<'de>,
11269        {
11270            ::std::string::String::deserialize(deserializer)?
11271                .parse()
11272                .map_err(|e: self::error::ConversionError| {
11273                    <D::Error as ::serde::de::Error>::custom(e.to_string())
11274                })
11275        }
11276    }
11277    ///The address the call is directed to.
11278    ///
11279    /// <details><summary>JSON schema</summary>
11280    ///
11281    /// ```json
11282    ///{
11283    ///  "description": "The address the call is directed to.",
11284    ///  "examples": [
11285    ///    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
11286    ///  ],
11287    ///  "type": "string",
11288    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
11289    ///}
11290    /// ```
11291    /// </details>
11292    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
11293    #[serde(transparent)]
11294    pub struct EvmCallTo(::std::string::String);
11295    impl ::std::ops::Deref for EvmCallTo {
11296        type Target = ::std::string::String;
11297        fn deref(&self) -> &::std::string::String {
11298            &self.0
11299        }
11300    }
11301    impl ::std::convert::From<EvmCallTo> for ::std::string::String {
11302        fn from(value: EvmCallTo) -> Self {
11303            value.0
11304        }
11305    }
11306    impl ::std::convert::From<&EvmCallTo> for EvmCallTo {
11307        fn from(value: &EvmCallTo) -> Self {
11308            value.clone()
11309        }
11310    }
11311    impl ::std::str::FromStr for EvmCallTo {
11312        type Err = self::error::ConversionError;
11313        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11314            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
11315                ::std::sync::LazyLock::new(|| {
11316                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
11317                });
11318            if PATTERN.find(value).is_none() {
11319                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
11320            }
11321            Ok(Self(value.to_string()))
11322        }
11323    }
11324    impl ::std::convert::TryFrom<&str> for EvmCallTo {
11325        type Error = self::error::ConversionError;
11326        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11327            value.parse()
11328        }
11329    }
11330    impl ::std::convert::TryFrom<&::std::string::String> for EvmCallTo {
11331        type Error = self::error::ConversionError;
11332        fn try_from(
11333            value: &::std::string::String,
11334        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11335            value.parse()
11336        }
11337    }
11338    impl ::std::convert::TryFrom<::std::string::String> for EvmCallTo {
11339        type Error = self::error::ConversionError;
11340        fn try_from(
11341            value: ::std::string::String,
11342        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11343            value.parse()
11344        }
11345    }
11346    impl<'de> ::serde::Deserialize<'de> for EvmCallTo {
11347        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
11348        where
11349            D: ::serde::Deserializer<'de>,
11350        {
11351            ::std::string::String::deserialize(deserializer)?
11352                .parse()
11353                .map_err(|e: self::error::ConversionError| {
11354                    <D::Error as ::serde::de::Error>::custom(e.to_string())
11355                })
11356        }
11357    }
11358    ///A single condition to apply against the function and encoded arguments in the transaction's `data` field. Each `parameter` configuration must be successfully evaluated against the corresponding function argument in order for a policy to be accepted.
11359    ///
11360    /// <details><summary>JSON schema</summary>
11361    ///
11362    /// ```json
11363    ///{
11364    ///  "description": "A single condition to apply against the function and encoded arguments in the transaction's `data` field. Each `parameter` configuration must be successfully evaluated against the corresponding function argument in order for a policy to be accepted.",
11365    ///  "examples": [
11366    ///    {
11367    ///      "function": "transfer",
11368    ///      "params": [
11369    ///        {
11370    ///          "name": "value",
11371    ///          "operator": "<=",
11372    ///          "value": "10000"
11373    ///        },
11374    ///        {
11375    ///          "name": "to",
11376    ///          "operator": "in",
11377    ///          "values": [
11378    ///            "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
11379    ///          ]
11380    ///        }
11381    ///      ]
11382    ///    }
11383    ///  ],
11384    ///  "type": "object",
11385    ///  "required": [
11386    ///    "function"
11387    ///  ],
11388    ///  "properties": {
11389    ///    "function": {
11390    ///      "description": "The name of a smart contract function being called.",
11391    ///      "examples": [
11392    ///        "transfer"
11393    ///      ],
11394    ///      "type": "string"
11395    ///    },
11396    ///    "params": {
11397    ///      "description": "An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.",
11398    ///      "examples": [
11399    ///        [
11400    ///          {
11401    ///            "name": "value",
11402    ///            "operator": "<=",
11403    ///            "value": "10000"
11404    ///          },
11405    ///          {
11406    ///            "name": "to",
11407    ///            "operator": "in",
11408    ///            "values": [
11409    ///              "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
11410    ///            ]
11411    ///          }
11412    ///        ]
11413    ///      ],
11414    ///      "type": "array",
11415    ///      "items": {
11416    ///        "description": "A list of parameter conditions to apply against encoded arguments in the transaction's `data` field.",
11417    ///        "oneOf": [
11418    ///          {
11419    ///            "$ref": "#/components/schemas/EvmDataParameterCondition"
11420    ///          },
11421    ///          {
11422    ///            "$ref": "#/components/schemas/EvmDataParameterConditionList"
11423    ///          }
11424    ///        ]
11425    ///      }
11426    ///    }
11427    ///  },
11428    ///  "x-audience": "public"
11429    ///}
11430    /// ```
11431    /// </details>
11432    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11433    pub struct EvmDataCondition {
11434        ///The name of a smart contract function being called.
11435        pub function: ::std::string::String,
11436        ///An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
11437        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11438        pub params: ::std::vec::Vec<EvmDataConditionParamsItem>,
11439    }
11440    impl ::std::convert::From<&EvmDataCondition> for EvmDataCondition {
11441        fn from(value: &EvmDataCondition) -> Self {
11442            value.clone()
11443        }
11444    }
11445    impl EvmDataCondition {
11446        pub fn builder() -> builder::EvmDataCondition {
11447            Default::default()
11448        }
11449    }
11450    ///A list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
11451    ///
11452    /// <details><summary>JSON schema</summary>
11453    ///
11454    /// ```json
11455    ///{
11456    ///  "description": "A list of parameter conditions to apply against encoded arguments in the transaction's `data` field.",
11457    ///  "oneOf": [
11458    ///    {
11459    ///      "$ref": "#/components/schemas/EvmDataParameterCondition"
11460    ///    },
11461    ///    {
11462    ///      "$ref": "#/components/schemas/EvmDataParameterConditionList"
11463    ///    }
11464    ///  ]
11465    ///}
11466    /// ```
11467    /// </details>
11468    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11469    #[serde(untagged)]
11470    pub enum EvmDataConditionParamsItem {
11471        Variant0(EvmDataParameterCondition),
11472        Variant1(EvmDataParameterConditionList),
11473    }
11474    impl ::std::convert::From<&Self> for EvmDataConditionParamsItem {
11475        fn from(value: &EvmDataConditionParamsItem) -> Self {
11476            value.clone()
11477        }
11478    }
11479    impl ::std::convert::From<EvmDataParameterCondition> for EvmDataConditionParamsItem {
11480        fn from(value: EvmDataParameterCondition) -> Self {
11481            Self::Variant0(value)
11482        }
11483    }
11484    impl ::std::convert::From<EvmDataParameterConditionList> for EvmDataConditionParamsItem {
11485        fn from(value: EvmDataParameterConditionList) -> Self {
11486            Self::Variant1(value)
11487        }
11488    }
11489    ///A schema for specifying a criterion for the `data` field of an EVM transaction.
11490    ///
11491    /// <details><summary>JSON schema</summary>
11492    ///
11493    /// ```json
11494    ///{
11495    ///  "title": "EvmDataCriterion",
11496    ///  "description": "A schema for specifying a criterion for the `data` field of an EVM transaction.",
11497    ///  "type": "object",
11498    ///  "required": [
11499    ///    "abi",
11500    ///    "conditions",
11501    ///    "type"
11502    ///  ],
11503    ///  "properties": {
11504    ///    "abi": {
11505    ///      "description": "The ABI of the smart contract being called. This can be a partial structure with only specific functions.",
11506    ///      "examples": [
11507    ///        "erc20"
11508    ///      ],
11509    ///      "oneOf": [
11510    ///        {
11511    ///          "$ref": "#/components/schemas/KnownAbiType"
11512    ///        },
11513    ///        {
11514    ///          "$ref": "#/components/schemas/Abi"
11515    ///        }
11516    ///      ]
11517    ///    },
11518    ///    "conditions": {
11519    ///      "description": "A list of conditions to apply against the function and encoded arguments in the transaction's `data` field. Each condition must be met in order for this policy to be accepted or rejected.",
11520    ///      "examples": [
11521    ///        [
11522    ///          {
11523    ///            "function": "approve"
11524    ///          },
11525    ///          {
11526    ///            "function": "transfer",
11527    ///            "params": [
11528    ///              {
11529    ///                "name": "value",
11530    ///                "operator": "<=",
11531    ///                "value": "10000"
11532    ///              },
11533    ///              {
11534    ///                "name": "to",
11535    ///                "operator": "in",
11536    ///                "values": [
11537    ///                  "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
11538    ///                ]
11539    ///              }
11540    ///            ]
11541    ///          }
11542    ///        ]
11543    ///      ],
11544    ///      "type": "array",
11545    ///      "items": {
11546    ///        "$ref": "#/components/schemas/EvmDataCondition"
11547    ///      }
11548    ///    },
11549    ///    "type": {
11550    ///      "description": "The type of criterion to use. This should be `evmData`.",
11551    ///      "examples": [
11552    ///        "evmData"
11553    ///      ],
11554    ///      "type": "string",
11555    ///      "enum": [
11556    ///        "evmData"
11557    ///      ]
11558    ///    }
11559    ///  },
11560    ///  "x-audience": "public"
11561    ///}
11562    /// ```
11563    /// </details>
11564    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11565    pub struct EvmDataCriterion {
11566        ///The ABI of the smart contract being called. This can be a partial structure with only specific functions.
11567        pub abi: EvmDataCriterionAbi,
11568        ///A list of conditions to apply against the function and encoded arguments in the transaction's `data` field. Each condition must be met in order for this policy to be accepted or rejected.
11569        pub conditions: ::std::vec::Vec<EvmDataCondition>,
11570        ///The type of criterion to use. This should be `evmData`.
11571        #[serde(rename = "type")]
11572        pub type_: EvmDataCriterionType,
11573    }
11574    impl ::std::convert::From<&EvmDataCriterion> for EvmDataCriterion {
11575        fn from(value: &EvmDataCriterion) -> Self {
11576            value.clone()
11577        }
11578    }
11579    impl EvmDataCriterion {
11580        pub fn builder() -> builder::EvmDataCriterion {
11581            Default::default()
11582        }
11583    }
11584    ///The ABI of the smart contract being called. This can be a partial structure with only specific functions.
11585    ///
11586    /// <details><summary>JSON schema</summary>
11587    ///
11588    /// ```json
11589    ///{
11590    ///  "description": "The ABI of the smart contract being called. This can be a partial structure with only specific functions.",
11591    ///  "examples": [
11592    ///    "erc20"
11593    ///  ],
11594    ///  "oneOf": [
11595    ///    {
11596    ///      "$ref": "#/components/schemas/KnownAbiType"
11597    ///    },
11598    ///    {
11599    ///      "$ref": "#/components/schemas/Abi"
11600    ///    }
11601    ///  ]
11602    ///}
11603    /// ```
11604    /// </details>
11605    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11606    #[serde(untagged)]
11607    pub enum EvmDataCriterionAbi {
11608        KnownAbiType(KnownAbiType),
11609        Abi(Abi),
11610    }
11611    impl ::std::convert::From<&Self> for EvmDataCriterionAbi {
11612        fn from(value: &EvmDataCriterionAbi) -> Self {
11613            value.clone()
11614        }
11615    }
11616    impl ::std::convert::From<KnownAbiType> for EvmDataCriterionAbi {
11617        fn from(value: KnownAbiType) -> Self {
11618            Self::KnownAbiType(value)
11619        }
11620    }
11621    impl ::std::convert::From<Abi> for EvmDataCriterionAbi {
11622        fn from(value: Abi) -> Self {
11623            Self::Abi(value)
11624        }
11625    }
11626    ///The type of criterion to use. This should be `evmData`.
11627    ///
11628    /// <details><summary>JSON schema</summary>
11629    ///
11630    /// ```json
11631    ///{
11632    ///  "description": "The type of criterion to use. This should be `evmData`.",
11633    ///  "examples": [
11634    ///    "evmData"
11635    ///  ],
11636    ///  "type": "string",
11637    ///  "enum": [
11638    ///    "evmData"
11639    ///  ]
11640    ///}
11641    /// ```
11642    /// </details>
11643    #[derive(
11644        ::serde::Deserialize,
11645        ::serde::Serialize,
11646        Clone,
11647        Copy,
11648        Debug,
11649        Eq,
11650        Hash,
11651        Ord,
11652        PartialEq,
11653        PartialOrd,
11654    )]
11655    pub enum EvmDataCriterionType {
11656        #[serde(rename = "evmData")]
11657        EvmData,
11658    }
11659    impl ::std::convert::From<&Self> for EvmDataCriterionType {
11660        fn from(value: &EvmDataCriterionType) -> Self {
11661            value.clone()
11662        }
11663    }
11664    impl ::std::fmt::Display for EvmDataCriterionType {
11665        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11666            match *self {
11667                Self::EvmData => f.write_str("evmData"),
11668            }
11669        }
11670    }
11671    impl ::std::str::FromStr for EvmDataCriterionType {
11672        type Err = self::error::ConversionError;
11673        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11674            match value {
11675                "evmData" => Ok(Self::EvmData),
11676                _ => Err("invalid value".into()),
11677            }
11678        }
11679    }
11680    impl ::std::convert::TryFrom<&str> for EvmDataCriterionType {
11681        type Error = self::error::ConversionError;
11682        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11683            value.parse()
11684        }
11685    }
11686    impl ::std::convert::TryFrom<&::std::string::String> for EvmDataCriterionType {
11687        type Error = self::error::ConversionError;
11688        fn try_from(
11689            value: &::std::string::String,
11690        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11691            value.parse()
11692        }
11693    }
11694    impl ::std::convert::TryFrom<::std::string::String> for EvmDataCriterionType {
11695        type Error = self::error::ConversionError;
11696        fn try_from(
11697            value: ::std::string::String,
11698        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11699            value.parse()
11700        }
11701    }
11702    ///`EvmDataParameterCondition`
11703    ///
11704    /// <details><summary>JSON schema</summary>
11705    ///
11706    /// ```json
11707    ///{
11708    ///  "title": "EvmDataParameterCondition",
11709    ///  "type": "object",
11710    ///  "required": [
11711    ///    "name",
11712    ///    "operator",
11713    ///    "value"
11714    ///  ],
11715    ///  "properties": {
11716    ///    "name": {
11717    ///      "description": "The name of the parameter to check against a transaction's calldata. If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.",
11718    ///      "examples": [
11719    ///        "to"
11720    ///      ],
11721    ///      "type": "string"
11722    ///    },
11723    ///    "operator": {
11724    ///      "description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
11725    ///      "examples": [
11726    ///        "=="
11727    ///      ],
11728    ///      "type": "string",
11729    ///      "enum": [
11730    ///        "GreaterThan",
11731    ///        "GreaterThanOrEqual",
11732    ///        "LessThan",
11733    ///        "LessThanOrEqual",
11734    ///        "Equal"
11735    ///      ]
11736    ///    },
11737    ///    "value": {
11738    ///      "description": "A single value to compare the value resolved at `name` to. All values are encoded as strings. Refer to the table in the documentation for how values should be encoded, and which operators are supported for each type.",
11739    ///      "examples": [
11740    ///        "100000"
11741    ///      ],
11742    ///      "type": "string"
11743    ///    }
11744    ///  },
11745    ///  "x-audience": "public"
11746    ///}
11747    /// ```
11748    /// </details>
11749    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11750    pub struct EvmDataParameterCondition {
11751        ///The name of the parameter to check against a transaction's calldata. If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
11752        pub name: ::std::string::String,
11753        ///The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
11754        pub operator: EvmDataParameterConditionOperator,
11755        ///A single value to compare the value resolved at `name` to. All values are encoded as strings. Refer to the table in the documentation for how values should be encoded, and which operators are supported for each type.
11756        pub value: ::std::string::String,
11757    }
11758    impl ::std::convert::From<&EvmDataParameterCondition> for EvmDataParameterCondition {
11759        fn from(value: &EvmDataParameterCondition) -> Self {
11760            value.clone()
11761        }
11762    }
11763    impl EvmDataParameterCondition {
11764        pub fn builder() -> builder::EvmDataParameterCondition {
11765            Default::default()
11766        }
11767    }
11768    ///`EvmDataParameterConditionList`
11769    ///
11770    /// <details><summary>JSON schema</summary>
11771    ///
11772    /// ```json
11773    ///{
11774    ///  "title": "EvmDataParameterConditionList",
11775    ///  "type": "object",
11776    ///  "required": [
11777    ///    "name",
11778    ///    "operator",
11779    ///    "values"
11780    ///  ],
11781    ///  "properties": {
11782    ///    "name": {
11783    ///      "description": "The name of the parameter to check against a transaction's calldata. If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.",
11784    ///      "examples": [
11785    ///        "to"
11786    ///      ],
11787    ///      "type": "string"
11788    ///    },
11789    ///    "operator": {
11790    ///      "description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `values` field will be on the right-hand side.",
11791    ///      "examples": [
11792    ///        "in"
11793    ///      ],
11794    ///      "type": "string",
11795    ///      "enum": [
11796    ///        "in",
11797    ///        "not in"
11798    ///      ]
11799    ///    },
11800    ///    "values": {
11801    ///      "description": "Values to compare against the resolved `name` value. All values are encoded as strings. Refer to the table in the documentation for how values should be encoded, and which operators are supported for each type.",
11802    ///      "examples": [
11803    ///        [
11804    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
11805    ///        ]
11806    ///      ],
11807    ///      "type": "array",
11808    ///      "items": {
11809    ///        "description": "A single potential value to compare against the resolved `name` value. All values are encoded as strings. Refer to the table in the documentation for how values should be encoded, and which operators are supported for each type.",
11810    ///        "examples": [
11811    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
11812    ///        ],
11813    ///        "type": "string"
11814    ///      }
11815    ///    }
11816    ///  },
11817    ///  "x-audience": "public"
11818    ///}
11819    /// ```
11820    /// </details>
11821    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
11822    pub struct EvmDataParameterConditionList {
11823        ///The name of the parameter to check against a transaction's calldata. If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
11824        pub name: ::std::string::String,
11825        ///The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `values` field will be on the right-hand side.
11826        pub operator: EvmDataParameterConditionListOperator,
11827        ///Values to compare against the resolved `name` value. All values are encoded as strings. Refer to the table in the documentation for how values should be encoded, and which operators are supported for each type.
11828        pub values: ::std::vec::Vec<::std::string::String>,
11829    }
11830    impl ::std::convert::From<&EvmDataParameterConditionList> for EvmDataParameterConditionList {
11831        fn from(value: &EvmDataParameterConditionList) -> Self {
11832            value.clone()
11833        }
11834    }
11835    impl EvmDataParameterConditionList {
11836        pub fn builder() -> builder::EvmDataParameterConditionList {
11837            Default::default()
11838        }
11839    }
11840    ///The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `values` field will be on the right-hand side.
11841    ///
11842    /// <details><summary>JSON schema</summary>
11843    ///
11844    /// ```json
11845    ///{
11846    ///  "description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `values` field will be on the right-hand side.",
11847    ///  "examples": [
11848    ///    "in"
11849    ///  ],
11850    ///  "type": "string",
11851    ///  "enum": [
11852    ///    "in",
11853    ///    "not in"
11854    ///  ]
11855    ///}
11856    /// ```
11857    /// </details>
11858    #[derive(
11859        ::serde::Deserialize,
11860        ::serde::Serialize,
11861        Clone,
11862        Copy,
11863        Debug,
11864        Eq,
11865        Hash,
11866        Ord,
11867        PartialEq,
11868        PartialOrd,
11869    )]
11870    pub enum EvmDataParameterConditionListOperator {
11871        #[serde(rename = "in")]
11872        In,
11873        #[serde(rename = "not in")]
11874        NotIn,
11875    }
11876    impl ::std::convert::From<&Self> for EvmDataParameterConditionListOperator {
11877        fn from(value: &EvmDataParameterConditionListOperator) -> Self {
11878            value.clone()
11879        }
11880    }
11881    impl ::std::fmt::Display for EvmDataParameterConditionListOperator {
11882        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11883            match *self {
11884                Self::In => f.write_str("in"),
11885                Self::NotIn => f.write_str("not in"),
11886            }
11887        }
11888    }
11889    impl ::std::str::FromStr for EvmDataParameterConditionListOperator {
11890        type Err = self::error::ConversionError;
11891        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11892            match value {
11893                "in" => Ok(Self::In),
11894                "not in" => Ok(Self::NotIn),
11895                _ => Err("invalid value".into()),
11896            }
11897        }
11898    }
11899    impl ::std::convert::TryFrom<&str> for EvmDataParameterConditionListOperator {
11900        type Error = self::error::ConversionError;
11901        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11902            value.parse()
11903        }
11904    }
11905    impl ::std::convert::TryFrom<&::std::string::String> for EvmDataParameterConditionListOperator {
11906        type Error = self::error::ConversionError;
11907        fn try_from(
11908            value: &::std::string::String,
11909        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11910            value.parse()
11911        }
11912    }
11913    impl ::std::convert::TryFrom<::std::string::String> for EvmDataParameterConditionListOperator {
11914        type Error = self::error::ConversionError;
11915        fn try_from(
11916            value: ::std::string::String,
11917        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11918            value.parse()
11919        }
11920    }
11921    ///The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
11922    ///
11923    /// <details><summary>JSON schema</summary>
11924    ///
11925    /// ```json
11926    ///{
11927    ///  "description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
11928    ///  "examples": [
11929    ///    "=="
11930    ///  ],
11931    ///  "type": "string",
11932    ///  "enum": [
11933    ///    "GreaterThan",
11934    ///    "GreaterThanOrEqual",
11935    ///    "LessThan",
11936    ///    "LessThanOrEqual",
11937    ///    "Equal"
11938    ///  ]
11939    ///}
11940    /// ```
11941    /// </details>
11942    #[derive(
11943        ::serde::Deserialize,
11944        ::serde::Serialize,
11945        Clone,
11946        Copy,
11947        Debug,
11948        Eq,
11949        Hash,
11950        Ord,
11951        PartialEq,
11952        PartialOrd,
11953    )]
11954    pub enum EvmDataParameterConditionOperator {
11955        GreaterThan,
11956        GreaterThanOrEqual,
11957        LessThan,
11958        LessThanOrEqual,
11959        Equal,
11960    }
11961    impl ::std::convert::From<&Self> for EvmDataParameterConditionOperator {
11962        fn from(value: &EvmDataParameterConditionOperator) -> Self {
11963            value.clone()
11964        }
11965    }
11966    impl ::std::fmt::Display for EvmDataParameterConditionOperator {
11967        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11968            match *self {
11969                Self::GreaterThan => f.write_str("GreaterThan"),
11970                Self::GreaterThanOrEqual => f.write_str("GreaterThanOrEqual"),
11971                Self::LessThan => f.write_str("LessThan"),
11972                Self::LessThanOrEqual => f.write_str("LessThanOrEqual"),
11973                Self::Equal => f.write_str("Equal"),
11974            }
11975        }
11976    }
11977    impl ::std::str::FromStr for EvmDataParameterConditionOperator {
11978        type Err = self::error::ConversionError;
11979        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11980            match value {
11981                "GreaterThan" => Ok(Self::GreaterThan),
11982                "GreaterThanOrEqual" => Ok(Self::GreaterThanOrEqual),
11983                "LessThan" => Ok(Self::LessThan),
11984                "LessThanOrEqual" => Ok(Self::LessThanOrEqual),
11985                "Equal" => Ok(Self::Equal),
11986                _ => Err("invalid value".into()),
11987            }
11988        }
11989    }
11990    impl ::std::convert::TryFrom<&str> for EvmDataParameterConditionOperator {
11991        type Error = self::error::ConversionError;
11992        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11993            value.parse()
11994        }
11995    }
11996    impl ::std::convert::TryFrom<&::std::string::String> for EvmDataParameterConditionOperator {
11997        type Error = self::error::ConversionError;
11998        fn try_from(
11999            value: &::std::string::String,
12000        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12001            value.parse()
12002        }
12003    }
12004    impl ::std::convert::TryFrom<::std::string::String> for EvmDataParameterConditionOperator {
12005        type Error = self::error::ConversionError;
12006        fn try_from(
12007            value: ::std::string::String,
12008        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12009            value.parse()
12010        }
12011    }
12012    ///A schema for specifying a criterion for the message being signed.
12013    ///
12014    /// <details><summary>JSON schema</summary>
12015    ///
12016    /// ```json
12017    ///{
12018    ///  "title": "EvmMessageCriterion",
12019    ///  "description": "A schema for specifying a criterion for the message being signed.",
12020    ///  "type": "object",
12021    ///  "required": [
12022    ///    "match",
12023    ///    "type"
12024    ///  ],
12025    ///  "properties": {
12026    ///    "match": {
12027    ///      "description": "A regular expression the message is matched against. Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).",
12028    ///      "examples": [
12029    ///        "^hello ([a-z]+)$"
12030    ///      ],
12031    ///      "type": "string"
12032    ///    },
12033    ///    "type": {
12034    ///      "description": "The type of criterion to use. This should be `evmMessage`.",
12035    ///      "examples": [
12036    ///        "evmMessage"
12037    ///      ],
12038    ///      "type": "string",
12039    ///      "enum": [
12040    ///        "evmMessage"
12041    ///      ]
12042    ///    }
12043    ///  },
12044    ///  "x-audience": "public"
12045    ///}
12046    /// ```
12047    /// </details>
12048    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12049    pub struct EvmMessageCriterion {
12050        ///A regular expression the message is matched against. Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
12051        #[serde(rename = "match")]
12052        pub match_: ::std::string::String,
12053        ///The type of criterion to use. This should be `evmMessage`.
12054        #[serde(rename = "type")]
12055        pub type_: EvmMessageCriterionType,
12056    }
12057    impl ::std::convert::From<&EvmMessageCriterion> for EvmMessageCriterion {
12058        fn from(value: &EvmMessageCriterion) -> Self {
12059            value.clone()
12060        }
12061    }
12062    impl EvmMessageCriterion {
12063        pub fn builder() -> builder::EvmMessageCriterion {
12064            Default::default()
12065        }
12066    }
12067    ///The type of criterion to use. This should be `evmMessage`.
12068    ///
12069    /// <details><summary>JSON schema</summary>
12070    ///
12071    /// ```json
12072    ///{
12073    ///  "description": "The type of criterion to use. This should be `evmMessage`.",
12074    ///  "examples": [
12075    ///    "evmMessage"
12076    ///  ],
12077    ///  "type": "string",
12078    ///  "enum": [
12079    ///    "evmMessage"
12080    ///  ]
12081    ///}
12082    /// ```
12083    /// </details>
12084    #[derive(
12085        ::serde::Deserialize,
12086        ::serde::Serialize,
12087        Clone,
12088        Copy,
12089        Debug,
12090        Eq,
12091        Hash,
12092        Ord,
12093        PartialEq,
12094        PartialOrd,
12095    )]
12096    pub enum EvmMessageCriterionType {
12097        #[serde(rename = "evmMessage")]
12098        EvmMessage,
12099    }
12100    impl ::std::convert::From<&Self> for EvmMessageCriterionType {
12101        fn from(value: &EvmMessageCriterionType) -> Self {
12102            value.clone()
12103        }
12104    }
12105    impl ::std::fmt::Display for EvmMessageCriterionType {
12106        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12107            match *self {
12108                Self::EvmMessage => f.write_str("evmMessage"),
12109            }
12110        }
12111    }
12112    impl ::std::str::FromStr for EvmMessageCriterionType {
12113        type Err = self::error::ConversionError;
12114        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12115            match value {
12116                "evmMessage" => Ok(Self::EvmMessage),
12117                _ => Err("invalid value".into()),
12118            }
12119        }
12120    }
12121    impl ::std::convert::TryFrom<&str> for EvmMessageCriterionType {
12122        type Error = self::error::ConversionError;
12123        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12124            value.parse()
12125        }
12126    }
12127    impl ::std::convert::TryFrom<&::std::string::String> for EvmMessageCriterionType {
12128        type Error = self::error::ConversionError;
12129        fn try_from(
12130            value: &::std::string::String,
12131        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12132            value.parse()
12133        }
12134    }
12135    impl ::std::convert::TryFrom<::std::string::String> for EvmMessageCriterionType {
12136        type Error = self::error::ConversionError;
12137        fn try_from(
12138            value: ::std::string::String,
12139        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12140            value.parse()
12141        }
12142    }
12143    ///A schema for specifying a criterion for the intended `network` of an EVM transaction.
12144    ///
12145    /// <details><summary>JSON schema</summary>
12146    ///
12147    /// ```json
12148    ///{
12149    ///  "title": "EvmNetworkCriterion",
12150    ///  "description": "A schema for specifying a criterion for the intended `network` of an EVM transaction.",
12151    ///  "type": "object",
12152    ///  "required": [
12153    ///    "networks",
12154    ///    "operator",
12155    ///    "type"
12156    ///  ],
12157    ///  "properties": {
12158    ///    "networks": {
12159    ///      "description": "A list of EVM network identifiers that the transaction's intended `network` should be compared to.",
12160    ///      "examples": [
12161    ///        [
12162    ///          "base",
12163    ///          "ethereum"
12164    ///        ]
12165    ///      ],
12166    ///      "type": "array",
12167    ///      "items": {
12168    ///        "description": "The network the transaction is for.",
12169    ///        "examples": [
12170    ///          "base-sepolia"
12171    ///        ],
12172    ///        "type": "string",
12173    ///        "enum": [
12174    ///          "base-sepolia",
12175    ///          "base",
12176    ///          "ethereum",
12177    ///          "ethereum-sepolia",
12178    ///          "avalanche",
12179    ///          "polygon",
12180    ///          "optimism",
12181    ///          "arbitrum",
12182    ///          "zora",
12183    ///          "bnb"
12184    ///        ]
12185    ///      }
12186    ///    },
12187    ///    "operator": {
12188    ///      "description": "The operator to use for the comparison. The transaction's intended `network` will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.",
12189    ///      "examples": [
12190    ///        "in"
12191    ///      ],
12192    ///      "type": "string",
12193    ///      "enum": [
12194    ///        "in",
12195    ///        "not in"
12196    ///      ]
12197    ///    },
12198    ///    "type": {
12199    ///      "description": "The type of criterion to use. This should be `evmNetwork`.",
12200    ///      "examples": [
12201    ///        "evmNetwork"
12202    ///      ],
12203    ///      "type": "string",
12204    ///      "enum": [
12205    ///        "evmNetwork"
12206    ///      ]
12207    ///    }
12208    ///  },
12209    ///  "x-audience": "public"
12210    ///}
12211    /// ```
12212    /// </details>
12213    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12214    pub struct EvmNetworkCriterion {
12215        ///A list of EVM network identifiers that the transaction's intended `network` should be compared to.
12216        pub networks: ::std::vec::Vec<EvmNetworkCriterionNetworksItem>,
12217        ///The operator to use for the comparison. The transaction's intended `network` will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.
12218        pub operator: EvmNetworkCriterionOperator,
12219        ///The type of criterion to use. This should be `evmNetwork`.
12220        #[serde(rename = "type")]
12221        pub type_: EvmNetworkCriterionType,
12222    }
12223    impl ::std::convert::From<&EvmNetworkCriterion> for EvmNetworkCriterion {
12224        fn from(value: &EvmNetworkCriterion) -> Self {
12225            value.clone()
12226        }
12227    }
12228    impl EvmNetworkCriterion {
12229        pub fn builder() -> builder::EvmNetworkCriterion {
12230            Default::default()
12231        }
12232    }
12233    ///The network the transaction is for.
12234    ///
12235    /// <details><summary>JSON schema</summary>
12236    ///
12237    /// ```json
12238    ///{
12239    ///  "description": "The network the transaction is for.",
12240    ///  "examples": [
12241    ///    "base-sepolia"
12242    ///  ],
12243    ///  "type": "string",
12244    ///  "enum": [
12245    ///    "base-sepolia",
12246    ///    "base",
12247    ///    "ethereum",
12248    ///    "ethereum-sepolia",
12249    ///    "avalanche",
12250    ///    "polygon",
12251    ///    "optimism",
12252    ///    "arbitrum",
12253    ///    "zora",
12254    ///    "bnb"
12255    ///  ]
12256    ///}
12257    /// ```
12258    /// </details>
12259    #[derive(
12260        ::serde::Deserialize,
12261        ::serde::Serialize,
12262        Clone,
12263        Copy,
12264        Debug,
12265        Eq,
12266        Hash,
12267        Ord,
12268        PartialEq,
12269        PartialOrd,
12270    )]
12271    pub enum EvmNetworkCriterionNetworksItem {
12272        #[serde(rename = "base-sepolia")]
12273        BaseSepolia,
12274        #[serde(rename = "base")]
12275        Base,
12276        #[serde(rename = "ethereum")]
12277        Ethereum,
12278        #[serde(rename = "ethereum-sepolia")]
12279        EthereumSepolia,
12280        #[serde(rename = "avalanche")]
12281        Avalanche,
12282        #[serde(rename = "polygon")]
12283        Polygon,
12284        #[serde(rename = "optimism")]
12285        Optimism,
12286        #[serde(rename = "arbitrum")]
12287        Arbitrum,
12288        #[serde(rename = "zora")]
12289        Zora,
12290        #[serde(rename = "bnb")]
12291        Bnb,
12292    }
12293    impl ::std::convert::From<&Self> for EvmNetworkCriterionNetworksItem {
12294        fn from(value: &EvmNetworkCriterionNetworksItem) -> Self {
12295            value.clone()
12296        }
12297    }
12298    impl ::std::fmt::Display for EvmNetworkCriterionNetworksItem {
12299        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12300            match *self {
12301                Self::BaseSepolia => f.write_str("base-sepolia"),
12302                Self::Base => f.write_str("base"),
12303                Self::Ethereum => f.write_str("ethereum"),
12304                Self::EthereumSepolia => f.write_str("ethereum-sepolia"),
12305                Self::Avalanche => f.write_str("avalanche"),
12306                Self::Polygon => f.write_str("polygon"),
12307                Self::Optimism => f.write_str("optimism"),
12308                Self::Arbitrum => f.write_str("arbitrum"),
12309                Self::Zora => f.write_str("zora"),
12310                Self::Bnb => f.write_str("bnb"),
12311            }
12312        }
12313    }
12314    impl ::std::str::FromStr for EvmNetworkCriterionNetworksItem {
12315        type Err = self::error::ConversionError;
12316        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12317            match value {
12318                "base-sepolia" => Ok(Self::BaseSepolia),
12319                "base" => Ok(Self::Base),
12320                "ethereum" => Ok(Self::Ethereum),
12321                "ethereum-sepolia" => Ok(Self::EthereumSepolia),
12322                "avalanche" => Ok(Self::Avalanche),
12323                "polygon" => Ok(Self::Polygon),
12324                "optimism" => Ok(Self::Optimism),
12325                "arbitrum" => Ok(Self::Arbitrum),
12326                "zora" => Ok(Self::Zora),
12327                "bnb" => Ok(Self::Bnb),
12328                _ => Err("invalid value".into()),
12329            }
12330        }
12331    }
12332    impl ::std::convert::TryFrom<&str> for EvmNetworkCriterionNetworksItem {
12333        type Error = self::error::ConversionError;
12334        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12335            value.parse()
12336        }
12337    }
12338    impl ::std::convert::TryFrom<&::std::string::String> for EvmNetworkCriterionNetworksItem {
12339        type Error = self::error::ConversionError;
12340        fn try_from(
12341            value: &::std::string::String,
12342        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12343            value.parse()
12344        }
12345    }
12346    impl ::std::convert::TryFrom<::std::string::String> for EvmNetworkCriterionNetworksItem {
12347        type Error = self::error::ConversionError;
12348        fn try_from(
12349            value: ::std::string::String,
12350        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12351            value.parse()
12352        }
12353    }
12354    ///The operator to use for the comparison. The transaction's intended `network` will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.
12355    ///
12356    /// <details><summary>JSON schema</summary>
12357    ///
12358    /// ```json
12359    ///{
12360    ///  "description": "The operator to use for the comparison. The transaction's intended `network` will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.",
12361    ///  "examples": [
12362    ///    "in"
12363    ///  ],
12364    ///  "type": "string",
12365    ///  "enum": [
12366    ///    "in",
12367    ///    "not in"
12368    ///  ]
12369    ///}
12370    /// ```
12371    /// </details>
12372    #[derive(
12373        ::serde::Deserialize,
12374        ::serde::Serialize,
12375        Clone,
12376        Copy,
12377        Debug,
12378        Eq,
12379        Hash,
12380        Ord,
12381        PartialEq,
12382        PartialOrd,
12383    )]
12384    pub enum EvmNetworkCriterionOperator {
12385        #[serde(rename = "in")]
12386        In,
12387        #[serde(rename = "not in")]
12388        NotIn,
12389    }
12390    impl ::std::convert::From<&Self> for EvmNetworkCriterionOperator {
12391        fn from(value: &EvmNetworkCriterionOperator) -> Self {
12392            value.clone()
12393        }
12394    }
12395    impl ::std::fmt::Display for EvmNetworkCriterionOperator {
12396        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12397            match *self {
12398                Self::In => f.write_str("in"),
12399                Self::NotIn => f.write_str("not in"),
12400            }
12401        }
12402    }
12403    impl ::std::str::FromStr for EvmNetworkCriterionOperator {
12404        type Err = self::error::ConversionError;
12405        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12406            match value {
12407                "in" => Ok(Self::In),
12408                "not in" => Ok(Self::NotIn),
12409                _ => Err("invalid value".into()),
12410            }
12411        }
12412    }
12413    impl ::std::convert::TryFrom<&str> for EvmNetworkCriterionOperator {
12414        type Error = self::error::ConversionError;
12415        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12416            value.parse()
12417        }
12418    }
12419    impl ::std::convert::TryFrom<&::std::string::String> for EvmNetworkCriterionOperator {
12420        type Error = self::error::ConversionError;
12421        fn try_from(
12422            value: &::std::string::String,
12423        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12424            value.parse()
12425        }
12426    }
12427    impl ::std::convert::TryFrom<::std::string::String> for EvmNetworkCriterionOperator {
12428        type Error = self::error::ConversionError;
12429        fn try_from(
12430            value: ::std::string::String,
12431        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12432            value.parse()
12433        }
12434    }
12435    ///The type of criterion to use. This should be `evmNetwork`.
12436    ///
12437    /// <details><summary>JSON schema</summary>
12438    ///
12439    /// ```json
12440    ///{
12441    ///  "description": "The type of criterion to use. This should be `evmNetwork`.",
12442    ///  "examples": [
12443    ///    "evmNetwork"
12444    ///  ],
12445    ///  "type": "string",
12446    ///  "enum": [
12447    ///    "evmNetwork"
12448    ///  ]
12449    ///}
12450    /// ```
12451    /// </details>
12452    #[derive(
12453        ::serde::Deserialize,
12454        ::serde::Serialize,
12455        Clone,
12456        Copy,
12457        Debug,
12458        Eq,
12459        Hash,
12460        Ord,
12461        PartialEq,
12462        PartialOrd,
12463    )]
12464    pub enum EvmNetworkCriterionType {
12465        #[serde(rename = "evmNetwork")]
12466        EvmNetwork,
12467    }
12468    impl ::std::convert::From<&Self> for EvmNetworkCriterionType {
12469        fn from(value: &EvmNetworkCriterionType) -> Self {
12470            value.clone()
12471        }
12472    }
12473    impl ::std::fmt::Display for EvmNetworkCriterionType {
12474        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12475            match *self {
12476                Self::EvmNetwork => f.write_str("evmNetwork"),
12477            }
12478        }
12479    }
12480    impl ::std::str::FromStr for EvmNetworkCriterionType {
12481        type Err = self::error::ConversionError;
12482        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12483            match value {
12484                "evmNetwork" => Ok(Self::EvmNetwork),
12485                _ => Err("invalid value".into()),
12486            }
12487        }
12488    }
12489    impl ::std::convert::TryFrom<&str> for EvmNetworkCriterionType {
12490        type Error = self::error::ConversionError;
12491        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12492            value.parse()
12493        }
12494    }
12495    impl ::std::convert::TryFrom<&::std::string::String> for EvmNetworkCriterionType {
12496        type Error = self::error::ConversionError;
12497        fn try_from(
12498            value: &::std::string::String,
12499        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12500            value.parse()
12501        }
12502    }
12503    impl ::std::convert::TryFrom<::std::string::String> for EvmNetworkCriterionType {
12504        type Error = self::error::ConversionError;
12505        fn try_from(
12506            value: ::std::string::String,
12507        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12508            value.parse()
12509        }
12510    }
12511    ///`EvmSmartAccount`
12512    ///
12513    /// <details><summary>JSON schema</summary>
12514    ///
12515    /// ```json
12516    ///{
12517    ///  "type": "object",
12518    ///  "required": [
12519    ///    "address",
12520    ///    "owners"
12521    ///  ],
12522    ///  "properties": {
12523    ///    "address": {
12524    ///      "description": "The 0x-prefixed, checksum address of the Smart Account.",
12525    ///      "examples": [
12526    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
12527    ///      ],
12528    ///      "type": "string",
12529    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
12530    ///    },
12531    ///    "createdAt": {
12532    ///      "description": "The UTC ISO 8601 timestamp at which the account was created.",
12533    ///      "examples": [
12534    ///        "2025-03-25T12:00:00Z"
12535    ///      ],
12536    ///      "type": "string",
12537    ///      "format": "date-time"
12538    ///    },
12539    ///    "name": {
12540    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names are guaranteed to be unique across all Smart Accounts in the developer's CDP Project.",
12541    ///      "examples": [
12542    ///        "my-smart-account"
12543    ///      ],
12544    ///      "type": "string",
12545    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
12546    ///    },
12547    ///    "owners": {
12548    ///      "description": "Today, only a single owner can be set for a Smart Account, but this is an array to allow having multiple owners in the future. The address is a 0x-prefixed, checksum address.",
12549    ///      "examples": [
12550    ///        [
12551    ///          "0xfc807D1bE4997e5C7B33E4d8D57e60c5b0f02B1a"
12552    ///        ]
12553    ///      ],
12554    ///      "type": "array",
12555    ///      "items": {
12556    ///        "type": "string",
12557    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
12558    ///      }
12559    ///    },
12560    ///    "policies": {
12561    ///      "description": "The list of policy IDs that apply to the smart account. This will include both the project-level policy and the account-level policy, if one exists.",
12562    ///      "examples": [
12563    ///        [
12564    ///          "123e4567-e89b-12d3-a456-426614174000"
12565    ///        ]
12566    ///      ],
12567    ///      "type": "array",
12568    ///      "items": {
12569    ///        "type": "string",
12570    ///        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
12571    ///      },
12572    ///      "x-audience": "public"
12573    ///    },
12574    ///    "updatedAt": {
12575    ///      "description": "The UTC ISO 8601 timestamp at which the account was last updated.",
12576    ///      "examples": [
12577    ///        "2025-03-26T12:00:00Z"
12578    ///      ],
12579    ///      "type": "string",
12580    ///      "format": "date-time"
12581    ///    }
12582    ///  }
12583    ///}
12584    /// ```
12585    /// </details>
12586    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
12587    pub struct EvmSmartAccount {
12588        ///The 0x-prefixed, checksum address of the Smart Account.
12589        pub address: EvmSmartAccountAddress,
12590        ///The UTC ISO 8601 timestamp at which the account was created.
12591        #[serde(
12592            rename = "createdAt",
12593            default,
12594            skip_serializing_if = "::std::option::Option::is_none"
12595        )]
12596        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
12597        /**An optional name for the account.
12598        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
12599        Account names are guaranteed to be unique across all Smart Accounts in the developer's CDP Project.*/
12600        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12601        pub name: ::std::option::Option<EvmSmartAccountName>,
12602        ///Today, only a single owner can be set for a Smart Account, but this is an array to allow having multiple owners in the future. The address is a 0x-prefixed, checksum address.
12603        pub owners: ::std::vec::Vec<EvmSmartAccountOwnersItem>,
12604        ///The list of policy IDs that apply to the smart account. This will include both the project-level policy and the account-level policy, if one exists.
12605        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
12606        pub policies: ::std::vec::Vec<EvmSmartAccountPoliciesItem>,
12607        ///The UTC ISO 8601 timestamp at which the account was last updated.
12608        #[serde(
12609            rename = "updatedAt",
12610            default,
12611            skip_serializing_if = "::std::option::Option::is_none"
12612        )]
12613        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
12614    }
12615    impl ::std::convert::From<&EvmSmartAccount> for EvmSmartAccount {
12616        fn from(value: &EvmSmartAccount) -> Self {
12617            value.clone()
12618        }
12619    }
12620    impl EvmSmartAccount {
12621        pub fn builder() -> builder::EvmSmartAccount {
12622            Default::default()
12623        }
12624    }
12625    ///The 0x-prefixed, checksum address of the Smart Account.
12626    ///
12627    /// <details><summary>JSON schema</summary>
12628    ///
12629    /// ```json
12630    ///{
12631    ///  "description": "The 0x-prefixed, checksum address of the Smart Account.",
12632    ///  "examples": [
12633    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
12634    ///  ],
12635    ///  "type": "string",
12636    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
12637    ///}
12638    /// ```
12639    /// </details>
12640    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12641    #[serde(transparent)]
12642    pub struct EvmSmartAccountAddress(::std::string::String);
12643    impl ::std::ops::Deref for EvmSmartAccountAddress {
12644        type Target = ::std::string::String;
12645        fn deref(&self) -> &::std::string::String {
12646            &self.0
12647        }
12648    }
12649    impl ::std::convert::From<EvmSmartAccountAddress> for ::std::string::String {
12650        fn from(value: EvmSmartAccountAddress) -> Self {
12651            value.0
12652        }
12653    }
12654    impl ::std::convert::From<&EvmSmartAccountAddress> for EvmSmartAccountAddress {
12655        fn from(value: &EvmSmartAccountAddress) -> Self {
12656            value.clone()
12657        }
12658    }
12659    impl ::std::str::FromStr for EvmSmartAccountAddress {
12660        type Err = self::error::ConversionError;
12661        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12662            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
12663                ::std::sync::LazyLock::new(|| {
12664                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
12665                });
12666            if PATTERN.find(value).is_none() {
12667                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
12668            }
12669            Ok(Self(value.to_string()))
12670        }
12671    }
12672    impl ::std::convert::TryFrom<&str> for EvmSmartAccountAddress {
12673        type Error = self::error::ConversionError;
12674        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12675            value.parse()
12676        }
12677    }
12678    impl ::std::convert::TryFrom<&::std::string::String> for EvmSmartAccountAddress {
12679        type Error = self::error::ConversionError;
12680        fn try_from(
12681            value: &::std::string::String,
12682        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12683            value.parse()
12684        }
12685    }
12686    impl ::std::convert::TryFrom<::std::string::String> for EvmSmartAccountAddress {
12687        type Error = self::error::ConversionError;
12688        fn try_from(
12689            value: ::std::string::String,
12690        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12691            value.parse()
12692        }
12693    }
12694    impl<'de> ::serde::Deserialize<'de> for EvmSmartAccountAddress {
12695        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
12696        where
12697            D: ::serde::Deserializer<'de>,
12698        {
12699            ::std::string::String::deserialize(deserializer)?
12700                .parse()
12701                .map_err(|e: self::error::ConversionError| {
12702                    <D::Error as ::serde::de::Error>::custom(e.to_string())
12703                })
12704        }
12705    }
12706    /**An optional name for the account.
12707    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
12708    Account names are guaranteed to be unique across all Smart Accounts in the developer's CDP Project.*/
12709    ///
12710    /// <details><summary>JSON schema</summary>
12711    ///
12712    /// ```json
12713    ///{
12714    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names are guaranteed to be unique across all Smart Accounts in the developer's CDP Project.",
12715    ///  "examples": [
12716    ///    "my-smart-account"
12717    ///  ],
12718    ///  "type": "string",
12719    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
12720    ///}
12721    /// ```
12722    /// </details>
12723    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12724    #[serde(transparent)]
12725    pub struct EvmSmartAccountName(::std::string::String);
12726    impl ::std::ops::Deref for EvmSmartAccountName {
12727        type Target = ::std::string::String;
12728        fn deref(&self) -> &::std::string::String {
12729            &self.0
12730        }
12731    }
12732    impl ::std::convert::From<EvmSmartAccountName> for ::std::string::String {
12733        fn from(value: EvmSmartAccountName) -> Self {
12734            value.0
12735        }
12736    }
12737    impl ::std::convert::From<&EvmSmartAccountName> for EvmSmartAccountName {
12738        fn from(value: &EvmSmartAccountName) -> Self {
12739            value.clone()
12740        }
12741    }
12742    impl ::std::str::FromStr for EvmSmartAccountName {
12743        type Err = self::error::ConversionError;
12744        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12745            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
12746                ::std::sync::LazyLock::new(|| {
12747                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
12748                });
12749            if PATTERN.find(value).is_none() {
12750                return Err(
12751                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
12752                );
12753            }
12754            Ok(Self(value.to_string()))
12755        }
12756    }
12757    impl ::std::convert::TryFrom<&str> for EvmSmartAccountName {
12758        type Error = self::error::ConversionError;
12759        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12760            value.parse()
12761        }
12762    }
12763    impl ::std::convert::TryFrom<&::std::string::String> for EvmSmartAccountName {
12764        type Error = self::error::ConversionError;
12765        fn try_from(
12766            value: &::std::string::String,
12767        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12768            value.parse()
12769        }
12770    }
12771    impl ::std::convert::TryFrom<::std::string::String> for EvmSmartAccountName {
12772        type Error = self::error::ConversionError;
12773        fn try_from(
12774            value: ::std::string::String,
12775        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12776            value.parse()
12777        }
12778    }
12779    impl<'de> ::serde::Deserialize<'de> for EvmSmartAccountName {
12780        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
12781        where
12782            D: ::serde::Deserializer<'de>,
12783        {
12784            ::std::string::String::deserialize(deserializer)?
12785                .parse()
12786                .map_err(|e: self::error::ConversionError| {
12787                    <D::Error as ::serde::de::Error>::custom(e.to_string())
12788                })
12789        }
12790    }
12791    ///`EvmSmartAccountOwnersItem`
12792    ///
12793    /// <details><summary>JSON schema</summary>
12794    ///
12795    /// ```json
12796    ///{
12797    ///  "type": "string",
12798    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
12799    ///}
12800    /// ```
12801    /// </details>
12802    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12803    #[serde(transparent)]
12804    pub struct EvmSmartAccountOwnersItem(::std::string::String);
12805    impl ::std::ops::Deref for EvmSmartAccountOwnersItem {
12806        type Target = ::std::string::String;
12807        fn deref(&self) -> &::std::string::String {
12808            &self.0
12809        }
12810    }
12811    impl ::std::convert::From<EvmSmartAccountOwnersItem> for ::std::string::String {
12812        fn from(value: EvmSmartAccountOwnersItem) -> Self {
12813            value.0
12814        }
12815    }
12816    impl ::std::convert::From<&EvmSmartAccountOwnersItem> for EvmSmartAccountOwnersItem {
12817        fn from(value: &EvmSmartAccountOwnersItem) -> Self {
12818            value.clone()
12819        }
12820    }
12821    impl ::std::str::FromStr for EvmSmartAccountOwnersItem {
12822        type Err = self::error::ConversionError;
12823        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12824            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
12825                ::std::sync::LazyLock::new(|| {
12826                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
12827                });
12828            if PATTERN.find(value).is_none() {
12829                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
12830            }
12831            Ok(Self(value.to_string()))
12832        }
12833    }
12834    impl ::std::convert::TryFrom<&str> for EvmSmartAccountOwnersItem {
12835        type Error = self::error::ConversionError;
12836        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12837            value.parse()
12838        }
12839    }
12840    impl ::std::convert::TryFrom<&::std::string::String> for EvmSmartAccountOwnersItem {
12841        type Error = self::error::ConversionError;
12842        fn try_from(
12843            value: &::std::string::String,
12844        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12845            value.parse()
12846        }
12847    }
12848    impl ::std::convert::TryFrom<::std::string::String> for EvmSmartAccountOwnersItem {
12849        type Error = self::error::ConversionError;
12850        fn try_from(
12851            value: ::std::string::String,
12852        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12853            value.parse()
12854        }
12855    }
12856    impl<'de> ::serde::Deserialize<'de> for EvmSmartAccountOwnersItem {
12857        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
12858        where
12859            D: ::serde::Deserializer<'de>,
12860        {
12861            ::std::string::String::deserialize(deserializer)?
12862                .parse()
12863                .map_err(|e: self::error::ConversionError| {
12864                    <D::Error as ::serde::de::Error>::custom(e.to_string())
12865                })
12866        }
12867    }
12868    ///`EvmSmartAccountPoliciesItem`
12869    ///
12870    /// <details><summary>JSON schema</summary>
12871    ///
12872    /// ```json
12873    ///{
12874    ///  "type": "string",
12875    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
12876    ///}
12877    /// ```
12878    /// </details>
12879    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12880    #[serde(transparent)]
12881    pub struct EvmSmartAccountPoliciesItem(::std::string::String);
12882    impl ::std::ops::Deref for EvmSmartAccountPoliciesItem {
12883        type Target = ::std::string::String;
12884        fn deref(&self) -> &::std::string::String {
12885            &self.0
12886        }
12887    }
12888    impl ::std::convert::From<EvmSmartAccountPoliciesItem> for ::std::string::String {
12889        fn from(value: EvmSmartAccountPoliciesItem) -> Self {
12890            value.0
12891        }
12892    }
12893    impl ::std::convert::From<&EvmSmartAccountPoliciesItem> for EvmSmartAccountPoliciesItem {
12894        fn from(value: &EvmSmartAccountPoliciesItem) -> Self {
12895            value.clone()
12896        }
12897    }
12898    impl ::std::str::FromStr for EvmSmartAccountPoliciesItem {
12899        type Err = self::error::ConversionError;
12900        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12901            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
12902                || {
12903                    ::regress::Regex::new(
12904                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
12905                    )
12906                    .unwrap()
12907                },
12908            );
12909            if PATTERN.find(value).is_none() {
12910                return Err(
12911                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
12912                        .into(),
12913                );
12914            }
12915            Ok(Self(value.to_string()))
12916        }
12917    }
12918    impl ::std::convert::TryFrom<&str> for EvmSmartAccountPoliciesItem {
12919        type Error = self::error::ConversionError;
12920        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12921            value.parse()
12922        }
12923    }
12924    impl ::std::convert::TryFrom<&::std::string::String> for EvmSmartAccountPoliciesItem {
12925        type Error = self::error::ConversionError;
12926        fn try_from(
12927            value: &::std::string::String,
12928        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12929            value.parse()
12930        }
12931    }
12932    impl ::std::convert::TryFrom<::std::string::String> for EvmSmartAccountPoliciesItem {
12933        type Error = self::error::ConversionError;
12934        fn try_from(
12935            value: ::std::string::String,
12936        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12937            value.parse()
12938        }
12939    }
12940    impl<'de> ::serde::Deserialize<'de> for EvmSmartAccountPoliciesItem {
12941        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
12942        where
12943            D: ::serde::Deserializer<'de>,
12944        {
12945            ::std::string::String::deserialize(deserializer)?
12946                .parse()
12947                .map_err(|e: self::error::ConversionError| {
12948                    <D::Error as ::serde::de::Error>::custom(e.to_string())
12949                })
12950        }
12951    }
12952    ///The network on which to perform the swap.
12953    ///
12954    /// <details><summary>JSON schema</summary>
12955    ///
12956    /// ```json
12957    ///{
12958    ///  "description": "The network on which to perform the swap.",
12959    ///  "examples": [
12960    ///    "base"
12961    ///  ],
12962    ///  "type": "string",
12963    ///  "enum": [
12964    ///    "base",
12965    ///    "ethereum",
12966    ///    "arbitrum",
12967    ///    "optimism"
12968    ///  ]
12969    ///}
12970    /// ```
12971    /// </details>
12972    #[derive(
12973        ::serde::Deserialize,
12974        ::serde::Serialize,
12975        Clone,
12976        Copy,
12977        Debug,
12978        Eq,
12979        Hash,
12980        Ord,
12981        PartialEq,
12982        PartialOrd,
12983    )]
12984    pub enum EvmSwapsNetwork {
12985        #[serde(rename = "base")]
12986        Base,
12987        #[serde(rename = "ethereum")]
12988        Ethereum,
12989        #[serde(rename = "arbitrum")]
12990        Arbitrum,
12991        #[serde(rename = "optimism")]
12992        Optimism,
12993    }
12994    impl ::std::convert::From<&Self> for EvmSwapsNetwork {
12995        fn from(value: &EvmSwapsNetwork) -> Self {
12996            value.clone()
12997        }
12998    }
12999    impl ::std::fmt::Display for EvmSwapsNetwork {
13000        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13001            match *self {
13002                Self::Base => f.write_str("base"),
13003                Self::Ethereum => f.write_str("ethereum"),
13004                Self::Arbitrum => f.write_str("arbitrum"),
13005                Self::Optimism => f.write_str("optimism"),
13006            }
13007        }
13008    }
13009    impl ::std::str::FromStr for EvmSwapsNetwork {
13010        type Err = self::error::ConversionError;
13011        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13012            match value {
13013                "base" => Ok(Self::Base),
13014                "ethereum" => Ok(Self::Ethereum),
13015                "arbitrum" => Ok(Self::Arbitrum),
13016                "optimism" => Ok(Self::Optimism),
13017                _ => Err("invalid value".into()),
13018            }
13019        }
13020    }
13021    impl ::std::convert::TryFrom<&str> for EvmSwapsNetwork {
13022        type Error = self::error::ConversionError;
13023        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13024            value.parse()
13025        }
13026    }
13027    impl ::std::convert::TryFrom<&::std::string::String> for EvmSwapsNetwork {
13028        type Error = self::error::ConversionError;
13029        fn try_from(
13030            value: &::std::string::String,
13031        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13032            value.parse()
13033        }
13034    }
13035    impl ::std::convert::TryFrom<::std::string::String> for EvmSwapsNetwork {
13036        type Error = self::error::ConversionError;
13037        fn try_from(
13038            value: ::std::string::String,
13039        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13040            value.parse()
13041        }
13042    }
13043    ///A schema for specifying criterion for an address field of an EVM typed message. The address can be deeply nested within the typed data's message.
13044    ///
13045    /// <details><summary>JSON schema</summary>
13046    ///
13047    /// ```json
13048    ///{
13049    ///  "title": "EvmTypedAddressCondition",
13050    ///  "description": "A schema for specifying criterion for an address field of an EVM typed message. The address can be deeply nested within the typed data's message.",
13051    ///  "type": "object",
13052    ///  "required": [
13053    ///    "addresses",
13054    ///    "operator",
13055    ///    "path"
13056    ///  ],
13057    ///  "properties": {
13058    ///    "addresses": {
13059    ///      "description": "A list of 0x-prefixed EVM addresses that the value located at the message's path should be compared to. There is a limit of 300 addresses per criterion.",
13060    ///      "examples": [
13061    ///        [
13062    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
13063    ///          "0x1234567890123456789012345678901234567890"
13064    ///        ]
13065    ///      ],
13066    ///      "type": "array",
13067    ///      "items": {
13068    ///        "description": "The 0x-prefixed EVM address that the value located at the message's path should be compared to.",
13069    ///        "type": "string",
13070    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
13071    ///      }
13072    ///    },
13073    ///    "operator": {
13074    ///      "description": "The operator to use for the comparison. The value located at the message's path will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
13075    ///      "examples": [
13076    ///        "in"
13077    ///      ],
13078    ///      "type": "string",
13079    ///      "enum": [
13080    ///        "in",
13081    ///        "not in"
13082    ///      ]
13083    ///    },
13084    ///    "path": {
13085    ///      "description": "The path to the field to compare against this criterion. To reference deeply nested fields within the message, separate object keys by `.`, and access array values using `[index]`. If the field does not exist or is not an address, the operation will be rejected.",
13086    ///      "examples": [
13087    ///        "targets[0].address"
13088    ///      ],
13089    ///      "type": "string"
13090    ///    }
13091    ///  },
13092    ///  "x-audience": "public"
13093    ///}
13094    /// ```
13095    /// </details>
13096    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13097    pub struct EvmTypedAddressCondition {
13098        ///A list of 0x-prefixed EVM addresses that the value located at the message's path should be compared to. There is a limit of 300 addresses per criterion.
13099        pub addresses: ::std::vec::Vec<EvmTypedAddressConditionAddressesItem>,
13100        ///The operator to use for the comparison. The value located at the message's path will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
13101        pub operator: EvmTypedAddressConditionOperator,
13102        ///The path to the field to compare against this criterion. To reference deeply nested fields within the message, separate object keys by `.`, and access array values using `[index]`. If the field does not exist or is not an address, the operation will be rejected.
13103        pub path: ::std::string::String,
13104    }
13105    impl ::std::convert::From<&EvmTypedAddressCondition> for EvmTypedAddressCondition {
13106        fn from(value: &EvmTypedAddressCondition) -> Self {
13107            value.clone()
13108        }
13109    }
13110    impl EvmTypedAddressCondition {
13111        pub fn builder() -> builder::EvmTypedAddressCondition {
13112            Default::default()
13113        }
13114    }
13115    ///The 0x-prefixed EVM address that the value located at the message's path should be compared to.
13116    ///
13117    /// <details><summary>JSON schema</summary>
13118    ///
13119    /// ```json
13120    ///{
13121    ///  "description": "The 0x-prefixed EVM address that the value located at the message's path should be compared to.",
13122    ///  "type": "string",
13123    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
13124    ///}
13125    /// ```
13126    /// </details>
13127    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13128    #[serde(transparent)]
13129    pub struct EvmTypedAddressConditionAddressesItem(::std::string::String);
13130    impl ::std::ops::Deref for EvmTypedAddressConditionAddressesItem {
13131        type Target = ::std::string::String;
13132        fn deref(&self) -> &::std::string::String {
13133            &self.0
13134        }
13135    }
13136    impl ::std::convert::From<EvmTypedAddressConditionAddressesItem> for ::std::string::String {
13137        fn from(value: EvmTypedAddressConditionAddressesItem) -> Self {
13138            value.0
13139        }
13140    }
13141    impl ::std::convert::From<&EvmTypedAddressConditionAddressesItem>
13142        for EvmTypedAddressConditionAddressesItem
13143    {
13144        fn from(value: &EvmTypedAddressConditionAddressesItem) -> Self {
13145            value.clone()
13146        }
13147    }
13148    impl ::std::str::FromStr for EvmTypedAddressConditionAddressesItem {
13149        type Err = self::error::ConversionError;
13150        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13151            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
13152                ::std::sync::LazyLock::new(|| {
13153                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
13154                });
13155            if PATTERN.find(value).is_none() {
13156                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
13157            }
13158            Ok(Self(value.to_string()))
13159        }
13160    }
13161    impl ::std::convert::TryFrom<&str> for EvmTypedAddressConditionAddressesItem {
13162        type Error = self::error::ConversionError;
13163        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13164            value.parse()
13165        }
13166    }
13167    impl ::std::convert::TryFrom<&::std::string::String> for EvmTypedAddressConditionAddressesItem {
13168        type Error = self::error::ConversionError;
13169        fn try_from(
13170            value: &::std::string::String,
13171        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13172            value.parse()
13173        }
13174    }
13175    impl ::std::convert::TryFrom<::std::string::String> for EvmTypedAddressConditionAddressesItem {
13176        type Error = self::error::ConversionError;
13177        fn try_from(
13178            value: ::std::string::String,
13179        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13180            value.parse()
13181        }
13182    }
13183    impl<'de> ::serde::Deserialize<'de> for EvmTypedAddressConditionAddressesItem {
13184        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
13185        where
13186            D: ::serde::Deserializer<'de>,
13187        {
13188            ::std::string::String::deserialize(deserializer)?
13189                .parse()
13190                .map_err(|e: self::error::ConversionError| {
13191                    <D::Error as ::serde::de::Error>::custom(e.to_string())
13192                })
13193        }
13194    }
13195    ///The operator to use for the comparison. The value located at the message's path will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
13196    ///
13197    /// <details><summary>JSON schema</summary>
13198    ///
13199    /// ```json
13200    ///{
13201    ///  "description": "The operator to use for the comparison. The value located at the message's path will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
13202    ///  "examples": [
13203    ///    "in"
13204    ///  ],
13205    ///  "type": "string",
13206    ///  "enum": [
13207    ///    "in",
13208    ///    "not in"
13209    ///  ]
13210    ///}
13211    /// ```
13212    /// </details>
13213    #[derive(
13214        ::serde::Deserialize,
13215        ::serde::Serialize,
13216        Clone,
13217        Copy,
13218        Debug,
13219        Eq,
13220        Hash,
13221        Ord,
13222        PartialEq,
13223        PartialOrd,
13224    )]
13225    pub enum EvmTypedAddressConditionOperator {
13226        #[serde(rename = "in")]
13227        In,
13228        #[serde(rename = "not in")]
13229        NotIn,
13230    }
13231    impl ::std::convert::From<&Self> for EvmTypedAddressConditionOperator {
13232        fn from(value: &EvmTypedAddressConditionOperator) -> Self {
13233            value.clone()
13234        }
13235    }
13236    impl ::std::fmt::Display for EvmTypedAddressConditionOperator {
13237        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13238            match *self {
13239                Self::In => f.write_str("in"),
13240                Self::NotIn => f.write_str("not in"),
13241            }
13242        }
13243    }
13244    impl ::std::str::FromStr for EvmTypedAddressConditionOperator {
13245        type Err = self::error::ConversionError;
13246        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13247            match value {
13248                "in" => Ok(Self::In),
13249                "not in" => Ok(Self::NotIn),
13250                _ => Err("invalid value".into()),
13251            }
13252        }
13253    }
13254    impl ::std::convert::TryFrom<&str> for EvmTypedAddressConditionOperator {
13255        type Error = self::error::ConversionError;
13256        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13257            value.parse()
13258        }
13259    }
13260    impl ::std::convert::TryFrom<&::std::string::String> for EvmTypedAddressConditionOperator {
13261        type Error = self::error::ConversionError;
13262        fn try_from(
13263            value: &::std::string::String,
13264        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13265            value.parse()
13266        }
13267    }
13268    impl ::std::convert::TryFrom<::std::string::String> for EvmTypedAddressConditionOperator {
13269        type Error = self::error::ConversionError;
13270        fn try_from(
13271            value: ::std::string::String,
13272        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13273            value.parse()
13274        }
13275    }
13276    ///A schema for specifying criterion for a numerical field of an EVM typed message. The value can be deeply nested within the typed data's message.
13277    ///
13278    /// <details><summary>JSON schema</summary>
13279    ///
13280    /// ```json
13281    ///{
13282    ///  "title": "EvmTypedNumericalCondition",
13283    ///  "description": "A schema for specifying criterion for a numerical field of an EVM typed message. The value can be deeply nested within the typed data's message.",
13284    ///  "type": "object",
13285    ///  "required": [
13286    ///    "operator",
13287    ///    "path",
13288    ///    "value"
13289    ///  ],
13290    ///  "properties": {
13291    ///    "operator": {
13292    ///      "description": "The operator to use for the comparison. The value located at the message's path will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
13293    ///      "examples": [
13294    ///        "<="
13295    ///      ],
13296    ///      "type": "string",
13297    ///      "enum": [
13298    ///        "GreaterThan",
13299    ///        "GreaterThanOrEqual",
13300    ///        "LessThan",
13301    ///        "LessThanOrEqual",
13302    ///        "Equal"
13303    ///      ]
13304    ///    },
13305    ///    "path": {
13306    ///      "description": "The path to the field to compare against this criterion. To reference deeply nested fields within the message, separate object keys by `.`, and access array values using `[index]`. If the field does not exist or is not an address, the operation will be rejected.",
13307    ///      "examples": [
13308    ///        "targets[0].amount"
13309    ///      ],
13310    ///      "type": "string"
13311    ///    },
13312    ///    "value": {
13313    ///      "description": "The amount that the value located at the message's path should be compared to.",
13314    ///      "examples": [
13315    ///        "1000000000000000000"
13316    ///      ],
13317    ///      "type": "string",
13318    ///      "pattern": "^[0-9]+$"
13319    ///    }
13320    ///  },
13321    ///  "x-audience": "public"
13322    ///}
13323    /// ```
13324    /// </details>
13325    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13326    pub struct EvmTypedNumericalCondition {
13327        ///The operator to use for the comparison. The value located at the message's path will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
13328        pub operator: EvmTypedNumericalConditionOperator,
13329        ///The path to the field to compare against this criterion. To reference deeply nested fields within the message, separate object keys by `.`, and access array values using `[index]`. If the field does not exist or is not an address, the operation will be rejected.
13330        pub path: ::std::string::String,
13331        ///The amount that the value located at the message's path should be compared to.
13332        pub value: EvmTypedNumericalConditionValue,
13333    }
13334    impl ::std::convert::From<&EvmTypedNumericalCondition> for EvmTypedNumericalCondition {
13335        fn from(value: &EvmTypedNumericalCondition) -> Self {
13336            value.clone()
13337        }
13338    }
13339    impl EvmTypedNumericalCondition {
13340        pub fn builder() -> builder::EvmTypedNumericalCondition {
13341            Default::default()
13342        }
13343    }
13344    ///The operator to use for the comparison. The value located at the message's path will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
13345    ///
13346    /// <details><summary>JSON schema</summary>
13347    ///
13348    /// ```json
13349    ///{
13350    ///  "description": "The operator to use for the comparison. The value located at the message's path will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
13351    ///  "examples": [
13352    ///    "<="
13353    ///  ],
13354    ///  "type": "string",
13355    ///  "enum": [
13356    ///    "GreaterThan",
13357    ///    "GreaterThanOrEqual",
13358    ///    "LessThan",
13359    ///    "LessThanOrEqual",
13360    ///    "Equal"
13361    ///  ]
13362    ///}
13363    /// ```
13364    /// </details>
13365    #[derive(
13366        ::serde::Deserialize,
13367        ::serde::Serialize,
13368        Clone,
13369        Copy,
13370        Debug,
13371        Eq,
13372        Hash,
13373        Ord,
13374        PartialEq,
13375        PartialOrd,
13376    )]
13377    pub enum EvmTypedNumericalConditionOperator {
13378        GreaterThan,
13379        GreaterThanOrEqual,
13380        LessThan,
13381        LessThanOrEqual,
13382        Equal,
13383    }
13384    impl ::std::convert::From<&Self> for EvmTypedNumericalConditionOperator {
13385        fn from(value: &EvmTypedNumericalConditionOperator) -> Self {
13386            value.clone()
13387        }
13388    }
13389    impl ::std::fmt::Display for EvmTypedNumericalConditionOperator {
13390        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13391            match *self {
13392                Self::GreaterThan => f.write_str("GreaterThan"),
13393                Self::GreaterThanOrEqual => f.write_str("GreaterThanOrEqual"),
13394                Self::LessThan => f.write_str("LessThan"),
13395                Self::LessThanOrEqual => f.write_str("LessThanOrEqual"),
13396                Self::Equal => f.write_str("Equal"),
13397            }
13398        }
13399    }
13400    impl ::std::str::FromStr for EvmTypedNumericalConditionOperator {
13401        type Err = self::error::ConversionError;
13402        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13403            match value {
13404                "GreaterThan" => Ok(Self::GreaterThan),
13405                "GreaterThanOrEqual" => Ok(Self::GreaterThanOrEqual),
13406                "LessThan" => Ok(Self::LessThan),
13407                "LessThanOrEqual" => Ok(Self::LessThanOrEqual),
13408                "Equal" => Ok(Self::Equal),
13409                _ => Err("invalid value".into()),
13410            }
13411        }
13412    }
13413    impl ::std::convert::TryFrom<&str> for EvmTypedNumericalConditionOperator {
13414        type Error = self::error::ConversionError;
13415        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13416            value.parse()
13417        }
13418    }
13419    impl ::std::convert::TryFrom<&::std::string::String> for EvmTypedNumericalConditionOperator {
13420        type Error = self::error::ConversionError;
13421        fn try_from(
13422            value: &::std::string::String,
13423        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13424            value.parse()
13425        }
13426    }
13427    impl ::std::convert::TryFrom<::std::string::String> for EvmTypedNumericalConditionOperator {
13428        type Error = self::error::ConversionError;
13429        fn try_from(
13430            value: ::std::string::String,
13431        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13432            value.parse()
13433        }
13434    }
13435    ///The amount that the value located at the message's path should be compared to.
13436    ///
13437    /// <details><summary>JSON schema</summary>
13438    ///
13439    /// ```json
13440    ///{
13441    ///  "description": "The amount that the value located at the message's path should be compared to.",
13442    ///  "examples": [
13443    ///    "1000000000000000000"
13444    ///  ],
13445    ///  "type": "string",
13446    ///  "pattern": "^[0-9]+$"
13447    ///}
13448    /// ```
13449    /// </details>
13450    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13451    #[serde(transparent)]
13452    pub struct EvmTypedNumericalConditionValue(::std::string::String);
13453    impl ::std::ops::Deref for EvmTypedNumericalConditionValue {
13454        type Target = ::std::string::String;
13455        fn deref(&self) -> &::std::string::String {
13456            &self.0
13457        }
13458    }
13459    impl ::std::convert::From<EvmTypedNumericalConditionValue> for ::std::string::String {
13460        fn from(value: EvmTypedNumericalConditionValue) -> Self {
13461            value.0
13462        }
13463    }
13464    impl ::std::convert::From<&EvmTypedNumericalConditionValue> for EvmTypedNumericalConditionValue {
13465        fn from(value: &EvmTypedNumericalConditionValue) -> Self {
13466            value.clone()
13467        }
13468    }
13469    impl ::std::str::FromStr for EvmTypedNumericalConditionValue {
13470        type Err = self::error::ConversionError;
13471        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13472            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
13473                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[0-9]+$").unwrap());
13474            if PATTERN.find(value).is_none() {
13475                return Err("doesn't match pattern \"^[0-9]+$\"".into());
13476            }
13477            Ok(Self(value.to_string()))
13478        }
13479    }
13480    impl ::std::convert::TryFrom<&str> for EvmTypedNumericalConditionValue {
13481        type Error = self::error::ConversionError;
13482        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13483            value.parse()
13484        }
13485    }
13486    impl ::std::convert::TryFrom<&::std::string::String> for EvmTypedNumericalConditionValue {
13487        type Error = self::error::ConversionError;
13488        fn try_from(
13489            value: &::std::string::String,
13490        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13491            value.parse()
13492        }
13493    }
13494    impl ::std::convert::TryFrom<::std::string::String> for EvmTypedNumericalConditionValue {
13495        type Error = self::error::ConversionError;
13496        fn try_from(
13497            value: ::std::string::String,
13498        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13499            value.parse()
13500        }
13501    }
13502    impl<'de> ::serde::Deserialize<'de> for EvmTypedNumericalConditionValue {
13503        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
13504        where
13505            D: ::serde::Deserializer<'de>,
13506        {
13507            ::std::string::String::deserialize(deserializer)?
13508                .parse()
13509                .map_err(|e: self::error::ConversionError| {
13510                    <D::Error as ::serde::de::Error>::custom(e.to_string())
13511                })
13512        }
13513    }
13514    ///A schema for specifying criterion for a string field of an EVM typed message. The value can be deeply nested within the typed data's message.
13515    ///
13516    /// <details><summary>JSON schema</summary>
13517    ///
13518    /// ```json
13519    ///{
13520    ///  "title": "EvmTypedStringCondition",
13521    ///  "description": "A schema for specifying criterion for a string field of an EVM typed message. The value can be deeply nested within the typed data's message.",
13522    ///  "type": "object",
13523    ///  "required": [
13524    ///    "match",
13525    ///    "path"
13526    ///  ],
13527    ///  "properties": {
13528    ///    "match": {
13529    ///      "description": "A regular expression the field is matched against.",
13530    ///      "examples": [
13531    ///        "^hello ([a-z]+)$"
13532    ///      ],
13533    ///      "type": "string"
13534    ///    },
13535    ///    "path": {
13536    ///      "description": "The path to the field to compare against this criterion. To reference deeply nested fields within the message, separate object keys by `.`, and access array values using `[index]`. If the field does not exist or is not an address, the operation will be rejected.",
13537    ///      "examples": [
13538    ///        "targets[0].message"
13539    ///      ],
13540    ///      "type": "string"
13541    ///    }
13542    ///  },
13543    ///  "x-audience": "public"
13544    ///}
13545    /// ```
13546    /// </details>
13547    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13548    pub struct EvmTypedStringCondition {
13549        ///A regular expression the field is matched against.
13550        #[serde(rename = "match")]
13551        pub match_: ::std::string::String,
13552        ///The path to the field to compare against this criterion. To reference deeply nested fields within the message, separate object keys by `.`, and access array values using `[index]`. If the field does not exist or is not an address, the operation will be rejected.
13553        pub path: ::std::string::String,
13554    }
13555    impl ::std::convert::From<&EvmTypedStringCondition> for EvmTypedStringCondition {
13556        fn from(value: &EvmTypedStringCondition) -> Self {
13557            value.clone()
13558        }
13559    }
13560    impl EvmTypedStringCondition {
13561        pub fn builder() -> builder::EvmTypedStringCondition {
13562            Default::default()
13563        }
13564    }
13565    ///`EvmUserOperation`
13566    ///
13567    /// <details><summary>JSON schema</summary>
13568    ///
13569    /// ```json
13570    ///{
13571    ///  "type": "object",
13572    ///  "required": [
13573    ///    "calls",
13574    ///    "network",
13575    ///    "status",
13576    ///    "userOpHash"
13577    ///  ],
13578    ///  "properties": {
13579    ///    "calls": {
13580    ///      "description": "The list of calls in the user operation.",
13581    ///      "examples": [
13582    ///        [
13583    ///          {
13584    ///            "data": "0xa9059cbb000000000000000000000000fc807d1be4997e5c7b33e4d8d57e60c5b0f02b1a0000000000000000000000000000000000000000000000000000000000000064",
13585    ///            "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
13586    ///            "value": "0"
13587    ///          },
13588    ///          {
13589    ///            "data": "0x",
13590    ///            "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
13591    ///            "value": "1000000000000000"
13592    ///          }
13593    ///        ]
13594    ///      ],
13595    ///      "type": "array",
13596    ///      "items": {
13597    ///        "$ref": "#/components/schemas/EvmCall"
13598    ///      }
13599    ///    },
13600    ///    "network": {
13601    ///      "$ref": "#/components/schemas/EvmUserOperationNetwork"
13602    ///    },
13603    ///    "receipts": {
13604    ///      "description": "The list of receipts associated with the user operation.",
13605    ///      "examples": [
13606    ///        [
13607    ///          {
13608    ///            "blockHash": "0x386544b58930c0ec9e8f3ed09fb4cdb76b9ae0a1a37ddcacebe3925b57978e65",
13609    ///            "blockNumber": 29338819,
13610    ///            "gasUsed": "100000",
13611    ///            "revert": {
13612    ///              "data": "0x123",
13613    ///              "message": "reason for failure"
13614    ///            }
13615    ///          }
13616    ///        ]
13617    ///      ],
13618    ///      "type": "array",
13619    ///      "items": {
13620    ///        "$ref": "#/components/schemas/UserOperationReceipt"
13621    ///      }
13622    ///    },
13623    ///    "status": {
13624    ///      "description": "The status of the user operation.",
13625    ///      "examples": [
13626    ///        "pending"
13627    ///      ],
13628    ///      "type": "string",
13629    ///      "enum": [
13630    ///        "pending",
13631    ///        "signed",
13632    ///        "broadcast",
13633    ///        "complete",
13634    ///        "dropped",
13635    ///        "failed"
13636    ///      ]
13637    ///    },
13638    ///    "transactionHash": {
13639    ///      "description": "The hash of the transaction that included this particular user operation. This gets set after the user operation is broadcasted and the transaction is included in a block.",
13640    ///      "examples": [
13641    ///        "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
13642    ///      ],
13643    ///      "type": "string",
13644    ///      "pattern": "^0x[0-9a-fA-F]{64}$|^$"
13645    ///    },
13646    ///    "userOpHash": {
13647    ///      "description": "The hash of the user operation. This is not the transaction hash, as a transaction consists of multiple user operations. The user operation hash is the hash of this particular user operation which gets signed by the owner of the Smart Account.",
13648    ///      "examples": [
13649    ///        "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
13650    ///      ],
13651    ///      "type": "string",
13652    ///      "pattern": "^0x[0-9a-fA-F]{64}$"
13653    ///    }
13654    ///  }
13655    ///}
13656    /// ```
13657    /// </details>
13658    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
13659    pub struct EvmUserOperation {
13660        ///The list of calls in the user operation.
13661        pub calls: ::std::vec::Vec<EvmCall>,
13662        pub network: EvmUserOperationNetwork,
13663        ///The list of receipts associated with the user operation.
13664        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
13665        pub receipts: ::std::vec::Vec<UserOperationReceipt>,
13666        ///The status of the user operation.
13667        pub status: EvmUserOperationStatus,
13668        ///The hash of the transaction that included this particular user operation. This gets set after the user operation is broadcasted and the transaction is included in a block.
13669        #[serde(
13670            rename = "transactionHash",
13671            default,
13672            skip_serializing_if = "::std::option::Option::is_none"
13673        )]
13674        pub transaction_hash: ::std::option::Option<EvmUserOperationTransactionHash>,
13675        ///The hash of the user operation. This is not the transaction hash, as a transaction consists of multiple user operations. The user operation hash is the hash of this particular user operation which gets signed by the owner of the Smart Account.
13676        #[serde(rename = "userOpHash")]
13677        pub user_op_hash: EvmUserOperationUserOpHash,
13678    }
13679    impl ::std::convert::From<&EvmUserOperation> for EvmUserOperation {
13680        fn from(value: &EvmUserOperation) -> Self {
13681            value.clone()
13682        }
13683    }
13684    impl EvmUserOperation {
13685        pub fn builder() -> builder::EvmUserOperation {
13686            Default::default()
13687        }
13688    }
13689    ///The network the user operation is for.
13690    ///
13691    /// <details><summary>JSON schema</summary>
13692    ///
13693    /// ```json
13694    ///{
13695    ///  "description": "The network the user operation is for.",
13696    ///  "examples": [
13697    ///    "base"
13698    ///  ],
13699    ///  "type": "string",
13700    ///  "enum": [
13701    ///    "base-sepolia",
13702    ///    "base",
13703    ///    "arbitrum",
13704    ///    "optimism",
13705    ///    "zora",
13706    ///    "polygon",
13707    ///    "bnb",
13708    ///    "avalanche",
13709    ///    "ethereum",
13710    ///    "ethereum-sepolia"
13711    ///  ]
13712    ///}
13713    /// ```
13714    /// </details>
13715    #[derive(
13716        ::serde::Deserialize,
13717        ::serde::Serialize,
13718        Clone,
13719        Copy,
13720        Debug,
13721        Eq,
13722        Hash,
13723        Ord,
13724        PartialEq,
13725        PartialOrd,
13726    )]
13727    pub enum EvmUserOperationNetwork {
13728        #[serde(rename = "base-sepolia")]
13729        BaseSepolia,
13730        #[serde(rename = "base")]
13731        Base,
13732        #[serde(rename = "arbitrum")]
13733        Arbitrum,
13734        #[serde(rename = "optimism")]
13735        Optimism,
13736        #[serde(rename = "zora")]
13737        Zora,
13738        #[serde(rename = "polygon")]
13739        Polygon,
13740        #[serde(rename = "bnb")]
13741        Bnb,
13742        #[serde(rename = "avalanche")]
13743        Avalanche,
13744        #[serde(rename = "ethereum")]
13745        Ethereum,
13746        #[serde(rename = "ethereum-sepolia")]
13747        EthereumSepolia,
13748    }
13749    impl ::std::convert::From<&Self> for EvmUserOperationNetwork {
13750        fn from(value: &EvmUserOperationNetwork) -> Self {
13751            value.clone()
13752        }
13753    }
13754    impl ::std::fmt::Display for EvmUserOperationNetwork {
13755        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13756            match *self {
13757                Self::BaseSepolia => f.write_str("base-sepolia"),
13758                Self::Base => f.write_str("base"),
13759                Self::Arbitrum => f.write_str("arbitrum"),
13760                Self::Optimism => f.write_str("optimism"),
13761                Self::Zora => f.write_str("zora"),
13762                Self::Polygon => f.write_str("polygon"),
13763                Self::Bnb => f.write_str("bnb"),
13764                Self::Avalanche => f.write_str("avalanche"),
13765                Self::Ethereum => f.write_str("ethereum"),
13766                Self::EthereumSepolia => f.write_str("ethereum-sepolia"),
13767            }
13768        }
13769    }
13770    impl ::std::str::FromStr for EvmUserOperationNetwork {
13771        type Err = self::error::ConversionError;
13772        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13773            match value {
13774                "base-sepolia" => Ok(Self::BaseSepolia),
13775                "base" => Ok(Self::Base),
13776                "arbitrum" => Ok(Self::Arbitrum),
13777                "optimism" => Ok(Self::Optimism),
13778                "zora" => Ok(Self::Zora),
13779                "polygon" => Ok(Self::Polygon),
13780                "bnb" => Ok(Self::Bnb),
13781                "avalanche" => Ok(Self::Avalanche),
13782                "ethereum" => Ok(Self::Ethereum),
13783                "ethereum-sepolia" => Ok(Self::EthereumSepolia),
13784                _ => Err("invalid value".into()),
13785            }
13786        }
13787    }
13788    impl ::std::convert::TryFrom<&str> for EvmUserOperationNetwork {
13789        type Error = self::error::ConversionError;
13790        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13791            value.parse()
13792        }
13793    }
13794    impl ::std::convert::TryFrom<&::std::string::String> for EvmUserOperationNetwork {
13795        type Error = self::error::ConversionError;
13796        fn try_from(
13797            value: &::std::string::String,
13798        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13799            value.parse()
13800        }
13801    }
13802    impl ::std::convert::TryFrom<::std::string::String> for EvmUserOperationNetwork {
13803        type Error = self::error::ConversionError;
13804        fn try_from(
13805            value: ::std::string::String,
13806        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13807            value.parse()
13808        }
13809    }
13810    ///The status of the user operation.
13811    ///
13812    /// <details><summary>JSON schema</summary>
13813    ///
13814    /// ```json
13815    ///{
13816    ///  "description": "The status of the user operation.",
13817    ///  "examples": [
13818    ///    "pending"
13819    ///  ],
13820    ///  "type": "string",
13821    ///  "enum": [
13822    ///    "pending",
13823    ///    "signed",
13824    ///    "broadcast",
13825    ///    "complete",
13826    ///    "dropped",
13827    ///    "failed"
13828    ///  ]
13829    ///}
13830    /// ```
13831    /// </details>
13832    #[derive(
13833        ::serde::Deserialize,
13834        ::serde::Serialize,
13835        Clone,
13836        Copy,
13837        Debug,
13838        Eq,
13839        Hash,
13840        Ord,
13841        PartialEq,
13842        PartialOrd,
13843    )]
13844    pub enum EvmUserOperationStatus {
13845        #[serde(rename = "pending")]
13846        Pending,
13847        #[serde(rename = "signed")]
13848        Signed,
13849        #[serde(rename = "broadcast")]
13850        Broadcast,
13851        #[serde(rename = "complete")]
13852        Complete,
13853        #[serde(rename = "dropped")]
13854        Dropped,
13855        #[serde(rename = "failed")]
13856        Failed,
13857    }
13858    impl ::std::convert::From<&Self> for EvmUserOperationStatus {
13859        fn from(value: &EvmUserOperationStatus) -> Self {
13860            value.clone()
13861        }
13862    }
13863    impl ::std::fmt::Display for EvmUserOperationStatus {
13864        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13865            match *self {
13866                Self::Pending => f.write_str("pending"),
13867                Self::Signed => f.write_str("signed"),
13868                Self::Broadcast => f.write_str("broadcast"),
13869                Self::Complete => f.write_str("complete"),
13870                Self::Dropped => f.write_str("dropped"),
13871                Self::Failed => f.write_str("failed"),
13872            }
13873        }
13874    }
13875    impl ::std::str::FromStr for EvmUserOperationStatus {
13876        type Err = self::error::ConversionError;
13877        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13878            match value {
13879                "pending" => Ok(Self::Pending),
13880                "signed" => Ok(Self::Signed),
13881                "broadcast" => Ok(Self::Broadcast),
13882                "complete" => Ok(Self::Complete),
13883                "dropped" => Ok(Self::Dropped),
13884                "failed" => Ok(Self::Failed),
13885                _ => Err("invalid value".into()),
13886            }
13887        }
13888    }
13889    impl ::std::convert::TryFrom<&str> for EvmUserOperationStatus {
13890        type Error = self::error::ConversionError;
13891        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13892            value.parse()
13893        }
13894    }
13895    impl ::std::convert::TryFrom<&::std::string::String> for EvmUserOperationStatus {
13896        type Error = self::error::ConversionError;
13897        fn try_from(
13898            value: &::std::string::String,
13899        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13900            value.parse()
13901        }
13902    }
13903    impl ::std::convert::TryFrom<::std::string::String> for EvmUserOperationStatus {
13904        type Error = self::error::ConversionError;
13905        fn try_from(
13906            value: ::std::string::String,
13907        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13908            value.parse()
13909        }
13910    }
13911    ///The hash of the transaction that included this particular user operation. This gets set after the user operation is broadcasted and the transaction is included in a block.
13912    ///
13913    /// <details><summary>JSON schema</summary>
13914    ///
13915    /// ```json
13916    ///{
13917    ///  "description": "The hash of the transaction that included this particular user operation. This gets set after the user operation is broadcasted and the transaction is included in a block.",
13918    ///  "examples": [
13919    ///    "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
13920    ///  ],
13921    ///  "type": "string",
13922    ///  "pattern": "^0x[0-9a-fA-F]{64}$|^$"
13923    ///}
13924    /// ```
13925    /// </details>
13926    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
13927    #[serde(transparent)]
13928    pub struct EvmUserOperationTransactionHash(::std::string::String);
13929    impl ::std::ops::Deref for EvmUserOperationTransactionHash {
13930        type Target = ::std::string::String;
13931        fn deref(&self) -> &::std::string::String {
13932            &self.0
13933        }
13934    }
13935    impl ::std::convert::From<EvmUserOperationTransactionHash> for ::std::string::String {
13936        fn from(value: EvmUserOperationTransactionHash) -> Self {
13937            value.0
13938        }
13939    }
13940    impl ::std::convert::From<&EvmUserOperationTransactionHash> for EvmUserOperationTransactionHash {
13941        fn from(value: &EvmUserOperationTransactionHash) -> Self {
13942            value.clone()
13943        }
13944    }
13945    impl ::std::str::FromStr for EvmUserOperationTransactionHash {
13946        type Err = self::error::ConversionError;
13947        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13948            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
13949                ::std::sync::LazyLock::new(|| {
13950                    ::regress::Regex::new("^0x[0-9a-fA-F]{64}$|^$").unwrap()
13951                });
13952            if PATTERN.find(value).is_none() {
13953                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{64}$|^$\"".into());
13954            }
13955            Ok(Self(value.to_string()))
13956        }
13957    }
13958    impl ::std::convert::TryFrom<&str> for EvmUserOperationTransactionHash {
13959        type Error = self::error::ConversionError;
13960        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13961            value.parse()
13962        }
13963    }
13964    impl ::std::convert::TryFrom<&::std::string::String> for EvmUserOperationTransactionHash {
13965        type Error = self::error::ConversionError;
13966        fn try_from(
13967            value: &::std::string::String,
13968        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13969            value.parse()
13970        }
13971    }
13972    impl ::std::convert::TryFrom<::std::string::String> for EvmUserOperationTransactionHash {
13973        type Error = self::error::ConversionError;
13974        fn try_from(
13975            value: ::std::string::String,
13976        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13977            value.parse()
13978        }
13979    }
13980    impl<'de> ::serde::Deserialize<'de> for EvmUserOperationTransactionHash {
13981        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
13982        where
13983            D: ::serde::Deserializer<'de>,
13984        {
13985            ::std::string::String::deserialize(deserializer)?
13986                .parse()
13987                .map_err(|e: self::error::ConversionError| {
13988                    <D::Error as ::serde::de::Error>::custom(e.to_string())
13989                })
13990        }
13991    }
13992    ///The hash of the user operation. This is not the transaction hash, as a transaction consists of multiple user operations. The user operation hash is the hash of this particular user operation which gets signed by the owner of the Smart Account.
13993    ///
13994    /// <details><summary>JSON schema</summary>
13995    ///
13996    /// ```json
13997    ///{
13998    ///  "description": "The hash of the user operation. This is not the transaction hash, as a transaction consists of multiple user operations. The user operation hash is the hash of this particular user operation which gets signed by the owner of the Smart Account.",
13999    ///  "examples": [
14000    ///    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
14001    ///  ],
14002    ///  "type": "string",
14003    ///  "pattern": "^0x[0-9a-fA-F]{64}$"
14004    ///}
14005    /// ```
14006    /// </details>
14007    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14008    #[serde(transparent)]
14009    pub struct EvmUserOperationUserOpHash(::std::string::String);
14010    impl ::std::ops::Deref for EvmUserOperationUserOpHash {
14011        type Target = ::std::string::String;
14012        fn deref(&self) -> &::std::string::String {
14013            &self.0
14014        }
14015    }
14016    impl ::std::convert::From<EvmUserOperationUserOpHash> for ::std::string::String {
14017        fn from(value: EvmUserOperationUserOpHash) -> Self {
14018            value.0
14019        }
14020    }
14021    impl ::std::convert::From<&EvmUserOperationUserOpHash> for EvmUserOperationUserOpHash {
14022        fn from(value: &EvmUserOperationUserOpHash) -> Self {
14023            value.clone()
14024        }
14025    }
14026    impl ::std::str::FromStr for EvmUserOperationUserOpHash {
14027        type Err = self::error::ConversionError;
14028        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14029            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
14030                ::std::sync::LazyLock::new(|| {
14031                    ::regress::Regex::new("^0x[0-9a-fA-F]{64}$").unwrap()
14032                });
14033            if PATTERN.find(value).is_none() {
14034                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{64}$\"".into());
14035            }
14036            Ok(Self(value.to_string()))
14037        }
14038    }
14039    impl ::std::convert::TryFrom<&str> for EvmUserOperationUserOpHash {
14040        type Error = self::error::ConversionError;
14041        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14042            value.parse()
14043        }
14044    }
14045    impl ::std::convert::TryFrom<&::std::string::String> for EvmUserOperationUserOpHash {
14046        type Error = self::error::ConversionError;
14047        fn try_from(
14048            value: &::std::string::String,
14049        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14050            value.parse()
14051        }
14052    }
14053    impl ::std::convert::TryFrom<::std::string::String> for EvmUserOperationUserOpHash {
14054        type Error = self::error::ConversionError;
14055        fn try_from(
14056            value: ::std::string::String,
14057        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14058            value.parse()
14059        }
14060    }
14061    impl<'de> ::serde::Deserialize<'de> for EvmUserOperationUserOpHash {
14062        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14063        where
14064            D: ::serde::Deserializer<'de>,
14065        {
14066            ::std::string::String::deserialize(deserializer)?
14067                .parse()
14068                .map_err(|e: self::error::ConversionError| {
14069                    <D::Error as ::serde::de::Error>::custom(e.to_string())
14070                })
14071        }
14072    }
14073    ///`ExportEvmAccountAddress`
14074    ///
14075    /// <details><summary>JSON schema</summary>
14076    ///
14077    /// ```json
14078    ///{
14079    ///  "type": "string",
14080    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
14081    ///}
14082    /// ```
14083    /// </details>
14084    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14085    #[serde(transparent)]
14086    pub struct ExportEvmAccountAddress(::std::string::String);
14087    impl ::std::ops::Deref for ExportEvmAccountAddress {
14088        type Target = ::std::string::String;
14089        fn deref(&self) -> &::std::string::String {
14090            &self.0
14091        }
14092    }
14093    impl ::std::convert::From<ExportEvmAccountAddress> for ::std::string::String {
14094        fn from(value: ExportEvmAccountAddress) -> Self {
14095            value.0
14096        }
14097    }
14098    impl ::std::convert::From<&ExportEvmAccountAddress> for ExportEvmAccountAddress {
14099        fn from(value: &ExportEvmAccountAddress) -> Self {
14100            value.clone()
14101        }
14102    }
14103    impl ::std::str::FromStr for ExportEvmAccountAddress {
14104        type Err = self::error::ConversionError;
14105        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14106            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
14107                ::std::sync::LazyLock::new(|| {
14108                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
14109                });
14110            if PATTERN.find(value).is_none() {
14111                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
14112            }
14113            Ok(Self(value.to_string()))
14114        }
14115    }
14116    impl ::std::convert::TryFrom<&str> for ExportEvmAccountAddress {
14117        type Error = self::error::ConversionError;
14118        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14119            value.parse()
14120        }
14121    }
14122    impl ::std::convert::TryFrom<&::std::string::String> for ExportEvmAccountAddress {
14123        type Error = self::error::ConversionError;
14124        fn try_from(
14125            value: &::std::string::String,
14126        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14127            value.parse()
14128        }
14129    }
14130    impl ::std::convert::TryFrom<::std::string::String> for ExportEvmAccountAddress {
14131        type Error = self::error::ConversionError;
14132        fn try_from(
14133            value: ::std::string::String,
14134        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14135            value.parse()
14136        }
14137    }
14138    impl<'de> ::serde::Deserialize<'de> for ExportEvmAccountAddress {
14139        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14140        where
14141            D: ::serde::Deserializer<'de>,
14142        {
14143            ::std::string::String::deserialize(deserializer)?
14144                .parse()
14145                .map_err(|e: self::error::ConversionError| {
14146                    <D::Error as ::serde::de::Error>::custom(e.to_string())
14147                })
14148        }
14149    }
14150    ///`ExportEvmAccountBody`
14151    ///
14152    /// <details><summary>JSON schema</summary>
14153    ///
14154    /// ```json
14155    ///{
14156    ///  "type": "object",
14157    ///  "required": [
14158    ///    "exportEncryptionKey"
14159    ///  ],
14160    ///  "properties": {
14161    ///    "exportEncryptionKey": {
14162    ///      "description": "The base64-encoded, public part of the RSA key in DER format used to encrypt the account private key.",
14163    ///      "examples": [
14164    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
14165    ///      ],
14166    ///      "type": "string"
14167    ///    }
14168    ///  }
14169    ///}
14170    /// ```
14171    /// </details>
14172    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14173    pub struct ExportEvmAccountBody {
14174        ///The base64-encoded, public part of the RSA key in DER format used to encrypt the account private key.
14175        #[serde(rename = "exportEncryptionKey")]
14176        pub export_encryption_key: ::std::string::String,
14177    }
14178    impl ::std::convert::From<&ExportEvmAccountBody> for ExportEvmAccountBody {
14179        fn from(value: &ExportEvmAccountBody) -> Self {
14180            value.clone()
14181        }
14182    }
14183    impl ExportEvmAccountBody {
14184        pub fn builder() -> builder::ExportEvmAccountBody {
14185            Default::default()
14186        }
14187    }
14188    ///`ExportEvmAccountByNameBody`
14189    ///
14190    /// <details><summary>JSON schema</summary>
14191    ///
14192    /// ```json
14193    ///{
14194    ///  "type": "object",
14195    ///  "required": [
14196    ///    "exportEncryptionKey"
14197    ///  ],
14198    ///  "properties": {
14199    ///    "exportEncryptionKey": {
14200    ///      "description": "The base64-encoded, public part of the RSA key in DER format used to encrypt the account private key.",
14201    ///      "examples": [
14202    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
14203    ///      ],
14204    ///      "type": "string"
14205    ///    }
14206    ///  }
14207    ///}
14208    /// ```
14209    /// </details>
14210    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14211    pub struct ExportEvmAccountByNameBody {
14212        ///The base64-encoded, public part of the RSA key in DER format used to encrypt the account private key.
14213        #[serde(rename = "exportEncryptionKey")]
14214        pub export_encryption_key: ::std::string::String,
14215    }
14216    impl ::std::convert::From<&ExportEvmAccountByNameBody> for ExportEvmAccountByNameBody {
14217        fn from(value: &ExportEvmAccountByNameBody) -> Self {
14218            value.clone()
14219        }
14220    }
14221    impl ExportEvmAccountByNameBody {
14222        pub fn builder() -> builder::ExportEvmAccountByNameBody {
14223            Default::default()
14224        }
14225    }
14226    ///`ExportEvmAccountByNameResponse`
14227    ///
14228    /// <details><summary>JSON schema</summary>
14229    ///
14230    /// ```json
14231    ///{
14232    ///  "type": "object",
14233    ///  "required": [
14234    ///    "encryptedPrivateKey"
14235    ///  ],
14236    ///  "properties": {
14237    ///    "encryptedPrivateKey": {
14238    ///      "description": "The base64-encoded, encrypted private key of the EVM account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request.",
14239    ///      "examples": [
14240    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
14241    ///      ],
14242    ///      "type": "string"
14243    ///    }
14244    ///  }
14245    ///}
14246    /// ```
14247    /// </details>
14248    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14249    pub struct ExportEvmAccountByNameResponse {
14250        ///The base64-encoded, encrypted private key of the EVM account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request.
14251        #[serde(rename = "encryptedPrivateKey")]
14252        pub encrypted_private_key: ::std::string::String,
14253    }
14254    impl ::std::convert::From<&ExportEvmAccountByNameResponse> for ExportEvmAccountByNameResponse {
14255        fn from(value: &ExportEvmAccountByNameResponse) -> Self {
14256            value.clone()
14257        }
14258    }
14259    impl ExportEvmAccountByNameResponse {
14260        pub fn builder() -> builder::ExportEvmAccountByNameResponse {
14261            Default::default()
14262        }
14263    }
14264    ///`ExportEvmAccountByNameXIdempotencyKey`
14265    ///
14266    /// <details><summary>JSON schema</summary>
14267    ///
14268    /// ```json
14269    ///{
14270    ///  "type": "string",
14271    ///  "maxLength": 36,
14272    ///  "minLength": 36,
14273    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
14274    ///}
14275    /// ```
14276    /// </details>
14277    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14278    #[serde(transparent)]
14279    pub struct ExportEvmAccountByNameXIdempotencyKey(::std::string::String);
14280    impl ::std::ops::Deref for ExportEvmAccountByNameXIdempotencyKey {
14281        type Target = ::std::string::String;
14282        fn deref(&self) -> &::std::string::String {
14283            &self.0
14284        }
14285    }
14286    impl ::std::convert::From<ExportEvmAccountByNameXIdempotencyKey> for ::std::string::String {
14287        fn from(value: ExportEvmAccountByNameXIdempotencyKey) -> Self {
14288            value.0
14289        }
14290    }
14291    impl ::std::convert::From<&ExportEvmAccountByNameXIdempotencyKey>
14292        for ExportEvmAccountByNameXIdempotencyKey
14293    {
14294        fn from(value: &ExportEvmAccountByNameXIdempotencyKey) -> Self {
14295            value.clone()
14296        }
14297    }
14298    impl ::std::str::FromStr for ExportEvmAccountByNameXIdempotencyKey {
14299        type Err = self::error::ConversionError;
14300        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14301            if value.chars().count() > 36usize {
14302                return Err("longer than 36 characters".into());
14303            }
14304            if value.chars().count() < 36usize {
14305                return Err("shorter than 36 characters".into());
14306            }
14307            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
14308                ::std::sync::LazyLock::new(|| {
14309                    ::regress::Regex::new(
14310                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
14311                    )
14312                    .unwrap()
14313                });
14314            if PATTERN.find(value).is_none() {
14315                return Err(
14316                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
14317                        .into(),
14318                );
14319            }
14320            Ok(Self(value.to_string()))
14321        }
14322    }
14323    impl ::std::convert::TryFrom<&str> for ExportEvmAccountByNameXIdempotencyKey {
14324        type Error = self::error::ConversionError;
14325        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14326            value.parse()
14327        }
14328    }
14329    impl ::std::convert::TryFrom<&::std::string::String> for ExportEvmAccountByNameXIdempotencyKey {
14330        type Error = self::error::ConversionError;
14331        fn try_from(
14332            value: &::std::string::String,
14333        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14334            value.parse()
14335        }
14336    }
14337    impl ::std::convert::TryFrom<::std::string::String> for ExportEvmAccountByNameXIdempotencyKey {
14338        type Error = self::error::ConversionError;
14339        fn try_from(
14340            value: ::std::string::String,
14341        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14342            value.parse()
14343        }
14344    }
14345    impl<'de> ::serde::Deserialize<'de> for ExportEvmAccountByNameXIdempotencyKey {
14346        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14347        where
14348            D: ::serde::Deserializer<'de>,
14349        {
14350            ::std::string::String::deserialize(deserializer)?
14351                .parse()
14352                .map_err(|e: self::error::ConversionError| {
14353                    <D::Error as ::serde::de::Error>::custom(e.to_string())
14354                })
14355        }
14356    }
14357    ///`ExportEvmAccountResponse`
14358    ///
14359    /// <details><summary>JSON schema</summary>
14360    ///
14361    /// ```json
14362    ///{
14363    ///  "type": "object",
14364    ///  "required": [
14365    ///    "encryptedPrivateKey"
14366    ///  ],
14367    ///  "properties": {
14368    ///    "encryptedPrivateKey": {
14369    ///      "description": "The base64-encoded, encrypted private key of the EVM account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request.",
14370    ///      "examples": [
14371    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
14372    ///      ],
14373    ///      "type": "string"
14374    ///    }
14375    ///  }
14376    ///}
14377    /// ```
14378    /// </details>
14379    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14380    pub struct ExportEvmAccountResponse {
14381        ///The base64-encoded, encrypted private key of the EVM account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request.
14382        #[serde(rename = "encryptedPrivateKey")]
14383        pub encrypted_private_key: ::std::string::String,
14384    }
14385    impl ::std::convert::From<&ExportEvmAccountResponse> for ExportEvmAccountResponse {
14386        fn from(value: &ExportEvmAccountResponse) -> Self {
14387            value.clone()
14388        }
14389    }
14390    impl ExportEvmAccountResponse {
14391        pub fn builder() -> builder::ExportEvmAccountResponse {
14392            Default::default()
14393        }
14394    }
14395    ///`ExportEvmAccountXIdempotencyKey`
14396    ///
14397    /// <details><summary>JSON schema</summary>
14398    ///
14399    /// ```json
14400    ///{
14401    ///  "type": "string",
14402    ///  "maxLength": 36,
14403    ///  "minLength": 36,
14404    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
14405    ///}
14406    /// ```
14407    /// </details>
14408    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14409    #[serde(transparent)]
14410    pub struct ExportEvmAccountXIdempotencyKey(::std::string::String);
14411    impl ::std::ops::Deref for ExportEvmAccountXIdempotencyKey {
14412        type Target = ::std::string::String;
14413        fn deref(&self) -> &::std::string::String {
14414            &self.0
14415        }
14416    }
14417    impl ::std::convert::From<ExportEvmAccountXIdempotencyKey> for ::std::string::String {
14418        fn from(value: ExportEvmAccountXIdempotencyKey) -> Self {
14419            value.0
14420        }
14421    }
14422    impl ::std::convert::From<&ExportEvmAccountXIdempotencyKey> for ExportEvmAccountXIdempotencyKey {
14423        fn from(value: &ExportEvmAccountXIdempotencyKey) -> Self {
14424            value.clone()
14425        }
14426    }
14427    impl ::std::str::FromStr for ExportEvmAccountXIdempotencyKey {
14428        type Err = self::error::ConversionError;
14429        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14430            if value.chars().count() > 36usize {
14431                return Err("longer than 36 characters".into());
14432            }
14433            if value.chars().count() < 36usize {
14434                return Err("shorter than 36 characters".into());
14435            }
14436            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
14437                ::std::sync::LazyLock::new(|| {
14438                    ::regress::Regex::new(
14439                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
14440                    )
14441                    .unwrap()
14442                });
14443            if PATTERN.find(value).is_none() {
14444                return Err(
14445                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
14446                        .into(),
14447                );
14448            }
14449            Ok(Self(value.to_string()))
14450        }
14451    }
14452    impl ::std::convert::TryFrom<&str> for ExportEvmAccountXIdempotencyKey {
14453        type Error = self::error::ConversionError;
14454        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14455            value.parse()
14456        }
14457    }
14458    impl ::std::convert::TryFrom<&::std::string::String> for ExportEvmAccountXIdempotencyKey {
14459        type Error = self::error::ConversionError;
14460        fn try_from(
14461            value: &::std::string::String,
14462        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14463            value.parse()
14464        }
14465    }
14466    impl ::std::convert::TryFrom<::std::string::String> for ExportEvmAccountXIdempotencyKey {
14467        type Error = self::error::ConversionError;
14468        fn try_from(
14469            value: ::std::string::String,
14470        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14471            value.parse()
14472        }
14473    }
14474    impl<'de> ::serde::Deserialize<'de> for ExportEvmAccountXIdempotencyKey {
14475        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14476        where
14477            D: ::serde::Deserializer<'de>,
14478        {
14479            ::std::string::String::deserialize(deserializer)?
14480                .parse()
14481                .map_err(|e: self::error::ConversionError| {
14482                    <D::Error as ::serde::de::Error>::custom(e.to_string())
14483                })
14484        }
14485    }
14486    ///`ExportSolanaAccountAddress`
14487    ///
14488    /// <details><summary>JSON schema</summary>
14489    ///
14490    /// ```json
14491    ///{
14492    ///  "type": "string",
14493    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
14494    ///}
14495    /// ```
14496    /// </details>
14497    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14498    #[serde(transparent)]
14499    pub struct ExportSolanaAccountAddress(::std::string::String);
14500    impl ::std::ops::Deref for ExportSolanaAccountAddress {
14501        type Target = ::std::string::String;
14502        fn deref(&self) -> &::std::string::String {
14503            &self.0
14504        }
14505    }
14506    impl ::std::convert::From<ExportSolanaAccountAddress> for ::std::string::String {
14507        fn from(value: ExportSolanaAccountAddress) -> Self {
14508            value.0
14509        }
14510    }
14511    impl ::std::convert::From<&ExportSolanaAccountAddress> for ExportSolanaAccountAddress {
14512        fn from(value: &ExportSolanaAccountAddress) -> Self {
14513            value.clone()
14514        }
14515    }
14516    impl ::std::str::FromStr for ExportSolanaAccountAddress {
14517        type Err = self::error::ConversionError;
14518        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14519            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
14520                ::std::sync::LazyLock::new(|| {
14521                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
14522                });
14523            if PATTERN.find(value).is_none() {
14524                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
14525            }
14526            Ok(Self(value.to_string()))
14527        }
14528    }
14529    impl ::std::convert::TryFrom<&str> for ExportSolanaAccountAddress {
14530        type Error = self::error::ConversionError;
14531        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14532            value.parse()
14533        }
14534    }
14535    impl ::std::convert::TryFrom<&::std::string::String> for ExportSolanaAccountAddress {
14536        type Error = self::error::ConversionError;
14537        fn try_from(
14538            value: &::std::string::String,
14539        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14540            value.parse()
14541        }
14542    }
14543    impl ::std::convert::TryFrom<::std::string::String> for ExportSolanaAccountAddress {
14544        type Error = self::error::ConversionError;
14545        fn try_from(
14546            value: ::std::string::String,
14547        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14548            value.parse()
14549        }
14550    }
14551    impl<'de> ::serde::Deserialize<'de> for ExportSolanaAccountAddress {
14552        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14553        where
14554            D: ::serde::Deserializer<'de>,
14555        {
14556            ::std::string::String::deserialize(deserializer)?
14557                .parse()
14558                .map_err(|e: self::error::ConversionError| {
14559                    <D::Error as ::serde::de::Error>::custom(e.to_string())
14560                })
14561        }
14562    }
14563    ///`ExportSolanaAccountBody`
14564    ///
14565    /// <details><summary>JSON schema</summary>
14566    ///
14567    /// ```json
14568    ///{
14569    ///  "type": "object",
14570    ///  "required": [
14571    ///    "exportEncryptionKey"
14572    ///  ],
14573    ///  "properties": {
14574    ///    "exportEncryptionKey": {
14575    ///      "description": "The base64-encoded, public part of the RSA key in DER format used to encrypt the account private key.",
14576    ///      "examples": [
14577    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
14578    ///      ],
14579    ///      "type": "string"
14580    ///    }
14581    ///  }
14582    ///}
14583    /// ```
14584    /// </details>
14585    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14586    pub struct ExportSolanaAccountBody {
14587        ///The base64-encoded, public part of the RSA key in DER format used to encrypt the account private key.
14588        #[serde(rename = "exportEncryptionKey")]
14589        pub export_encryption_key: ::std::string::String,
14590    }
14591    impl ::std::convert::From<&ExportSolanaAccountBody> for ExportSolanaAccountBody {
14592        fn from(value: &ExportSolanaAccountBody) -> Self {
14593            value.clone()
14594        }
14595    }
14596    impl ExportSolanaAccountBody {
14597        pub fn builder() -> builder::ExportSolanaAccountBody {
14598            Default::default()
14599        }
14600    }
14601    ///`ExportSolanaAccountByNameBody`
14602    ///
14603    /// <details><summary>JSON schema</summary>
14604    ///
14605    /// ```json
14606    ///{
14607    ///  "type": "object",
14608    ///  "required": [
14609    ///    "exportEncryptionKey"
14610    ///  ],
14611    ///  "properties": {
14612    ///    "exportEncryptionKey": {
14613    ///      "description": "The base64-encoded, public part of the RSA key in DER format used to encrypt the account private key.",
14614    ///      "examples": [
14615    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
14616    ///      ],
14617    ///      "type": "string"
14618    ///    }
14619    ///  }
14620    ///}
14621    /// ```
14622    /// </details>
14623    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14624    pub struct ExportSolanaAccountByNameBody {
14625        ///The base64-encoded, public part of the RSA key in DER format used to encrypt the account private key.
14626        #[serde(rename = "exportEncryptionKey")]
14627        pub export_encryption_key: ::std::string::String,
14628    }
14629    impl ::std::convert::From<&ExportSolanaAccountByNameBody> for ExportSolanaAccountByNameBody {
14630        fn from(value: &ExportSolanaAccountByNameBody) -> Self {
14631            value.clone()
14632        }
14633    }
14634    impl ExportSolanaAccountByNameBody {
14635        pub fn builder() -> builder::ExportSolanaAccountByNameBody {
14636            Default::default()
14637        }
14638    }
14639    ///`ExportSolanaAccountByNameResponse`
14640    ///
14641    /// <details><summary>JSON schema</summary>
14642    ///
14643    /// ```json
14644    ///{
14645    ///  "type": "object",
14646    ///  "required": [
14647    ///    "encryptedPrivateKey"
14648    ///  ],
14649    ///  "properties": {
14650    ///    "encryptedPrivateKey": {
14651    ///      "description": "The base64-encoded, encrypted private key of the Solana account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request.",
14652    ///      "examples": [
14653    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
14654    ///      ],
14655    ///      "type": "string"
14656    ///    }
14657    ///  }
14658    ///}
14659    /// ```
14660    /// </details>
14661    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14662    pub struct ExportSolanaAccountByNameResponse {
14663        ///The base64-encoded, encrypted private key of the Solana account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request.
14664        #[serde(rename = "encryptedPrivateKey")]
14665        pub encrypted_private_key: ::std::string::String,
14666    }
14667    impl ::std::convert::From<&ExportSolanaAccountByNameResponse>
14668        for ExportSolanaAccountByNameResponse
14669    {
14670        fn from(value: &ExportSolanaAccountByNameResponse) -> Self {
14671            value.clone()
14672        }
14673    }
14674    impl ExportSolanaAccountByNameResponse {
14675        pub fn builder() -> builder::ExportSolanaAccountByNameResponse {
14676            Default::default()
14677        }
14678    }
14679    ///`ExportSolanaAccountByNameXIdempotencyKey`
14680    ///
14681    /// <details><summary>JSON schema</summary>
14682    ///
14683    /// ```json
14684    ///{
14685    ///  "type": "string",
14686    ///  "maxLength": 36,
14687    ///  "minLength": 36,
14688    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
14689    ///}
14690    /// ```
14691    /// </details>
14692    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14693    #[serde(transparent)]
14694    pub struct ExportSolanaAccountByNameXIdempotencyKey(::std::string::String);
14695    impl ::std::ops::Deref for ExportSolanaAccountByNameXIdempotencyKey {
14696        type Target = ::std::string::String;
14697        fn deref(&self) -> &::std::string::String {
14698            &self.0
14699        }
14700    }
14701    impl ::std::convert::From<ExportSolanaAccountByNameXIdempotencyKey> for ::std::string::String {
14702        fn from(value: ExportSolanaAccountByNameXIdempotencyKey) -> Self {
14703            value.0
14704        }
14705    }
14706    impl ::std::convert::From<&ExportSolanaAccountByNameXIdempotencyKey>
14707        for ExportSolanaAccountByNameXIdempotencyKey
14708    {
14709        fn from(value: &ExportSolanaAccountByNameXIdempotencyKey) -> Self {
14710            value.clone()
14711        }
14712    }
14713    impl ::std::str::FromStr for ExportSolanaAccountByNameXIdempotencyKey {
14714        type Err = self::error::ConversionError;
14715        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14716            if value.chars().count() > 36usize {
14717                return Err("longer than 36 characters".into());
14718            }
14719            if value.chars().count() < 36usize {
14720                return Err("shorter than 36 characters".into());
14721            }
14722            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
14723                ::std::sync::LazyLock::new(|| {
14724                    ::regress::Regex::new(
14725                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
14726                    )
14727                    .unwrap()
14728                });
14729            if PATTERN.find(value).is_none() {
14730                return Err(
14731                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
14732                        .into(),
14733                );
14734            }
14735            Ok(Self(value.to_string()))
14736        }
14737    }
14738    impl ::std::convert::TryFrom<&str> for ExportSolanaAccountByNameXIdempotencyKey {
14739        type Error = self::error::ConversionError;
14740        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14741            value.parse()
14742        }
14743    }
14744    impl ::std::convert::TryFrom<&::std::string::String> for ExportSolanaAccountByNameXIdempotencyKey {
14745        type Error = self::error::ConversionError;
14746        fn try_from(
14747            value: &::std::string::String,
14748        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14749            value.parse()
14750        }
14751    }
14752    impl ::std::convert::TryFrom<::std::string::String> for ExportSolanaAccountByNameXIdempotencyKey {
14753        type Error = self::error::ConversionError;
14754        fn try_from(
14755            value: ::std::string::String,
14756        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14757            value.parse()
14758        }
14759    }
14760    impl<'de> ::serde::Deserialize<'de> for ExportSolanaAccountByNameXIdempotencyKey {
14761        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14762        where
14763            D: ::serde::Deserializer<'de>,
14764        {
14765            ::std::string::String::deserialize(deserializer)?
14766                .parse()
14767                .map_err(|e: self::error::ConversionError| {
14768                    <D::Error as ::serde::de::Error>::custom(e.to_string())
14769                })
14770        }
14771    }
14772    ///`ExportSolanaAccountResponse`
14773    ///
14774    /// <details><summary>JSON schema</summary>
14775    ///
14776    /// ```json
14777    ///{
14778    ///  "type": "object",
14779    ///  "required": [
14780    ///    "encryptedPrivateKey"
14781    ///  ],
14782    ///  "properties": {
14783    ///    "encryptedPrivateKey": {
14784    ///      "description": "The base64-encoded, encrypted private key of the Solana account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request.",
14785    ///      "examples": [
14786    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
14787    ///      ],
14788    ///      "type": "string"
14789    ///    }
14790    ///  }
14791    ///}
14792    /// ```
14793    /// </details>
14794    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
14795    pub struct ExportSolanaAccountResponse {
14796        ///The base64-encoded, encrypted private key of the Solana account which is a 32 byte raw private key. The private key is encrypted in transport using the exportEncryptionKey in the request.
14797        #[serde(rename = "encryptedPrivateKey")]
14798        pub encrypted_private_key: ::std::string::String,
14799    }
14800    impl ::std::convert::From<&ExportSolanaAccountResponse> for ExportSolanaAccountResponse {
14801        fn from(value: &ExportSolanaAccountResponse) -> Self {
14802            value.clone()
14803        }
14804    }
14805    impl ExportSolanaAccountResponse {
14806        pub fn builder() -> builder::ExportSolanaAccountResponse {
14807            Default::default()
14808        }
14809    }
14810    ///`ExportSolanaAccountXIdempotencyKey`
14811    ///
14812    /// <details><summary>JSON schema</summary>
14813    ///
14814    /// ```json
14815    ///{
14816    ///  "type": "string",
14817    ///  "maxLength": 36,
14818    ///  "minLength": 36,
14819    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
14820    ///}
14821    /// ```
14822    /// </details>
14823    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14824    #[serde(transparent)]
14825    pub struct ExportSolanaAccountXIdempotencyKey(::std::string::String);
14826    impl ::std::ops::Deref for ExportSolanaAccountXIdempotencyKey {
14827        type Target = ::std::string::String;
14828        fn deref(&self) -> &::std::string::String {
14829            &self.0
14830        }
14831    }
14832    impl ::std::convert::From<ExportSolanaAccountXIdempotencyKey> for ::std::string::String {
14833        fn from(value: ExportSolanaAccountXIdempotencyKey) -> Self {
14834            value.0
14835        }
14836    }
14837    impl ::std::convert::From<&ExportSolanaAccountXIdempotencyKey>
14838        for ExportSolanaAccountXIdempotencyKey
14839    {
14840        fn from(value: &ExportSolanaAccountXIdempotencyKey) -> Self {
14841            value.clone()
14842        }
14843    }
14844    impl ::std::str::FromStr for ExportSolanaAccountXIdempotencyKey {
14845        type Err = self::error::ConversionError;
14846        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14847            if value.chars().count() > 36usize {
14848                return Err("longer than 36 characters".into());
14849            }
14850            if value.chars().count() < 36usize {
14851                return Err("shorter than 36 characters".into());
14852            }
14853            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
14854                ::std::sync::LazyLock::new(|| {
14855                    ::regress::Regex::new(
14856                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
14857                    )
14858                    .unwrap()
14859                });
14860            if PATTERN.find(value).is_none() {
14861                return Err(
14862                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
14863                        .into(),
14864                );
14865            }
14866            Ok(Self(value.to_string()))
14867        }
14868    }
14869    impl ::std::convert::TryFrom<&str> for ExportSolanaAccountXIdempotencyKey {
14870        type Error = self::error::ConversionError;
14871        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14872            value.parse()
14873        }
14874    }
14875    impl ::std::convert::TryFrom<&::std::string::String> for ExportSolanaAccountXIdempotencyKey {
14876        type Error = self::error::ConversionError;
14877        fn try_from(
14878            value: &::std::string::String,
14879        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14880            value.parse()
14881        }
14882    }
14883    impl ::std::convert::TryFrom<::std::string::String> for ExportSolanaAccountXIdempotencyKey {
14884        type Error = self::error::ConversionError;
14885        fn try_from(
14886            value: ::std::string::String,
14887        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14888            value.parse()
14889        }
14890    }
14891    impl<'de> ::serde::Deserialize<'de> for ExportSolanaAccountXIdempotencyKey {
14892        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14893        where
14894            D: ::serde::Deserializer<'de>,
14895        {
14896            ::std::string::String::deserialize(deserializer)?
14897                .parse()
14898                .map_err(|e: self::error::ConversionError| {
14899                    <D::Error as ::serde::de::Error>::custom(e.to_string())
14900                })
14901        }
14902    }
14903    ///The amount of the `fromToken` to send in atomic units of the token. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
14904    ///
14905    /// <details><summary>JSON schema</summary>
14906    ///
14907    /// ```json
14908    ///{
14909    ///  "description": "The amount of the `fromToken` to send in atomic units of the token. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.",
14910    ///  "examples": [
14911    ///    "1000000000000000000"
14912    ///  ],
14913    ///  "type": "string",
14914    ///  "pattern": "^\\d+$"
14915    ///}
14916    /// ```
14917    /// </details>
14918    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14919    #[serde(transparent)]
14920    pub struct FromAmount(::std::string::String);
14921    impl ::std::ops::Deref for FromAmount {
14922        type Target = ::std::string::String;
14923        fn deref(&self) -> &::std::string::String {
14924            &self.0
14925        }
14926    }
14927    impl ::std::convert::From<FromAmount> for ::std::string::String {
14928        fn from(value: FromAmount) -> Self {
14929            value.0
14930        }
14931    }
14932    impl ::std::convert::From<&FromAmount> for FromAmount {
14933        fn from(value: &FromAmount) -> Self {
14934            value.clone()
14935        }
14936    }
14937    impl ::std::str::FromStr for FromAmount {
14938        type Err = self::error::ConversionError;
14939        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14940            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
14941                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
14942            if PATTERN.find(value).is_none() {
14943                return Err("doesn't match pattern \"^\\d+$\"".into());
14944            }
14945            Ok(Self(value.to_string()))
14946        }
14947    }
14948    impl ::std::convert::TryFrom<&str> for FromAmount {
14949        type Error = self::error::ConversionError;
14950        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14951            value.parse()
14952        }
14953    }
14954    impl ::std::convert::TryFrom<&::std::string::String> for FromAmount {
14955        type Error = self::error::ConversionError;
14956        fn try_from(
14957            value: &::std::string::String,
14958        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14959            value.parse()
14960        }
14961    }
14962    impl ::std::convert::TryFrom<::std::string::String> for FromAmount {
14963        type Error = self::error::ConversionError;
14964        fn try_from(
14965            value: ::std::string::String,
14966        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14967            value.parse()
14968        }
14969    }
14970    impl<'de> ::serde::Deserialize<'de> for FromAmount {
14971        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
14972        where
14973            D: ::serde::Deserializer<'de>,
14974        {
14975            ::std::string::String::deserialize(deserializer)?
14976                .parse()
14977                .map_err(|e: self::error::ConversionError| {
14978                    <D::Error as ::serde::de::Error>::custom(e.to_string())
14979                })
14980        }
14981    }
14982    ///The 0x-prefixed contract address of the token to send.
14983    ///
14984    /// <details><summary>JSON schema</summary>
14985    ///
14986    /// ```json
14987    ///{
14988    ///  "description": "The 0x-prefixed contract address of the token to send.",
14989    ///  "examples": [
14990    ///    "0x6B175474E89094C44Da98b954EedeAC495271d0F"
14991    ///  ],
14992    ///  "type": "string",
14993    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
14994    ///}
14995    /// ```
14996    /// </details>
14997    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14998    #[serde(transparent)]
14999    pub struct FromToken(::std::string::String);
15000    impl ::std::ops::Deref for FromToken {
15001        type Target = ::std::string::String;
15002        fn deref(&self) -> &::std::string::String {
15003            &self.0
15004        }
15005    }
15006    impl ::std::convert::From<FromToken> for ::std::string::String {
15007        fn from(value: FromToken) -> Self {
15008            value.0
15009        }
15010    }
15011    impl ::std::convert::From<&FromToken> for FromToken {
15012        fn from(value: &FromToken) -> Self {
15013            value.clone()
15014        }
15015    }
15016    impl ::std::str::FromStr for FromToken {
15017        type Err = self::error::ConversionError;
15018        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15019            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15020                ::std::sync::LazyLock::new(|| {
15021                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
15022                });
15023            if PATTERN.find(value).is_none() {
15024                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
15025            }
15026            Ok(Self(value.to_string()))
15027        }
15028    }
15029    impl ::std::convert::TryFrom<&str> for FromToken {
15030        type Error = self::error::ConversionError;
15031        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15032            value.parse()
15033        }
15034    }
15035    impl ::std::convert::TryFrom<&::std::string::String> for FromToken {
15036        type Error = self::error::ConversionError;
15037        fn try_from(
15038            value: &::std::string::String,
15039        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15040            value.parse()
15041        }
15042    }
15043    impl ::std::convert::TryFrom<::std::string::String> for FromToken {
15044        type Error = self::error::ConversionError;
15045        fn try_from(
15046            value: ::std::string::String,
15047        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15048            value.parse()
15049        }
15050    }
15051    impl<'de> ::serde::Deserialize<'de> for FromToken {
15052        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15053        where
15054            D: ::serde::Deserializer<'de>,
15055        {
15056            ::std::string::String::deserialize(deserializer)?
15057                .parse()
15058                .map_err(|e: self::error::ConversionError| {
15059                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15060                })
15061        }
15062    }
15063    ///The target gas price for the swap transaction, in Wei. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. If not provided, the API will use an estimate based on the current network conditions.
15064    ///
15065    /// <details><summary>JSON schema</summary>
15066    ///
15067    /// ```json
15068    ///{
15069    ///  "description": "The target gas price for the swap transaction, in Wei. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. If not provided, the API will use an estimate based on the current network conditions.",
15070    ///  "examples": [
15071    ///    "1000000000"
15072    ///  ],
15073    ///  "type": "string",
15074    ///  "pattern": "^\\d+$"
15075    ///}
15076    /// ```
15077    /// </details>
15078    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15079    #[serde(transparent)]
15080    pub struct GasPrice(::std::string::String);
15081    impl ::std::ops::Deref for GasPrice {
15082        type Target = ::std::string::String;
15083        fn deref(&self) -> &::std::string::String {
15084            &self.0
15085        }
15086    }
15087    impl ::std::convert::From<GasPrice> for ::std::string::String {
15088        fn from(value: GasPrice) -> Self {
15089            value.0
15090        }
15091    }
15092    impl ::std::convert::From<&GasPrice> for GasPrice {
15093        fn from(value: &GasPrice) -> Self {
15094            value.clone()
15095        }
15096    }
15097    impl ::std::str::FromStr for GasPrice {
15098        type Err = self::error::ConversionError;
15099        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15100            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15101                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
15102            if PATTERN.find(value).is_none() {
15103                return Err("doesn't match pattern \"^\\d+$\"".into());
15104            }
15105            Ok(Self(value.to_string()))
15106        }
15107    }
15108    impl ::std::convert::TryFrom<&str> for GasPrice {
15109        type Error = self::error::ConversionError;
15110        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15111            value.parse()
15112        }
15113    }
15114    impl ::std::convert::TryFrom<&::std::string::String> for GasPrice {
15115        type Error = self::error::ConversionError;
15116        fn try_from(
15117            value: &::std::string::String,
15118        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15119            value.parse()
15120        }
15121    }
15122    impl ::std::convert::TryFrom<::std::string::String> for GasPrice {
15123        type Error = self::error::ConversionError;
15124        fn try_from(
15125            value: ::std::string::String,
15126        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15127            value.parse()
15128        }
15129    }
15130    impl<'de> ::serde::Deserialize<'de> for GasPrice {
15131        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15132        where
15133            D: ::serde::Deserializer<'de>,
15134        {
15135            ::std::string::String::deserialize(deserializer)?
15136                .parse()
15137                .map_err(|e: self::error::ConversionError| {
15138                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15139                })
15140        }
15141    }
15142    ///`GetEndUserUserId`
15143    ///
15144    /// <details><summary>JSON schema</summary>
15145    ///
15146    /// ```json
15147    ///{
15148    ///  "type": "string",
15149    ///  "pattern": "^[a-zA-Z0-9-]{1,100}$"
15150    ///}
15151    /// ```
15152    /// </details>
15153    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15154    #[serde(transparent)]
15155    pub struct GetEndUserUserId(::std::string::String);
15156    impl ::std::ops::Deref for GetEndUserUserId {
15157        type Target = ::std::string::String;
15158        fn deref(&self) -> &::std::string::String {
15159            &self.0
15160        }
15161    }
15162    impl ::std::convert::From<GetEndUserUserId> for ::std::string::String {
15163        fn from(value: GetEndUserUserId) -> Self {
15164            value.0
15165        }
15166    }
15167    impl ::std::convert::From<&GetEndUserUserId> for GetEndUserUserId {
15168        fn from(value: &GetEndUserUserId) -> Self {
15169            value.clone()
15170        }
15171    }
15172    impl ::std::str::FromStr for GetEndUserUserId {
15173        type Err = self::error::ConversionError;
15174        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15175            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15176                ::std::sync::LazyLock::new(|| {
15177                    ::regress::Regex::new("^[a-zA-Z0-9-]{1,100}$").unwrap()
15178                });
15179            if PATTERN.find(value).is_none() {
15180                return Err("doesn't match pattern \"^[a-zA-Z0-9-]{1,100}$\"".into());
15181            }
15182            Ok(Self(value.to_string()))
15183        }
15184    }
15185    impl ::std::convert::TryFrom<&str> for GetEndUserUserId {
15186        type Error = self::error::ConversionError;
15187        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15188            value.parse()
15189        }
15190    }
15191    impl ::std::convert::TryFrom<&::std::string::String> for GetEndUserUserId {
15192        type Error = self::error::ConversionError;
15193        fn try_from(
15194            value: &::std::string::String,
15195        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15196            value.parse()
15197        }
15198    }
15199    impl ::std::convert::TryFrom<::std::string::String> for GetEndUserUserId {
15200        type Error = self::error::ConversionError;
15201        fn try_from(
15202            value: ::std::string::String,
15203        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15204            value.parse()
15205        }
15206    }
15207    impl<'de> ::serde::Deserialize<'de> for GetEndUserUserId {
15208        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15209        where
15210            D: ::serde::Deserializer<'de>,
15211        {
15212            ::std::string::String::deserialize(deserializer)?
15213                .parse()
15214                .map_err(|e: self::error::ConversionError| {
15215                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15216                })
15217        }
15218    }
15219    ///`GetEvmAccountAddress`
15220    ///
15221    /// <details><summary>JSON schema</summary>
15222    ///
15223    /// ```json
15224    ///{
15225    ///  "type": "string",
15226    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
15227    ///}
15228    /// ```
15229    /// </details>
15230    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15231    #[serde(transparent)]
15232    pub struct GetEvmAccountAddress(::std::string::String);
15233    impl ::std::ops::Deref for GetEvmAccountAddress {
15234        type Target = ::std::string::String;
15235        fn deref(&self) -> &::std::string::String {
15236            &self.0
15237        }
15238    }
15239    impl ::std::convert::From<GetEvmAccountAddress> for ::std::string::String {
15240        fn from(value: GetEvmAccountAddress) -> Self {
15241            value.0
15242        }
15243    }
15244    impl ::std::convert::From<&GetEvmAccountAddress> for GetEvmAccountAddress {
15245        fn from(value: &GetEvmAccountAddress) -> Self {
15246            value.clone()
15247        }
15248    }
15249    impl ::std::str::FromStr for GetEvmAccountAddress {
15250        type Err = self::error::ConversionError;
15251        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15252            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15253                ::std::sync::LazyLock::new(|| {
15254                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
15255                });
15256            if PATTERN.find(value).is_none() {
15257                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
15258            }
15259            Ok(Self(value.to_string()))
15260        }
15261    }
15262    impl ::std::convert::TryFrom<&str> for GetEvmAccountAddress {
15263        type Error = self::error::ConversionError;
15264        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15265            value.parse()
15266        }
15267    }
15268    impl ::std::convert::TryFrom<&::std::string::String> for GetEvmAccountAddress {
15269        type Error = self::error::ConversionError;
15270        fn try_from(
15271            value: &::std::string::String,
15272        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15273            value.parse()
15274        }
15275    }
15276    impl ::std::convert::TryFrom<::std::string::String> for GetEvmAccountAddress {
15277        type Error = self::error::ConversionError;
15278        fn try_from(
15279            value: ::std::string::String,
15280        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15281            value.parse()
15282        }
15283    }
15284    impl<'de> ::serde::Deserialize<'de> for GetEvmAccountAddress {
15285        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15286        where
15287            D: ::serde::Deserializer<'de>,
15288        {
15289            ::std::string::String::deserialize(deserializer)?
15290                .parse()
15291                .map_err(|e: self::error::ConversionError| {
15292                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15293                })
15294        }
15295    }
15296    ///`GetEvmSmartAccountAddress`
15297    ///
15298    /// <details><summary>JSON schema</summary>
15299    ///
15300    /// ```json
15301    ///{
15302    ///  "type": "string",
15303    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
15304    ///}
15305    /// ```
15306    /// </details>
15307    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15308    #[serde(transparent)]
15309    pub struct GetEvmSmartAccountAddress(::std::string::String);
15310    impl ::std::ops::Deref for GetEvmSmartAccountAddress {
15311        type Target = ::std::string::String;
15312        fn deref(&self) -> &::std::string::String {
15313            &self.0
15314        }
15315    }
15316    impl ::std::convert::From<GetEvmSmartAccountAddress> for ::std::string::String {
15317        fn from(value: GetEvmSmartAccountAddress) -> Self {
15318            value.0
15319        }
15320    }
15321    impl ::std::convert::From<&GetEvmSmartAccountAddress> for GetEvmSmartAccountAddress {
15322        fn from(value: &GetEvmSmartAccountAddress) -> Self {
15323            value.clone()
15324        }
15325    }
15326    impl ::std::str::FromStr for GetEvmSmartAccountAddress {
15327        type Err = self::error::ConversionError;
15328        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15329            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15330                ::std::sync::LazyLock::new(|| {
15331                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
15332                });
15333            if PATTERN.find(value).is_none() {
15334                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
15335            }
15336            Ok(Self(value.to_string()))
15337        }
15338    }
15339    impl ::std::convert::TryFrom<&str> for GetEvmSmartAccountAddress {
15340        type Error = self::error::ConversionError;
15341        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15342            value.parse()
15343        }
15344    }
15345    impl ::std::convert::TryFrom<&::std::string::String> for GetEvmSmartAccountAddress {
15346        type Error = self::error::ConversionError;
15347        fn try_from(
15348            value: &::std::string::String,
15349        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15350            value.parse()
15351        }
15352    }
15353    impl ::std::convert::TryFrom<::std::string::String> for GetEvmSmartAccountAddress {
15354        type Error = self::error::ConversionError;
15355        fn try_from(
15356            value: ::std::string::String,
15357        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15358            value.parse()
15359        }
15360    }
15361    impl<'de> ::serde::Deserialize<'de> for GetEvmSmartAccountAddress {
15362        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15363        where
15364            D: ::serde::Deserializer<'de>,
15365        {
15366            ::std::string::String::deserialize(deserializer)?
15367                .parse()
15368                .map_err(|e: self::error::ConversionError| {
15369                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15370                })
15371        }
15372    }
15373    ///`GetOnrampOrderByIdResponse`
15374    ///
15375    /// <details><summary>JSON schema</summary>
15376    ///
15377    /// ```json
15378    ///{
15379    ///  "type": "object",
15380    ///  "required": [
15381    ///    "order"
15382    ///  ],
15383    ///  "properties": {
15384    ///    "order": {
15385    ///      "$ref": "#/components/schemas/OnrampOrder"
15386    ///    }
15387    ///  }
15388    ///}
15389    /// ```
15390    /// </details>
15391    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15392    pub struct GetOnrampOrderByIdResponse {
15393        pub order: OnrampOrder,
15394    }
15395    impl ::std::convert::From<&GetOnrampOrderByIdResponse> for GetOnrampOrderByIdResponse {
15396        fn from(value: &GetOnrampOrderByIdResponse) -> Self {
15397            value.clone()
15398        }
15399    }
15400    impl GetOnrampOrderByIdResponse {
15401        pub fn builder() -> builder::GetOnrampOrderByIdResponse {
15402            Default::default()
15403        }
15404    }
15405    ///`GetPolicyByIdPolicyId`
15406    ///
15407    /// <details><summary>JSON schema</summary>
15408    ///
15409    /// ```json
15410    ///{
15411    ///  "type": "string",
15412    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
15413    ///}
15414    /// ```
15415    /// </details>
15416    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15417    #[serde(transparent)]
15418    pub struct GetPolicyByIdPolicyId(::std::string::String);
15419    impl ::std::ops::Deref for GetPolicyByIdPolicyId {
15420        type Target = ::std::string::String;
15421        fn deref(&self) -> &::std::string::String {
15422            &self.0
15423        }
15424    }
15425    impl ::std::convert::From<GetPolicyByIdPolicyId> for ::std::string::String {
15426        fn from(value: GetPolicyByIdPolicyId) -> Self {
15427            value.0
15428        }
15429    }
15430    impl ::std::convert::From<&GetPolicyByIdPolicyId> for GetPolicyByIdPolicyId {
15431        fn from(value: &GetPolicyByIdPolicyId) -> Self {
15432            value.clone()
15433        }
15434    }
15435    impl ::std::str::FromStr for GetPolicyByIdPolicyId {
15436        type Err = self::error::ConversionError;
15437        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15438            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
15439                || {
15440                    ::regress::Regex::new(
15441                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
15442                    )
15443                    .unwrap()
15444                },
15445            );
15446            if PATTERN.find(value).is_none() {
15447                return Err(
15448                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
15449                        .into(),
15450                );
15451            }
15452            Ok(Self(value.to_string()))
15453        }
15454    }
15455    impl ::std::convert::TryFrom<&str> for GetPolicyByIdPolicyId {
15456        type Error = self::error::ConversionError;
15457        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15458            value.parse()
15459        }
15460    }
15461    impl ::std::convert::TryFrom<&::std::string::String> for GetPolicyByIdPolicyId {
15462        type Error = self::error::ConversionError;
15463        fn try_from(
15464            value: &::std::string::String,
15465        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15466            value.parse()
15467        }
15468    }
15469    impl ::std::convert::TryFrom<::std::string::String> for GetPolicyByIdPolicyId {
15470        type Error = self::error::ConversionError;
15471        fn try_from(
15472            value: ::std::string::String,
15473        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15474            value.parse()
15475        }
15476    }
15477    impl<'de> ::serde::Deserialize<'de> for GetPolicyByIdPolicyId {
15478        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15479        where
15480            D: ::serde::Deserializer<'de>,
15481        {
15482            ::std::string::String::deserialize(deserializer)?
15483                .parse()
15484                .map_err(|e: self::error::ConversionError| {
15485                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15486                })
15487        }
15488    }
15489    ///`GetSolanaAccountAddress`
15490    ///
15491    /// <details><summary>JSON schema</summary>
15492    ///
15493    /// ```json
15494    ///{
15495    ///  "type": "string",
15496    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
15497    ///}
15498    /// ```
15499    /// </details>
15500    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15501    #[serde(transparent)]
15502    pub struct GetSolanaAccountAddress(::std::string::String);
15503    impl ::std::ops::Deref for GetSolanaAccountAddress {
15504        type Target = ::std::string::String;
15505        fn deref(&self) -> &::std::string::String {
15506            &self.0
15507        }
15508    }
15509    impl ::std::convert::From<GetSolanaAccountAddress> for ::std::string::String {
15510        fn from(value: GetSolanaAccountAddress) -> Self {
15511            value.0
15512        }
15513    }
15514    impl ::std::convert::From<&GetSolanaAccountAddress> for GetSolanaAccountAddress {
15515        fn from(value: &GetSolanaAccountAddress) -> Self {
15516            value.clone()
15517        }
15518    }
15519    impl ::std::str::FromStr for GetSolanaAccountAddress {
15520        type Err = self::error::ConversionError;
15521        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15522            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15523                ::std::sync::LazyLock::new(|| {
15524                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
15525                });
15526            if PATTERN.find(value).is_none() {
15527                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
15528            }
15529            Ok(Self(value.to_string()))
15530        }
15531    }
15532    impl ::std::convert::TryFrom<&str> for GetSolanaAccountAddress {
15533        type Error = self::error::ConversionError;
15534        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15535            value.parse()
15536        }
15537    }
15538    impl ::std::convert::TryFrom<&::std::string::String> for GetSolanaAccountAddress {
15539        type Error = self::error::ConversionError;
15540        fn try_from(
15541            value: &::std::string::String,
15542        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15543            value.parse()
15544        }
15545    }
15546    impl ::std::convert::TryFrom<::std::string::String> for GetSolanaAccountAddress {
15547        type Error = self::error::ConversionError;
15548        fn try_from(
15549            value: ::std::string::String,
15550        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15551            value.parse()
15552        }
15553    }
15554    impl<'de> ::serde::Deserialize<'de> for GetSolanaAccountAddress {
15555        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15556        where
15557            D: ::serde::Deserializer<'de>,
15558        {
15559            ::std::string::String::deserialize(deserializer)?
15560                .parse()
15561                .map_err(|e: self::error::ConversionError| {
15562                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15563                })
15564        }
15565    }
15566    ///`GetSwapPriceResponse`
15567    ///
15568    /// <details><summary>JSON schema</summary>
15569    ///
15570    /// ```json
15571    ///{
15572    ///  "title": "GetSwapPriceResponse",
15573    ///  "allOf": [
15574    ///    {
15575    ///      "$ref": "#/components/schemas/CommonSwapResponse"
15576    ///    },
15577    ///    {
15578    ///      "type": "object",
15579    ///      "required": [
15580    ///        "gas",
15581    ///        "gasPrice"
15582    ///      ],
15583    ///      "properties": {
15584    ///        "gas": {
15585    ///          "description": "The estimated gas limit that should be used to send the transaction to guarantee settlement.",
15586    ///          "examples": [
15587    ///            "100000"
15588    ///          ],
15589    ///          "type": [
15590    ///            "string",
15591    ///            "null"
15592    ///          ],
15593    ///          "pattern": "^\\d+$"
15594    ///        },
15595    ///        "gasPrice": {
15596    ///          "description": "The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.",
15597    ///          "examples": [
15598    ///            "1000000000"
15599    ///          ],
15600    ///          "type": "string",
15601    ///          "pattern": "^\\d+$"
15602    ///        }
15603    ///      }
15604    ///    }
15605    ///  ]
15606    ///}
15607    /// ```
15608    /// </details>
15609    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15610    pub struct GetSwapPriceResponse {
15611        ///The block number at which the liquidity conditions were examined.
15612        #[serde(rename = "blockNumber")]
15613        pub block_number: GetSwapPriceResponseBlockNumber,
15614        pub fees: GetSwapPriceResponseFees,
15615        ///The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
15616        #[serde(rename = "fromAmount")]
15617        pub from_amount: GetSwapPriceResponseFromAmount,
15618        ///The 0x-prefixed contract address of the token that will be sent.
15619        #[serde(rename = "fromToken")]
15620        pub from_token: GetSwapPriceResponseFromToken,
15621        ///The estimated gas limit that should be used to send the transaction to guarantee settlement.
15622        pub gas: ::std::option::Option<GetSwapPriceResponseGas>,
15623        ///The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.
15624        #[serde(rename = "gasPrice")]
15625        pub gas_price: GetSwapPriceResponseGasPrice,
15626        pub issues: GetSwapPriceResponseIssues,
15627        ///Whether sufficient liquidity is available to settle the swap. All other fields in the response will be empty if this is false.
15628        #[serde(rename = "liquidityAvailable")]
15629        pub liquidity_available: bool,
15630        ///The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.
15631        #[serde(rename = "minToAmount")]
15632        pub min_to_amount: GetSwapPriceResponseMinToAmount,
15633        ///The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.
15634        #[serde(rename = "toAmount")]
15635        pub to_amount: GetSwapPriceResponseToAmount,
15636        ///The 0x-prefixed contract address of the token that will be received.
15637        #[serde(rename = "toToken")]
15638        pub to_token: GetSwapPriceResponseToToken,
15639    }
15640    impl ::std::convert::From<&GetSwapPriceResponse> for GetSwapPriceResponse {
15641        fn from(value: &GetSwapPriceResponse) -> Self {
15642            value.clone()
15643        }
15644    }
15645    impl GetSwapPriceResponse {
15646        pub fn builder() -> builder::GetSwapPriceResponse {
15647            Default::default()
15648        }
15649    }
15650    ///The block number at which the liquidity conditions were examined.
15651    ///
15652    /// <details><summary>JSON schema</summary>
15653    ///
15654    /// ```json
15655    ///{
15656    ///  "description": "The block number at which the liquidity conditions were examined.",
15657    ///  "examples": [
15658    ///    "17038723"
15659    ///  ],
15660    ///  "type": "string",
15661    ///  "pattern": "^[1-9]\\d*$"
15662    ///}
15663    /// ```
15664    /// </details>
15665    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15666    #[serde(transparent)]
15667    pub struct GetSwapPriceResponseBlockNumber(::std::string::String);
15668    impl ::std::ops::Deref for GetSwapPriceResponseBlockNumber {
15669        type Target = ::std::string::String;
15670        fn deref(&self) -> &::std::string::String {
15671            &self.0
15672        }
15673    }
15674    impl ::std::convert::From<GetSwapPriceResponseBlockNumber> for ::std::string::String {
15675        fn from(value: GetSwapPriceResponseBlockNumber) -> Self {
15676            value.0
15677        }
15678    }
15679    impl ::std::convert::From<&GetSwapPriceResponseBlockNumber> for GetSwapPriceResponseBlockNumber {
15680        fn from(value: &GetSwapPriceResponseBlockNumber) -> Self {
15681            value.clone()
15682        }
15683    }
15684    impl ::std::str::FromStr for GetSwapPriceResponseBlockNumber {
15685        type Err = self::error::ConversionError;
15686        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15687            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15688                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[1-9]\\d*$").unwrap());
15689            if PATTERN.find(value).is_none() {
15690                return Err("doesn't match pattern \"^[1-9]\\d*$\"".into());
15691            }
15692            Ok(Self(value.to_string()))
15693        }
15694    }
15695    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseBlockNumber {
15696        type Error = self::error::ConversionError;
15697        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15698            value.parse()
15699        }
15700    }
15701    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseBlockNumber {
15702        type Error = self::error::ConversionError;
15703        fn try_from(
15704            value: &::std::string::String,
15705        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15706            value.parse()
15707        }
15708    }
15709    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseBlockNumber {
15710        type Error = self::error::ConversionError;
15711        fn try_from(
15712            value: ::std::string::String,
15713        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15714            value.parse()
15715        }
15716    }
15717    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseBlockNumber {
15718        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15719        where
15720            D: ::serde::Deserializer<'de>,
15721        {
15722            ::std::string::String::deserialize(deserializer)?
15723                .parse()
15724                .map_err(|e: self::error::ConversionError| {
15725                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15726                })
15727        }
15728    }
15729    ///The estimated fees for the swap.
15730    ///
15731    /// <details><summary>JSON schema</summary>
15732    ///
15733    /// ```json
15734    ///{
15735    ///  "description": "The estimated fees for the swap.",
15736    ///  "examples": [
15737    ///    {
15738    ///      "gasFee": {
15739    ///        "amount": "1000000000000000000",
15740    ///        "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
15741    ///      },
15742    ///      "protocolFee": {
15743    ///        "amount": "1000000000000000000",
15744    ///        "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
15745    ///      }
15746    ///    }
15747    ///  ],
15748    ///  "type": "object",
15749    ///  "required": [
15750    ///    "gasFee",
15751    ///    "protocolFee"
15752    ///  ],
15753    ///  "properties": {
15754    ///    "gasFee": {
15755    ///      "description": "The estimated gas fee for the swap.",
15756    ///      "type": [
15757    ///        "object",
15758    ///        "null"
15759    ///      ],
15760    ///      "allOf": [
15761    ///        {
15762    ///          "$ref": "#/components/schemas/TokenFee"
15763    ///        }
15764    ///      ]
15765    ///    },
15766    ///    "protocolFee": {
15767    ///      "description": "The estimated protocol fee for the swap.",
15768    ///      "type": [
15769    ///        "object",
15770    ///        "null"
15771    ///      ],
15772    ///      "allOf": [
15773    ///        {
15774    ///          "$ref": "#/components/schemas/TokenFee"
15775    ///        }
15776    ///      ]
15777    ///    }
15778    ///  }
15779    ///}
15780    /// ```
15781    /// </details>
15782    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
15783    pub struct GetSwapPriceResponseFees {
15784        ///The estimated gas fee for the swap.
15785        #[serde(rename = "gasFee")]
15786        pub gas_fee: ::std::option::Option<TokenFee>,
15787        ///The estimated protocol fee for the swap.
15788        #[serde(rename = "protocolFee")]
15789        pub protocol_fee: ::std::option::Option<TokenFee>,
15790    }
15791    impl ::std::convert::From<&GetSwapPriceResponseFees> for GetSwapPriceResponseFees {
15792        fn from(value: &GetSwapPriceResponseFees) -> Self {
15793            value.clone()
15794        }
15795    }
15796    impl GetSwapPriceResponseFees {
15797        pub fn builder() -> builder::GetSwapPriceResponseFees {
15798            Default::default()
15799        }
15800    }
15801    ///The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.
15802    ///
15803    /// <details><summary>JSON schema</summary>
15804    ///
15805    /// ```json
15806    ///{
15807    ///  "description": "The amount of the `fromToken` that will be sent in this swap, in atomic units of the `fromToken`. For example, `1000000000000000000` when sending ETH equates to 1 ETH, `1000000` when sending USDC equates to 1 USDC, etc.",
15808    ///  "examples": [
15809    ///    "1000000000000000000"
15810    ///  ],
15811    ///  "type": "string",
15812    ///  "pattern": "^(0|[1-9]\\d*)$"
15813    ///}
15814    /// ```
15815    /// </details>
15816    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15817    #[serde(transparent)]
15818    pub struct GetSwapPriceResponseFromAmount(::std::string::String);
15819    impl ::std::ops::Deref for GetSwapPriceResponseFromAmount {
15820        type Target = ::std::string::String;
15821        fn deref(&self) -> &::std::string::String {
15822            &self.0
15823        }
15824    }
15825    impl ::std::convert::From<GetSwapPriceResponseFromAmount> for ::std::string::String {
15826        fn from(value: GetSwapPriceResponseFromAmount) -> Self {
15827            value.0
15828        }
15829    }
15830    impl ::std::convert::From<&GetSwapPriceResponseFromAmount> for GetSwapPriceResponseFromAmount {
15831        fn from(value: &GetSwapPriceResponseFromAmount) -> Self {
15832            value.clone()
15833        }
15834    }
15835    impl ::std::str::FromStr for GetSwapPriceResponseFromAmount {
15836        type Err = self::error::ConversionError;
15837        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15838            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15839                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
15840            if PATTERN.find(value).is_none() {
15841                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
15842            }
15843            Ok(Self(value.to_string()))
15844        }
15845    }
15846    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseFromAmount {
15847        type Error = self::error::ConversionError;
15848        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15849            value.parse()
15850        }
15851    }
15852    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseFromAmount {
15853        type Error = self::error::ConversionError;
15854        fn try_from(
15855            value: &::std::string::String,
15856        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15857            value.parse()
15858        }
15859    }
15860    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseFromAmount {
15861        type Error = self::error::ConversionError;
15862        fn try_from(
15863            value: ::std::string::String,
15864        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15865            value.parse()
15866        }
15867    }
15868    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseFromAmount {
15869        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15870        where
15871            D: ::serde::Deserializer<'de>,
15872        {
15873            ::std::string::String::deserialize(deserializer)?
15874                .parse()
15875                .map_err(|e: self::error::ConversionError| {
15876                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15877                })
15878        }
15879    }
15880    ///The 0x-prefixed contract address of the token that will be sent.
15881    ///
15882    /// <details><summary>JSON schema</summary>
15883    ///
15884    /// ```json
15885    ///{
15886    ///  "description": "The 0x-prefixed contract address of the token that will be sent.",
15887    ///  "examples": [
15888    ///    "0x6B175474E89094C44Da98b954EedeAC495271d0F"
15889    ///  ],
15890    ///  "type": "string",
15891    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
15892    ///}
15893    /// ```
15894    /// </details>
15895    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15896    #[serde(transparent)]
15897    pub struct GetSwapPriceResponseFromToken(::std::string::String);
15898    impl ::std::ops::Deref for GetSwapPriceResponseFromToken {
15899        type Target = ::std::string::String;
15900        fn deref(&self) -> &::std::string::String {
15901            &self.0
15902        }
15903    }
15904    impl ::std::convert::From<GetSwapPriceResponseFromToken> for ::std::string::String {
15905        fn from(value: GetSwapPriceResponseFromToken) -> Self {
15906            value.0
15907        }
15908    }
15909    impl ::std::convert::From<&GetSwapPriceResponseFromToken> for GetSwapPriceResponseFromToken {
15910        fn from(value: &GetSwapPriceResponseFromToken) -> Self {
15911            value.clone()
15912        }
15913    }
15914    impl ::std::str::FromStr for GetSwapPriceResponseFromToken {
15915        type Err = self::error::ConversionError;
15916        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15917            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15918                ::std::sync::LazyLock::new(|| {
15919                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
15920                });
15921            if PATTERN.find(value).is_none() {
15922                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
15923            }
15924            Ok(Self(value.to_string()))
15925        }
15926    }
15927    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseFromToken {
15928        type Error = self::error::ConversionError;
15929        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15930            value.parse()
15931        }
15932    }
15933    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseFromToken {
15934        type Error = self::error::ConversionError;
15935        fn try_from(
15936            value: &::std::string::String,
15937        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15938            value.parse()
15939        }
15940    }
15941    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseFromToken {
15942        type Error = self::error::ConversionError;
15943        fn try_from(
15944            value: ::std::string::String,
15945        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15946            value.parse()
15947        }
15948    }
15949    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseFromToken {
15950        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
15951        where
15952            D: ::serde::Deserializer<'de>,
15953        {
15954            ::std::string::String::deserialize(deserializer)?
15955                .parse()
15956                .map_err(|e: self::error::ConversionError| {
15957                    <D::Error as ::serde::de::Error>::custom(e.to_string())
15958                })
15959        }
15960    }
15961    ///The estimated gas limit that should be used to send the transaction to guarantee settlement.
15962    ///
15963    /// <details><summary>JSON schema</summary>
15964    ///
15965    /// ```json
15966    ///{
15967    ///  "description": "The estimated gas limit that should be used to send the transaction to guarantee settlement.",
15968    ///  "examples": [
15969    ///    "100000"
15970    ///  ],
15971    ///  "type": "string",
15972    ///  "pattern": "^\\d+$"
15973    ///}
15974    /// ```
15975    /// </details>
15976    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15977    #[serde(transparent)]
15978    pub struct GetSwapPriceResponseGas(::std::string::String);
15979    impl ::std::ops::Deref for GetSwapPriceResponseGas {
15980        type Target = ::std::string::String;
15981        fn deref(&self) -> &::std::string::String {
15982            &self.0
15983        }
15984    }
15985    impl ::std::convert::From<GetSwapPriceResponseGas> for ::std::string::String {
15986        fn from(value: GetSwapPriceResponseGas) -> Self {
15987            value.0
15988        }
15989    }
15990    impl ::std::convert::From<&GetSwapPriceResponseGas> for GetSwapPriceResponseGas {
15991        fn from(value: &GetSwapPriceResponseGas) -> Self {
15992            value.clone()
15993        }
15994    }
15995    impl ::std::str::FromStr for GetSwapPriceResponseGas {
15996        type Err = self::error::ConversionError;
15997        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15998            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
15999                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
16000            if PATTERN.find(value).is_none() {
16001                return Err("doesn't match pattern \"^\\d+$\"".into());
16002            }
16003            Ok(Self(value.to_string()))
16004        }
16005    }
16006    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseGas {
16007        type Error = self::error::ConversionError;
16008        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16009            value.parse()
16010        }
16011    }
16012    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseGas {
16013        type Error = self::error::ConversionError;
16014        fn try_from(
16015            value: &::std::string::String,
16016        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16017            value.parse()
16018        }
16019    }
16020    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseGas {
16021        type Error = self::error::ConversionError;
16022        fn try_from(
16023            value: ::std::string::String,
16024        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16025            value.parse()
16026        }
16027    }
16028    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseGas {
16029        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16030        where
16031            D: ::serde::Deserializer<'de>,
16032        {
16033            ::std::string::String::deserialize(deserializer)?
16034                .parse()
16035                .map_err(|e: self::error::ConversionError| {
16036                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16037                })
16038        }
16039    }
16040    ///The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.
16041    ///
16042    /// <details><summary>JSON schema</summary>
16043    ///
16044    /// ```json
16045    ///{
16046    ///  "description": "The gas price, in Wei, that should be used to send the transaction. For EIP-1559 transactions, this value should be seen as the `maxFeePerGas` value. The transaction should be sent with this gas price to guarantee settlement.",
16047    ///  "examples": [
16048    ///    "1000000000"
16049    ///  ],
16050    ///  "type": "string",
16051    ///  "pattern": "^\\d+$"
16052    ///}
16053    /// ```
16054    /// </details>
16055    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16056    #[serde(transparent)]
16057    pub struct GetSwapPriceResponseGasPrice(::std::string::String);
16058    impl ::std::ops::Deref for GetSwapPriceResponseGasPrice {
16059        type Target = ::std::string::String;
16060        fn deref(&self) -> &::std::string::String {
16061            &self.0
16062        }
16063    }
16064    impl ::std::convert::From<GetSwapPriceResponseGasPrice> for ::std::string::String {
16065        fn from(value: GetSwapPriceResponseGasPrice) -> Self {
16066            value.0
16067        }
16068    }
16069    impl ::std::convert::From<&GetSwapPriceResponseGasPrice> for GetSwapPriceResponseGasPrice {
16070        fn from(value: &GetSwapPriceResponseGasPrice) -> Self {
16071            value.clone()
16072        }
16073    }
16074    impl ::std::str::FromStr for GetSwapPriceResponseGasPrice {
16075        type Err = self::error::ConversionError;
16076        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16077            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
16078                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
16079            if PATTERN.find(value).is_none() {
16080                return Err("doesn't match pattern \"^\\d+$\"".into());
16081            }
16082            Ok(Self(value.to_string()))
16083        }
16084    }
16085    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseGasPrice {
16086        type Error = self::error::ConversionError;
16087        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16088            value.parse()
16089        }
16090    }
16091    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseGasPrice {
16092        type Error = self::error::ConversionError;
16093        fn try_from(
16094            value: &::std::string::String,
16095        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16096            value.parse()
16097        }
16098    }
16099    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseGasPrice {
16100        type Error = self::error::ConversionError;
16101        fn try_from(
16102            value: ::std::string::String,
16103        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16104            value.parse()
16105        }
16106    }
16107    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseGasPrice {
16108        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16109        where
16110            D: ::serde::Deserializer<'de>,
16111        {
16112            ::std::string::String::deserialize(deserializer)?
16113                .parse()
16114                .map_err(|e: self::error::ConversionError| {
16115                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16116                })
16117        }
16118    }
16119    ///An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.
16120    ///
16121    /// <details><summary>JSON schema</summary>
16122    ///
16123    /// ```json
16124    ///{
16125    ///  "description": "An object containing potential issues discovered during validation that could prevent the swap from being executed successfully.",
16126    ///  "examples": [
16127    ///    {
16128    ///      "allowance": {
16129    ///        "currentAllowance": "1000000000",
16130    ///        "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
16131    ///      },
16132    ///      "balance": {
16133    ///        "currentBalance": "900000000000000000",
16134    ///        "requiredBalance": "1000000000000000000",
16135    ///        "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
16136    ///      },
16137    ///      "simulationIncomplete": false
16138    ///    }
16139    ///  ],
16140    ///  "type": "object",
16141    ///  "required": [
16142    ///    "allowance",
16143    ///    "balance",
16144    ///    "simulationIncomplete"
16145    ///  ],
16146    ///  "properties": {
16147    ///    "allowance": {
16148    ///      "description": "Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.",
16149    ///      "examples": [
16150    ///        {
16151    ///          "currentAllowance": "1000000000",
16152    ///          "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
16153    ///        }
16154    ///      ],
16155    ///      "type": [
16156    ///        "object",
16157    ///        "null"
16158    ///      ],
16159    ///      "required": [
16160    ///        "currentAllowance",
16161    ///        "spender"
16162    ///      ],
16163    ///      "properties": {
16164    ///        "currentAllowance": {
16165    ///          "description": "The current allowance of the `fromToken` by the `taker`.",
16166    ///          "examples": [
16167    ///            "1000000000"
16168    ///          ],
16169    ///          "type": "string",
16170    ///          "pattern": "^\\d+$"
16171    ///        },
16172    ///        "spender": {
16173    ///          "description": "The 0x-prefixed address of to set the allowance on.",
16174    ///          "examples": [
16175    ///            "0x000000000022D473030F116dDEE9F6B43aC78BA3"
16176    ///          ],
16177    ///          "type": "string",
16178    ///          "pattern": "^0x[a-fA-F0-9]{40}$"
16179    ///        }
16180    ///      }
16181    ///    },
16182    ///    "balance": {
16183    ///      "description": "Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.",
16184    ///      "examples": [
16185    ///        {
16186    ///          "currentBalance": "1000000000000000000",
16187    ///          "requiredBalance": "1000000000000000000",
16188    ///          "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
16189    ///        }
16190    ///      ],
16191    ///      "type": [
16192    ///        "object",
16193    ///        "null"
16194    ///      ],
16195    ///      "required": [
16196    ///        "currentBalance",
16197    ///        "requiredBalance",
16198    ///        "token"
16199    ///      ],
16200    ///      "properties": {
16201    ///        "currentBalance": {
16202    ///          "description": "The current balance of the `fromToken` by the `taker`.",
16203    ///          "examples": [
16204    ///            "10000000"
16205    ///          ],
16206    ///          "type": "string",
16207    ///          "pattern": "^\\d+$"
16208    ///        },
16209    ///        "requiredBalance": {
16210    ///          "description": "The amount of the token that the `taker` must hold.",
16211    ///          "examples": [
16212    ///            "1000000000000000000"
16213    ///          ],
16214    ///          "type": "string",
16215    ///          "pattern": "^\\d+$"
16216    ///        },
16217    ///        "token": {
16218    ///          "description": "The 0x-prefixed contract address of the token.",
16219    ///          "type": "string",
16220    ///          "pattern": "^0x[a-fA-F0-9]{40}$"
16221    ///        }
16222    ///      }
16223    ///    },
16224    ///    "simulationIncomplete": {
16225    ///      "description": "This is set to true when the transaction cannot be validated. This can happen when the taker has an insufficient balance of the `fromToken`. Note that this does not necessarily mean that the trade will revert.",
16226    ///      "examples": [
16227    ///        false
16228    ///      ],
16229    ///      "type": "boolean"
16230    ///    }
16231    ///  }
16232    ///}
16233    /// ```
16234    /// </details>
16235    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16236    pub struct GetSwapPriceResponseIssues {
16237        ///Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.
16238        pub allowance: ::std::option::Option<GetSwapPriceResponseIssuesAllowance>,
16239        ///Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.
16240        pub balance: ::std::option::Option<GetSwapPriceResponseIssuesBalance>,
16241        ///This is set to true when the transaction cannot be validated. This can happen when the taker has an insufficient balance of the `fromToken`. Note that this does not necessarily mean that the trade will revert.
16242        #[serde(rename = "simulationIncomplete")]
16243        pub simulation_incomplete: bool,
16244    }
16245    impl ::std::convert::From<&GetSwapPriceResponseIssues> for GetSwapPriceResponseIssues {
16246        fn from(value: &GetSwapPriceResponseIssues) -> Self {
16247            value.clone()
16248        }
16249    }
16250    impl GetSwapPriceResponseIssues {
16251        pub fn builder() -> builder::GetSwapPriceResponseIssues {
16252            Default::default()
16253        }
16254    }
16255    ///Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.
16256    ///
16257    /// <details><summary>JSON schema</summary>
16258    ///
16259    /// ```json
16260    ///{
16261    ///  "description": "Details of the allowances that the taker must set in order to execute the swap successfully. Null if no allowance is required.",
16262    ///  "examples": [
16263    ///    {
16264    ///      "currentAllowance": "1000000000",
16265    ///      "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
16266    ///    }
16267    ///  ],
16268    ///  "type": "object",
16269    ///  "required": [
16270    ///    "currentAllowance",
16271    ///    "spender"
16272    ///  ],
16273    ///  "properties": {
16274    ///    "currentAllowance": {
16275    ///      "description": "The current allowance of the `fromToken` by the `taker`.",
16276    ///      "examples": [
16277    ///        "1000000000"
16278    ///      ],
16279    ///      "type": "string",
16280    ///      "pattern": "^\\d+$"
16281    ///    },
16282    ///    "spender": {
16283    ///      "description": "The 0x-prefixed address of to set the allowance on.",
16284    ///      "examples": [
16285    ///        "0x000000000022D473030F116dDEE9F6B43aC78BA3"
16286    ///      ],
16287    ///      "type": "string",
16288    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
16289    ///    }
16290    ///  }
16291    ///}
16292    /// ```
16293    /// </details>
16294    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16295    pub struct GetSwapPriceResponseIssuesAllowance {
16296        ///The current allowance of the `fromToken` by the `taker`.
16297        #[serde(rename = "currentAllowance")]
16298        pub current_allowance: GetSwapPriceResponseIssuesAllowanceCurrentAllowance,
16299        ///The 0x-prefixed address of to set the allowance on.
16300        pub spender: GetSwapPriceResponseIssuesAllowanceSpender,
16301    }
16302    impl ::std::convert::From<&GetSwapPriceResponseIssuesAllowance>
16303        for GetSwapPriceResponseIssuesAllowance
16304    {
16305        fn from(value: &GetSwapPriceResponseIssuesAllowance) -> Self {
16306            value.clone()
16307        }
16308    }
16309    impl GetSwapPriceResponseIssuesAllowance {
16310        pub fn builder() -> builder::GetSwapPriceResponseIssuesAllowance {
16311            Default::default()
16312        }
16313    }
16314    ///The current allowance of the `fromToken` by the `taker`.
16315    ///
16316    /// <details><summary>JSON schema</summary>
16317    ///
16318    /// ```json
16319    ///{
16320    ///  "description": "The current allowance of the `fromToken` by the `taker`.",
16321    ///  "examples": [
16322    ///    "1000000000"
16323    ///  ],
16324    ///  "type": "string",
16325    ///  "pattern": "^\\d+$"
16326    ///}
16327    /// ```
16328    /// </details>
16329    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16330    #[serde(transparent)]
16331    pub struct GetSwapPriceResponseIssuesAllowanceCurrentAllowance(::std::string::String);
16332    impl ::std::ops::Deref for GetSwapPriceResponseIssuesAllowanceCurrentAllowance {
16333        type Target = ::std::string::String;
16334        fn deref(&self) -> &::std::string::String {
16335            &self.0
16336        }
16337    }
16338    impl ::std::convert::From<GetSwapPriceResponseIssuesAllowanceCurrentAllowance>
16339        for ::std::string::String
16340    {
16341        fn from(value: GetSwapPriceResponseIssuesAllowanceCurrentAllowance) -> Self {
16342            value.0
16343        }
16344    }
16345    impl ::std::convert::From<&GetSwapPriceResponseIssuesAllowanceCurrentAllowance>
16346        for GetSwapPriceResponseIssuesAllowanceCurrentAllowance
16347    {
16348        fn from(value: &GetSwapPriceResponseIssuesAllowanceCurrentAllowance) -> Self {
16349            value.clone()
16350        }
16351    }
16352    impl ::std::str::FromStr for GetSwapPriceResponseIssuesAllowanceCurrentAllowance {
16353        type Err = self::error::ConversionError;
16354        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16355            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
16356                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
16357            if PATTERN.find(value).is_none() {
16358                return Err("doesn't match pattern \"^\\d+$\"".into());
16359            }
16360            Ok(Self(value.to_string()))
16361        }
16362    }
16363    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseIssuesAllowanceCurrentAllowance {
16364        type Error = self::error::ConversionError;
16365        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16366            value.parse()
16367        }
16368    }
16369    impl ::std::convert::TryFrom<&::std::string::String>
16370        for GetSwapPriceResponseIssuesAllowanceCurrentAllowance
16371    {
16372        type Error = self::error::ConversionError;
16373        fn try_from(
16374            value: &::std::string::String,
16375        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16376            value.parse()
16377        }
16378    }
16379    impl ::std::convert::TryFrom<::std::string::String>
16380        for GetSwapPriceResponseIssuesAllowanceCurrentAllowance
16381    {
16382        type Error = self::error::ConversionError;
16383        fn try_from(
16384            value: ::std::string::String,
16385        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16386            value.parse()
16387        }
16388    }
16389    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseIssuesAllowanceCurrentAllowance {
16390        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16391        where
16392            D: ::serde::Deserializer<'de>,
16393        {
16394            ::std::string::String::deserialize(deserializer)?
16395                .parse()
16396                .map_err(|e: self::error::ConversionError| {
16397                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16398                })
16399        }
16400    }
16401    ///The 0x-prefixed address of to set the allowance on.
16402    ///
16403    /// <details><summary>JSON schema</summary>
16404    ///
16405    /// ```json
16406    ///{
16407    ///  "description": "The 0x-prefixed address of to set the allowance on.",
16408    ///  "examples": [
16409    ///    "0x000000000022D473030F116dDEE9F6B43aC78BA3"
16410    ///  ],
16411    ///  "type": "string",
16412    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
16413    ///}
16414    /// ```
16415    /// </details>
16416    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16417    #[serde(transparent)]
16418    pub struct GetSwapPriceResponseIssuesAllowanceSpender(::std::string::String);
16419    impl ::std::ops::Deref for GetSwapPriceResponseIssuesAllowanceSpender {
16420        type Target = ::std::string::String;
16421        fn deref(&self) -> &::std::string::String {
16422            &self.0
16423        }
16424    }
16425    impl ::std::convert::From<GetSwapPriceResponseIssuesAllowanceSpender> for ::std::string::String {
16426        fn from(value: GetSwapPriceResponseIssuesAllowanceSpender) -> Self {
16427            value.0
16428        }
16429    }
16430    impl ::std::convert::From<&GetSwapPriceResponseIssuesAllowanceSpender>
16431        for GetSwapPriceResponseIssuesAllowanceSpender
16432    {
16433        fn from(value: &GetSwapPriceResponseIssuesAllowanceSpender) -> Self {
16434            value.clone()
16435        }
16436    }
16437    impl ::std::str::FromStr for GetSwapPriceResponseIssuesAllowanceSpender {
16438        type Err = self::error::ConversionError;
16439        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16440            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
16441                ::std::sync::LazyLock::new(|| {
16442                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
16443                });
16444            if PATTERN.find(value).is_none() {
16445                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
16446            }
16447            Ok(Self(value.to_string()))
16448        }
16449    }
16450    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseIssuesAllowanceSpender {
16451        type Error = self::error::ConversionError;
16452        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16453            value.parse()
16454        }
16455    }
16456    impl ::std::convert::TryFrom<&::std::string::String>
16457        for GetSwapPriceResponseIssuesAllowanceSpender
16458    {
16459        type Error = self::error::ConversionError;
16460        fn try_from(
16461            value: &::std::string::String,
16462        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16463            value.parse()
16464        }
16465    }
16466    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseIssuesAllowanceSpender {
16467        type Error = self::error::ConversionError;
16468        fn try_from(
16469            value: ::std::string::String,
16470        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16471            value.parse()
16472        }
16473    }
16474    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseIssuesAllowanceSpender {
16475        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16476        where
16477            D: ::serde::Deserializer<'de>,
16478        {
16479            ::std::string::String::deserialize(deserializer)?
16480                .parse()
16481                .map_err(|e: self::error::ConversionError| {
16482                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16483                })
16484        }
16485    }
16486    ///Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.
16487    ///
16488    /// <details><summary>JSON schema</summary>
16489    ///
16490    /// ```json
16491    ///{
16492    ///  "description": "Details of the balance of the `fromToken` that the `taker` must hold. Null if the `taker` has a sufficient balance.",
16493    ///  "examples": [
16494    ///    {
16495    ///      "currentBalance": "1000000000000000000",
16496    ///      "requiredBalance": "1000000000000000000",
16497    ///      "token": "0x6B175474E89094C44Da98b954EedeAC495271d0F"
16498    ///    }
16499    ///  ],
16500    ///  "type": "object",
16501    ///  "required": [
16502    ///    "currentBalance",
16503    ///    "requiredBalance",
16504    ///    "token"
16505    ///  ],
16506    ///  "properties": {
16507    ///    "currentBalance": {
16508    ///      "description": "The current balance of the `fromToken` by the `taker`.",
16509    ///      "examples": [
16510    ///        "10000000"
16511    ///      ],
16512    ///      "type": "string",
16513    ///      "pattern": "^\\d+$"
16514    ///    },
16515    ///    "requiredBalance": {
16516    ///      "description": "The amount of the token that the `taker` must hold.",
16517    ///      "examples": [
16518    ///        "1000000000000000000"
16519    ///      ],
16520    ///      "type": "string",
16521    ///      "pattern": "^\\d+$"
16522    ///    },
16523    ///    "token": {
16524    ///      "description": "The 0x-prefixed contract address of the token.",
16525    ///      "type": "string",
16526    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
16527    ///    }
16528    ///  }
16529    ///}
16530    /// ```
16531    /// </details>
16532    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
16533    pub struct GetSwapPriceResponseIssuesBalance {
16534        ///The current balance of the `fromToken` by the `taker`.
16535        #[serde(rename = "currentBalance")]
16536        pub current_balance: GetSwapPriceResponseIssuesBalanceCurrentBalance,
16537        ///The amount of the token that the `taker` must hold.
16538        #[serde(rename = "requiredBalance")]
16539        pub required_balance: GetSwapPriceResponseIssuesBalanceRequiredBalance,
16540        ///The 0x-prefixed contract address of the token.
16541        pub token: GetSwapPriceResponseIssuesBalanceToken,
16542    }
16543    impl ::std::convert::From<&GetSwapPriceResponseIssuesBalance>
16544        for GetSwapPriceResponseIssuesBalance
16545    {
16546        fn from(value: &GetSwapPriceResponseIssuesBalance) -> Self {
16547            value.clone()
16548        }
16549    }
16550    impl GetSwapPriceResponseIssuesBalance {
16551        pub fn builder() -> builder::GetSwapPriceResponseIssuesBalance {
16552            Default::default()
16553        }
16554    }
16555    ///The current balance of the `fromToken` by the `taker`.
16556    ///
16557    /// <details><summary>JSON schema</summary>
16558    ///
16559    /// ```json
16560    ///{
16561    ///  "description": "The current balance of the `fromToken` by the `taker`.",
16562    ///  "examples": [
16563    ///    "10000000"
16564    ///  ],
16565    ///  "type": "string",
16566    ///  "pattern": "^\\d+$"
16567    ///}
16568    /// ```
16569    /// </details>
16570    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16571    #[serde(transparent)]
16572    pub struct GetSwapPriceResponseIssuesBalanceCurrentBalance(::std::string::String);
16573    impl ::std::ops::Deref for GetSwapPriceResponseIssuesBalanceCurrentBalance {
16574        type Target = ::std::string::String;
16575        fn deref(&self) -> &::std::string::String {
16576            &self.0
16577        }
16578    }
16579    impl ::std::convert::From<GetSwapPriceResponseIssuesBalanceCurrentBalance>
16580        for ::std::string::String
16581    {
16582        fn from(value: GetSwapPriceResponseIssuesBalanceCurrentBalance) -> Self {
16583            value.0
16584        }
16585    }
16586    impl ::std::convert::From<&GetSwapPriceResponseIssuesBalanceCurrentBalance>
16587        for GetSwapPriceResponseIssuesBalanceCurrentBalance
16588    {
16589        fn from(value: &GetSwapPriceResponseIssuesBalanceCurrentBalance) -> Self {
16590            value.clone()
16591        }
16592    }
16593    impl ::std::str::FromStr for GetSwapPriceResponseIssuesBalanceCurrentBalance {
16594        type Err = self::error::ConversionError;
16595        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16596            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
16597                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
16598            if PATTERN.find(value).is_none() {
16599                return Err("doesn't match pattern \"^\\d+$\"".into());
16600            }
16601            Ok(Self(value.to_string()))
16602        }
16603    }
16604    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseIssuesBalanceCurrentBalance {
16605        type Error = self::error::ConversionError;
16606        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16607            value.parse()
16608        }
16609    }
16610    impl ::std::convert::TryFrom<&::std::string::String>
16611        for GetSwapPriceResponseIssuesBalanceCurrentBalance
16612    {
16613        type Error = self::error::ConversionError;
16614        fn try_from(
16615            value: &::std::string::String,
16616        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16617            value.parse()
16618        }
16619    }
16620    impl ::std::convert::TryFrom<::std::string::String>
16621        for GetSwapPriceResponseIssuesBalanceCurrentBalance
16622    {
16623        type Error = self::error::ConversionError;
16624        fn try_from(
16625            value: ::std::string::String,
16626        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16627            value.parse()
16628        }
16629    }
16630    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseIssuesBalanceCurrentBalance {
16631        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16632        where
16633            D: ::serde::Deserializer<'de>,
16634        {
16635            ::std::string::String::deserialize(deserializer)?
16636                .parse()
16637                .map_err(|e: self::error::ConversionError| {
16638                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16639                })
16640        }
16641    }
16642    ///The amount of the token that the `taker` must hold.
16643    ///
16644    /// <details><summary>JSON schema</summary>
16645    ///
16646    /// ```json
16647    ///{
16648    ///  "description": "The amount of the token that the `taker` must hold.",
16649    ///  "examples": [
16650    ///    "1000000000000000000"
16651    ///  ],
16652    ///  "type": "string",
16653    ///  "pattern": "^\\d+$"
16654    ///}
16655    /// ```
16656    /// </details>
16657    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16658    #[serde(transparent)]
16659    pub struct GetSwapPriceResponseIssuesBalanceRequiredBalance(::std::string::String);
16660    impl ::std::ops::Deref for GetSwapPriceResponseIssuesBalanceRequiredBalance {
16661        type Target = ::std::string::String;
16662        fn deref(&self) -> &::std::string::String {
16663            &self.0
16664        }
16665    }
16666    impl ::std::convert::From<GetSwapPriceResponseIssuesBalanceRequiredBalance>
16667        for ::std::string::String
16668    {
16669        fn from(value: GetSwapPriceResponseIssuesBalanceRequiredBalance) -> Self {
16670            value.0
16671        }
16672    }
16673    impl ::std::convert::From<&GetSwapPriceResponseIssuesBalanceRequiredBalance>
16674        for GetSwapPriceResponseIssuesBalanceRequiredBalance
16675    {
16676        fn from(value: &GetSwapPriceResponseIssuesBalanceRequiredBalance) -> Self {
16677            value.clone()
16678        }
16679    }
16680    impl ::std::str::FromStr for GetSwapPriceResponseIssuesBalanceRequiredBalance {
16681        type Err = self::error::ConversionError;
16682        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16683            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
16684                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
16685            if PATTERN.find(value).is_none() {
16686                return Err("doesn't match pattern \"^\\d+$\"".into());
16687            }
16688            Ok(Self(value.to_string()))
16689        }
16690    }
16691    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseIssuesBalanceRequiredBalance {
16692        type Error = self::error::ConversionError;
16693        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16694            value.parse()
16695        }
16696    }
16697    impl ::std::convert::TryFrom<&::std::string::String>
16698        for GetSwapPriceResponseIssuesBalanceRequiredBalance
16699    {
16700        type Error = self::error::ConversionError;
16701        fn try_from(
16702            value: &::std::string::String,
16703        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16704            value.parse()
16705        }
16706    }
16707    impl ::std::convert::TryFrom<::std::string::String>
16708        for GetSwapPriceResponseIssuesBalanceRequiredBalance
16709    {
16710        type Error = self::error::ConversionError;
16711        fn try_from(
16712            value: ::std::string::String,
16713        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16714            value.parse()
16715        }
16716    }
16717    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseIssuesBalanceRequiredBalance {
16718        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16719        where
16720            D: ::serde::Deserializer<'de>,
16721        {
16722            ::std::string::String::deserialize(deserializer)?
16723                .parse()
16724                .map_err(|e: self::error::ConversionError| {
16725                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16726                })
16727        }
16728    }
16729    ///The 0x-prefixed contract address of the token.
16730    ///
16731    /// <details><summary>JSON schema</summary>
16732    ///
16733    /// ```json
16734    ///{
16735    ///  "description": "The 0x-prefixed contract address of the token.",
16736    ///  "type": "string",
16737    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
16738    ///}
16739    /// ```
16740    /// </details>
16741    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16742    #[serde(transparent)]
16743    pub struct GetSwapPriceResponseIssuesBalanceToken(::std::string::String);
16744    impl ::std::ops::Deref for GetSwapPriceResponseIssuesBalanceToken {
16745        type Target = ::std::string::String;
16746        fn deref(&self) -> &::std::string::String {
16747            &self.0
16748        }
16749    }
16750    impl ::std::convert::From<GetSwapPriceResponseIssuesBalanceToken> for ::std::string::String {
16751        fn from(value: GetSwapPriceResponseIssuesBalanceToken) -> Self {
16752            value.0
16753        }
16754    }
16755    impl ::std::convert::From<&GetSwapPriceResponseIssuesBalanceToken>
16756        for GetSwapPriceResponseIssuesBalanceToken
16757    {
16758        fn from(value: &GetSwapPriceResponseIssuesBalanceToken) -> Self {
16759            value.clone()
16760        }
16761    }
16762    impl ::std::str::FromStr for GetSwapPriceResponseIssuesBalanceToken {
16763        type Err = self::error::ConversionError;
16764        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16765            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
16766                ::std::sync::LazyLock::new(|| {
16767                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
16768                });
16769            if PATTERN.find(value).is_none() {
16770                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
16771            }
16772            Ok(Self(value.to_string()))
16773        }
16774    }
16775    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseIssuesBalanceToken {
16776        type Error = self::error::ConversionError;
16777        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16778            value.parse()
16779        }
16780    }
16781    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseIssuesBalanceToken {
16782        type Error = self::error::ConversionError;
16783        fn try_from(
16784            value: &::std::string::String,
16785        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16786            value.parse()
16787        }
16788    }
16789    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseIssuesBalanceToken {
16790        type Error = self::error::ConversionError;
16791        fn try_from(
16792            value: ::std::string::String,
16793        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16794            value.parse()
16795        }
16796    }
16797    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseIssuesBalanceToken {
16798        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16799        where
16800            D: ::serde::Deserializer<'de>,
16801        {
16802            ::std::string::String::deserialize(deserializer)?
16803                .parse()
16804                .map_err(|e: self::error::ConversionError| {
16805                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16806                })
16807        }
16808    }
16809    ///The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.
16810    ///
16811    /// <details><summary>JSON schema</summary>
16812    ///
16813    /// ```json
16814    ///{
16815    ///  "description": "The minimum amount of the `toToken` that must be received for the swap to succeed, in atomic units of the `toToken`.  For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc. This value is influenced by the `slippageBps` parameter.",
16816    ///  "examples": [
16817    ///    "900000000000000000"
16818    ///  ],
16819    ///  "type": "string",
16820    ///  "pattern": "^(0|[1-9]\\d*)$"
16821    ///}
16822    /// ```
16823    /// </details>
16824    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16825    #[serde(transparent)]
16826    pub struct GetSwapPriceResponseMinToAmount(::std::string::String);
16827    impl ::std::ops::Deref for GetSwapPriceResponseMinToAmount {
16828        type Target = ::std::string::String;
16829        fn deref(&self) -> &::std::string::String {
16830            &self.0
16831        }
16832    }
16833    impl ::std::convert::From<GetSwapPriceResponseMinToAmount> for ::std::string::String {
16834        fn from(value: GetSwapPriceResponseMinToAmount) -> Self {
16835            value.0
16836        }
16837    }
16838    impl ::std::convert::From<&GetSwapPriceResponseMinToAmount> for GetSwapPriceResponseMinToAmount {
16839        fn from(value: &GetSwapPriceResponseMinToAmount) -> Self {
16840            value.clone()
16841        }
16842    }
16843    impl ::std::str::FromStr for GetSwapPriceResponseMinToAmount {
16844        type Err = self::error::ConversionError;
16845        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16846            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
16847                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
16848            if PATTERN.find(value).is_none() {
16849                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
16850            }
16851            Ok(Self(value.to_string()))
16852        }
16853    }
16854    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseMinToAmount {
16855        type Error = self::error::ConversionError;
16856        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16857            value.parse()
16858        }
16859    }
16860    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseMinToAmount {
16861        type Error = self::error::ConversionError;
16862        fn try_from(
16863            value: &::std::string::String,
16864        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16865            value.parse()
16866        }
16867    }
16868    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseMinToAmount {
16869        type Error = self::error::ConversionError;
16870        fn try_from(
16871            value: ::std::string::String,
16872        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16873            value.parse()
16874        }
16875    }
16876    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseMinToAmount {
16877        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16878        where
16879            D: ::serde::Deserializer<'de>,
16880        {
16881            ::std::string::String::deserialize(deserializer)?
16882                .parse()
16883                .map_err(|e: self::error::ConversionError| {
16884                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16885                })
16886        }
16887    }
16888    ///The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.
16889    ///
16890    /// <details><summary>JSON schema</summary>
16891    ///
16892    /// ```json
16893    ///{
16894    ///  "description": "The amount of the `toToken` that will be received in atomic units of the `toToken`. For example, `1000000000000000000` when receiving ETH equates to 1 ETH, `1000000` when receiving USDC equates to 1 USDC, etc.",
16895    ///  "examples": [
16896    ///    "1000000000000000000"
16897    ///  ],
16898    ///  "type": "string",
16899    ///  "pattern": "^(0|[1-9]\\d*)$"
16900    ///}
16901    /// ```
16902    /// </details>
16903    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16904    #[serde(transparent)]
16905    pub struct GetSwapPriceResponseToAmount(::std::string::String);
16906    impl ::std::ops::Deref for GetSwapPriceResponseToAmount {
16907        type Target = ::std::string::String;
16908        fn deref(&self) -> &::std::string::String {
16909            &self.0
16910        }
16911    }
16912    impl ::std::convert::From<GetSwapPriceResponseToAmount> for ::std::string::String {
16913        fn from(value: GetSwapPriceResponseToAmount) -> Self {
16914            value.0
16915        }
16916    }
16917    impl ::std::convert::From<&GetSwapPriceResponseToAmount> for GetSwapPriceResponseToAmount {
16918        fn from(value: &GetSwapPriceResponseToAmount) -> Self {
16919            value.clone()
16920        }
16921    }
16922    impl ::std::str::FromStr for GetSwapPriceResponseToAmount {
16923        type Err = self::error::ConversionError;
16924        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16925            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
16926                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^(0|[1-9]\\d*)$").unwrap());
16927            if PATTERN.find(value).is_none() {
16928                return Err("doesn't match pattern \"^(0|[1-9]\\d*)$\"".into());
16929            }
16930            Ok(Self(value.to_string()))
16931        }
16932    }
16933    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseToAmount {
16934        type Error = self::error::ConversionError;
16935        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16936            value.parse()
16937        }
16938    }
16939    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseToAmount {
16940        type Error = self::error::ConversionError;
16941        fn try_from(
16942            value: &::std::string::String,
16943        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16944            value.parse()
16945        }
16946    }
16947    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseToAmount {
16948        type Error = self::error::ConversionError;
16949        fn try_from(
16950            value: ::std::string::String,
16951        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16952            value.parse()
16953        }
16954    }
16955    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseToAmount {
16956        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
16957        where
16958            D: ::serde::Deserializer<'de>,
16959        {
16960            ::std::string::String::deserialize(deserializer)?
16961                .parse()
16962                .map_err(|e: self::error::ConversionError| {
16963                    <D::Error as ::serde::de::Error>::custom(e.to_string())
16964                })
16965        }
16966    }
16967    ///The 0x-prefixed contract address of the token that will be received.
16968    ///
16969    /// <details><summary>JSON schema</summary>
16970    ///
16971    /// ```json
16972    ///{
16973    ///  "description": "The 0x-prefixed contract address of the token that will be received.",
16974    ///  "examples": [
16975    ///    "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
16976    ///  ],
16977    ///  "type": "string",
16978    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
16979    ///}
16980    /// ```
16981    /// </details>
16982    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16983    #[serde(transparent)]
16984    pub struct GetSwapPriceResponseToToken(::std::string::String);
16985    impl ::std::ops::Deref for GetSwapPriceResponseToToken {
16986        type Target = ::std::string::String;
16987        fn deref(&self) -> &::std::string::String {
16988            &self.0
16989        }
16990    }
16991    impl ::std::convert::From<GetSwapPriceResponseToToken> for ::std::string::String {
16992        fn from(value: GetSwapPriceResponseToToken) -> Self {
16993            value.0
16994        }
16995    }
16996    impl ::std::convert::From<&GetSwapPriceResponseToToken> for GetSwapPriceResponseToToken {
16997        fn from(value: &GetSwapPriceResponseToToken) -> Self {
16998            value.clone()
16999        }
17000    }
17001    impl ::std::str::FromStr for GetSwapPriceResponseToToken {
17002        type Err = self::error::ConversionError;
17003        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17004            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
17005                ::std::sync::LazyLock::new(|| {
17006                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
17007                });
17008            if PATTERN.find(value).is_none() {
17009                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
17010            }
17011            Ok(Self(value.to_string()))
17012        }
17013    }
17014    impl ::std::convert::TryFrom<&str> for GetSwapPriceResponseToToken {
17015        type Error = self::error::ConversionError;
17016        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17017            value.parse()
17018        }
17019    }
17020    impl ::std::convert::TryFrom<&::std::string::String> for GetSwapPriceResponseToToken {
17021        type Error = self::error::ConversionError;
17022        fn try_from(
17023            value: &::std::string::String,
17024        ) -> ::std::result::Result<Self, self::error::ConversionError> {
17025            value.parse()
17026        }
17027    }
17028    impl ::std::convert::TryFrom<::std::string::String> for GetSwapPriceResponseToToken {
17029        type Error = self::error::ConversionError;
17030        fn try_from(
17031            value: ::std::string::String,
17032        ) -> ::std::result::Result<Self, self::error::ConversionError> {
17033            value.parse()
17034        }
17035    }
17036    impl<'de> ::serde::Deserialize<'de> for GetSwapPriceResponseToToken {
17037        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
17038        where
17039            D: ::serde::Deserializer<'de>,
17040        {
17041            ::std::string::String::deserialize(deserializer)?
17042                .parse()
17043                .map_err(|e: self::error::ConversionError| {
17044                    <D::Error as ::serde::de::Error>::custom(e.to_string())
17045                })
17046        }
17047    }
17048    ///A wrapper for the response of a swap price operation.
17049    ///
17050    /// <details><summary>JSON schema</summary>
17051    ///
17052    /// ```json
17053    ///{
17054    ///  "description": "A wrapper for the response of a swap price operation.",
17055    ///  "oneOf": [
17056    ///    {
17057    ///      "$ref": "#/components/schemas/GetSwapPriceResponse"
17058    ///    },
17059    ///    {
17060    ///      "$ref": "#/components/schemas/SwapUnavailableResponse"
17061    ///    }
17062    ///  ]
17063    ///}
17064    /// ```
17065    /// </details>
17066    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17067    #[serde(untagged)]
17068    pub enum GetSwapPriceResponseWrapper {
17069        GetSwapPriceResponse(GetSwapPriceResponse),
17070        SwapUnavailableResponse(SwapUnavailableResponse),
17071    }
17072    impl ::std::convert::From<&Self> for GetSwapPriceResponseWrapper {
17073        fn from(value: &GetSwapPriceResponseWrapper) -> Self {
17074            value.clone()
17075        }
17076    }
17077    impl ::std::convert::From<GetSwapPriceResponse> for GetSwapPriceResponseWrapper {
17078        fn from(value: GetSwapPriceResponse) -> Self {
17079            Self::GetSwapPriceResponse(value)
17080        }
17081    }
17082    impl ::std::convert::From<SwapUnavailableResponse> for GetSwapPriceResponseWrapper {
17083        fn from(value: SwapUnavailableResponse) -> Self {
17084            Self::SwapUnavailableResponse(value)
17085        }
17086    }
17087    ///`GetUserOperationAddress`
17088    ///
17089    /// <details><summary>JSON schema</summary>
17090    ///
17091    /// ```json
17092    ///{
17093    ///  "type": "string",
17094    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
17095    ///}
17096    /// ```
17097    /// </details>
17098    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
17099    #[serde(transparent)]
17100    pub struct GetUserOperationAddress(::std::string::String);
17101    impl ::std::ops::Deref for GetUserOperationAddress {
17102        type Target = ::std::string::String;
17103        fn deref(&self) -> &::std::string::String {
17104            &self.0
17105        }
17106    }
17107    impl ::std::convert::From<GetUserOperationAddress> for ::std::string::String {
17108        fn from(value: GetUserOperationAddress) -> Self {
17109            value.0
17110        }
17111    }
17112    impl ::std::convert::From<&GetUserOperationAddress> for GetUserOperationAddress {
17113        fn from(value: &GetUserOperationAddress) -> Self {
17114            value.clone()
17115        }
17116    }
17117    impl ::std::str::FromStr for GetUserOperationAddress {
17118        type Err = self::error::ConversionError;
17119        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17120            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
17121                ::std::sync::LazyLock::new(|| {
17122                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
17123                });
17124            if PATTERN.find(value).is_none() {
17125                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
17126            }
17127            Ok(Self(value.to_string()))
17128        }
17129    }
17130    impl ::std::convert::TryFrom<&str> for GetUserOperationAddress {
17131        type Error = self::error::ConversionError;
17132        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17133            value.parse()
17134        }
17135    }
17136    impl ::std::convert::TryFrom<&::std::string::String> for GetUserOperationAddress {
17137        type Error = self::error::ConversionError;
17138        fn try_from(
17139            value: &::std::string::String,
17140        ) -> ::std::result::Result<Self, self::error::ConversionError> {
17141            value.parse()
17142        }
17143    }
17144    impl ::std::convert::TryFrom<::std::string::String> for GetUserOperationAddress {
17145        type Error = self::error::ConversionError;
17146        fn try_from(
17147            value: ::std::string::String,
17148        ) -> ::std::result::Result<Self, self::error::ConversionError> {
17149            value.parse()
17150        }
17151    }
17152    impl<'de> ::serde::Deserialize<'de> for GetUserOperationAddress {
17153        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
17154        where
17155            D: ::serde::Deserializer<'de>,
17156        {
17157            ::std::string::String::deserialize(deserializer)?
17158                .parse()
17159                .map_err(|e: self::error::ConversionError| {
17160                    <D::Error as ::serde::de::Error>::custom(e.to_string())
17161                })
17162        }
17163    }
17164    ///`GetUserOperationUserOpHash`
17165    ///
17166    /// <details><summary>JSON schema</summary>
17167    ///
17168    /// ```json
17169    ///{
17170    ///  "type": "string",
17171    ///  "pattern": "^0x[0-9a-fA-F]{64}$"
17172    ///}
17173    /// ```
17174    /// </details>
17175    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
17176    #[serde(transparent)]
17177    pub struct GetUserOperationUserOpHash(::std::string::String);
17178    impl ::std::ops::Deref for GetUserOperationUserOpHash {
17179        type Target = ::std::string::String;
17180        fn deref(&self) -> &::std::string::String {
17181            &self.0
17182        }
17183    }
17184    impl ::std::convert::From<GetUserOperationUserOpHash> for ::std::string::String {
17185        fn from(value: GetUserOperationUserOpHash) -> Self {
17186            value.0
17187        }
17188    }
17189    impl ::std::convert::From<&GetUserOperationUserOpHash> for GetUserOperationUserOpHash {
17190        fn from(value: &GetUserOperationUserOpHash) -> Self {
17191            value.clone()
17192        }
17193    }
17194    impl ::std::str::FromStr for GetUserOperationUserOpHash {
17195        type Err = self::error::ConversionError;
17196        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17197            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
17198                ::std::sync::LazyLock::new(|| {
17199                    ::regress::Regex::new("^0x[0-9a-fA-F]{64}$").unwrap()
17200                });
17201            if PATTERN.find(value).is_none() {
17202                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{64}$\"".into());
17203            }
17204            Ok(Self(value.to_string()))
17205        }
17206    }
17207    impl ::std::convert::TryFrom<&str> for GetUserOperationUserOpHash {
17208        type Error = self::error::ConversionError;
17209        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17210            value.parse()
17211        }
17212    }
17213    impl ::std::convert::TryFrom<&::std::string::String> for GetUserOperationUserOpHash {
17214        type Error = self::error::ConversionError;
17215        fn try_from(
17216            value: &::std::string::String,
17217        ) -> ::std::result::Result<Self, self::error::ConversionError> {
17218            value.parse()
17219        }
17220    }
17221    impl ::std::convert::TryFrom<::std::string::String> for GetUserOperationUserOpHash {
17222        type Error = self::error::ConversionError;
17223        fn try_from(
17224            value: ::std::string::String,
17225        ) -> ::std::result::Result<Self, self::error::ConversionError> {
17226            value.parse()
17227        }
17228    }
17229    impl<'de> ::serde::Deserialize<'de> for GetUserOperationUserOpHash {
17230        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
17231        where
17232            D: ::serde::Deserializer<'de>,
17233        {
17234            ::std::string::String::deserialize(deserializer)?
17235                .parse()
17236                .map_err(|e: self::error::ConversionError| {
17237                    <D::Error as ::serde::de::Error>::custom(e.to_string())
17238                })
17239        }
17240    }
17241    ///IDL Specification following Anchor's IDL format v0.30+.
17242    ///
17243    /// <details><summary>JSON schema</summary>
17244    ///
17245    /// ```json
17246    ///{
17247    ///  "description": "IDL Specification following Anchor's IDL format v0.30+.",
17248    ///  "type": "object",
17249    ///  "required": [
17250    ///    "address",
17251    ///    "instructions"
17252    ///  ],
17253    ///  "properties": {
17254    ///    "address": {
17255    ///      "description": "The program address.",
17256    ///      "examples": [
17257    ///        "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
17258    ///      ],
17259    ///      "type": "string"
17260    ///    },
17261    ///    "instructions": {
17262    ///      "description": "List of program instructions.",
17263    ///      "examples": [
17264    ///        [
17265    ///          {
17266    ///            "accounts": [
17267    ///              {
17268    ///                "name": "mint",
17269    ///                "writable": true
17270    ///              },
17271    ///              {
17272    ///                "name": "rent"
17273    ///              }
17274    ///            ],
17275    ///            "args": [
17276    ///              {
17277    ///                "name": "amount",
17278    ///                "type": "u64"
17279    ///              },
17280    ///              {
17281    ///                "name": "decimals",
17282    ///                "type": "u8"
17283    ///              }
17284    ///            ],
17285    ///            "discriminator": [
17286    ///              119,
17287    ///              250,
17288    ///              202,
17289    ///              24,
17290    ///              253,
17291    ///              135,
17292    ///              244,
17293    ///              121
17294    ///            ],
17295    ///            "name": "transfer_checked"
17296    ///          }
17297    ///        ]
17298    ///      ],
17299    ///      "type": "array",
17300    ///      "items": {
17301    ///        "type": "object",
17302    ///        "required": [
17303    ///          "args",
17304    ///          "discriminator",
17305    ///          "name"
17306    ///        ],
17307    ///        "properties": {
17308    ///          "accounts": {
17309    ///            "description": "Optional list of accounts required by the instruction.",
17310    ///            "type": "array",
17311    ///            "items": {
17312    ///              "type": "object",
17313    ///              "required": [
17314    ///                "name"
17315    ///              ],
17316    ///              "properties": {
17317    ///                "name": {
17318    ///                  "description": "The account name.",
17319    ///                  "examples": [
17320    ///                    "mint"
17321    ///                  ],
17322    ///                  "type": "string"
17323    ///                },
17324    ///                "signer": {
17325    ///                  "description": "Whether the account must be a signer.",
17326    ///                  "examples": [
17327    ///                    false
17328    ///                  ],
17329    ///                  "type": "boolean"
17330    ///                },
17331    ///                "writable": {
17332    ///                  "description": "Whether the account is writable.",
17333    ///                  "examples": [
17334    ///                    true
17335    ///                  ],
17336    ///                  "type": "boolean"
17337    ///                }
17338    ///              }
17339    ///            }
17340    ///          },
17341    ///          "args": {
17342    ///            "description": "List of instruction arguments.",
17343    ///            "type": "array",
17344    ///            "items": {
17345    ///              "type": "object",
17346    ///              "required": [
17347    ///                "name",
17348    ///                "type"
17349    ///              ],
17350    ///              "properties": {
17351    ///                "name": {
17352    ///                  "description": "The argument name.",
17353    ///                  "examples": [
17354    ///                    "amount"
17355    ///                  ],
17356    ///                  "type": "string"
17357    ///                },
17358    ///                "type": {
17359    ///                  "description": "The argument type.",
17360    ///                  "examples": [
17361    ///                    "u64"
17362    ///                  ],
17363    ///                  "type": "string"
17364    ///                }
17365    ///              }
17366    ///            }
17367    ///          },
17368    ///          "discriminator": {
17369    ///            "description": "Array of 8 numbers representing the instruction discriminator.",
17370    ///            "examples": [
17371    ///              [
17372    ///                119,
17373    ///                250,
17374    ///                202,
17375    ///                24,
17376    ///                253,
17377    ///                135,
17378    ///                244,
17379    ///                121
17380    ///              ]
17381    ///            ],
17382    ///            "type": "array",
17383    ///            "items": {
17384    ///              "type": "integer",
17385    ///              "maximum": 255.0,
17386    ///              "minimum": 0.0
17387    ///            },
17388    ///            "maxItems": 8,
17389    ///            "minItems": 8
17390    ///          },
17391    ///          "name": {
17392    ///            "description": "The instruction name.",
17393    ///            "examples": [
17394    ///              "transfer_checked"
17395    ///            ],
17396    ///            "type": "string"
17397    ///          }
17398    ///        }
17399    ///      }
17400    ///    },
17401    ///    "metadata": {
17402    ///      "description": "Optional metadata about the IDL.",
17403    ///      "examples": [
17404    ///        {
17405    ///          "name": "system_program",
17406    ///          "spec": "0.1.0",
17407    ///          "version": "0.1.0"
17408    ///        }
17409    ///      ],
17410    ///      "type": "object",
17411    ///      "properties": {
17412    ///        "name": {
17413    ///          "description": "The program name.",
17414    ///          "examples": [
17415    ///            "system_program"
17416    ///          ],
17417    ///          "type": "string"
17418    ///        },
17419    ///        "spec": {
17420    ///          "description": "The IDL specification version.",
17421    ///          "examples": [
17422    ///            "0.1.0"
17423    ///          ],
17424    ///          "type": "string"
17425    ///        },
17426    ///        "version": {
17427    ///          "description": "The program version.",
17428    ///          "examples": [
17429    ///            "0.1.0"
17430    ///          ],
17431    ///          "type": "string"
17432    ///        }
17433    ///      }
17434    ///    },
17435    ///    "types": {
17436    ///      "description": "Optional type definitions for custom data structures used in the program.",
17437    ///      "examples": [
17438    ///        [
17439    ///          {
17440    ///            "fields": [
17441    ///              {
17442    ///                "name": "id",
17443    ///                "type": "u64"
17444    ///              },
17445    ///              {
17446    ///                "name": "owner",
17447    ///                "type": "pubkey"
17448    ///              }
17449    ///            ],
17450    ///            "name": "MyStruct",
17451    ///            "type": "struct"
17452    ///          }
17453    ///        ]
17454    ///      ],
17455    ///      "type": "array",
17456    ///      "items": {
17457    ///        "type": "object"
17458    ///      }
17459    ///    }
17460    ///  },
17461    ///  "x-audience": "public"
17462    ///}
17463    /// ```
17464    /// </details>
17465    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17466    pub struct Idl {
17467        ///The program address.
17468        pub address: ::std::string::String,
17469        ///List of program instructions.
17470        pub instructions: ::std::vec::Vec<IdlInstructionsItem>,
17471        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17472        pub metadata: ::std::option::Option<IdlMetadata>,
17473        ///Optional type definitions for custom data structures used in the program.
17474        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
17475        pub types: ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
17476    }
17477    impl ::std::convert::From<&Idl> for Idl {
17478        fn from(value: &Idl) -> Self {
17479            value.clone()
17480        }
17481    }
17482    impl Idl {
17483        pub fn builder() -> builder::Idl {
17484            Default::default()
17485        }
17486    }
17487    ///`IdlInstructionsItem`
17488    ///
17489    /// <details><summary>JSON schema</summary>
17490    ///
17491    /// ```json
17492    ///{
17493    ///  "type": "object",
17494    ///  "required": [
17495    ///    "args",
17496    ///    "discriminator",
17497    ///    "name"
17498    ///  ],
17499    ///  "properties": {
17500    ///    "accounts": {
17501    ///      "description": "Optional list of accounts required by the instruction.",
17502    ///      "type": "array",
17503    ///      "items": {
17504    ///        "type": "object",
17505    ///        "required": [
17506    ///          "name"
17507    ///        ],
17508    ///        "properties": {
17509    ///          "name": {
17510    ///            "description": "The account name.",
17511    ///            "examples": [
17512    ///              "mint"
17513    ///            ],
17514    ///            "type": "string"
17515    ///          },
17516    ///          "signer": {
17517    ///            "description": "Whether the account must be a signer.",
17518    ///            "examples": [
17519    ///              false
17520    ///            ],
17521    ///            "type": "boolean"
17522    ///          },
17523    ///          "writable": {
17524    ///            "description": "Whether the account is writable.",
17525    ///            "examples": [
17526    ///              true
17527    ///            ],
17528    ///            "type": "boolean"
17529    ///          }
17530    ///        }
17531    ///      }
17532    ///    },
17533    ///    "args": {
17534    ///      "description": "List of instruction arguments.",
17535    ///      "type": "array",
17536    ///      "items": {
17537    ///        "type": "object",
17538    ///        "required": [
17539    ///          "name",
17540    ///          "type"
17541    ///        ],
17542    ///        "properties": {
17543    ///          "name": {
17544    ///            "description": "The argument name.",
17545    ///            "examples": [
17546    ///              "amount"
17547    ///            ],
17548    ///            "type": "string"
17549    ///          },
17550    ///          "type": {
17551    ///            "description": "The argument type.",
17552    ///            "examples": [
17553    ///              "u64"
17554    ///            ],
17555    ///            "type": "string"
17556    ///          }
17557    ///        }
17558    ///      }
17559    ///    },
17560    ///    "discriminator": {
17561    ///      "description": "Array of 8 numbers representing the instruction discriminator.",
17562    ///      "examples": [
17563    ///        [
17564    ///          119,
17565    ///          250,
17566    ///          202,
17567    ///          24,
17568    ///          253,
17569    ///          135,
17570    ///          244,
17571    ///          121
17572    ///        ]
17573    ///      ],
17574    ///      "type": "array",
17575    ///      "items": {
17576    ///        "type": "integer",
17577    ///        "maximum": 255.0,
17578    ///        "minimum": 0.0
17579    ///      },
17580    ///      "maxItems": 8,
17581    ///      "minItems": 8
17582    ///    },
17583    ///    "name": {
17584    ///      "description": "The instruction name.",
17585    ///      "examples": [
17586    ///        "transfer_checked"
17587    ///      ],
17588    ///      "type": "string"
17589    ///    }
17590    ///  }
17591    ///}
17592    /// ```
17593    /// </details>
17594    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17595    pub struct IdlInstructionsItem {
17596        ///Optional list of accounts required by the instruction.
17597        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
17598        pub accounts: ::std::vec::Vec<IdlInstructionsItemAccountsItem>,
17599        ///List of instruction arguments.
17600        pub args: ::std::vec::Vec<IdlInstructionsItemArgsItem>,
17601        ///Array of 8 numbers representing the instruction discriminator.
17602        pub discriminator: [u8; 8usize],
17603        ///The instruction name.
17604        pub name: ::std::string::String,
17605    }
17606    impl ::std::convert::From<&IdlInstructionsItem> for IdlInstructionsItem {
17607        fn from(value: &IdlInstructionsItem) -> Self {
17608            value.clone()
17609        }
17610    }
17611    impl IdlInstructionsItem {
17612        pub fn builder() -> builder::IdlInstructionsItem {
17613            Default::default()
17614        }
17615    }
17616    ///`IdlInstructionsItemAccountsItem`
17617    ///
17618    /// <details><summary>JSON schema</summary>
17619    ///
17620    /// ```json
17621    ///{
17622    ///  "type": "object",
17623    ///  "required": [
17624    ///    "name"
17625    ///  ],
17626    ///  "properties": {
17627    ///    "name": {
17628    ///      "description": "The account name.",
17629    ///      "examples": [
17630    ///        "mint"
17631    ///      ],
17632    ///      "type": "string"
17633    ///    },
17634    ///    "signer": {
17635    ///      "description": "Whether the account must be a signer.",
17636    ///      "examples": [
17637    ///        false
17638    ///      ],
17639    ///      "type": "boolean"
17640    ///    },
17641    ///    "writable": {
17642    ///      "description": "Whether the account is writable.",
17643    ///      "examples": [
17644    ///        true
17645    ///      ],
17646    ///      "type": "boolean"
17647    ///    }
17648    ///  }
17649    ///}
17650    /// ```
17651    /// </details>
17652    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17653    pub struct IdlInstructionsItemAccountsItem {
17654        ///The account name.
17655        pub name: ::std::string::String,
17656        ///Whether the account must be a signer.
17657        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17658        pub signer: ::std::option::Option<bool>,
17659        ///Whether the account is writable.
17660        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17661        pub writable: ::std::option::Option<bool>,
17662    }
17663    impl ::std::convert::From<&IdlInstructionsItemAccountsItem> for IdlInstructionsItemAccountsItem {
17664        fn from(value: &IdlInstructionsItemAccountsItem) -> Self {
17665            value.clone()
17666        }
17667    }
17668    impl IdlInstructionsItemAccountsItem {
17669        pub fn builder() -> builder::IdlInstructionsItemAccountsItem {
17670            Default::default()
17671        }
17672    }
17673    ///`IdlInstructionsItemArgsItem`
17674    ///
17675    /// <details><summary>JSON schema</summary>
17676    ///
17677    /// ```json
17678    ///{
17679    ///  "type": "object",
17680    ///  "required": [
17681    ///    "name",
17682    ///    "type"
17683    ///  ],
17684    ///  "properties": {
17685    ///    "name": {
17686    ///      "description": "The argument name.",
17687    ///      "examples": [
17688    ///        "amount"
17689    ///      ],
17690    ///      "type": "string"
17691    ///    },
17692    ///    "type": {
17693    ///      "description": "The argument type.",
17694    ///      "examples": [
17695    ///        "u64"
17696    ///      ],
17697    ///      "type": "string"
17698    ///    }
17699    ///  }
17700    ///}
17701    /// ```
17702    /// </details>
17703    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17704    pub struct IdlInstructionsItemArgsItem {
17705        ///The argument name.
17706        pub name: ::std::string::String,
17707        ///The argument type.
17708        #[serde(rename = "type")]
17709        pub type_: ::std::string::String,
17710    }
17711    impl ::std::convert::From<&IdlInstructionsItemArgsItem> for IdlInstructionsItemArgsItem {
17712        fn from(value: &IdlInstructionsItemArgsItem) -> Self {
17713            value.clone()
17714        }
17715    }
17716    impl IdlInstructionsItemArgsItem {
17717        pub fn builder() -> builder::IdlInstructionsItemArgsItem {
17718            Default::default()
17719        }
17720    }
17721    ///Optional metadata about the IDL.
17722    ///
17723    /// <details><summary>JSON schema</summary>
17724    ///
17725    /// ```json
17726    ///{
17727    ///  "description": "Optional metadata about the IDL.",
17728    ///  "examples": [
17729    ///    {
17730    ///      "name": "system_program",
17731    ///      "spec": "0.1.0",
17732    ///      "version": "0.1.0"
17733    ///    }
17734    ///  ],
17735    ///  "type": "object",
17736    ///  "properties": {
17737    ///    "name": {
17738    ///      "description": "The program name.",
17739    ///      "examples": [
17740    ///        "system_program"
17741    ///      ],
17742    ///      "type": "string"
17743    ///    },
17744    ///    "spec": {
17745    ///      "description": "The IDL specification version.",
17746    ///      "examples": [
17747    ///        "0.1.0"
17748    ///      ],
17749    ///      "type": "string"
17750    ///    },
17751    ///    "version": {
17752    ///      "description": "The program version.",
17753    ///      "examples": [
17754    ///        "0.1.0"
17755    ///      ],
17756    ///      "type": "string"
17757    ///    }
17758    ///  }
17759    ///}
17760    /// ```
17761    /// </details>
17762    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17763    pub struct IdlMetadata {
17764        ///The program name.
17765        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17766        pub name: ::std::option::Option<::std::string::String>,
17767        ///The IDL specification version.
17768        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17769        pub spec: ::std::option::Option<::std::string::String>,
17770        ///The program version.
17771        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17772        pub version: ::std::option::Option<::std::string::String>,
17773    }
17774    impl ::std::convert::From<&IdlMetadata> for IdlMetadata {
17775        fn from(value: &IdlMetadata) -> Self {
17776            value.clone()
17777        }
17778    }
17779    impl ::std::default::Default for IdlMetadata {
17780        fn default() -> Self {
17781            Self {
17782                name: Default::default(),
17783                spec: Default::default(),
17784                version: Default::default(),
17785            }
17786        }
17787    }
17788    impl IdlMetadata {
17789        pub fn builder() -> builder::IdlMetadata {
17790            Default::default()
17791        }
17792    }
17793    ///`ImportEvmAccountBody`
17794    ///
17795    /// <details><summary>JSON schema</summary>
17796    ///
17797    /// ```json
17798    ///{
17799    ///  "type": "object",
17800    ///  "required": [
17801    ///    "encryptedPrivateKey"
17802    ///  ],
17803    ///  "properties": {
17804    ///    "accountPolicy": {
17805    ///      "description": "The ID of the account-level policy to apply to the account.",
17806    ///      "examples": [
17807    ///        "123e4567-e89b-12d3-a456-426614174000"
17808    ///      ],
17809    ///      "type": "string",
17810    ///      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
17811    ///      "x-audience": "public"
17812    ///    },
17813    ///    "encryptedPrivateKey": {
17814    ///      "description": "The base64-encoded, encrypted private key of the EVM account. The private key must be encrypted using the CDP SDK's encryption scheme.",
17815    ///      "examples": [
17816    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
17817    ///      ],
17818    ///      "type": "string"
17819    ///    },
17820    ///    "name": {
17821    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
17822    ///      "examples": [
17823    ///        "my-wallet"
17824    ///      ],
17825    ///      "type": "string",
17826    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
17827    ///    }
17828    ///  }
17829    ///}
17830    /// ```
17831    /// </details>
17832    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
17833    pub struct ImportEvmAccountBody {
17834        ///The ID of the account-level policy to apply to the account.
17835        #[serde(
17836            rename = "accountPolicy",
17837            default,
17838            skip_serializing_if = "::std::option::Option::is_none"
17839        )]
17840        pub account_policy: ::std::option::Option<ImportEvmAccountBodyAccountPolicy>,
17841        ///The base64-encoded, encrypted private key of the EVM account. The private key must be encrypted using the CDP SDK's encryption scheme.
17842        #[serde(rename = "encryptedPrivateKey")]
17843        pub encrypted_private_key: ::std::string::String,
17844        /**An optional name for the account.
17845        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
17846        Account names must be unique across all EVM accounts in the developer's CDP Project.*/
17847        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
17848        pub name: ::std::option::Option<ImportEvmAccountBodyName>,
17849    }
17850    impl ::std::convert::From<&ImportEvmAccountBody> for ImportEvmAccountBody {
17851        fn from(value: &ImportEvmAccountBody) -> Self {
17852            value.clone()
17853        }
17854    }
17855    impl ImportEvmAccountBody {
17856        pub fn builder() -> builder::ImportEvmAccountBody {
17857            Default::default()
17858        }
17859    }
17860    ///The ID of the account-level policy to apply to the account.
17861    ///
17862    /// <details><summary>JSON schema</summary>
17863    ///
17864    /// ```json
17865    ///{
17866    ///  "description": "The ID of the account-level policy to apply to the account.",
17867    ///  "examples": [
17868    ///    "123e4567-e89b-12d3-a456-426614174000"
17869    ///  ],
17870    ///  "type": "string",
17871    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
17872    ///  "x-audience": "public"
17873    ///}
17874    /// ```
17875    /// </details>
17876    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
17877    #[serde(transparent)]
17878    pub struct ImportEvmAccountBodyAccountPolicy(::std::string::String);
17879    impl ::std::ops::Deref for ImportEvmAccountBodyAccountPolicy {
17880        type Target = ::std::string::String;
17881        fn deref(&self) -> &::std::string::String {
17882            &self.0
17883        }
17884    }
17885    impl ::std::convert::From<ImportEvmAccountBodyAccountPolicy> for ::std::string::String {
17886        fn from(value: ImportEvmAccountBodyAccountPolicy) -> Self {
17887            value.0
17888        }
17889    }
17890    impl ::std::convert::From<&ImportEvmAccountBodyAccountPolicy>
17891        for ImportEvmAccountBodyAccountPolicy
17892    {
17893        fn from(value: &ImportEvmAccountBodyAccountPolicy) -> Self {
17894            value.clone()
17895        }
17896    }
17897    impl ::std::str::FromStr for ImportEvmAccountBodyAccountPolicy {
17898        type Err = self::error::ConversionError;
17899        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17900            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
17901                || {
17902                    ::regress::Regex::new(
17903                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
17904                    )
17905                    .unwrap()
17906                },
17907            );
17908            if PATTERN.find(value).is_none() {
17909                return Err(
17910                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
17911                        .into(),
17912                );
17913            }
17914            Ok(Self(value.to_string()))
17915        }
17916    }
17917    impl ::std::convert::TryFrom<&str> for ImportEvmAccountBodyAccountPolicy {
17918        type Error = self::error::ConversionError;
17919        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17920            value.parse()
17921        }
17922    }
17923    impl ::std::convert::TryFrom<&::std::string::String> for ImportEvmAccountBodyAccountPolicy {
17924        type Error = self::error::ConversionError;
17925        fn try_from(
17926            value: &::std::string::String,
17927        ) -> ::std::result::Result<Self, self::error::ConversionError> {
17928            value.parse()
17929        }
17930    }
17931    impl ::std::convert::TryFrom<::std::string::String> for ImportEvmAccountBodyAccountPolicy {
17932        type Error = self::error::ConversionError;
17933        fn try_from(
17934            value: ::std::string::String,
17935        ) -> ::std::result::Result<Self, self::error::ConversionError> {
17936            value.parse()
17937        }
17938    }
17939    impl<'de> ::serde::Deserialize<'de> for ImportEvmAccountBodyAccountPolicy {
17940        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
17941        where
17942            D: ::serde::Deserializer<'de>,
17943        {
17944            ::std::string::String::deserialize(deserializer)?
17945                .parse()
17946                .map_err(|e: self::error::ConversionError| {
17947                    <D::Error as ::serde::de::Error>::custom(e.to_string())
17948                })
17949        }
17950    }
17951    /**An optional name for the account.
17952    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
17953    Account names must be unique across all EVM accounts in the developer's CDP Project.*/
17954    ///
17955    /// <details><summary>JSON schema</summary>
17956    ///
17957    /// ```json
17958    ///{
17959    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
17960    ///  "examples": [
17961    ///    "my-wallet"
17962    ///  ],
17963    ///  "type": "string",
17964    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
17965    ///}
17966    /// ```
17967    /// </details>
17968    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
17969    #[serde(transparent)]
17970    pub struct ImportEvmAccountBodyName(::std::string::String);
17971    impl ::std::ops::Deref for ImportEvmAccountBodyName {
17972        type Target = ::std::string::String;
17973        fn deref(&self) -> &::std::string::String {
17974            &self.0
17975        }
17976    }
17977    impl ::std::convert::From<ImportEvmAccountBodyName> for ::std::string::String {
17978        fn from(value: ImportEvmAccountBodyName) -> Self {
17979            value.0
17980        }
17981    }
17982    impl ::std::convert::From<&ImportEvmAccountBodyName> for ImportEvmAccountBodyName {
17983        fn from(value: &ImportEvmAccountBodyName) -> Self {
17984            value.clone()
17985        }
17986    }
17987    impl ::std::str::FromStr for ImportEvmAccountBodyName {
17988        type Err = self::error::ConversionError;
17989        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
17990            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
17991                ::std::sync::LazyLock::new(|| {
17992                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
17993                });
17994            if PATTERN.find(value).is_none() {
17995                return Err(
17996                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
17997                );
17998            }
17999            Ok(Self(value.to_string()))
18000        }
18001    }
18002    impl ::std::convert::TryFrom<&str> for ImportEvmAccountBodyName {
18003        type Error = self::error::ConversionError;
18004        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18005            value.parse()
18006        }
18007    }
18008    impl ::std::convert::TryFrom<&::std::string::String> for ImportEvmAccountBodyName {
18009        type Error = self::error::ConversionError;
18010        fn try_from(
18011            value: &::std::string::String,
18012        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18013            value.parse()
18014        }
18015    }
18016    impl ::std::convert::TryFrom<::std::string::String> for ImportEvmAccountBodyName {
18017        type Error = self::error::ConversionError;
18018        fn try_from(
18019            value: ::std::string::String,
18020        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18021            value.parse()
18022        }
18023    }
18024    impl<'de> ::serde::Deserialize<'de> for ImportEvmAccountBodyName {
18025        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
18026        where
18027            D: ::serde::Deserializer<'de>,
18028        {
18029            ::std::string::String::deserialize(deserializer)?
18030                .parse()
18031                .map_err(|e: self::error::ConversionError| {
18032                    <D::Error as ::serde::de::Error>::custom(e.to_string())
18033                })
18034        }
18035    }
18036    ///`ImportEvmAccountXIdempotencyKey`
18037    ///
18038    /// <details><summary>JSON schema</summary>
18039    ///
18040    /// ```json
18041    ///{
18042    ///  "type": "string",
18043    ///  "maxLength": 36,
18044    ///  "minLength": 36,
18045    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
18046    ///}
18047    /// ```
18048    /// </details>
18049    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18050    #[serde(transparent)]
18051    pub struct ImportEvmAccountXIdempotencyKey(::std::string::String);
18052    impl ::std::ops::Deref for ImportEvmAccountXIdempotencyKey {
18053        type Target = ::std::string::String;
18054        fn deref(&self) -> &::std::string::String {
18055            &self.0
18056        }
18057    }
18058    impl ::std::convert::From<ImportEvmAccountXIdempotencyKey> for ::std::string::String {
18059        fn from(value: ImportEvmAccountXIdempotencyKey) -> Self {
18060            value.0
18061        }
18062    }
18063    impl ::std::convert::From<&ImportEvmAccountXIdempotencyKey> for ImportEvmAccountXIdempotencyKey {
18064        fn from(value: &ImportEvmAccountXIdempotencyKey) -> Self {
18065            value.clone()
18066        }
18067    }
18068    impl ::std::str::FromStr for ImportEvmAccountXIdempotencyKey {
18069        type Err = self::error::ConversionError;
18070        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18071            if value.chars().count() > 36usize {
18072                return Err("longer than 36 characters".into());
18073            }
18074            if value.chars().count() < 36usize {
18075                return Err("shorter than 36 characters".into());
18076            }
18077            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
18078                ::std::sync::LazyLock::new(|| {
18079                    ::regress::Regex::new(
18080                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
18081                    )
18082                    .unwrap()
18083                });
18084            if PATTERN.find(value).is_none() {
18085                return Err(
18086                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
18087                        .into(),
18088                );
18089            }
18090            Ok(Self(value.to_string()))
18091        }
18092    }
18093    impl ::std::convert::TryFrom<&str> for ImportEvmAccountXIdempotencyKey {
18094        type Error = self::error::ConversionError;
18095        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18096            value.parse()
18097        }
18098    }
18099    impl ::std::convert::TryFrom<&::std::string::String> for ImportEvmAccountXIdempotencyKey {
18100        type Error = self::error::ConversionError;
18101        fn try_from(
18102            value: &::std::string::String,
18103        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18104            value.parse()
18105        }
18106    }
18107    impl ::std::convert::TryFrom<::std::string::String> for ImportEvmAccountXIdempotencyKey {
18108        type Error = self::error::ConversionError;
18109        fn try_from(
18110            value: ::std::string::String,
18111        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18112            value.parse()
18113        }
18114    }
18115    impl<'de> ::serde::Deserialize<'de> for ImportEvmAccountXIdempotencyKey {
18116        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
18117        where
18118            D: ::serde::Deserializer<'de>,
18119        {
18120            ::std::string::String::deserialize(deserializer)?
18121                .parse()
18122                .map_err(|e: self::error::ConversionError| {
18123                    <D::Error as ::serde::de::Error>::custom(e.to_string())
18124                })
18125        }
18126    }
18127    ///`ImportSolanaAccountBody`
18128    ///
18129    /// <details><summary>JSON schema</summary>
18130    ///
18131    /// ```json
18132    ///{
18133    ///  "type": "object",
18134    ///  "required": [
18135    ///    "encryptedPrivateKey"
18136    ///  ],
18137    ///  "properties": {
18138    ///    "encryptedPrivateKey": {
18139    ///      "description": "The base64-encoded, encrypted 32-byte private key of the Solana account. The private key must be encrypted using the CDP SDK's encryption scheme.",
18140    ///      "examples": [
18141    ///        "U2FsdGVkX1+vupppZksvRf5X5YgHq4+da+Q4qf51+Q4="
18142    ///      ],
18143    ///      "type": "string"
18144    ///    },
18145    ///    "name": {
18146    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
18147    ///      "examples": [
18148    ///        "my-solana-wallet"
18149    ///      ],
18150    ///      "type": "string",
18151    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
18152    ///    }
18153    ///  }
18154    ///}
18155    /// ```
18156    /// </details>
18157    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18158    pub struct ImportSolanaAccountBody {
18159        ///The base64-encoded, encrypted 32-byte private key of the Solana account. The private key must be encrypted using the CDP SDK's encryption scheme.
18160        #[serde(rename = "encryptedPrivateKey")]
18161        pub encrypted_private_key: ::std::string::String,
18162        /**An optional name for the account.
18163        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
18164        Account names must be unique across all EVM accounts in the developer's CDP Project.*/
18165        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
18166        pub name: ::std::option::Option<ImportSolanaAccountBodyName>,
18167    }
18168    impl ::std::convert::From<&ImportSolanaAccountBody> for ImportSolanaAccountBody {
18169        fn from(value: &ImportSolanaAccountBody) -> Self {
18170            value.clone()
18171        }
18172    }
18173    impl ImportSolanaAccountBody {
18174        pub fn builder() -> builder::ImportSolanaAccountBody {
18175            Default::default()
18176        }
18177    }
18178    /**An optional name for the account.
18179    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
18180    Account names must be unique across all EVM accounts in the developer's CDP Project.*/
18181    ///
18182    /// <details><summary>JSON schema</summary>
18183    ///
18184    /// ```json
18185    ///{
18186    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
18187    ///  "examples": [
18188    ///    "my-solana-wallet"
18189    ///  ],
18190    ///  "type": "string",
18191    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
18192    ///}
18193    /// ```
18194    /// </details>
18195    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18196    #[serde(transparent)]
18197    pub struct ImportSolanaAccountBodyName(::std::string::String);
18198    impl ::std::ops::Deref for ImportSolanaAccountBodyName {
18199        type Target = ::std::string::String;
18200        fn deref(&self) -> &::std::string::String {
18201            &self.0
18202        }
18203    }
18204    impl ::std::convert::From<ImportSolanaAccountBodyName> for ::std::string::String {
18205        fn from(value: ImportSolanaAccountBodyName) -> Self {
18206            value.0
18207        }
18208    }
18209    impl ::std::convert::From<&ImportSolanaAccountBodyName> for ImportSolanaAccountBodyName {
18210        fn from(value: &ImportSolanaAccountBodyName) -> Self {
18211            value.clone()
18212        }
18213    }
18214    impl ::std::str::FromStr for ImportSolanaAccountBodyName {
18215        type Err = self::error::ConversionError;
18216        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18217            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
18218                ::std::sync::LazyLock::new(|| {
18219                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
18220                });
18221            if PATTERN.find(value).is_none() {
18222                return Err(
18223                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
18224                );
18225            }
18226            Ok(Self(value.to_string()))
18227        }
18228    }
18229    impl ::std::convert::TryFrom<&str> for ImportSolanaAccountBodyName {
18230        type Error = self::error::ConversionError;
18231        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18232            value.parse()
18233        }
18234    }
18235    impl ::std::convert::TryFrom<&::std::string::String> for ImportSolanaAccountBodyName {
18236        type Error = self::error::ConversionError;
18237        fn try_from(
18238            value: &::std::string::String,
18239        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18240            value.parse()
18241        }
18242    }
18243    impl ::std::convert::TryFrom<::std::string::String> for ImportSolanaAccountBodyName {
18244        type Error = self::error::ConversionError;
18245        fn try_from(
18246            value: ::std::string::String,
18247        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18248            value.parse()
18249        }
18250    }
18251    impl<'de> ::serde::Deserialize<'de> for ImportSolanaAccountBodyName {
18252        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
18253        where
18254            D: ::serde::Deserializer<'de>,
18255        {
18256            ::std::string::String::deserialize(deserializer)?
18257                .parse()
18258                .map_err(|e: self::error::ConversionError| {
18259                    <D::Error as ::serde::de::Error>::custom(e.to_string())
18260                })
18261        }
18262    }
18263    ///`ImportSolanaAccountXIdempotencyKey`
18264    ///
18265    /// <details><summary>JSON schema</summary>
18266    ///
18267    /// ```json
18268    ///{
18269    ///  "type": "string",
18270    ///  "maxLength": 36,
18271    ///  "minLength": 36,
18272    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
18273    ///}
18274    /// ```
18275    /// </details>
18276    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18277    #[serde(transparent)]
18278    pub struct ImportSolanaAccountXIdempotencyKey(::std::string::String);
18279    impl ::std::ops::Deref for ImportSolanaAccountXIdempotencyKey {
18280        type Target = ::std::string::String;
18281        fn deref(&self) -> &::std::string::String {
18282            &self.0
18283        }
18284    }
18285    impl ::std::convert::From<ImportSolanaAccountXIdempotencyKey> for ::std::string::String {
18286        fn from(value: ImportSolanaAccountXIdempotencyKey) -> Self {
18287            value.0
18288        }
18289    }
18290    impl ::std::convert::From<&ImportSolanaAccountXIdempotencyKey>
18291        for ImportSolanaAccountXIdempotencyKey
18292    {
18293        fn from(value: &ImportSolanaAccountXIdempotencyKey) -> Self {
18294            value.clone()
18295        }
18296    }
18297    impl ::std::str::FromStr for ImportSolanaAccountXIdempotencyKey {
18298        type Err = self::error::ConversionError;
18299        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18300            if value.chars().count() > 36usize {
18301                return Err("longer than 36 characters".into());
18302            }
18303            if value.chars().count() < 36usize {
18304                return Err("shorter than 36 characters".into());
18305            }
18306            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
18307                ::std::sync::LazyLock::new(|| {
18308                    ::regress::Regex::new(
18309                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
18310                    )
18311                    .unwrap()
18312                });
18313            if PATTERN.find(value).is_none() {
18314                return Err(
18315                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
18316                        .into(),
18317                );
18318            }
18319            Ok(Self(value.to_string()))
18320        }
18321    }
18322    impl ::std::convert::TryFrom<&str> for ImportSolanaAccountXIdempotencyKey {
18323        type Error = self::error::ConversionError;
18324        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18325            value.parse()
18326        }
18327    }
18328    impl ::std::convert::TryFrom<&::std::string::String> for ImportSolanaAccountXIdempotencyKey {
18329        type Error = self::error::ConversionError;
18330        fn try_from(
18331            value: &::std::string::String,
18332        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18333            value.parse()
18334        }
18335    }
18336    impl ::std::convert::TryFrom<::std::string::String> for ImportSolanaAccountXIdempotencyKey {
18337        type Error = self::error::ConversionError;
18338        fn try_from(
18339            value: ::std::string::String,
18340        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18341            value.parse()
18342        }
18343    }
18344    impl<'de> ::serde::Deserialize<'de> for ImportSolanaAccountXIdempotencyKey {
18345        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
18346        where
18347            D: ::serde::Deserializer<'de>,
18348        {
18349            ::std::string::String::deserialize(deserializer)?
18350                .parse()
18351                .map_err(|e: self::error::ConversionError| {
18352                    <D::Error as ::serde::de::Error>::custom(e.to_string())
18353                })
18354        }
18355    }
18356    /**A reference to an established EIP standard. When referencing a `KnownAbiType` within a policy rule configuring an `EvmDataCriterion`, criteria will only decode function data officially documented in the standard. For more information on supported token standards, see the links below.
18357    - [erc20 - Token Standard](https://eips.ethereum.org/EIPS/eip-20).
18358    - [erc721 - Non-Fungible Token Standard](https://eips.ethereum.org/EIPS/eip-721).
18359    - [erc1155 - Multi Token Standard](https://eips.ethereum.org/EIPS/eip-1155).*/
18360    ///
18361    /// <details><summary>JSON schema</summary>
18362    ///
18363    /// ```json
18364    ///{
18365    ///  "title": "KnownAbiType",
18366    ///  "description": "A reference to an established EIP standard. When referencing a `KnownAbiType` within a policy rule configuring an `EvmDataCriterion`, criteria will only decode function data officially documented in the standard. For more information on supported token standards, see the links below.\n  - [erc20 - Token Standard](https://eips.ethereum.org/EIPS/eip-20).\n  - [erc721 - Non-Fungible Token Standard](https://eips.ethereum.org/EIPS/eip-721).\n  - [erc1155 - Multi Token Standard](https://eips.ethereum.org/EIPS/eip-1155).",
18367    ///  "type": "string",
18368    ///  "enum": [
18369    ///    "erc20",
18370    ///    "erc721",
18371    ///    "erc1155"
18372    ///  ]
18373    ///}
18374    /// ```
18375    /// </details>
18376    #[derive(
18377        ::serde::Deserialize,
18378        ::serde::Serialize,
18379        Clone,
18380        Copy,
18381        Debug,
18382        Eq,
18383        Hash,
18384        Ord,
18385        PartialEq,
18386        PartialOrd,
18387    )]
18388    pub enum KnownAbiType {
18389        #[serde(rename = "erc20")]
18390        Erc20,
18391        #[serde(rename = "erc721")]
18392        Erc721,
18393        #[serde(rename = "erc1155")]
18394        Erc1155,
18395    }
18396    impl ::std::convert::From<&Self> for KnownAbiType {
18397        fn from(value: &KnownAbiType) -> Self {
18398            value.clone()
18399        }
18400    }
18401    impl ::std::fmt::Display for KnownAbiType {
18402        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18403            match *self {
18404                Self::Erc20 => f.write_str("erc20"),
18405                Self::Erc721 => f.write_str("erc721"),
18406                Self::Erc1155 => f.write_str("erc1155"),
18407            }
18408        }
18409    }
18410    impl ::std::str::FromStr for KnownAbiType {
18411        type Err = self::error::ConversionError;
18412        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18413            match value {
18414                "erc20" => Ok(Self::Erc20),
18415                "erc721" => Ok(Self::Erc721),
18416                "erc1155" => Ok(Self::Erc1155),
18417                _ => Err("invalid value".into()),
18418            }
18419        }
18420    }
18421    impl ::std::convert::TryFrom<&str> for KnownAbiType {
18422        type Error = self::error::ConversionError;
18423        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18424            value.parse()
18425        }
18426    }
18427    impl ::std::convert::TryFrom<&::std::string::String> for KnownAbiType {
18428        type Error = self::error::ConversionError;
18429        fn try_from(
18430            value: &::std::string::String,
18431        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18432            value.parse()
18433        }
18434    }
18435    impl ::std::convert::TryFrom<::std::string::String> for KnownAbiType {
18436        type Error = self::error::ConversionError;
18437        fn try_from(
18438            value: ::std::string::String,
18439        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18440            value.parse()
18441        }
18442    }
18443    /**A reference to an established Solana program. When referencing a `KnownIdlType` within a policy rule configuring an `SolDataCriterion`, criteria will decode instruction data as documented in the programs. For more information on supported programs, see the links below.
18444    - [SystemProgram](https://docs.rs/solana-program/latest/solana_program/system_instruction/enum.SystemInstruction.html).
18445    - [TokenProgram](https://docs.rs/spl-token/latest/spl_token/instruction/enum.TokenInstruction.html).
18446    - [AssociatedTokenProgram](https://docs.rs/spl-associated-token-account/latest/spl_associated_token_account/instruction/index.html).*/
18447    ///
18448    /// <details><summary>JSON schema</summary>
18449    ///
18450    /// ```json
18451    ///{
18452    ///  "title": "KnownIdlType",
18453    ///  "description": "A reference to an established Solana program. When referencing a `KnownIdlType` within a policy rule configuring an `SolDataCriterion`, criteria will decode instruction data as documented in the programs. For more information on supported programs, see the links below.\n  - [SystemProgram](https://docs.rs/solana-program/latest/solana_program/system_instruction/enum.SystemInstruction.html).\n  - [TokenProgram](https://docs.rs/spl-token/latest/spl_token/instruction/enum.TokenInstruction.html).\n  - [AssociatedTokenProgram](https://docs.rs/spl-associated-token-account/latest/spl_associated_token_account/instruction/index.html).",
18454    ///  "type": "string",
18455    ///  "enum": [
18456    ///    "SystemProgram",
18457    ///    "TokenProgram",
18458    ///    "AssociatedTokenProgram"
18459    ///  ],
18460    ///  "x-audience": "public"
18461    ///}
18462    /// ```
18463    /// </details>
18464    #[derive(
18465        ::serde::Deserialize,
18466        ::serde::Serialize,
18467        Clone,
18468        Copy,
18469        Debug,
18470        Eq,
18471        Hash,
18472        Ord,
18473        PartialEq,
18474        PartialOrd,
18475    )]
18476    pub enum KnownIdlType {
18477        SystemProgram,
18478        TokenProgram,
18479        AssociatedTokenProgram,
18480    }
18481    impl ::std::convert::From<&Self> for KnownIdlType {
18482        fn from(value: &KnownIdlType) -> Self {
18483            value.clone()
18484        }
18485    }
18486    impl ::std::fmt::Display for KnownIdlType {
18487        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18488            match *self {
18489                Self::SystemProgram => f.write_str("SystemProgram"),
18490                Self::TokenProgram => f.write_str("TokenProgram"),
18491                Self::AssociatedTokenProgram => f.write_str("AssociatedTokenProgram"),
18492            }
18493        }
18494    }
18495    impl ::std::str::FromStr for KnownIdlType {
18496        type Err = self::error::ConversionError;
18497        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18498            match value {
18499                "SystemProgram" => Ok(Self::SystemProgram),
18500                "TokenProgram" => Ok(Self::TokenProgram),
18501                "AssociatedTokenProgram" => Ok(Self::AssociatedTokenProgram),
18502                _ => Err("invalid value".into()),
18503            }
18504        }
18505    }
18506    impl ::std::convert::TryFrom<&str> for KnownIdlType {
18507        type Error = self::error::ConversionError;
18508        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18509            value.parse()
18510        }
18511    }
18512    impl ::std::convert::TryFrom<&::std::string::String> for KnownIdlType {
18513        type Error = self::error::ConversionError;
18514        fn try_from(
18515            value: &::std::string::String,
18516        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18517            value.parse()
18518        }
18519    }
18520    impl ::std::convert::TryFrom<::std::string::String> for KnownIdlType {
18521        type Error = self::error::ConversionError;
18522        fn try_from(
18523            value: ::std::string::String,
18524        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18525            value.parse()
18526        }
18527    }
18528    ///`ListDataTokenBalancesAddress`
18529    ///
18530    /// <details><summary>JSON schema</summary>
18531    ///
18532    /// ```json
18533    ///{
18534    ///  "type": "string",
18535    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
18536    ///}
18537    /// ```
18538    /// </details>
18539    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18540    #[serde(transparent)]
18541    pub struct ListDataTokenBalancesAddress(::std::string::String);
18542    impl ::std::ops::Deref for ListDataTokenBalancesAddress {
18543        type Target = ::std::string::String;
18544        fn deref(&self) -> &::std::string::String {
18545            &self.0
18546        }
18547    }
18548    impl ::std::convert::From<ListDataTokenBalancesAddress> for ::std::string::String {
18549        fn from(value: ListDataTokenBalancesAddress) -> Self {
18550            value.0
18551        }
18552    }
18553    impl ::std::convert::From<&ListDataTokenBalancesAddress> for ListDataTokenBalancesAddress {
18554        fn from(value: &ListDataTokenBalancesAddress) -> Self {
18555            value.clone()
18556        }
18557    }
18558    impl ::std::str::FromStr for ListDataTokenBalancesAddress {
18559        type Err = self::error::ConversionError;
18560        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18561            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
18562                ::std::sync::LazyLock::new(|| {
18563                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
18564                });
18565            if PATTERN.find(value).is_none() {
18566                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
18567            }
18568            Ok(Self(value.to_string()))
18569        }
18570    }
18571    impl ::std::convert::TryFrom<&str> for ListDataTokenBalancesAddress {
18572        type Error = self::error::ConversionError;
18573        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18574            value.parse()
18575        }
18576    }
18577    impl ::std::convert::TryFrom<&::std::string::String> for ListDataTokenBalancesAddress {
18578        type Error = self::error::ConversionError;
18579        fn try_from(
18580            value: &::std::string::String,
18581        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18582            value.parse()
18583        }
18584    }
18585    impl ::std::convert::TryFrom<::std::string::String> for ListDataTokenBalancesAddress {
18586        type Error = self::error::ConversionError;
18587        fn try_from(
18588            value: ::std::string::String,
18589        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18590            value.parse()
18591        }
18592    }
18593    impl<'de> ::serde::Deserialize<'de> for ListDataTokenBalancesAddress {
18594        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
18595        where
18596            D: ::serde::Deserializer<'de>,
18597        {
18598            ::std::string::String::deserialize(deserializer)?
18599                .parse()
18600                .map_err(|e: self::error::ConversionError| {
18601                    <D::Error as ::serde::de::Error>::custom(e.to_string())
18602                })
18603        }
18604    }
18605    ///`ListDataTokenBalancesResponse`
18606    ///
18607    /// <details><summary>JSON schema</summary>
18608    ///
18609    /// ```json
18610    ///{
18611    ///  "allOf": [
18612    ///    {
18613    ///      "type": "object",
18614    ///      "required": [
18615    ///        "balances"
18616    ///      ],
18617    ///      "properties": {
18618    ///        "balances": {
18619    ///          "description": "The list of EVM token balances.",
18620    ///          "examples": [
18621    ///            [
18622    ///              {
18623    ///                "amount": {
18624    ///                  "amount": "1250000000000000000",
18625    ///                  "decimals": 18
18626    ///                },
18627    ///                "token": {
18628    ///                  "contractAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
18629    ///                  "name": "ether",
18630    ///                  "network": "base",
18631    ///                  "symbol": "ETH"
18632    ///                }
18633    ///              },
18634    ///              {
18635    ///                "amount": {
18636    ///                  "amount": "123456",
18637    ///                  "decimals": 6
18638    ///                },
18639    ///                "token": {
18640    ///                  "contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
18641    ///                  "name": "USD Coin",
18642    ///                  "network": "base",
18643    ///                  "symbol": "USDC"
18644    ///                }
18645    ///              }
18646    ///            ]
18647    ///          ],
18648    ///          "type": "array",
18649    ///          "items": {
18650    ///            "$ref": "#/components/schemas/TokenBalance"
18651    ///          }
18652    ///        }
18653    ///      }
18654    ///    },
18655    ///    {
18656    ///      "$ref": "#/components/schemas/ListResponse"
18657    ///    }
18658    ///  ]
18659    ///}
18660    /// ```
18661    /// </details>
18662    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18663    pub struct ListDataTokenBalancesResponse {
18664        ///The list of EVM token balances.
18665        pub balances: ::std::vec::Vec<TokenBalance>,
18666        ///The token for the next page of items, if any.
18667        #[serde(
18668            rename = "nextPageToken",
18669            default,
18670            skip_serializing_if = "::std::option::Option::is_none"
18671        )]
18672        pub next_page_token: ::std::option::Option<::std::string::String>,
18673    }
18674    impl ::std::convert::From<&ListDataTokenBalancesResponse> for ListDataTokenBalancesResponse {
18675        fn from(value: &ListDataTokenBalancesResponse) -> Self {
18676            value.clone()
18677        }
18678    }
18679    impl ListDataTokenBalancesResponse {
18680        pub fn builder() -> builder::ListDataTokenBalancesResponse {
18681            Default::default()
18682        }
18683    }
18684    ///`ListEndUsersResponse`
18685    ///
18686    /// <details><summary>JSON schema</summary>
18687    ///
18688    /// ```json
18689    ///{
18690    ///  "allOf": [
18691    ///    {
18692    ///      "type": "object",
18693    ///      "required": [
18694    ///        "endUsers"
18695    ///      ],
18696    ///      "properties": {
18697    ///        "endUsers": {
18698    ///          "description": "The list of end users.",
18699    ///          "type": "array",
18700    ///          "items": {
18701    ///            "$ref": "#/components/schemas/EndUser"
18702    ///          }
18703    ///        }
18704    ///      }
18705    ///    },
18706    ///    {
18707    ///      "$ref": "#/components/schemas/ListResponse"
18708    ///    }
18709    ///  ]
18710    ///}
18711    /// ```
18712    /// </details>
18713    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18714    pub struct ListEndUsersResponse {
18715        ///The list of end users.
18716        #[serde(rename = "endUsers")]
18717        pub end_users: ::std::vec::Vec<EndUser>,
18718        ///The token for the next page of items, if any.
18719        #[serde(
18720            rename = "nextPageToken",
18721            default,
18722            skip_serializing_if = "::std::option::Option::is_none"
18723        )]
18724        pub next_page_token: ::std::option::Option<::std::string::String>,
18725    }
18726    impl ::std::convert::From<&ListEndUsersResponse> for ListEndUsersResponse {
18727        fn from(value: &ListEndUsersResponse) -> Self {
18728            value.clone()
18729        }
18730    }
18731    impl ListEndUsersResponse {
18732        pub fn builder() -> builder::ListEndUsersResponse {
18733            Default::default()
18734        }
18735    }
18736    ///`ListEndUsersSortItem`
18737    ///
18738    /// <details><summary>JSON schema</summary>
18739    ///
18740    /// ```json
18741    ///{
18742    ///  "type": "string",
18743    ///  "enum": [
18744    ///    "createdAt=asc",
18745    ///    "createdAt=desc"
18746    ///  ]
18747    ///}
18748    /// ```
18749    /// </details>
18750    #[derive(
18751        ::serde::Deserialize,
18752        ::serde::Serialize,
18753        Clone,
18754        Copy,
18755        Debug,
18756        Eq,
18757        Hash,
18758        Ord,
18759        PartialEq,
18760        PartialOrd,
18761    )]
18762    pub enum ListEndUsersSortItem {
18763        #[serde(rename = "createdAt=asc")]
18764        CreatedAtAsc,
18765        #[serde(rename = "createdAt=desc")]
18766        CreatedAtDesc,
18767    }
18768    impl ::std::convert::From<&Self> for ListEndUsersSortItem {
18769        fn from(value: &ListEndUsersSortItem) -> Self {
18770            value.clone()
18771        }
18772    }
18773    impl ::std::fmt::Display for ListEndUsersSortItem {
18774        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
18775            match *self {
18776                Self::CreatedAtAsc => f.write_str("createdAt=asc"),
18777                Self::CreatedAtDesc => f.write_str("createdAt=desc"),
18778            }
18779        }
18780    }
18781    impl ::std::str::FromStr for ListEndUsersSortItem {
18782        type Err = self::error::ConversionError;
18783        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18784            match value {
18785                "createdAt=asc" => Ok(Self::CreatedAtAsc),
18786                "createdAt=desc" => Ok(Self::CreatedAtDesc),
18787                _ => Err("invalid value".into()),
18788            }
18789        }
18790    }
18791    impl ::std::convert::TryFrom<&str> for ListEndUsersSortItem {
18792        type Error = self::error::ConversionError;
18793        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18794            value.parse()
18795        }
18796    }
18797    impl ::std::convert::TryFrom<&::std::string::String> for ListEndUsersSortItem {
18798        type Error = self::error::ConversionError;
18799        fn try_from(
18800            value: &::std::string::String,
18801        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18802            value.parse()
18803        }
18804    }
18805    impl ::std::convert::TryFrom<::std::string::String> for ListEndUsersSortItem {
18806        type Error = self::error::ConversionError;
18807        fn try_from(
18808            value: ::std::string::String,
18809        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18810            value.parse()
18811        }
18812    }
18813    ///`ListEvmAccountsResponse`
18814    ///
18815    /// <details><summary>JSON schema</summary>
18816    ///
18817    /// ```json
18818    ///{
18819    ///  "allOf": [
18820    ///    {
18821    ///      "type": "object",
18822    ///      "required": [
18823    ///        "accounts"
18824    ///      ],
18825    ///      "properties": {
18826    ///        "accounts": {
18827    ///          "description": "The list of EVM accounts.",
18828    ///          "type": "array",
18829    ///          "items": {
18830    ///            "$ref": "#/components/schemas/EvmAccount"
18831    ///          }
18832    ///        }
18833    ///      }
18834    ///    },
18835    ///    {
18836    ///      "$ref": "#/components/schemas/ListResponse"
18837    ///    }
18838    ///  ]
18839    ///}
18840    /// ```
18841    /// </details>
18842    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18843    pub struct ListEvmAccountsResponse {
18844        ///The list of EVM accounts.
18845        pub accounts: ::std::vec::Vec<EvmAccount>,
18846        ///The token for the next page of items, if any.
18847        #[serde(
18848            rename = "nextPageToken",
18849            default,
18850            skip_serializing_if = "::std::option::Option::is_none"
18851        )]
18852        pub next_page_token: ::std::option::Option<::std::string::String>,
18853    }
18854    impl ::std::convert::From<&ListEvmAccountsResponse> for ListEvmAccountsResponse {
18855        fn from(value: &ListEvmAccountsResponse) -> Self {
18856            value.clone()
18857        }
18858    }
18859    impl ListEvmAccountsResponse {
18860        pub fn builder() -> builder::ListEvmAccountsResponse {
18861            Default::default()
18862        }
18863    }
18864    ///`ListEvmSmartAccountsResponse`
18865    ///
18866    /// <details><summary>JSON schema</summary>
18867    ///
18868    /// ```json
18869    ///{
18870    ///  "allOf": [
18871    ///    {
18872    ///      "type": "object",
18873    ///      "required": [
18874    ///        "accounts"
18875    ///      ],
18876    ///      "properties": {
18877    ///        "accounts": {
18878    ///          "description": "The list of Smart Accounts.",
18879    ///          "type": "array",
18880    ///          "items": {
18881    ///            "$ref": "#/components/schemas/EvmSmartAccount"
18882    ///          }
18883    ///        }
18884    ///      }
18885    ///    },
18886    ///    {
18887    ///      "$ref": "#/components/schemas/ListResponse"
18888    ///    }
18889    ///  ]
18890    ///}
18891    /// ```
18892    /// </details>
18893    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
18894    pub struct ListEvmSmartAccountsResponse {
18895        ///The list of Smart Accounts.
18896        pub accounts: ::std::vec::Vec<EvmSmartAccount>,
18897        ///The token for the next page of items, if any.
18898        #[serde(
18899            rename = "nextPageToken",
18900            default,
18901            skip_serializing_if = "::std::option::Option::is_none"
18902        )]
18903        pub next_page_token: ::std::option::Option<::std::string::String>,
18904    }
18905    impl ::std::convert::From<&ListEvmSmartAccountsResponse> for ListEvmSmartAccountsResponse {
18906        fn from(value: &ListEvmSmartAccountsResponse) -> Self {
18907            value.clone()
18908        }
18909    }
18910    impl ListEvmSmartAccountsResponse {
18911        pub fn builder() -> builder::ListEvmSmartAccountsResponse {
18912            Default::default()
18913        }
18914    }
18915    ///`ListEvmTokenBalancesAddress`
18916    ///
18917    /// <details><summary>JSON schema</summary>
18918    ///
18919    /// ```json
18920    ///{
18921    ///  "type": "string",
18922    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
18923    ///}
18924    /// ```
18925    /// </details>
18926    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18927    #[serde(transparent)]
18928    pub struct ListEvmTokenBalancesAddress(::std::string::String);
18929    impl ::std::ops::Deref for ListEvmTokenBalancesAddress {
18930        type Target = ::std::string::String;
18931        fn deref(&self) -> &::std::string::String {
18932            &self.0
18933        }
18934    }
18935    impl ::std::convert::From<ListEvmTokenBalancesAddress> for ::std::string::String {
18936        fn from(value: ListEvmTokenBalancesAddress) -> Self {
18937            value.0
18938        }
18939    }
18940    impl ::std::convert::From<&ListEvmTokenBalancesAddress> for ListEvmTokenBalancesAddress {
18941        fn from(value: &ListEvmTokenBalancesAddress) -> Self {
18942            value.clone()
18943        }
18944    }
18945    impl ::std::str::FromStr for ListEvmTokenBalancesAddress {
18946        type Err = self::error::ConversionError;
18947        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18948            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
18949                ::std::sync::LazyLock::new(|| {
18950                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
18951                });
18952            if PATTERN.find(value).is_none() {
18953                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
18954            }
18955            Ok(Self(value.to_string()))
18956        }
18957    }
18958    impl ::std::convert::TryFrom<&str> for ListEvmTokenBalancesAddress {
18959        type Error = self::error::ConversionError;
18960        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
18961            value.parse()
18962        }
18963    }
18964    impl ::std::convert::TryFrom<&::std::string::String> for ListEvmTokenBalancesAddress {
18965        type Error = self::error::ConversionError;
18966        fn try_from(
18967            value: &::std::string::String,
18968        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18969            value.parse()
18970        }
18971    }
18972    impl ::std::convert::TryFrom<::std::string::String> for ListEvmTokenBalancesAddress {
18973        type Error = self::error::ConversionError;
18974        fn try_from(
18975            value: ::std::string::String,
18976        ) -> ::std::result::Result<Self, self::error::ConversionError> {
18977            value.parse()
18978        }
18979    }
18980    impl<'de> ::serde::Deserialize<'de> for ListEvmTokenBalancesAddress {
18981        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
18982        where
18983            D: ::serde::Deserializer<'de>,
18984        {
18985            ::std::string::String::deserialize(deserializer)?
18986                .parse()
18987                .map_err(|e: self::error::ConversionError| {
18988                    <D::Error as ::serde::de::Error>::custom(e.to_string())
18989                })
18990        }
18991    }
18992    ///The name of the supported EVM networks in human-readable format.
18993    ///
18994    /// <details><summary>JSON schema</summary>
18995    ///
18996    /// ```json
18997    ///{
18998    ///  "description": "The name of the supported EVM networks in human-readable format.",
18999    ///  "examples": [
19000    ///    "base"
19001    ///  ],
19002    ///  "type": "string",
19003    ///  "enum": [
19004    ///    "base",
19005    ///    "base-sepolia",
19006    ///    "ethereum"
19007    ///  ]
19008    ///}
19009    /// ```
19010    /// </details>
19011    #[derive(
19012        ::serde::Deserialize,
19013        ::serde::Serialize,
19014        Clone,
19015        Copy,
19016        Debug,
19017        Eq,
19018        Hash,
19019        Ord,
19020        PartialEq,
19021        PartialOrd,
19022    )]
19023    pub enum ListEvmTokenBalancesNetwork {
19024        #[serde(rename = "base")]
19025        Base,
19026        #[serde(rename = "base-sepolia")]
19027        BaseSepolia,
19028        #[serde(rename = "ethereum")]
19029        Ethereum,
19030    }
19031    impl ::std::convert::From<&Self> for ListEvmTokenBalancesNetwork {
19032        fn from(value: &ListEvmTokenBalancesNetwork) -> Self {
19033            value.clone()
19034        }
19035    }
19036    impl ::std::fmt::Display for ListEvmTokenBalancesNetwork {
19037        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19038            match *self {
19039                Self::Base => f.write_str("base"),
19040                Self::BaseSepolia => f.write_str("base-sepolia"),
19041                Self::Ethereum => f.write_str("ethereum"),
19042            }
19043        }
19044    }
19045    impl ::std::str::FromStr for ListEvmTokenBalancesNetwork {
19046        type Err = self::error::ConversionError;
19047        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19048            match value {
19049                "base" => Ok(Self::Base),
19050                "base-sepolia" => Ok(Self::BaseSepolia),
19051                "ethereum" => Ok(Self::Ethereum),
19052                _ => Err("invalid value".into()),
19053            }
19054        }
19055    }
19056    impl ::std::convert::TryFrom<&str> for ListEvmTokenBalancesNetwork {
19057        type Error = self::error::ConversionError;
19058        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19059            value.parse()
19060        }
19061    }
19062    impl ::std::convert::TryFrom<&::std::string::String> for ListEvmTokenBalancesNetwork {
19063        type Error = self::error::ConversionError;
19064        fn try_from(
19065            value: &::std::string::String,
19066        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19067            value.parse()
19068        }
19069    }
19070    impl ::std::convert::TryFrom<::std::string::String> for ListEvmTokenBalancesNetwork {
19071        type Error = self::error::ConversionError;
19072        fn try_from(
19073            value: ::std::string::String,
19074        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19075            value.parse()
19076        }
19077    }
19078    ///`ListEvmTokenBalancesResponse`
19079    ///
19080    /// <details><summary>JSON schema</summary>
19081    ///
19082    /// ```json
19083    ///{
19084    ///  "allOf": [
19085    ///    {
19086    ///      "type": "object",
19087    ///      "required": [
19088    ///        "balances"
19089    ///      ],
19090    ///      "properties": {
19091    ///        "balances": {
19092    ///          "description": "The list of EVM token balances.",
19093    ///          "examples": [
19094    ///            [
19095    ///              {
19096    ///                "amount": {
19097    ///                  "amount": "1250000000000000000",
19098    ///                  "decimals": 18
19099    ///                },
19100    ///                "token": {
19101    ///                  "contractAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
19102    ///                  "name": "ether",
19103    ///                  "network": "base",
19104    ///                  "symbol": "ETH"
19105    ///                }
19106    ///              },
19107    ///              {
19108    ///                "amount": {
19109    ///                  "amount": "123456",
19110    ///                  "decimals": 6
19111    ///                },
19112    ///                "token": {
19113    ///                  "contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
19114    ///                  "name": "USD Coin",
19115    ///                  "network": "base",
19116    ///                  "symbol": "USDC"
19117    ///                }
19118    ///              }
19119    ///            ]
19120    ///          ],
19121    ///          "type": "array",
19122    ///          "items": {
19123    ///            "$ref": "#/components/schemas/TokenBalance"
19124    ///          }
19125    ///        }
19126    ///      }
19127    ///    },
19128    ///    {
19129    ///      "$ref": "#/components/schemas/ListResponse"
19130    ///    }
19131    ///  ]
19132    ///}
19133    /// ```
19134    /// </details>
19135    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19136    pub struct ListEvmTokenBalancesResponse {
19137        ///The list of EVM token balances.
19138        pub balances: ::std::vec::Vec<TokenBalance>,
19139        ///The token for the next page of items, if any.
19140        #[serde(
19141            rename = "nextPageToken",
19142            default,
19143            skip_serializing_if = "::std::option::Option::is_none"
19144        )]
19145        pub next_page_token: ::std::option::Option<::std::string::String>,
19146    }
19147    impl ::std::convert::From<&ListEvmTokenBalancesResponse> for ListEvmTokenBalancesResponse {
19148        fn from(value: &ListEvmTokenBalancesResponse) -> Self {
19149            value.clone()
19150        }
19151    }
19152    impl ListEvmTokenBalancesResponse {
19153        pub fn builder() -> builder::ListEvmTokenBalancesResponse {
19154            Default::default()
19155        }
19156    }
19157    ///`ListPoliciesResponse`
19158    ///
19159    /// <details><summary>JSON schema</summary>
19160    ///
19161    /// ```json
19162    ///{
19163    ///  "allOf": [
19164    ///    {
19165    ///      "type": "object",
19166    ///      "required": [
19167    ///        "policies"
19168    ///      ],
19169    ///      "properties": {
19170    ///        "policies": {
19171    ///          "description": "The list of policies.",
19172    ///          "type": "array",
19173    ///          "items": {
19174    ///            "$ref": "#/components/schemas/Policy"
19175    ///          }
19176    ///        }
19177    ///      }
19178    ///    },
19179    ///    {
19180    ///      "$ref": "#/components/schemas/ListResponse"
19181    ///    }
19182    ///  ]
19183    ///}
19184    /// ```
19185    /// </details>
19186    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19187    pub struct ListPoliciesResponse {
19188        ///The token for the next page of items, if any.
19189        #[serde(
19190            rename = "nextPageToken",
19191            default,
19192            skip_serializing_if = "::std::option::Option::is_none"
19193        )]
19194        pub next_page_token: ::std::option::Option<::std::string::String>,
19195        ///The list of policies.
19196        pub policies: ::std::vec::Vec<Policy>,
19197    }
19198    impl ::std::convert::From<&ListPoliciesResponse> for ListPoliciesResponse {
19199        fn from(value: &ListPoliciesResponse) -> Self {
19200            value.clone()
19201        }
19202    }
19203    impl ListPoliciesResponse {
19204        pub fn builder() -> builder::ListPoliciesResponse {
19205            Default::default()
19206        }
19207    }
19208    ///`ListPoliciesScope`
19209    ///
19210    /// <details><summary>JSON schema</summary>
19211    ///
19212    /// ```json
19213    ///{
19214    ///  "type": "string",
19215    ///  "enum": [
19216    ///    "project",
19217    ///    "account"
19218    ///  ]
19219    ///}
19220    /// ```
19221    /// </details>
19222    #[derive(
19223        ::serde::Deserialize,
19224        ::serde::Serialize,
19225        Clone,
19226        Copy,
19227        Debug,
19228        Eq,
19229        Hash,
19230        Ord,
19231        PartialEq,
19232        PartialOrd,
19233    )]
19234    pub enum ListPoliciesScope {
19235        #[serde(rename = "project")]
19236        Project,
19237        #[serde(rename = "account")]
19238        Account,
19239    }
19240    impl ::std::convert::From<&Self> for ListPoliciesScope {
19241        fn from(value: &ListPoliciesScope) -> Self {
19242            value.clone()
19243        }
19244    }
19245    impl ::std::fmt::Display for ListPoliciesScope {
19246        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19247            match *self {
19248                Self::Project => f.write_str("project"),
19249                Self::Account => f.write_str("account"),
19250            }
19251        }
19252    }
19253    impl ::std::str::FromStr for ListPoliciesScope {
19254        type Err = self::error::ConversionError;
19255        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19256            match value {
19257                "project" => Ok(Self::Project),
19258                "account" => Ok(Self::Account),
19259                _ => Err("invalid value".into()),
19260            }
19261        }
19262    }
19263    impl ::std::convert::TryFrom<&str> for ListPoliciesScope {
19264        type Error = self::error::ConversionError;
19265        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19266            value.parse()
19267        }
19268    }
19269    impl ::std::convert::TryFrom<&::std::string::String> for ListPoliciesScope {
19270        type Error = self::error::ConversionError;
19271        fn try_from(
19272            value: &::std::string::String,
19273        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19274            value.parse()
19275        }
19276    }
19277    impl ::std::convert::TryFrom<::std::string::String> for ListPoliciesScope {
19278        type Error = self::error::ConversionError;
19279        fn try_from(
19280            value: ::std::string::String,
19281        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19282            value.parse()
19283        }
19284    }
19285    ///`ListResponse`
19286    ///
19287    /// <details><summary>JSON schema</summary>
19288    ///
19289    /// ```json
19290    ///{
19291    ///  "type": "object",
19292    ///  "properties": {
19293    ///    "nextPageToken": {
19294    ///      "description": "The token for the next page of items, if any.",
19295    ///      "examples": [
19296    ///        "eyJsYXN0X2lkIjogImFiYzEyMyIsICJ0aW1lc3RhbXAiOiAxNzA3ODIzNzAxfQ=="
19297    ///      ],
19298    ///      "type": "string"
19299    ///    }
19300    ///  }
19301    ///}
19302    /// ```
19303    /// </details>
19304    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19305    pub struct ListResponse {
19306        ///The token for the next page of items, if any.
19307        #[serde(
19308            rename = "nextPageToken",
19309            default,
19310            skip_serializing_if = "::std::option::Option::is_none"
19311        )]
19312        pub next_page_token: ::std::option::Option<::std::string::String>,
19313    }
19314    impl ::std::convert::From<&ListResponse> for ListResponse {
19315        fn from(value: &ListResponse) -> Self {
19316            value.clone()
19317        }
19318    }
19319    impl ::std::default::Default for ListResponse {
19320        fn default() -> Self {
19321            Self {
19322                next_page_token: Default::default(),
19323            }
19324        }
19325    }
19326    impl ListResponse {
19327        pub fn builder() -> builder::ListResponse {
19328            Default::default()
19329        }
19330    }
19331    ///`ListSolanaAccountsResponse`
19332    ///
19333    /// <details><summary>JSON schema</summary>
19334    ///
19335    /// ```json
19336    ///{
19337    ///  "allOf": [
19338    ///    {
19339    ///      "type": "object",
19340    ///      "required": [
19341    ///        "accounts"
19342    ///      ],
19343    ///      "properties": {
19344    ///        "accounts": {
19345    ///          "description": "The list of Solana accounts.",
19346    ///          "type": "array",
19347    ///          "items": {
19348    ///            "$ref": "#/components/schemas/SolanaAccount"
19349    ///          }
19350    ///        }
19351    ///      }
19352    ///    },
19353    ///    {
19354    ///      "$ref": "#/components/schemas/ListResponse"
19355    ///    }
19356    ///  ]
19357    ///}
19358    /// ```
19359    /// </details>
19360    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19361    pub struct ListSolanaAccountsResponse {
19362        ///The list of Solana accounts.
19363        pub accounts: ::std::vec::Vec<SolanaAccount>,
19364        ///The token for the next page of items, if any.
19365        #[serde(
19366            rename = "nextPageToken",
19367            default,
19368            skip_serializing_if = "::std::option::Option::is_none"
19369        )]
19370        pub next_page_token: ::std::option::Option<::std::string::String>,
19371    }
19372    impl ::std::convert::From<&ListSolanaAccountsResponse> for ListSolanaAccountsResponse {
19373        fn from(value: &ListSolanaAccountsResponse) -> Self {
19374            value.clone()
19375        }
19376    }
19377    impl ListSolanaAccountsResponse {
19378        pub fn builder() -> builder::ListSolanaAccountsResponse {
19379            Default::default()
19380        }
19381    }
19382    ///`ListSolanaTokenBalancesAddress`
19383    ///
19384    /// <details><summary>JSON schema</summary>
19385    ///
19386    /// ```json
19387    ///{
19388    ///  "type": "string",
19389    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
19390    ///}
19391    /// ```
19392    /// </details>
19393    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19394    #[serde(transparent)]
19395    pub struct ListSolanaTokenBalancesAddress(::std::string::String);
19396    impl ::std::ops::Deref for ListSolanaTokenBalancesAddress {
19397        type Target = ::std::string::String;
19398        fn deref(&self) -> &::std::string::String {
19399            &self.0
19400        }
19401    }
19402    impl ::std::convert::From<ListSolanaTokenBalancesAddress> for ::std::string::String {
19403        fn from(value: ListSolanaTokenBalancesAddress) -> Self {
19404            value.0
19405        }
19406    }
19407    impl ::std::convert::From<&ListSolanaTokenBalancesAddress> for ListSolanaTokenBalancesAddress {
19408        fn from(value: &ListSolanaTokenBalancesAddress) -> Self {
19409            value.clone()
19410        }
19411    }
19412    impl ::std::str::FromStr for ListSolanaTokenBalancesAddress {
19413        type Err = self::error::ConversionError;
19414        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19415            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
19416                ::std::sync::LazyLock::new(|| {
19417                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
19418                });
19419            if PATTERN.find(value).is_none() {
19420                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
19421            }
19422            Ok(Self(value.to_string()))
19423        }
19424    }
19425    impl ::std::convert::TryFrom<&str> for ListSolanaTokenBalancesAddress {
19426        type Error = self::error::ConversionError;
19427        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19428            value.parse()
19429        }
19430    }
19431    impl ::std::convert::TryFrom<&::std::string::String> for ListSolanaTokenBalancesAddress {
19432        type Error = self::error::ConversionError;
19433        fn try_from(
19434            value: &::std::string::String,
19435        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19436            value.parse()
19437        }
19438    }
19439    impl ::std::convert::TryFrom<::std::string::String> for ListSolanaTokenBalancesAddress {
19440        type Error = self::error::ConversionError;
19441        fn try_from(
19442            value: ::std::string::String,
19443        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19444            value.parse()
19445        }
19446    }
19447    impl<'de> ::serde::Deserialize<'de> for ListSolanaTokenBalancesAddress {
19448        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
19449        where
19450            D: ::serde::Deserializer<'de>,
19451        {
19452            ::std::string::String::deserialize(deserializer)?
19453                .parse()
19454                .map_err(|e: self::error::ConversionError| {
19455                    <D::Error as ::serde::de::Error>::custom(e.to_string())
19456                })
19457        }
19458    }
19459    ///The name of the supported Solana networks in human-readable format.
19460    ///
19461    /// <details><summary>JSON schema</summary>
19462    ///
19463    /// ```json
19464    ///{
19465    ///  "description": "The name of the supported Solana networks in human-readable format.",
19466    ///  "examples": [
19467    ///    "solana"
19468    ///  ],
19469    ///  "type": "string",
19470    ///  "enum": [
19471    ///    "solana",
19472    ///    "solana-devnet"
19473    ///  ]
19474    ///}
19475    /// ```
19476    /// </details>
19477    #[derive(
19478        ::serde::Deserialize,
19479        ::serde::Serialize,
19480        Clone,
19481        Copy,
19482        Debug,
19483        Eq,
19484        Hash,
19485        Ord,
19486        PartialEq,
19487        PartialOrd,
19488    )]
19489    pub enum ListSolanaTokenBalancesNetwork {
19490        #[serde(rename = "solana")]
19491        Solana,
19492        #[serde(rename = "solana-devnet")]
19493        SolanaDevnet,
19494    }
19495    impl ::std::convert::From<&Self> for ListSolanaTokenBalancesNetwork {
19496        fn from(value: &ListSolanaTokenBalancesNetwork) -> Self {
19497            value.clone()
19498        }
19499    }
19500    impl ::std::fmt::Display for ListSolanaTokenBalancesNetwork {
19501        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19502            match *self {
19503                Self::Solana => f.write_str("solana"),
19504                Self::SolanaDevnet => f.write_str("solana-devnet"),
19505            }
19506        }
19507    }
19508    impl ::std::str::FromStr for ListSolanaTokenBalancesNetwork {
19509        type Err = self::error::ConversionError;
19510        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19511            match value {
19512                "solana" => Ok(Self::Solana),
19513                "solana-devnet" => Ok(Self::SolanaDevnet),
19514                _ => Err("invalid value".into()),
19515            }
19516        }
19517    }
19518    impl ::std::convert::TryFrom<&str> for ListSolanaTokenBalancesNetwork {
19519        type Error = self::error::ConversionError;
19520        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19521            value.parse()
19522        }
19523    }
19524    impl ::std::convert::TryFrom<&::std::string::String> for ListSolanaTokenBalancesNetwork {
19525        type Error = self::error::ConversionError;
19526        fn try_from(
19527            value: &::std::string::String,
19528        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19529            value.parse()
19530        }
19531    }
19532    impl ::std::convert::TryFrom<::std::string::String> for ListSolanaTokenBalancesNetwork {
19533        type Error = self::error::ConversionError;
19534        fn try_from(
19535            value: ::std::string::String,
19536        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19537            value.parse()
19538        }
19539    }
19540    ///`ListSolanaTokenBalancesResponse`
19541    ///
19542    /// <details><summary>JSON schema</summary>
19543    ///
19544    /// ```json
19545    ///{
19546    ///  "allOf": [
19547    ///    {
19548    ///      "type": "object",
19549    ///      "required": [
19550    ///        "balances"
19551    ///      ],
19552    ///      "properties": {
19553    ///        "balances": {
19554    ///          "description": "The list of Solana token balances.",
19555    ///          "examples": [
19556    ///            [
19557    ///              {
19558    ///                "amount": {
19559    ///                  "amount": "1250000000",
19560    ///                  "decimals": 9
19561    ///                },
19562    ///                "token": {
19563    ///                  "mintAddress": "So11111111111111111111111111111111111111111",
19564    ///                  "name": "Solana",
19565    ///                  "symbol": "SOL"
19566    ///                }
19567    ///              },
19568    ///              {
19569    ///                "amount": {
19570    ///                  "amount": "123456000",
19571    ///                  "decimals": 6
19572    ///                },
19573    ///                "token": {
19574    ///                  "mintAddress": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
19575    ///                  "name": "USD Coin",
19576    ///                  "symbol": "USDC"
19577    ///                }
19578    ///              }
19579    ///            ]
19580    ///          ],
19581    ///          "type": "array",
19582    ///          "items": {
19583    ///            "$ref": "#/components/schemas/SolanaTokenBalance"
19584    ///          }
19585    ///        }
19586    ///      }
19587    ///    },
19588    ///    {
19589    ///      "$ref": "#/components/schemas/ListResponse"
19590    ///    }
19591    ///  ]
19592    ///}
19593    /// ```
19594    /// </details>
19595    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19596    pub struct ListSolanaTokenBalancesResponse {
19597        ///The list of Solana token balances.
19598        pub balances: ::std::vec::Vec<SolanaTokenBalance>,
19599        ///The token for the next page of items, if any.
19600        #[serde(
19601            rename = "nextPageToken",
19602            default,
19603            skip_serializing_if = "::std::option::Option::is_none"
19604        )]
19605        pub next_page_token: ::std::option::Option<::std::string::String>,
19606    }
19607    impl ::std::convert::From<&ListSolanaTokenBalancesResponse> for ListSolanaTokenBalancesResponse {
19608        fn from(value: &ListSolanaTokenBalancesResponse) -> Self {
19609            value.clone()
19610        }
19611    }
19612    impl ListSolanaTokenBalancesResponse {
19613        pub fn builder() -> builder::ListSolanaTokenBalancesResponse {
19614            Default::default()
19615        }
19616    }
19617    ///`ListSpendPermissionsAddress`
19618    ///
19619    /// <details><summary>JSON schema</summary>
19620    ///
19621    /// ```json
19622    ///{
19623    ///  "type": "string",
19624    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
19625    ///}
19626    /// ```
19627    /// </details>
19628    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19629    #[serde(transparent)]
19630    pub struct ListSpendPermissionsAddress(::std::string::String);
19631    impl ::std::ops::Deref for ListSpendPermissionsAddress {
19632        type Target = ::std::string::String;
19633        fn deref(&self) -> &::std::string::String {
19634            &self.0
19635        }
19636    }
19637    impl ::std::convert::From<ListSpendPermissionsAddress> for ::std::string::String {
19638        fn from(value: ListSpendPermissionsAddress) -> Self {
19639            value.0
19640        }
19641    }
19642    impl ::std::convert::From<&ListSpendPermissionsAddress> for ListSpendPermissionsAddress {
19643        fn from(value: &ListSpendPermissionsAddress) -> Self {
19644            value.clone()
19645        }
19646    }
19647    impl ::std::str::FromStr for ListSpendPermissionsAddress {
19648        type Err = self::error::ConversionError;
19649        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19650            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
19651                ::std::sync::LazyLock::new(|| {
19652                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
19653                });
19654            if PATTERN.find(value).is_none() {
19655                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
19656            }
19657            Ok(Self(value.to_string()))
19658        }
19659    }
19660    impl ::std::convert::TryFrom<&str> for ListSpendPermissionsAddress {
19661        type Error = self::error::ConversionError;
19662        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19663            value.parse()
19664        }
19665    }
19666    impl ::std::convert::TryFrom<&::std::string::String> for ListSpendPermissionsAddress {
19667        type Error = self::error::ConversionError;
19668        fn try_from(
19669            value: &::std::string::String,
19670        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19671            value.parse()
19672        }
19673    }
19674    impl ::std::convert::TryFrom<::std::string::String> for ListSpendPermissionsAddress {
19675        type Error = self::error::ConversionError;
19676        fn try_from(
19677            value: ::std::string::String,
19678        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19679            value.parse()
19680        }
19681    }
19682    impl<'de> ::serde::Deserialize<'de> for ListSpendPermissionsAddress {
19683        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
19684        where
19685            D: ::serde::Deserializer<'de>,
19686        {
19687            ::std::string::String::deserialize(deserializer)?
19688                .parse()
19689                .map_err(|e: self::error::ConversionError| {
19690                    <D::Error as ::serde::de::Error>::custom(e.to_string())
19691                })
19692        }
19693    }
19694    ///`ListSpendPermissionsResponse`
19695    ///
19696    /// <details><summary>JSON schema</summary>
19697    ///
19698    /// ```json
19699    ///{
19700    ///  "allOf": [
19701    ///    {
19702    ///      "type": "object",
19703    ///      "required": [
19704    ///        "spendPermissions"
19705    ///      ],
19706    ///      "properties": {
19707    ///        "spendPermissions": {
19708    ///          "description": "The spend permissions for the smart account.",
19709    ///          "type": "array",
19710    ///          "items": {
19711    ///            "$ref": "#/components/schemas/SpendPermissionResponseObject"
19712    ///          }
19713    ///        }
19714    ///      }
19715    ///    },
19716    ///    {
19717    ///      "$ref": "#/components/schemas/ListResponse"
19718    ///    }
19719    ///  ]
19720    ///}
19721    /// ```
19722    /// </details>
19723    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19724    pub struct ListSpendPermissionsResponse {
19725        ///The token for the next page of items, if any.
19726        #[serde(
19727            rename = "nextPageToken",
19728            default,
19729            skip_serializing_if = "::std::option::Option::is_none"
19730        )]
19731        pub next_page_token: ::std::option::Option<::std::string::String>,
19732        ///The spend permissions for the smart account.
19733        #[serde(rename = "spendPermissions")]
19734        pub spend_permissions: ::std::vec::Vec<SpendPermissionResponseObject>,
19735    }
19736    impl ::std::convert::From<&ListSpendPermissionsResponse> for ListSpendPermissionsResponse {
19737        fn from(value: &ListSpendPermissionsResponse) -> Self {
19738            value.clone()
19739        }
19740    }
19741    impl ListSpendPermissionsResponse {
19742        pub fn builder() -> builder::ListSpendPermissionsResponse {
19743            Default::default()
19744        }
19745    }
19746    ///`ListTokensForAccountAddress`
19747    ///
19748    /// <details><summary>JSON schema</summary>
19749    ///
19750    /// ```json
19751    ///{
19752    ///  "type": "string",
19753    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
19754    ///}
19755    /// ```
19756    /// </details>
19757    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19758    #[serde(transparent)]
19759    pub struct ListTokensForAccountAddress(::std::string::String);
19760    impl ::std::ops::Deref for ListTokensForAccountAddress {
19761        type Target = ::std::string::String;
19762        fn deref(&self) -> &::std::string::String {
19763            &self.0
19764        }
19765    }
19766    impl ::std::convert::From<ListTokensForAccountAddress> for ::std::string::String {
19767        fn from(value: ListTokensForAccountAddress) -> Self {
19768            value.0
19769        }
19770    }
19771    impl ::std::convert::From<&ListTokensForAccountAddress> for ListTokensForAccountAddress {
19772        fn from(value: &ListTokensForAccountAddress) -> Self {
19773            value.clone()
19774        }
19775    }
19776    impl ::std::str::FromStr for ListTokensForAccountAddress {
19777        type Err = self::error::ConversionError;
19778        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19779            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
19780                ::std::sync::LazyLock::new(|| {
19781                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
19782                });
19783            if PATTERN.find(value).is_none() {
19784                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
19785            }
19786            Ok(Self(value.to_string()))
19787        }
19788    }
19789    impl ::std::convert::TryFrom<&str> for ListTokensForAccountAddress {
19790        type Error = self::error::ConversionError;
19791        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19792            value.parse()
19793        }
19794    }
19795    impl ::std::convert::TryFrom<&::std::string::String> for ListTokensForAccountAddress {
19796        type Error = self::error::ConversionError;
19797        fn try_from(
19798            value: &::std::string::String,
19799        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19800            value.parse()
19801        }
19802    }
19803    impl ::std::convert::TryFrom<::std::string::String> for ListTokensForAccountAddress {
19804        type Error = self::error::ConversionError;
19805        fn try_from(
19806            value: ::std::string::String,
19807        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19808            value.parse()
19809        }
19810    }
19811    impl<'de> ::serde::Deserialize<'de> for ListTokensForAccountAddress {
19812        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
19813        where
19814            D: ::serde::Deserializer<'de>,
19815        {
19816            ::std::string::String::deserialize(deserializer)?
19817                .parse()
19818                .map_err(|e: self::error::ConversionError| {
19819                    <D::Error as ::serde::de::Error>::custom(e.to_string())
19820                })
19821        }
19822    }
19823    ///`ListTokensForAccountNetwork`
19824    ///
19825    /// <details><summary>JSON schema</summary>
19826    ///
19827    /// ```json
19828    ///{
19829    ///  "type": "string",
19830    ///  "enum": [
19831    ///    "base",
19832    ///    "base-sepolia"
19833    ///  ]
19834    ///}
19835    /// ```
19836    /// </details>
19837    #[derive(
19838        ::serde::Deserialize,
19839        ::serde::Serialize,
19840        Clone,
19841        Copy,
19842        Debug,
19843        Eq,
19844        Hash,
19845        Ord,
19846        PartialEq,
19847        PartialOrd,
19848    )]
19849    pub enum ListTokensForAccountNetwork {
19850        #[serde(rename = "base")]
19851        Base,
19852        #[serde(rename = "base-sepolia")]
19853        BaseSepolia,
19854    }
19855    impl ::std::convert::From<&Self> for ListTokensForAccountNetwork {
19856        fn from(value: &ListTokensForAccountNetwork) -> Self {
19857            value.clone()
19858        }
19859    }
19860    impl ::std::fmt::Display for ListTokensForAccountNetwork {
19861        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
19862            match *self {
19863                Self::Base => f.write_str("base"),
19864                Self::BaseSepolia => f.write_str("base-sepolia"),
19865            }
19866        }
19867    }
19868    impl ::std::str::FromStr for ListTokensForAccountNetwork {
19869        type Err = self::error::ConversionError;
19870        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19871            match value {
19872                "base" => Ok(Self::Base),
19873                "base-sepolia" => Ok(Self::BaseSepolia),
19874                _ => Err("invalid value".into()),
19875            }
19876        }
19877    }
19878    impl ::std::convert::TryFrom<&str> for ListTokensForAccountNetwork {
19879        type Error = self::error::ConversionError;
19880        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
19881            value.parse()
19882        }
19883    }
19884    impl ::std::convert::TryFrom<&::std::string::String> for ListTokensForAccountNetwork {
19885        type Error = self::error::ConversionError;
19886        fn try_from(
19887            value: &::std::string::String,
19888        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19889            value.parse()
19890        }
19891    }
19892    impl ::std::convert::TryFrom<::std::string::String> for ListTokensForAccountNetwork {
19893        type Error = self::error::ConversionError;
19894        fn try_from(
19895            value: ::std::string::String,
19896        ) -> ::std::result::Result<Self, self::error::ConversionError> {
19897            value.parse()
19898        }
19899    }
19900    ///The criterion for the token mint addresses of a Solana transaction's SPL token transfer instructions.
19901    ///
19902    /// <details><summary>JSON schema</summary>
19903    ///
19904    /// ```json
19905    ///{
19906    ///  "title": "MintAddressCriterion",
19907    ///  "description": "The criterion for the token mint addresses of a Solana transaction's SPL token transfer instructions.",
19908    ///  "type": "object",
19909    ///  "required": [
19910    ///    "addresses",
19911    ///    "operator",
19912    ///    "type"
19913    ///  ],
19914    ///  "properties": {
19915    ///    "addresses": {
19916    ///      "description": "The Solana addresses that are compared to the list of token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
19917    ///      "examples": [
19918    ///        [
19919    ///          "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
19920    ///        ]
19921    ///      ],
19922    ///      "type": "array",
19923    ///      "items": {
19924    ///        "description": "The Solana address that is compared to the list of token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
19925    ///        "type": "string",
19926    ///        "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
19927    ///      }
19928    ///    },
19929    ///    "operator": {
19930    ///      "description": "The operator to use for the comparison. Each of the token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
19931    ///      "examples": [
19932    ///        "in"
19933    ///      ],
19934    ///      "type": "string",
19935    ///      "enum": [
19936    ///        "in",
19937    ///        "not in"
19938    ///      ]
19939    ///    },
19940    ///    "type": {
19941    ///      "description": "The type of criterion to use. This should be `mintAddress`.",
19942    ///      "examples": [
19943    ///        "mintAddress"
19944    ///      ],
19945    ///      "type": "string",
19946    ///      "enum": [
19947    ///        "mintAddress"
19948    ///      ]
19949    ///    }
19950    ///  },
19951    ///  "x-audience": "public"
19952    ///}
19953    /// ```
19954    /// </details>
19955    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
19956    pub struct MintAddressCriterion {
19957        ///The Solana addresses that are compared to the list of token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.
19958        pub addresses: ::std::vec::Vec<MintAddressCriterionAddressesItem>,
19959        ///The operator to use for the comparison. Each of the token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
19960        pub operator: MintAddressCriterionOperator,
19961        ///The type of criterion to use. This should be `mintAddress`.
19962        #[serde(rename = "type")]
19963        pub type_: MintAddressCriterionType,
19964    }
19965    impl ::std::convert::From<&MintAddressCriterion> for MintAddressCriterion {
19966        fn from(value: &MintAddressCriterion) -> Self {
19967            value.clone()
19968        }
19969    }
19970    impl MintAddressCriterion {
19971        pub fn builder() -> builder::MintAddressCriterion {
19972            Default::default()
19973        }
19974    }
19975    ///The Solana address that is compared to the list of token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.
19976    ///
19977    /// <details><summary>JSON schema</summary>
19978    ///
19979    /// ```json
19980    ///{
19981    ///  "description": "The Solana address that is compared to the list of token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
19982    ///  "type": "string",
19983    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
19984    ///}
19985    /// ```
19986    /// </details>
19987    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19988    #[serde(transparent)]
19989    pub struct MintAddressCriterionAddressesItem(::std::string::String);
19990    impl ::std::ops::Deref for MintAddressCriterionAddressesItem {
19991        type Target = ::std::string::String;
19992        fn deref(&self) -> &::std::string::String {
19993            &self.0
19994        }
19995    }
19996    impl ::std::convert::From<MintAddressCriterionAddressesItem> for ::std::string::String {
19997        fn from(value: MintAddressCriterionAddressesItem) -> Self {
19998            value.0
19999        }
20000    }
20001    impl ::std::convert::From<&MintAddressCriterionAddressesItem>
20002        for MintAddressCriterionAddressesItem
20003    {
20004        fn from(value: &MintAddressCriterionAddressesItem) -> Self {
20005            value.clone()
20006        }
20007    }
20008    impl ::std::str::FromStr for MintAddressCriterionAddressesItem {
20009        type Err = self::error::ConversionError;
20010        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20011            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
20012                ::std::sync::LazyLock::new(|| {
20013                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
20014                });
20015            if PATTERN.find(value).is_none() {
20016                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
20017            }
20018            Ok(Self(value.to_string()))
20019        }
20020    }
20021    impl ::std::convert::TryFrom<&str> for MintAddressCriterionAddressesItem {
20022        type Error = self::error::ConversionError;
20023        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20024            value.parse()
20025        }
20026    }
20027    impl ::std::convert::TryFrom<&::std::string::String> for MintAddressCriterionAddressesItem {
20028        type Error = self::error::ConversionError;
20029        fn try_from(
20030            value: &::std::string::String,
20031        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20032            value.parse()
20033        }
20034    }
20035    impl ::std::convert::TryFrom<::std::string::String> for MintAddressCriterionAddressesItem {
20036        type Error = self::error::ConversionError;
20037        fn try_from(
20038            value: ::std::string::String,
20039        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20040            value.parse()
20041        }
20042    }
20043    impl<'de> ::serde::Deserialize<'de> for MintAddressCriterionAddressesItem {
20044        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
20045        where
20046            D: ::serde::Deserializer<'de>,
20047        {
20048            ::std::string::String::deserialize(deserializer)?
20049                .parse()
20050                .map_err(|e: self::error::ConversionError| {
20051                    <D::Error as ::serde::de::Error>::custom(e.to_string())
20052                })
20053        }
20054    }
20055    ///The operator to use for the comparison. Each of the token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
20056    ///
20057    /// <details><summary>JSON schema</summary>
20058    ///
20059    /// ```json
20060    ///{
20061    ///  "description": "The operator to use for the comparison. Each of the token mint addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
20062    ///  "examples": [
20063    ///    "in"
20064    ///  ],
20065    ///  "type": "string",
20066    ///  "enum": [
20067    ///    "in",
20068    ///    "not in"
20069    ///  ]
20070    ///}
20071    /// ```
20072    /// </details>
20073    #[derive(
20074        ::serde::Deserialize,
20075        ::serde::Serialize,
20076        Clone,
20077        Copy,
20078        Debug,
20079        Eq,
20080        Hash,
20081        Ord,
20082        PartialEq,
20083        PartialOrd,
20084    )]
20085    pub enum MintAddressCriterionOperator {
20086        #[serde(rename = "in")]
20087        In,
20088        #[serde(rename = "not in")]
20089        NotIn,
20090    }
20091    impl ::std::convert::From<&Self> for MintAddressCriterionOperator {
20092        fn from(value: &MintAddressCriterionOperator) -> Self {
20093            value.clone()
20094        }
20095    }
20096    impl ::std::fmt::Display for MintAddressCriterionOperator {
20097        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20098            match *self {
20099                Self::In => f.write_str("in"),
20100                Self::NotIn => f.write_str("not in"),
20101            }
20102        }
20103    }
20104    impl ::std::str::FromStr for MintAddressCriterionOperator {
20105        type Err = self::error::ConversionError;
20106        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20107            match value {
20108                "in" => Ok(Self::In),
20109                "not in" => Ok(Self::NotIn),
20110                _ => Err("invalid value".into()),
20111            }
20112        }
20113    }
20114    impl ::std::convert::TryFrom<&str> for MintAddressCriterionOperator {
20115        type Error = self::error::ConversionError;
20116        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20117            value.parse()
20118        }
20119    }
20120    impl ::std::convert::TryFrom<&::std::string::String> for MintAddressCriterionOperator {
20121        type Error = self::error::ConversionError;
20122        fn try_from(
20123            value: &::std::string::String,
20124        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20125            value.parse()
20126        }
20127    }
20128    impl ::std::convert::TryFrom<::std::string::String> for MintAddressCriterionOperator {
20129        type Error = self::error::ConversionError;
20130        fn try_from(
20131            value: ::std::string::String,
20132        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20133            value.parse()
20134        }
20135    }
20136    ///The type of criterion to use. This should be `mintAddress`.
20137    ///
20138    /// <details><summary>JSON schema</summary>
20139    ///
20140    /// ```json
20141    ///{
20142    ///  "description": "The type of criterion to use. This should be `mintAddress`.",
20143    ///  "examples": [
20144    ///    "mintAddress"
20145    ///  ],
20146    ///  "type": "string",
20147    ///  "enum": [
20148    ///    "mintAddress"
20149    ///  ]
20150    ///}
20151    /// ```
20152    /// </details>
20153    #[derive(
20154        ::serde::Deserialize,
20155        ::serde::Serialize,
20156        Clone,
20157        Copy,
20158        Debug,
20159        Eq,
20160        Hash,
20161        Ord,
20162        PartialEq,
20163        PartialOrd,
20164    )]
20165    pub enum MintAddressCriterionType {
20166        #[serde(rename = "mintAddress")]
20167        MintAddress,
20168    }
20169    impl ::std::convert::From<&Self> for MintAddressCriterionType {
20170        fn from(value: &MintAddressCriterionType) -> Self {
20171            value.clone()
20172        }
20173    }
20174    impl ::std::fmt::Display for MintAddressCriterionType {
20175        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20176            match *self {
20177                Self::MintAddress => f.write_str("mintAddress"),
20178            }
20179        }
20180    }
20181    impl ::std::str::FromStr for MintAddressCriterionType {
20182        type Err = self::error::ConversionError;
20183        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20184            match value {
20185                "mintAddress" => Ok(Self::MintAddress),
20186                _ => Err("invalid value".into()),
20187            }
20188        }
20189    }
20190    impl ::std::convert::TryFrom<&str> for MintAddressCriterionType {
20191        type Error = self::error::ConversionError;
20192        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20193            value.parse()
20194        }
20195    }
20196    impl ::std::convert::TryFrom<&::std::string::String> for MintAddressCriterionType {
20197        type Error = self::error::ConversionError;
20198        fn try_from(
20199            value: &::std::string::String,
20200        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20201            value.parse()
20202        }
20203    }
20204    impl ::std::convert::TryFrom<::std::string::String> for MintAddressCriterionType {
20205        type Error = self::error::ConversionError;
20206        fn try_from(
20207            value: ::std::string::String,
20208        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20209            value.parse()
20210        }
20211    }
20212    ///A schema for specifying a criterion for the USD denominated asset transfer or exposure for a transaction. This includes native transfers, as well as token transfers.
20213    ///
20214    /// <details><summary>JSON schema</summary>
20215    ///
20216    /// ```json
20217    ///{
20218    ///  "title": "NetUSDChangeCriterion",
20219    ///  "description": "A schema for specifying a criterion for the USD denominated asset transfer or exposure for a transaction. This includes native transfers, as well as token transfers.",
20220    ///  "type": "object",
20221    ///  "required": [
20222    ///    "changeCents",
20223    ///    "operator",
20224    ///    "type"
20225    ///  ],
20226    ///  "properties": {
20227    ///    "changeCents": {
20228    ///      "description": "The amount of USD, in cents, that the total value of a transaction's asset transfer should be compared to.",
20229    ///      "examples": [
20230    ///        10000
20231    ///      ],
20232    ///      "type": "integer"
20233    ///    },
20234    ///    "operator": {
20235    ///      "description": "The operator to use for the comparison. The total value of a transaction's asset transfer will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.",
20236    ///      "examples": [
20237    ///        "<="
20238    ///      ],
20239    ///      "type": "string",
20240    ///      "enum": [
20241    ///        "GreaterThan",
20242    ///        "GreaterThanOrEqual",
20243    ///        "LessThan",
20244    ///        "LessThanOrEqual",
20245    ///        "Equal"
20246    ///      ]
20247    ///    },
20248    ///    "type": {
20249    ///      "description": "The type of criterion to use. This should be `netUSDChange`.",
20250    ///      "examples": [
20251    ///        "netUSDChange"
20252    ///      ],
20253    ///      "type": "string",
20254    ///      "enum": [
20255    ///        "netUSDChange"
20256    ///      ]
20257    ///    }
20258    ///  }
20259    ///}
20260    /// ```
20261    /// </details>
20262    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20263    pub struct NetUsdChangeCriterion {
20264        ///The amount of USD, in cents, that the total value of a transaction's asset transfer should be compared to.
20265        #[serde(rename = "changeCents")]
20266        pub change_cents: i64,
20267        ///The operator to use for the comparison. The total value of a transaction's asset transfer will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.
20268        pub operator: NetUsdChangeCriterionOperator,
20269        ///The type of criterion to use. This should be `netUSDChange`.
20270        #[serde(rename = "type")]
20271        pub type_: NetUsdChangeCriterionType,
20272    }
20273    impl ::std::convert::From<&NetUsdChangeCriterion> for NetUsdChangeCriterion {
20274        fn from(value: &NetUsdChangeCriterion) -> Self {
20275            value.clone()
20276        }
20277    }
20278    impl NetUsdChangeCriterion {
20279        pub fn builder() -> builder::NetUsdChangeCriterion {
20280            Default::default()
20281        }
20282    }
20283    ///The operator to use for the comparison. The total value of a transaction's asset transfer will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.
20284    ///
20285    /// <details><summary>JSON schema</summary>
20286    ///
20287    /// ```json
20288    ///{
20289    ///  "description": "The operator to use for the comparison. The total value of a transaction's asset transfer will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.",
20290    ///  "examples": [
20291    ///    "<="
20292    ///  ],
20293    ///  "type": "string",
20294    ///  "enum": [
20295    ///    "GreaterThan",
20296    ///    "GreaterThanOrEqual",
20297    ///    "LessThan",
20298    ///    "LessThanOrEqual",
20299    ///    "Equal"
20300    ///  ]
20301    ///}
20302    /// ```
20303    /// </details>
20304    #[derive(
20305        ::serde::Deserialize,
20306        ::serde::Serialize,
20307        Clone,
20308        Copy,
20309        Debug,
20310        Eq,
20311        Hash,
20312        Ord,
20313        PartialEq,
20314        PartialOrd,
20315    )]
20316    pub enum NetUsdChangeCriterionOperator {
20317        GreaterThan,
20318        GreaterThanOrEqual,
20319        LessThan,
20320        LessThanOrEqual,
20321        Equal,
20322    }
20323    impl ::std::convert::From<&Self> for NetUsdChangeCriterionOperator {
20324        fn from(value: &NetUsdChangeCriterionOperator) -> Self {
20325            value.clone()
20326        }
20327    }
20328    impl ::std::fmt::Display for NetUsdChangeCriterionOperator {
20329        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20330            match *self {
20331                Self::GreaterThan => f.write_str("GreaterThan"),
20332                Self::GreaterThanOrEqual => f.write_str("GreaterThanOrEqual"),
20333                Self::LessThan => f.write_str("LessThan"),
20334                Self::LessThanOrEqual => f.write_str("LessThanOrEqual"),
20335                Self::Equal => f.write_str("Equal"),
20336            }
20337        }
20338    }
20339    impl ::std::str::FromStr for NetUsdChangeCriterionOperator {
20340        type Err = self::error::ConversionError;
20341        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20342            match value {
20343                "GreaterThan" => Ok(Self::GreaterThan),
20344                "GreaterThanOrEqual" => Ok(Self::GreaterThanOrEqual),
20345                "LessThan" => Ok(Self::LessThan),
20346                "LessThanOrEqual" => Ok(Self::LessThanOrEqual),
20347                "Equal" => Ok(Self::Equal),
20348                _ => Err("invalid value".into()),
20349            }
20350        }
20351    }
20352    impl ::std::convert::TryFrom<&str> for NetUsdChangeCriterionOperator {
20353        type Error = self::error::ConversionError;
20354        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20355            value.parse()
20356        }
20357    }
20358    impl ::std::convert::TryFrom<&::std::string::String> for NetUsdChangeCriterionOperator {
20359        type Error = self::error::ConversionError;
20360        fn try_from(
20361            value: &::std::string::String,
20362        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20363            value.parse()
20364        }
20365    }
20366    impl ::std::convert::TryFrom<::std::string::String> for NetUsdChangeCriterionOperator {
20367        type Error = self::error::ConversionError;
20368        fn try_from(
20369            value: ::std::string::String,
20370        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20371            value.parse()
20372        }
20373    }
20374    ///The type of criterion to use. This should be `netUSDChange`.
20375    ///
20376    /// <details><summary>JSON schema</summary>
20377    ///
20378    /// ```json
20379    ///{
20380    ///  "description": "The type of criterion to use. This should be `netUSDChange`.",
20381    ///  "examples": [
20382    ///    "netUSDChange"
20383    ///  ],
20384    ///  "type": "string",
20385    ///  "enum": [
20386    ///    "netUSDChange"
20387    ///  ]
20388    ///}
20389    /// ```
20390    /// </details>
20391    #[derive(
20392        ::serde::Deserialize,
20393        ::serde::Serialize,
20394        Clone,
20395        Copy,
20396        Debug,
20397        Eq,
20398        Hash,
20399        Ord,
20400        PartialEq,
20401        PartialOrd,
20402    )]
20403    pub enum NetUsdChangeCriterionType {
20404        #[serde(rename = "netUSDChange")]
20405        NetUsdChange,
20406    }
20407    impl ::std::convert::From<&Self> for NetUsdChangeCriterionType {
20408        fn from(value: &NetUsdChangeCriterionType) -> Self {
20409            value.clone()
20410        }
20411    }
20412    impl ::std::fmt::Display for NetUsdChangeCriterionType {
20413        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20414            match *self {
20415                Self::NetUsdChange => f.write_str("netUSDChange"),
20416            }
20417        }
20418    }
20419    impl ::std::str::FromStr for NetUsdChangeCriterionType {
20420        type Err = self::error::ConversionError;
20421        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20422            match value {
20423                "netUSDChange" => Ok(Self::NetUsdChange),
20424                _ => Err("invalid value".into()),
20425            }
20426        }
20427    }
20428    impl ::std::convert::TryFrom<&str> for NetUsdChangeCriterionType {
20429        type Error = self::error::ConversionError;
20430        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20431            value.parse()
20432        }
20433    }
20434    impl ::std::convert::TryFrom<&::std::string::String> for NetUsdChangeCriterionType {
20435        type Error = self::error::ConversionError;
20436        fn try_from(
20437            value: &::std::string::String,
20438        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20439            value.parse()
20440        }
20441    }
20442    impl ::std::convert::TryFrom<::std::string::String> for NetUsdChangeCriterionType {
20443        type Error = self::error::ConversionError;
20444        fn try_from(
20445            value: ::std::string::String,
20446        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20447            value.parse()
20448        }
20449    }
20450    ///Information about an end user who authenticates using a third-party provider.
20451    ///
20452    /// <details><summary>JSON schema</summary>
20453    ///
20454    /// ```json
20455    ///{
20456    ///  "title": "OAuth2Authentication",
20457    ///  "description": "Information about an end user who authenticates using a third-party provider.",
20458    ///  "type": "object",
20459    ///  "required": [
20460    ///    "sub",
20461    ///    "type"
20462    ///  ],
20463    ///  "properties": {
20464    ///    "email": {
20465    ///      "description": "The email address of the end user contained within the user's ID token, if available from third-party OAuth2 provider's token exchange.",
20466    ///      "examples": [
20467    ///        "test.user@gmail.com"
20468    ///      ],
20469    ///      "type": "string"
20470    ///    },
20471    ///    "name": {
20472    ///      "description": "The full name of the end user if available from third-party OAuth2 provider's token exchange.",
20473    ///      "examples": [
20474    ///        "Test User"
20475    ///      ],
20476    ///      "type": "string"
20477    ///    },
20478    ///    "sub": {
20479    ///      "description": "The unique identifier for the end user that is captured in the `sub` claim of the JWT.",
20480    ///      "examples": [
20481    ///        "e051beeb-7163-4527-a5b6-35e301529ff2"
20482    ///      ],
20483    ///      "type": "string"
20484    ///    },
20485    ///    "type": {
20486    ///      "$ref": "#/components/schemas/OAuth2ProviderType"
20487    ///    },
20488    ///    "username": {
20489    ///      "description": "The username of the end user if available from third-party OAuth2 provider's token exchange.",
20490    ///      "examples": [
20491    ///        "test.user"
20492    ///      ],
20493    ///      "type": "string"
20494    ///    }
20495    ///  }
20496    ///}
20497    /// ```
20498    /// </details>
20499    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20500    pub struct OAuth2Authentication {
20501        ///The email address of the end user contained within the user's ID token, if available from third-party OAuth2 provider's token exchange.
20502        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20503        pub email: ::std::option::Option<::std::string::String>,
20504        ///The full name of the end user if available from third-party OAuth2 provider's token exchange.
20505        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20506        pub name: ::std::option::Option<::std::string::String>,
20507        ///The unique identifier for the end user that is captured in the `sub` claim of the JWT.
20508        pub sub: ::std::string::String,
20509        #[serde(rename = "type")]
20510        pub type_: OAuth2ProviderType,
20511        ///The username of the end user if available from third-party OAuth2 provider's token exchange.
20512        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20513        pub username: ::std::option::Option<::std::string::String>,
20514    }
20515    impl ::std::convert::From<&OAuth2Authentication> for OAuth2Authentication {
20516        fn from(value: &OAuth2Authentication) -> Self {
20517            value.clone()
20518        }
20519    }
20520    impl OAuth2Authentication {
20521        pub fn builder() -> builder::OAuth2Authentication {
20522            Default::default()
20523        }
20524    }
20525    ///The type of OAuth2 provider.
20526    ///
20527    /// <details><summary>JSON schema</summary>
20528    ///
20529    /// ```json
20530    ///{
20531    ///  "description": "The type of OAuth2 provider.",
20532    ///  "examples": [
20533    ///    "google"
20534    ///  ],
20535    ///  "type": "string",
20536    ///  "enum": [
20537    ///    "google",
20538    ///    "apple",
20539    ///    "x"
20540    ///  ]
20541    ///}
20542    /// ```
20543    /// </details>
20544    #[derive(
20545        ::serde::Deserialize,
20546        ::serde::Serialize,
20547        Clone,
20548        Copy,
20549        Debug,
20550        Eq,
20551        Hash,
20552        Ord,
20553        PartialEq,
20554        PartialOrd,
20555    )]
20556    pub enum OAuth2ProviderType {
20557        #[serde(rename = "google")]
20558        Google,
20559        #[serde(rename = "apple")]
20560        Apple,
20561        #[serde(rename = "x")]
20562        X,
20563    }
20564    impl ::std::convert::From<&Self> for OAuth2ProviderType {
20565        fn from(value: &OAuth2ProviderType) -> Self {
20566            value.clone()
20567        }
20568    }
20569    impl ::std::fmt::Display for OAuth2ProviderType {
20570        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
20571            match *self {
20572                Self::Google => f.write_str("google"),
20573                Self::Apple => f.write_str("apple"),
20574                Self::X => f.write_str("x"),
20575            }
20576        }
20577    }
20578    impl ::std::str::FromStr for OAuth2ProviderType {
20579        type Err = self::error::ConversionError;
20580        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20581            match value {
20582                "google" => Ok(Self::Google),
20583                "apple" => Ok(Self::Apple),
20584                "x" => Ok(Self::X),
20585                _ => Err("invalid value".into()),
20586            }
20587        }
20588    }
20589    impl ::std::convert::TryFrom<&str> for OAuth2ProviderType {
20590        type Error = self::error::ConversionError;
20591        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20592            value.parse()
20593        }
20594    }
20595    impl ::std::convert::TryFrom<&::std::string::String> for OAuth2ProviderType {
20596        type Error = self::error::ConversionError;
20597        fn try_from(
20598            value: &::std::string::String,
20599        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20600            value.parse()
20601        }
20602    }
20603    impl ::std::convert::TryFrom<::std::string::String> for OAuth2ProviderType {
20604        type Error = self::error::ConversionError;
20605        fn try_from(
20606            value: ::std::string::String,
20607        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20608            value.parse()
20609        }
20610    }
20611    ///Request to execute a SQL query against indexed blockchain data.
20612    ///
20613    /// <details><summary>JSON schema</summary>
20614    ///
20615    /// ```json
20616    ///{
20617    ///  "description": "Request to execute a SQL query against indexed blockchain data.",
20618    ///  "type": "object",
20619    ///  "required": [
20620    ///    "sql"
20621    ///  ],
20622    ///  "properties": {
20623    ///    "cache": {
20624    ///      "title": "Query result cache configuration",
20625    ///      "description": "Enables control over how often queries need to be fully re-executed on the backing store.\nThis can be useful in scenarios where API calls might be made frequently, API latency is critical, and some freshness lag (ex: 750ms, 2s, 5s) is tolerable.\nBy default, each query result is returned from cache so long as the result is from an identical query and less than 500ms old. This freshness tolerance can be modified upwards, to a maximum of 900000ms (i.e. 900s, 15m).\n",
20626    ///      "examples": [
20627    ///        {
20628    ///          "maxAgeMs": 1000
20629    ///        }
20630    ///      ],
20631    ///      "type": "object",
20632    ///      "properties": {
20633    ///        "maxAgeMs": {
20634    ///          "description": "The maximum tolerable staleness of the query result cache in milliseconds. If a previous execution result of an identical query is older than this age, the query will be re-executed. If the data is less than this age, the result will be returned from cache.",
20635    ///          "default": 500,
20636    ///          "examples": [
20637    ///            1000
20638    ///          ],
20639    ///          "type": "integer",
20640    ///          "maximum": 900000.0,
20641    ///          "minimum": 500.0
20642    ///        }
20643    ///      }
20644    ///    },
20645    ///    "sql": {
20646    ///      "description": "SQL query to execute against the indexed blockchain data.",
20647    ///      "examples": [
20648    ///        "SELECT block_number, transaction_hash FROM base.transactions WHERE block_number > 1000000 LIMIT 10"
20649    ///      ],
20650    ///      "type": "string",
20651    ///      "maxLength": 100000,
20652    ///      "minLength": 1
20653    ///    }
20654    ///  }
20655    ///}
20656    /// ```
20657    /// </details>
20658    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20659    pub struct OnchainDataQuery {
20660        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20661        pub cache: ::std::option::Option<QueryResultCacheConfiguration>,
20662        ///SQL query to execute against the indexed blockchain data.
20663        pub sql: OnchainDataQuerySql,
20664    }
20665    impl ::std::convert::From<&OnchainDataQuery> for OnchainDataQuery {
20666        fn from(value: &OnchainDataQuery) -> Self {
20667            value.clone()
20668        }
20669    }
20670    impl OnchainDataQuery {
20671        pub fn builder() -> builder::OnchainDataQuery {
20672            Default::default()
20673        }
20674    }
20675    ///SQL query to execute against the indexed blockchain data.
20676    ///
20677    /// <details><summary>JSON schema</summary>
20678    ///
20679    /// ```json
20680    ///{
20681    ///  "description": "SQL query to execute against the indexed blockchain data.",
20682    ///  "examples": [
20683    ///    "SELECT block_number, transaction_hash FROM base.transactions WHERE block_number > 1000000 LIMIT 10"
20684    ///  ],
20685    ///  "type": "string",
20686    ///  "maxLength": 100000,
20687    ///  "minLength": 1
20688    ///}
20689    /// ```
20690    /// </details>
20691    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
20692    #[serde(transparent)]
20693    pub struct OnchainDataQuerySql(::std::string::String);
20694    impl ::std::ops::Deref for OnchainDataQuerySql {
20695        type Target = ::std::string::String;
20696        fn deref(&self) -> &::std::string::String {
20697            &self.0
20698        }
20699    }
20700    impl ::std::convert::From<OnchainDataQuerySql> for ::std::string::String {
20701        fn from(value: OnchainDataQuerySql) -> Self {
20702            value.0
20703        }
20704    }
20705    impl ::std::convert::From<&OnchainDataQuerySql> for OnchainDataQuerySql {
20706        fn from(value: &OnchainDataQuerySql) -> Self {
20707            value.clone()
20708        }
20709    }
20710    impl ::std::str::FromStr for OnchainDataQuerySql {
20711        type Err = self::error::ConversionError;
20712        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20713            if value.chars().count() > 100000usize {
20714                return Err("longer than 100000 characters".into());
20715            }
20716            if value.chars().count() < 1usize {
20717                return Err("shorter than 1 characters".into());
20718            }
20719            Ok(Self(value.to_string()))
20720        }
20721    }
20722    impl ::std::convert::TryFrom<&str> for OnchainDataQuerySql {
20723        type Error = self::error::ConversionError;
20724        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
20725            value.parse()
20726        }
20727    }
20728    impl ::std::convert::TryFrom<&::std::string::String> for OnchainDataQuerySql {
20729        type Error = self::error::ConversionError;
20730        fn try_from(
20731            value: &::std::string::String,
20732        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20733            value.parse()
20734        }
20735    }
20736    impl ::std::convert::TryFrom<::std::string::String> for OnchainDataQuerySql {
20737        type Error = self::error::ConversionError;
20738        fn try_from(
20739            value: ::std::string::String,
20740        ) -> ::std::result::Result<Self, self::error::ConversionError> {
20741            value.parse()
20742        }
20743    }
20744    impl<'de> ::serde::Deserialize<'de> for OnchainDataQuerySql {
20745        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
20746        where
20747            D: ::serde::Deserializer<'de>,
20748        {
20749            ::std::string::String::deserialize(deserializer)?
20750                .parse()
20751                .map_err(|e: self::error::ConversionError| {
20752                    <D::Error as ::serde::de::Error>::custom(e.to_string())
20753                })
20754        }
20755    }
20756    ///Result of executing a SQL query.
20757    ///
20758    /// <details><summary>JSON schema</summary>
20759    ///
20760    /// ```json
20761    ///{
20762    ///  "description": "Result of executing a SQL query.",
20763    ///  "type": "object",
20764    ///  "properties": {
20765    ///    "metadata": {
20766    ///      "description": "Metadata about query execution.",
20767    ///      "examples": [
20768    ///        {
20769    ///          "cached": false,
20770    ///          "executionTimeMs": 145,
20771    ///          "executionTimestamp": "2025-01-01T00:00:00.000Z",
20772    ///          "rowCount": 2
20773    ///        }
20774    ///      ],
20775    ///      "type": "object",
20776    ///      "properties": {
20777    ///        "cached": {
20778    ///          "description": "Whether the result was served from the query result cache.",
20779    ///          "examples": [
20780    ///            false
20781    ///          ],
20782    ///          "type": "boolean"
20783    ///        },
20784    ///        "executionTimeMs": {
20785    ///          "description": "Query execution time in milliseconds.",
20786    ///          "examples": [
20787    ///            145
20788    ///          ],
20789    ///          "type": "integer"
20790    ///        },
20791    ///        "executionTimestamp": {
20792    ///          "description": "When the query result was executed against the backing store in RFC 3339 format.",
20793    ///          "examples": [
20794    ///            "2025-01-01T00:00:00.000Z"
20795    ///          ],
20796    ///          "type": "string",
20797    ///          "format": "date-time"
20798    ///        },
20799    ///        "rowCount": {
20800    ///          "description": "Number of rows returned.",
20801    ///          "examples": [
20802    ///            2
20803    ///          ],
20804    ///          "type": "integer"
20805    ///        }
20806    ///      }
20807    ///    },
20808    ///    "result": {
20809    ///      "description": "Query result as an array of objects representing rows.",
20810    ///      "examples": [
20811    ///        [
20812    ///          {
20813    ///            "amount": 1000000000000000000,
20814    ///            "event_signature": "Transfer(address,address,uint256)",
20815    ///            "from": "0x1234567890abcdef",
20816    ///            "to": "0x1234567890abcdef"
20817    ///          },
20818    ///          {
20819    ///            "amount": 2000000000000000000,
20820    ///            "event_signature": "Transfer(address,address,uint256)",
20821    ///            "from": "0x1234567890abcdef",
20822    ///            "to": "0x1234567890abcdef"
20823    ///          }
20824    ///        ]
20825    ///      ],
20826    ///      "type": "array",
20827    ///      "items": {
20828    ///        "description": "Row data with column names as keys.",
20829    ///        "examples": [
20830    ///          {
20831    ///            "amount": 1000000000000000000,
20832    ///            "event_signature": "Transfer(address,address,uint256)",
20833    ///            "from": "0x1234567890abcdef",
20834    ///            "to": "0x1234567890abcdef"
20835    ///          }
20836    ///        ],
20837    ///        "type": "object",
20838    ///        "additionalProperties": true
20839    ///      }
20840    ///    },
20841    ///    "schema": {
20842    ///      "description": "Schema information for the query result. This is a derived schema from the query result, so types may not match the underlying table.\n",
20843    ///      "examples": [
20844    ///        {
20845    ///          "columns": [
20846    ///            {
20847    ///              "name": "block_number",
20848    ///              "type": "UInt64"
20849    ///            },
20850    ///            {
20851    ///              "name": "transaction_hash",
20852    ///              "type": "String"
20853    ///            }
20854    ///          ]
20855    ///        }
20856    ///      ],
20857    ///      "type": "object",
20858    ///      "properties": {
20859    ///        "columns": {
20860    ///          "description": "Column definitions.",
20861    ///          "type": "array",
20862    ///          "items": {
20863    ///            "examples": [
20864    ///              {
20865    ///                "description": "The signature of the event.",
20866    ///                "name": "event_signature",
20867    ///                "type": "String"
20868    ///              }
20869    ///            ],
20870    ///            "type": "object",
20871    ///            "properties": {
20872    ///              "name": {
20873    ///                "description": "Column name.",
20874    ///                "type": "string"
20875    ///              },
20876    ///              "type": {
20877    ///                "description": "Column data type (ClickHouse types).",
20878    ///                "type": "string",
20879    ///                "enum": [
20880    ///                  "String",
20881    ///                  "UInt8",
20882    ///                  "UInt16",
20883    ///                  "UInt32",
20884    ///                  "UInt64",
20885    ///                  "UInt128",
20886    ///                  "UInt256",
20887    ///                  "Int8",
20888    ///                  "Int16",
20889    ///                  "Int32",
20890    ///                  "Int64",
20891    ///                  "Int128",
20892    ///                  "Int256",
20893    ///                  "Float32",
20894    ///                  "Float64",
20895    ///                  "Bool",
20896    ///                  "Date",
20897    ///                  "DateTime",
20898    ///                  "DateTime64",
20899    ///                  "UUID"
20900    ///                ]
20901    ///              }
20902    ///            }
20903    ///          }
20904    ///        }
20905    ///      }
20906    ///    }
20907    ///  }
20908    ///}
20909    /// ```
20910    /// </details>
20911    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20912    pub struct OnchainDataResult {
20913        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20914        pub metadata: ::std::option::Option<OnchainDataResultMetadata>,
20915        ///Query result as an array of objects representing rows.
20916        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
20917        pub result: ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
20918        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20919        pub schema: ::std::option::Option<OnchainDataResultSchema>,
20920    }
20921    impl ::std::convert::From<&OnchainDataResult> for OnchainDataResult {
20922        fn from(value: &OnchainDataResult) -> Self {
20923            value.clone()
20924        }
20925    }
20926    impl ::std::default::Default for OnchainDataResult {
20927        fn default() -> Self {
20928            Self {
20929                metadata: Default::default(),
20930                result: Default::default(),
20931                schema: Default::default(),
20932            }
20933        }
20934    }
20935    impl OnchainDataResult {
20936        pub fn builder() -> builder::OnchainDataResult {
20937            Default::default()
20938        }
20939    }
20940    ///Metadata about query execution.
20941    ///
20942    /// <details><summary>JSON schema</summary>
20943    ///
20944    /// ```json
20945    ///{
20946    ///  "description": "Metadata about query execution.",
20947    ///  "examples": [
20948    ///    {
20949    ///      "cached": false,
20950    ///      "executionTimeMs": 145,
20951    ///      "executionTimestamp": "2025-01-01T00:00:00.000Z",
20952    ///      "rowCount": 2
20953    ///    }
20954    ///  ],
20955    ///  "type": "object",
20956    ///  "properties": {
20957    ///    "cached": {
20958    ///      "description": "Whether the result was served from the query result cache.",
20959    ///      "examples": [
20960    ///        false
20961    ///      ],
20962    ///      "type": "boolean"
20963    ///    },
20964    ///    "executionTimeMs": {
20965    ///      "description": "Query execution time in milliseconds.",
20966    ///      "examples": [
20967    ///        145
20968    ///      ],
20969    ///      "type": "integer"
20970    ///    },
20971    ///    "executionTimestamp": {
20972    ///      "description": "When the query result was executed against the backing store in RFC 3339 format.",
20973    ///      "examples": [
20974    ///        "2025-01-01T00:00:00.000Z"
20975    ///      ],
20976    ///      "type": "string",
20977    ///      "format": "date-time"
20978    ///    },
20979    ///    "rowCount": {
20980    ///      "description": "Number of rows returned.",
20981    ///      "examples": [
20982    ///        2
20983    ///      ],
20984    ///      "type": "integer"
20985    ///    }
20986    ///  }
20987    ///}
20988    /// ```
20989    /// </details>
20990    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
20991    pub struct OnchainDataResultMetadata {
20992        ///Whether the result was served from the query result cache.
20993        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
20994        pub cached: ::std::option::Option<bool>,
20995        ///Query execution time in milliseconds.
20996        #[serde(
20997            rename = "executionTimeMs",
20998            default,
20999            skip_serializing_if = "::std::option::Option::is_none"
21000        )]
21001        pub execution_time_ms: ::std::option::Option<i64>,
21002        ///When the query result was executed against the backing store in RFC 3339 format.
21003        #[serde(
21004            rename = "executionTimestamp",
21005            default,
21006            skip_serializing_if = "::std::option::Option::is_none"
21007        )]
21008        pub execution_timestamp: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
21009        ///Number of rows returned.
21010        #[serde(
21011            rename = "rowCount",
21012            default,
21013            skip_serializing_if = "::std::option::Option::is_none"
21014        )]
21015        pub row_count: ::std::option::Option<i64>,
21016    }
21017    impl ::std::convert::From<&OnchainDataResultMetadata> for OnchainDataResultMetadata {
21018        fn from(value: &OnchainDataResultMetadata) -> Self {
21019            value.clone()
21020        }
21021    }
21022    impl ::std::default::Default for OnchainDataResultMetadata {
21023        fn default() -> Self {
21024            Self {
21025                cached: Default::default(),
21026                execution_time_ms: Default::default(),
21027                execution_timestamp: Default::default(),
21028                row_count: Default::default(),
21029            }
21030        }
21031    }
21032    impl OnchainDataResultMetadata {
21033        pub fn builder() -> builder::OnchainDataResultMetadata {
21034            Default::default()
21035        }
21036    }
21037    /**Schema information for the query result. This is a derived schema from the query result, so types may not match the underlying table.
21038     */
21039    ///
21040    /// <details><summary>JSON schema</summary>
21041    ///
21042    /// ```json
21043    ///{
21044    ///  "description": "Schema information for the query result. This is a derived schema from the query result, so types may not match the underlying table.\n",
21045    ///  "examples": [
21046    ///    {
21047    ///      "columns": [
21048    ///        {
21049    ///          "name": "block_number",
21050    ///          "type": "UInt64"
21051    ///        },
21052    ///        {
21053    ///          "name": "transaction_hash",
21054    ///          "type": "String"
21055    ///        }
21056    ///      ]
21057    ///    }
21058    ///  ],
21059    ///  "type": "object",
21060    ///  "properties": {
21061    ///    "columns": {
21062    ///      "description": "Column definitions.",
21063    ///      "type": "array",
21064    ///      "items": {
21065    ///        "examples": [
21066    ///          {
21067    ///            "description": "The signature of the event.",
21068    ///            "name": "event_signature",
21069    ///            "type": "String"
21070    ///          }
21071    ///        ],
21072    ///        "type": "object",
21073    ///        "properties": {
21074    ///          "name": {
21075    ///            "description": "Column name.",
21076    ///            "type": "string"
21077    ///          },
21078    ///          "type": {
21079    ///            "description": "Column data type (ClickHouse types).",
21080    ///            "type": "string",
21081    ///            "enum": [
21082    ///              "String",
21083    ///              "UInt8",
21084    ///              "UInt16",
21085    ///              "UInt32",
21086    ///              "UInt64",
21087    ///              "UInt128",
21088    ///              "UInt256",
21089    ///              "Int8",
21090    ///              "Int16",
21091    ///              "Int32",
21092    ///              "Int64",
21093    ///              "Int128",
21094    ///              "Int256",
21095    ///              "Float32",
21096    ///              "Float64",
21097    ///              "Bool",
21098    ///              "Date",
21099    ///              "DateTime",
21100    ///              "DateTime64",
21101    ///              "UUID"
21102    ///            ]
21103    ///          }
21104    ///        }
21105    ///      }
21106    ///    }
21107    ///  }
21108    ///}
21109    /// ```
21110    /// </details>
21111    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21112    pub struct OnchainDataResultSchema {
21113        ///Column definitions.
21114        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
21115        pub columns: ::std::vec::Vec<OnchainDataResultSchemaColumnsItem>,
21116    }
21117    impl ::std::convert::From<&OnchainDataResultSchema> for OnchainDataResultSchema {
21118        fn from(value: &OnchainDataResultSchema) -> Self {
21119            value.clone()
21120        }
21121    }
21122    impl ::std::default::Default for OnchainDataResultSchema {
21123        fn default() -> Self {
21124            Self {
21125                columns: Default::default(),
21126            }
21127        }
21128    }
21129    impl OnchainDataResultSchema {
21130        pub fn builder() -> builder::OnchainDataResultSchema {
21131            Default::default()
21132        }
21133    }
21134    ///`OnchainDataResultSchemaColumnsItem`
21135    ///
21136    /// <details><summary>JSON schema</summary>
21137    ///
21138    /// ```json
21139    ///{
21140    ///  "examples": [
21141    ///    {
21142    ///      "description": "The signature of the event.",
21143    ///      "name": "event_signature",
21144    ///      "type": "String"
21145    ///    }
21146    ///  ],
21147    ///  "type": "object",
21148    ///  "properties": {
21149    ///    "name": {
21150    ///      "description": "Column name.",
21151    ///      "type": "string"
21152    ///    },
21153    ///    "type": {
21154    ///      "description": "Column data type (ClickHouse types).",
21155    ///      "type": "string",
21156    ///      "enum": [
21157    ///        "String",
21158    ///        "UInt8",
21159    ///        "UInt16",
21160    ///        "UInt32",
21161    ///        "UInt64",
21162    ///        "UInt128",
21163    ///        "UInt256",
21164    ///        "Int8",
21165    ///        "Int16",
21166    ///        "Int32",
21167    ///        "Int64",
21168    ///        "Int128",
21169    ///        "Int256",
21170    ///        "Float32",
21171    ///        "Float64",
21172    ///        "Bool",
21173    ///        "Date",
21174    ///        "DateTime",
21175    ///        "DateTime64",
21176    ///        "UUID"
21177    ///      ]
21178    ///    }
21179    ///  }
21180    ///}
21181    /// ```
21182    /// </details>
21183    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21184    pub struct OnchainDataResultSchemaColumnsItem {
21185        ///Column name.
21186        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
21187        pub name: ::std::option::Option<::std::string::String>,
21188        ///Column data type (ClickHouse types).
21189        #[serde(
21190            rename = "type",
21191            default,
21192            skip_serializing_if = "::std::option::Option::is_none"
21193        )]
21194        pub type_: ::std::option::Option<OnchainDataResultSchemaColumnsItemType>,
21195    }
21196    impl ::std::convert::From<&OnchainDataResultSchemaColumnsItem>
21197        for OnchainDataResultSchemaColumnsItem
21198    {
21199        fn from(value: &OnchainDataResultSchemaColumnsItem) -> Self {
21200            value.clone()
21201        }
21202    }
21203    impl ::std::default::Default for OnchainDataResultSchemaColumnsItem {
21204        fn default() -> Self {
21205            Self {
21206                name: Default::default(),
21207                type_: Default::default(),
21208            }
21209        }
21210    }
21211    impl OnchainDataResultSchemaColumnsItem {
21212        pub fn builder() -> builder::OnchainDataResultSchemaColumnsItem {
21213            Default::default()
21214        }
21215    }
21216    ///Column data type (ClickHouse types).
21217    ///
21218    /// <details><summary>JSON schema</summary>
21219    ///
21220    /// ```json
21221    ///{
21222    ///  "description": "Column data type (ClickHouse types).",
21223    ///  "type": "string",
21224    ///  "enum": [
21225    ///    "String",
21226    ///    "UInt8",
21227    ///    "UInt16",
21228    ///    "UInt32",
21229    ///    "UInt64",
21230    ///    "UInt128",
21231    ///    "UInt256",
21232    ///    "Int8",
21233    ///    "Int16",
21234    ///    "Int32",
21235    ///    "Int64",
21236    ///    "Int128",
21237    ///    "Int256",
21238    ///    "Float32",
21239    ///    "Float64",
21240    ///    "Bool",
21241    ///    "Date",
21242    ///    "DateTime",
21243    ///    "DateTime64",
21244    ///    "UUID"
21245    ///  ]
21246    ///}
21247    /// ```
21248    /// </details>
21249    #[derive(
21250        ::serde::Deserialize,
21251        ::serde::Serialize,
21252        Clone,
21253        Copy,
21254        Debug,
21255        Eq,
21256        Hash,
21257        Ord,
21258        PartialEq,
21259        PartialOrd,
21260    )]
21261    pub enum OnchainDataResultSchemaColumnsItemType {
21262        String,
21263        UInt8,
21264        UInt16,
21265        UInt32,
21266        UInt64,
21267        UInt128,
21268        UInt256,
21269        Int8,
21270        Int16,
21271        Int32,
21272        Int64,
21273        Int128,
21274        Int256,
21275        Float32,
21276        Float64,
21277        Bool,
21278        Date,
21279        DateTime,
21280        DateTime64,
21281        #[serde(rename = "UUID")]
21282        Uuid,
21283    }
21284    impl ::std::convert::From<&Self> for OnchainDataResultSchemaColumnsItemType {
21285        fn from(value: &OnchainDataResultSchemaColumnsItemType) -> Self {
21286            value.clone()
21287        }
21288    }
21289    impl ::std::fmt::Display for OnchainDataResultSchemaColumnsItemType {
21290        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21291            match *self {
21292                Self::String => f.write_str("String"),
21293                Self::UInt8 => f.write_str("UInt8"),
21294                Self::UInt16 => f.write_str("UInt16"),
21295                Self::UInt32 => f.write_str("UInt32"),
21296                Self::UInt64 => f.write_str("UInt64"),
21297                Self::UInt128 => f.write_str("UInt128"),
21298                Self::UInt256 => f.write_str("UInt256"),
21299                Self::Int8 => f.write_str("Int8"),
21300                Self::Int16 => f.write_str("Int16"),
21301                Self::Int32 => f.write_str("Int32"),
21302                Self::Int64 => f.write_str("Int64"),
21303                Self::Int128 => f.write_str("Int128"),
21304                Self::Int256 => f.write_str("Int256"),
21305                Self::Float32 => f.write_str("Float32"),
21306                Self::Float64 => f.write_str("Float64"),
21307                Self::Bool => f.write_str("Bool"),
21308                Self::Date => f.write_str("Date"),
21309                Self::DateTime => f.write_str("DateTime"),
21310                Self::DateTime64 => f.write_str("DateTime64"),
21311                Self::Uuid => f.write_str("UUID"),
21312            }
21313        }
21314    }
21315    impl ::std::str::FromStr for OnchainDataResultSchemaColumnsItemType {
21316        type Err = self::error::ConversionError;
21317        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21318            match value {
21319                "String" => Ok(Self::String),
21320                "UInt8" => Ok(Self::UInt8),
21321                "UInt16" => Ok(Self::UInt16),
21322                "UInt32" => Ok(Self::UInt32),
21323                "UInt64" => Ok(Self::UInt64),
21324                "UInt128" => Ok(Self::UInt128),
21325                "UInt256" => Ok(Self::UInt256),
21326                "Int8" => Ok(Self::Int8),
21327                "Int16" => Ok(Self::Int16),
21328                "Int32" => Ok(Self::Int32),
21329                "Int64" => Ok(Self::Int64),
21330                "Int128" => Ok(Self::Int128),
21331                "Int256" => Ok(Self::Int256),
21332                "Float32" => Ok(Self::Float32),
21333                "Float64" => Ok(Self::Float64),
21334                "Bool" => Ok(Self::Bool),
21335                "Date" => Ok(Self::Date),
21336                "DateTime" => Ok(Self::DateTime),
21337                "DateTime64" => Ok(Self::DateTime64),
21338                "UUID" => Ok(Self::Uuid),
21339                _ => Err("invalid value".into()),
21340            }
21341        }
21342    }
21343    impl ::std::convert::TryFrom<&str> for OnchainDataResultSchemaColumnsItemType {
21344        type Error = self::error::ConversionError;
21345        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21346            value.parse()
21347        }
21348    }
21349    impl ::std::convert::TryFrom<&::std::string::String> for OnchainDataResultSchemaColumnsItemType {
21350        type Error = self::error::ConversionError;
21351        fn try_from(
21352            value: &::std::string::String,
21353        ) -> ::std::result::Result<Self, self::error::ConversionError> {
21354            value.parse()
21355        }
21356    }
21357    impl ::std::convert::TryFrom<::std::string::String> for OnchainDataResultSchemaColumnsItemType {
21358        type Error = self::error::ConversionError;
21359        fn try_from(
21360            value: ::std::string::String,
21361        ) -> ::std::result::Result<Self, self::error::ConversionError> {
21362            value.parse()
21363        }
21364    }
21365    ///An Onramp order.
21366    ///
21367    /// <details><summary>JSON schema</summary>
21368    ///
21369    /// ```json
21370    ///{
21371    ///  "description": "An Onramp order.",
21372    ///  "type": "object",
21373    ///  "required": [
21374    ///    "createdAt",
21375    ///    "destinationAddress",
21376    ///    "destinationNetwork",
21377    ///    "exchangeRate",
21378    ///    "fees",
21379    ///    "orderId",
21380    ///    "paymentCurrency",
21381    ///    "paymentMethod",
21382    ///    "paymentSubtotal",
21383    ///    "paymentTotal",
21384    ///    "purchaseAmount",
21385    ///    "purchaseCurrency",
21386    ///    "status",
21387    ///    "updatedAt"
21388    ///  ],
21389    ///  "properties": {
21390    ///    "createdAt": {
21391    ///      "description": "The date and time the order was created.",
21392    ///      "examples": [
21393    ///        "2025-04-24T00:00:00Z"
21394    ///      ],
21395    ///      "type": "string"
21396    ///    },
21397    ///    "destinationAddress": {
21398    ///      "description": "The destination address to send the crypto to.",
21399    ///      "examples": [
21400    ///        "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
21401    ///      ],
21402    ///      "type": "string"
21403    ///    },
21404    ///    "destinationNetwork": {
21405    ///      "description": "The network to send the crypto on.",
21406    ///      "examples": [
21407    ///        "base"
21408    ///      ],
21409    ///      "type": "string"
21410    ///    },
21411    ///    "exchangeRate": {
21412    ///      "description": "The exchange rate used to convert fiat to crypto i.e. the crypto value of one fiat.",
21413    ///      "examples": [
21414    ///        "1"
21415    ///      ],
21416    ///      "type": "string"
21417    ///    },
21418    ///    "fees": {
21419    ///      "description": "The fees associated with the order.",
21420    ///      "examples": [
21421    ///        [
21422    ///          {
21423    ///            "amount": "0.5",
21424    ///            "currency": "USD",
21425    ///            "type": "FEE_TYPE_EXCHANGE"
21426    ///          },
21427    ///          {
21428    ///            "amount": "0.25",
21429    ///            "currency": "USD",
21430    ///            "type": "FEE_TYPE_NETWORK"
21431    ///          }
21432    ///        ]
21433    ///      ],
21434    ///      "type": "array",
21435    ///      "items": {
21436    ///        "$ref": "#/components/schemas/OnrampOrderFee"
21437    ///      }
21438    ///    },
21439    ///    "orderId": {
21440    ///      "description": "The ID of the onramp order.",
21441    ///      "examples": [
21442    ///        "123e4567-e89b-12d3-a456-426614174000"
21443    ///      ],
21444    ///      "type": "string"
21445    ///    },
21446    ///    "partnerUserRef": {
21447    ///      "description": "The partner user reference ID.",
21448    ///      "examples": [
21449    ///        "user123"
21450    ///      ],
21451    ///      "type": "string"
21452    ///    },
21453    ///    "paymentCurrency": {
21454    ///      "description": "The fiat currency to be converted to crypto.",
21455    ///      "examples": [
21456    ///        "USD"
21457    ///      ],
21458    ///      "type": "string"
21459    ///    },
21460    ///    "paymentMethod": {
21461    ///      "$ref": "#/components/schemas/OnrampOrderPaymentMethodTypeId"
21462    ///    },
21463    ///    "paymentSubtotal": {
21464    ///      "description": "The amount of fiat to be converted to crypto.",
21465    ///      "examples": [
21466    ///        "100"
21467    ///      ],
21468    ///      "type": "string"
21469    ///    },
21470    ///    "paymentTotal": {
21471    ///      "description": "The total amount of fiat to be paid, inclusive of any fees.",
21472    ///      "examples": [
21473    ///        "100.75"
21474    ///      ],
21475    ///      "type": "string"
21476    ///    },
21477    ///    "purchaseAmount": {
21478    ///      "description": "The amount of crypto to be purchased.",
21479    ///      "examples": [
21480    ///        "100.000000"
21481    ///      ],
21482    ///      "type": "string"
21483    ///    },
21484    ///    "purchaseCurrency": {
21485    ///      "description": "The crypto currency to be purchased.",
21486    ///      "examples": [
21487    ///        "USDC"
21488    ///      ],
21489    ///      "type": "string"
21490    ///    },
21491    ///    "status": {
21492    ///      "$ref": "#/components/schemas/OnrampOrderStatus"
21493    ///    },
21494    ///    "txHash": {
21495    ///      "description": "The transaction hash of the order (only available once crypto has been sent).",
21496    ///      "examples": [
21497    ///        "0x363cd3b3d4f49497cf5076150cd709307b90e9fc897fdd623546ea7b9313cecb"
21498    ///      ],
21499    ///      "type": "string"
21500    ///    },
21501    ///    "updatedAt": {
21502    ///      "description": "The date and time the order was last updated.",
21503    ///      "examples": [
21504    ///        "2025-04-24T00:00:00Z"
21505    ///      ],
21506    ///      "type": "string"
21507    ///    }
21508    ///  }
21509    ///}
21510    /// ```
21511    /// </details>
21512    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21513    pub struct OnrampOrder {
21514        ///The date and time the order was created.
21515        #[serde(rename = "createdAt")]
21516        pub created_at: ::std::string::String,
21517        ///The destination address to send the crypto to.
21518        #[serde(rename = "destinationAddress")]
21519        pub destination_address: ::std::string::String,
21520        ///The network to send the crypto on.
21521        #[serde(rename = "destinationNetwork")]
21522        pub destination_network: ::std::string::String,
21523        ///The exchange rate used to convert fiat to crypto i.e. the crypto value of one fiat.
21524        #[serde(rename = "exchangeRate")]
21525        pub exchange_rate: ::std::string::String,
21526        ///The fees associated with the order.
21527        pub fees: ::std::vec::Vec<OnrampOrderFee>,
21528        ///The ID of the onramp order.
21529        #[serde(rename = "orderId")]
21530        pub order_id: ::std::string::String,
21531        ///The partner user reference ID.
21532        #[serde(
21533            rename = "partnerUserRef",
21534            default,
21535            skip_serializing_if = "::std::option::Option::is_none"
21536        )]
21537        pub partner_user_ref: ::std::option::Option<::std::string::String>,
21538        ///The fiat currency to be converted to crypto.
21539        #[serde(rename = "paymentCurrency")]
21540        pub payment_currency: ::std::string::String,
21541        #[serde(rename = "paymentMethod")]
21542        pub payment_method: OnrampOrderPaymentMethodTypeId,
21543        ///The amount of fiat to be converted to crypto.
21544        #[serde(rename = "paymentSubtotal")]
21545        pub payment_subtotal: ::std::string::String,
21546        ///The total amount of fiat to be paid, inclusive of any fees.
21547        #[serde(rename = "paymentTotal")]
21548        pub payment_total: ::std::string::String,
21549        ///The amount of crypto to be purchased.
21550        #[serde(rename = "purchaseAmount")]
21551        pub purchase_amount: ::std::string::String,
21552        ///The crypto currency to be purchased.
21553        #[serde(rename = "purchaseCurrency")]
21554        pub purchase_currency: ::std::string::String,
21555        pub status: OnrampOrderStatus,
21556        ///The transaction hash of the order (only available once crypto has been sent).
21557        #[serde(
21558            rename = "txHash",
21559            default,
21560            skip_serializing_if = "::std::option::Option::is_none"
21561        )]
21562        pub tx_hash: ::std::option::Option<::std::string::String>,
21563        ///The date and time the order was last updated.
21564        #[serde(rename = "updatedAt")]
21565        pub updated_at: ::std::string::String,
21566    }
21567    impl ::std::convert::From<&OnrampOrder> for OnrampOrder {
21568        fn from(value: &OnrampOrder) -> Self {
21569            value.clone()
21570        }
21571    }
21572    impl OnrampOrder {
21573        pub fn builder() -> builder::OnrampOrder {
21574            Default::default()
21575        }
21576    }
21577    ///A fee associated with an order.
21578    ///
21579    /// <details><summary>JSON schema</summary>
21580    ///
21581    /// ```json
21582    ///{
21583    ///  "description": "A fee associated with an order.",
21584    ///  "type": "object",
21585    ///  "required": [
21586    ///    "amount",
21587    ///    "currency",
21588    ///    "type"
21589    ///  ],
21590    ///  "properties": {
21591    ///    "amount": {
21592    ///      "description": "The amount of the fee.",
21593    ///      "examples": [
21594    ///        "0.95"
21595    ///      ],
21596    ///      "type": "string"
21597    ///    },
21598    ///    "currency": {
21599    ///      "description": "The currency of the fee.",
21600    ///      "examples": [
21601    ///        "USDC"
21602    ///      ],
21603    ///      "type": "string"
21604    ///    },
21605    ///    "type": {
21606    ///      "description": "The type of fee.",
21607    ///      "examples": [
21608    ///        "FEE_TYPE_NETWORK"
21609    ///      ],
21610    ///      "type": "string",
21611    ///      "enum": [
21612    ///        "FEE_TYPE_NETWORK",
21613    ///        "FEE_TYPE_EXCHANGE"
21614    ///      ]
21615    ///    }
21616    ///  }
21617    ///}
21618    /// ```
21619    /// </details>
21620    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21621    pub struct OnrampOrderFee {
21622        ///The amount of the fee.
21623        pub amount: ::std::string::String,
21624        ///The currency of the fee.
21625        pub currency: ::std::string::String,
21626        ///The type of fee.
21627        #[serde(rename = "type")]
21628        pub type_: OnrampOrderFeeType,
21629    }
21630    impl ::std::convert::From<&OnrampOrderFee> for OnrampOrderFee {
21631        fn from(value: &OnrampOrderFee) -> Self {
21632            value.clone()
21633        }
21634    }
21635    impl OnrampOrderFee {
21636        pub fn builder() -> builder::OnrampOrderFee {
21637            Default::default()
21638        }
21639    }
21640    ///The type of fee.
21641    ///
21642    /// <details><summary>JSON schema</summary>
21643    ///
21644    /// ```json
21645    ///{
21646    ///  "description": "The type of fee.",
21647    ///  "examples": [
21648    ///    "FEE_TYPE_NETWORK"
21649    ///  ],
21650    ///  "type": "string",
21651    ///  "enum": [
21652    ///    "FEE_TYPE_NETWORK",
21653    ///    "FEE_TYPE_EXCHANGE"
21654    ///  ]
21655    ///}
21656    /// ```
21657    /// </details>
21658    #[derive(
21659        ::serde::Deserialize,
21660        ::serde::Serialize,
21661        Clone,
21662        Copy,
21663        Debug,
21664        Eq,
21665        Hash,
21666        Ord,
21667        PartialEq,
21668        PartialOrd,
21669    )]
21670    pub enum OnrampOrderFeeType {
21671        #[serde(rename = "FEE_TYPE_NETWORK")]
21672        FeeTypeNetwork,
21673        #[serde(rename = "FEE_TYPE_EXCHANGE")]
21674        FeeTypeExchange,
21675    }
21676    impl ::std::convert::From<&Self> for OnrampOrderFeeType {
21677        fn from(value: &OnrampOrderFeeType) -> Self {
21678            value.clone()
21679        }
21680    }
21681    impl ::std::fmt::Display for OnrampOrderFeeType {
21682        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21683            match *self {
21684                Self::FeeTypeNetwork => f.write_str("FEE_TYPE_NETWORK"),
21685                Self::FeeTypeExchange => f.write_str("FEE_TYPE_EXCHANGE"),
21686            }
21687        }
21688    }
21689    impl ::std::str::FromStr for OnrampOrderFeeType {
21690        type Err = self::error::ConversionError;
21691        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21692            match value {
21693                "FEE_TYPE_NETWORK" => Ok(Self::FeeTypeNetwork),
21694                "FEE_TYPE_EXCHANGE" => Ok(Self::FeeTypeExchange),
21695                _ => Err("invalid value".into()),
21696            }
21697        }
21698    }
21699    impl ::std::convert::TryFrom<&str> for OnrampOrderFeeType {
21700        type Error = self::error::ConversionError;
21701        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21702            value.parse()
21703        }
21704    }
21705    impl ::std::convert::TryFrom<&::std::string::String> for OnrampOrderFeeType {
21706        type Error = self::error::ConversionError;
21707        fn try_from(
21708            value: &::std::string::String,
21709        ) -> ::std::result::Result<Self, self::error::ConversionError> {
21710            value.parse()
21711        }
21712    }
21713    impl ::std::convert::TryFrom<::std::string::String> for OnrampOrderFeeType {
21714        type Error = self::error::ConversionError;
21715        fn try_from(
21716            value: ::std::string::String,
21717        ) -> ::std::result::Result<Self, self::error::ConversionError> {
21718            value.parse()
21719        }
21720    }
21721    ///The type of payment method to be used to complete an onramp order.
21722    ///
21723    /// <details><summary>JSON schema</summary>
21724    ///
21725    /// ```json
21726    ///{
21727    ///  "description": "The type of payment method to be used to complete an onramp order.",
21728    ///  "examples": [
21729    ///    "GUEST_CHECKOUT_APPLE_PAY"
21730    ///  ],
21731    ///  "type": "string",
21732    ///  "enum": [
21733    ///    "GUEST_CHECKOUT_APPLE_PAY"
21734    ///  ]
21735    ///}
21736    /// ```
21737    /// </details>
21738    #[derive(
21739        ::serde::Deserialize,
21740        ::serde::Serialize,
21741        Clone,
21742        Copy,
21743        Debug,
21744        Eq,
21745        Hash,
21746        Ord,
21747        PartialEq,
21748        PartialOrd,
21749    )]
21750    pub enum OnrampOrderPaymentMethodTypeId {
21751        #[serde(rename = "GUEST_CHECKOUT_APPLE_PAY")]
21752        GuestCheckoutApplePay,
21753    }
21754    impl ::std::convert::From<&Self> for OnrampOrderPaymentMethodTypeId {
21755        fn from(value: &OnrampOrderPaymentMethodTypeId) -> Self {
21756            value.clone()
21757        }
21758    }
21759    impl ::std::fmt::Display for OnrampOrderPaymentMethodTypeId {
21760        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21761            match *self {
21762                Self::GuestCheckoutApplePay => f.write_str("GUEST_CHECKOUT_APPLE_PAY"),
21763            }
21764        }
21765    }
21766    impl ::std::str::FromStr for OnrampOrderPaymentMethodTypeId {
21767        type Err = self::error::ConversionError;
21768        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21769            match value {
21770                "GUEST_CHECKOUT_APPLE_PAY" => Ok(Self::GuestCheckoutApplePay),
21771                _ => Err("invalid value".into()),
21772            }
21773        }
21774    }
21775    impl ::std::convert::TryFrom<&str> for OnrampOrderPaymentMethodTypeId {
21776        type Error = self::error::ConversionError;
21777        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21778            value.parse()
21779        }
21780    }
21781    impl ::std::convert::TryFrom<&::std::string::String> for OnrampOrderPaymentMethodTypeId {
21782        type Error = self::error::ConversionError;
21783        fn try_from(
21784            value: &::std::string::String,
21785        ) -> ::std::result::Result<Self, self::error::ConversionError> {
21786            value.parse()
21787        }
21788    }
21789    impl ::std::convert::TryFrom<::std::string::String> for OnrampOrderPaymentMethodTypeId {
21790        type Error = self::error::ConversionError;
21791        fn try_from(
21792            value: ::std::string::String,
21793        ) -> ::std::result::Result<Self, self::error::ConversionError> {
21794            value.parse()
21795        }
21796    }
21797    ///The status of an onramp order.
21798    ///
21799    /// <details><summary>JSON schema</summary>
21800    ///
21801    /// ```json
21802    ///{
21803    ///  "description": "The status of an onramp order.",
21804    ///  "examples": [
21805    ///    "ONRAMP_ORDER_STATUS_COMPLETED"
21806    ///  ],
21807    ///  "type": "string",
21808    ///  "enum": [
21809    ///    "ONRAMP_ORDER_STATUS_PENDING_AUTH",
21810    ///    "ONRAMP_ORDER_STATUS_PENDING_PAYMENT",
21811    ///    "ONRAMP_ORDER_STATUS_PROCESSING",
21812    ///    "ONRAMP_ORDER_STATUS_COMPLETED",
21813    ///    "ONRAMP_ORDER_STATUS_FAILED"
21814    ///  ]
21815    ///}
21816    /// ```
21817    /// </details>
21818    #[derive(
21819        ::serde::Deserialize,
21820        ::serde::Serialize,
21821        Clone,
21822        Copy,
21823        Debug,
21824        Eq,
21825        Hash,
21826        Ord,
21827        PartialEq,
21828        PartialOrd,
21829    )]
21830    pub enum OnrampOrderStatus {
21831        #[serde(rename = "ONRAMP_ORDER_STATUS_PENDING_AUTH")]
21832        OnrampOrderStatusPendingAuth,
21833        #[serde(rename = "ONRAMP_ORDER_STATUS_PENDING_PAYMENT")]
21834        OnrampOrderStatusPendingPayment,
21835        #[serde(rename = "ONRAMP_ORDER_STATUS_PROCESSING")]
21836        OnrampOrderStatusProcessing,
21837        #[serde(rename = "ONRAMP_ORDER_STATUS_COMPLETED")]
21838        OnrampOrderStatusCompleted,
21839        #[serde(rename = "ONRAMP_ORDER_STATUS_FAILED")]
21840        OnrampOrderStatusFailed,
21841    }
21842    impl ::std::convert::From<&Self> for OnrampOrderStatus {
21843        fn from(value: &OnrampOrderStatus) -> Self {
21844            value.clone()
21845        }
21846    }
21847    impl ::std::fmt::Display for OnrampOrderStatus {
21848        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21849            match *self {
21850                Self::OnrampOrderStatusPendingAuth => {
21851                    f.write_str("ONRAMP_ORDER_STATUS_PENDING_AUTH")
21852                }
21853                Self::OnrampOrderStatusPendingPayment => {
21854                    f.write_str("ONRAMP_ORDER_STATUS_PENDING_PAYMENT")
21855                }
21856                Self::OnrampOrderStatusProcessing => f.write_str("ONRAMP_ORDER_STATUS_PROCESSING"),
21857                Self::OnrampOrderStatusCompleted => f.write_str("ONRAMP_ORDER_STATUS_COMPLETED"),
21858                Self::OnrampOrderStatusFailed => f.write_str("ONRAMP_ORDER_STATUS_FAILED"),
21859            }
21860        }
21861    }
21862    impl ::std::str::FromStr for OnrampOrderStatus {
21863        type Err = self::error::ConversionError;
21864        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21865            match value {
21866                "ONRAMP_ORDER_STATUS_PENDING_AUTH" => Ok(Self::OnrampOrderStatusPendingAuth),
21867                "ONRAMP_ORDER_STATUS_PENDING_PAYMENT" => Ok(Self::OnrampOrderStatusPendingPayment),
21868                "ONRAMP_ORDER_STATUS_PROCESSING" => Ok(Self::OnrampOrderStatusProcessing),
21869                "ONRAMP_ORDER_STATUS_COMPLETED" => Ok(Self::OnrampOrderStatusCompleted),
21870                "ONRAMP_ORDER_STATUS_FAILED" => Ok(Self::OnrampOrderStatusFailed),
21871                _ => Err("invalid value".into()),
21872            }
21873        }
21874    }
21875    impl ::std::convert::TryFrom<&str> for OnrampOrderStatus {
21876        type Error = self::error::ConversionError;
21877        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21878            value.parse()
21879        }
21880    }
21881    impl ::std::convert::TryFrom<&::std::string::String> for OnrampOrderStatus {
21882        type Error = self::error::ConversionError;
21883        fn try_from(
21884            value: &::std::string::String,
21885        ) -> ::std::result::Result<Self, self::error::ConversionError> {
21886            value.parse()
21887        }
21888    }
21889    impl ::std::convert::TryFrom<::std::string::String> for OnrampOrderStatus {
21890        type Error = self::error::ConversionError;
21891        fn try_from(
21892            value: ::std::string::String,
21893        ) -> ::std::result::Result<Self, self::error::ConversionError> {
21894            value.parse()
21895        }
21896    }
21897    /**A payment link to pay for an order.
21898
21899    Please refer to the [Onramp docs](https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/onramp-overview) for details on how to integrate with the different payment link types.*/
21900    ///
21901    /// <details><summary>JSON schema</summary>
21902    ///
21903    /// ```json
21904    ///{
21905    ///  "description": "A payment link to pay for an order.\n\nPlease refer to the [Onramp docs](https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/onramp-overview) for details on how to integrate with the different payment link types.",
21906    ///  "type": "object",
21907    ///  "required": [
21908    ///    "paymentLinkType",
21909    ///    "url"
21910    ///  ],
21911    ///  "properties": {
21912    ///    "paymentLinkType": {
21913    ///      "$ref": "#/components/schemas/OnrampPaymentLinkType"
21914    ///    },
21915    ///    "url": {
21916    ///      "description": "The URL to the hosted widget the user should be redirected to. For certain payment link types you can append your own redirect_url query parameter to this URL to ensure the user is redirected back to your app after the widget completes.",
21917    ///      "examples": [
21918    ///        "https://pay.coinbase.com/v2/api-onramp/apple-pay?sessionToken=MWYwNWQwODktZTZlYy02OTdlLTgzZTYtMTI3NzcyOWJhNjM3"
21919    ///      ],
21920    ///      "allOf": [
21921    ///        {
21922    ///          "$ref": "#/components/schemas/Url"
21923    ///        }
21924    ///      ]
21925    ///    }
21926    ///  }
21927    ///}
21928    /// ```
21929    /// </details>
21930    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
21931    pub struct OnrampPaymentLink {
21932        #[serde(rename = "paymentLinkType")]
21933        pub payment_link_type: OnrampPaymentLinkType,
21934        ///The URL to the hosted widget the user should be redirected to. For certain payment link types you can append your own redirect_url query parameter to this URL to ensure the user is redirected back to your app after the widget completes.
21935        pub url: Url,
21936    }
21937    impl ::std::convert::From<&OnrampPaymentLink> for OnrampPaymentLink {
21938        fn from(value: &OnrampPaymentLink) -> Self {
21939            value.clone()
21940        }
21941    }
21942    impl OnrampPaymentLink {
21943        pub fn builder() -> builder::OnrampPaymentLink {
21944            Default::default()
21945        }
21946    }
21947    ///The type of payment link.
21948    ///
21949    /// <details><summary>JSON schema</summary>
21950    ///
21951    /// ```json
21952    ///{
21953    ///  "description": "The type of payment link.",
21954    ///  "examples": [
21955    ///    "PAYMENT_LINK_TYPE_APPLE_PAY_BUTTON"
21956    ///  ],
21957    ///  "type": "string",
21958    ///  "enum": [
21959    ///    "PAYMENT_LINK_TYPE_APPLE_PAY_BUTTON"
21960    ///  ]
21961    ///}
21962    /// ```
21963    /// </details>
21964    #[derive(
21965        ::serde::Deserialize,
21966        ::serde::Serialize,
21967        Clone,
21968        Copy,
21969        Debug,
21970        Eq,
21971        Hash,
21972        Ord,
21973        PartialEq,
21974        PartialOrd,
21975    )]
21976    pub enum OnrampPaymentLinkType {
21977        #[serde(rename = "PAYMENT_LINK_TYPE_APPLE_PAY_BUTTON")]
21978        PaymentLinkTypeApplePayButton,
21979    }
21980    impl ::std::convert::From<&Self> for OnrampPaymentLinkType {
21981        fn from(value: &OnrampPaymentLinkType) -> Self {
21982            value.clone()
21983        }
21984    }
21985    impl ::std::fmt::Display for OnrampPaymentLinkType {
21986        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
21987            match *self {
21988                Self::PaymentLinkTypeApplePayButton => {
21989                    f.write_str("PAYMENT_LINK_TYPE_APPLE_PAY_BUTTON")
21990                }
21991            }
21992        }
21993    }
21994    impl ::std::str::FromStr for OnrampPaymentLinkType {
21995        type Err = self::error::ConversionError;
21996        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
21997            match value {
21998                "PAYMENT_LINK_TYPE_APPLE_PAY_BUTTON" => Ok(Self::PaymentLinkTypeApplePayButton),
21999                _ => Err("invalid value".into()),
22000            }
22001        }
22002    }
22003    impl ::std::convert::TryFrom<&str> for OnrampPaymentLinkType {
22004        type Error = self::error::ConversionError;
22005        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22006            value.parse()
22007        }
22008    }
22009    impl ::std::convert::TryFrom<&::std::string::String> for OnrampPaymentLinkType {
22010        type Error = self::error::ConversionError;
22011        fn try_from(
22012            value: &::std::string::String,
22013        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22014            value.parse()
22015        }
22016    }
22017    impl ::std::convert::TryFrom<::std::string::String> for OnrampPaymentLinkType {
22018        type Error = self::error::ConversionError;
22019        fn try_from(
22020            value: ::std::string::String,
22021        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22022            value.parse()
22023        }
22024    }
22025    ///Quote information with pricing details for the crypto purchase.
22026    ///
22027    /// <details><summary>JSON schema</summary>
22028    ///
22029    /// ```json
22030    ///{
22031    ///  "description": "Quote information with pricing details for the crypto purchase.",
22032    ///  "examples": [
22033    ///    {
22034    ///      "destinationNetwork": "base",
22035    ///      "exchangeRate": "1",
22036    ///      "fees": [
22037    ///        {
22038    ///          "amount": "0.5",
22039    ///          "currency": "USD",
22040    ///          "type": "FEE_TYPE_EXCHANGE"
22041    ///        },
22042    ///        {
22043    ///          "amount": "0.25",
22044    ///          "currency": "USD",
22045    ///          "type": "FEE_TYPE_NETWORK"
22046    ///        }
22047    ///      ],
22048    ///      "paymentCurrency": "USD",
22049    ///      "paymentSubtotal": "100.00",
22050    ///      "paymentTotal": "100.75",
22051    ///      "purchaseAmount": "100.000000",
22052    ///      "purchaseCurrency": "USDC"
22053    ///    }
22054    ///  ],
22055    ///  "type": "object",
22056    ///  "required": [
22057    ///    "destinationNetwork",
22058    ///    "exchangeRate",
22059    ///    "fees",
22060    ///    "paymentCurrency",
22061    ///    "paymentSubtotal",
22062    ///    "paymentTotal",
22063    ///    "purchaseAmount",
22064    ///    "purchaseCurrency"
22065    ///  ],
22066    ///  "properties": {
22067    ///    "destinationNetwork": {
22068    ///      "description": "The network to send the crypto on.",
22069    ///      "examples": [
22070    ///        "base"
22071    ///      ],
22072    ///      "type": "string"
22073    ///    },
22074    ///    "exchangeRate": {
22075    ///      "description": "The exchange rate used to convert fiat to crypto i.e. the crypto value of one fiat.",
22076    ///      "examples": [
22077    ///        "1"
22078    ///      ],
22079    ///      "type": "string"
22080    ///    },
22081    ///    "fees": {
22082    ///      "description": "The fees associated with the quote.",
22083    ///      "examples": [
22084    ///        [
22085    ///          {
22086    ///            "amount": "0.5",
22087    ///            "currency": "USD",
22088    ///            "type": "FEE_TYPE_EXCHANGE"
22089    ///          },
22090    ///          {
22091    ///            "amount": "0.25",
22092    ///            "currency": "USD",
22093    ///            "type": "FEE_TYPE_NETWORK"
22094    ///          }
22095    ///        ]
22096    ///      ],
22097    ///      "type": "array",
22098    ///      "items": {
22099    ///        "$ref": "#/components/schemas/OnrampOrderFee"
22100    ///      }
22101    ///    },
22102    ///    "paymentCurrency": {
22103    ///      "description": "The fiat currency to be converted to crypto.",
22104    ///      "examples": [
22105    ///        "USD"
22106    ///      ],
22107    ///      "type": "string"
22108    ///    },
22109    ///    "paymentSubtotal": {
22110    ///      "description": "The amount of fiat to be converted to crypto.",
22111    ///      "examples": [
22112    ///        "100.00"
22113    ///      ],
22114    ///      "type": "string"
22115    ///    },
22116    ///    "paymentTotal": {
22117    ///      "description": "The total amount of fiat to be paid, inclusive of any fees.",
22118    ///      "examples": [
22119    ///        "100.75"
22120    ///      ],
22121    ///      "type": "string"
22122    ///    },
22123    ///    "purchaseAmount": {
22124    ///      "description": "The amount of crypto to be purchased.",
22125    ///      "examples": [
22126    ///        "100.000000"
22127    ///      ],
22128    ///      "type": "string"
22129    ///    },
22130    ///    "purchaseCurrency": {
22131    ///      "description": "The crypto currency to be purchased.",
22132    ///      "examples": [
22133    ///        "USDC"
22134    ///      ],
22135    ///      "type": "string"
22136    ///    }
22137    ///  }
22138    ///}
22139    /// ```
22140    /// </details>
22141    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22142    pub struct OnrampQuote {
22143        ///The network to send the crypto on.
22144        #[serde(rename = "destinationNetwork")]
22145        pub destination_network: ::std::string::String,
22146        ///The exchange rate used to convert fiat to crypto i.e. the crypto value of one fiat.
22147        #[serde(rename = "exchangeRate")]
22148        pub exchange_rate: ::std::string::String,
22149        ///The fees associated with the quote.
22150        pub fees: ::std::vec::Vec<OnrampOrderFee>,
22151        ///The fiat currency to be converted to crypto.
22152        #[serde(rename = "paymentCurrency")]
22153        pub payment_currency: ::std::string::String,
22154        ///The amount of fiat to be converted to crypto.
22155        #[serde(rename = "paymentSubtotal")]
22156        pub payment_subtotal: ::std::string::String,
22157        ///The total amount of fiat to be paid, inclusive of any fees.
22158        #[serde(rename = "paymentTotal")]
22159        pub payment_total: ::std::string::String,
22160        ///The amount of crypto to be purchased.
22161        #[serde(rename = "purchaseAmount")]
22162        pub purchase_amount: ::std::string::String,
22163        ///The crypto currency to be purchased.
22164        #[serde(rename = "purchaseCurrency")]
22165        pub purchase_currency: ::std::string::String,
22166    }
22167    impl ::std::convert::From<&OnrampQuote> for OnrampQuote {
22168        fn from(value: &OnrampQuote) -> Self {
22169            value.clone()
22170        }
22171    }
22172    impl OnrampQuote {
22173        pub fn builder() -> builder::OnrampQuote {
22174            Default::default()
22175        }
22176    }
22177    ///The type of payment method used to generate the onramp quote.
22178    ///
22179    /// <details><summary>JSON schema</summary>
22180    ///
22181    /// ```json
22182    ///{
22183    ///  "description": "The type of payment method used to generate the onramp quote.",
22184    ///  "examples": [
22185    ///    "CARD"
22186    ///  ],
22187    ///  "type": "string",
22188    ///  "enum": [
22189    ///    "CARD",
22190    ///    "ACH",
22191    ///    "APPLE_PAY",
22192    ///    "PAYPAL",
22193    ///    "FIAT_WALLET",
22194    ///    "CRYPTO_WALLET"
22195    ///  ]
22196    ///}
22197    /// ```
22198    /// </details>
22199    #[derive(
22200        ::serde::Deserialize,
22201        ::serde::Serialize,
22202        Clone,
22203        Copy,
22204        Debug,
22205        Eq,
22206        Hash,
22207        Ord,
22208        PartialEq,
22209        PartialOrd,
22210    )]
22211    pub enum OnrampQuotePaymentMethodTypeId {
22212        #[serde(rename = "CARD")]
22213        Card,
22214        #[serde(rename = "ACH")]
22215        Ach,
22216        #[serde(rename = "APPLE_PAY")]
22217        ApplePay,
22218        #[serde(rename = "PAYPAL")]
22219        Paypal,
22220        #[serde(rename = "FIAT_WALLET")]
22221        FiatWallet,
22222        #[serde(rename = "CRYPTO_WALLET")]
22223        CryptoWallet,
22224    }
22225    impl ::std::convert::From<&Self> for OnrampQuotePaymentMethodTypeId {
22226        fn from(value: &OnrampQuotePaymentMethodTypeId) -> Self {
22227            value.clone()
22228        }
22229    }
22230    impl ::std::fmt::Display for OnrampQuotePaymentMethodTypeId {
22231        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22232            match *self {
22233                Self::Card => f.write_str("CARD"),
22234                Self::Ach => f.write_str("ACH"),
22235                Self::ApplePay => f.write_str("APPLE_PAY"),
22236                Self::Paypal => f.write_str("PAYPAL"),
22237                Self::FiatWallet => f.write_str("FIAT_WALLET"),
22238                Self::CryptoWallet => f.write_str("CRYPTO_WALLET"),
22239            }
22240        }
22241    }
22242    impl ::std::str::FromStr for OnrampQuotePaymentMethodTypeId {
22243        type Err = self::error::ConversionError;
22244        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22245            match value {
22246                "CARD" => Ok(Self::Card),
22247                "ACH" => Ok(Self::Ach),
22248                "APPLE_PAY" => Ok(Self::ApplePay),
22249                "PAYPAL" => Ok(Self::Paypal),
22250                "FIAT_WALLET" => Ok(Self::FiatWallet),
22251                "CRYPTO_WALLET" => Ok(Self::CryptoWallet),
22252                _ => Err("invalid value".into()),
22253            }
22254        }
22255    }
22256    impl ::std::convert::TryFrom<&str> for OnrampQuotePaymentMethodTypeId {
22257        type Error = self::error::ConversionError;
22258        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22259            value.parse()
22260        }
22261    }
22262    impl ::std::convert::TryFrom<&::std::string::String> for OnrampQuotePaymentMethodTypeId {
22263        type Error = self::error::ConversionError;
22264        fn try_from(
22265            value: &::std::string::String,
22266        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22267            value.parse()
22268        }
22269    }
22270    impl ::std::convert::TryFrom<::std::string::String> for OnrampQuotePaymentMethodTypeId {
22271        type Error = self::error::ConversionError;
22272        fn try_from(
22273            value: ::std::string::String,
22274        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22275            value.parse()
22276        }
22277    }
22278    ///An onramp session containing a ready-to-use onramp URL.
22279    ///
22280    /// <details><summary>JSON schema</summary>
22281    ///
22282    /// ```json
22283    ///{
22284    ///  "description": "An onramp session containing a ready-to-use onramp URL.",
22285    ///  "examples": [
22286    ///    {
22287    ///      "onrampUrl": "https://pay.coinbase.com/buy?sessionToken=abc123F"
22288    ///    }
22289    ///  ],
22290    ///  "type": "object",
22291    ///  "required": [
22292    ///    "onrampUrl"
22293    ///  ],
22294    ///  "properties": {
22295    ///    "onrampUrl": {
22296    ///      "description": "Ready-to-use onramp URL.",
22297    ///      "examples": [
22298    ///        "https://pay.coinbase.com/buy?sessionToken=abc123F"
22299    ///      ],
22300    ///      "allOf": [
22301    ///        {
22302    ///          "$ref": "#/components/schemas/Url"
22303    ///        }
22304    ///      ]
22305    ///    }
22306    ///  }
22307    ///}
22308    /// ```
22309    /// </details>
22310    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22311    pub struct OnrampSession {
22312        ///Ready-to-use onramp URL.
22313        #[serde(rename = "onrampUrl")]
22314        pub onramp_url: Url,
22315    }
22316    impl ::std::convert::From<&OnrampSession> for OnrampSession {
22317        fn from(value: &OnrampSession) -> Self {
22318            value.clone()
22319        }
22320    }
22321    impl OnrampSession {
22322        pub fn builder() -> builder::OnrampSession {
22323            Default::default()
22324        }
22325    }
22326    ///`Policy`
22327    ///
22328    /// <details><summary>JSON schema</summary>
22329    ///
22330    /// ```json
22331    ///{
22332    ///  "type": "object",
22333    ///  "required": [
22334    ///    "createdAt",
22335    ///    "id",
22336    ///    "rules",
22337    ///    "scope",
22338    ///    "updatedAt"
22339    ///  ],
22340    ///  "properties": {
22341    ///    "createdAt": {
22342    ///      "description": "The ISO 8601 timestamp at which the Policy was created.",
22343    ///      "examples": [
22344    ///        "2025-03-25T12:00:00Z"
22345    ///      ],
22346    ///      "type": "string"
22347    ///    },
22348    ///    "description": {
22349    ///      "description": "An optional human-readable description of the policy.\nPolicy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.",
22350    ///      "examples": [
22351    ///        "Default policy"
22352    ///      ],
22353    ///      "type": "string",
22354    ///      "pattern": "^[A-Za-z0-9 ,.]{1,50}$"
22355    ///    },
22356    ///    "id": {
22357    ///      "description": "The unique identifier for the policy.",
22358    ///      "examples": [
22359    ///        "123e4567-e89b-12d3-a456-426614174000"
22360    ///      ],
22361    ///      "type": "string",
22362    ///      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
22363    ///    },
22364    ///    "rules": {
22365    ///      "description": "A list of rules that comprise the policy.",
22366    ///      "examples": [
22367    ///        [
22368    ///          {
22369    ///            "action": "accept",
22370    ///            "criteria": [
22371    ///              {
22372    ///                "ethValue": "1000000000000000000",
22373    ///                "operator": "<=",
22374    ///                "type": "ethValue"
22375    ///              },
22376    ///              {
22377    ///                "addresses": [
22378    ///                  "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
22379    ///                  "0x1234567890123456789012345678901234567890"
22380    ///                ],
22381    ///                "operator": "in",
22382    ///                "type": "evmAddress"
22383    ///              }
22384    ///            ],
22385    ///            "operation": "signEvmTransaction"
22386    ///          },
22387    ///          {
22388    ///            "action": "accept",
22389    ///            "criteria": [
22390    ///              {
22391    ///                "addresses": [
22392    ///                  "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
22393    ///                ],
22394    ///                "operator": "in",
22395    ///                "type": "solAddress"
22396    ///              }
22397    ///            ],
22398    ///            "operation": "signSolTransaction"
22399    ///          }
22400    ///        ]
22401    ///      ],
22402    ///      "type": "array",
22403    ///      "items": {
22404    ///        "$ref": "#/components/schemas/Rule"
22405    ///      }
22406    ///    },
22407    ///    "scope": {
22408    ///      "description": "The scope of the policy. Only one project-level policy can exist at any time.",
22409    ///      "examples": [
22410    ///        "project"
22411    ///      ],
22412    ///      "type": "string",
22413    ///      "enum": [
22414    ///        "project",
22415    ///        "account"
22416    ///      ]
22417    ///    },
22418    ///    "updatedAt": {
22419    ///      "description": "The ISO 8601 timestamp at which the Policy was last updated.",
22420    ///      "examples": [
22421    ///        "2025-03-26T12:00:00Z"
22422    ///      ],
22423    ///      "type": "string"
22424    ///    }
22425    ///  }
22426    ///}
22427    /// ```
22428    /// </details>
22429    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22430    pub struct Policy {
22431        ///The ISO 8601 timestamp at which the Policy was created.
22432        #[serde(rename = "createdAt")]
22433        pub created_at: ::std::string::String,
22434        /**An optional human-readable description of the policy.
22435        Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.*/
22436        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
22437        pub description: ::std::option::Option<PolicyDescription>,
22438        ///The unique identifier for the policy.
22439        pub id: PolicyId,
22440        ///A list of rules that comprise the policy.
22441        pub rules: ::std::vec::Vec<Rule>,
22442        ///The scope of the policy. Only one project-level policy can exist at any time.
22443        pub scope: PolicyScope,
22444        ///The ISO 8601 timestamp at which the Policy was last updated.
22445        #[serde(rename = "updatedAt")]
22446        pub updated_at: ::std::string::String,
22447    }
22448    impl ::std::convert::From<&Policy> for Policy {
22449        fn from(value: &Policy) -> Self {
22450            value.clone()
22451        }
22452    }
22453    impl Policy {
22454        pub fn builder() -> builder::Policy {
22455            Default::default()
22456        }
22457    }
22458    /**An optional human-readable description of the policy.
22459    Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.*/
22460    ///
22461    /// <details><summary>JSON schema</summary>
22462    ///
22463    /// ```json
22464    ///{
22465    ///  "description": "An optional human-readable description of the policy.\nPolicy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.",
22466    ///  "examples": [
22467    ///    "Default policy"
22468    ///  ],
22469    ///  "type": "string",
22470    ///  "pattern": "^[A-Za-z0-9 ,.]{1,50}$"
22471    ///}
22472    /// ```
22473    /// </details>
22474    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22475    #[serde(transparent)]
22476    pub struct PolicyDescription(::std::string::String);
22477    impl ::std::ops::Deref for PolicyDescription {
22478        type Target = ::std::string::String;
22479        fn deref(&self) -> &::std::string::String {
22480            &self.0
22481        }
22482    }
22483    impl ::std::convert::From<PolicyDescription> for ::std::string::String {
22484        fn from(value: PolicyDescription) -> Self {
22485            value.0
22486        }
22487    }
22488    impl ::std::convert::From<&PolicyDescription> for PolicyDescription {
22489        fn from(value: &PolicyDescription) -> Self {
22490            value.clone()
22491        }
22492    }
22493    impl ::std::str::FromStr for PolicyDescription {
22494        type Err = self::error::ConversionError;
22495        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22496            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
22497                ::std::sync::LazyLock::new(|| {
22498                    ::regress::Regex::new("^[A-Za-z0-9 ,.]{1,50}$").unwrap()
22499                });
22500            if PATTERN.find(value).is_none() {
22501                return Err("doesn't match pattern \"^[A-Za-z0-9 ,.]{1,50}$\"".into());
22502            }
22503            Ok(Self(value.to_string()))
22504        }
22505    }
22506    impl ::std::convert::TryFrom<&str> for PolicyDescription {
22507        type Error = self::error::ConversionError;
22508        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22509            value.parse()
22510        }
22511    }
22512    impl ::std::convert::TryFrom<&::std::string::String> for PolicyDescription {
22513        type Error = self::error::ConversionError;
22514        fn try_from(
22515            value: &::std::string::String,
22516        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22517            value.parse()
22518        }
22519    }
22520    impl ::std::convert::TryFrom<::std::string::String> for PolicyDescription {
22521        type Error = self::error::ConversionError;
22522        fn try_from(
22523            value: ::std::string::String,
22524        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22525            value.parse()
22526        }
22527    }
22528    impl<'de> ::serde::Deserialize<'de> for PolicyDescription {
22529        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
22530        where
22531            D: ::serde::Deserializer<'de>,
22532        {
22533            ::std::string::String::deserialize(deserializer)?
22534                .parse()
22535                .map_err(|e: self::error::ConversionError| {
22536                    <D::Error as ::serde::de::Error>::custom(e.to_string())
22537                })
22538        }
22539    }
22540    ///The unique identifier for the policy.
22541    ///
22542    /// <details><summary>JSON schema</summary>
22543    ///
22544    /// ```json
22545    ///{
22546    ///  "description": "The unique identifier for the policy.",
22547    ///  "examples": [
22548    ///    "123e4567-e89b-12d3-a456-426614174000"
22549    ///  ],
22550    ///  "type": "string",
22551    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
22552    ///}
22553    /// ```
22554    /// </details>
22555    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22556    #[serde(transparent)]
22557    pub struct PolicyId(::std::string::String);
22558    impl ::std::ops::Deref for PolicyId {
22559        type Target = ::std::string::String;
22560        fn deref(&self) -> &::std::string::String {
22561            &self.0
22562        }
22563    }
22564    impl ::std::convert::From<PolicyId> for ::std::string::String {
22565        fn from(value: PolicyId) -> Self {
22566            value.0
22567        }
22568    }
22569    impl ::std::convert::From<&PolicyId> for PolicyId {
22570        fn from(value: &PolicyId) -> Self {
22571            value.clone()
22572        }
22573    }
22574    impl ::std::str::FromStr for PolicyId {
22575        type Err = self::error::ConversionError;
22576        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22577            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
22578                || {
22579                    ::regress::Regex::new(
22580                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
22581                    )
22582                    .unwrap()
22583                },
22584            );
22585            if PATTERN.find(value).is_none() {
22586                return Err(
22587                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
22588                        .into(),
22589                );
22590            }
22591            Ok(Self(value.to_string()))
22592        }
22593    }
22594    impl ::std::convert::TryFrom<&str> for PolicyId {
22595        type Error = self::error::ConversionError;
22596        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22597            value.parse()
22598        }
22599    }
22600    impl ::std::convert::TryFrom<&::std::string::String> for PolicyId {
22601        type Error = self::error::ConversionError;
22602        fn try_from(
22603            value: &::std::string::String,
22604        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22605            value.parse()
22606        }
22607    }
22608    impl ::std::convert::TryFrom<::std::string::String> for PolicyId {
22609        type Error = self::error::ConversionError;
22610        fn try_from(
22611            value: ::std::string::String,
22612        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22613            value.parse()
22614        }
22615    }
22616    impl<'de> ::serde::Deserialize<'de> for PolicyId {
22617        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
22618        where
22619            D: ::serde::Deserializer<'de>,
22620        {
22621            ::std::string::String::deserialize(deserializer)?
22622                .parse()
22623                .map_err(|e: self::error::ConversionError| {
22624                    <D::Error as ::serde::de::Error>::custom(e.to_string())
22625                })
22626        }
22627    }
22628    ///The scope of the policy. Only one project-level policy can exist at any time.
22629    ///
22630    /// <details><summary>JSON schema</summary>
22631    ///
22632    /// ```json
22633    ///{
22634    ///  "description": "The scope of the policy. Only one project-level policy can exist at any time.",
22635    ///  "examples": [
22636    ///    "project"
22637    ///  ],
22638    ///  "type": "string",
22639    ///  "enum": [
22640    ///    "project",
22641    ///    "account"
22642    ///  ]
22643    ///}
22644    /// ```
22645    /// </details>
22646    #[derive(
22647        ::serde::Deserialize,
22648        ::serde::Serialize,
22649        Clone,
22650        Copy,
22651        Debug,
22652        Eq,
22653        Hash,
22654        Ord,
22655        PartialEq,
22656        PartialOrd,
22657    )]
22658    pub enum PolicyScope {
22659        #[serde(rename = "project")]
22660        Project,
22661        #[serde(rename = "account")]
22662        Account,
22663    }
22664    impl ::std::convert::From<&Self> for PolicyScope {
22665        fn from(value: &PolicyScope) -> Self {
22666            value.clone()
22667        }
22668    }
22669    impl ::std::fmt::Display for PolicyScope {
22670        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
22671            match *self {
22672                Self::Project => f.write_str("project"),
22673                Self::Account => f.write_str("account"),
22674            }
22675        }
22676    }
22677    impl ::std::str::FromStr for PolicyScope {
22678        type Err = self::error::ConversionError;
22679        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22680            match value {
22681                "project" => Ok(Self::Project),
22682                "account" => Ok(Self::Account),
22683                _ => Err("invalid value".into()),
22684            }
22685        }
22686    }
22687    impl ::std::convert::TryFrom<&str> for PolicyScope {
22688        type Error = self::error::ConversionError;
22689        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22690            value.parse()
22691        }
22692    }
22693    impl ::std::convert::TryFrom<&::std::string::String> for PolicyScope {
22694        type Error = self::error::ConversionError;
22695        fn try_from(
22696            value: &::std::string::String,
22697        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22698            value.parse()
22699        }
22700    }
22701    impl ::std::convert::TryFrom<::std::string::String> for PolicyScope {
22702        type Error = self::error::ConversionError;
22703        fn try_from(
22704            value: ::std::string::String,
22705        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22706            value.parse()
22707        }
22708    }
22709    ///`PrepareAndSendUserOperationAddress`
22710    ///
22711    /// <details><summary>JSON schema</summary>
22712    ///
22713    /// ```json
22714    ///{
22715    ///  "type": "string",
22716    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
22717    ///}
22718    /// ```
22719    /// </details>
22720    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22721    #[serde(transparent)]
22722    pub struct PrepareAndSendUserOperationAddress(::std::string::String);
22723    impl ::std::ops::Deref for PrepareAndSendUserOperationAddress {
22724        type Target = ::std::string::String;
22725        fn deref(&self) -> &::std::string::String {
22726            &self.0
22727        }
22728    }
22729    impl ::std::convert::From<PrepareAndSendUserOperationAddress> for ::std::string::String {
22730        fn from(value: PrepareAndSendUserOperationAddress) -> Self {
22731            value.0
22732        }
22733    }
22734    impl ::std::convert::From<&PrepareAndSendUserOperationAddress>
22735        for PrepareAndSendUserOperationAddress
22736    {
22737        fn from(value: &PrepareAndSendUserOperationAddress) -> Self {
22738            value.clone()
22739        }
22740    }
22741    impl ::std::str::FromStr for PrepareAndSendUserOperationAddress {
22742        type Err = self::error::ConversionError;
22743        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22744            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
22745                ::std::sync::LazyLock::new(|| {
22746                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
22747                });
22748            if PATTERN.find(value).is_none() {
22749                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
22750            }
22751            Ok(Self(value.to_string()))
22752        }
22753    }
22754    impl ::std::convert::TryFrom<&str> for PrepareAndSendUserOperationAddress {
22755        type Error = self::error::ConversionError;
22756        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22757            value.parse()
22758        }
22759    }
22760    impl ::std::convert::TryFrom<&::std::string::String> for PrepareAndSendUserOperationAddress {
22761        type Error = self::error::ConversionError;
22762        fn try_from(
22763            value: &::std::string::String,
22764        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22765            value.parse()
22766        }
22767    }
22768    impl ::std::convert::TryFrom<::std::string::String> for PrepareAndSendUserOperationAddress {
22769        type Error = self::error::ConversionError;
22770        fn try_from(
22771            value: ::std::string::String,
22772        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22773            value.parse()
22774        }
22775    }
22776    impl<'de> ::serde::Deserialize<'de> for PrepareAndSendUserOperationAddress {
22777        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
22778        where
22779            D: ::serde::Deserializer<'de>,
22780        {
22781            ::std::string::String::deserialize(deserializer)?
22782                .parse()
22783                .map_err(|e: self::error::ConversionError| {
22784                    <D::Error as ::serde::de::Error>::custom(e.to_string())
22785                })
22786        }
22787    }
22788    ///`PrepareAndSendUserOperationBody`
22789    ///
22790    /// <details><summary>JSON schema</summary>
22791    ///
22792    /// ```json
22793    ///{
22794    ///  "type": "object",
22795    ///  "required": [
22796    ///    "calls",
22797    ///    "network"
22798    ///  ],
22799    ///  "properties": {
22800    ///    "calls": {
22801    ///      "description": "The list of calls to make from the Smart Account.",
22802    ///      "type": "array",
22803    ///      "items": {
22804    ///        "$ref": "#/components/schemas/EvmCall"
22805    ///      }
22806    ///    },
22807    ///    "network": {
22808    ///      "$ref": "#/components/schemas/EvmUserOperationNetwork"
22809    ///    },
22810    ///    "paymasterUrl": {
22811    ///      "description": "The URL of the paymaster to use for the user operation.",
22812    ///      "examples": [
22813    ///        "https://api.developer.coinbase.com/rpc/v1/base/<token>"
22814    ///      ],
22815    ///      "allOf": [
22816    ///        {
22817    ///          "$ref": "#/components/schemas/Url"
22818    ///        }
22819    ///      ]
22820    ///    }
22821    ///  }
22822    ///}
22823    /// ```
22824    /// </details>
22825    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
22826    pub struct PrepareAndSendUserOperationBody {
22827        ///The list of calls to make from the Smart Account.
22828        pub calls: ::std::vec::Vec<EvmCall>,
22829        pub network: EvmUserOperationNetwork,
22830        ///The URL of the paymaster to use for the user operation.
22831        #[serde(
22832            rename = "paymasterUrl",
22833            default,
22834            skip_serializing_if = "::std::option::Option::is_none"
22835        )]
22836        pub paymaster_url: ::std::option::Option<Url>,
22837    }
22838    impl ::std::convert::From<&PrepareAndSendUserOperationBody> for PrepareAndSendUserOperationBody {
22839        fn from(value: &PrepareAndSendUserOperationBody) -> Self {
22840            value.clone()
22841        }
22842    }
22843    impl PrepareAndSendUserOperationBody {
22844        pub fn builder() -> builder::PrepareAndSendUserOperationBody {
22845            Default::default()
22846        }
22847    }
22848    ///`PrepareAndSendUserOperationXIdempotencyKey`
22849    ///
22850    /// <details><summary>JSON schema</summary>
22851    ///
22852    /// ```json
22853    ///{
22854    ///  "type": "string",
22855    ///  "maxLength": 36,
22856    ///  "minLength": 36,
22857    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
22858    ///}
22859    /// ```
22860    /// </details>
22861    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22862    #[serde(transparent)]
22863    pub struct PrepareAndSendUserOperationXIdempotencyKey(::std::string::String);
22864    impl ::std::ops::Deref for PrepareAndSendUserOperationXIdempotencyKey {
22865        type Target = ::std::string::String;
22866        fn deref(&self) -> &::std::string::String {
22867            &self.0
22868        }
22869    }
22870    impl ::std::convert::From<PrepareAndSendUserOperationXIdempotencyKey> for ::std::string::String {
22871        fn from(value: PrepareAndSendUserOperationXIdempotencyKey) -> Self {
22872            value.0
22873        }
22874    }
22875    impl ::std::convert::From<&PrepareAndSendUserOperationXIdempotencyKey>
22876        for PrepareAndSendUserOperationXIdempotencyKey
22877    {
22878        fn from(value: &PrepareAndSendUserOperationXIdempotencyKey) -> Self {
22879            value.clone()
22880        }
22881    }
22882    impl ::std::str::FromStr for PrepareAndSendUserOperationXIdempotencyKey {
22883        type Err = self::error::ConversionError;
22884        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22885            if value.chars().count() > 36usize {
22886                return Err("longer than 36 characters".into());
22887            }
22888            if value.chars().count() < 36usize {
22889                return Err("shorter than 36 characters".into());
22890            }
22891            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
22892                ::std::sync::LazyLock::new(|| {
22893                    ::regress::Regex::new(
22894                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
22895                    )
22896                    .unwrap()
22897                });
22898            if PATTERN.find(value).is_none() {
22899                return Err(
22900                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
22901                        .into(),
22902                );
22903            }
22904            Ok(Self(value.to_string()))
22905        }
22906    }
22907    impl ::std::convert::TryFrom<&str> for PrepareAndSendUserOperationXIdempotencyKey {
22908        type Error = self::error::ConversionError;
22909        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22910            value.parse()
22911        }
22912    }
22913    impl ::std::convert::TryFrom<&::std::string::String>
22914        for PrepareAndSendUserOperationXIdempotencyKey
22915    {
22916        type Error = self::error::ConversionError;
22917        fn try_from(
22918            value: &::std::string::String,
22919        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22920            value.parse()
22921        }
22922    }
22923    impl ::std::convert::TryFrom<::std::string::String> for PrepareAndSendUserOperationXIdempotencyKey {
22924        type Error = self::error::ConversionError;
22925        fn try_from(
22926            value: ::std::string::String,
22927        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22928            value.parse()
22929        }
22930    }
22931    impl<'de> ::serde::Deserialize<'de> for PrepareAndSendUserOperationXIdempotencyKey {
22932        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
22933        where
22934            D: ::serde::Deserializer<'de>,
22935        {
22936            ::std::string::String::deserialize(deserializer)?
22937                .parse()
22938                .map_err(|e: self::error::ConversionError| {
22939                    <D::Error as ::serde::de::Error>::custom(e.to_string())
22940                })
22941        }
22942    }
22943    ///`PrepareUserOperationAddress`
22944    ///
22945    /// <details><summary>JSON schema</summary>
22946    ///
22947    /// ```json
22948    ///{
22949    ///  "type": "string",
22950    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
22951    ///}
22952    /// ```
22953    /// </details>
22954    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22955    #[serde(transparent)]
22956    pub struct PrepareUserOperationAddress(::std::string::String);
22957    impl ::std::ops::Deref for PrepareUserOperationAddress {
22958        type Target = ::std::string::String;
22959        fn deref(&self) -> &::std::string::String {
22960            &self.0
22961        }
22962    }
22963    impl ::std::convert::From<PrepareUserOperationAddress> for ::std::string::String {
22964        fn from(value: PrepareUserOperationAddress) -> Self {
22965            value.0
22966        }
22967    }
22968    impl ::std::convert::From<&PrepareUserOperationAddress> for PrepareUserOperationAddress {
22969        fn from(value: &PrepareUserOperationAddress) -> Self {
22970            value.clone()
22971        }
22972    }
22973    impl ::std::str::FromStr for PrepareUserOperationAddress {
22974        type Err = self::error::ConversionError;
22975        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22976            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
22977                ::std::sync::LazyLock::new(|| {
22978                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
22979                });
22980            if PATTERN.find(value).is_none() {
22981                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
22982            }
22983            Ok(Self(value.to_string()))
22984        }
22985    }
22986    impl ::std::convert::TryFrom<&str> for PrepareUserOperationAddress {
22987        type Error = self::error::ConversionError;
22988        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
22989            value.parse()
22990        }
22991    }
22992    impl ::std::convert::TryFrom<&::std::string::String> for PrepareUserOperationAddress {
22993        type Error = self::error::ConversionError;
22994        fn try_from(
22995            value: &::std::string::String,
22996        ) -> ::std::result::Result<Self, self::error::ConversionError> {
22997            value.parse()
22998        }
22999    }
23000    impl ::std::convert::TryFrom<::std::string::String> for PrepareUserOperationAddress {
23001        type Error = self::error::ConversionError;
23002        fn try_from(
23003            value: ::std::string::String,
23004        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23005            value.parse()
23006        }
23007    }
23008    impl<'de> ::serde::Deserialize<'de> for PrepareUserOperationAddress {
23009        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
23010        where
23011            D: ::serde::Deserializer<'de>,
23012        {
23013            ::std::string::String::deserialize(deserializer)?
23014                .parse()
23015                .map_err(|e: self::error::ConversionError| {
23016                    <D::Error as ::serde::de::Error>::custom(e.to_string())
23017                })
23018        }
23019    }
23020    ///`PrepareUserOperationBody`
23021    ///
23022    /// <details><summary>JSON schema</summary>
23023    ///
23024    /// ```json
23025    ///{
23026    ///  "type": "object",
23027    ///  "required": [
23028    ///    "calls",
23029    ///    "network"
23030    ///  ],
23031    ///  "properties": {
23032    ///    "calls": {
23033    ///      "description": "The list of calls to make from the Smart Account.",
23034    ///      "type": "array",
23035    ///      "items": {
23036    ///        "$ref": "#/components/schemas/EvmCall"
23037    ///      }
23038    ///    },
23039    ///    "dataSuffix": {
23040    ///      "description": "The EIP-8021 data suffix (hex-encoded) that enables transaction attribution for the user operation.",
23041    ///      "examples": [
23042    ///        "0xdddddddd62617365617070070080218021802180218021802180218021"
23043    ///      ],
23044    ///      "type": "string",
23045    ///      "pattern": "^0x[0-9a-fA-F]+$"
23046    ///    },
23047    ///    "network": {
23048    ///      "$ref": "#/components/schemas/EvmUserOperationNetwork"
23049    ///    },
23050    ///    "paymasterUrl": {
23051    ///      "description": "The URL of the paymaster to use for the user operation.",
23052    ///      "examples": [
23053    ///        "https://api.developer.coinbase.com/rpc/v1/base/<token>"
23054    ///      ],
23055    ///      "allOf": [
23056    ///        {
23057    ///          "$ref": "#/components/schemas/Url"
23058    ///        }
23059    ///      ]
23060    ///    }
23061    ///  }
23062    ///}
23063    /// ```
23064    /// </details>
23065    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23066    pub struct PrepareUserOperationBody {
23067        ///The list of calls to make from the Smart Account.
23068        pub calls: ::std::vec::Vec<EvmCall>,
23069        ///The EIP-8021 data suffix (hex-encoded) that enables transaction attribution for the user operation.
23070        #[serde(
23071            rename = "dataSuffix",
23072            default,
23073            skip_serializing_if = "::std::option::Option::is_none"
23074        )]
23075        pub data_suffix: ::std::option::Option<PrepareUserOperationBodyDataSuffix>,
23076        pub network: EvmUserOperationNetwork,
23077        ///The URL of the paymaster to use for the user operation.
23078        #[serde(
23079            rename = "paymasterUrl",
23080            default,
23081            skip_serializing_if = "::std::option::Option::is_none"
23082        )]
23083        pub paymaster_url: ::std::option::Option<Url>,
23084    }
23085    impl ::std::convert::From<&PrepareUserOperationBody> for PrepareUserOperationBody {
23086        fn from(value: &PrepareUserOperationBody) -> Self {
23087            value.clone()
23088        }
23089    }
23090    impl PrepareUserOperationBody {
23091        pub fn builder() -> builder::PrepareUserOperationBody {
23092            Default::default()
23093        }
23094    }
23095    ///The EIP-8021 data suffix (hex-encoded) that enables transaction attribution for the user operation.
23096    ///
23097    /// <details><summary>JSON schema</summary>
23098    ///
23099    /// ```json
23100    ///{
23101    ///  "description": "The EIP-8021 data suffix (hex-encoded) that enables transaction attribution for the user operation.",
23102    ///  "examples": [
23103    ///    "0xdddddddd62617365617070070080218021802180218021802180218021"
23104    ///  ],
23105    ///  "type": "string",
23106    ///  "pattern": "^0x[0-9a-fA-F]+$"
23107    ///}
23108    /// ```
23109    /// </details>
23110    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23111    #[serde(transparent)]
23112    pub struct PrepareUserOperationBodyDataSuffix(::std::string::String);
23113    impl ::std::ops::Deref for PrepareUserOperationBodyDataSuffix {
23114        type Target = ::std::string::String;
23115        fn deref(&self) -> &::std::string::String {
23116            &self.0
23117        }
23118    }
23119    impl ::std::convert::From<PrepareUserOperationBodyDataSuffix> for ::std::string::String {
23120        fn from(value: PrepareUserOperationBodyDataSuffix) -> Self {
23121            value.0
23122        }
23123    }
23124    impl ::std::convert::From<&PrepareUserOperationBodyDataSuffix>
23125        for PrepareUserOperationBodyDataSuffix
23126    {
23127        fn from(value: &PrepareUserOperationBodyDataSuffix) -> Self {
23128            value.clone()
23129        }
23130    }
23131    impl ::std::str::FromStr for PrepareUserOperationBodyDataSuffix {
23132        type Err = self::error::ConversionError;
23133        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23134            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
23135                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^0x[0-9a-fA-F]+$").unwrap());
23136            if PATTERN.find(value).is_none() {
23137                return Err("doesn't match pattern \"^0x[0-9a-fA-F]+$\"".into());
23138            }
23139            Ok(Self(value.to_string()))
23140        }
23141    }
23142    impl ::std::convert::TryFrom<&str> for PrepareUserOperationBodyDataSuffix {
23143        type Error = self::error::ConversionError;
23144        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23145            value.parse()
23146        }
23147    }
23148    impl ::std::convert::TryFrom<&::std::string::String> for PrepareUserOperationBodyDataSuffix {
23149        type Error = self::error::ConversionError;
23150        fn try_from(
23151            value: &::std::string::String,
23152        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23153            value.parse()
23154        }
23155    }
23156    impl ::std::convert::TryFrom<::std::string::String> for PrepareUserOperationBodyDataSuffix {
23157        type Error = self::error::ConversionError;
23158        fn try_from(
23159            value: ::std::string::String,
23160        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23161            value.parse()
23162        }
23163    }
23164    impl<'de> ::serde::Deserialize<'de> for PrepareUserOperationBodyDataSuffix {
23165        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
23166        where
23167            D: ::serde::Deserializer<'de>,
23168        {
23169            ::std::string::String::deserialize(deserializer)?
23170                .parse()
23171                .map_err(|e: self::error::ConversionError| {
23172                    <D::Error as ::serde::de::Error>::custom(e.to_string())
23173                })
23174        }
23175    }
23176    ///A schema for specifying criteria for the PrepareUserOperation operation.
23177    ///
23178    /// <details><summary>JSON schema</summary>
23179    ///
23180    /// ```json
23181    ///{
23182    ///  "description": "A schema for specifying criteria for the PrepareUserOperation operation.",
23183    ///  "examples": [
23184    ///    [
23185    ///      {
23186    ///        "ethValue": "1000000",
23187    ///        "operator": ">=",
23188    ///        "type": "ethValue"
23189    ///      },
23190    ///      {
23191    ///        "addresses": [
23192    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
23193    ///        ],
23194    ///        "operator": "in",
23195    ///        "type": "evmAddress"
23196    ///      }
23197    ///    ]
23198    ///  ],
23199    ///  "type": "array",
23200    ///  "items": {
23201    ///    "oneOf": [
23202    ///      {
23203    ///        "$ref": "#/components/schemas/EthValueCriterion"
23204    ///      },
23205    ///      {
23206    ///        "$ref": "#/components/schemas/EvmAddressCriterion"
23207    ///      },
23208    ///      {
23209    ///        "$ref": "#/components/schemas/EvmNetworkCriterion"
23210    ///      },
23211    ///      {
23212    ///        "$ref": "#/components/schemas/EvmDataCriterion"
23213    ///      },
23214    ///      {
23215    ///        "$ref": "#/components/schemas/NetUSDChangeCriterion"
23216    ///      }
23217    ///    ]
23218    ///  },
23219    ///  "x-audience": "public"
23220    ///}
23221    /// ```
23222    /// </details>
23223    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23224    #[serde(transparent)]
23225    pub struct PrepareUserOperationCriteria(pub ::std::vec::Vec<PrepareUserOperationCriteriaItem>);
23226    impl ::std::ops::Deref for PrepareUserOperationCriteria {
23227        type Target = ::std::vec::Vec<PrepareUserOperationCriteriaItem>;
23228        fn deref(&self) -> &::std::vec::Vec<PrepareUserOperationCriteriaItem> {
23229            &self.0
23230        }
23231    }
23232    impl ::std::convert::From<PrepareUserOperationCriteria>
23233        for ::std::vec::Vec<PrepareUserOperationCriteriaItem>
23234    {
23235        fn from(value: PrepareUserOperationCriteria) -> Self {
23236            value.0
23237        }
23238    }
23239    impl ::std::convert::From<&PrepareUserOperationCriteria> for PrepareUserOperationCriteria {
23240        fn from(value: &PrepareUserOperationCriteria) -> Self {
23241            value.clone()
23242        }
23243    }
23244    impl ::std::convert::From<::std::vec::Vec<PrepareUserOperationCriteriaItem>>
23245        for PrepareUserOperationCriteria
23246    {
23247        fn from(value: ::std::vec::Vec<PrepareUserOperationCriteriaItem>) -> Self {
23248            Self(value)
23249        }
23250    }
23251    ///`PrepareUserOperationCriteriaItem`
23252    ///
23253    /// <details><summary>JSON schema</summary>
23254    ///
23255    /// ```json
23256    ///{
23257    ///  "oneOf": [
23258    ///    {
23259    ///      "$ref": "#/components/schemas/EthValueCriterion"
23260    ///    },
23261    ///    {
23262    ///      "$ref": "#/components/schemas/EvmAddressCriterion"
23263    ///    },
23264    ///    {
23265    ///      "$ref": "#/components/schemas/EvmNetworkCriterion"
23266    ///    },
23267    ///    {
23268    ///      "$ref": "#/components/schemas/EvmDataCriterion"
23269    ///    },
23270    ///    {
23271    ///      "$ref": "#/components/schemas/NetUSDChangeCriterion"
23272    ///    }
23273    ///  ]
23274    ///}
23275    /// ```
23276    /// </details>
23277    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23278    #[serde(untagged)]
23279    pub enum PrepareUserOperationCriteriaItem {
23280        EthValueCriterion(EthValueCriterion),
23281        EvmAddressCriterion(EvmAddressCriterion),
23282        EvmNetworkCriterion(EvmNetworkCriterion),
23283        EvmDataCriterion(EvmDataCriterion),
23284        NetUsdChangeCriterion(NetUsdChangeCriterion),
23285    }
23286    impl ::std::convert::From<&Self> for PrepareUserOperationCriteriaItem {
23287        fn from(value: &PrepareUserOperationCriteriaItem) -> Self {
23288            value.clone()
23289        }
23290    }
23291    impl ::std::convert::From<EthValueCriterion> for PrepareUserOperationCriteriaItem {
23292        fn from(value: EthValueCriterion) -> Self {
23293            Self::EthValueCriterion(value)
23294        }
23295    }
23296    impl ::std::convert::From<EvmAddressCriterion> for PrepareUserOperationCriteriaItem {
23297        fn from(value: EvmAddressCriterion) -> Self {
23298            Self::EvmAddressCriterion(value)
23299        }
23300    }
23301    impl ::std::convert::From<EvmNetworkCriterion> for PrepareUserOperationCriteriaItem {
23302        fn from(value: EvmNetworkCriterion) -> Self {
23303            Self::EvmNetworkCriterion(value)
23304        }
23305    }
23306    impl ::std::convert::From<EvmDataCriterion> for PrepareUserOperationCriteriaItem {
23307        fn from(value: EvmDataCriterion) -> Self {
23308            Self::EvmDataCriterion(value)
23309        }
23310    }
23311    impl ::std::convert::From<NetUsdChangeCriterion> for PrepareUserOperationCriteriaItem {
23312        fn from(value: NetUsdChangeCriterion) -> Self {
23313            Self::NetUsdChangeCriterion(value)
23314        }
23315    }
23316    ///`PrepareUserOperationRule`
23317    ///
23318    /// <details><summary>JSON schema</summary>
23319    ///
23320    /// ```json
23321    ///{
23322    ///  "title": "PrepareUserOperationRule",
23323    ///  "required": [
23324    ///    "action",
23325    ///    "criteria",
23326    ///    "operation"
23327    ///  ],
23328    ///  "properties": {
23329    ///    "action": {
23330    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
23331    ///      "examples": [
23332    ///        "accept"
23333    ///      ],
23334    ///      "type": "string",
23335    ///      "enum": [
23336    ///        "reject",
23337    ///        "accept"
23338    ///      ]
23339    ///    },
23340    ///    "criteria": {
23341    ///      "$ref": "#/components/schemas/PrepareUserOperationCriteria"
23342    ///    },
23343    ///    "operation": {
23344    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
23345    ///      "examples": [
23346    ///        "prepareUserOperation"
23347    ///      ],
23348    ///      "type": "string",
23349    ///      "enum": [
23350    ///        "prepareUserOperation"
23351    ///      ]
23352    ///    }
23353    ///  },
23354    ///  "x-audience": "public"
23355    ///}
23356    /// ```
23357    /// </details>
23358    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23359    pub struct PrepareUserOperationRule {
23360        ///Whether matching the rule will cause the request to be rejected or accepted.
23361        pub action: PrepareUserOperationRuleAction,
23362        pub criteria: PrepareUserOperationCriteria,
23363        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
23364        pub operation: PrepareUserOperationRuleOperation,
23365    }
23366    impl ::std::convert::From<&PrepareUserOperationRule> for PrepareUserOperationRule {
23367        fn from(value: &PrepareUserOperationRule) -> Self {
23368            value.clone()
23369        }
23370    }
23371    impl PrepareUserOperationRule {
23372        pub fn builder() -> builder::PrepareUserOperationRule {
23373            Default::default()
23374        }
23375    }
23376    ///Whether matching the rule will cause the request to be rejected or accepted.
23377    ///
23378    /// <details><summary>JSON schema</summary>
23379    ///
23380    /// ```json
23381    ///{
23382    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
23383    ///  "examples": [
23384    ///    "accept"
23385    ///  ],
23386    ///  "type": "string",
23387    ///  "enum": [
23388    ///    "reject",
23389    ///    "accept"
23390    ///  ]
23391    ///}
23392    /// ```
23393    /// </details>
23394    #[derive(
23395        ::serde::Deserialize,
23396        ::serde::Serialize,
23397        Clone,
23398        Copy,
23399        Debug,
23400        Eq,
23401        Hash,
23402        Ord,
23403        PartialEq,
23404        PartialOrd,
23405    )]
23406    pub enum PrepareUserOperationRuleAction {
23407        #[serde(rename = "reject")]
23408        Reject,
23409        #[serde(rename = "accept")]
23410        Accept,
23411    }
23412    impl ::std::convert::From<&Self> for PrepareUserOperationRuleAction {
23413        fn from(value: &PrepareUserOperationRuleAction) -> Self {
23414            value.clone()
23415        }
23416    }
23417    impl ::std::fmt::Display for PrepareUserOperationRuleAction {
23418        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23419            match *self {
23420                Self::Reject => f.write_str("reject"),
23421                Self::Accept => f.write_str("accept"),
23422            }
23423        }
23424    }
23425    impl ::std::str::FromStr for PrepareUserOperationRuleAction {
23426        type Err = self::error::ConversionError;
23427        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23428            match value {
23429                "reject" => Ok(Self::Reject),
23430                "accept" => Ok(Self::Accept),
23431                _ => Err("invalid value".into()),
23432            }
23433        }
23434    }
23435    impl ::std::convert::TryFrom<&str> for PrepareUserOperationRuleAction {
23436        type Error = self::error::ConversionError;
23437        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23438            value.parse()
23439        }
23440    }
23441    impl ::std::convert::TryFrom<&::std::string::String> for PrepareUserOperationRuleAction {
23442        type Error = self::error::ConversionError;
23443        fn try_from(
23444            value: &::std::string::String,
23445        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23446            value.parse()
23447        }
23448    }
23449    impl ::std::convert::TryFrom<::std::string::String> for PrepareUserOperationRuleAction {
23450        type Error = self::error::ConversionError;
23451        fn try_from(
23452            value: ::std::string::String,
23453        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23454            value.parse()
23455        }
23456    }
23457    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
23458    ///
23459    /// <details><summary>JSON schema</summary>
23460    ///
23461    /// ```json
23462    ///{
23463    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
23464    ///  "examples": [
23465    ///    "prepareUserOperation"
23466    ///  ],
23467    ///  "type": "string",
23468    ///  "enum": [
23469    ///    "prepareUserOperation"
23470    ///  ]
23471    ///}
23472    /// ```
23473    /// </details>
23474    #[derive(
23475        ::serde::Deserialize,
23476        ::serde::Serialize,
23477        Clone,
23478        Copy,
23479        Debug,
23480        Eq,
23481        Hash,
23482        Ord,
23483        PartialEq,
23484        PartialOrd,
23485    )]
23486    pub enum PrepareUserOperationRuleOperation {
23487        #[serde(rename = "prepareUserOperation")]
23488        PrepareUserOperation,
23489    }
23490    impl ::std::convert::From<&Self> for PrepareUserOperationRuleOperation {
23491        fn from(value: &PrepareUserOperationRuleOperation) -> Self {
23492            value.clone()
23493        }
23494    }
23495    impl ::std::fmt::Display for PrepareUserOperationRuleOperation {
23496        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23497            match *self {
23498                Self::PrepareUserOperation => f.write_str("prepareUserOperation"),
23499            }
23500        }
23501    }
23502    impl ::std::str::FromStr for PrepareUserOperationRuleOperation {
23503        type Err = self::error::ConversionError;
23504        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23505            match value {
23506                "prepareUserOperation" => Ok(Self::PrepareUserOperation),
23507                _ => Err("invalid value".into()),
23508            }
23509        }
23510    }
23511    impl ::std::convert::TryFrom<&str> for PrepareUserOperationRuleOperation {
23512        type Error = self::error::ConversionError;
23513        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23514            value.parse()
23515        }
23516    }
23517    impl ::std::convert::TryFrom<&::std::string::String> for PrepareUserOperationRuleOperation {
23518        type Error = self::error::ConversionError;
23519        fn try_from(
23520            value: &::std::string::String,
23521        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23522            value.parse()
23523        }
23524    }
23525    impl ::std::convert::TryFrom<::std::string::String> for PrepareUserOperationRuleOperation {
23526        type Error = self::error::ConversionError;
23527        fn try_from(
23528            value: ::std::string::String,
23529        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23530            value.parse()
23531        }
23532    }
23533    ///The criterion for the program IDs of a Solana transaction's instructions.
23534    ///
23535    /// <details><summary>JSON schema</summary>
23536    ///
23537    /// ```json
23538    ///{
23539    ///  "title": "ProgramIdCriterion",
23540    ///  "description": "The criterion for the program IDs of a Solana transaction's instructions.",
23541    ///  "type": "object",
23542    ///  "required": [
23543    ///    "operator",
23544    ///    "programIds",
23545    ///    "type"
23546    ///  ],
23547    ///  "properties": {
23548    ///    "operator": {
23549    ///      "description": "The operator to use for the comparison. Each of the program IDs in the transaction's instructions will be on the left-hand side of the operator, and the `programIds` field will be on the right-hand side.",
23550    ///      "examples": [
23551    ///        "in"
23552    ///      ],
23553    ///      "type": "string",
23554    ///      "enum": [
23555    ///        "in",
23556    ///        "not in"
23557    ///      ]
23558    ///    },
23559    ///    "programIds": {
23560    ///      "description": "The Solana program IDs that are compared to the list of program IDs in the transaction's instructions.",
23561    ///      "examples": [
23562    ///        [
23563    ///          "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
23564    ///          "11111111111111111111111111111112"
23565    ///        ]
23566    ///      ],
23567    ///      "type": "array",
23568    ///      "items": {
23569    ///        "description": "The Solana program ID that is compared to the list of program IDs in the transaction's instructions.",
23570    ///        "type": "string",
23571    ///        "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
23572    ///      }
23573    ///    },
23574    ///    "type": {
23575    ///      "description": "The type of criterion to use. This should be `programId`.",
23576    ///      "examples": [
23577    ///        "programId"
23578    ///      ],
23579    ///      "type": "string",
23580    ///      "enum": [
23581    ///        "programId"
23582    ///      ]
23583    ///    }
23584    ///  },
23585    ///  "x-audience": "public"
23586    ///}
23587    /// ```
23588    /// </details>
23589    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23590    pub struct ProgramIdCriterion {
23591        ///The operator to use for the comparison. Each of the program IDs in the transaction's instructions will be on the left-hand side of the operator, and the `programIds` field will be on the right-hand side.
23592        pub operator: ProgramIdCriterionOperator,
23593        ///The Solana program IDs that are compared to the list of program IDs in the transaction's instructions.
23594        #[serde(rename = "programIds")]
23595        pub program_ids: ::std::vec::Vec<ProgramIdCriterionProgramIdsItem>,
23596        ///The type of criterion to use. This should be `programId`.
23597        #[serde(rename = "type")]
23598        pub type_: ProgramIdCriterionType,
23599    }
23600    impl ::std::convert::From<&ProgramIdCriterion> for ProgramIdCriterion {
23601        fn from(value: &ProgramIdCriterion) -> Self {
23602            value.clone()
23603        }
23604    }
23605    impl ProgramIdCriterion {
23606        pub fn builder() -> builder::ProgramIdCriterion {
23607            Default::default()
23608        }
23609    }
23610    ///The operator to use for the comparison. Each of the program IDs in the transaction's instructions will be on the left-hand side of the operator, and the `programIds` field will be on the right-hand side.
23611    ///
23612    /// <details><summary>JSON schema</summary>
23613    ///
23614    /// ```json
23615    ///{
23616    ///  "description": "The operator to use for the comparison. Each of the program IDs in the transaction's instructions will be on the left-hand side of the operator, and the `programIds` field will be on the right-hand side.",
23617    ///  "examples": [
23618    ///    "in"
23619    ///  ],
23620    ///  "type": "string",
23621    ///  "enum": [
23622    ///    "in",
23623    ///    "not in"
23624    ///  ]
23625    ///}
23626    /// ```
23627    /// </details>
23628    #[derive(
23629        ::serde::Deserialize,
23630        ::serde::Serialize,
23631        Clone,
23632        Copy,
23633        Debug,
23634        Eq,
23635        Hash,
23636        Ord,
23637        PartialEq,
23638        PartialOrd,
23639    )]
23640    pub enum ProgramIdCriterionOperator {
23641        #[serde(rename = "in")]
23642        In,
23643        #[serde(rename = "not in")]
23644        NotIn,
23645    }
23646    impl ::std::convert::From<&Self> for ProgramIdCriterionOperator {
23647        fn from(value: &ProgramIdCriterionOperator) -> Self {
23648            value.clone()
23649        }
23650    }
23651    impl ::std::fmt::Display for ProgramIdCriterionOperator {
23652        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23653            match *self {
23654                Self::In => f.write_str("in"),
23655                Self::NotIn => f.write_str("not in"),
23656            }
23657        }
23658    }
23659    impl ::std::str::FromStr for ProgramIdCriterionOperator {
23660        type Err = self::error::ConversionError;
23661        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23662            match value {
23663                "in" => Ok(Self::In),
23664                "not in" => Ok(Self::NotIn),
23665                _ => Err("invalid value".into()),
23666            }
23667        }
23668    }
23669    impl ::std::convert::TryFrom<&str> for ProgramIdCriterionOperator {
23670        type Error = self::error::ConversionError;
23671        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23672            value.parse()
23673        }
23674    }
23675    impl ::std::convert::TryFrom<&::std::string::String> for ProgramIdCriterionOperator {
23676        type Error = self::error::ConversionError;
23677        fn try_from(
23678            value: &::std::string::String,
23679        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23680            value.parse()
23681        }
23682    }
23683    impl ::std::convert::TryFrom<::std::string::String> for ProgramIdCriterionOperator {
23684        type Error = self::error::ConversionError;
23685        fn try_from(
23686            value: ::std::string::String,
23687        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23688            value.parse()
23689        }
23690    }
23691    ///The Solana program ID that is compared to the list of program IDs in the transaction's instructions.
23692    ///
23693    /// <details><summary>JSON schema</summary>
23694    ///
23695    /// ```json
23696    ///{
23697    ///  "description": "The Solana program ID that is compared to the list of program IDs in the transaction's instructions.",
23698    ///  "type": "string",
23699    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
23700    ///}
23701    /// ```
23702    /// </details>
23703    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23704    #[serde(transparent)]
23705    pub struct ProgramIdCriterionProgramIdsItem(::std::string::String);
23706    impl ::std::ops::Deref for ProgramIdCriterionProgramIdsItem {
23707        type Target = ::std::string::String;
23708        fn deref(&self) -> &::std::string::String {
23709            &self.0
23710        }
23711    }
23712    impl ::std::convert::From<ProgramIdCriterionProgramIdsItem> for ::std::string::String {
23713        fn from(value: ProgramIdCriterionProgramIdsItem) -> Self {
23714            value.0
23715        }
23716    }
23717    impl ::std::convert::From<&ProgramIdCriterionProgramIdsItem> for ProgramIdCriterionProgramIdsItem {
23718        fn from(value: &ProgramIdCriterionProgramIdsItem) -> Self {
23719            value.clone()
23720        }
23721    }
23722    impl ::std::str::FromStr for ProgramIdCriterionProgramIdsItem {
23723        type Err = self::error::ConversionError;
23724        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23725            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
23726                ::std::sync::LazyLock::new(|| {
23727                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
23728                });
23729            if PATTERN.find(value).is_none() {
23730                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
23731            }
23732            Ok(Self(value.to_string()))
23733        }
23734    }
23735    impl ::std::convert::TryFrom<&str> for ProgramIdCriterionProgramIdsItem {
23736        type Error = self::error::ConversionError;
23737        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23738            value.parse()
23739        }
23740    }
23741    impl ::std::convert::TryFrom<&::std::string::String> for ProgramIdCriterionProgramIdsItem {
23742        type Error = self::error::ConversionError;
23743        fn try_from(
23744            value: &::std::string::String,
23745        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23746            value.parse()
23747        }
23748    }
23749    impl ::std::convert::TryFrom<::std::string::String> for ProgramIdCriterionProgramIdsItem {
23750        type Error = self::error::ConversionError;
23751        fn try_from(
23752            value: ::std::string::String,
23753        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23754            value.parse()
23755        }
23756    }
23757    impl<'de> ::serde::Deserialize<'de> for ProgramIdCriterionProgramIdsItem {
23758        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
23759        where
23760            D: ::serde::Deserializer<'de>,
23761        {
23762            ::std::string::String::deserialize(deserializer)?
23763                .parse()
23764                .map_err(|e: self::error::ConversionError| {
23765                    <D::Error as ::serde::de::Error>::custom(e.to_string())
23766                })
23767        }
23768    }
23769    ///The type of criterion to use. This should be `programId`.
23770    ///
23771    /// <details><summary>JSON schema</summary>
23772    ///
23773    /// ```json
23774    ///{
23775    ///  "description": "The type of criterion to use. This should be `programId`.",
23776    ///  "examples": [
23777    ///    "programId"
23778    ///  ],
23779    ///  "type": "string",
23780    ///  "enum": [
23781    ///    "programId"
23782    ///  ]
23783    ///}
23784    /// ```
23785    /// </details>
23786    #[derive(
23787        ::serde::Deserialize,
23788        ::serde::Serialize,
23789        Clone,
23790        Copy,
23791        Debug,
23792        Eq,
23793        Hash,
23794        Ord,
23795        PartialEq,
23796        PartialOrd,
23797    )]
23798    pub enum ProgramIdCriterionType {
23799        #[serde(rename = "programId")]
23800        ProgramId,
23801    }
23802    impl ::std::convert::From<&Self> for ProgramIdCriterionType {
23803        fn from(value: &ProgramIdCriterionType) -> Self {
23804            value.clone()
23805        }
23806    }
23807    impl ::std::fmt::Display for ProgramIdCriterionType {
23808        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23809            match *self {
23810                Self::ProgramId => f.write_str("programId"),
23811            }
23812        }
23813    }
23814    impl ::std::str::FromStr for ProgramIdCriterionType {
23815        type Err = self::error::ConversionError;
23816        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23817            match value {
23818                "programId" => Ok(Self::ProgramId),
23819                _ => Err("invalid value".into()),
23820            }
23821        }
23822    }
23823    impl ::std::convert::TryFrom<&str> for ProgramIdCriterionType {
23824        type Error = self::error::ConversionError;
23825        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
23826            value.parse()
23827        }
23828    }
23829    impl ::std::convert::TryFrom<&::std::string::String> for ProgramIdCriterionType {
23830        type Error = self::error::ConversionError;
23831        fn try_from(
23832            value: &::std::string::String,
23833        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23834            value.parse()
23835        }
23836    }
23837    impl ::std::convert::TryFrom<::std::string::String> for ProgramIdCriterionType {
23838        type Error = self::error::ConversionError;
23839        fn try_from(
23840            value: ::std::string::String,
23841        ) -> ::std::result::Result<Self, self::error::ConversionError> {
23842            value.parse()
23843        }
23844    }
23845    /**Enables control over how often queries need to be fully re-executed on the backing store.
23846    This can be useful in scenarios where API calls might be made frequently, API latency is critical, and some freshness lag (ex: 750ms, 2s, 5s) is tolerable.
23847    By default, each query result is returned from cache so long as the result is from an identical query and less than 500ms old. This freshness tolerance can be modified upwards, to a maximum of 900000ms (i.e. 900s, 15m).
23848    */
23849    ///
23850    /// <details><summary>JSON schema</summary>
23851    ///
23852    /// ```json
23853    ///{
23854    ///  "title": "Query result cache configuration",
23855    ///  "description": "Enables control over how often queries need to be fully re-executed on the backing store.\nThis can be useful in scenarios where API calls might be made frequently, API latency is critical, and some freshness lag (ex: 750ms, 2s, 5s) is tolerable.\nBy default, each query result is returned from cache so long as the result is from an identical query and less than 500ms old. This freshness tolerance can be modified upwards, to a maximum of 900000ms (i.e. 900s, 15m).\n",
23856    ///  "examples": [
23857    ///    {
23858    ///      "maxAgeMs": 1000
23859    ///    }
23860    ///  ],
23861    ///  "type": "object",
23862    ///  "properties": {
23863    ///    "maxAgeMs": {
23864    ///      "description": "The maximum tolerable staleness of the query result cache in milliseconds. If a previous execution result of an identical query is older than this age, the query will be re-executed. If the data is less than this age, the result will be returned from cache.",
23865    ///      "default": 500,
23866    ///      "examples": [
23867    ///        1000
23868    ///      ],
23869    ///      "type": "integer",
23870    ///      "maximum": 900000.0,
23871    ///      "minimum": 500.0
23872    ///    }
23873    ///  }
23874    ///}
23875    /// ```
23876    /// </details>
23877    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23878    pub struct QueryResultCacheConfiguration {
23879        ///The maximum tolerable staleness of the query result cache in milliseconds. If a previous execution result of an identical query is older than this age, the query will be re-executed. If the data is less than this age, the result will be returned from cache.
23880        #[serde(rename = "maxAgeMs", default = "defaults::default_u64::<i64, 500>")]
23881        pub max_age_ms: i64,
23882    }
23883    impl ::std::convert::From<&QueryResultCacheConfiguration> for QueryResultCacheConfiguration {
23884        fn from(value: &QueryResultCacheConfiguration) -> Self {
23885            value.clone()
23886        }
23887    }
23888    impl ::std::default::Default for QueryResultCacheConfiguration {
23889        fn default() -> Self {
23890            Self {
23891                max_age_ms: defaults::default_u64::<i64, 500>(),
23892            }
23893        }
23894    }
23895    impl QueryResultCacheConfiguration {
23896        pub fn builder() -> builder::QueryResultCacheConfiguration {
23897            Default::default()
23898        }
23899    }
23900    ///`RequestEvmFaucetBody`
23901    ///
23902    /// <details><summary>JSON schema</summary>
23903    ///
23904    /// ```json
23905    ///{
23906    ///  "type": "object",
23907    ///  "required": [
23908    ///    "address",
23909    ///    "network",
23910    ///    "token"
23911    ///  ],
23912    ///  "properties": {
23913    ///    "address": {
23914    ///      "description": "The address to request funds to, which is a 0x-prefixed hexadecimal string.",
23915    ///      "examples": [
23916    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
23917    ///      ],
23918    ///      "type": "string",
23919    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
23920    ///    },
23921    ///    "network": {
23922    ///      "description": "The network to request funds from.",
23923    ///      "examples": [
23924    ///        "base-sepolia"
23925    ///      ],
23926    ///      "type": "string",
23927    ///      "enum": [
23928    ///        "base-sepolia",
23929    ///        "ethereum-sepolia",
23930    ///        "ethereum-hoodi"
23931    ///      ]
23932    ///    },
23933    ///    "token": {
23934    ///      "description": "The token to request funds for.",
23935    ///      "examples": [
23936    ///        "eth"
23937    ///      ],
23938    ///      "type": "string",
23939    ///      "enum": [
23940    ///        "eth",
23941    ///        "usdc",
23942    ///        "eurc",
23943    ///        "cbbtc"
23944    ///      ]
23945    ///    }
23946    ///  }
23947    ///}
23948    /// ```
23949    /// </details>
23950    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
23951    pub struct RequestEvmFaucetBody {
23952        ///The address to request funds to, which is a 0x-prefixed hexadecimal string.
23953        pub address: RequestEvmFaucetBodyAddress,
23954        ///The network to request funds from.
23955        pub network: RequestEvmFaucetBodyNetwork,
23956        ///The token to request funds for.
23957        pub token: RequestEvmFaucetBodyToken,
23958    }
23959    impl ::std::convert::From<&RequestEvmFaucetBody> for RequestEvmFaucetBody {
23960        fn from(value: &RequestEvmFaucetBody) -> Self {
23961            value.clone()
23962        }
23963    }
23964    impl RequestEvmFaucetBody {
23965        pub fn builder() -> builder::RequestEvmFaucetBody {
23966            Default::default()
23967        }
23968    }
23969    ///The address to request funds to, which is a 0x-prefixed hexadecimal string.
23970    ///
23971    /// <details><summary>JSON schema</summary>
23972    ///
23973    /// ```json
23974    ///{
23975    ///  "description": "The address to request funds to, which is a 0x-prefixed hexadecimal string.",
23976    ///  "examples": [
23977    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
23978    ///  ],
23979    ///  "type": "string",
23980    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
23981    ///}
23982    /// ```
23983    /// </details>
23984    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23985    #[serde(transparent)]
23986    pub struct RequestEvmFaucetBodyAddress(::std::string::String);
23987    impl ::std::ops::Deref for RequestEvmFaucetBodyAddress {
23988        type Target = ::std::string::String;
23989        fn deref(&self) -> &::std::string::String {
23990            &self.0
23991        }
23992    }
23993    impl ::std::convert::From<RequestEvmFaucetBodyAddress> for ::std::string::String {
23994        fn from(value: RequestEvmFaucetBodyAddress) -> Self {
23995            value.0
23996        }
23997    }
23998    impl ::std::convert::From<&RequestEvmFaucetBodyAddress> for RequestEvmFaucetBodyAddress {
23999        fn from(value: &RequestEvmFaucetBodyAddress) -> Self {
24000            value.clone()
24001        }
24002    }
24003    impl ::std::str::FromStr for RequestEvmFaucetBodyAddress {
24004        type Err = self::error::ConversionError;
24005        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24006            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
24007                ::std::sync::LazyLock::new(|| {
24008                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
24009                });
24010            if PATTERN.find(value).is_none() {
24011                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
24012            }
24013            Ok(Self(value.to_string()))
24014        }
24015    }
24016    impl ::std::convert::TryFrom<&str> for RequestEvmFaucetBodyAddress {
24017        type Error = self::error::ConversionError;
24018        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24019            value.parse()
24020        }
24021    }
24022    impl ::std::convert::TryFrom<&::std::string::String> for RequestEvmFaucetBodyAddress {
24023        type Error = self::error::ConversionError;
24024        fn try_from(
24025            value: &::std::string::String,
24026        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24027            value.parse()
24028        }
24029    }
24030    impl ::std::convert::TryFrom<::std::string::String> for RequestEvmFaucetBodyAddress {
24031        type Error = self::error::ConversionError;
24032        fn try_from(
24033            value: ::std::string::String,
24034        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24035            value.parse()
24036        }
24037    }
24038    impl<'de> ::serde::Deserialize<'de> for RequestEvmFaucetBodyAddress {
24039        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
24040        where
24041            D: ::serde::Deserializer<'de>,
24042        {
24043            ::std::string::String::deserialize(deserializer)?
24044                .parse()
24045                .map_err(|e: self::error::ConversionError| {
24046                    <D::Error as ::serde::de::Error>::custom(e.to_string())
24047                })
24048        }
24049    }
24050    ///The network to request funds from.
24051    ///
24052    /// <details><summary>JSON schema</summary>
24053    ///
24054    /// ```json
24055    ///{
24056    ///  "description": "The network to request funds from.",
24057    ///  "examples": [
24058    ///    "base-sepolia"
24059    ///  ],
24060    ///  "type": "string",
24061    ///  "enum": [
24062    ///    "base-sepolia",
24063    ///    "ethereum-sepolia",
24064    ///    "ethereum-hoodi"
24065    ///  ]
24066    ///}
24067    /// ```
24068    /// </details>
24069    #[derive(
24070        ::serde::Deserialize,
24071        ::serde::Serialize,
24072        Clone,
24073        Copy,
24074        Debug,
24075        Eq,
24076        Hash,
24077        Ord,
24078        PartialEq,
24079        PartialOrd,
24080    )]
24081    pub enum RequestEvmFaucetBodyNetwork {
24082        #[serde(rename = "base-sepolia")]
24083        BaseSepolia,
24084        #[serde(rename = "ethereum-sepolia")]
24085        EthereumSepolia,
24086        #[serde(rename = "ethereum-hoodi")]
24087        EthereumHoodi,
24088    }
24089    impl ::std::convert::From<&Self> for RequestEvmFaucetBodyNetwork {
24090        fn from(value: &RequestEvmFaucetBodyNetwork) -> Self {
24091            value.clone()
24092        }
24093    }
24094    impl ::std::fmt::Display for RequestEvmFaucetBodyNetwork {
24095        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24096            match *self {
24097                Self::BaseSepolia => f.write_str("base-sepolia"),
24098                Self::EthereumSepolia => f.write_str("ethereum-sepolia"),
24099                Self::EthereumHoodi => f.write_str("ethereum-hoodi"),
24100            }
24101        }
24102    }
24103    impl ::std::str::FromStr for RequestEvmFaucetBodyNetwork {
24104        type Err = self::error::ConversionError;
24105        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24106            match value {
24107                "base-sepolia" => Ok(Self::BaseSepolia),
24108                "ethereum-sepolia" => Ok(Self::EthereumSepolia),
24109                "ethereum-hoodi" => Ok(Self::EthereumHoodi),
24110                _ => Err("invalid value".into()),
24111            }
24112        }
24113    }
24114    impl ::std::convert::TryFrom<&str> for RequestEvmFaucetBodyNetwork {
24115        type Error = self::error::ConversionError;
24116        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24117            value.parse()
24118        }
24119    }
24120    impl ::std::convert::TryFrom<&::std::string::String> for RequestEvmFaucetBodyNetwork {
24121        type Error = self::error::ConversionError;
24122        fn try_from(
24123            value: &::std::string::String,
24124        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24125            value.parse()
24126        }
24127    }
24128    impl ::std::convert::TryFrom<::std::string::String> for RequestEvmFaucetBodyNetwork {
24129        type Error = self::error::ConversionError;
24130        fn try_from(
24131            value: ::std::string::String,
24132        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24133            value.parse()
24134        }
24135    }
24136    ///The token to request funds for.
24137    ///
24138    /// <details><summary>JSON schema</summary>
24139    ///
24140    /// ```json
24141    ///{
24142    ///  "description": "The token to request funds for.",
24143    ///  "examples": [
24144    ///    "eth"
24145    ///  ],
24146    ///  "type": "string",
24147    ///  "enum": [
24148    ///    "eth",
24149    ///    "usdc",
24150    ///    "eurc",
24151    ///    "cbbtc"
24152    ///  ]
24153    ///}
24154    /// ```
24155    /// </details>
24156    #[derive(
24157        ::serde::Deserialize,
24158        ::serde::Serialize,
24159        Clone,
24160        Copy,
24161        Debug,
24162        Eq,
24163        Hash,
24164        Ord,
24165        PartialEq,
24166        PartialOrd,
24167    )]
24168    pub enum RequestEvmFaucetBodyToken {
24169        #[serde(rename = "eth")]
24170        Eth,
24171        #[serde(rename = "usdc")]
24172        Usdc,
24173        #[serde(rename = "eurc")]
24174        Eurc,
24175        #[serde(rename = "cbbtc")]
24176        Cbbtc,
24177    }
24178    impl ::std::convert::From<&Self> for RequestEvmFaucetBodyToken {
24179        fn from(value: &RequestEvmFaucetBodyToken) -> Self {
24180            value.clone()
24181        }
24182    }
24183    impl ::std::fmt::Display for RequestEvmFaucetBodyToken {
24184        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24185            match *self {
24186                Self::Eth => f.write_str("eth"),
24187                Self::Usdc => f.write_str("usdc"),
24188                Self::Eurc => f.write_str("eurc"),
24189                Self::Cbbtc => f.write_str("cbbtc"),
24190            }
24191        }
24192    }
24193    impl ::std::str::FromStr for RequestEvmFaucetBodyToken {
24194        type Err = self::error::ConversionError;
24195        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24196            match value {
24197                "eth" => Ok(Self::Eth),
24198                "usdc" => Ok(Self::Usdc),
24199                "eurc" => Ok(Self::Eurc),
24200                "cbbtc" => Ok(Self::Cbbtc),
24201                _ => Err("invalid value".into()),
24202            }
24203        }
24204    }
24205    impl ::std::convert::TryFrom<&str> for RequestEvmFaucetBodyToken {
24206        type Error = self::error::ConversionError;
24207        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24208            value.parse()
24209        }
24210    }
24211    impl ::std::convert::TryFrom<&::std::string::String> for RequestEvmFaucetBodyToken {
24212        type Error = self::error::ConversionError;
24213        fn try_from(
24214            value: &::std::string::String,
24215        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24216            value.parse()
24217        }
24218    }
24219    impl ::std::convert::TryFrom<::std::string::String> for RequestEvmFaucetBodyToken {
24220        type Error = self::error::ConversionError;
24221        fn try_from(
24222            value: ::std::string::String,
24223        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24224            value.parse()
24225        }
24226    }
24227    ///`RequestEvmFaucetResponse`
24228    ///
24229    /// <details><summary>JSON schema</summary>
24230    ///
24231    /// ```json
24232    ///{
24233    ///  "type": "object",
24234    ///  "required": [
24235    ///    "transactionHash"
24236    ///  ],
24237    ///  "properties": {
24238    ///    "transactionHash": {
24239    ///      "description": "The hash of the transaction that requested the funds.\n**Note:** In rare cases, when gas conditions are unusually high, the transaction may not confirm, and the system may issue a replacement transaction to complete the faucet request. In these rare cases, the `transactionHash` will be out of sync with the actual faucet transaction that was confirmed onchain.",
24240    ///      "examples": [
24241    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
24242    ///      ],
24243    ///      "type": "string"
24244    ///    }
24245    ///  }
24246    ///}
24247    /// ```
24248    /// </details>
24249    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24250    pub struct RequestEvmFaucetResponse {
24251        /**The hash of the transaction that requested the funds.
24252         **Note:** In rare cases, when gas conditions are unusually high, the transaction may not confirm, and the system may issue a replacement transaction to complete the faucet request. In these rare cases, the `transactionHash` will be out of sync with the actual faucet transaction that was confirmed onchain.*/
24253        #[serde(rename = "transactionHash")]
24254        pub transaction_hash: ::std::string::String,
24255    }
24256    impl ::std::convert::From<&RequestEvmFaucetResponse> for RequestEvmFaucetResponse {
24257        fn from(value: &RequestEvmFaucetResponse) -> Self {
24258            value.clone()
24259        }
24260    }
24261    impl RequestEvmFaucetResponse {
24262        pub fn builder() -> builder::RequestEvmFaucetResponse {
24263            Default::default()
24264        }
24265    }
24266    ///`RequestSolanaFaucetBody`
24267    ///
24268    /// <details><summary>JSON schema</summary>
24269    ///
24270    /// ```json
24271    ///{
24272    ///  "type": "object",
24273    ///  "required": [
24274    ///    "address",
24275    ///    "token"
24276    ///  ],
24277    ///  "properties": {
24278    ///    "address": {
24279    ///      "description": "The address to request funds to, which is a base58-encoded string.",
24280    ///      "examples": [
24281    ///        "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
24282    ///      ],
24283    ///      "type": "string",
24284    ///      "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
24285    ///    },
24286    ///    "token": {
24287    ///      "description": "The token to request funds for.",
24288    ///      "examples": [
24289    ///        "sol"
24290    ///      ],
24291    ///      "type": "string",
24292    ///      "enum": [
24293    ///        "sol",
24294    ///        "usdc"
24295    ///      ]
24296    ///    }
24297    ///  }
24298    ///}
24299    /// ```
24300    /// </details>
24301    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24302    pub struct RequestSolanaFaucetBody {
24303        ///The address to request funds to, which is a base58-encoded string.
24304        pub address: RequestSolanaFaucetBodyAddress,
24305        ///The token to request funds for.
24306        pub token: RequestSolanaFaucetBodyToken,
24307    }
24308    impl ::std::convert::From<&RequestSolanaFaucetBody> for RequestSolanaFaucetBody {
24309        fn from(value: &RequestSolanaFaucetBody) -> Self {
24310            value.clone()
24311        }
24312    }
24313    impl RequestSolanaFaucetBody {
24314        pub fn builder() -> builder::RequestSolanaFaucetBody {
24315            Default::default()
24316        }
24317    }
24318    ///The address to request funds to, which is a base58-encoded string.
24319    ///
24320    /// <details><summary>JSON schema</summary>
24321    ///
24322    /// ```json
24323    ///{
24324    ///  "description": "The address to request funds to, which is a base58-encoded string.",
24325    ///  "examples": [
24326    ///    "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
24327    ///  ],
24328    ///  "type": "string",
24329    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
24330    ///}
24331    /// ```
24332    /// </details>
24333    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24334    #[serde(transparent)]
24335    pub struct RequestSolanaFaucetBodyAddress(::std::string::String);
24336    impl ::std::ops::Deref for RequestSolanaFaucetBodyAddress {
24337        type Target = ::std::string::String;
24338        fn deref(&self) -> &::std::string::String {
24339            &self.0
24340        }
24341    }
24342    impl ::std::convert::From<RequestSolanaFaucetBodyAddress> for ::std::string::String {
24343        fn from(value: RequestSolanaFaucetBodyAddress) -> Self {
24344            value.0
24345        }
24346    }
24347    impl ::std::convert::From<&RequestSolanaFaucetBodyAddress> for RequestSolanaFaucetBodyAddress {
24348        fn from(value: &RequestSolanaFaucetBodyAddress) -> Self {
24349            value.clone()
24350        }
24351    }
24352    impl ::std::str::FromStr for RequestSolanaFaucetBodyAddress {
24353        type Err = self::error::ConversionError;
24354        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24355            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
24356                ::std::sync::LazyLock::new(|| {
24357                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
24358                });
24359            if PATTERN.find(value).is_none() {
24360                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
24361            }
24362            Ok(Self(value.to_string()))
24363        }
24364    }
24365    impl ::std::convert::TryFrom<&str> for RequestSolanaFaucetBodyAddress {
24366        type Error = self::error::ConversionError;
24367        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24368            value.parse()
24369        }
24370    }
24371    impl ::std::convert::TryFrom<&::std::string::String> for RequestSolanaFaucetBodyAddress {
24372        type Error = self::error::ConversionError;
24373        fn try_from(
24374            value: &::std::string::String,
24375        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24376            value.parse()
24377        }
24378    }
24379    impl ::std::convert::TryFrom<::std::string::String> for RequestSolanaFaucetBodyAddress {
24380        type Error = self::error::ConversionError;
24381        fn try_from(
24382            value: ::std::string::String,
24383        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24384            value.parse()
24385        }
24386    }
24387    impl<'de> ::serde::Deserialize<'de> for RequestSolanaFaucetBodyAddress {
24388        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
24389        where
24390            D: ::serde::Deserializer<'de>,
24391        {
24392            ::std::string::String::deserialize(deserializer)?
24393                .parse()
24394                .map_err(|e: self::error::ConversionError| {
24395                    <D::Error as ::serde::de::Error>::custom(e.to_string())
24396                })
24397        }
24398    }
24399    ///The token to request funds for.
24400    ///
24401    /// <details><summary>JSON schema</summary>
24402    ///
24403    /// ```json
24404    ///{
24405    ///  "description": "The token to request funds for.",
24406    ///  "examples": [
24407    ///    "sol"
24408    ///  ],
24409    ///  "type": "string",
24410    ///  "enum": [
24411    ///    "sol",
24412    ///    "usdc"
24413    ///  ]
24414    ///}
24415    /// ```
24416    /// </details>
24417    #[derive(
24418        ::serde::Deserialize,
24419        ::serde::Serialize,
24420        Clone,
24421        Copy,
24422        Debug,
24423        Eq,
24424        Hash,
24425        Ord,
24426        PartialEq,
24427        PartialOrd,
24428    )]
24429    pub enum RequestSolanaFaucetBodyToken {
24430        #[serde(rename = "sol")]
24431        Sol,
24432        #[serde(rename = "usdc")]
24433        Usdc,
24434    }
24435    impl ::std::convert::From<&Self> for RequestSolanaFaucetBodyToken {
24436        fn from(value: &RequestSolanaFaucetBodyToken) -> Self {
24437            value.clone()
24438        }
24439    }
24440    impl ::std::fmt::Display for RequestSolanaFaucetBodyToken {
24441        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24442            match *self {
24443                Self::Sol => f.write_str("sol"),
24444                Self::Usdc => f.write_str("usdc"),
24445            }
24446        }
24447    }
24448    impl ::std::str::FromStr for RequestSolanaFaucetBodyToken {
24449        type Err = self::error::ConversionError;
24450        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24451            match value {
24452                "sol" => Ok(Self::Sol),
24453                "usdc" => Ok(Self::Usdc),
24454                _ => Err("invalid value".into()),
24455            }
24456        }
24457    }
24458    impl ::std::convert::TryFrom<&str> for RequestSolanaFaucetBodyToken {
24459        type Error = self::error::ConversionError;
24460        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24461            value.parse()
24462        }
24463    }
24464    impl ::std::convert::TryFrom<&::std::string::String> for RequestSolanaFaucetBodyToken {
24465        type Error = self::error::ConversionError;
24466        fn try_from(
24467            value: &::std::string::String,
24468        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24469            value.parse()
24470        }
24471    }
24472    impl ::std::convert::TryFrom<::std::string::String> for RequestSolanaFaucetBodyToken {
24473        type Error = self::error::ConversionError;
24474        fn try_from(
24475            value: ::std::string::String,
24476        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24477            value.parse()
24478        }
24479    }
24480    ///`RequestSolanaFaucetResponse`
24481    ///
24482    /// <details><summary>JSON schema</summary>
24483    ///
24484    /// ```json
24485    ///{
24486    ///  "type": "object",
24487    ///  "required": [
24488    ///    "transactionSignature"
24489    ///  ],
24490    ///  "properties": {
24491    ///    "transactionSignature": {
24492    ///      "description": "The signature identifying the transaction that requested the funds.",
24493    ///      "examples": [
24494    ///        "4dje1d24iG2FfxwxTJJt8VSTtYXNc6AAuJwngtL97TJSqqPD3pgRZ7uh4szoU6WDrKyFTBgaswkDrCr7BqWjQqqK"
24495    ///      ],
24496    ///      "type": "string"
24497    ///    }
24498    ///  }
24499    ///}
24500    /// ```
24501    /// </details>
24502    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24503    pub struct RequestSolanaFaucetResponse {
24504        ///The signature identifying the transaction that requested the funds.
24505        #[serde(rename = "transactionSignature")]
24506        pub transaction_signature: ::std::string::String,
24507    }
24508    impl ::std::convert::From<&RequestSolanaFaucetResponse> for RequestSolanaFaucetResponse {
24509        fn from(value: &RequestSolanaFaucetResponse) -> Self {
24510            value.clone()
24511        }
24512    }
24513    impl RequestSolanaFaucetResponse {
24514        pub fn builder() -> builder::RequestSolanaFaucetResponse {
24515            Default::default()
24516        }
24517    }
24518    ///`RevokeSpendPermissionAddress`
24519    ///
24520    /// <details><summary>JSON schema</summary>
24521    ///
24522    /// ```json
24523    ///{
24524    ///  "type": "string",
24525    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
24526    ///}
24527    /// ```
24528    /// </details>
24529    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24530    #[serde(transparent)]
24531    pub struct RevokeSpendPermissionAddress(::std::string::String);
24532    impl ::std::ops::Deref for RevokeSpendPermissionAddress {
24533        type Target = ::std::string::String;
24534        fn deref(&self) -> &::std::string::String {
24535            &self.0
24536        }
24537    }
24538    impl ::std::convert::From<RevokeSpendPermissionAddress> for ::std::string::String {
24539        fn from(value: RevokeSpendPermissionAddress) -> Self {
24540            value.0
24541        }
24542    }
24543    impl ::std::convert::From<&RevokeSpendPermissionAddress> for RevokeSpendPermissionAddress {
24544        fn from(value: &RevokeSpendPermissionAddress) -> Self {
24545            value.clone()
24546        }
24547    }
24548    impl ::std::str::FromStr for RevokeSpendPermissionAddress {
24549        type Err = self::error::ConversionError;
24550        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24551            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
24552                ::std::sync::LazyLock::new(|| {
24553                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
24554                });
24555            if PATTERN.find(value).is_none() {
24556                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
24557            }
24558            Ok(Self(value.to_string()))
24559        }
24560    }
24561    impl ::std::convert::TryFrom<&str> for RevokeSpendPermissionAddress {
24562        type Error = self::error::ConversionError;
24563        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24564            value.parse()
24565        }
24566    }
24567    impl ::std::convert::TryFrom<&::std::string::String> for RevokeSpendPermissionAddress {
24568        type Error = self::error::ConversionError;
24569        fn try_from(
24570            value: &::std::string::String,
24571        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24572            value.parse()
24573        }
24574    }
24575    impl ::std::convert::TryFrom<::std::string::String> for RevokeSpendPermissionAddress {
24576        type Error = self::error::ConversionError;
24577        fn try_from(
24578            value: ::std::string::String,
24579        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24580            value.parse()
24581        }
24582    }
24583    impl<'de> ::serde::Deserialize<'de> for RevokeSpendPermissionAddress {
24584        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
24585        where
24586            D: ::serde::Deserializer<'de>,
24587        {
24588            ::std::string::String::deserialize(deserializer)?
24589                .parse()
24590                .map_err(|e: self::error::ConversionError| {
24591                    <D::Error as ::serde::de::Error>::custom(e.to_string())
24592                })
24593        }
24594    }
24595    ///Request parameters for revoking a Spend Permission.
24596    ///
24597    /// <details><summary>JSON schema</summary>
24598    ///
24599    /// ```json
24600    ///{
24601    ///  "description": "Request parameters for revoking a Spend Permission.",
24602    ///  "type": "object",
24603    ///  "required": [
24604    ///    "network",
24605    ///    "permissionHash"
24606    ///  ],
24607    ///  "properties": {
24608    ///    "network": {
24609    ///      "$ref": "#/components/schemas/SpendPermissionNetwork"
24610    ///    },
24611    ///    "paymasterUrl": {
24612    ///      "description": "The paymaster URL of the spend permission.",
24613    ///      "examples": [
24614    ///        "https://paymaster.cdp.coinbase.com"
24615    ///      ],
24616    ///      "allOf": [
24617    ///        {
24618    ///          "$ref": "#/components/schemas/Url"
24619    ///        }
24620    ///      ]
24621    ///    },
24622    ///    "permissionHash": {
24623    ///      "description": "The hash of the spend permission to revoke.",
24624    ///      "examples": [
24625    ///        "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
24626    ///      ],
24627    ///      "type": "string"
24628    ///    }
24629    ///  }
24630    ///}
24631    /// ```
24632    /// </details>
24633    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24634    pub struct RevokeSpendPermissionRequest {
24635        pub network: SpendPermissionNetwork,
24636        ///The paymaster URL of the spend permission.
24637        #[serde(
24638            rename = "paymasterUrl",
24639            default,
24640            skip_serializing_if = "::std::option::Option::is_none"
24641        )]
24642        pub paymaster_url: ::std::option::Option<Url>,
24643        ///The hash of the spend permission to revoke.
24644        #[serde(rename = "permissionHash")]
24645        pub permission_hash: ::std::string::String,
24646    }
24647    impl ::std::convert::From<&RevokeSpendPermissionRequest> for RevokeSpendPermissionRequest {
24648        fn from(value: &RevokeSpendPermissionRequest) -> Self {
24649            value.clone()
24650        }
24651    }
24652    impl RevokeSpendPermissionRequest {
24653        pub fn builder() -> builder::RevokeSpendPermissionRequest {
24654            Default::default()
24655        }
24656    }
24657    ///`RevokeSpendPermissionXIdempotencyKey`
24658    ///
24659    /// <details><summary>JSON schema</summary>
24660    ///
24661    /// ```json
24662    ///{
24663    ///  "type": "string",
24664    ///  "maxLength": 36,
24665    ///  "minLength": 36,
24666    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
24667    ///}
24668    /// ```
24669    /// </details>
24670    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24671    #[serde(transparent)]
24672    pub struct RevokeSpendPermissionXIdempotencyKey(::std::string::String);
24673    impl ::std::ops::Deref for RevokeSpendPermissionXIdempotencyKey {
24674        type Target = ::std::string::String;
24675        fn deref(&self) -> &::std::string::String {
24676            &self.0
24677        }
24678    }
24679    impl ::std::convert::From<RevokeSpendPermissionXIdempotencyKey> for ::std::string::String {
24680        fn from(value: RevokeSpendPermissionXIdempotencyKey) -> Self {
24681            value.0
24682        }
24683    }
24684    impl ::std::convert::From<&RevokeSpendPermissionXIdempotencyKey>
24685        for RevokeSpendPermissionXIdempotencyKey
24686    {
24687        fn from(value: &RevokeSpendPermissionXIdempotencyKey) -> Self {
24688            value.clone()
24689        }
24690    }
24691    impl ::std::str::FromStr for RevokeSpendPermissionXIdempotencyKey {
24692        type Err = self::error::ConversionError;
24693        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24694            if value.chars().count() > 36usize {
24695                return Err("longer than 36 characters".into());
24696            }
24697            if value.chars().count() < 36usize {
24698                return Err("shorter than 36 characters".into());
24699            }
24700            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
24701                ::std::sync::LazyLock::new(|| {
24702                    ::regress::Regex::new(
24703                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
24704                    )
24705                    .unwrap()
24706                });
24707            if PATTERN.find(value).is_none() {
24708                return Err(
24709                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
24710                        .into(),
24711                );
24712            }
24713            Ok(Self(value.to_string()))
24714        }
24715    }
24716    impl ::std::convert::TryFrom<&str> for RevokeSpendPermissionXIdempotencyKey {
24717        type Error = self::error::ConversionError;
24718        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24719            value.parse()
24720        }
24721    }
24722    impl ::std::convert::TryFrom<&::std::string::String> for RevokeSpendPermissionXIdempotencyKey {
24723        type Error = self::error::ConversionError;
24724        fn try_from(
24725            value: &::std::string::String,
24726        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24727            value.parse()
24728        }
24729    }
24730    impl ::std::convert::TryFrom<::std::string::String> for RevokeSpendPermissionXIdempotencyKey {
24731        type Error = self::error::ConversionError;
24732        fn try_from(
24733            value: ::std::string::String,
24734        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24735            value.parse()
24736        }
24737    }
24738    impl<'de> ::serde::Deserialize<'de> for RevokeSpendPermissionXIdempotencyKey {
24739        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
24740        where
24741            D: ::serde::Deserializer<'de>,
24742        {
24743            ::std::string::String::deserialize(deserializer)?
24744                .parse()
24745                .map_err(|e: self::error::ConversionError| {
24746                    <D::Error as ::serde::de::Error>::custom(e.to_string())
24747                })
24748        }
24749    }
24750    ///A rule that limits the behavior of an account.
24751    ///
24752    /// <details><summary>JSON schema</summary>
24753    ///
24754    /// ```json
24755    ///{
24756    ///  "description": "A rule that limits the behavior of an account.",
24757    ///  "examples": [
24758    ///    {
24759    ///      "action": "accept",
24760    ///      "criteria": [
24761    ///        {
24762    ///          "ethValue": "1000000",
24763    ///          "operator": ">=",
24764    ///          "type": "ethValue"
24765    ///        },
24766    ///        {
24767    ///          "addresses": [
24768    ///            "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
24769    ///          ],
24770    ///          "operator": "in",
24771    ///          "type": "evmAddress"
24772    ///        }
24773    ///      ],
24774    ///      "operation": "signEvmTransaction"
24775    ///    }
24776    ///  ],
24777    ///  "type": "object",
24778    ///  "oneOf": [
24779    ///    {
24780    ///      "$ref": "#/components/schemas/SignEvmTransactionRule"
24781    ///    },
24782    ///    {
24783    ///      "$ref": "#/components/schemas/SendEvmTransactionRule"
24784    ///    },
24785    ///    {
24786    ///      "$ref": "#/components/schemas/SignEvmMessageRule"
24787    ///    },
24788    ///    {
24789    ///      "$ref": "#/components/schemas/SignEvmTypedDataRule"
24790    ///    },
24791    ///    {
24792    ///      "$ref": "#/components/schemas/SignSolTransactionRule"
24793    ///    },
24794    ///    {
24795    ///      "$ref": "#/components/schemas/SendSolTransactionRule"
24796    ///    },
24797    ///    {
24798    ///      "$ref": "#/components/schemas/SignSolMessageRule"
24799    ///    },
24800    ///    {
24801    ///      "$ref": "#/components/schemas/SignEvmHashRule"
24802    ///    },
24803    ///    {
24804    ///      "$ref": "#/components/schemas/PrepareUserOperationRule"
24805    ///    },
24806    ///    {
24807    ///      "$ref": "#/components/schemas/SendUserOperationRule"
24808    ///    }
24809    ///  ]
24810    ///}
24811    /// ```
24812    /// </details>
24813    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
24814    #[serde(untagged)]
24815    pub enum Rule {
24816        SignEvmTransactionRule(SignEvmTransactionRule),
24817        SendEvmTransactionRule(SendEvmTransactionRule),
24818        SignEvmMessageRule(SignEvmMessageRule),
24819        SignEvmTypedDataRule(SignEvmTypedDataRule),
24820        SignSolTransactionRule(SignSolTransactionRule),
24821        SendSolTransactionRule(SendSolTransactionRule),
24822        SignSolMessageRule(SignSolMessageRule),
24823        SignEvmHashRule(SignEvmHashRule),
24824        PrepareUserOperationRule(PrepareUserOperationRule),
24825        SendUserOperationRule(SendUserOperationRule),
24826    }
24827    impl ::std::convert::From<&Self> for Rule {
24828        fn from(value: &Rule) -> Self {
24829            value.clone()
24830        }
24831    }
24832    impl ::std::convert::From<SignEvmTransactionRule> for Rule {
24833        fn from(value: SignEvmTransactionRule) -> Self {
24834            Self::SignEvmTransactionRule(value)
24835        }
24836    }
24837    impl ::std::convert::From<SendEvmTransactionRule> for Rule {
24838        fn from(value: SendEvmTransactionRule) -> Self {
24839            Self::SendEvmTransactionRule(value)
24840        }
24841    }
24842    impl ::std::convert::From<SignEvmMessageRule> for Rule {
24843        fn from(value: SignEvmMessageRule) -> Self {
24844            Self::SignEvmMessageRule(value)
24845        }
24846    }
24847    impl ::std::convert::From<SignEvmTypedDataRule> for Rule {
24848        fn from(value: SignEvmTypedDataRule) -> Self {
24849            Self::SignEvmTypedDataRule(value)
24850        }
24851    }
24852    impl ::std::convert::From<SignSolTransactionRule> for Rule {
24853        fn from(value: SignSolTransactionRule) -> Self {
24854            Self::SignSolTransactionRule(value)
24855        }
24856    }
24857    impl ::std::convert::From<SendSolTransactionRule> for Rule {
24858        fn from(value: SendSolTransactionRule) -> Self {
24859            Self::SendSolTransactionRule(value)
24860        }
24861    }
24862    impl ::std::convert::From<SignSolMessageRule> for Rule {
24863        fn from(value: SignSolMessageRule) -> Self {
24864            Self::SignSolMessageRule(value)
24865        }
24866    }
24867    impl ::std::convert::From<SignEvmHashRule> for Rule {
24868        fn from(value: SignEvmHashRule) -> Self {
24869            Self::SignEvmHashRule(value)
24870        }
24871    }
24872    impl ::std::convert::From<PrepareUserOperationRule> for Rule {
24873        fn from(value: PrepareUserOperationRule) -> Self {
24874            Self::PrepareUserOperationRule(value)
24875        }
24876    }
24877    impl ::std::convert::From<SendUserOperationRule> for Rule {
24878        fn from(value: SendUserOperationRule) -> Self {
24879            Self::SendUserOperationRule(value)
24880        }
24881    }
24882    ///`SendEvmTransactionAddress`
24883    ///
24884    /// <details><summary>JSON schema</summary>
24885    ///
24886    /// ```json
24887    ///{
24888    ///  "type": "string",
24889    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
24890    ///}
24891    /// ```
24892    /// </details>
24893    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24894    #[serde(transparent)]
24895    pub struct SendEvmTransactionAddress(::std::string::String);
24896    impl ::std::ops::Deref for SendEvmTransactionAddress {
24897        type Target = ::std::string::String;
24898        fn deref(&self) -> &::std::string::String {
24899            &self.0
24900        }
24901    }
24902    impl ::std::convert::From<SendEvmTransactionAddress> for ::std::string::String {
24903        fn from(value: SendEvmTransactionAddress) -> Self {
24904            value.0
24905        }
24906    }
24907    impl ::std::convert::From<&SendEvmTransactionAddress> for SendEvmTransactionAddress {
24908        fn from(value: &SendEvmTransactionAddress) -> Self {
24909            value.clone()
24910        }
24911    }
24912    impl ::std::str::FromStr for SendEvmTransactionAddress {
24913        type Err = self::error::ConversionError;
24914        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24915            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
24916                ::std::sync::LazyLock::new(|| {
24917                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
24918                });
24919            if PATTERN.find(value).is_none() {
24920                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
24921            }
24922            Ok(Self(value.to_string()))
24923        }
24924    }
24925    impl ::std::convert::TryFrom<&str> for SendEvmTransactionAddress {
24926        type Error = self::error::ConversionError;
24927        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
24928            value.parse()
24929        }
24930    }
24931    impl ::std::convert::TryFrom<&::std::string::String> for SendEvmTransactionAddress {
24932        type Error = self::error::ConversionError;
24933        fn try_from(
24934            value: &::std::string::String,
24935        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24936            value.parse()
24937        }
24938    }
24939    impl ::std::convert::TryFrom<::std::string::String> for SendEvmTransactionAddress {
24940        type Error = self::error::ConversionError;
24941        fn try_from(
24942            value: ::std::string::String,
24943        ) -> ::std::result::Result<Self, self::error::ConversionError> {
24944            value.parse()
24945        }
24946    }
24947    impl<'de> ::serde::Deserialize<'de> for SendEvmTransactionAddress {
24948        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
24949        where
24950            D: ::serde::Deserializer<'de>,
24951        {
24952            ::std::string::String::deserialize(deserializer)?
24953                .parse()
24954                .map_err(|e: self::error::ConversionError| {
24955                    <D::Error as ::serde::de::Error>::custom(e.to_string())
24956                })
24957        }
24958    }
24959    ///`SendEvmTransactionBody`
24960    ///
24961    /// <details><summary>JSON schema</summary>
24962    ///
24963    /// ```json
24964    ///{
24965    ///  "type": "object",
24966    ///  "required": [
24967    ///    "network",
24968    ///    "transaction"
24969    ///  ],
24970    ///  "properties": {
24971    ///    "network": {
24972    ///      "description": "The network to send the transaction to.",
24973    ///      "examples": [
24974    ///        "base-sepolia"
24975    ///      ],
24976    ///      "type": "string",
24977    ///      "enum": [
24978    ///        "base",
24979    ///        "base-sepolia",
24980    ///        "ethereum",
24981    ///        "ethereum-sepolia",
24982    ///        "avalanche",
24983    ///        "polygon",
24984    ///        "optimism",
24985    ///        "arbitrum"
24986    ///      ]
24987    ///    },
24988    ///    "transaction": {
24989    ///      "description": "The RLP-encoded transaction to sign and send, as a 0x-prefixed hex string.",
24990    ///      "examples": [
24991    ///        "0xf86b098505d21dba00830334509431415daf58e2c6b7323b4c58712fd92952145da79018080"
24992    ///      ],
24993    ///      "type": "string"
24994    ///    }
24995    ///  }
24996    ///}
24997    /// ```
24998    /// </details>
24999    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25000    pub struct SendEvmTransactionBody {
25001        ///The network to send the transaction to.
25002        pub network: SendEvmTransactionBodyNetwork,
25003        ///The RLP-encoded transaction to sign and send, as a 0x-prefixed hex string.
25004        pub transaction: ::std::string::String,
25005    }
25006    impl ::std::convert::From<&SendEvmTransactionBody> for SendEvmTransactionBody {
25007        fn from(value: &SendEvmTransactionBody) -> Self {
25008            value.clone()
25009        }
25010    }
25011    impl SendEvmTransactionBody {
25012        pub fn builder() -> builder::SendEvmTransactionBody {
25013            Default::default()
25014        }
25015    }
25016    ///The network to send the transaction to.
25017    ///
25018    /// <details><summary>JSON schema</summary>
25019    ///
25020    /// ```json
25021    ///{
25022    ///  "description": "The network to send the transaction to.",
25023    ///  "examples": [
25024    ///    "base-sepolia"
25025    ///  ],
25026    ///  "type": "string",
25027    ///  "enum": [
25028    ///    "base",
25029    ///    "base-sepolia",
25030    ///    "ethereum",
25031    ///    "ethereum-sepolia",
25032    ///    "avalanche",
25033    ///    "polygon",
25034    ///    "optimism",
25035    ///    "arbitrum"
25036    ///  ]
25037    ///}
25038    /// ```
25039    /// </details>
25040    #[derive(
25041        ::serde::Deserialize,
25042        ::serde::Serialize,
25043        Clone,
25044        Copy,
25045        Debug,
25046        Eq,
25047        Hash,
25048        Ord,
25049        PartialEq,
25050        PartialOrd,
25051    )]
25052    pub enum SendEvmTransactionBodyNetwork {
25053        #[serde(rename = "base")]
25054        Base,
25055        #[serde(rename = "base-sepolia")]
25056        BaseSepolia,
25057        #[serde(rename = "ethereum")]
25058        Ethereum,
25059        #[serde(rename = "ethereum-sepolia")]
25060        EthereumSepolia,
25061        #[serde(rename = "avalanche")]
25062        Avalanche,
25063        #[serde(rename = "polygon")]
25064        Polygon,
25065        #[serde(rename = "optimism")]
25066        Optimism,
25067        #[serde(rename = "arbitrum")]
25068        Arbitrum,
25069    }
25070    impl ::std::convert::From<&Self> for SendEvmTransactionBodyNetwork {
25071        fn from(value: &SendEvmTransactionBodyNetwork) -> Self {
25072            value.clone()
25073        }
25074    }
25075    impl ::std::fmt::Display for SendEvmTransactionBodyNetwork {
25076        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25077            match *self {
25078                Self::Base => f.write_str("base"),
25079                Self::BaseSepolia => f.write_str("base-sepolia"),
25080                Self::Ethereum => f.write_str("ethereum"),
25081                Self::EthereumSepolia => f.write_str("ethereum-sepolia"),
25082                Self::Avalanche => f.write_str("avalanche"),
25083                Self::Polygon => f.write_str("polygon"),
25084                Self::Optimism => f.write_str("optimism"),
25085                Self::Arbitrum => f.write_str("arbitrum"),
25086            }
25087        }
25088    }
25089    impl ::std::str::FromStr for SendEvmTransactionBodyNetwork {
25090        type Err = self::error::ConversionError;
25091        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25092            match value {
25093                "base" => Ok(Self::Base),
25094                "base-sepolia" => Ok(Self::BaseSepolia),
25095                "ethereum" => Ok(Self::Ethereum),
25096                "ethereum-sepolia" => Ok(Self::EthereumSepolia),
25097                "avalanche" => Ok(Self::Avalanche),
25098                "polygon" => Ok(Self::Polygon),
25099                "optimism" => Ok(Self::Optimism),
25100                "arbitrum" => Ok(Self::Arbitrum),
25101                _ => Err("invalid value".into()),
25102            }
25103        }
25104    }
25105    impl ::std::convert::TryFrom<&str> for SendEvmTransactionBodyNetwork {
25106        type Error = self::error::ConversionError;
25107        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25108            value.parse()
25109        }
25110    }
25111    impl ::std::convert::TryFrom<&::std::string::String> for SendEvmTransactionBodyNetwork {
25112        type Error = self::error::ConversionError;
25113        fn try_from(
25114            value: &::std::string::String,
25115        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25116            value.parse()
25117        }
25118    }
25119    impl ::std::convert::TryFrom<::std::string::String> for SendEvmTransactionBodyNetwork {
25120        type Error = self::error::ConversionError;
25121        fn try_from(
25122            value: ::std::string::String,
25123        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25124            value.parse()
25125        }
25126    }
25127    ///A schema for specifying criteria for the SignEvmTransaction operation.
25128    ///
25129    /// <details><summary>JSON schema</summary>
25130    ///
25131    /// ```json
25132    ///{
25133    ///  "description": "A schema for specifying criteria for the SignEvmTransaction operation.",
25134    ///  "examples": [
25135    ///    [
25136    ///      {
25137    ///        "ethValue": "1000000",
25138    ///        "operator": ">=",
25139    ///        "type": "ethValue"
25140    ///      },
25141    ///      {
25142    ///        "addresses": [
25143    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
25144    ///        ],
25145    ///        "operator": "in",
25146    ///        "type": "evmAddress"
25147    ///      }
25148    ///    ]
25149    ///  ],
25150    ///  "type": "array",
25151    ///  "items": {
25152    ///    "oneOf": [
25153    ///      {
25154    ///        "$ref": "#/components/schemas/EthValueCriterion"
25155    ///      },
25156    ///      {
25157    ///        "$ref": "#/components/schemas/EvmAddressCriterion"
25158    ///      },
25159    ///      {
25160    ///        "$ref": "#/components/schemas/EvmNetworkCriterion"
25161    ///      },
25162    ///      {
25163    ///        "$ref": "#/components/schemas/EvmDataCriterion"
25164    ///      },
25165    ///      {
25166    ///        "$ref": "#/components/schemas/NetUSDChangeCriterion"
25167    ///      }
25168    ///    ]
25169    ///  },
25170    ///  "x-audience": "public"
25171    ///}
25172    /// ```
25173    /// </details>
25174    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25175    #[serde(transparent)]
25176    pub struct SendEvmTransactionCriteria(pub ::std::vec::Vec<SendEvmTransactionCriteriaItem>);
25177    impl ::std::ops::Deref for SendEvmTransactionCriteria {
25178        type Target = ::std::vec::Vec<SendEvmTransactionCriteriaItem>;
25179        fn deref(&self) -> &::std::vec::Vec<SendEvmTransactionCriteriaItem> {
25180            &self.0
25181        }
25182    }
25183    impl ::std::convert::From<SendEvmTransactionCriteria>
25184        for ::std::vec::Vec<SendEvmTransactionCriteriaItem>
25185    {
25186        fn from(value: SendEvmTransactionCriteria) -> Self {
25187            value.0
25188        }
25189    }
25190    impl ::std::convert::From<&SendEvmTransactionCriteria> for SendEvmTransactionCriteria {
25191        fn from(value: &SendEvmTransactionCriteria) -> Self {
25192            value.clone()
25193        }
25194    }
25195    impl ::std::convert::From<::std::vec::Vec<SendEvmTransactionCriteriaItem>>
25196        for SendEvmTransactionCriteria
25197    {
25198        fn from(value: ::std::vec::Vec<SendEvmTransactionCriteriaItem>) -> Self {
25199            Self(value)
25200        }
25201    }
25202    ///`SendEvmTransactionCriteriaItem`
25203    ///
25204    /// <details><summary>JSON schema</summary>
25205    ///
25206    /// ```json
25207    ///{
25208    ///  "oneOf": [
25209    ///    {
25210    ///      "$ref": "#/components/schemas/EthValueCriterion"
25211    ///    },
25212    ///    {
25213    ///      "$ref": "#/components/schemas/EvmAddressCriterion"
25214    ///    },
25215    ///    {
25216    ///      "$ref": "#/components/schemas/EvmNetworkCriterion"
25217    ///    },
25218    ///    {
25219    ///      "$ref": "#/components/schemas/EvmDataCriterion"
25220    ///    },
25221    ///    {
25222    ///      "$ref": "#/components/schemas/NetUSDChangeCriterion"
25223    ///    }
25224    ///  ]
25225    ///}
25226    /// ```
25227    /// </details>
25228    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25229    #[serde(untagged)]
25230    pub enum SendEvmTransactionCriteriaItem {
25231        EthValueCriterion(EthValueCriterion),
25232        EvmAddressCriterion(EvmAddressCriterion),
25233        EvmNetworkCriterion(EvmNetworkCriterion),
25234        EvmDataCriterion(EvmDataCriterion),
25235        NetUsdChangeCriterion(NetUsdChangeCriterion),
25236    }
25237    impl ::std::convert::From<&Self> for SendEvmTransactionCriteriaItem {
25238        fn from(value: &SendEvmTransactionCriteriaItem) -> Self {
25239            value.clone()
25240        }
25241    }
25242    impl ::std::convert::From<EthValueCriterion> for SendEvmTransactionCriteriaItem {
25243        fn from(value: EthValueCriterion) -> Self {
25244            Self::EthValueCriterion(value)
25245        }
25246    }
25247    impl ::std::convert::From<EvmAddressCriterion> for SendEvmTransactionCriteriaItem {
25248        fn from(value: EvmAddressCriterion) -> Self {
25249            Self::EvmAddressCriterion(value)
25250        }
25251    }
25252    impl ::std::convert::From<EvmNetworkCriterion> for SendEvmTransactionCriteriaItem {
25253        fn from(value: EvmNetworkCriterion) -> Self {
25254            Self::EvmNetworkCriterion(value)
25255        }
25256    }
25257    impl ::std::convert::From<EvmDataCriterion> for SendEvmTransactionCriteriaItem {
25258        fn from(value: EvmDataCriterion) -> Self {
25259            Self::EvmDataCriterion(value)
25260        }
25261    }
25262    impl ::std::convert::From<NetUsdChangeCriterion> for SendEvmTransactionCriteriaItem {
25263        fn from(value: NetUsdChangeCriterion) -> Self {
25264            Self::NetUsdChangeCriterion(value)
25265        }
25266    }
25267    ///`SendEvmTransactionResponse`
25268    ///
25269    /// <details><summary>JSON schema</summary>
25270    ///
25271    /// ```json
25272    ///{
25273    ///  "type": "object",
25274    ///  "required": [
25275    ///    "transactionHash"
25276    ///  ],
25277    ///  "properties": {
25278    ///    "transactionHash": {
25279    ///      "description": "The hash of the transaction, as a 0x-prefixed hex string.",
25280    ///      "examples": [
25281    ///        "0xf8f98fb6726fc936f24b2007df5cb20e2b8444ff3dfaa2a929335f432a9be2e7"
25282    ///      ],
25283    ///      "type": "string"
25284    ///    }
25285    ///  }
25286    ///}
25287    /// ```
25288    /// </details>
25289    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25290    pub struct SendEvmTransactionResponse {
25291        ///The hash of the transaction, as a 0x-prefixed hex string.
25292        #[serde(rename = "transactionHash")]
25293        pub transaction_hash: ::std::string::String,
25294    }
25295    impl ::std::convert::From<&SendEvmTransactionResponse> for SendEvmTransactionResponse {
25296        fn from(value: &SendEvmTransactionResponse) -> Self {
25297            value.clone()
25298        }
25299    }
25300    impl SendEvmTransactionResponse {
25301        pub fn builder() -> builder::SendEvmTransactionResponse {
25302            Default::default()
25303        }
25304    }
25305    ///`SendEvmTransactionRule`
25306    ///
25307    /// <details><summary>JSON schema</summary>
25308    ///
25309    /// ```json
25310    ///{
25311    ///  "title": "SendEvmTransactionRule",
25312    ///  "required": [
25313    ///    "action",
25314    ///    "criteria",
25315    ///    "operation"
25316    ///  ],
25317    ///  "properties": {
25318    ///    "action": {
25319    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
25320    ///      "examples": [
25321    ///        "accept"
25322    ///      ],
25323    ///      "type": "string",
25324    ///      "enum": [
25325    ///        "reject",
25326    ///        "accept"
25327    ///      ]
25328    ///    },
25329    ///    "criteria": {
25330    ///      "$ref": "#/components/schemas/SendEvmTransactionCriteria"
25331    ///    },
25332    ///    "operation": {
25333    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
25334    ///      "examples": [
25335    ///        "sendEvmTransaction"
25336    ///      ],
25337    ///      "type": "string",
25338    ///      "enum": [
25339    ///        "sendEvmTransaction"
25340    ///      ]
25341    ///    }
25342    ///  },
25343    ///  "x-audience": "public"
25344    ///}
25345    /// ```
25346    /// </details>
25347    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25348    pub struct SendEvmTransactionRule {
25349        ///Whether matching the rule will cause the request to be rejected or accepted.
25350        pub action: SendEvmTransactionRuleAction,
25351        pub criteria: SendEvmTransactionCriteria,
25352        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
25353        pub operation: SendEvmTransactionRuleOperation,
25354    }
25355    impl ::std::convert::From<&SendEvmTransactionRule> for SendEvmTransactionRule {
25356        fn from(value: &SendEvmTransactionRule) -> Self {
25357            value.clone()
25358        }
25359    }
25360    impl SendEvmTransactionRule {
25361        pub fn builder() -> builder::SendEvmTransactionRule {
25362            Default::default()
25363        }
25364    }
25365    ///Whether matching the rule will cause the request to be rejected or accepted.
25366    ///
25367    /// <details><summary>JSON schema</summary>
25368    ///
25369    /// ```json
25370    ///{
25371    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
25372    ///  "examples": [
25373    ///    "accept"
25374    ///  ],
25375    ///  "type": "string",
25376    ///  "enum": [
25377    ///    "reject",
25378    ///    "accept"
25379    ///  ]
25380    ///}
25381    /// ```
25382    /// </details>
25383    #[derive(
25384        ::serde::Deserialize,
25385        ::serde::Serialize,
25386        Clone,
25387        Copy,
25388        Debug,
25389        Eq,
25390        Hash,
25391        Ord,
25392        PartialEq,
25393        PartialOrd,
25394    )]
25395    pub enum SendEvmTransactionRuleAction {
25396        #[serde(rename = "reject")]
25397        Reject,
25398        #[serde(rename = "accept")]
25399        Accept,
25400    }
25401    impl ::std::convert::From<&Self> for SendEvmTransactionRuleAction {
25402        fn from(value: &SendEvmTransactionRuleAction) -> Self {
25403            value.clone()
25404        }
25405    }
25406    impl ::std::fmt::Display for SendEvmTransactionRuleAction {
25407        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25408            match *self {
25409                Self::Reject => f.write_str("reject"),
25410                Self::Accept => f.write_str("accept"),
25411            }
25412        }
25413    }
25414    impl ::std::str::FromStr for SendEvmTransactionRuleAction {
25415        type Err = self::error::ConversionError;
25416        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25417            match value {
25418                "reject" => Ok(Self::Reject),
25419                "accept" => Ok(Self::Accept),
25420                _ => Err("invalid value".into()),
25421            }
25422        }
25423    }
25424    impl ::std::convert::TryFrom<&str> for SendEvmTransactionRuleAction {
25425        type Error = self::error::ConversionError;
25426        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25427            value.parse()
25428        }
25429    }
25430    impl ::std::convert::TryFrom<&::std::string::String> for SendEvmTransactionRuleAction {
25431        type Error = self::error::ConversionError;
25432        fn try_from(
25433            value: &::std::string::String,
25434        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25435            value.parse()
25436        }
25437    }
25438    impl ::std::convert::TryFrom<::std::string::String> for SendEvmTransactionRuleAction {
25439        type Error = self::error::ConversionError;
25440        fn try_from(
25441            value: ::std::string::String,
25442        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25443            value.parse()
25444        }
25445    }
25446    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
25447    ///
25448    /// <details><summary>JSON schema</summary>
25449    ///
25450    /// ```json
25451    ///{
25452    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
25453    ///  "examples": [
25454    ///    "sendEvmTransaction"
25455    ///  ],
25456    ///  "type": "string",
25457    ///  "enum": [
25458    ///    "sendEvmTransaction"
25459    ///  ]
25460    ///}
25461    /// ```
25462    /// </details>
25463    #[derive(
25464        ::serde::Deserialize,
25465        ::serde::Serialize,
25466        Clone,
25467        Copy,
25468        Debug,
25469        Eq,
25470        Hash,
25471        Ord,
25472        PartialEq,
25473        PartialOrd,
25474    )]
25475    pub enum SendEvmTransactionRuleOperation {
25476        #[serde(rename = "sendEvmTransaction")]
25477        SendEvmTransaction,
25478    }
25479    impl ::std::convert::From<&Self> for SendEvmTransactionRuleOperation {
25480        fn from(value: &SendEvmTransactionRuleOperation) -> Self {
25481            value.clone()
25482        }
25483    }
25484    impl ::std::fmt::Display for SendEvmTransactionRuleOperation {
25485        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25486            match *self {
25487                Self::SendEvmTransaction => f.write_str("sendEvmTransaction"),
25488            }
25489        }
25490    }
25491    impl ::std::str::FromStr for SendEvmTransactionRuleOperation {
25492        type Err = self::error::ConversionError;
25493        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25494            match value {
25495                "sendEvmTransaction" => Ok(Self::SendEvmTransaction),
25496                _ => Err("invalid value".into()),
25497            }
25498        }
25499    }
25500    impl ::std::convert::TryFrom<&str> for SendEvmTransactionRuleOperation {
25501        type Error = self::error::ConversionError;
25502        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25503            value.parse()
25504        }
25505    }
25506    impl ::std::convert::TryFrom<&::std::string::String> for SendEvmTransactionRuleOperation {
25507        type Error = self::error::ConversionError;
25508        fn try_from(
25509            value: &::std::string::String,
25510        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25511            value.parse()
25512        }
25513    }
25514    impl ::std::convert::TryFrom<::std::string::String> for SendEvmTransactionRuleOperation {
25515        type Error = self::error::ConversionError;
25516        fn try_from(
25517            value: ::std::string::String,
25518        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25519            value.parse()
25520        }
25521    }
25522    ///`SendEvmTransactionXIdempotencyKey`
25523    ///
25524    /// <details><summary>JSON schema</summary>
25525    ///
25526    /// ```json
25527    ///{
25528    ///  "type": "string",
25529    ///  "maxLength": 36,
25530    ///  "minLength": 36,
25531    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
25532    ///}
25533    /// ```
25534    /// </details>
25535    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25536    #[serde(transparent)]
25537    pub struct SendEvmTransactionXIdempotencyKey(::std::string::String);
25538    impl ::std::ops::Deref for SendEvmTransactionXIdempotencyKey {
25539        type Target = ::std::string::String;
25540        fn deref(&self) -> &::std::string::String {
25541            &self.0
25542        }
25543    }
25544    impl ::std::convert::From<SendEvmTransactionXIdempotencyKey> for ::std::string::String {
25545        fn from(value: SendEvmTransactionXIdempotencyKey) -> Self {
25546            value.0
25547        }
25548    }
25549    impl ::std::convert::From<&SendEvmTransactionXIdempotencyKey>
25550        for SendEvmTransactionXIdempotencyKey
25551    {
25552        fn from(value: &SendEvmTransactionXIdempotencyKey) -> Self {
25553            value.clone()
25554        }
25555    }
25556    impl ::std::str::FromStr for SendEvmTransactionXIdempotencyKey {
25557        type Err = self::error::ConversionError;
25558        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25559            if value.chars().count() > 36usize {
25560                return Err("longer than 36 characters".into());
25561            }
25562            if value.chars().count() < 36usize {
25563                return Err("shorter than 36 characters".into());
25564            }
25565            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
25566                ::std::sync::LazyLock::new(|| {
25567                    ::regress::Regex::new(
25568                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
25569                    )
25570                    .unwrap()
25571                });
25572            if PATTERN.find(value).is_none() {
25573                return Err(
25574                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
25575                        .into(),
25576                );
25577            }
25578            Ok(Self(value.to_string()))
25579        }
25580    }
25581    impl ::std::convert::TryFrom<&str> for SendEvmTransactionXIdempotencyKey {
25582        type Error = self::error::ConversionError;
25583        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25584            value.parse()
25585        }
25586    }
25587    impl ::std::convert::TryFrom<&::std::string::String> for SendEvmTransactionXIdempotencyKey {
25588        type Error = self::error::ConversionError;
25589        fn try_from(
25590            value: &::std::string::String,
25591        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25592            value.parse()
25593        }
25594    }
25595    impl ::std::convert::TryFrom<::std::string::String> for SendEvmTransactionXIdempotencyKey {
25596        type Error = self::error::ConversionError;
25597        fn try_from(
25598            value: ::std::string::String,
25599        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25600            value.parse()
25601        }
25602    }
25603    impl<'de> ::serde::Deserialize<'de> for SendEvmTransactionXIdempotencyKey {
25604        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
25605        where
25606            D: ::serde::Deserializer<'de>,
25607        {
25608            ::std::string::String::deserialize(deserializer)?
25609                .parse()
25610                .map_err(|e: self::error::ConversionError| {
25611                    <D::Error as ::serde::de::Error>::custom(e.to_string())
25612                })
25613        }
25614    }
25615    ///A schema for specifying criteria for the SendSolTransaction operation.
25616    ///
25617    /// <details><summary>JSON schema</summary>
25618    ///
25619    /// ```json
25620    ///{
25621    ///  "description": "A schema for specifying criteria for the SendSolTransaction operation.",
25622    ///  "examples": [
25623    ///    [
25624    ///      {
25625    ///        "addresses": [
25626    ///          "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
25627    ///        ],
25628    ///        "operator": "in",
25629    ///        "type": "solAddress"
25630    ///      },
25631    ///      {
25632    ///        "operator": "<=",
25633    ///        "solValue": "1000000000000000000",
25634    ///        "type": "solValue"
25635    ///      }
25636    ///    ]
25637    ///  ],
25638    ///  "type": "array",
25639    ///  "items": {
25640    ///    "oneOf": [
25641    ///      {
25642    ///        "$ref": "#/components/schemas/SolAddressCriterion"
25643    ///      },
25644    ///      {
25645    ///        "$ref": "#/components/schemas/SolValueCriterion"
25646    ///      },
25647    ///      {
25648    ///        "$ref": "#/components/schemas/SplAddressCriterion"
25649    ///      },
25650    ///      {
25651    ///        "$ref": "#/components/schemas/SplValueCriterion"
25652    ///      },
25653    ///      {
25654    ///        "$ref": "#/components/schemas/MintAddressCriterion"
25655    ///      },
25656    ///      {
25657    ///        "$ref": "#/components/schemas/SolDataCriterion"
25658    ///      },
25659    ///      {
25660    ///        "$ref": "#/components/schemas/ProgramIdCriterion"
25661    ///      },
25662    ///      {
25663    ///        "$ref": "#/components/schemas/SolNetworkCriterion"
25664    ///      }
25665    ///    ]
25666    ///  },
25667    ///  "x-audience": "public"
25668    ///}
25669    /// ```
25670    /// </details>
25671    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25672    #[serde(transparent)]
25673    pub struct SendSolTransactionCriteria(pub ::std::vec::Vec<SendSolTransactionCriteriaItem>);
25674    impl ::std::ops::Deref for SendSolTransactionCriteria {
25675        type Target = ::std::vec::Vec<SendSolTransactionCriteriaItem>;
25676        fn deref(&self) -> &::std::vec::Vec<SendSolTransactionCriteriaItem> {
25677            &self.0
25678        }
25679    }
25680    impl ::std::convert::From<SendSolTransactionCriteria>
25681        for ::std::vec::Vec<SendSolTransactionCriteriaItem>
25682    {
25683        fn from(value: SendSolTransactionCriteria) -> Self {
25684            value.0
25685        }
25686    }
25687    impl ::std::convert::From<&SendSolTransactionCriteria> for SendSolTransactionCriteria {
25688        fn from(value: &SendSolTransactionCriteria) -> Self {
25689            value.clone()
25690        }
25691    }
25692    impl ::std::convert::From<::std::vec::Vec<SendSolTransactionCriteriaItem>>
25693        for SendSolTransactionCriteria
25694    {
25695        fn from(value: ::std::vec::Vec<SendSolTransactionCriteriaItem>) -> Self {
25696            Self(value)
25697        }
25698    }
25699    ///`SendSolTransactionCriteriaItem`
25700    ///
25701    /// <details><summary>JSON schema</summary>
25702    ///
25703    /// ```json
25704    ///{
25705    ///  "oneOf": [
25706    ///    {
25707    ///      "$ref": "#/components/schemas/SolAddressCriterion"
25708    ///    },
25709    ///    {
25710    ///      "$ref": "#/components/schemas/SolValueCriterion"
25711    ///    },
25712    ///    {
25713    ///      "$ref": "#/components/schemas/SplAddressCriterion"
25714    ///    },
25715    ///    {
25716    ///      "$ref": "#/components/schemas/SplValueCriterion"
25717    ///    },
25718    ///    {
25719    ///      "$ref": "#/components/schemas/MintAddressCriterion"
25720    ///    },
25721    ///    {
25722    ///      "$ref": "#/components/schemas/SolDataCriterion"
25723    ///    },
25724    ///    {
25725    ///      "$ref": "#/components/schemas/ProgramIdCriterion"
25726    ///    },
25727    ///    {
25728    ///      "$ref": "#/components/schemas/SolNetworkCriterion"
25729    ///    }
25730    ///  ]
25731    ///}
25732    /// ```
25733    /// </details>
25734    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25735    #[serde(untagged)]
25736    pub enum SendSolTransactionCriteriaItem {
25737        SolAddressCriterion(SolAddressCriterion),
25738        SolValueCriterion(SolValueCriterion),
25739        SplAddressCriterion(SplAddressCriterion),
25740        SplValueCriterion(SplValueCriterion),
25741        MintAddressCriterion(MintAddressCriterion),
25742        SolDataCriterion(SolDataCriterion),
25743        ProgramIdCriterion(ProgramIdCriterion),
25744        SolNetworkCriterion(SolNetworkCriterion),
25745    }
25746    impl ::std::convert::From<&Self> for SendSolTransactionCriteriaItem {
25747        fn from(value: &SendSolTransactionCriteriaItem) -> Self {
25748            value.clone()
25749        }
25750    }
25751    impl ::std::convert::From<SolAddressCriterion> for SendSolTransactionCriteriaItem {
25752        fn from(value: SolAddressCriterion) -> Self {
25753            Self::SolAddressCriterion(value)
25754        }
25755    }
25756    impl ::std::convert::From<SolValueCriterion> for SendSolTransactionCriteriaItem {
25757        fn from(value: SolValueCriterion) -> Self {
25758            Self::SolValueCriterion(value)
25759        }
25760    }
25761    impl ::std::convert::From<SplAddressCriterion> for SendSolTransactionCriteriaItem {
25762        fn from(value: SplAddressCriterion) -> Self {
25763            Self::SplAddressCriterion(value)
25764        }
25765    }
25766    impl ::std::convert::From<SplValueCriterion> for SendSolTransactionCriteriaItem {
25767        fn from(value: SplValueCriterion) -> Self {
25768            Self::SplValueCriterion(value)
25769        }
25770    }
25771    impl ::std::convert::From<MintAddressCriterion> for SendSolTransactionCriteriaItem {
25772        fn from(value: MintAddressCriterion) -> Self {
25773            Self::MintAddressCriterion(value)
25774        }
25775    }
25776    impl ::std::convert::From<SolDataCriterion> for SendSolTransactionCriteriaItem {
25777        fn from(value: SolDataCriterion) -> Self {
25778            Self::SolDataCriterion(value)
25779        }
25780    }
25781    impl ::std::convert::From<ProgramIdCriterion> for SendSolTransactionCriteriaItem {
25782        fn from(value: ProgramIdCriterion) -> Self {
25783            Self::ProgramIdCriterion(value)
25784        }
25785    }
25786    impl ::std::convert::From<SolNetworkCriterion> for SendSolTransactionCriteriaItem {
25787        fn from(value: SolNetworkCriterion) -> Self {
25788            Self::SolNetworkCriterion(value)
25789        }
25790    }
25791    ///`SendSolTransactionRule`
25792    ///
25793    /// <details><summary>JSON schema</summary>
25794    ///
25795    /// ```json
25796    ///{
25797    ///  "title": "SendSolTransactionRule",
25798    ///  "required": [
25799    ///    "action",
25800    ///    "criteria",
25801    ///    "operation"
25802    ///  ],
25803    ///  "properties": {
25804    ///    "action": {
25805    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
25806    ///      "examples": [
25807    ///        "accept"
25808    ///      ],
25809    ///      "type": "string",
25810    ///      "enum": [
25811    ///        "reject",
25812    ///        "accept"
25813    ///      ]
25814    ///    },
25815    ///    "criteria": {
25816    ///      "$ref": "#/components/schemas/SendSolTransactionCriteria"
25817    ///    },
25818    ///    "operation": {
25819    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
25820    ///      "examples": [
25821    ///        "sendSolTransaction"
25822    ///      ],
25823    ///      "type": "string",
25824    ///      "enum": [
25825    ///        "sendSolTransaction"
25826    ///      ]
25827    ///    }
25828    ///  },
25829    ///  "x-audience": "public"
25830    ///}
25831    /// ```
25832    /// </details>
25833    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
25834    pub struct SendSolTransactionRule {
25835        ///Whether matching the rule will cause the request to be rejected or accepted.
25836        pub action: SendSolTransactionRuleAction,
25837        pub criteria: SendSolTransactionCriteria,
25838        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
25839        pub operation: SendSolTransactionRuleOperation,
25840    }
25841    impl ::std::convert::From<&SendSolTransactionRule> for SendSolTransactionRule {
25842        fn from(value: &SendSolTransactionRule) -> Self {
25843            value.clone()
25844        }
25845    }
25846    impl SendSolTransactionRule {
25847        pub fn builder() -> builder::SendSolTransactionRule {
25848            Default::default()
25849        }
25850    }
25851    ///Whether matching the rule will cause the request to be rejected or accepted.
25852    ///
25853    /// <details><summary>JSON schema</summary>
25854    ///
25855    /// ```json
25856    ///{
25857    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
25858    ///  "examples": [
25859    ///    "accept"
25860    ///  ],
25861    ///  "type": "string",
25862    ///  "enum": [
25863    ///    "reject",
25864    ///    "accept"
25865    ///  ]
25866    ///}
25867    /// ```
25868    /// </details>
25869    #[derive(
25870        ::serde::Deserialize,
25871        ::serde::Serialize,
25872        Clone,
25873        Copy,
25874        Debug,
25875        Eq,
25876        Hash,
25877        Ord,
25878        PartialEq,
25879        PartialOrd,
25880    )]
25881    pub enum SendSolTransactionRuleAction {
25882        #[serde(rename = "reject")]
25883        Reject,
25884        #[serde(rename = "accept")]
25885        Accept,
25886    }
25887    impl ::std::convert::From<&Self> for SendSolTransactionRuleAction {
25888        fn from(value: &SendSolTransactionRuleAction) -> Self {
25889            value.clone()
25890        }
25891    }
25892    impl ::std::fmt::Display for SendSolTransactionRuleAction {
25893        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25894            match *self {
25895                Self::Reject => f.write_str("reject"),
25896                Self::Accept => f.write_str("accept"),
25897            }
25898        }
25899    }
25900    impl ::std::str::FromStr for SendSolTransactionRuleAction {
25901        type Err = self::error::ConversionError;
25902        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25903            match value {
25904                "reject" => Ok(Self::Reject),
25905                "accept" => Ok(Self::Accept),
25906                _ => Err("invalid value".into()),
25907            }
25908        }
25909    }
25910    impl ::std::convert::TryFrom<&str> for SendSolTransactionRuleAction {
25911        type Error = self::error::ConversionError;
25912        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25913            value.parse()
25914        }
25915    }
25916    impl ::std::convert::TryFrom<&::std::string::String> for SendSolTransactionRuleAction {
25917        type Error = self::error::ConversionError;
25918        fn try_from(
25919            value: &::std::string::String,
25920        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25921            value.parse()
25922        }
25923    }
25924    impl ::std::convert::TryFrom<::std::string::String> for SendSolTransactionRuleAction {
25925        type Error = self::error::ConversionError;
25926        fn try_from(
25927            value: ::std::string::String,
25928        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25929            value.parse()
25930        }
25931    }
25932    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
25933    ///
25934    /// <details><summary>JSON schema</summary>
25935    ///
25936    /// ```json
25937    ///{
25938    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
25939    ///  "examples": [
25940    ///    "sendSolTransaction"
25941    ///  ],
25942    ///  "type": "string",
25943    ///  "enum": [
25944    ///    "sendSolTransaction"
25945    ///  ]
25946    ///}
25947    /// ```
25948    /// </details>
25949    #[derive(
25950        ::serde::Deserialize,
25951        ::serde::Serialize,
25952        Clone,
25953        Copy,
25954        Debug,
25955        Eq,
25956        Hash,
25957        Ord,
25958        PartialEq,
25959        PartialOrd,
25960    )]
25961    pub enum SendSolTransactionRuleOperation {
25962        #[serde(rename = "sendSolTransaction")]
25963        SendSolTransaction,
25964    }
25965    impl ::std::convert::From<&Self> for SendSolTransactionRuleOperation {
25966        fn from(value: &SendSolTransactionRuleOperation) -> Self {
25967            value.clone()
25968        }
25969    }
25970    impl ::std::fmt::Display for SendSolTransactionRuleOperation {
25971        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25972            match *self {
25973                Self::SendSolTransaction => f.write_str("sendSolTransaction"),
25974            }
25975        }
25976    }
25977    impl ::std::str::FromStr for SendSolTransactionRuleOperation {
25978        type Err = self::error::ConversionError;
25979        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25980            match value {
25981                "sendSolTransaction" => Ok(Self::SendSolTransaction),
25982                _ => Err("invalid value".into()),
25983            }
25984        }
25985    }
25986    impl ::std::convert::TryFrom<&str> for SendSolTransactionRuleOperation {
25987        type Error = self::error::ConversionError;
25988        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
25989            value.parse()
25990        }
25991    }
25992    impl ::std::convert::TryFrom<&::std::string::String> for SendSolTransactionRuleOperation {
25993        type Error = self::error::ConversionError;
25994        fn try_from(
25995            value: &::std::string::String,
25996        ) -> ::std::result::Result<Self, self::error::ConversionError> {
25997            value.parse()
25998        }
25999    }
26000    impl ::std::convert::TryFrom<::std::string::String> for SendSolTransactionRuleOperation {
26001        type Error = self::error::ConversionError;
26002        fn try_from(
26003            value: ::std::string::String,
26004        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26005            value.parse()
26006        }
26007    }
26008    ///`SendSolanaTransactionBody`
26009    ///
26010    /// <details><summary>JSON schema</summary>
26011    ///
26012    /// ```json
26013    ///{
26014    ///  "type": "object",
26015    ///  "required": [
26016    ///    "network",
26017    ///    "transaction"
26018    ///  ],
26019    ///  "properties": {
26020    ///    "network": {
26021    ///      "description": "The Solana network to send the transaction to.",
26022    ///      "examples": [
26023    ///        "solana-devnet"
26024    ///      ],
26025    ///      "type": "string",
26026    ///      "enum": [
26027    ///        "solana",
26028    ///        "solana-devnet"
26029    ///      ]
26030    ///    },
26031    ///    "transaction": {
26032    ///      "description": "The base64 encoded transaction to sign and send. This transaction can contain multiple instructions for native Solana batching.",
26033    ///      "examples": [
26034    ///        "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAQECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8CBgMBAQAAAAIBAwQAAAAABgIAAAAAAAYDBQEBAAAGBAgAAAAABgUAAAAA6AMAAAAAAAAGBgUBAQEBBgcEAQAAAAYICgMBAQIDBgkCBgAAAAYKAwABAQEGCwMGAQEBBgwDAAABAQAAAAA="
26035    ///      ],
26036    ///      "type": "string"
26037    ///    }
26038    ///  }
26039    ///}
26040    /// ```
26041    /// </details>
26042    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26043    pub struct SendSolanaTransactionBody {
26044        ///The Solana network to send the transaction to.
26045        pub network: SendSolanaTransactionBodyNetwork,
26046        ///The base64 encoded transaction to sign and send. This transaction can contain multiple instructions for native Solana batching.
26047        pub transaction: ::std::string::String,
26048    }
26049    impl ::std::convert::From<&SendSolanaTransactionBody> for SendSolanaTransactionBody {
26050        fn from(value: &SendSolanaTransactionBody) -> Self {
26051            value.clone()
26052        }
26053    }
26054    impl SendSolanaTransactionBody {
26055        pub fn builder() -> builder::SendSolanaTransactionBody {
26056            Default::default()
26057        }
26058    }
26059    ///The Solana network to send the transaction to.
26060    ///
26061    /// <details><summary>JSON schema</summary>
26062    ///
26063    /// ```json
26064    ///{
26065    ///  "description": "The Solana network to send the transaction to.",
26066    ///  "examples": [
26067    ///    "solana-devnet"
26068    ///  ],
26069    ///  "type": "string",
26070    ///  "enum": [
26071    ///    "solana",
26072    ///    "solana-devnet"
26073    ///  ]
26074    ///}
26075    /// ```
26076    /// </details>
26077    #[derive(
26078        ::serde::Deserialize,
26079        ::serde::Serialize,
26080        Clone,
26081        Copy,
26082        Debug,
26083        Eq,
26084        Hash,
26085        Ord,
26086        PartialEq,
26087        PartialOrd,
26088    )]
26089    pub enum SendSolanaTransactionBodyNetwork {
26090        #[serde(rename = "solana")]
26091        Solana,
26092        #[serde(rename = "solana-devnet")]
26093        SolanaDevnet,
26094    }
26095    impl ::std::convert::From<&Self> for SendSolanaTransactionBodyNetwork {
26096        fn from(value: &SendSolanaTransactionBodyNetwork) -> Self {
26097            value.clone()
26098        }
26099    }
26100    impl ::std::fmt::Display for SendSolanaTransactionBodyNetwork {
26101        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26102            match *self {
26103                Self::Solana => f.write_str("solana"),
26104                Self::SolanaDevnet => f.write_str("solana-devnet"),
26105            }
26106        }
26107    }
26108    impl ::std::str::FromStr for SendSolanaTransactionBodyNetwork {
26109        type Err = self::error::ConversionError;
26110        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26111            match value {
26112                "solana" => Ok(Self::Solana),
26113                "solana-devnet" => Ok(Self::SolanaDevnet),
26114                _ => Err("invalid value".into()),
26115            }
26116        }
26117    }
26118    impl ::std::convert::TryFrom<&str> for SendSolanaTransactionBodyNetwork {
26119        type Error = self::error::ConversionError;
26120        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26121            value.parse()
26122        }
26123    }
26124    impl ::std::convert::TryFrom<&::std::string::String> for SendSolanaTransactionBodyNetwork {
26125        type Error = self::error::ConversionError;
26126        fn try_from(
26127            value: &::std::string::String,
26128        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26129            value.parse()
26130        }
26131    }
26132    impl ::std::convert::TryFrom<::std::string::String> for SendSolanaTransactionBodyNetwork {
26133        type Error = self::error::ConversionError;
26134        fn try_from(
26135            value: ::std::string::String,
26136        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26137            value.parse()
26138        }
26139    }
26140    ///`SendSolanaTransactionResponse`
26141    ///
26142    /// <details><summary>JSON schema</summary>
26143    ///
26144    /// ```json
26145    ///{
26146    ///  "type": "object",
26147    ///  "required": [
26148    ///    "transactionSignature"
26149    ///  ],
26150    ///  "properties": {
26151    ///    "transactionSignature": {
26152    ///      "description": "The base58 encoded transaction signature.",
26153    ///      "examples": [
26154    ///        "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"
26155    ///      ],
26156    ///      "type": "string"
26157    ///    }
26158    ///  }
26159    ///}
26160    /// ```
26161    /// </details>
26162    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26163    pub struct SendSolanaTransactionResponse {
26164        ///The base58 encoded transaction signature.
26165        #[serde(rename = "transactionSignature")]
26166        pub transaction_signature: ::std::string::String,
26167    }
26168    impl ::std::convert::From<&SendSolanaTransactionResponse> for SendSolanaTransactionResponse {
26169        fn from(value: &SendSolanaTransactionResponse) -> Self {
26170            value.clone()
26171        }
26172    }
26173    impl SendSolanaTransactionResponse {
26174        pub fn builder() -> builder::SendSolanaTransactionResponse {
26175            Default::default()
26176        }
26177    }
26178    ///`SendSolanaTransactionXIdempotencyKey`
26179    ///
26180    /// <details><summary>JSON schema</summary>
26181    ///
26182    /// ```json
26183    ///{
26184    ///  "type": "string",
26185    ///  "maxLength": 36,
26186    ///  "minLength": 36,
26187    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
26188    ///}
26189    /// ```
26190    /// </details>
26191    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26192    #[serde(transparent)]
26193    pub struct SendSolanaTransactionXIdempotencyKey(::std::string::String);
26194    impl ::std::ops::Deref for SendSolanaTransactionXIdempotencyKey {
26195        type Target = ::std::string::String;
26196        fn deref(&self) -> &::std::string::String {
26197            &self.0
26198        }
26199    }
26200    impl ::std::convert::From<SendSolanaTransactionXIdempotencyKey> for ::std::string::String {
26201        fn from(value: SendSolanaTransactionXIdempotencyKey) -> Self {
26202            value.0
26203        }
26204    }
26205    impl ::std::convert::From<&SendSolanaTransactionXIdempotencyKey>
26206        for SendSolanaTransactionXIdempotencyKey
26207    {
26208        fn from(value: &SendSolanaTransactionXIdempotencyKey) -> Self {
26209            value.clone()
26210        }
26211    }
26212    impl ::std::str::FromStr for SendSolanaTransactionXIdempotencyKey {
26213        type Err = self::error::ConversionError;
26214        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26215            if value.chars().count() > 36usize {
26216                return Err("longer than 36 characters".into());
26217            }
26218            if value.chars().count() < 36usize {
26219                return Err("shorter than 36 characters".into());
26220            }
26221            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
26222                ::std::sync::LazyLock::new(|| {
26223                    ::regress::Regex::new(
26224                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
26225                    )
26226                    .unwrap()
26227                });
26228            if PATTERN.find(value).is_none() {
26229                return Err(
26230                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
26231                        .into(),
26232                );
26233            }
26234            Ok(Self(value.to_string()))
26235        }
26236    }
26237    impl ::std::convert::TryFrom<&str> for SendSolanaTransactionXIdempotencyKey {
26238        type Error = self::error::ConversionError;
26239        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26240            value.parse()
26241        }
26242    }
26243    impl ::std::convert::TryFrom<&::std::string::String> for SendSolanaTransactionXIdempotencyKey {
26244        type Error = self::error::ConversionError;
26245        fn try_from(
26246            value: &::std::string::String,
26247        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26248            value.parse()
26249        }
26250    }
26251    impl ::std::convert::TryFrom<::std::string::String> for SendSolanaTransactionXIdempotencyKey {
26252        type Error = self::error::ConversionError;
26253        fn try_from(
26254            value: ::std::string::String,
26255        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26256            value.parse()
26257        }
26258    }
26259    impl<'de> ::serde::Deserialize<'de> for SendSolanaTransactionXIdempotencyKey {
26260        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
26261        where
26262            D: ::serde::Deserializer<'de>,
26263        {
26264            ::std::string::String::deserialize(deserializer)?
26265                .parse()
26266                .map_err(|e: self::error::ConversionError| {
26267                    <D::Error as ::serde::de::Error>::custom(e.to_string())
26268                })
26269        }
26270    }
26271    ///`SendUserOperationAddress`
26272    ///
26273    /// <details><summary>JSON schema</summary>
26274    ///
26275    /// ```json
26276    ///{
26277    ///  "type": "string",
26278    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
26279    ///}
26280    /// ```
26281    /// </details>
26282    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26283    #[serde(transparent)]
26284    pub struct SendUserOperationAddress(::std::string::String);
26285    impl ::std::ops::Deref for SendUserOperationAddress {
26286        type Target = ::std::string::String;
26287        fn deref(&self) -> &::std::string::String {
26288            &self.0
26289        }
26290    }
26291    impl ::std::convert::From<SendUserOperationAddress> for ::std::string::String {
26292        fn from(value: SendUserOperationAddress) -> Self {
26293            value.0
26294        }
26295    }
26296    impl ::std::convert::From<&SendUserOperationAddress> for SendUserOperationAddress {
26297        fn from(value: &SendUserOperationAddress) -> Self {
26298            value.clone()
26299        }
26300    }
26301    impl ::std::str::FromStr for SendUserOperationAddress {
26302        type Err = self::error::ConversionError;
26303        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26304            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
26305                ::std::sync::LazyLock::new(|| {
26306                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
26307                });
26308            if PATTERN.find(value).is_none() {
26309                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
26310            }
26311            Ok(Self(value.to_string()))
26312        }
26313    }
26314    impl ::std::convert::TryFrom<&str> for SendUserOperationAddress {
26315        type Error = self::error::ConversionError;
26316        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26317            value.parse()
26318        }
26319    }
26320    impl ::std::convert::TryFrom<&::std::string::String> for SendUserOperationAddress {
26321        type Error = self::error::ConversionError;
26322        fn try_from(
26323            value: &::std::string::String,
26324        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26325            value.parse()
26326        }
26327    }
26328    impl ::std::convert::TryFrom<::std::string::String> for SendUserOperationAddress {
26329        type Error = self::error::ConversionError;
26330        fn try_from(
26331            value: ::std::string::String,
26332        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26333            value.parse()
26334        }
26335    }
26336    impl<'de> ::serde::Deserialize<'de> for SendUserOperationAddress {
26337        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
26338        where
26339            D: ::serde::Deserializer<'de>,
26340        {
26341            ::std::string::String::deserialize(deserializer)?
26342                .parse()
26343                .map_err(|e: self::error::ConversionError| {
26344                    <D::Error as ::serde::de::Error>::custom(e.to_string())
26345                })
26346        }
26347    }
26348    ///`SendUserOperationBody`
26349    ///
26350    /// <details><summary>JSON schema</summary>
26351    ///
26352    /// ```json
26353    ///{
26354    ///  "type": "object",
26355    ///  "required": [
26356    ///    "signature"
26357    ///  ],
26358    ///  "properties": {
26359    ///    "signature": {
26360    ///      "description": "The hex-encoded signature of the user operation. This should be a 65-byte signature consisting of the `r`, `s`, and `v` values of the ECDSA signature. Note that the `v` value should conform to the `personal_sign` standard, which means it should be 27 or 28.",
26361    ///      "examples": [
26362    ///        "0x1b0c9cf8cd4554c6c6d9e7311e88f1be075d7f25b418a044f4bf2c0a42a93e212ad0a8b54de9e0b5f7e3812de3f2c6cc79aa8c3e1c02e7ad14b4a8f42012c2c01b"
26363    ///      ],
26364    ///      "type": "string"
26365    ///    }
26366    ///  }
26367    ///}
26368    /// ```
26369    /// </details>
26370    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26371    pub struct SendUserOperationBody {
26372        ///The hex-encoded signature of the user operation. This should be a 65-byte signature consisting of the `r`, `s`, and `v` values of the ECDSA signature. Note that the `v` value should conform to the `personal_sign` standard, which means it should be 27 or 28.
26373        pub signature: ::std::string::String,
26374    }
26375    impl ::std::convert::From<&SendUserOperationBody> for SendUserOperationBody {
26376        fn from(value: &SendUserOperationBody) -> Self {
26377            value.clone()
26378        }
26379    }
26380    impl SendUserOperationBody {
26381        pub fn builder() -> builder::SendUserOperationBody {
26382            Default::default()
26383        }
26384    }
26385    ///A schema for specifying criteria for the SendUserOperation operation.
26386    ///
26387    /// <details><summary>JSON schema</summary>
26388    ///
26389    /// ```json
26390    ///{
26391    ///  "description": "A schema for specifying criteria for the SendUserOperation operation.",
26392    ///  "examples": [
26393    ///    [
26394    ///      {
26395    ///        "ethValue": "1000000",
26396    ///        "operator": ">=",
26397    ///        "type": "ethValue"
26398    ///      },
26399    ///      {
26400    ///        "addresses": [
26401    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
26402    ///        ],
26403    ///        "operator": "in",
26404    ///        "type": "evmAddress"
26405    ///      }
26406    ///    ]
26407    ///  ],
26408    ///  "type": "array",
26409    ///  "items": {
26410    ///    "oneOf": [
26411    ///      {
26412    ///        "$ref": "#/components/schemas/EthValueCriterion"
26413    ///      },
26414    ///      {
26415    ///        "$ref": "#/components/schemas/EvmAddressCriterion"
26416    ///      },
26417    ///      {
26418    ///        "$ref": "#/components/schemas/EvmDataCriterion"
26419    ///      },
26420    ///      {
26421    ///        "$ref": "#/components/schemas/NetUSDChangeCriterion"
26422    ///      }
26423    ///    ]
26424    ///  },
26425    ///  "x-audience": "public"
26426    ///}
26427    /// ```
26428    /// </details>
26429    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26430    #[serde(transparent)]
26431    pub struct SendUserOperationCriteria(pub ::std::vec::Vec<SendUserOperationCriteriaItem>);
26432    impl ::std::ops::Deref for SendUserOperationCriteria {
26433        type Target = ::std::vec::Vec<SendUserOperationCriteriaItem>;
26434        fn deref(&self) -> &::std::vec::Vec<SendUserOperationCriteriaItem> {
26435            &self.0
26436        }
26437    }
26438    impl ::std::convert::From<SendUserOperationCriteria>
26439        for ::std::vec::Vec<SendUserOperationCriteriaItem>
26440    {
26441        fn from(value: SendUserOperationCriteria) -> Self {
26442            value.0
26443        }
26444    }
26445    impl ::std::convert::From<&SendUserOperationCriteria> for SendUserOperationCriteria {
26446        fn from(value: &SendUserOperationCriteria) -> Self {
26447            value.clone()
26448        }
26449    }
26450    impl ::std::convert::From<::std::vec::Vec<SendUserOperationCriteriaItem>>
26451        for SendUserOperationCriteria
26452    {
26453        fn from(value: ::std::vec::Vec<SendUserOperationCriteriaItem>) -> Self {
26454            Self(value)
26455        }
26456    }
26457    ///`SendUserOperationCriteriaItem`
26458    ///
26459    /// <details><summary>JSON schema</summary>
26460    ///
26461    /// ```json
26462    ///{
26463    ///  "oneOf": [
26464    ///    {
26465    ///      "$ref": "#/components/schemas/EthValueCriterion"
26466    ///    },
26467    ///    {
26468    ///      "$ref": "#/components/schemas/EvmAddressCriterion"
26469    ///    },
26470    ///    {
26471    ///      "$ref": "#/components/schemas/EvmDataCriterion"
26472    ///    },
26473    ///    {
26474    ///      "$ref": "#/components/schemas/NetUSDChangeCriterion"
26475    ///    }
26476    ///  ]
26477    ///}
26478    /// ```
26479    /// </details>
26480    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26481    #[serde(untagged)]
26482    pub enum SendUserOperationCriteriaItem {
26483        EthValueCriterion(EthValueCriterion),
26484        EvmAddressCriterion(EvmAddressCriterion),
26485        EvmDataCriterion(EvmDataCriterion),
26486        NetUsdChangeCriterion(NetUsdChangeCriterion),
26487    }
26488    impl ::std::convert::From<&Self> for SendUserOperationCriteriaItem {
26489        fn from(value: &SendUserOperationCriteriaItem) -> Self {
26490            value.clone()
26491        }
26492    }
26493    impl ::std::convert::From<EthValueCriterion> for SendUserOperationCriteriaItem {
26494        fn from(value: EthValueCriterion) -> Self {
26495            Self::EthValueCriterion(value)
26496        }
26497    }
26498    impl ::std::convert::From<EvmAddressCriterion> for SendUserOperationCriteriaItem {
26499        fn from(value: EvmAddressCriterion) -> Self {
26500            Self::EvmAddressCriterion(value)
26501        }
26502    }
26503    impl ::std::convert::From<EvmDataCriterion> for SendUserOperationCriteriaItem {
26504        fn from(value: EvmDataCriterion) -> Self {
26505            Self::EvmDataCriterion(value)
26506        }
26507    }
26508    impl ::std::convert::From<NetUsdChangeCriterion> for SendUserOperationCriteriaItem {
26509        fn from(value: NetUsdChangeCriterion) -> Self {
26510            Self::NetUsdChangeCriterion(value)
26511        }
26512    }
26513    ///`SendUserOperationRule`
26514    ///
26515    /// <details><summary>JSON schema</summary>
26516    ///
26517    /// ```json
26518    ///{
26519    ///  "title": "SendUserOperationRule",
26520    ///  "required": [
26521    ///    "action",
26522    ///    "criteria",
26523    ///    "operation"
26524    ///  ],
26525    ///  "properties": {
26526    ///    "action": {
26527    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
26528    ///      "examples": [
26529    ///        "accept"
26530    ///      ],
26531    ///      "type": "string",
26532    ///      "enum": [
26533    ///        "reject",
26534    ///        "accept"
26535    ///      ]
26536    ///    },
26537    ///    "criteria": {
26538    ///      "$ref": "#/components/schemas/SendUserOperationCriteria"
26539    ///    },
26540    ///    "operation": {
26541    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
26542    ///      "examples": [
26543    ///        "sendUserOperation"
26544    ///      ],
26545    ///      "type": "string",
26546    ///      "enum": [
26547    ///        "sendUserOperation"
26548    ///      ]
26549    ///    }
26550    ///  },
26551    ///  "x-audience": "public"
26552    ///}
26553    /// ```
26554    /// </details>
26555    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26556    pub struct SendUserOperationRule {
26557        ///Whether matching the rule will cause the request to be rejected or accepted.
26558        pub action: SendUserOperationRuleAction,
26559        pub criteria: SendUserOperationCriteria,
26560        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
26561        pub operation: SendUserOperationRuleOperation,
26562    }
26563    impl ::std::convert::From<&SendUserOperationRule> for SendUserOperationRule {
26564        fn from(value: &SendUserOperationRule) -> Self {
26565            value.clone()
26566        }
26567    }
26568    impl SendUserOperationRule {
26569        pub fn builder() -> builder::SendUserOperationRule {
26570            Default::default()
26571        }
26572    }
26573    ///Whether matching the rule will cause the request to be rejected or accepted.
26574    ///
26575    /// <details><summary>JSON schema</summary>
26576    ///
26577    /// ```json
26578    ///{
26579    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
26580    ///  "examples": [
26581    ///    "accept"
26582    ///  ],
26583    ///  "type": "string",
26584    ///  "enum": [
26585    ///    "reject",
26586    ///    "accept"
26587    ///  ]
26588    ///}
26589    /// ```
26590    /// </details>
26591    #[derive(
26592        ::serde::Deserialize,
26593        ::serde::Serialize,
26594        Clone,
26595        Copy,
26596        Debug,
26597        Eq,
26598        Hash,
26599        Ord,
26600        PartialEq,
26601        PartialOrd,
26602    )]
26603    pub enum SendUserOperationRuleAction {
26604        #[serde(rename = "reject")]
26605        Reject,
26606        #[serde(rename = "accept")]
26607        Accept,
26608    }
26609    impl ::std::convert::From<&Self> for SendUserOperationRuleAction {
26610        fn from(value: &SendUserOperationRuleAction) -> Self {
26611            value.clone()
26612        }
26613    }
26614    impl ::std::fmt::Display for SendUserOperationRuleAction {
26615        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26616            match *self {
26617                Self::Reject => f.write_str("reject"),
26618                Self::Accept => f.write_str("accept"),
26619            }
26620        }
26621    }
26622    impl ::std::str::FromStr for SendUserOperationRuleAction {
26623        type Err = self::error::ConversionError;
26624        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26625            match value {
26626                "reject" => Ok(Self::Reject),
26627                "accept" => Ok(Self::Accept),
26628                _ => Err("invalid value".into()),
26629            }
26630        }
26631    }
26632    impl ::std::convert::TryFrom<&str> for SendUserOperationRuleAction {
26633        type Error = self::error::ConversionError;
26634        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26635            value.parse()
26636        }
26637    }
26638    impl ::std::convert::TryFrom<&::std::string::String> for SendUserOperationRuleAction {
26639        type Error = self::error::ConversionError;
26640        fn try_from(
26641            value: &::std::string::String,
26642        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26643            value.parse()
26644        }
26645    }
26646    impl ::std::convert::TryFrom<::std::string::String> for SendUserOperationRuleAction {
26647        type Error = self::error::ConversionError;
26648        fn try_from(
26649            value: ::std::string::String,
26650        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26651            value.parse()
26652        }
26653    }
26654    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
26655    ///
26656    /// <details><summary>JSON schema</summary>
26657    ///
26658    /// ```json
26659    ///{
26660    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
26661    ///  "examples": [
26662    ///    "sendUserOperation"
26663    ///  ],
26664    ///  "type": "string",
26665    ///  "enum": [
26666    ///    "sendUserOperation"
26667    ///  ]
26668    ///}
26669    /// ```
26670    /// </details>
26671    #[derive(
26672        ::serde::Deserialize,
26673        ::serde::Serialize,
26674        Clone,
26675        Copy,
26676        Debug,
26677        Eq,
26678        Hash,
26679        Ord,
26680        PartialEq,
26681        PartialOrd,
26682    )]
26683    pub enum SendUserOperationRuleOperation {
26684        #[serde(rename = "sendUserOperation")]
26685        SendUserOperation,
26686    }
26687    impl ::std::convert::From<&Self> for SendUserOperationRuleOperation {
26688        fn from(value: &SendUserOperationRuleOperation) -> Self {
26689            value.clone()
26690        }
26691    }
26692    impl ::std::fmt::Display for SendUserOperationRuleOperation {
26693        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26694            match *self {
26695                Self::SendUserOperation => f.write_str("sendUserOperation"),
26696            }
26697        }
26698    }
26699    impl ::std::str::FromStr for SendUserOperationRuleOperation {
26700        type Err = self::error::ConversionError;
26701        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26702            match value {
26703                "sendUserOperation" => Ok(Self::SendUserOperation),
26704                _ => Err("invalid value".into()),
26705            }
26706        }
26707    }
26708    impl ::std::convert::TryFrom<&str> for SendUserOperationRuleOperation {
26709        type Error = self::error::ConversionError;
26710        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26711            value.parse()
26712        }
26713    }
26714    impl ::std::convert::TryFrom<&::std::string::String> for SendUserOperationRuleOperation {
26715        type Error = self::error::ConversionError;
26716        fn try_from(
26717            value: &::std::string::String,
26718        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26719            value.parse()
26720        }
26721    }
26722    impl ::std::convert::TryFrom<::std::string::String> for SendUserOperationRuleOperation {
26723        type Error = self::error::ConversionError;
26724        fn try_from(
26725            value: ::std::string::String,
26726        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26727            value.parse()
26728        }
26729    }
26730    ///`SendUserOperationUserOpHash`
26731    ///
26732    /// <details><summary>JSON schema</summary>
26733    ///
26734    /// ```json
26735    ///{
26736    ///  "type": "string",
26737    ///  "pattern": "^0x[0-9a-fA-F]{64}$"
26738    ///}
26739    /// ```
26740    /// </details>
26741    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26742    #[serde(transparent)]
26743    pub struct SendUserOperationUserOpHash(::std::string::String);
26744    impl ::std::ops::Deref for SendUserOperationUserOpHash {
26745        type Target = ::std::string::String;
26746        fn deref(&self) -> &::std::string::String {
26747            &self.0
26748        }
26749    }
26750    impl ::std::convert::From<SendUserOperationUserOpHash> for ::std::string::String {
26751        fn from(value: SendUserOperationUserOpHash) -> Self {
26752            value.0
26753        }
26754    }
26755    impl ::std::convert::From<&SendUserOperationUserOpHash> for SendUserOperationUserOpHash {
26756        fn from(value: &SendUserOperationUserOpHash) -> Self {
26757            value.clone()
26758        }
26759    }
26760    impl ::std::str::FromStr for SendUserOperationUserOpHash {
26761        type Err = self::error::ConversionError;
26762        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26763            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
26764                ::std::sync::LazyLock::new(|| {
26765                    ::regress::Regex::new("^0x[0-9a-fA-F]{64}$").unwrap()
26766                });
26767            if PATTERN.find(value).is_none() {
26768                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{64}$\"".into());
26769            }
26770            Ok(Self(value.to_string()))
26771        }
26772    }
26773    impl ::std::convert::TryFrom<&str> for SendUserOperationUserOpHash {
26774        type Error = self::error::ConversionError;
26775        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26776            value.parse()
26777        }
26778    }
26779    impl ::std::convert::TryFrom<&::std::string::String> for SendUserOperationUserOpHash {
26780        type Error = self::error::ConversionError;
26781        fn try_from(
26782            value: &::std::string::String,
26783        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26784            value.parse()
26785        }
26786    }
26787    impl ::std::convert::TryFrom<::std::string::String> for SendUserOperationUserOpHash {
26788        type Error = self::error::ConversionError;
26789        fn try_from(
26790            value: ::std::string::String,
26791        ) -> ::std::result::Result<Self, self::error::ConversionError> {
26792            value.parse()
26793        }
26794    }
26795    impl<'de> ::serde::Deserialize<'de> for SendUserOperationUserOpHash {
26796        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
26797        where
26798            D: ::serde::Deserializer<'de>,
26799        {
26800            ::std::string::String::deserialize(deserializer)?
26801                .parse()
26802                .map_err(|e: self::error::ConversionError| {
26803                    <D::Error as ::serde::de::Error>::custom(e.to_string())
26804                })
26805        }
26806    }
26807    ///`SettleX402PaymentBody`
26808    ///
26809    /// <details><summary>JSON schema</summary>
26810    ///
26811    /// ```json
26812    ///{
26813    ///  "type": "object",
26814    ///  "required": [
26815    ///    "paymentPayload",
26816    ///    "paymentRequirements",
26817    ///    "x402Version"
26818    ///  ],
26819    ///  "properties": {
26820    ///    "paymentPayload": {
26821    ///      "$ref": "#/components/schemas/x402PaymentPayload"
26822    ///    },
26823    ///    "paymentRequirements": {
26824    ///      "$ref": "#/components/schemas/x402PaymentRequirements"
26825    ///    },
26826    ///    "x402Version": {
26827    ///      "$ref": "#/components/schemas/X402Version"
26828    ///    }
26829    ///  }
26830    ///}
26831    /// ```
26832    /// </details>
26833    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26834    pub struct SettleX402PaymentBody {
26835        #[serde(rename = "paymentPayload")]
26836        pub payment_payload: X402PaymentPayload,
26837        #[serde(rename = "paymentRequirements")]
26838        pub payment_requirements: X402PaymentRequirements,
26839        #[serde(rename = "x402Version")]
26840        pub x402_version: X402Version,
26841    }
26842    impl ::std::convert::From<&SettleX402PaymentBody> for SettleX402PaymentBody {
26843        fn from(value: &SettleX402PaymentBody) -> Self {
26844            value.clone()
26845        }
26846    }
26847    impl SettleX402PaymentBody {
26848        pub fn builder() -> builder::SettleX402PaymentBody {
26849            Default::default()
26850        }
26851    }
26852    ///`SettleX402PaymentResponse`
26853    ///
26854    /// <details><summary>JSON schema</summary>
26855    ///
26856    /// ```json
26857    ///{
26858    ///  "type": "object",
26859    ///  "required": [
26860    ///    "network",
26861    ///    "payer",
26862    ///    "success",
26863    ///    "transaction"
26864    ///  ],
26865    ///  "properties": {
26866    ///    "errorReason": {
26867    ///      "$ref": "#/components/schemas/x402SettleErrorReason"
26868    ///    },
26869    ///    "network": {
26870    ///      "description": "The network where the settlement occurred.",
26871    ///      "examples": [
26872    ///        "base"
26873    ///      ],
26874    ///      "type": "string"
26875    ///    },
26876    ///    "payer": {
26877    ///      "description": "The onchain address of the client that is paying for the resource.\n\nFor EVM networks, the payer will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the payer will be a base58-encoded Solana address.",
26878    ///      "examples": [
26879    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
26880    ///      ],
26881    ///      "type": "string",
26882    ///      "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
26883    ///    },
26884    ///    "success": {
26885    ///      "description": "Indicates whether the payment settlement is successful.",
26886    ///      "examples": [
26887    ///        false
26888    ///      ],
26889    ///      "type": "boolean"
26890    ///    },
26891    ///    "transaction": {
26892    ///      "description": "The transaction of the settlement.\nFor EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.\nFor Solana-based networks, the transaction will be a base58-encoded Solana signature.",
26893    ///      "examples": [
26894    ///        "0x89c91c789e57059b17285e7ba1716a1f5ff4c5dace0ea5a5135f26158d0421b9"
26895    ///      ],
26896    ///      "type": "string",
26897    ///      "pattern": "^(0x[a-fA-F0-9]{64}|[1-9A-HJ-NP-Za-km-z]{87,88})$"
26898    ///    }
26899    ///  }
26900    ///}
26901    /// ```
26902    /// </details>
26903    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
26904    pub struct SettleX402PaymentResponse {
26905        #[serde(
26906            rename = "errorReason",
26907            default,
26908            skip_serializing_if = "::std::option::Option::is_none"
26909        )]
26910        pub error_reason: ::std::option::Option<X402SettleErrorReason>,
26911        ///The network where the settlement occurred.
26912        pub network: ::std::string::String,
26913        /**The onchain address of the client that is paying for the resource.
26914
26915        For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
26916
26917        For Solana-based networks, the payer will be a base58-encoded Solana address.*/
26918        pub payer: SettleX402PaymentResponsePayer,
26919        ///Indicates whether the payment settlement is successful.
26920        pub success: bool,
26921        /**The transaction of the settlement.
26922        For EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.
26923        For Solana-based networks, the transaction will be a base58-encoded Solana signature.*/
26924        pub transaction: SettleX402PaymentResponseTransaction,
26925    }
26926    impl ::std::convert::From<&SettleX402PaymentResponse> for SettleX402PaymentResponse {
26927        fn from(value: &SettleX402PaymentResponse) -> Self {
26928            value.clone()
26929        }
26930    }
26931    impl SettleX402PaymentResponse {
26932        pub fn builder() -> builder::SettleX402PaymentResponse {
26933            Default::default()
26934        }
26935    }
26936    /**The onchain address of the client that is paying for the resource.
26937
26938    For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
26939
26940    For Solana-based networks, the payer will be a base58-encoded Solana address.*/
26941    ///
26942    /// <details><summary>JSON schema</summary>
26943    ///
26944    /// ```json
26945    ///{
26946    ///  "description": "The onchain address of the client that is paying for the resource.\n\nFor EVM networks, the payer will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the payer will be a base58-encoded Solana address.",
26947    ///  "examples": [
26948    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
26949    ///  ],
26950    ///  "type": "string",
26951    ///  "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
26952    ///}
26953    /// ```
26954    /// </details>
26955    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26956    #[serde(transparent)]
26957    pub struct SettleX402PaymentResponsePayer(::std::string::String);
26958    impl ::std::ops::Deref for SettleX402PaymentResponsePayer {
26959        type Target = ::std::string::String;
26960        fn deref(&self) -> &::std::string::String {
26961            &self.0
26962        }
26963    }
26964    impl ::std::convert::From<SettleX402PaymentResponsePayer> for ::std::string::String {
26965        fn from(value: SettleX402PaymentResponsePayer) -> Self {
26966            value.0
26967        }
26968    }
26969    impl ::std::convert::From<&SettleX402PaymentResponsePayer> for SettleX402PaymentResponsePayer {
26970        fn from(value: &SettleX402PaymentResponsePayer) -> Self {
26971            value.clone()
26972        }
26973    }
26974    impl ::std::str::FromStr for SettleX402PaymentResponsePayer {
26975        type Err = self::error::ConversionError;
26976        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26977            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
26978                ::std::sync::LazyLock::new(|| {
26979                    ::regress::Regex::new("^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$")
26980                        .unwrap()
26981                });
26982            if PATTERN.find(value).is_none() {
26983                return Err(
26984                    "doesn't match pattern \"^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$\""
26985                        .into(),
26986                );
26987            }
26988            Ok(Self(value.to_string()))
26989        }
26990    }
26991    impl ::std::convert::TryFrom<&str> for SettleX402PaymentResponsePayer {
26992        type Error = self::error::ConversionError;
26993        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
26994            value.parse()
26995        }
26996    }
26997    impl ::std::convert::TryFrom<&::std::string::String> for SettleX402PaymentResponsePayer {
26998        type Error = self::error::ConversionError;
26999        fn try_from(
27000            value: &::std::string::String,
27001        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27002            value.parse()
27003        }
27004    }
27005    impl ::std::convert::TryFrom<::std::string::String> for SettleX402PaymentResponsePayer {
27006        type Error = self::error::ConversionError;
27007        fn try_from(
27008            value: ::std::string::String,
27009        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27010            value.parse()
27011        }
27012    }
27013    impl<'de> ::serde::Deserialize<'de> for SettleX402PaymentResponsePayer {
27014        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
27015        where
27016            D: ::serde::Deserializer<'de>,
27017        {
27018            ::std::string::String::deserialize(deserializer)?
27019                .parse()
27020                .map_err(|e: self::error::ConversionError| {
27021                    <D::Error as ::serde::de::Error>::custom(e.to_string())
27022                })
27023        }
27024    }
27025    /**The transaction of the settlement.
27026    For EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.
27027    For Solana-based networks, the transaction will be a base58-encoded Solana signature.*/
27028    ///
27029    /// <details><summary>JSON schema</summary>
27030    ///
27031    /// ```json
27032    ///{
27033    ///  "description": "The transaction of the settlement.\nFor EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.\nFor Solana-based networks, the transaction will be a base58-encoded Solana signature.",
27034    ///  "examples": [
27035    ///    "0x89c91c789e57059b17285e7ba1716a1f5ff4c5dace0ea5a5135f26158d0421b9"
27036    ///  ],
27037    ///  "type": "string",
27038    ///  "pattern": "^(0x[a-fA-F0-9]{64}|[1-9A-HJ-NP-Za-km-z]{87,88})$"
27039    ///}
27040    /// ```
27041    /// </details>
27042    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27043    #[serde(transparent)]
27044    pub struct SettleX402PaymentResponseTransaction(::std::string::String);
27045    impl ::std::ops::Deref for SettleX402PaymentResponseTransaction {
27046        type Target = ::std::string::String;
27047        fn deref(&self) -> &::std::string::String {
27048            &self.0
27049        }
27050    }
27051    impl ::std::convert::From<SettleX402PaymentResponseTransaction> for ::std::string::String {
27052        fn from(value: SettleX402PaymentResponseTransaction) -> Self {
27053            value.0
27054        }
27055    }
27056    impl ::std::convert::From<&SettleX402PaymentResponseTransaction>
27057        for SettleX402PaymentResponseTransaction
27058    {
27059        fn from(value: &SettleX402PaymentResponseTransaction) -> Self {
27060            value.clone()
27061        }
27062    }
27063    impl ::std::str::FromStr for SettleX402PaymentResponseTransaction {
27064        type Err = self::error::ConversionError;
27065        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27066            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
27067                ::std::sync::LazyLock::new(|| {
27068                    ::regress::Regex::new("^(0x[a-fA-F0-9]{64}|[1-9A-HJ-NP-Za-km-z]{87,88})$")
27069                        .unwrap()
27070                });
27071            if PATTERN.find(value).is_none() {
27072                return Err(
27073                    "doesn't match pattern \"^(0x[a-fA-F0-9]{64}|[1-9A-HJ-NP-Za-km-z]{87,88})$\""
27074                        .into(),
27075                );
27076            }
27077            Ok(Self(value.to_string()))
27078        }
27079    }
27080    impl ::std::convert::TryFrom<&str> for SettleX402PaymentResponseTransaction {
27081        type Error = self::error::ConversionError;
27082        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27083            value.parse()
27084        }
27085    }
27086    impl ::std::convert::TryFrom<&::std::string::String> for SettleX402PaymentResponseTransaction {
27087        type Error = self::error::ConversionError;
27088        fn try_from(
27089            value: &::std::string::String,
27090        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27091            value.parse()
27092        }
27093    }
27094    impl ::std::convert::TryFrom<::std::string::String> for SettleX402PaymentResponseTransaction {
27095        type Error = self::error::ConversionError;
27096        fn try_from(
27097            value: ::std::string::String,
27098        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27099            value.parse()
27100        }
27101    }
27102    impl<'de> ::serde::Deserialize<'de> for SettleX402PaymentResponseTransaction {
27103        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
27104        where
27105            D: ::serde::Deserializer<'de>,
27106        {
27107            ::std::string::String::deserialize(deserializer)?
27108                .parse()
27109                .map_err(|e: self::error::ConversionError| {
27110                    <D::Error as ::serde::de::Error>::custom(e.to_string())
27111                })
27112        }
27113    }
27114    ///`SignEvmHashAddress`
27115    ///
27116    /// <details><summary>JSON schema</summary>
27117    ///
27118    /// ```json
27119    ///{
27120    ///  "type": "string",
27121    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
27122    ///}
27123    /// ```
27124    /// </details>
27125    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27126    #[serde(transparent)]
27127    pub struct SignEvmHashAddress(::std::string::String);
27128    impl ::std::ops::Deref for SignEvmHashAddress {
27129        type Target = ::std::string::String;
27130        fn deref(&self) -> &::std::string::String {
27131            &self.0
27132        }
27133    }
27134    impl ::std::convert::From<SignEvmHashAddress> for ::std::string::String {
27135        fn from(value: SignEvmHashAddress) -> Self {
27136            value.0
27137        }
27138    }
27139    impl ::std::convert::From<&SignEvmHashAddress> for SignEvmHashAddress {
27140        fn from(value: &SignEvmHashAddress) -> Self {
27141            value.clone()
27142        }
27143    }
27144    impl ::std::str::FromStr for SignEvmHashAddress {
27145        type Err = self::error::ConversionError;
27146        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27147            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
27148                ::std::sync::LazyLock::new(|| {
27149                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
27150                });
27151            if PATTERN.find(value).is_none() {
27152                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
27153            }
27154            Ok(Self(value.to_string()))
27155        }
27156    }
27157    impl ::std::convert::TryFrom<&str> for SignEvmHashAddress {
27158        type Error = self::error::ConversionError;
27159        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27160            value.parse()
27161        }
27162    }
27163    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmHashAddress {
27164        type Error = self::error::ConversionError;
27165        fn try_from(
27166            value: &::std::string::String,
27167        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27168            value.parse()
27169        }
27170    }
27171    impl ::std::convert::TryFrom<::std::string::String> for SignEvmHashAddress {
27172        type Error = self::error::ConversionError;
27173        fn try_from(
27174            value: ::std::string::String,
27175        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27176            value.parse()
27177        }
27178    }
27179    impl<'de> ::serde::Deserialize<'de> for SignEvmHashAddress {
27180        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
27181        where
27182            D: ::serde::Deserializer<'de>,
27183        {
27184            ::std::string::String::deserialize(deserializer)?
27185                .parse()
27186                .map_err(|e: self::error::ConversionError| {
27187                    <D::Error as ::serde::de::Error>::custom(e.to_string())
27188                })
27189        }
27190    }
27191    ///`SignEvmHashBody`
27192    ///
27193    /// <details><summary>JSON schema</summary>
27194    ///
27195    /// ```json
27196    ///{
27197    ///  "type": "object",
27198    ///  "required": [
27199    ///    "hash"
27200    ///  ],
27201    ///  "properties": {
27202    ///    "hash": {
27203    ///      "description": "The arbitrary 32 byte hash to sign.",
27204    ///      "examples": [
27205    ///        "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
27206    ///      ],
27207    ///      "type": "string"
27208    ///    }
27209    ///  }
27210    ///}
27211    /// ```
27212    /// </details>
27213    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27214    pub struct SignEvmHashBody {
27215        ///The arbitrary 32 byte hash to sign.
27216        pub hash: ::std::string::String,
27217    }
27218    impl ::std::convert::From<&SignEvmHashBody> for SignEvmHashBody {
27219        fn from(value: &SignEvmHashBody) -> Self {
27220            value.clone()
27221        }
27222    }
27223    impl SignEvmHashBody {
27224        pub fn builder() -> builder::SignEvmHashBody {
27225            Default::default()
27226        }
27227    }
27228    ///`SignEvmHashResponse`
27229    ///
27230    /// <details><summary>JSON schema</summary>
27231    ///
27232    /// ```json
27233    ///{
27234    ///  "type": "object",
27235    ///  "required": [
27236    ///    "signature"
27237    ///  ],
27238    ///  "properties": {
27239    ///    "signature": {
27240    ///      "description": "The signature of the hash, as a 0x-prefixed hex string.",
27241    ///      "examples": [
27242    ///        "0x1b0c9cf8cd4554c6c6d9e7311e88f1be075d7f25b418a044f4bf2c0a42a93e212ad0a8b54de9e0b5f7e3812de3f2c6cc79aa8c3e1c02e7ad14b4a8f42012c2c01b"
27243    ///      ],
27244    ///      "type": "string"
27245    ///    }
27246    ///  }
27247    ///}
27248    /// ```
27249    /// </details>
27250    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27251    pub struct SignEvmHashResponse {
27252        ///The signature of the hash, as a 0x-prefixed hex string.
27253        pub signature: ::std::string::String,
27254    }
27255    impl ::std::convert::From<&SignEvmHashResponse> for SignEvmHashResponse {
27256        fn from(value: &SignEvmHashResponse) -> Self {
27257            value.clone()
27258        }
27259    }
27260    impl SignEvmHashResponse {
27261        pub fn builder() -> builder::SignEvmHashResponse {
27262            Default::default()
27263        }
27264    }
27265    ///`SignEvmHashRule`
27266    ///
27267    /// <details><summary>JSON schema</summary>
27268    ///
27269    /// ```json
27270    ///{
27271    ///  "title": "SignEvmHashRule",
27272    ///  "required": [
27273    ///    "action",
27274    ///    "operation"
27275    ///  ],
27276    ///  "properties": {
27277    ///    "action": {
27278    ///      "description": "Whether any attempts to sign a hash will be accepted or rejected. This rule does not accept any criteria.",
27279    ///      "examples": [
27280    ///        "accept"
27281    ///      ],
27282    ///      "type": "string",
27283    ///      "enum": [
27284    ///        "reject",
27285    ///        "accept"
27286    ///      ]
27287    ///    },
27288    ///    "operation": {
27289    ///      "description": "The operation to which the rule applies.",
27290    ///      "examples": [
27291    ///        "signEvmHash"
27292    ///      ],
27293    ///      "type": "string",
27294    ///      "enum": [
27295    ///        "signEvmHash"
27296    ///      ]
27297    ///    }
27298    ///  },
27299    ///  "x-audience": "public"
27300    ///}
27301    /// ```
27302    /// </details>
27303    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27304    pub struct SignEvmHashRule {
27305        ///Whether any attempts to sign a hash will be accepted or rejected. This rule does not accept any criteria.
27306        pub action: SignEvmHashRuleAction,
27307        ///The operation to which the rule applies.
27308        pub operation: SignEvmHashRuleOperation,
27309    }
27310    impl ::std::convert::From<&SignEvmHashRule> for SignEvmHashRule {
27311        fn from(value: &SignEvmHashRule) -> Self {
27312            value.clone()
27313        }
27314    }
27315    impl SignEvmHashRule {
27316        pub fn builder() -> builder::SignEvmHashRule {
27317            Default::default()
27318        }
27319    }
27320    ///Whether any attempts to sign a hash will be accepted or rejected. This rule does not accept any criteria.
27321    ///
27322    /// <details><summary>JSON schema</summary>
27323    ///
27324    /// ```json
27325    ///{
27326    ///  "description": "Whether any attempts to sign a hash will be accepted or rejected. This rule does not accept any criteria.",
27327    ///  "examples": [
27328    ///    "accept"
27329    ///  ],
27330    ///  "type": "string",
27331    ///  "enum": [
27332    ///    "reject",
27333    ///    "accept"
27334    ///  ]
27335    ///}
27336    /// ```
27337    /// </details>
27338    #[derive(
27339        ::serde::Deserialize,
27340        ::serde::Serialize,
27341        Clone,
27342        Copy,
27343        Debug,
27344        Eq,
27345        Hash,
27346        Ord,
27347        PartialEq,
27348        PartialOrd,
27349    )]
27350    pub enum SignEvmHashRuleAction {
27351        #[serde(rename = "reject")]
27352        Reject,
27353        #[serde(rename = "accept")]
27354        Accept,
27355    }
27356    impl ::std::convert::From<&Self> for SignEvmHashRuleAction {
27357        fn from(value: &SignEvmHashRuleAction) -> Self {
27358            value.clone()
27359        }
27360    }
27361    impl ::std::fmt::Display for SignEvmHashRuleAction {
27362        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27363            match *self {
27364                Self::Reject => f.write_str("reject"),
27365                Self::Accept => f.write_str("accept"),
27366            }
27367        }
27368    }
27369    impl ::std::str::FromStr for SignEvmHashRuleAction {
27370        type Err = self::error::ConversionError;
27371        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27372            match value {
27373                "reject" => Ok(Self::Reject),
27374                "accept" => Ok(Self::Accept),
27375                _ => Err("invalid value".into()),
27376            }
27377        }
27378    }
27379    impl ::std::convert::TryFrom<&str> for SignEvmHashRuleAction {
27380        type Error = self::error::ConversionError;
27381        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27382            value.parse()
27383        }
27384    }
27385    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmHashRuleAction {
27386        type Error = self::error::ConversionError;
27387        fn try_from(
27388            value: &::std::string::String,
27389        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27390            value.parse()
27391        }
27392    }
27393    impl ::std::convert::TryFrom<::std::string::String> for SignEvmHashRuleAction {
27394        type Error = self::error::ConversionError;
27395        fn try_from(
27396            value: ::std::string::String,
27397        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27398            value.parse()
27399        }
27400    }
27401    ///The operation to which the rule applies.
27402    ///
27403    /// <details><summary>JSON schema</summary>
27404    ///
27405    /// ```json
27406    ///{
27407    ///  "description": "The operation to which the rule applies.",
27408    ///  "examples": [
27409    ///    "signEvmHash"
27410    ///  ],
27411    ///  "type": "string",
27412    ///  "enum": [
27413    ///    "signEvmHash"
27414    ///  ]
27415    ///}
27416    /// ```
27417    /// </details>
27418    #[derive(
27419        ::serde::Deserialize,
27420        ::serde::Serialize,
27421        Clone,
27422        Copy,
27423        Debug,
27424        Eq,
27425        Hash,
27426        Ord,
27427        PartialEq,
27428        PartialOrd,
27429    )]
27430    pub enum SignEvmHashRuleOperation {
27431        #[serde(rename = "signEvmHash")]
27432        SignEvmHash,
27433    }
27434    impl ::std::convert::From<&Self> for SignEvmHashRuleOperation {
27435        fn from(value: &SignEvmHashRuleOperation) -> Self {
27436            value.clone()
27437        }
27438    }
27439    impl ::std::fmt::Display for SignEvmHashRuleOperation {
27440        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27441            match *self {
27442                Self::SignEvmHash => f.write_str("signEvmHash"),
27443            }
27444        }
27445    }
27446    impl ::std::str::FromStr for SignEvmHashRuleOperation {
27447        type Err = self::error::ConversionError;
27448        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27449            match value {
27450                "signEvmHash" => Ok(Self::SignEvmHash),
27451                _ => Err("invalid value".into()),
27452            }
27453        }
27454    }
27455    impl ::std::convert::TryFrom<&str> for SignEvmHashRuleOperation {
27456        type Error = self::error::ConversionError;
27457        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27458            value.parse()
27459        }
27460    }
27461    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmHashRuleOperation {
27462        type Error = self::error::ConversionError;
27463        fn try_from(
27464            value: &::std::string::String,
27465        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27466            value.parse()
27467        }
27468    }
27469    impl ::std::convert::TryFrom<::std::string::String> for SignEvmHashRuleOperation {
27470        type Error = self::error::ConversionError;
27471        fn try_from(
27472            value: ::std::string::String,
27473        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27474            value.parse()
27475        }
27476    }
27477    ///`SignEvmHashXIdempotencyKey`
27478    ///
27479    /// <details><summary>JSON schema</summary>
27480    ///
27481    /// ```json
27482    ///{
27483    ///  "type": "string",
27484    ///  "maxLength": 36,
27485    ///  "minLength": 36,
27486    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
27487    ///}
27488    /// ```
27489    /// </details>
27490    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27491    #[serde(transparent)]
27492    pub struct SignEvmHashXIdempotencyKey(::std::string::String);
27493    impl ::std::ops::Deref for SignEvmHashXIdempotencyKey {
27494        type Target = ::std::string::String;
27495        fn deref(&self) -> &::std::string::String {
27496            &self.0
27497        }
27498    }
27499    impl ::std::convert::From<SignEvmHashXIdempotencyKey> for ::std::string::String {
27500        fn from(value: SignEvmHashXIdempotencyKey) -> Self {
27501            value.0
27502        }
27503    }
27504    impl ::std::convert::From<&SignEvmHashXIdempotencyKey> for SignEvmHashXIdempotencyKey {
27505        fn from(value: &SignEvmHashXIdempotencyKey) -> Self {
27506            value.clone()
27507        }
27508    }
27509    impl ::std::str::FromStr for SignEvmHashXIdempotencyKey {
27510        type Err = self::error::ConversionError;
27511        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27512            if value.chars().count() > 36usize {
27513                return Err("longer than 36 characters".into());
27514            }
27515            if value.chars().count() < 36usize {
27516                return Err("shorter than 36 characters".into());
27517            }
27518            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
27519                ::std::sync::LazyLock::new(|| {
27520                    ::regress::Regex::new(
27521                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
27522                    )
27523                    .unwrap()
27524                });
27525            if PATTERN.find(value).is_none() {
27526                return Err(
27527                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
27528                        .into(),
27529                );
27530            }
27531            Ok(Self(value.to_string()))
27532        }
27533    }
27534    impl ::std::convert::TryFrom<&str> for SignEvmHashXIdempotencyKey {
27535        type Error = self::error::ConversionError;
27536        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27537            value.parse()
27538        }
27539    }
27540    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmHashXIdempotencyKey {
27541        type Error = self::error::ConversionError;
27542        fn try_from(
27543            value: &::std::string::String,
27544        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27545            value.parse()
27546        }
27547    }
27548    impl ::std::convert::TryFrom<::std::string::String> for SignEvmHashXIdempotencyKey {
27549        type Error = self::error::ConversionError;
27550        fn try_from(
27551            value: ::std::string::String,
27552        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27553            value.parse()
27554        }
27555    }
27556    impl<'de> ::serde::Deserialize<'de> for SignEvmHashXIdempotencyKey {
27557        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
27558        where
27559            D: ::serde::Deserializer<'de>,
27560        {
27561            ::std::string::String::deserialize(deserializer)?
27562                .parse()
27563                .map_err(|e: self::error::ConversionError| {
27564                    <D::Error as ::serde::de::Error>::custom(e.to_string())
27565                })
27566        }
27567    }
27568    ///`SignEvmMessageAddress`
27569    ///
27570    /// <details><summary>JSON schema</summary>
27571    ///
27572    /// ```json
27573    ///{
27574    ///  "type": "string",
27575    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
27576    ///}
27577    /// ```
27578    /// </details>
27579    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27580    #[serde(transparent)]
27581    pub struct SignEvmMessageAddress(::std::string::String);
27582    impl ::std::ops::Deref for SignEvmMessageAddress {
27583        type Target = ::std::string::String;
27584        fn deref(&self) -> &::std::string::String {
27585            &self.0
27586        }
27587    }
27588    impl ::std::convert::From<SignEvmMessageAddress> for ::std::string::String {
27589        fn from(value: SignEvmMessageAddress) -> Self {
27590            value.0
27591        }
27592    }
27593    impl ::std::convert::From<&SignEvmMessageAddress> for SignEvmMessageAddress {
27594        fn from(value: &SignEvmMessageAddress) -> Self {
27595            value.clone()
27596        }
27597    }
27598    impl ::std::str::FromStr for SignEvmMessageAddress {
27599        type Err = self::error::ConversionError;
27600        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27601            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
27602                ::std::sync::LazyLock::new(|| {
27603                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
27604                });
27605            if PATTERN.find(value).is_none() {
27606                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
27607            }
27608            Ok(Self(value.to_string()))
27609        }
27610    }
27611    impl ::std::convert::TryFrom<&str> for SignEvmMessageAddress {
27612        type Error = self::error::ConversionError;
27613        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27614            value.parse()
27615        }
27616    }
27617    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmMessageAddress {
27618        type Error = self::error::ConversionError;
27619        fn try_from(
27620            value: &::std::string::String,
27621        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27622            value.parse()
27623        }
27624    }
27625    impl ::std::convert::TryFrom<::std::string::String> for SignEvmMessageAddress {
27626        type Error = self::error::ConversionError;
27627        fn try_from(
27628            value: ::std::string::String,
27629        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27630            value.parse()
27631        }
27632    }
27633    impl<'de> ::serde::Deserialize<'de> for SignEvmMessageAddress {
27634        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
27635        where
27636            D: ::serde::Deserializer<'de>,
27637        {
27638            ::std::string::String::deserialize(deserializer)?
27639                .parse()
27640                .map_err(|e: self::error::ConversionError| {
27641                    <D::Error as ::serde::de::Error>::custom(e.to_string())
27642                })
27643        }
27644    }
27645    ///`SignEvmMessageBody`
27646    ///
27647    /// <details><summary>JSON schema</summary>
27648    ///
27649    /// ```json
27650    ///{
27651    ///  "type": "object",
27652    ///  "required": [
27653    ///    "message"
27654    ///  ],
27655    ///  "properties": {
27656    ///    "message": {
27657    ///      "description": "The message to sign.",
27658    ///      "examples": [
27659    ///        "Hello, world!"
27660    ///      ],
27661    ///      "type": "string"
27662    ///    }
27663    ///  }
27664    ///}
27665    /// ```
27666    /// </details>
27667    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27668    pub struct SignEvmMessageBody {
27669        ///The message to sign.
27670        pub message: ::std::string::String,
27671    }
27672    impl ::std::convert::From<&SignEvmMessageBody> for SignEvmMessageBody {
27673        fn from(value: &SignEvmMessageBody) -> Self {
27674            value.clone()
27675        }
27676    }
27677    impl SignEvmMessageBody {
27678        pub fn builder() -> builder::SignEvmMessageBody {
27679            Default::default()
27680        }
27681    }
27682    ///A schema for specifying the rejection criteria for the SignEvmMessage operation.
27683    ///
27684    /// <details><summary>JSON schema</summary>
27685    ///
27686    /// ```json
27687    ///{
27688    ///  "description": "A schema for specifying the rejection criteria for the SignEvmMessage operation.",
27689    ///  "examples": [
27690    ///    [
27691    ///      {
27692    ///        "match": "^hello ([a-z]+)$",
27693    ///        "type": "evmMessage"
27694    ///      }
27695    ///    ]
27696    ///  ],
27697    ///  "type": "array",
27698    ///  "items": {
27699    ///    "oneOf": [
27700    ///      {
27701    ///        "$ref": "#/components/schemas/EvmMessageCriterion"
27702    ///      }
27703    ///    ]
27704    ///  },
27705    ///  "x-audience": "public"
27706    ///}
27707    /// ```
27708    /// </details>
27709    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27710    #[serde(transparent)]
27711    pub struct SignEvmMessageCriteria(pub ::std::vec::Vec<EvmMessageCriterion>);
27712    impl ::std::ops::Deref for SignEvmMessageCriteria {
27713        type Target = ::std::vec::Vec<EvmMessageCriterion>;
27714        fn deref(&self) -> &::std::vec::Vec<EvmMessageCriterion> {
27715            &self.0
27716        }
27717    }
27718    impl ::std::convert::From<SignEvmMessageCriteria> for ::std::vec::Vec<EvmMessageCriterion> {
27719        fn from(value: SignEvmMessageCriteria) -> Self {
27720            value.0
27721        }
27722    }
27723    impl ::std::convert::From<&SignEvmMessageCriteria> for SignEvmMessageCriteria {
27724        fn from(value: &SignEvmMessageCriteria) -> Self {
27725            value.clone()
27726        }
27727    }
27728    impl ::std::convert::From<::std::vec::Vec<EvmMessageCriterion>> for SignEvmMessageCriteria {
27729        fn from(value: ::std::vec::Vec<EvmMessageCriterion>) -> Self {
27730            Self(value)
27731        }
27732    }
27733    ///`SignEvmMessageResponse`
27734    ///
27735    /// <details><summary>JSON schema</summary>
27736    ///
27737    /// ```json
27738    ///{
27739    ///  "type": "object",
27740    ///  "required": [
27741    ///    "signature"
27742    ///  ],
27743    ///  "properties": {
27744    ///    "signature": {
27745    ///      "description": "The signature of the message, as a 0x-prefixed hex string.",
27746    ///      "examples": [
27747    ///        "0x1b0c9cf8cd4554c6c6d9e7311e88f1be075d7f25b418a044f4bf2c0a42a93e212ad0a8b54de9e0b5f7e3812de3f2c6cc79aa8c3e1c02e7ad14b4a8f42012c2c01b"
27748    ///      ],
27749    ///      "type": "string"
27750    ///    }
27751    ///  }
27752    ///}
27753    /// ```
27754    /// </details>
27755    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27756    pub struct SignEvmMessageResponse {
27757        ///The signature of the message, as a 0x-prefixed hex string.
27758        pub signature: ::std::string::String,
27759    }
27760    impl ::std::convert::From<&SignEvmMessageResponse> for SignEvmMessageResponse {
27761        fn from(value: &SignEvmMessageResponse) -> Self {
27762            value.clone()
27763        }
27764    }
27765    impl SignEvmMessageResponse {
27766        pub fn builder() -> builder::SignEvmMessageResponse {
27767            Default::default()
27768        }
27769    }
27770    ///`SignEvmMessageRule`
27771    ///
27772    /// <details><summary>JSON schema</summary>
27773    ///
27774    /// ```json
27775    ///{
27776    ///  "title": "SignEvmMessageRule",
27777    ///  "required": [
27778    ///    "action",
27779    ///    "criteria",
27780    ///    "operation"
27781    ///  ],
27782    ///  "properties": {
27783    ///    "action": {
27784    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
27785    ///      "examples": [
27786    ///        "accept"
27787    ///      ],
27788    ///      "type": "string",
27789    ///      "enum": [
27790    ///        "reject",
27791    ///        "accept"
27792    ///      ]
27793    ///    },
27794    ///    "criteria": {
27795    ///      "$ref": "#/components/schemas/SignEvmMessageCriteria"
27796    ///    },
27797    ///    "operation": {
27798    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
27799    ///      "examples": [
27800    ///        "signEvmMessage"
27801    ///      ],
27802    ///      "type": "string",
27803    ///      "enum": [
27804    ///        "signEvmMessage"
27805    ///      ]
27806    ///    }
27807    ///  },
27808    ///  "x-audience": "public"
27809    ///}
27810    /// ```
27811    /// </details>
27812    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
27813    pub struct SignEvmMessageRule {
27814        ///Whether matching the rule will cause the request to be rejected or accepted.
27815        pub action: SignEvmMessageRuleAction,
27816        pub criteria: SignEvmMessageCriteria,
27817        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
27818        pub operation: SignEvmMessageRuleOperation,
27819    }
27820    impl ::std::convert::From<&SignEvmMessageRule> for SignEvmMessageRule {
27821        fn from(value: &SignEvmMessageRule) -> Self {
27822            value.clone()
27823        }
27824    }
27825    impl SignEvmMessageRule {
27826        pub fn builder() -> builder::SignEvmMessageRule {
27827            Default::default()
27828        }
27829    }
27830    ///Whether matching the rule will cause the request to be rejected or accepted.
27831    ///
27832    /// <details><summary>JSON schema</summary>
27833    ///
27834    /// ```json
27835    ///{
27836    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
27837    ///  "examples": [
27838    ///    "accept"
27839    ///  ],
27840    ///  "type": "string",
27841    ///  "enum": [
27842    ///    "reject",
27843    ///    "accept"
27844    ///  ]
27845    ///}
27846    /// ```
27847    /// </details>
27848    #[derive(
27849        ::serde::Deserialize,
27850        ::serde::Serialize,
27851        Clone,
27852        Copy,
27853        Debug,
27854        Eq,
27855        Hash,
27856        Ord,
27857        PartialEq,
27858        PartialOrd,
27859    )]
27860    pub enum SignEvmMessageRuleAction {
27861        #[serde(rename = "reject")]
27862        Reject,
27863        #[serde(rename = "accept")]
27864        Accept,
27865    }
27866    impl ::std::convert::From<&Self> for SignEvmMessageRuleAction {
27867        fn from(value: &SignEvmMessageRuleAction) -> Self {
27868            value.clone()
27869        }
27870    }
27871    impl ::std::fmt::Display for SignEvmMessageRuleAction {
27872        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27873            match *self {
27874                Self::Reject => f.write_str("reject"),
27875                Self::Accept => f.write_str("accept"),
27876            }
27877        }
27878    }
27879    impl ::std::str::FromStr for SignEvmMessageRuleAction {
27880        type Err = self::error::ConversionError;
27881        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27882            match value {
27883                "reject" => Ok(Self::Reject),
27884                "accept" => Ok(Self::Accept),
27885                _ => Err("invalid value".into()),
27886            }
27887        }
27888    }
27889    impl ::std::convert::TryFrom<&str> for SignEvmMessageRuleAction {
27890        type Error = self::error::ConversionError;
27891        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27892            value.parse()
27893        }
27894    }
27895    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmMessageRuleAction {
27896        type Error = self::error::ConversionError;
27897        fn try_from(
27898            value: &::std::string::String,
27899        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27900            value.parse()
27901        }
27902    }
27903    impl ::std::convert::TryFrom<::std::string::String> for SignEvmMessageRuleAction {
27904        type Error = self::error::ConversionError;
27905        fn try_from(
27906            value: ::std::string::String,
27907        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27908            value.parse()
27909        }
27910    }
27911    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
27912    ///
27913    /// <details><summary>JSON schema</summary>
27914    ///
27915    /// ```json
27916    ///{
27917    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
27918    ///  "examples": [
27919    ///    "signEvmMessage"
27920    ///  ],
27921    ///  "type": "string",
27922    ///  "enum": [
27923    ///    "signEvmMessage"
27924    ///  ]
27925    ///}
27926    /// ```
27927    /// </details>
27928    #[derive(
27929        ::serde::Deserialize,
27930        ::serde::Serialize,
27931        Clone,
27932        Copy,
27933        Debug,
27934        Eq,
27935        Hash,
27936        Ord,
27937        PartialEq,
27938        PartialOrd,
27939    )]
27940    pub enum SignEvmMessageRuleOperation {
27941        #[serde(rename = "signEvmMessage")]
27942        SignEvmMessage,
27943    }
27944    impl ::std::convert::From<&Self> for SignEvmMessageRuleOperation {
27945        fn from(value: &SignEvmMessageRuleOperation) -> Self {
27946            value.clone()
27947        }
27948    }
27949    impl ::std::fmt::Display for SignEvmMessageRuleOperation {
27950        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27951            match *self {
27952                Self::SignEvmMessage => f.write_str("signEvmMessage"),
27953            }
27954        }
27955    }
27956    impl ::std::str::FromStr for SignEvmMessageRuleOperation {
27957        type Err = self::error::ConversionError;
27958        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27959            match value {
27960                "signEvmMessage" => Ok(Self::SignEvmMessage),
27961                _ => Err("invalid value".into()),
27962            }
27963        }
27964    }
27965    impl ::std::convert::TryFrom<&str> for SignEvmMessageRuleOperation {
27966        type Error = self::error::ConversionError;
27967        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
27968            value.parse()
27969        }
27970    }
27971    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmMessageRuleOperation {
27972        type Error = self::error::ConversionError;
27973        fn try_from(
27974            value: &::std::string::String,
27975        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27976            value.parse()
27977        }
27978    }
27979    impl ::std::convert::TryFrom<::std::string::String> for SignEvmMessageRuleOperation {
27980        type Error = self::error::ConversionError;
27981        fn try_from(
27982            value: ::std::string::String,
27983        ) -> ::std::result::Result<Self, self::error::ConversionError> {
27984            value.parse()
27985        }
27986    }
27987    ///`SignEvmMessageXIdempotencyKey`
27988    ///
27989    /// <details><summary>JSON schema</summary>
27990    ///
27991    /// ```json
27992    ///{
27993    ///  "type": "string",
27994    ///  "maxLength": 36,
27995    ///  "minLength": 36,
27996    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
27997    ///}
27998    /// ```
27999    /// </details>
28000    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
28001    #[serde(transparent)]
28002    pub struct SignEvmMessageXIdempotencyKey(::std::string::String);
28003    impl ::std::ops::Deref for SignEvmMessageXIdempotencyKey {
28004        type Target = ::std::string::String;
28005        fn deref(&self) -> &::std::string::String {
28006            &self.0
28007        }
28008    }
28009    impl ::std::convert::From<SignEvmMessageXIdempotencyKey> for ::std::string::String {
28010        fn from(value: SignEvmMessageXIdempotencyKey) -> Self {
28011            value.0
28012        }
28013    }
28014    impl ::std::convert::From<&SignEvmMessageXIdempotencyKey> for SignEvmMessageXIdempotencyKey {
28015        fn from(value: &SignEvmMessageXIdempotencyKey) -> Self {
28016            value.clone()
28017        }
28018    }
28019    impl ::std::str::FromStr for SignEvmMessageXIdempotencyKey {
28020        type Err = self::error::ConversionError;
28021        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28022            if value.chars().count() > 36usize {
28023                return Err("longer than 36 characters".into());
28024            }
28025            if value.chars().count() < 36usize {
28026                return Err("shorter than 36 characters".into());
28027            }
28028            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
28029                ::std::sync::LazyLock::new(|| {
28030                    ::regress::Regex::new(
28031                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
28032                    )
28033                    .unwrap()
28034                });
28035            if PATTERN.find(value).is_none() {
28036                return Err(
28037                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
28038                        .into(),
28039                );
28040            }
28041            Ok(Self(value.to_string()))
28042        }
28043    }
28044    impl ::std::convert::TryFrom<&str> for SignEvmMessageXIdempotencyKey {
28045        type Error = self::error::ConversionError;
28046        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28047            value.parse()
28048        }
28049    }
28050    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmMessageXIdempotencyKey {
28051        type Error = self::error::ConversionError;
28052        fn try_from(
28053            value: &::std::string::String,
28054        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28055            value.parse()
28056        }
28057    }
28058    impl ::std::convert::TryFrom<::std::string::String> for SignEvmMessageXIdempotencyKey {
28059        type Error = self::error::ConversionError;
28060        fn try_from(
28061            value: ::std::string::String,
28062        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28063            value.parse()
28064        }
28065    }
28066    impl<'de> ::serde::Deserialize<'de> for SignEvmMessageXIdempotencyKey {
28067        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
28068        where
28069            D: ::serde::Deserializer<'de>,
28070        {
28071            ::std::string::String::deserialize(deserializer)?
28072                .parse()
28073                .map_err(|e: self::error::ConversionError| {
28074                    <D::Error as ::serde::de::Error>::custom(e.to_string())
28075                })
28076        }
28077    }
28078    ///`SignEvmTransactionAddress`
28079    ///
28080    /// <details><summary>JSON schema</summary>
28081    ///
28082    /// ```json
28083    ///{
28084    ///  "type": "string",
28085    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
28086    ///}
28087    /// ```
28088    /// </details>
28089    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
28090    #[serde(transparent)]
28091    pub struct SignEvmTransactionAddress(::std::string::String);
28092    impl ::std::ops::Deref for SignEvmTransactionAddress {
28093        type Target = ::std::string::String;
28094        fn deref(&self) -> &::std::string::String {
28095            &self.0
28096        }
28097    }
28098    impl ::std::convert::From<SignEvmTransactionAddress> for ::std::string::String {
28099        fn from(value: SignEvmTransactionAddress) -> Self {
28100            value.0
28101        }
28102    }
28103    impl ::std::convert::From<&SignEvmTransactionAddress> for SignEvmTransactionAddress {
28104        fn from(value: &SignEvmTransactionAddress) -> Self {
28105            value.clone()
28106        }
28107    }
28108    impl ::std::str::FromStr for SignEvmTransactionAddress {
28109        type Err = self::error::ConversionError;
28110        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28111            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
28112                ::std::sync::LazyLock::new(|| {
28113                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
28114                });
28115            if PATTERN.find(value).is_none() {
28116                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
28117            }
28118            Ok(Self(value.to_string()))
28119        }
28120    }
28121    impl ::std::convert::TryFrom<&str> for SignEvmTransactionAddress {
28122        type Error = self::error::ConversionError;
28123        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28124            value.parse()
28125        }
28126    }
28127    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTransactionAddress {
28128        type Error = self::error::ConversionError;
28129        fn try_from(
28130            value: &::std::string::String,
28131        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28132            value.parse()
28133        }
28134    }
28135    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTransactionAddress {
28136        type Error = self::error::ConversionError;
28137        fn try_from(
28138            value: ::std::string::String,
28139        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28140            value.parse()
28141        }
28142    }
28143    impl<'de> ::serde::Deserialize<'de> for SignEvmTransactionAddress {
28144        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
28145        where
28146            D: ::serde::Deserializer<'de>,
28147        {
28148            ::std::string::String::deserialize(deserializer)?
28149                .parse()
28150                .map_err(|e: self::error::ConversionError| {
28151                    <D::Error as ::serde::de::Error>::custom(e.to_string())
28152                })
28153        }
28154    }
28155    ///`SignEvmTransactionBody`
28156    ///
28157    /// <details><summary>JSON schema</summary>
28158    ///
28159    /// ```json
28160    ///{
28161    ///  "type": "object",
28162    ///  "required": [
28163    ///    "transaction"
28164    ///  ],
28165    ///  "properties": {
28166    ///    "transaction": {
28167    ///      "description": "The RLP-encoded transaction to sign, as a 0x-prefixed hex string.",
28168    ///      "examples": [
28169    ///        "0xf86b098505d21dba00830334509431415daf58e2c6b7323b4c58712fd92952145da79018080"
28170    ///      ],
28171    ///      "type": "string"
28172    ///    }
28173    ///  }
28174    ///}
28175    /// ```
28176    /// </details>
28177    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28178    pub struct SignEvmTransactionBody {
28179        ///The RLP-encoded transaction to sign, as a 0x-prefixed hex string.
28180        pub transaction: ::std::string::String,
28181    }
28182    impl ::std::convert::From<&SignEvmTransactionBody> for SignEvmTransactionBody {
28183        fn from(value: &SignEvmTransactionBody) -> Self {
28184            value.clone()
28185        }
28186    }
28187    impl SignEvmTransactionBody {
28188        pub fn builder() -> builder::SignEvmTransactionBody {
28189            Default::default()
28190        }
28191    }
28192    ///A schema for specifying criteria for the SignEvmTransaction operation.
28193    ///
28194    /// <details><summary>JSON schema</summary>
28195    ///
28196    /// ```json
28197    ///{
28198    ///  "description": "A schema for specifying criteria for the SignEvmTransaction operation.",
28199    ///  "examples": [
28200    ///    [
28201    ///      {
28202    ///        "ethValue": "1000000",
28203    ///        "operator": ">=",
28204    ///        "type": "ethValue"
28205    ///      },
28206    ///      {
28207    ///        "addresses": [
28208    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
28209    ///        ],
28210    ///        "operator": "in",
28211    ///        "type": "evmAddress"
28212    ///      }
28213    ///    ]
28214    ///  ],
28215    ///  "type": "array",
28216    ///  "items": {
28217    ///    "oneOf": [
28218    ///      {
28219    ///        "$ref": "#/components/schemas/EthValueCriterion"
28220    ///      },
28221    ///      {
28222    ///        "$ref": "#/components/schemas/EvmAddressCriterion"
28223    ///      },
28224    ///      {
28225    ///        "$ref": "#/components/schemas/EvmDataCriterion"
28226    ///      },
28227    ///      {
28228    ///        "$ref": "#/components/schemas/NetUSDChangeCriterion"
28229    ///      }
28230    ///    ]
28231    ///  }
28232    ///}
28233    /// ```
28234    /// </details>
28235    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28236    #[serde(transparent)]
28237    pub struct SignEvmTransactionCriteria(pub ::std::vec::Vec<SignEvmTransactionCriteriaItem>);
28238    impl ::std::ops::Deref for SignEvmTransactionCriteria {
28239        type Target = ::std::vec::Vec<SignEvmTransactionCriteriaItem>;
28240        fn deref(&self) -> &::std::vec::Vec<SignEvmTransactionCriteriaItem> {
28241            &self.0
28242        }
28243    }
28244    impl ::std::convert::From<SignEvmTransactionCriteria>
28245        for ::std::vec::Vec<SignEvmTransactionCriteriaItem>
28246    {
28247        fn from(value: SignEvmTransactionCriteria) -> Self {
28248            value.0
28249        }
28250    }
28251    impl ::std::convert::From<&SignEvmTransactionCriteria> for SignEvmTransactionCriteria {
28252        fn from(value: &SignEvmTransactionCriteria) -> Self {
28253            value.clone()
28254        }
28255    }
28256    impl ::std::convert::From<::std::vec::Vec<SignEvmTransactionCriteriaItem>>
28257        for SignEvmTransactionCriteria
28258    {
28259        fn from(value: ::std::vec::Vec<SignEvmTransactionCriteriaItem>) -> Self {
28260            Self(value)
28261        }
28262    }
28263    ///`SignEvmTransactionCriteriaItem`
28264    ///
28265    /// <details><summary>JSON schema</summary>
28266    ///
28267    /// ```json
28268    ///{
28269    ///  "oneOf": [
28270    ///    {
28271    ///      "$ref": "#/components/schemas/EthValueCriterion"
28272    ///    },
28273    ///    {
28274    ///      "$ref": "#/components/schemas/EvmAddressCriterion"
28275    ///    },
28276    ///    {
28277    ///      "$ref": "#/components/schemas/EvmDataCriterion"
28278    ///    },
28279    ///    {
28280    ///      "$ref": "#/components/schemas/NetUSDChangeCriterion"
28281    ///    }
28282    ///  ]
28283    ///}
28284    /// ```
28285    /// </details>
28286    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28287    #[serde(untagged)]
28288    pub enum SignEvmTransactionCriteriaItem {
28289        EthValueCriterion(EthValueCriterion),
28290        EvmAddressCriterion(EvmAddressCriterion),
28291        EvmDataCriterion(EvmDataCriterion),
28292        NetUsdChangeCriterion(NetUsdChangeCriterion),
28293    }
28294    impl ::std::convert::From<&Self> for SignEvmTransactionCriteriaItem {
28295        fn from(value: &SignEvmTransactionCriteriaItem) -> Self {
28296            value.clone()
28297        }
28298    }
28299    impl ::std::convert::From<EthValueCriterion> for SignEvmTransactionCriteriaItem {
28300        fn from(value: EthValueCriterion) -> Self {
28301            Self::EthValueCriterion(value)
28302        }
28303    }
28304    impl ::std::convert::From<EvmAddressCriterion> for SignEvmTransactionCriteriaItem {
28305        fn from(value: EvmAddressCriterion) -> Self {
28306            Self::EvmAddressCriterion(value)
28307        }
28308    }
28309    impl ::std::convert::From<EvmDataCriterion> for SignEvmTransactionCriteriaItem {
28310        fn from(value: EvmDataCriterion) -> Self {
28311            Self::EvmDataCriterion(value)
28312        }
28313    }
28314    impl ::std::convert::From<NetUsdChangeCriterion> for SignEvmTransactionCriteriaItem {
28315        fn from(value: NetUsdChangeCriterion) -> Self {
28316            Self::NetUsdChangeCriterion(value)
28317        }
28318    }
28319    ///`SignEvmTransactionResponse`
28320    ///
28321    /// <details><summary>JSON schema</summary>
28322    ///
28323    /// ```json
28324    ///{
28325    ///  "type": "object",
28326    ///  "required": [
28327    ///    "signedTransaction"
28328    ///  ],
28329    ///  "properties": {
28330    ///    "signedTransaction": {
28331    ///      "description": "The RLP-encoded signed transaction, as a 0x-prefixed hex string.",
28332    ///      "examples": [
28333    ///        "0x1b0c9cf8cd4554c6c6d9e7311e88f1be075d7f25b418a044f4bf2c0a42a93e212ad0a8b54de9e0b5f7e3812de3f2c6cc79aa8c3e1c02e7ad14b4a8f42012c2c01b"
28334    ///      ],
28335    ///      "type": "string"
28336    ///    }
28337    ///  }
28338    ///}
28339    /// ```
28340    /// </details>
28341    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28342    pub struct SignEvmTransactionResponse {
28343        ///The RLP-encoded signed transaction, as a 0x-prefixed hex string.
28344        #[serde(rename = "signedTransaction")]
28345        pub signed_transaction: ::std::string::String,
28346    }
28347    impl ::std::convert::From<&SignEvmTransactionResponse> for SignEvmTransactionResponse {
28348        fn from(value: &SignEvmTransactionResponse) -> Self {
28349            value.clone()
28350        }
28351    }
28352    impl SignEvmTransactionResponse {
28353        pub fn builder() -> builder::SignEvmTransactionResponse {
28354            Default::default()
28355        }
28356    }
28357    ///`SignEvmTransactionRule`
28358    ///
28359    /// <details><summary>JSON schema</summary>
28360    ///
28361    /// ```json
28362    ///{
28363    ///  "title": "SignEvmTransactionRule",
28364    ///  "required": [
28365    ///    "action",
28366    ///    "criteria",
28367    ///    "operation"
28368    ///  ],
28369    ///  "properties": {
28370    ///    "action": {
28371    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
28372    ///      "examples": [
28373    ///        "accept"
28374    ///      ],
28375    ///      "type": "string",
28376    ///      "enum": [
28377    ///        "reject",
28378    ///        "accept"
28379    ///      ]
28380    ///    },
28381    ///    "criteria": {
28382    ///      "$ref": "#/components/schemas/SignEvmTransactionCriteria"
28383    ///    },
28384    ///    "operation": {
28385    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
28386    ///      "examples": [
28387    ///        "signEvmTransaction"
28388    ///      ],
28389    ///      "type": "string",
28390    ///      "enum": [
28391    ///        "signEvmTransaction"
28392    ///      ]
28393    ///    }
28394    ///  }
28395    ///}
28396    /// ```
28397    /// </details>
28398    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28399    pub struct SignEvmTransactionRule {
28400        ///Whether matching the rule will cause the request to be rejected or accepted.
28401        pub action: SignEvmTransactionRuleAction,
28402        pub criteria: SignEvmTransactionCriteria,
28403        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
28404        pub operation: SignEvmTransactionRuleOperation,
28405    }
28406    impl ::std::convert::From<&SignEvmTransactionRule> for SignEvmTransactionRule {
28407        fn from(value: &SignEvmTransactionRule) -> Self {
28408            value.clone()
28409        }
28410    }
28411    impl SignEvmTransactionRule {
28412        pub fn builder() -> builder::SignEvmTransactionRule {
28413            Default::default()
28414        }
28415    }
28416    ///Whether matching the rule will cause the request to be rejected or accepted.
28417    ///
28418    /// <details><summary>JSON schema</summary>
28419    ///
28420    /// ```json
28421    ///{
28422    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
28423    ///  "examples": [
28424    ///    "accept"
28425    ///  ],
28426    ///  "type": "string",
28427    ///  "enum": [
28428    ///    "reject",
28429    ///    "accept"
28430    ///  ]
28431    ///}
28432    /// ```
28433    /// </details>
28434    #[derive(
28435        ::serde::Deserialize,
28436        ::serde::Serialize,
28437        Clone,
28438        Copy,
28439        Debug,
28440        Eq,
28441        Hash,
28442        Ord,
28443        PartialEq,
28444        PartialOrd,
28445    )]
28446    pub enum SignEvmTransactionRuleAction {
28447        #[serde(rename = "reject")]
28448        Reject,
28449        #[serde(rename = "accept")]
28450        Accept,
28451    }
28452    impl ::std::convert::From<&Self> for SignEvmTransactionRuleAction {
28453        fn from(value: &SignEvmTransactionRuleAction) -> Self {
28454            value.clone()
28455        }
28456    }
28457    impl ::std::fmt::Display for SignEvmTransactionRuleAction {
28458        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28459            match *self {
28460                Self::Reject => f.write_str("reject"),
28461                Self::Accept => f.write_str("accept"),
28462            }
28463        }
28464    }
28465    impl ::std::str::FromStr for SignEvmTransactionRuleAction {
28466        type Err = self::error::ConversionError;
28467        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28468            match value {
28469                "reject" => Ok(Self::Reject),
28470                "accept" => Ok(Self::Accept),
28471                _ => Err("invalid value".into()),
28472            }
28473        }
28474    }
28475    impl ::std::convert::TryFrom<&str> for SignEvmTransactionRuleAction {
28476        type Error = self::error::ConversionError;
28477        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28478            value.parse()
28479        }
28480    }
28481    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTransactionRuleAction {
28482        type Error = self::error::ConversionError;
28483        fn try_from(
28484            value: &::std::string::String,
28485        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28486            value.parse()
28487        }
28488    }
28489    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTransactionRuleAction {
28490        type Error = self::error::ConversionError;
28491        fn try_from(
28492            value: ::std::string::String,
28493        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28494            value.parse()
28495        }
28496    }
28497    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
28498    ///
28499    /// <details><summary>JSON schema</summary>
28500    ///
28501    /// ```json
28502    ///{
28503    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
28504    ///  "examples": [
28505    ///    "signEvmTransaction"
28506    ///  ],
28507    ///  "type": "string",
28508    ///  "enum": [
28509    ///    "signEvmTransaction"
28510    ///  ]
28511    ///}
28512    /// ```
28513    /// </details>
28514    #[derive(
28515        ::serde::Deserialize,
28516        ::serde::Serialize,
28517        Clone,
28518        Copy,
28519        Debug,
28520        Eq,
28521        Hash,
28522        Ord,
28523        PartialEq,
28524        PartialOrd,
28525    )]
28526    pub enum SignEvmTransactionRuleOperation {
28527        #[serde(rename = "signEvmTransaction")]
28528        SignEvmTransaction,
28529    }
28530    impl ::std::convert::From<&Self> for SignEvmTransactionRuleOperation {
28531        fn from(value: &SignEvmTransactionRuleOperation) -> Self {
28532            value.clone()
28533        }
28534    }
28535    impl ::std::fmt::Display for SignEvmTransactionRuleOperation {
28536        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
28537            match *self {
28538                Self::SignEvmTransaction => f.write_str("signEvmTransaction"),
28539            }
28540        }
28541    }
28542    impl ::std::str::FromStr for SignEvmTransactionRuleOperation {
28543        type Err = self::error::ConversionError;
28544        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28545            match value {
28546                "signEvmTransaction" => Ok(Self::SignEvmTransaction),
28547                _ => Err("invalid value".into()),
28548            }
28549        }
28550    }
28551    impl ::std::convert::TryFrom<&str> for SignEvmTransactionRuleOperation {
28552        type Error = self::error::ConversionError;
28553        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28554            value.parse()
28555        }
28556    }
28557    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTransactionRuleOperation {
28558        type Error = self::error::ConversionError;
28559        fn try_from(
28560            value: &::std::string::String,
28561        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28562            value.parse()
28563        }
28564    }
28565    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTransactionRuleOperation {
28566        type Error = self::error::ConversionError;
28567        fn try_from(
28568            value: ::std::string::String,
28569        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28570            value.parse()
28571        }
28572    }
28573    ///`SignEvmTransactionXIdempotencyKey`
28574    ///
28575    /// <details><summary>JSON schema</summary>
28576    ///
28577    /// ```json
28578    ///{
28579    ///  "type": "string",
28580    ///  "maxLength": 36,
28581    ///  "minLength": 36,
28582    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
28583    ///}
28584    /// ```
28585    /// </details>
28586    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
28587    #[serde(transparent)]
28588    pub struct SignEvmTransactionXIdempotencyKey(::std::string::String);
28589    impl ::std::ops::Deref for SignEvmTransactionXIdempotencyKey {
28590        type Target = ::std::string::String;
28591        fn deref(&self) -> &::std::string::String {
28592            &self.0
28593        }
28594    }
28595    impl ::std::convert::From<SignEvmTransactionXIdempotencyKey> for ::std::string::String {
28596        fn from(value: SignEvmTransactionXIdempotencyKey) -> Self {
28597            value.0
28598        }
28599    }
28600    impl ::std::convert::From<&SignEvmTransactionXIdempotencyKey>
28601        for SignEvmTransactionXIdempotencyKey
28602    {
28603        fn from(value: &SignEvmTransactionXIdempotencyKey) -> Self {
28604            value.clone()
28605        }
28606    }
28607    impl ::std::str::FromStr for SignEvmTransactionXIdempotencyKey {
28608        type Err = self::error::ConversionError;
28609        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28610            if value.chars().count() > 36usize {
28611                return Err("longer than 36 characters".into());
28612            }
28613            if value.chars().count() < 36usize {
28614                return Err("shorter than 36 characters".into());
28615            }
28616            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
28617                ::std::sync::LazyLock::new(|| {
28618                    ::regress::Regex::new(
28619                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
28620                    )
28621                    .unwrap()
28622                });
28623            if PATTERN.find(value).is_none() {
28624                return Err(
28625                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
28626                        .into(),
28627                );
28628            }
28629            Ok(Self(value.to_string()))
28630        }
28631    }
28632    impl ::std::convert::TryFrom<&str> for SignEvmTransactionXIdempotencyKey {
28633        type Error = self::error::ConversionError;
28634        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28635            value.parse()
28636        }
28637    }
28638    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTransactionXIdempotencyKey {
28639        type Error = self::error::ConversionError;
28640        fn try_from(
28641            value: &::std::string::String,
28642        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28643            value.parse()
28644        }
28645    }
28646    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTransactionXIdempotencyKey {
28647        type Error = self::error::ConversionError;
28648        fn try_from(
28649            value: ::std::string::String,
28650        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28651            value.parse()
28652        }
28653    }
28654    impl<'de> ::serde::Deserialize<'de> for SignEvmTransactionXIdempotencyKey {
28655        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
28656        where
28657            D: ::serde::Deserializer<'de>,
28658        {
28659            ::std::string::String::deserialize(deserializer)?
28660                .parse()
28661                .map_err(|e: self::error::ConversionError| {
28662                    <D::Error as ::serde::de::Error>::custom(e.to_string())
28663                })
28664        }
28665    }
28666    ///`SignEvmTypedDataAddress`
28667    ///
28668    /// <details><summary>JSON schema</summary>
28669    ///
28670    /// ```json
28671    ///{
28672    ///  "type": "string",
28673    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
28674    ///}
28675    /// ```
28676    /// </details>
28677    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
28678    #[serde(transparent)]
28679    pub struct SignEvmTypedDataAddress(::std::string::String);
28680    impl ::std::ops::Deref for SignEvmTypedDataAddress {
28681        type Target = ::std::string::String;
28682        fn deref(&self) -> &::std::string::String {
28683            &self.0
28684        }
28685    }
28686    impl ::std::convert::From<SignEvmTypedDataAddress> for ::std::string::String {
28687        fn from(value: SignEvmTypedDataAddress) -> Self {
28688            value.0
28689        }
28690    }
28691    impl ::std::convert::From<&SignEvmTypedDataAddress> for SignEvmTypedDataAddress {
28692        fn from(value: &SignEvmTypedDataAddress) -> Self {
28693            value.clone()
28694        }
28695    }
28696    impl ::std::str::FromStr for SignEvmTypedDataAddress {
28697        type Err = self::error::ConversionError;
28698        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28699            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
28700                ::std::sync::LazyLock::new(|| {
28701                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
28702                });
28703            if PATTERN.find(value).is_none() {
28704                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
28705            }
28706            Ok(Self(value.to_string()))
28707        }
28708    }
28709    impl ::std::convert::TryFrom<&str> for SignEvmTypedDataAddress {
28710        type Error = self::error::ConversionError;
28711        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
28712            value.parse()
28713        }
28714    }
28715    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTypedDataAddress {
28716        type Error = self::error::ConversionError;
28717        fn try_from(
28718            value: &::std::string::String,
28719        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28720            value.parse()
28721        }
28722    }
28723    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTypedDataAddress {
28724        type Error = self::error::ConversionError;
28725        fn try_from(
28726            value: ::std::string::String,
28727        ) -> ::std::result::Result<Self, self::error::ConversionError> {
28728            value.parse()
28729        }
28730    }
28731    impl<'de> ::serde::Deserialize<'de> for SignEvmTypedDataAddress {
28732        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
28733        where
28734            D: ::serde::Deserializer<'de>,
28735        {
28736            ::std::string::String::deserialize(deserializer)?
28737                .parse()
28738                .map_err(|e: self::error::ConversionError| {
28739                    <D::Error as ::serde::de::Error>::custom(e.to_string())
28740                })
28741        }
28742    }
28743    ///A schema for specifying criteria for the SignEvmTypedData operation.
28744    ///
28745    /// <details><summary>JSON schema</summary>
28746    ///
28747    /// ```json
28748    ///{
28749    ///  "description": "A schema for specifying criteria for the SignEvmTypedData operation.",
28750    ///  "examples": [
28751    ///    [
28752    ///      {
28753    ///        "conditions": [
28754    ///          {
28755    ///            "addresses": [
28756    ///              "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
28757    ///            ],
28758    ///            "operator": "in",
28759    ///            "path": "to.wallet"
28760    ///          },
28761    ///          {
28762    ///            "operator": ">=",
28763    ///            "path": "to.score",
28764    ///            "value": "50"
28765    ///          },
28766    ///          {
28767    ///            "match": "^hello ([a-z]+)$",
28768    ///            "path": "contents"
28769    ///          }
28770    ///        ],
28771    ///        "type": "evmTypedDataField",
28772    ///        "types": {
28773    ///          "primaryType": "Mail",
28774    ///          "types": {
28775    ///            "Mail": [
28776    ///              {
28777    ///                "name": "from",
28778    ///                "type": "Person"
28779    ///              },
28780    ///              {
28781    ///                "name": "to",
28782    ///                "type": "Person"
28783    ///              },
28784    ///              {
28785    ///                "name": "contents",
28786    ///                "type": "string"
28787    ///              }
28788    ///            ],
28789    ///            "Person": [
28790    ///              {
28791    ///                "name": "name",
28792    ///                "type": "string"
28793    ///              },
28794    ///              {
28795    ///                "name": "wallet",
28796    ///                "type": "address"
28797    ///              },
28798    ///              {
28799    ///                "name": "score",
28800    ///                "type": "uint256"
28801    ///              }
28802    ///            ]
28803    ///          }
28804    ///        }
28805    ///      },
28806    ///      {
28807    ///        "addresses": [
28808    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
28809    ///        ],
28810    ///        "operator": "in",
28811    ///        "type": "evmTypedDataVerifyingContract"
28812    ///      }
28813    ///    ]
28814    ///  ],
28815    ///  "type": "array",
28816    ///  "items": {
28817    ///    "oneOf": [
28818    ///      {
28819    ///        "$ref": "#/components/schemas/SignEvmTypedDataFieldCriterion"
28820    ///      },
28821    ///      {
28822    ///        "$ref": "#/components/schemas/SignEvmTypedDataVerifyingContractCriterion"
28823    ///      }
28824    ///    ]
28825    ///  },
28826    ///  "x-audience": "public"
28827    ///}
28828    /// ```
28829    /// </details>
28830    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28831    #[serde(transparent)]
28832    pub struct SignEvmTypedDataCriteria(pub ::std::vec::Vec<SignEvmTypedDataCriteriaItem>);
28833    impl ::std::ops::Deref for SignEvmTypedDataCriteria {
28834        type Target = ::std::vec::Vec<SignEvmTypedDataCriteriaItem>;
28835        fn deref(&self) -> &::std::vec::Vec<SignEvmTypedDataCriteriaItem> {
28836            &self.0
28837        }
28838    }
28839    impl ::std::convert::From<SignEvmTypedDataCriteria>
28840        for ::std::vec::Vec<SignEvmTypedDataCriteriaItem>
28841    {
28842        fn from(value: SignEvmTypedDataCriteria) -> Self {
28843            value.0
28844        }
28845    }
28846    impl ::std::convert::From<&SignEvmTypedDataCriteria> for SignEvmTypedDataCriteria {
28847        fn from(value: &SignEvmTypedDataCriteria) -> Self {
28848            value.clone()
28849        }
28850    }
28851    impl ::std::convert::From<::std::vec::Vec<SignEvmTypedDataCriteriaItem>>
28852        for SignEvmTypedDataCriteria
28853    {
28854        fn from(value: ::std::vec::Vec<SignEvmTypedDataCriteriaItem>) -> Self {
28855            Self(value)
28856        }
28857    }
28858    ///`SignEvmTypedDataCriteriaItem`
28859    ///
28860    /// <details><summary>JSON schema</summary>
28861    ///
28862    /// ```json
28863    ///{
28864    ///  "oneOf": [
28865    ///    {
28866    ///      "$ref": "#/components/schemas/SignEvmTypedDataFieldCriterion"
28867    ///    },
28868    ///    {
28869    ///      "$ref": "#/components/schemas/SignEvmTypedDataVerifyingContractCriterion"
28870    ///    }
28871    ///  ]
28872    ///}
28873    /// ```
28874    /// </details>
28875    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
28876    #[serde(untagged)]
28877    pub enum SignEvmTypedDataCriteriaItem {
28878        FieldCriterion(SignEvmTypedDataFieldCriterion),
28879        VerifyingContractCriterion(SignEvmTypedDataVerifyingContractCriterion),
28880    }
28881    impl ::std::convert::From<&Self> for SignEvmTypedDataCriteriaItem {
28882        fn from(value: &SignEvmTypedDataCriteriaItem) -> Self {
28883            value.clone()
28884        }
28885    }
28886    impl ::std::convert::From<SignEvmTypedDataFieldCriterion> for SignEvmTypedDataCriteriaItem {
28887        fn from(value: SignEvmTypedDataFieldCriterion) -> Self {
28888            Self::FieldCriterion(value)
28889        }
28890    }
28891    impl ::std::convert::From<SignEvmTypedDataVerifyingContractCriterion>
28892        for SignEvmTypedDataCriteriaItem
28893    {
28894        fn from(value: SignEvmTypedDataVerifyingContractCriterion) -> Self {
28895            Self::VerifyingContractCriterion(value)
28896        }
28897    }
28898    ///`SignEvmTypedDataFieldCriterion`
28899    ///
28900    /// <details><summary>JSON schema</summary>
28901    ///
28902    /// ```json
28903    ///{
28904    ///  "title": "SignEvmTypedDataFieldCriterion",
28905    ///  "type": "object",
28906    ///  "required": [
28907    ///    "conditions",
28908    ///    "type",
28909    ///    "types"
28910    ///  ],
28911    ///  "properties": {
28912    ///    "conditions": {
28913    ///      "description": "A list of conditions to check against the data being signed. Each condition must be met for the rule to take effect.",
28914    ///      "examples": [
28915    ///        [
28916    ///          {
28917    ///            "addresses": [
28918    ///              "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
28919    ///            ],
28920    ///            "operator": "in",
28921    ///            "path": "to.wallet"
28922    ///          },
28923    ///          {
28924    ///            "operator": ">=",
28925    ///            "path": "to.score",
28926    ///            "value": "50"
28927    ///          },
28928    ///          {
28929    ///            "match": "^hello ([a-z]+)$",
28930    ///            "path": "contents"
28931    ///          }
28932    ///        ]
28933    ///      ],
28934    ///      "type": "array",
28935    ///      "items": {
28936    ///        "oneOf": [
28937    ///          {
28938    ///            "$ref": "#/components/schemas/EvmTypedAddressCondition"
28939    ///          },
28940    ///          {
28941    ///            "$ref": "#/components/schemas/EvmTypedNumericalCondition"
28942    ///          },
28943    ///          {
28944    ///            "$ref": "#/components/schemas/EvmTypedStringCondition"
28945    ///          }
28946    ///        ]
28947    ///      }
28948    ///    },
28949    ///    "type": {
28950    ///      "description": "The type of criterion to use. This should be `evmTypedDataField`.",
28951    ///      "examples": [
28952    ///        "evmTypedDataField"
28953    ///      ],
28954    ///      "type": "string",
28955    ///      "enum": [
28956    ///        "evmTypedDataField"
28957    ///      ]
28958    ///    },
28959    ///    "types": {
28960    ///      "description": "An object containing EIP-712 type definitions, as well as a primary type for the root message object.",
28961    ///      "examples": [
28962    ///        {
28963    ///          "primaryType": "Mail",
28964    ///          "types": {
28965    ///            "Mail": [
28966    ///              {
28967    ///                "name": "from",
28968    ///                "type": "Person"
28969    ///              },
28970    ///              {
28971    ///                "name": "to",
28972    ///                "type": "Person"
28973    ///              },
28974    ///              {
28975    ///                "name": "contents",
28976    ///                "type": "string"
28977    ///              }
28978    ///            ],
28979    ///            "Person": [
28980    ///              {
28981    ///                "name": "name",
28982    ///                "type": "string"
28983    ///              },
28984    ///              {
28985    ///                "name": "wallet",
28986    ///                "type": "address"
28987    ///              },
28988    ///              {
28989    ///                "name": "score",
28990    ///                "type": "uint256"
28991    ///              }
28992    ///            ]
28993    ///          }
28994    ///        }
28995    ///      ],
28996    ///      "type": "object",
28997    ///      "required": [
28998    ///        "primaryType",
28999    ///        "types"
29000    ///      ],
29001    ///      "properties": {
29002    ///        "primaryType": {
29003    ///          "description": "The name of the root EIP-712 type. This value must be included in the `types` object.",
29004    ///          "type": "string"
29005    ///        },
29006    ///        "types": {
29007    ///          "description": "EIP-712 compliant map of model names to model definitions.",
29008    ///          "type": "object",
29009    ///          "additionalProperties": {
29010    ///            "description": "Object containing names and types for fields within structured data.",
29011    ///            "type": "array",
29012    ///            "items": {
29013    ///              "type": "object",
29014    ///              "properties": {
29015    ///                "name": {
29016    ///                  "description": "The name of a key within an EIP-712 data structure.",
29017    ///                  "type": "string"
29018    ///                },
29019    ///                "type": {
29020    ///                  "description": "The Solidity type of a value within an EIP-712 data structure.",
29021    ///                  "type": "string"
29022    ///                }
29023    ///              }
29024    ///            }
29025    ///          }
29026    ///        }
29027    ///      }
29028    ///    }
29029    ///  },
29030    ///  "x-audience": "public"
29031    ///}
29032    /// ```
29033    /// </details>
29034    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29035    pub struct SignEvmTypedDataFieldCriterion {
29036        ///A list of conditions to check against the data being signed. Each condition must be met for the rule to take effect.
29037        pub conditions: ::std::vec::Vec<SignEvmTypedDataFieldCriterionConditionsItem>,
29038        ///The type of criterion to use. This should be `evmTypedDataField`.
29039        #[serde(rename = "type")]
29040        pub type_: SignEvmTypedDataFieldCriterionType,
29041        pub types: SignEvmTypedDataFieldCriterionTypes,
29042    }
29043    impl ::std::convert::From<&SignEvmTypedDataFieldCriterion> for SignEvmTypedDataFieldCriterion {
29044        fn from(value: &SignEvmTypedDataFieldCriterion) -> Self {
29045            value.clone()
29046        }
29047    }
29048    impl SignEvmTypedDataFieldCriterion {
29049        pub fn builder() -> builder::SignEvmTypedDataFieldCriterion {
29050            Default::default()
29051        }
29052    }
29053    ///`SignEvmTypedDataFieldCriterionConditionsItem`
29054    ///
29055    /// <details><summary>JSON schema</summary>
29056    ///
29057    /// ```json
29058    ///{
29059    ///  "oneOf": [
29060    ///    {
29061    ///      "$ref": "#/components/schemas/EvmTypedAddressCondition"
29062    ///    },
29063    ///    {
29064    ///      "$ref": "#/components/schemas/EvmTypedNumericalCondition"
29065    ///    },
29066    ///    {
29067    ///      "$ref": "#/components/schemas/EvmTypedStringCondition"
29068    ///    }
29069    ///  ]
29070    ///}
29071    /// ```
29072    /// </details>
29073    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29074    #[serde(untagged)]
29075    pub enum SignEvmTypedDataFieldCriterionConditionsItem {
29076        AddressCondition(EvmTypedAddressCondition),
29077        NumericalCondition(EvmTypedNumericalCondition),
29078        StringCondition(EvmTypedStringCondition),
29079    }
29080    impl ::std::convert::From<&Self> for SignEvmTypedDataFieldCriterionConditionsItem {
29081        fn from(value: &SignEvmTypedDataFieldCriterionConditionsItem) -> Self {
29082            value.clone()
29083        }
29084    }
29085    impl ::std::convert::From<EvmTypedAddressCondition>
29086        for SignEvmTypedDataFieldCriterionConditionsItem
29087    {
29088        fn from(value: EvmTypedAddressCondition) -> Self {
29089            Self::AddressCondition(value)
29090        }
29091    }
29092    impl ::std::convert::From<EvmTypedNumericalCondition>
29093        for SignEvmTypedDataFieldCriterionConditionsItem
29094    {
29095        fn from(value: EvmTypedNumericalCondition) -> Self {
29096            Self::NumericalCondition(value)
29097        }
29098    }
29099    impl ::std::convert::From<EvmTypedStringCondition>
29100        for SignEvmTypedDataFieldCriterionConditionsItem
29101    {
29102        fn from(value: EvmTypedStringCondition) -> Self {
29103            Self::StringCondition(value)
29104        }
29105    }
29106    ///The type of criterion to use. This should be `evmTypedDataField`.
29107    ///
29108    /// <details><summary>JSON schema</summary>
29109    ///
29110    /// ```json
29111    ///{
29112    ///  "description": "The type of criterion to use. This should be `evmTypedDataField`.",
29113    ///  "examples": [
29114    ///    "evmTypedDataField"
29115    ///  ],
29116    ///  "type": "string",
29117    ///  "enum": [
29118    ///    "evmTypedDataField"
29119    ///  ]
29120    ///}
29121    /// ```
29122    /// </details>
29123    #[derive(
29124        ::serde::Deserialize,
29125        ::serde::Serialize,
29126        Clone,
29127        Copy,
29128        Debug,
29129        Eq,
29130        Hash,
29131        Ord,
29132        PartialEq,
29133        PartialOrd,
29134    )]
29135    pub enum SignEvmTypedDataFieldCriterionType {
29136        #[serde(rename = "evmTypedDataField")]
29137        EvmTypedDataField,
29138    }
29139    impl ::std::convert::From<&Self> for SignEvmTypedDataFieldCriterionType {
29140        fn from(value: &SignEvmTypedDataFieldCriterionType) -> Self {
29141            value.clone()
29142        }
29143    }
29144    impl ::std::fmt::Display for SignEvmTypedDataFieldCriterionType {
29145        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29146            match *self {
29147                Self::EvmTypedDataField => f.write_str("evmTypedDataField"),
29148            }
29149        }
29150    }
29151    impl ::std::str::FromStr for SignEvmTypedDataFieldCriterionType {
29152        type Err = self::error::ConversionError;
29153        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29154            match value {
29155                "evmTypedDataField" => Ok(Self::EvmTypedDataField),
29156                _ => Err("invalid value".into()),
29157            }
29158        }
29159    }
29160    impl ::std::convert::TryFrom<&str> for SignEvmTypedDataFieldCriterionType {
29161        type Error = self::error::ConversionError;
29162        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29163            value.parse()
29164        }
29165    }
29166    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTypedDataFieldCriterionType {
29167        type Error = self::error::ConversionError;
29168        fn try_from(
29169            value: &::std::string::String,
29170        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29171            value.parse()
29172        }
29173    }
29174    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTypedDataFieldCriterionType {
29175        type Error = self::error::ConversionError;
29176        fn try_from(
29177            value: ::std::string::String,
29178        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29179            value.parse()
29180        }
29181    }
29182    ///An object containing EIP-712 type definitions, as well as a primary type for the root message object.
29183    ///
29184    /// <details><summary>JSON schema</summary>
29185    ///
29186    /// ```json
29187    ///{
29188    ///  "description": "An object containing EIP-712 type definitions, as well as a primary type for the root message object.",
29189    ///  "examples": [
29190    ///    {
29191    ///      "primaryType": "Mail",
29192    ///      "types": {
29193    ///        "Mail": [
29194    ///          {
29195    ///            "name": "from",
29196    ///            "type": "Person"
29197    ///          },
29198    ///          {
29199    ///            "name": "to",
29200    ///            "type": "Person"
29201    ///          },
29202    ///          {
29203    ///            "name": "contents",
29204    ///            "type": "string"
29205    ///          }
29206    ///        ],
29207    ///        "Person": [
29208    ///          {
29209    ///            "name": "name",
29210    ///            "type": "string"
29211    ///          },
29212    ///          {
29213    ///            "name": "wallet",
29214    ///            "type": "address"
29215    ///          },
29216    ///          {
29217    ///            "name": "score",
29218    ///            "type": "uint256"
29219    ///          }
29220    ///        ]
29221    ///      }
29222    ///    }
29223    ///  ],
29224    ///  "type": "object",
29225    ///  "required": [
29226    ///    "primaryType",
29227    ///    "types"
29228    ///  ],
29229    ///  "properties": {
29230    ///    "primaryType": {
29231    ///      "description": "The name of the root EIP-712 type. This value must be included in the `types` object.",
29232    ///      "type": "string"
29233    ///    },
29234    ///    "types": {
29235    ///      "description": "EIP-712 compliant map of model names to model definitions.",
29236    ///      "type": "object",
29237    ///      "additionalProperties": {
29238    ///        "description": "Object containing names and types for fields within structured data.",
29239    ///        "type": "array",
29240    ///        "items": {
29241    ///          "type": "object",
29242    ///          "properties": {
29243    ///            "name": {
29244    ///              "description": "The name of a key within an EIP-712 data structure.",
29245    ///              "type": "string"
29246    ///            },
29247    ///            "type": {
29248    ///              "description": "The Solidity type of a value within an EIP-712 data structure.",
29249    ///              "type": "string"
29250    ///            }
29251    ///          }
29252    ///        }
29253    ///      }
29254    ///    }
29255    ///  }
29256    ///}
29257    /// ```
29258    /// </details>
29259    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29260    pub struct SignEvmTypedDataFieldCriterionTypes {
29261        ///The name of the root EIP-712 type. This value must be included in the `types` object.
29262        #[serde(rename = "primaryType")]
29263        pub primary_type: ::std::string::String,
29264        ///EIP-712 compliant map of model names to model definitions.
29265        pub types: ::std::collections::HashMap<
29266            ::std::string::String,
29267            ::std::vec::Vec<SignEvmTypedDataFieldCriterionTypesTypesValueItem>,
29268        >,
29269    }
29270    impl ::std::convert::From<&SignEvmTypedDataFieldCriterionTypes>
29271        for SignEvmTypedDataFieldCriterionTypes
29272    {
29273        fn from(value: &SignEvmTypedDataFieldCriterionTypes) -> Self {
29274            value.clone()
29275        }
29276    }
29277    impl SignEvmTypedDataFieldCriterionTypes {
29278        pub fn builder() -> builder::SignEvmTypedDataFieldCriterionTypes {
29279            Default::default()
29280        }
29281    }
29282    ///`SignEvmTypedDataFieldCriterionTypesTypesValueItem`
29283    ///
29284    /// <details><summary>JSON schema</summary>
29285    ///
29286    /// ```json
29287    ///{
29288    ///  "type": "object",
29289    ///  "properties": {
29290    ///    "name": {
29291    ///      "description": "The name of a key within an EIP-712 data structure.",
29292    ///      "type": "string"
29293    ///    },
29294    ///    "type": {
29295    ///      "description": "The Solidity type of a value within an EIP-712 data structure.",
29296    ///      "type": "string"
29297    ///    }
29298    ///  }
29299    ///}
29300    /// ```
29301    /// </details>
29302    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29303    pub struct SignEvmTypedDataFieldCriterionTypesTypesValueItem {
29304        ///The name of a key within an EIP-712 data structure.
29305        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
29306        pub name: ::std::option::Option<::std::string::String>,
29307        ///The Solidity type of a value within an EIP-712 data structure.
29308        #[serde(
29309            rename = "type",
29310            default,
29311            skip_serializing_if = "::std::option::Option::is_none"
29312        )]
29313        pub type_: ::std::option::Option<::std::string::String>,
29314    }
29315    impl ::std::convert::From<&SignEvmTypedDataFieldCriterionTypesTypesValueItem>
29316        for SignEvmTypedDataFieldCriterionTypesTypesValueItem
29317    {
29318        fn from(value: &SignEvmTypedDataFieldCriterionTypesTypesValueItem) -> Self {
29319            value.clone()
29320        }
29321    }
29322    impl ::std::default::Default for SignEvmTypedDataFieldCriterionTypesTypesValueItem {
29323        fn default() -> Self {
29324            Self {
29325                name: Default::default(),
29326                type_: Default::default(),
29327            }
29328        }
29329    }
29330    impl SignEvmTypedDataFieldCriterionTypesTypesValueItem {
29331        pub fn builder() -> builder::SignEvmTypedDataFieldCriterionTypesTypesValueItem {
29332            Default::default()
29333        }
29334    }
29335    ///`SignEvmTypedDataResponse`
29336    ///
29337    /// <details><summary>JSON schema</summary>
29338    ///
29339    /// ```json
29340    ///{
29341    ///  "type": "object",
29342    ///  "required": [
29343    ///    "signature"
29344    ///  ],
29345    ///  "properties": {
29346    ///    "signature": {
29347    ///      "description": "The signature of the typed data, as a 0x-prefixed hex string.",
29348    ///      "examples": [
29349    ///        "0x1b0c9cf8cd4554c6c6d9e7311e88f1be075d7f25b418a044f4bf2c0a42a93e212ad0a8b54de9e0b5f7e3812de3f2c6cc79aa8c3e1c02e7ad14b4a8f42012c2c01b"
29350    ///      ],
29351    ///      "type": "string"
29352    ///    }
29353    ///  }
29354    ///}
29355    /// ```
29356    /// </details>
29357    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29358    pub struct SignEvmTypedDataResponse {
29359        ///The signature of the typed data, as a 0x-prefixed hex string.
29360        pub signature: ::std::string::String,
29361    }
29362    impl ::std::convert::From<&SignEvmTypedDataResponse> for SignEvmTypedDataResponse {
29363        fn from(value: &SignEvmTypedDataResponse) -> Self {
29364            value.clone()
29365        }
29366    }
29367    impl SignEvmTypedDataResponse {
29368        pub fn builder() -> builder::SignEvmTypedDataResponse {
29369            Default::default()
29370        }
29371    }
29372    ///`SignEvmTypedDataRule`
29373    ///
29374    /// <details><summary>JSON schema</summary>
29375    ///
29376    /// ```json
29377    ///{
29378    ///  "title": "SignEvmTypedDataRule",
29379    ///  "required": [
29380    ///    "action",
29381    ///    "criteria",
29382    ///    "operation"
29383    ///  ],
29384    ///  "properties": {
29385    ///    "action": {
29386    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
29387    ///      "examples": [
29388    ///        "accept"
29389    ///      ],
29390    ///      "type": "string",
29391    ///      "enum": [
29392    ///        "reject",
29393    ///        "accept"
29394    ///      ]
29395    ///    },
29396    ///    "criteria": {
29397    ///      "$ref": "#/components/schemas/SignEvmTypedDataCriteria"
29398    ///    },
29399    ///    "operation": {
29400    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
29401    ///      "examples": [
29402    ///        "signEvmTypedData"
29403    ///      ],
29404    ///      "type": "string",
29405    ///      "enum": [
29406    ///        "signEvmTypedData"
29407    ///      ]
29408    ///    }
29409    ///  },
29410    ///  "x-audience": "public"
29411    ///}
29412    /// ```
29413    /// </details>
29414    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29415    pub struct SignEvmTypedDataRule {
29416        ///Whether matching the rule will cause the request to be rejected or accepted.
29417        pub action: SignEvmTypedDataRuleAction,
29418        pub criteria: SignEvmTypedDataCriteria,
29419        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
29420        pub operation: SignEvmTypedDataRuleOperation,
29421    }
29422    impl ::std::convert::From<&SignEvmTypedDataRule> for SignEvmTypedDataRule {
29423        fn from(value: &SignEvmTypedDataRule) -> Self {
29424            value.clone()
29425        }
29426    }
29427    impl SignEvmTypedDataRule {
29428        pub fn builder() -> builder::SignEvmTypedDataRule {
29429            Default::default()
29430        }
29431    }
29432    ///Whether matching the rule will cause the request to be rejected or accepted.
29433    ///
29434    /// <details><summary>JSON schema</summary>
29435    ///
29436    /// ```json
29437    ///{
29438    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
29439    ///  "examples": [
29440    ///    "accept"
29441    ///  ],
29442    ///  "type": "string",
29443    ///  "enum": [
29444    ///    "reject",
29445    ///    "accept"
29446    ///  ]
29447    ///}
29448    /// ```
29449    /// </details>
29450    #[derive(
29451        ::serde::Deserialize,
29452        ::serde::Serialize,
29453        Clone,
29454        Copy,
29455        Debug,
29456        Eq,
29457        Hash,
29458        Ord,
29459        PartialEq,
29460        PartialOrd,
29461    )]
29462    pub enum SignEvmTypedDataRuleAction {
29463        #[serde(rename = "reject")]
29464        Reject,
29465        #[serde(rename = "accept")]
29466        Accept,
29467    }
29468    impl ::std::convert::From<&Self> for SignEvmTypedDataRuleAction {
29469        fn from(value: &SignEvmTypedDataRuleAction) -> Self {
29470            value.clone()
29471        }
29472    }
29473    impl ::std::fmt::Display for SignEvmTypedDataRuleAction {
29474        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29475            match *self {
29476                Self::Reject => f.write_str("reject"),
29477                Self::Accept => f.write_str("accept"),
29478            }
29479        }
29480    }
29481    impl ::std::str::FromStr for SignEvmTypedDataRuleAction {
29482        type Err = self::error::ConversionError;
29483        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29484            match value {
29485                "reject" => Ok(Self::Reject),
29486                "accept" => Ok(Self::Accept),
29487                _ => Err("invalid value".into()),
29488            }
29489        }
29490    }
29491    impl ::std::convert::TryFrom<&str> for SignEvmTypedDataRuleAction {
29492        type Error = self::error::ConversionError;
29493        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29494            value.parse()
29495        }
29496    }
29497    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTypedDataRuleAction {
29498        type Error = self::error::ConversionError;
29499        fn try_from(
29500            value: &::std::string::String,
29501        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29502            value.parse()
29503        }
29504    }
29505    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTypedDataRuleAction {
29506        type Error = self::error::ConversionError;
29507        fn try_from(
29508            value: ::std::string::String,
29509        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29510            value.parse()
29511        }
29512    }
29513    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
29514    ///
29515    /// <details><summary>JSON schema</summary>
29516    ///
29517    /// ```json
29518    ///{
29519    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
29520    ///  "examples": [
29521    ///    "signEvmTypedData"
29522    ///  ],
29523    ///  "type": "string",
29524    ///  "enum": [
29525    ///    "signEvmTypedData"
29526    ///  ]
29527    ///}
29528    /// ```
29529    /// </details>
29530    #[derive(
29531        ::serde::Deserialize,
29532        ::serde::Serialize,
29533        Clone,
29534        Copy,
29535        Debug,
29536        Eq,
29537        Hash,
29538        Ord,
29539        PartialEq,
29540        PartialOrd,
29541    )]
29542    pub enum SignEvmTypedDataRuleOperation {
29543        #[serde(rename = "signEvmTypedData")]
29544        SignEvmTypedData,
29545    }
29546    impl ::std::convert::From<&Self> for SignEvmTypedDataRuleOperation {
29547        fn from(value: &SignEvmTypedDataRuleOperation) -> Self {
29548            value.clone()
29549        }
29550    }
29551    impl ::std::fmt::Display for SignEvmTypedDataRuleOperation {
29552        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29553            match *self {
29554                Self::SignEvmTypedData => f.write_str("signEvmTypedData"),
29555            }
29556        }
29557    }
29558    impl ::std::str::FromStr for SignEvmTypedDataRuleOperation {
29559        type Err = self::error::ConversionError;
29560        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29561            match value {
29562                "signEvmTypedData" => Ok(Self::SignEvmTypedData),
29563                _ => Err("invalid value".into()),
29564            }
29565        }
29566    }
29567    impl ::std::convert::TryFrom<&str> for SignEvmTypedDataRuleOperation {
29568        type Error = self::error::ConversionError;
29569        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29570            value.parse()
29571        }
29572    }
29573    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTypedDataRuleOperation {
29574        type Error = self::error::ConversionError;
29575        fn try_from(
29576            value: &::std::string::String,
29577        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29578            value.parse()
29579        }
29580    }
29581    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTypedDataRuleOperation {
29582        type Error = self::error::ConversionError;
29583        fn try_from(
29584            value: ::std::string::String,
29585        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29586            value.parse()
29587        }
29588    }
29589    ///A schema for specifying criterion for a domain's verifying contract.
29590    ///
29591    /// <details><summary>JSON schema</summary>
29592    ///
29593    /// ```json
29594    ///{
29595    ///  "title": "SignEvmTypedDataVerifyingContractCriterion",
29596    ///  "description": "A schema for specifying criterion for a domain's verifying contract.",
29597    ///  "type": "object",
29598    ///  "required": [
29599    ///    "addresses",
29600    ///    "operator",
29601    ///    "type"
29602    ///  ],
29603    ///  "properties": {
29604    ///    "addresses": {
29605    ///      "description": "A list of 0x-prefixed EVM addresses that the domain's verifying contract should be compared to. There is a limit of 300 addresses per criterion.",
29606    ///      "examples": [
29607    ///        [
29608    ///          "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
29609    ///          "0x1234567890123456789012345678901234567890"
29610    ///        ]
29611    ///      ],
29612    ///      "type": "array",
29613    ///      "items": {
29614    ///        "description": "The 0x-prefixed EVM address that the domain's verifying contract should be compared to.",
29615    ///        "type": "string",
29616    ///        "pattern": "^0x[0-9a-fA-F]{40}$"
29617    ///      }
29618    ///    },
29619    ///    "operator": {
29620    ///      "description": "The operator to use for the comparison. The domain's verifying contract will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
29621    ///      "examples": [
29622    ///        "in"
29623    ///      ],
29624    ///      "type": "string",
29625    ///      "enum": [
29626    ///        "in",
29627    ///        "not in"
29628    ///      ]
29629    ///    },
29630    ///    "type": {
29631    ///      "description": "The type of criterion to use. This should be `evmTypedDataVerifyingContract`.",
29632    ///      "examples": [
29633    ///        "evmTypedDataVerifyingContract"
29634    ///      ],
29635    ///      "type": "string",
29636    ///      "enum": [
29637    ///        "evmTypedDataVerifyingContract"
29638    ///      ]
29639    ///    }
29640    ///  },
29641    ///  "x-audience": "public"
29642    ///}
29643    /// ```
29644    /// </details>
29645    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
29646    pub struct SignEvmTypedDataVerifyingContractCriterion {
29647        ///A list of 0x-prefixed EVM addresses that the domain's verifying contract should be compared to. There is a limit of 300 addresses per criterion.
29648        pub addresses: ::std::vec::Vec<SignEvmTypedDataVerifyingContractCriterionAddressesItem>,
29649        ///The operator to use for the comparison. The domain's verifying contract will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
29650        pub operator: SignEvmTypedDataVerifyingContractCriterionOperator,
29651        ///The type of criterion to use. This should be `evmTypedDataVerifyingContract`.
29652        #[serde(rename = "type")]
29653        pub type_: SignEvmTypedDataVerifyingContractCriterionType,
29654    }
29655    impl ::std::convert::From<&SignEvmTypedDataVerifyingContractCriterion>
29656        for SignEvmTypedDataVerifyingContractCriterion
29657    {
29658        fn from(value: &SignEvmTypedDataVerifyingContractCriterion) -> Self {
29659            value.clone()
29660        }
29661    }
29662    impl SignEvmTypedDataVerifyingContractCriterion {
29663        pub fn builder() -> builder::SignEvmTypedDataVerifyingContractCriterion {
29664            Default::default()
29665        }
29666    }
29667    ///The 0x-prefixed EVM address that the domain's verifying contract should be compared to.
29668    ///
29669    /// <details><summary>JSON schema</summary>
29670    ///
29671    /// ```json
29672    ///{
29673    ///  "description": "The 0x-prefixed EVM address that the domain's verifying contract should be compared to.",
29674    ///  "type": "string",
29675    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
29676    ///}
29677    /// ```
29678    /// </details>
29679    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29680    #[serde(transparent)]
29681    pub struct SignEvmTypedDataVerifyingContractCriterionAddressesItem(::std::string::String);
29682    impl ::std::ops::Deref for SignEvmTypedDataVerifyingContractCriterionAddressesItem {
29683        type Target = ::std::string::String;
29684        fn deref(&self) -> &::std::string::String {
29685            &self.0
29686        }
29687    }
29688    impl ::std::convert::From<SignEvmTypedDataVerifyingContractCriterionAddressesItem>
29689        for ::std::string::String
29690    {
29691        fn from(value: SignEvmTypedDataVerifyingContractCriterionAddressesItem) -> Self {
29692            value.0
29693        }
29694    }
29695    impl ::std::convert::From<&SignEvmTypedDataVerifyingContractCriterionAddressesItem>
29696        for SignEvmTypedDataVerifyingContractCriterionAddressesItem
29697    {
29698        fn from(value: &SignEvmTypedDataVerifyingContractCriterionAddressesItem) -> Self {
29699            value.clone()
29700        }
29701    }
29702    impl ::std::str::FromStr for SignEvmTypedDataVerifyingContractCriterionAddressesItem {
29703        type Err = self::error::ConversionError;
29704        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29705            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
29706                ::std::sync::LazyLock::new(|| {
29707                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
29708                });
29709            if PATTERN.find(value).is_none() {
29710                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
29711            }
29712            Ok(Self(value.to_string()))
29713        }
29714    }
29715    impl ::std::convert::TryFrom<&str> for SignEvmTypedDataVerifyingContractCriterionAddressesItem {
29716        type Error = self::error::ConversionError;
29717        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29718            value.parse()
29719        }
29720    }
29721    impl ::std::convert::TryFrom<&::std::string::String>
29722        for SignEvmTypedDataVerifyingContractCriterionAddressesItem
29723    {
29724        type Error = self::error::ConversionError;
29725        fn try_from(
29726            value: &::std::string::String,
29727        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29728            value.parse()
29729        }
29730    }
29731    impl ::std::convert::TryFrom<::std::string::String>
29732        for SignEvmTypedDataVerifyingContractCriterionAddressesItem
29733    {
29734        type Error = self::error::ConversionError;
29735        fn try_from(
29736            value: ::std::string::String,
29737        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29738            value.parse()
29739        }
29740    }
29741    impl<'de> ::serde::Deserialize<'de> for SignEvmTypedDataVerifyingContractCriterionAddressesItem {
29742        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
29743        where
29744            D: ::serde::Deserializer<'de>,
29745        {
29746            ::std::string::String::deserialize(deserializer)?
29747                .parse()
29748                .map_err(|e: self::error::ConversionError| {
29749                    <D::Error as ::serde::de::Error>::custom(e.to_string())
29750                })
29751        }
29752    }
29753    ///The operator to use for the comparison. The domain's verifying contract will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
29754    ///
29755    /// <details><summary>JSON schema</summary>
29756    ///
29757    /// ```json
29758    ///{
29759    ///  "description": "The operator to use for the comparison. The domain's verifying contract will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
29760    ///  "examples": [
29761    ///    "in"
29762    ///  ],
29763    ///  "type": "string",
29764    ///  "enum": [
29765    ///    "in",
29766    ///    "not in"
29767    ///  ]
29768    ///}
29769    /// ```
29770    /// </details>
29771    #[derive(
29772        ::serde::Deserialize,
29773        ::serde::Serialize,
29774        Clone,
29775        Copy,
29776        Debug,
29777        Eq,
29778        Hash,
29779        Ord,
29780        PartialEq,
29781        PartialOrd,
29782    )]
29783    pub enum SignEvmTypedDataVerifyingContractCriterionOperator {
29784        #[serde(rename = "in")]
29785        In,
29786        #[serde(rename = "not in")]
29787        NotIn,
29788    }
29789    impl ::std::convert::From<&Self> for SignEvmTypedDataVerifyingContractCriterionOperator {
29790        fn from(value: &SignEvmTypedDataVerifyingContractCriterionOperator) -> Self {
29791            value.clone()
29792        }
29793    }
29794    impl ::std::fmt::Display for SignEvmTypedDataVerifyingContractCriterionOperator {
29795        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29796            match *self {
29797                Self::In => f.write_str("in"),
29798                Self::NotIn => f.write_str("not in"),
29799            }
29800        }
29801    }
29802    impl ::std::str::FromStr for SignEvmTypedDataVerifyingContractCriterionOperator {
29803        type Err = self::error::ConversionError;
29804        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29805            match value {
29806                "in" => Ok(Self::In),
29807                "not in" => Ok(Self::NotIn),
29808                _ => Err("invalid value".into()),
29809            }
29810        }
29811    }
29812    impl ::std::convert::TryFrom<&str> for SignEvmTypedDataVerifyingContractCriterionOperator {
29813        type Error = self::error::ConversionError;
29814        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29815            value.parse()
29816        }
29817    }
29818    impl ::std::convert::TryFrom<&::std::string::String>
29819        for SignEvmTypedDataVerifyingContractCriterionOperator
29820    {
29821        type Error = self::error::ConversionError;
29822        fn try_from(
29823            value: &::std::string::String,
29824        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29825            value.parse()
29826        }
29827    }
29828    impl ::std::convert::TryFrom<::std::string::String>
29829        for SignEvmTypedDataVerifyingContractCriterionOperator
29830    {
29831        type Error = self::error::ConversionError;
29832        fn try_from(
29833            value: ::std::string::String,
29834        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29835            value.parse()
29836        }
29837    }
29838    ///The type of criterion to use. This should be `evmTypedDataVerifyingContract`.
29839    ///
29840    /// <details><summary>JSON schema</summary>
29841    ///
29842    /// ```json
29843    ///{
29844    ///  "description": "The type of criterion to use. This should be `evmTypedDataVerifyingContract`.",
29845    ///  "examples": [
29846    ///    "evmTypedDataVerifyingContract"
29847    ///  ],
29848    ///  "type": "string",
29849    ///  "enum": [
29850    ///    "evmTypedDataVerifyingContract"
29851    ///  ]
29852    ///}
29853    /// ```
29854    /// </details>
29855    #[derive(
29856        ::serde::Deserialize,
29857        ::serde::Serialize,
29858        Clone,
29859        Copy,
29860        Debug,
29861        Eq,
29862        Hash,
29863        Ord,
29864        PartialEq,
29865        PartialOrd,
29866    )]
29867    pub enum SignEvmTypedDataVerifyingContractCriterionType {
29868        #[serde(rename = "evmTypedDataVerifyingContract")]
29869        EvmTypedDataVerifyingContract,
29870    }
29871    impl ::std::convert::From<&Self> for SignEvmTypedDataVerifyingContractCriterionType {
29872        fn from(value: &SignEvmTypedDataVerifyingContractCriterionType) -> Self {
29873            value.clone()
29874        }
29875    }
29876    impl ::std::fmt::Display for SignEvmTypedDataVerifyingContractCriterionType {
29877        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29878            match *self {
29879                Self::EvmTypedDataVerifyingContract => f.write_str("evmTypedDataVerifyingContract"),
29880            }
29881        }
29882    }
29883    impl ::std::str::FromStr for SignEvmTypedDataVerifyingContractCriterionType {
29884        type Err = self::error::ConversionError;
29885        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29886            match value {
29887                "evmTypedDataVerifyingContract" => Ok(Self::EvmTypedDataVerifyingContract),
29888                _ => Err("invalid value".into()),
29889            }
29890        }
29891    }
29892    impl ::std::convert::TryFrom<&str> for SignEvmTypedDataVerifyingContractCriterionType {
29893        type Error = self::error::ConversionError;
29894        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29895            value.parse()
29896        }
29897    }
29898    impl ::std::convert::TryFrom<&::std::string::String>
29899        for SignEvmTypedDataVerifyingContractCriterionType
29900    {
29901        type Error = self::error::ConversionError;
29902        fn try_from(
29903            value: &::std::string::String,
29904        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29905            value.parse()
29906        }
29907    }
29908    impl ::std::convert::TryFrom<::std::string::String>
29909        for SignEvmTypedDataVerifyingContractCriterionType
29910    {
29911        type Error = self::error::ConversionError;
29912        fn try_from(
29913            value: ::std::string::String,
29914        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29915            value.parse()
29916        }
29917    }
29918    ///`SignEvmTypedDataXIdempotencyKey`
29919    ///
29920    /// <details><summary>JSON schema</summary>
29921    ///
29922    /// ```json
29923    ///{
29924    ///  "type": "string",
29925    ///  "maxLength": 36,
29926    ///  "minLength": 36,
29927    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
29928    ///}
29929    /// ```
29930    /// </details>
29931    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
29932    #[serde(transparent)]
29933    pub struct SignEvmTypedDataXIdempotencyKey(::std::string::String);
29934    impl ::std::ops::Deref for SignEvmTypedDataXIdempotencyKey {
29935        type Target = ::std::string::String;
29936        fn deref(&self) -> &::std::string::String {
29937            &self.0
29938        }
29939    }
29940    impl ::std::convert::From<SignEvmTypedDataXIdempotencyKey> for ::std::string::String {
29941        fn from(value: SignEvmTypedDataXIdempotencyKey) -> Self {
29942            value.0
29943        }
29944    }
29945    impl ::std::convert::From<&SignEvmTypedDataXIdempotencyKey> for SignEvmTypedDataXIdempotencyKey {
29946        fn from(value: &SignEvmTypedDataXIdempotencyKey) -> Self {
29947            value.clone()
29948        }
29949    }
29950    impl ::std::str::FromStr for SignEvmTypedDataXIdempotencyKey {
29951        type Err = self::error::ConversionError;
29952        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29953            if value.chars().count() > 36usize {
29954                return Err("longer than 36 characters".into());
29955            }
29956            if value.chars().count() < 36usize {
29957                return Err("shorter than 36 characters".into());
29958            }
29959            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
29960                ::std::sync::LazyLock::new(|| {
29961                    ::regress::Regex::new(
29962                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
29963                    )
29964                    .unwrap()
29965                });
29966            if PATTERN.find(value).is_none() {
29967                return Err(
29968                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
29969                        .into(),
29970                );
29971            }
29972            Ok(Self(value.to_string()))
29973        }
29974    }
29975    impl ::std::convert::TryFrom<&str> for SignEvmTypedDataXIdempotencyKey {
29976        type Error = self::error::ConversionError;
29977        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
29978            value.parse()
29979        }
29980    }
29981    impl ::std::convert::TryFrom<&::std::string::String> for SignEvmTypedDataXIdempotencyKey {
29982        type Error = self::error::ConversionError;
29983        fn try_from(
29984            value: &::std::string::String,
29985        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29986            value.parse()
29987        }
29988    }
29989    impl ::std::convert::TryFrom<::std::string::String> for SignEvmTypedDataXIdempotencyKey {
29990        type Error = self::error::ConversionError;
29991        fn try_from(
29992            value: ::std::string::String,
29993        ) -> ::std::result::Result<Self, self::error::ConversionError> {
29994            value.parse()
29995        }
29996    }
29997    impl<'de> ::serde::Deserialize<'de> for SignEvmTypedDataXIdempotencyKey {
29998        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
29999        where
30000            D: ::serde::Deserializer<'de>,
30001        {
30002            ::std::string::String::deserialize(deserializer)?
30003                .parse()
30004                .map_err(|e: self::error::ConversionError| {
30005                    <D::Error as ::serde::de::Error>::custom(e.to_string())
30006                })
30007        }
30008    }
30009    ///A schema for specifying criteria for the SignSolMessage operation.
30010    ///
30011    /// <details><summary>JSON schema</summary>
30012    ///
30013    /// ```json
30014    ///{
30015    ///  "description": "A schema for specifying criteria for the SignSolMessage operation.",
30016    ///  "examples": [
30017    ///    [
30018    ///      {
30019    ///        "match": "^hello ([a-z]+)$",
30020    ///        "type": "solMessage"
30021    ///      }
30022    ///    ]
30023    ///  ],
30024    ///  "type": "array",
30025    ///  "items": {
30026    ///    "oneOf": [
30027    ///      {
30028    ///        "$ref": "#/components/schemas/SolMessageCriterion"
30029    ///      }
30030    ///    ]
30031    ///  },
30032    ///  "x-audience": "public"
30033    ///}
30034    /// ```
30035    /// </details>
30036    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30037    #[serde(transparent)]
30038    pub struct SignSolMessageCriteria(pub ::std::vec::Vec<SolMessageCriterion>);
30039    impl ::std::ops::Deref for SignSolMessageCriteria {
30040        type Target = ::std::vec::Vec<SolMessageCriterion>;
30041        fn deref(&self) -> &::std::vec::Vec<SolMessageCriterion> {
30042            &self.0
30043        }
30044    }
30045    impl ::std::convert::From<SignSolMessageCriteria> for ::std::vec::Vec<SolMessageCriterion> {
30046        fn from(value: SignSolMessageCriteria) -> Self {
30047            value.0
30048        }
30049    }
30050    impl ::std::convert::From<&SignSolMessageCriteria> for SignSolMessageCriteria {
30051        fn from(value: &SignSolMessageCriteria) -> Self {
30052            value.clone()
30053        }
30054    }
30055    impl ::std::convert::From<::std::vec::Vec<SolMessageCriterion>> for SignSolMessageCriteria {
30056        fn from(value: ::std::vec::Vec<SolMessageCriterion>) -> Self {
30057            Self(value)
30058        }
30059    }
30060    ///`SignSolMessageRule`
30061    ///
30062    /// <details><summary>JSON schema</summary>
30063    ///
30064    /// ```json
30065    ///{
30066    ///  "title": "SignSolMessageRule",
30067    ///  "required": [
30068    ///    "action",
30069    ///    "criteria",
30070    ///    "operation"
30071    ///  ],
30072    ///  "properties": {
30073    ///    "action": {
30074    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
30075    ///      "examples": [
30076    ///        "accept"
30077    ///      ],
30078    ///      "type": "string",
30079    ///      "enum": [
30080    ///        "reject",
30081    ///        "accept"
30082    ///      ]
30083    ///    },
30084    ///    "criteria": {
30085    ///      "$ref": "#/components/schemas/SignSolMessageCriteria"
30086    ///    },
30087    ///    "operation": {
30088    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
30089    ///      "examples": [
30090    ///        "signSolMessage"
30091    ///      ],
30092    ///      "type": "string",
30093    ///      "enum": [
30094    ///        "signSolMessage"
30095    ///      ]
30096    ///    }
30097    ///  },
30098    ///  "x-audience": "public"
30099    ///}
30100    /// ```
30101    /// </details>
30102    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30103    pub struct SignSolMessageRule {
30104        ///Whether matching the rule will cause the request to be rejected or accepted.
30105        pub action: SignSolMessageRuleAction,
30106        pub criteria: SignSolMessageCriteria,
30107        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
30108        pub operation: SignSolMessageRuleOperation,
30109    }
30110    impl ::std::convert::From<&SignSolMessageRule> for SignSolMessageRule {
30111        fn from(value: &SignSolMessageRule) -> Self {
30112            value.clone()
30113        }
30114    }
30115    impl SignSolMessageRule {
30116        pub fn builder() -> builder::SignSolMessageRule {
30117            Default::default()
30118        }
30119    }
30120    ///Whether matching the rule will cause the request to be rejected or accepted.
30121    ///
30122    /// <details><summary>JSON schema</summary>
30123    ///
30124    /// ```json
30125    ///{
30126    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
30127    ///  "examples": [
30128    ///    "accept"
30129    ///  ],
30130    ///  "type": "string",
30131    ///  "enum": [
30132    ///    "reject",
30133    ///    "accept"
30134    ///  ]
30135    ///}
30136    /// ```
30137    /// </details>
30138    #[derive(
30139        ::serde::Deserialize,
30140        ::serde::Serialize,
30141        Clone,
30142        Copy,
30143        Debug,
30144        Eq,
30145        Hash,
30146        Ord,
30147        PartialEq,
30148        PartialOrd,
30149    )]
30150    pub enum SignSolMessageRuleAction {
30151        #[serde(rename = "reject")]
30152        Reject,
30153        #[serde(rename = "accept")]
30154        Accept,
30155    }
30156    impl ::std::convert::From<&Self> for SignSolMessageRuleAction {
30157        fn from(value: &SignSolMessageRuleAction) -> Self {
30158            value.clone()
30159        }
30160    }
30161    impl ::std::fmt::Display for SignSolMessageRuleAction {
30162        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30163            match *self {
30164                Self::Reject => f.write_str("reject"),
30165                Self::Accept => f.write_str("accept"),
30166            }
30167        }
30168    }
30169    impl ::std::str::FromStr for SignSolMessageRuleAction {
30170        type Err = self::error::ConversionError;
30171        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30172            match value {
30173                "reject" => Ok(Self::Reject),
30174                "accept" => Ok(Self::Accept),
30175                _ => Err("invalid value".into()),
30176            }
30177        }
30178    }
30179    impl ::std::convert::TryFrom<&str> for SignSolMessageRuleAction {
30180        type Error = self::error::ConversionError;
30181        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30182            value.parse()
30183        }
30184    }
30185    impl ::std::convert::TryFrom<&::std::string::String> for SignSolMessageRuleAction {
30186        type Error = self::error::ConversionError;
30187        fn try_from(
30188            value: &::std::string::String,
30189        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30190            value.parse()
30191        }
30192    }
30193    impl ::std::convert::TryFrom<::std::string::String> for SignSolMessageRuleAction {
30194        type Error = self::error::ConversionError;
30195        fn try_from(
30196            value: ::std::string::String,
30197        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30198            value.parse()
30199        }
30200    }
30201    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
30202    ///
30203    /// <details><summary>JSON schema</summary>
30204    ///
30205    /// ```json
30206    ///{
30207    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
30208    ///  "examples": [
30209    ///    "signSolMessage"
30210    ///  ],
30211    ///  "type": "string",
30212    ///  "enum": [
30213    ///    "signSolMessage"
30214    ///  ]
30215    ///}
30216    /// ```
30217    /// </details>
30218    #[derive(
30219        ::serde::Deserialize,
30220        ::serde::Serialize,
30221        Clone,
30222        Copy,
30223        Debug,
30224        Eq,
30225        Hash,
30226        Ord,
30227        PartialEq,
30228        PartialOrd,
30229    )]
30230    pub enum SignSolMessageRuleOperation {
30231        #[serde(rename = "signSolMessage")]
30232        SignSolMessage,
30233    }
30234    impl ::std::convert::From<&Self> for SignSolMessageRuleOperation {
30235        fn from(value: &SignSolMessageRuleOperation) -> Self {
30236            value.clone()
30237        }
30238    }
30239    impl ::std::fmt::Display for SignSolMessageRuleOperation {
30240        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30241            match *self {
30242                Self::SignSolMessage => f.write_str("signSolMessage"),
30243            }
30244        }
30245    }
30246    impl ::std::str::FromStr for SignSolMessageRuleOperation {
30247        type Err = self::error::ConversionError;
30248        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30249            match value {
30250                "signSolMessage" => Ok(Self::SignSolMessage),
30251                _ => Err("invalid value".into()),
30252            }
30253        }
30254    }
30255    impl ::std::convert::TryFrom<&str> for SignSolMessageRuleOperation {
30256        type Error = self::error::ConversionError;
30257        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30258            value.parse()
30259        }
30260    }
30261    impl ::std::convert::TryFrom<&::std::string::String> for SignSolMessageRuleOperation {
30262        type Error = self::error::ConversionError;
30263        fn try_from(
30264            value: &::std::string::String,
30265        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30266            value.parse()
30267        }
30268    }
30269    impl ::std::convert::TryFrom<::std::string::String> for SignSolMessageRuleOperation {
30270        type Error = self::error::ConversionError;
30271        fn try_from(
30272            value: ::std::string::String,
30273        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30274            value.parse()
30275        }
30276    }
30277    ///A schema for specifying criteria for the SignSolTransaction operation.
30278    ///
30279    /// <details><summary>JSON schema</summary>
30280    ///
30281    /// ```json
30282    ///{
30283    ///  "description": "A schema for specifying criteria for the SignSolTransaction operation.",
30284    ///  "examples": [
30285    ///    [
30286    ///      {
30287    ///        "addresses": [
30288    ///          "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
30289    ///        ],
30290    ///        "operator": "in",
30291    ///        "type": "solAddress"
30292    ///      }
30293    ///    ]
30294    ///  ],
30295    ///  "type": "array",
30296    ///  "items": {
30297    ///    "oneOf": [
30298    ///      {
30299    ///        "$ref": "#/components/schemas/SolAddressCriterion"
30300    ///      },
30301    ///      {
30302    ///        "$ref": "#/components/schemas/SolValueCriterion"
30303    ///      },
30304    ///      {
30305    ///        "$ref": "#/components/schemas/SplAddressCriterion"
30306    ///      },
30307    ///      {
30308    ///        "$ref": "#/components/schemas/SplValueCriterion"
30309    ///      },
30310    ///      {
30311    ///        "$ref": "#/components/schemas/MintAddressCriterion"
30312    ///      },
30313    ///      {
30314    ///        "$ref": "#/components/schemas/SolDataCriterion"
30315    ///      },
30316    ///      {
30317    ///        "$ref": "#/components/schemas/ProgramIdCriterion"
30318    ///      }
30319    ///    ]
30320    ///  },
30321    ///  "x-audience": "public"
30322    ///}
30323    /// ```
30324    /// </details>
30325    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30326    #[serde(transparent)]
30327    pub struct SignSolTransactionCriteria(pub ::std::vec::Vec<SignSolTransactionCriteriaItem>);
30328    impl ::std::ops::Deref for SignSolTransactionCriteria {
30329        type Target = ::std::vec::Vec<SignSolTransactionCriteriaItem>;
30330        fn deref(&self) -> &::std::vec::Vec<SignSolTransactionCriteriaItem> {
30331            &self.0
30332        }
30333    }
30334    impl ::std::convert::From<SignSolTransactionCriteria>
30335        for ::std::vec::Vec<SignSolTransactionCriteriaItem>
30336    {
30337        fn from(value: SignSolTransactionCriteria) -> Self {
30338            value.0
30339        }
30340    }
30341    impl ::std::convert::From<&SignSolTransactionCriteria> for SignSolTransactionCriteria {
30342        fn from(value: &SignSolTransactionCriteria) -> Self {
30343            value.clone()
30344        }
30345    }
30346    impl ::std::convert::From<::std::vec::Vec<SignSolTransactionCriteriaItem>>
30347        for SignSolTransactionCriteria
30348    {
30349        fn from(value: ::std::vec::Vec<SignSolTransactionCriteriaItem>) -> Self {
30350            Self(value)
30351        }
30352    }
30353    ///`SignSolTransactionCriteriaItem`
30354    ///
30355    /// <details><summary>JSON schema</summary>
30356    ///
30357    /// ```json
30358    ///{
30359    ///  "oneOf": [
30360    ///    {
30361    ///      "$ref": "#/components/schemas/SolAddressCriterion"
30362    ///    },
30363    ///    {
30364    ///      "$ref": "#/components/schemas/SolValueCriterion"
30365    ///    },
30366    ///    {
30367    ///      "$ref": "#/components/schemas/SplAddressCriterion"
30368    ///    },
30369    ///    {
30370    ///      "$ref": "#/components/schemas/SplValueCriterion"
30371    ///    },
30372    ///    {
30373    ///      "$ref": "#/components/schemas/MintAddressCriterion"
30374    ///    },
30375    ///    {
30376    ///      "$ref": "#/components/schemas/SolDataCriterion"
30377    ///    },
30378    ///    {
30379    ///      "$ref": "#/components/schemas/ProgramIdCriterion"
30380    ///    }
30381    ///  ]
30382    ///}
30383    /// ```
30384    /// </details>
30385    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30386    #[serde(untagged)]
30387    pub enum SignSolTransactionCriteriaItem {
30388        SolAddressCriterion(SolAddressCriterion),
30389        SolValueCriterion(SolValueCriterion),
30390        SplAddressCriterion(SplAddressCriterion),
30391        SplValueCriterion(SplValueCriterion),
30392        MintAddressCriterion(MintAddressCriterion),
30393        SolDataCriterion(SolDataCriterion),
30394        ProgramIdCriterion(ProgramIdCriterion),
30395    }
30396    impl ::std::convert::From<&Self> for SignSolTransactionCriteriaItem {
30397        fn from(value: &SignSolTransactionCriteriaItem) -> Self {
30398            value.clone()
30399        }
30400    }
30401    impl ::std::convert::From<SolAddressCriterion> for SignSolTransactionCriteriaItem {
30402        fn from(value: SolAddressCriterion) -> Self {
30403            Self::SolAddressCriterion(value)
30404        }
30405    }
30406    impl ::std::convert::From<SolValueCriterion> for SignSolTransactionCriteriaItem {
30407        fn from(value: SolValueCriterion) -> Self {
30408            Self::SolValueCriterion(value)
30409        }
30410    }
30411    impl ::std::convert::From<SplAddressCriterion> for SignSolTransactionCriteriaItem {
30412        fn from(value: SplAddressCriterion) -> Self {
30413            Self::SplAddressCriterion(value)
30414        }
30415    }
30416    impl ::std::convert::From<SplValueCriterion> for SignSolTransactionCriteriaItem {
30417        fn from(value: SplValueCriterion) -> Self {
30418            Self::SplValueCriterion(value)
30419        }
30420    }
30421    impl ::std::convert::From<MintAddressCriterion> for SignSolTransactionCriteriaItem {
30422        fn from(value: MintAddressCriterion) -> Self {
30423            Self::MintAddressCriterion(value)
30424        }
30425    }
30426    impl ::std::convert::From<SolDataCriterion> for SignSolTransactionCriteriaItem {
30427        fn from(value: SolDataCriterion) -> Self {
30428            Self::SolDataCriterion(value)
30429        }
30430    }
30431    impl ::std::convert::From<ProgramIdCriterion> for SignSolTransactionCriteriaItem {
30432        fn from(value: ProgramIdCriterion) -> Self {
30433            Self::ProgramIdCriterion(value)
30434        }
30435    }
30436    ///`SignSolTransactionRule`
30437    ///
30438    /// <details><summary>JSON schema</summary>
30439    ///
30440    /// ```json
30441    ///{
30442    ///  "title": "SignSolTransactionRule",
30443    ///  "required": [
30444    ///    "action",
30445    ///    "criteria",
30446    ///    "operation"
30447    ///  ],
30448    ///  "properties": {
30449    ///    "action": {
30450    ///      "description": "Whether matching the rule will cause the request to be rejected or accepted.",
30451    ///      "examples": [
30452    ///        "accept"
30453    ///      ],
30454    ///      "type": "string",
30455    ///      "enum": [
30456    ///        "reject",
30457    ///        "accept"
30458    ///      ]
30459    ///    },
30460    ///    "criteria": {
30461    ///      "$ref": "#/components/schemas/SignSolTransactionCriteria"
30462    ///    },
30463    ///    "operation": {
30464    ///      "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
30465    ///      "examples": [
30466    ///        "signSolTransaction"
30467    ///      ],
30468    ///      "type": "string",
30469    ///      "enum": [
30470    ///        "signSolTransaction"
30471    ///      ]
30472    ///    }
30473    ///  }
30474    ///}
30475    /// ```
30476    /// </details>
30477    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30478    pub struct SignSolTransactionRule {
30479        ///Whether matching the rule will cause the request to be rejected or accepted.
30480        pub action: SignSolTransactionRuleAction,
30481        pub criteria: SignSolTransactionCriteria,
30482        ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
30483        pub operation: SignSolTransactionRuleOperation,
30484    }
30485    impl ::std::convert::From<&SignSolTransactionRule> for SignSolTransactionRule {
30486        fn from(value: &SignSolTransactionRule) -> Self {
30487            value.clone()
30488        }
30489    }
30490    impl SignSolTransactionRule {
30491        pub fn builder() -> builder::SignSolTransactionRule {
30492            Default::default()
30493        }
30494    }
30495    ///Whether matching the rule will cause the request to be rejected or accepted.
30496    ///
30497    /// <details><summary>JSON schema</summary>
30498    ///
30499    /// ```json
30500    ///{
30501    ///  "description": "Whether matching the rule will cause the request to be rejected or accepted.",
30502    ///  "examples": [
30503    ///    "accept"
30504    ///  ],
30505    ///  "type": "string",
30506    ///  "enum": [
30507    ///    "reject",
30508    ///    "accept"
30509    ///  ]
30510    ///}
30511    /// ```
30512    /// </details>
30513    #[derive(
30514        ::serde::Deserialize,
30515        ::serde::Serialize,
30516        Clone,
30517        Copy,
30518        Debug,
30519        Eq,
30520        Hash,
30521        Ord,
30522        PartialEq,
30523        PartialOrd,
30524    )]
30525    pub enum SignSolTransactionRuleAction {
30526        #[serde(rename = "reject")]
30527        Reject,
30528        #[serde(rename = "accept")]
30529        Accept,
30530    }
30531    impl ::std::convert::From<&Self> for SignSolTransactionRuleAction {
30532        fn from(value: &SignSolTransactionRuleAction) -> Self {
30533            value.clone()
30534        }
30535    }
30536    impl ::std::fmt::Display for SignSolTransactionRuleAction {
30537        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30538            match *self {
30539                Self::Reject => f.write_str("reject"),
30540                Self::Accept => f.write_str("accept"),
30541            }
30542        }
30543    }
30544    impl ::std::str::FromStr for SignSolTransactionRuleAction {
30545        type Err = self::error::ConversionError;
30546        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30547            match value {
30548                "reject" => Ok(Self::Reject),
30549                "accept" => Ok(Self::Accept),
30550                _ => Err("invalid value".into()),
30551            }
30552        }
30553    }
30554    impl ::std::convert::TryFrom<&str> for SignSolTransactionRuleAction {
30555        type Error = self::error::ConversionError;
30556        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30557            value.parse()
30558        }
30559    }
30560    impl ::std::convert::TryFrom<&::std::string::String> for SignSolTransactionRuleAction {
30561        type Error = self::error::ConversionError;
30562        fn try_from(
30563            value: &::std::string::String,
30564        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30565            value.parse()
30566        }
30567    }
30568    impl ::std::convert::TryFrom<::std::string::String> for SignSolTransactionRuleAction {
30569        type Error = self::error::ConversionError;
30570        fn try_from(
30571            value: ::std::string::String,
30572        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30573            value.parse()
30574        }
30575    }
30576    ///The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
30577    ///
30578    /// <details><summary>JSON schema</summary>
30579    ///
30580    /// ```json
30581    ///{
30582    ///  "description": "The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.",
30583    ///  "examples": [
30584    ///    "signSolTransaction"
30585    ///  ],
30586    ///  "type": "string",
30587    ///  "enum": [
30588    ///    "signSolTransaction"
30589    ///  ]
30590    ///}
30591    /// ```
30592    /// </details>
30593    #[derive(
30594        ::serde::Deserialize,
30595        ::serde::Serialize,
30596        Clone,
30597        Copy,
30598        Debug,
30599        Eq,
30600        Hash,
30601        Ord,
30602        PartialEq,
30603        PartialOrd,
30604    )]
30605    pub enum SignSolTransactionRuleOperation {
30606        #[serde(rename = "signSolTransaction")]
30607        SignSolTransaction,
30608    }
30609    impl ::std::convert::From<&Self> for SignSolTransactionRuleOperation {
30610        fn from(value: &SignSolTransactionRuleOperation) -> Self {
30611            value.clone()
30612        }
30613    }
30614    impl ::std::fmt::Display for SignSolTransactionRuleOperation {
30615        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30616            match *self {
30617                Self::SignSolTransaction => f.write_str("signSolTransaction"),
30618            }
30619        }
30620    }
30621    impl ::std::str::FromStr for SignSolTransactionRuleOperation {
30622        type Err = self::error::ConversionError;
30623        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30624            match value {
30625                "signSolTransaction" => Ok(Self::SignSolTransaction),
30626                _ => Err("invalid value".into()),
30627            }
30628        }
30629    }
30630    impl ::std::convert::TryFrom<&str> for SignSolTransactionRuleOperation {
30631        type Error = self::error::ConversionError;
30632        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30633            value.parse()
30634        }
30635    }
30636    impl ::std::convert::TryFrom<&::std::string::String> for SignSolTransactionRuleOperation {
30637        type Error = self::error::ConversionError;
30638        fn try_from(
30639            value: &::std::string::String,
30640        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30641            value.parse()
30642        }
30643    }
30644    impl ::std::convert::TryFrom<::std::string::String> for SignSolTransactionRuleOperation {
30645        type Error = self::error::ConversionError;
30646        fn try_from(
30647            value: ::std::string::String,
30648        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30649            value.parse()
30650        }
30651    }
30652    ///`SignSolanaMessageAddress`
30653    ///
30654    /// <details><summary>JSON schema</summary>
30655    ///
30656    /// ```json
30657    ///{
30658    ///  "type": "string",
30659    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
30660    ///}
30661    /// ```
30662    /// </details>
30663    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30664    #[serde(transparent)]
30665    pub struct SignSolanaMessageAddress(::std::string::String);
30666    impl ::std::ops::Deref for SignSolanaMessageAddress {
30667        type Target = ::std::string::String;
30668        fn deref(&self) -> &::std::string::String {
30669            &self.0
30670        }
30671    }
30672    impl ::std::convert::From<SignSolanaMessageAddress> for ::std::string::String {
30673        fn from(value: SignSolanaMessageAddress) -> Self {
30674            value.0
30675        }
30676    }
30677    impl ::std::convert::From<&SignSolanaMessageAddress> for SignSolanaMessageAddress {
30678        fn from(value: &SignSolanaMessageAddress) -> Self {
30679            value.clone()
30680        }
30681    }
30682    impl ::std::str::FromStr for SignSolanaMessageAddress {
30683        type Err = self::error::ConversionError;
30684        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30685            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
30686                ::std::sync::LazyLock::new(|| {
30687                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
30688                });
30689            if PATTERN.find(value).is_none() {
30690                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
30691            }
30692            Ok(Self(value.to_string()))
30693        }
30694    }
30695    impl ::std::convert::TryFrom<&str> for SignSolanaMessageAddress {
30696        type Error = self::error::ConversionError;
30697        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30698            value.parse()
30699        }
30700    }
30701    impl ::std::convert::TryFrom<&::std::string::String> for SignSolanaMessageAddress {
30702        type Error = self::error::ConversionError;
30703        fn try_from(
30704            value: &::std::string::String,
30705        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30706            value.parse()
30707        }
30708    }
30709    impl ::std::convert::TryFrom<::std::string::String> for SignSolanaMessageAddress {
30710        type Error = self::error::ConversionError;
30711        fn try_from(
30712            value: ::std::string::String,
30713        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30714            value.parse()
30715        }
30716    }
30717    impl<'de> ::serde::Deserialize<'de> for SignSolanaMessageAddress {
30718        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
30719        where
30720            D: ::serde::Deserializer<'de>,
30721        {
30722            ::std::string::String::deserialize(deserializer)?
30723                .parse()
30724                .map_err(|e: self::error::ConversionError| {
30725                    <D::Error as ::serde::de::Error>::custom(e.to_string())
30726                })
30727        }
30728    }
30729    ///`SignSolanaMessageBody`
30730    ///
30731    /// <details><summary>JSON schema</summary>
30732    ///
30733    /// ```json
30734    ///{
30735    ///  "type": "object",
30736    ///  "required": [
30737    ///    "message"
30738    ///  ],
30739    ///  "properties": {
30740    ///    "message": {
30741    ///      "description": "The arbitrary message to sign.",
30742    ///      "examples": [
30743    ///        "Hello, world!"
30744    ///      ],
30745    ///      "type": "string"
30746    ///    }
30747    ///  }
30748    ///}
30749    /// ```
30750    /// </details>
30751    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30752    pub struct SignSolanaMessageBody {
30753        ///The arbitrary message to sign.
30754        pub message: ::std::string::String,
30755    }
30756    impl ::std::convert::From<&SignSolanaMessageBody> for SignSolanaMessageBody {
30757        fn from(value: &SignSolanaMessageBody) -> Self {
30758            value.clone()
30759        }
30760    }
30761    impl SignSolanaMessageBody {
30762        pub fn builder() -> builder::SignSolanaMessageBody {
30763            Default::default()
30764        }
30765    }
30766    ///`SignSolanaMessageResponse`
30767    ///
30768    /// <details><summary>JSON schema</summary>
30769    ///
30770    /// ```json
30771    ///{
30772    ///  "type": "object",
30773    ///  "required": [
30774    ///    "signature"
30775    ///  ],
30776    ///  "properties": {
30777    ///    "signature": {
30778    ///      "description": "The signature of the message, as a base58 encoded string.",
30779    ///      "examples": [
30780    ///        "4YecmNqVT9QFqzuSvE9Zih3toZzNAijjXpj8xupgcC6E4VzwzFjuZBk5P99yz9JQaLRLm1K4L4FpMjxByFxQBe2h"
30781    ///      ],
30782    ///      "type": "string"
30783    ///    }
30784    ///  }
30785    ///}
30786    /// ```
30787    /// </details>
30788    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30789    pub struct SignSolanaMessageResponse {
30790        ///The signature of the message, as a base58 encoded string.
30791        pub signature: ::std::string::String,
30792    }
30793    impl ::std::convert::From<&SignSolanaMessageResponse> for SignSolanaMessageResponse {
30794        fn from(value: &SignSolanaMessageResponse) -> Self {
30795            value.clone()
30796        }
30797    }
30798    impl SignSolanaMessageResponse {
30799        pub fn builder() -> builder::SignSolanaMessageResponse {
30800            Default::default()
30801        }
30802    }
30803    ///`SignSolanaMessageXIdempotencyKey`
30804    ///
30805    /// <details><summary>JSON schema</summary>
30806    ///
30807    /// ```json
30808    ///{
30809    ///  "type": "string",
30810    ///  "maxLength": 36,
30811    ///  "minLength": 36,
30812    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
30813    ///}
30814    /// ```
30815    /// </details>
30816    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30817    #[serde(transparent)]
30818    pub struct SignSolanaMessageXIdempotencyKey(::std::string::String);
30819    impl ::std::ops::Deref for SignSolanaMessageXIdempotencyKey {
30820        type Target = ::std::string::String;
30821        fn deref(&self) -> &::std::string::String {
30822            &self.0
30823        }
30824    }
30825    impl ::std::convert::From<SignSolanaMessageXIdempotencyKey> for ::std::string::String {
30826        fn from(value: SignSolanaMessageXIdempotencyKey) -> Self {
30827            value.0
30828        }
30829    }
30830    impl ::std::convert::From<&SignSolanaMessageXIdempotencyKey> for SignSolanaMessageXIdempotencyKey {
30831        fn from(value: &SignSolanaMessageXIdempotencyKey) -> Self {
30832            value.clone()
30833        }
30834    }
30835    impl ::std::str::FromStr for SignSolanaMessageXIdempotencyKey {
30836        type Err = self::error::ConversionError;
30837        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30838            if value.chars().count() > 36usize {
30839                return Err("longer than 36 characters".into());
30840            }
30841            if value.chars().count() < 36usize {
30842                return Err("shorter than 36 characters".into());
30843            }
30844            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
30845                ::std::sync::LazyLock::new(|| {
30846                    ::regress::Regex::new(
30847                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
30848                    )
30849                    .unwrap()
30850                });
30851            if PATTERN.find(value).is_none() {
30852                return Err(
30853                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
30854                        .into(),
30855                );
30856            }
30857            Ok(Self(value.to_string()))
30858        }
30859    }
30860    impl ::std::convert::TryFrom<&str> for SignSolanaMessageXIdempotencyKey {
30861        type Error = self::error::ConversionError;
30862        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30863            value.parse()
30864        }
30865    }
30866    impl ::std::convert::TryFrom<&::std::string::String> for SignSolanaMessageXIdempotencyKey {
30867        type Error = self::error::ConversionError;
30868        fn try_from(
30869            value: &::std::string::String,
30870        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30871            value.parse()
30872        }
30873    }
30874    impl ::std::convert::TryFrom<::std::string::String> for SignSolanaMessageXIdempotencyKey {
30875        type Error = self::error::ConversionError;
30876        fn try_from(
30877            value: ::std::string::String,
30878        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30879            value.parse()
30880        }
30881    }
30882    impl<'de> ::serde::Deserialize<'de> for SignSolanaMessageXIdempotencyKey {
30883        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
30884        where
30885            D: ::serde::Deserializer<'de>,
30886        {
30887            ::std::string::String::deserialize(deserializer)?
30888                .parse()
30889                .map_err(|e: self::error::ConversionError| {
30890                    <D::Error as ::serde::de::Error>::custom(e.to_string())
30891                })
30892        }
30893    }
30894    ///`SignSolanaTransactionAddress`
30895    ///
30896    /// <details><summary>JSON schema</summary>
30897    ///
30898    /// ```json
30899    ///{
30900    ///  "type": "string",
30901    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
30902    ///}
30903    /// ```
30904    /// </details>
30905    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30906    #[serde(transparent)]
30907    pub struct SignSolanaTransactionAddress(::std::string::String);
30908    impl ::std::ops::Deref for SignSolanaTransactionAddress {
30909        type Target = ::std::string::String;
30910        fn deref(&self) -> &::std::string::String {
30911            &self.0
30912        }
30913    }
30914    impl ::std::convert::From<SignSolanaTransactionAddress> for ::std::string::String {
30915        fn from(value: SignSolanaTransactionAddress) -> Self {
30916            value.0
30917        }
30918    }
30919    impl ::std::convert::From<&SignSolanaTransactionAddress> for SignSolanaTransactionAddress {
30920        fn from(value: &SignSolanaTransactionAddress) -> Self {
30921            value.clone()
30922        }
30923    }
30924    impl ::std::str::FromStr for SignSolanaTransactionAddress {
30925        type Err = self::error::ConversionError;
30926        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30927            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
30928                ::std::sync::LazyLock::new(|| {
30929                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
30930                });
30931            if PATTERN.find(value).is_none() {
30932                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
30933            }
30934            Ok(Self(value.to_string()))
30935        }
30936    }
30937    impl ::std::convert::TryFrom<&str> for SignSolanaTransactionAddress {
30938        type Error = self::error::ConversionError;
30939        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
30940            value.parse()
30941        }
30942    }
30943    impl ::std::convert::TryFrom<&::std::string::String> for SignSolanaTransactionAddress {
30944        type Error = self::error::ConversionError;
30945        fn try_from(
30946            value: &::std::string::String,
30947        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30948            value.parse()
30949        }
30950    }
30951    impl ::std::convert::TryFrom<::std::string::String> for SignSolanaTransactionAddress {
30952        type Error = self::error::ConversionError;
30953        fn try_from(
30954            value: ::std::string::String,
30955        ) -> ::std::result::Result<Self, self::error::ConversionError> {
30956            value.parse()
30957        }
30958    }
30959    impl<'de> ::serde::Deserialize<'de> for SignSolanaTransactionAddress {
30960        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
30961        where
30962            D: ::serde::Deserializer<'de>,
30963        {
30964            ::std::string::String::deserialize(deserializer)?
30965                .parse()
30966                .map_err(|e: self::error::ConversionError| {
30967                    <D::Error as ::serde::de::Error>::custom(e.to_string())
30968                })
30969        }
30970    }
30971    ///`SignSolanaTransactionBody`
30972    ///
30973    /// <details><summary>JSON schema</summary>
30974    ///
30975    /// ```json
30976    ///{
30977    ///  "type": "object",
30978    ///  "required": [
30979    ///    "transaction"
30980    ///  ],
30981    ///  "properties": {
30982    ///    "transaction": {
30983    ///      "description": "The base64 encoded transaction to sign.",
30984    ///      "examples": [
30985    ///        "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAQECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8CBgMBAQAAAAIBAwQAAAAABgIAAAAAAAYDBQEBAAAGBAgAAAAABgUAAAAA6AMAAAAAAAAGBgUBAQEBBgcEAQAAAAYICgMBAQIDBgkCBgAAAAYKAwABAQEGCwMGAQEBBgwDAAABAQAAAAA="
30986    ///      ],
30987    ///      "type": "string"
30988    ///    }
30989    ///  }
30990    ///}
30991    /// ```
30992    /// </details>
30993    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
30994    pub struct SignSolanaTransactionBody {
30995        ///The base64 encoded transaction to sign.
30996        pub transaction: ::std::string::String,
30997    }
30998    impl ::std::convert::From<&SignSolanaTransactionBody> for SignSolanaTransactionBody {
30999        fn from(value: &SignSolanaTransactionBody) -> Self {
31000            value.clone()
31001        }
31002    }
31003    impl SignSolanaTransactionBody {
31004        pub fn builder() -> builder::SignSolanaTransactionBody {
31005            Default::default()
31006        }
31007    }
31008    ///`SignSolanaTransactionResponse`
31009    ///
31010    /// <details><summary>JSON schema</summary>
31011    ///
31012    /// ```json
31013    ///{
31014    ///  "type": "object",
31015    ///  "required": [
31016    ///    "signedTransaction"
31017    ///  ],
31018    ///  "properties": {
31019    ///    "signedTransaction": {
31020    ///      "description": "The base64 encoded signed transaction.",
31021    ///      "examples": [
31022    ///        "AQACAdSOvpk0UJXs/rQRXYKSI9hcR0bkGp24qGv6t0/M1XjcQpHf6AHwLcPjEtKQI7p/U0Zo98lnJ5/PZMfVq/0BAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAQECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8CBgMBAQAAAAIBAwQAAAAABgIAAAAAAAYDBQEBAAAGBAgAAAAABgUAAAAA6AMAAAAAAAAGBgUBAQEBBgcEAQAAAAYICgMBAQIDBgkCBgAAAAYKAwABAQEGCwMGAQEBBgwDAAABAQAAAAA="
31023    ///      ],
31024    ///      "type": "string"
31025    ///    }
31026    ///  }
31027    ///}
31028    /// ```
31029    /// </details>
31030    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31031    pub struct SignSolanaTransactionResponse {
31032        ///The base64 encoded signed transaction.
31033        #[serde(rename = "signedTransaction")]
31034        pub signed_transaction: ::std::string::String,
31035    }
31036    impl ::std::convert::From<&SignSolanaTransactionResponse> for SignSolanaTransactionResponse {
31037        fn from(value: &SignSolanaTransactionResponse) -> Self {
31038            value.clone()
31039        }
31040    }
31041    impl SignSolanaTransactionResponse {
31042        pub fn builder() -> builder::SignSolanaTransactionResponse {
31043            Default::default()
31044        }
31045    }
31046    ///`SignSolanaTransactionXIdempotencyKey`
31047    ///
31048    /// <details><summary>JSON schema</summary>
31049    ///
31050    /// ```json
31051    ///{
31052    ///  "type": "string",
31053    ///  "maxLength": 36,
31054    ///  "minLength": 36,
31055    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
31056    ///}
31057    /// ```
31058    /// </details>
31059    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31060    #[serde(transparent)]
31061    pub struct SignSolanaTransactionXIdempotencyKey(::std::string::String);
31062    impl ::std::ops::Deref for SignSolanaTransactionXIdempotencyKey {
31063        type Target = ::std::string::String;
31064        fn deref(&self) -> &::std::string::String {
31065            &self.0
31066        }
31067    }
31068    impl ::std::convert::From<SignSolanaTransactionXIdempotencyKey> for ::std::string::String {
31069        fn from(value: SignSolanaTransactionXIdempotencyKey) -> Self {
31070            value.0
31071        }
31072    }
31073    impl ::std::convert::From<&SignSolanaTransactionXIdempotencyKey>
31074        for SignSolanaTransactionXIdempotencyKey
31075    {
31076        fn from(value: &SignSolanaTransactionXIdempotencyKey) -> Self {
31077            value.clone()
31078        }
31079    }
31080    impl ::std::str::FromStr for SignSolanaTransactionXIdempotencyKey {
31081        type Err = self::error::ConversionError;
31082        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31083            if value.chars().count() > 36usize {
31084                return Err("longer than 36 characters".into());
31085            }
31086            if value.chars().count() < 36usize {
31087                return Err("shorter than 36 characters".into());
31088            }
31089            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
31090                ::std::sync::LazyLock::new(|| {
31091                    ::regress::Regex::new(
31092                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
31093                    )
31094                    .unwrap()
31095                });
31096            if PATTERN.find(value).is_none() {
31097                return Err(
31098                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
31099                        .into(),
31100                );
31101            }
31102            Ok(Self(value.to_string()))
31103        }
31104    }
31105    impl ::std::convert::TryFrom<&str> for SignSolanaTransactionXIdempotencyKey {
31106        type Error = self::error::ConversionError;
31107        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31108            value.parse()
31109        }
31110    }
31111    impl ::std::convert::TryFrom<&::std::string::String> for SignSolanaTransactionXIdempotencyKey {
31112        type Error = self::error::ConversionError;
31113        fn try_from(
31114            value: &::std::string::String,
31115        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31116            value.parse()
31117        }
31118    }
31119    impl ::std::convert::TryFrom<::std::string::String> for SignSolanaTransactionXIdempotencyKey {
31120        type Error = self::error::ConversionError;
31121        fn try_from(
31122            value: ::std::string::String,
31123        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31124            value.parse()
31125        }
31126    }
31127    impl<'de> ::serde::Deserialize<'de> for SignSolanaTransactionXIdempotencyKey {
31128        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
31129        where
31130            D: ::serde::Deserializer<'de>,
31131        {
31132            ::std::string::String::deserialize(deserializer)?
31133                .parse()
31134                .map_err(|e: self::error::ConversionError| {
31135                    <D::Error as ::serde::de::Error>::custom(e.to_string())
31136                })
31137        }
31138    }
31139    ///The 0x-prefixed Externally Owned Account (EOA) address that will sign the `Permit2` EIP-712 permit message. This is only needed if `taker` is a smart contract.
31140    ///
31141    /// <details><summary>JSON schema</summary>
31142    ///
31143    /// ```json
31144    ///{
31145    ///  "description": "The 0x-prefixed Externally Owned Account (EOA) address that will sign the `Permit2` EIP-712 permit message. This is only needed if `taker` is a smart contract.",
31146    ///  "examples": [
31147    ///    "0x922f49447d8a07e3bd95bd0d56f35241523fbab8"
31148    ///  ],
31149    ///  "type": "string",
31150    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
31151    ///}
31152    /// ```
31153    /// </details>
31154    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31155    #[serde(transparent)]
31156    pub struct SignerAddress(::std::string::String);
31157    impl ::std::ops::Deref for SignerAddress {
31158        type Target = ::std::string::String;
31159        fn deref(&self) -> &::std::string::String {
31160            &self.0
31161        }
31162    }
31163    impl ::std::convert::From<SignerAddress> for ::std::string::String {
31164        fn from(value: SignerAddress) -> Self {
31165            value.0
31166        }
31167    }
31168    impl ::std::convert::From<&SignerAddress> for SignerAddress {
31169        fn from(value: &SignerAddress) -> Self {
31170            value.clone()
31171        }
31172    }
31173    impl ::std::str::FromStr for SignerAddress {
31174        type Err = self::error::ConversionError;
31175        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31176            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
31177                ::std::sync::LazyLock::new(|| {
31178                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
31179                });
31180            if PATTERN.find(value).is_none() {
31181                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
31182            }
31183            Ok(Self(value.to_string()))
31184        }
31185    }
31186    impl ::std::convert::TryFrom<&str> for SignerAddress {
31187        type Error = self::error::ConversionError;
31188        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31189            value.parse()
31190        }
31191    }
31192    impl ::std::convert::TryFrom<&::std::string::String> for SignerAddress {
31193        type Error = self::error::ConversionError;
31194        fn try_from(
31195            value: &::std::string::String,
31196        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31197            value.parse()
31198        }
31199    }
31200    impl ::std::convert::TryFrom<::std::string::String> for SignerAddress {
31201        type Error = self::error::ConversionError;
31202        fn try_from(
31203            value: ::std::string::String,
31204        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31205            value.parse()
31206        }
31207    }
31208    impl<'de> ::serde::Deserialize<'de> for SignerAddress {
31209        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
31210        where
31211            D: ::serde::Deserializer<'de>,
31212        {
31213            ::std::string::String::deserialize(deserializer)?
31214                .parse()
31215                .map_err(|e: self::error::ConversionError| {
31216                    <D::Error as ::serde::de::Error>::custom(e.to_string())
31217                })
31218        }
31219    }
31220    ///The maximum acceptable slippage of the `toToken` in basis points. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100 bps (i.e., 1%).
31221    ///
31222    /// <details><summary>JSON schema</summary>
31223    ///
31224    /// ```json
31225    ///{
31226    ///  "description": "The maximum acceptable slippage of the `toToken` in basis points. If this parameter is set to 0, no slippage will be tolerated. If not provided, the default slippage tolerance is 100 bps (i.e., 1%).",
31227    ///  "default": 100,
31228    ///  "examples": [
31229    ///    100
31230    ///  ],
31231    ///  "type": "integer",
31232    ///  "maximum": 10000.0,
31233    ///  "minimum": 0.0
31234    ///}
31235    /// ```
31236    /// </details>
31237    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31238    #[serde(transparent)]
31239    pub struct SlippageBps(pub i64);
31240    impl ::std::ops::Deref for SlippageBps {
31241        type Target = i64;
31242        fn deref(&self) -> &i64 {
31243            &self.0
31244        }
31245    }
31246    impl ::std::convert::From<SlippageBps> for i64 {
31247        fn from(value: SlippageBps) -> Self {
31248            value.0
31249        }
31250    }
31251    impl ::std::convert::From<&SlippageBps> for SlippageBps {
31252        fn from(value: &SlippageBps) -> Self {
31253            value.clone()
31254        }
31255    }
31256    impl ::std::convert::From<i64> for SlippageBps {
31257        fn from(value: i64) -> Self {
31258            Self(value)
31259        }
31260    }
31261    impl ::std::str::FromStr for SlippageBps {
31262        type Err = <i64 as ::std::str::FromStr>::Err;
31263        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
31264            Ok(Self(value.parse()?))
31265        }
31266    }
31267    impl ::std::convert::TryFrom<&str> for SlippageBps {
31268        type Error = <i64 as ::std::str::FromStr>::Err;
31269        fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
31270            value.parse()
31271        }
31272    }
31273    impl ::std::convert::TryFrom<&String> for SlippageBps {
31274        type Error = <i64 as ::std::str::FromStr>::Err;
31275        fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
31276            value.parse()
31277        }
31278    }
31279    impl ::std::convert::TryFrom<String> for SlippageBps {
31280        type Error = <i64 as ::std::str::FromStr>::Err;
31281        fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
31282            value.parse()
31283        }
31284    }
31285    impl ::std::fmt::Display for SlippageBps {
31286        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31287            self.0.fmt(f)
31288        }
31289    }
31290    ///Information about an end user who authenticates using a one-time password sent to their phone number via SMS.
31291    ///
31292    /// <details><summary>JSON schema</summary>
31293    ///
31294    /// ```json
31295    ///{
31296    ///  "title": "SmsAuthentication",
31297    ///  "description": "Information about an end user who authenticates using a one-time password sent to their phone number via SMS.",
31298    ///  "type": "object",
31299    ///  "required": [
31300    ///    "phoneNumber",
31301    ///    "type"
31302    ///  ],
31303    ///  "properties": {
31304    ///    "phoneNumber": {
31305    ///      "description": "The phone number of the end user in E.164 format.",
31306    ///      "examples": [
31307    ///        "+12055555555"
31308    ///      ],
31309    ///      "type": "string",
31310    ///      "pattern": "^\\+[1-9]\\d{1,14}$"
31311    ///    },
31312    ///    "type": {
31313    ///      "description": "The type of authentication information.",
31314    ///      "examples": [
31315    ///        "sms"
31316    ///      ],
31317    ///      "type": "string",
31318    ///      "enum": [
31319    ///        "sms"
31320    ///      ]
31321    ///    }
31322    ///  }
31323    ///}
31324    /// ```
31325    /// </details>
31326    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31327    pub struct SmsAuthentication {
31328        ///The phone number of the end user in E.164 format.
31329        #[serde(rename = "phoneNumber")]
31330        pub phone_number: SmsAuthenticationPhoneNumber,
31331        ///The type of authentication information.
31332        #[serde(rename = "type")]
31333        pub type_: SmsAuthenticationType,
31334    }
31335    impl ::std::convert::From<&SmsAuthentication> for SmsAuthentication {
31336        fn from(value: &SmsAuthentication) -> Self {
31337            value.clone()
31338        }
31339    }
31340    impl SmsAuthentication {
31341        pub fn builder() -> builder::SmsAuthentication {
31342            Default::default()
31343        }
31344    }
31345    ///The phone number of the end user in E.164 format.
31346    ///
31347    /// <details><summary>JSON schema</summary>
31348    ///
31349    /// ```json
31350    ///{
31351    ///  "description": "The phone number of the end user in E.164 format.",
31352    ///  "examples": [
31353    ///    "+12055555555"
31354    ///  ],
31355    ///  "type": "string",
31356    ///  "pattern": "^\\+[1-9]\\d{1,14}$"
31357    ///}
31358    /// ```
31359    /// </details>
31360    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31361    #[serde(transparent)]
31362    pub struct SmsAuthenticationPhoneNumber(::std::string::String);
31363    impl ::std::ops::Deref for SmsAuthenticationPhoneNumber {
31364        type Target = ::std::string::String;
31365        fn deref(&self) -> &::std::string::String {
31366            &self.0
31367        }
31368    }
31369    impl ::std::convert::From<SmsAuthenticationPhoneNumber> for ::std::string::String {
31370        fn from(value: SmsAuthenticationPhoneNumber) -> Self {
31371            value.0
31372        }
31373    }
31374    impl ::std::convert::From<&SmsAuthenticationPhoneNumber> for SmsAuthenticationPhoneNumber {
31375        fn from(value: &SmsAuthenticationPhoneNumber) -> Self {
31376            value.clone()
31377        }
31378    }
31379    impl ::std::str::FromStr for SmsAuthenticationPhoneNumber {
31380        type Err = self::error::ConversionError;
31381        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31382            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
31383                ::std::sync::LazyLock::new(|| {
31384                    ::regress::Regex::new("^\\+[1-9]\\d{1,14}$").unwrap()
31385                });
31386            if PATTERN.find(value).is_none() {
31387                return Err("doesn't match pattern \"^\\+[1-9]\\d{1,14}$\"".into());
31388            }
31389            Ok(Self(value.to_string()))
31390        }
31391    }
31392    impl ::std::convert::TryFrom<&str> for SmsAuthenticationPhoneNumber {
31393        type Error = self::error::ConversionError;
31394        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31395            value.parse()
31396        }
31397    }
31398    impl ::std::convert::TryFrom<&::std::string::String> for SmsAuthenticationPhoneNumber {
31399        type Error = self::error::ConversionError;
31400        fn try_from(
31401            value: &::std::string::String,
31402        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31403            value.parse()
31404        }
31405    }
31406    impl ::std::convert::TryFrom<::std::string::String> for SmsAuthenticationPhoneNumber {
31407        type Error = self::error::ConversionError;
31408        fn try_from(
31409            value: ::std::string::String,
31410        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31411            value.parse()
31412        }
31413    }
31414    impl<'de> ::serde::Deserialize<'de> for SmsAuthenticationPhoneNumber {
31415        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
31416        where
31417            D: ::serde::Deserializer<'de>,
31418        {
31419            ::std::string::String::deserialize(deserializer)?
31420                .parse()
31421                .map_err(|e: self::error::ConversionError| {
31422                    <D::Error as ::serde::de::Error>::custom(e.to_string())
31423                })
31424        }
31425    }
31426    ///The type of authentication information.
31427    ///
31428    /// <details><summary>JSON schema</summary>
31429    ///
31430    /// ```json
31431    ///{
31432    ///  "description": "The type of authentication information.",
31433    ///  "examples": [
31434    ///    "sms"
31435    ///  ],
31436    ///  "type": "string",
31437    ///  "enum": [
31438    ///    "sms"
31439    ///  ]
31440    ///}
31441    /// ```
31442    /// </details>
31443    #[derive(
31444        ::serde::Deserialize,
31445        ::serde::Serialize,
31446        Clone,
31447        Copy,
31448        Debug,
31449        Eq,
31450        Hash,
31451        Ord,
31452        PartialEq,
31453        PartialOrd,
31454    )]
31455    pub enum SmsAuthenticationType {
31456        #[serde(rename = "sms")]
31457        Sms,
31458    }
31459    impl ::std::convert::From<&Self> for SmsAuthenticationType {
31460        fn from(value: &SmsAuthenticationType) -> Self {
31461            value.clone()
31462        }
31463    }
31464    impl ::std::fmt::Display for SmsAuthenticationType {
31465        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31466            match *self {
31467                Self::Sms => f.write_str("sms"),
31468            }
31469        }
31470    }
31471    impl ::std::str::FromStr for SmsAuthenticationType {
31472        type Err = self::error::ConversionError;
31473        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31474            match value {
31475                "sms" => Ok(Self::Sms),
31476                _ => Err("invalid value".into()),
31477            }
31478        }
31479    }
31480    impl ::std::convert::TryFrom<&str> for SmsAuthenticationType {
31481        type Error = self::error::ConversionError;
31482        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31483            value.parse()
31484        }
31485    }
31486    impl ::std::convert::TryFrom<&::std::string::String> for SmsAuthenticationType {
31487        type Error = self::error::ConversionError;
31488        fn try_from(
31489            value: &::std::string::String,
31490        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31491            value.parse()
31492        }
31493    }
31494    impl ::std::convert::TryFrom<::std::string::String> for SmsAuthenticationType {
31495        type Error = self::error::ConversionError;
31496        fn try_from(
31497            value: ::std::string::String,
31498        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31499            value.parse()
31500        }
31501    }
31502    ///The criterion for the recipient addresses of a Solana transaction's native transfer instruction.
31503    ///
31504    /// <details><summary>JSON schema</summary>
31505    ///
31506    /// ```json
31507    ///{
31508    ///  "title": "SolAddressCriterion",
31509    ///  "description": "The criterion for the recipient addresses of a Solana transaction's native transfer instruction.",
31510    ///  "type": "object",
31511    ///  "required": [
31512    ///    "addresses",
31513    ///    "operator",
31514    ///    "type"
31515    ///  ],
31516    ///  "properties": {
31517    ///    "addresses": {
31518    ///      "description": "The Solana addresses that are compared to the list of native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
31519    ///      "examples": [
31520    ///        [
31521    ///          "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
31522    ///        ]
31523    ///      ],
31524    ///      "type": "array",
31525    ///      "items": {
31526    ///        "description": "The Solana address that is compared to the list of native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
31527    ///        "type": "string",
31528    ///        "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
31529    ///      }
31530    ///    },
31531    ///    "operator": {
31532    ///      "description": "The operator to use for the comparison. Each of the native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
31533    ///      "examples": [
31534    ///        "in"
31535    ///      ],
31536    ///      "type": "string",
31537    ///      "enum": [
31538    ///        "in",
31539    ///        "not in"
31540    ///      ]
31541    ///    },
31542    ///    "type": {
31543    ///      "description": "The type of criterion to use. This should be `solAddress`.",
31544    ///      "examples": [
31545    ///        "solAddress"
31546    ///      ],
31547    ///      "type": "string",
31548    ///      "enum": [
31549    ///        "solAddress"
31550    ///      ]
31551    ///    }
31552    ///  }
31553    ///}
31554    /// ```
31555    /// </details>
31556    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31557    pub struct SolAddressCriterion {
31558        ///The Solana addresses that are compared to the list of native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.
31559        pub addresses: ::std::vec::Vec<SolAddressCriterionAddressesItem>,
31560        ///The operator to use for the comparison. Each of the native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
31561        pub operator: SolAddressCriterionOperator,
31562        ///The type of criterion to use. This should be `solAddress`.
31563        #[serde(rename = "type")]
31564        pub type_: SolAddressCriterionType,
31565    }
31566    impl ::std::convert::From<&SolAddressCriterion> for SolAddressCriterion {
31567        fn from(value: &SolAddressCriterion) -> Self {
31568            value.clone()
31569        }
31570    }
31571    impl SolAddressCriterion {
31572        pub fn builder() -> builder::SolAddressCriterion {
31573            Default::default()
31574        }
31575    }
31576    ///The Solana address that is compared to the list of native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.
31577    ///
31578    /// <details><summary>JSON schema</summary>
31579    ///
31580    /// ```json
31581    ///{
31582    ///  "description": "The Solana address that is compared to the list of native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
31583    ///  "type": "string",
31584    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
31585    ///}
31586    /// ```
31587    /// </details>
31588    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31589    #[serde(transparent)]
31590    pub struct SolAddressCriterionAddressesItem(::std::string::String);
31591    impl ::std::ops::Deref for SolAddressCriterionAddressesItem {
31592        type Target = ::std::string::String;
31593        fn deref(&self) -> &::std::string::String {
31594            &self.0
31595        }
31596    }
31597    impl ::std::convert::From<SolAddressCriterionAddressesItem> for ::std::string::String {
31598        fn from(value: SolAddressCriterionAddressesItem) -> Self {
31599            value.0
31600        }
31601    }
31602    impl ::std::convert::From<&SolAddressCriterionAddressesItem> for SolAddressCriterionAddressesItem {
31603        fn from(value: &SolAddressCriterionAddressesItem) -> Self {
31604            value.clone()
31605        }
31606    }
31607    impl ::std::str::FromStr for SolAddressCriterionAddressesItem {
31608        type Err = self::error::ConversionError;
31609        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31610            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
31611                ::std::sync::LazyLock::new(|| {
31612                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
31613                });
31614            if PATTERN.find(value).is_none() {
31615                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
31616            }
31617            Ok(Self(value.to_string()))
31618        }
31619    }
31620    impl ::std::convert::TryFrom<&str> for SolAddressCriterionAddressesItem {
31621        type Error = self::error::ConversionError;
31622        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31623            value.parse()
31624        }
31625    }
31626    impl ::std::convert::TryFrom<&::std::string::String> for SolAddressCriterionAddressesItem {
31627        type Error = self::error::ConversionError;
31628        fn try_from(
31629            value: &::std::string::String,
31630        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31631            value.parse()
31632        }
31633    }
31634    impl ::std::convert::TryFrom<::std::string::String> for SolAddressCriterionAddressesItem {
31635        type Error = self::error::ConversionError;
31636        fn try_from(
31637            value: ::std::string::String,
31638        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31639            value.parse()
31640        }
31641    }
31642    impl<'de> ::serde::Deserialize<'de> for SolAddressCriterionAddressesItem {
31643        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
31644        where
31645            D: ::serde::Deserializer<'de>,
31646        {
31647            ::std::string::String::deserialize(deserializer)?
31648                .parse()
31649                .map_err(|e: self::error::ConversionError| {
31650                    <D::Error as ::serde::de::Error>::custom(e.to_string())
31651                })
31652        }
31653    }
31654    ///The operator to use for the comparison. Each of the native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
31655    ///
31656    /// <details><summary>JSON schema</summary>
31657    ///
31658    /// ```json
31659    ///{
31660    ///  "description": "The operator to use for the comparison. Each of the native transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
31661    ///  "examples": [
31662    ///    "in"
31663    ///  ],
31664    ///  "type": "string",
31665    ///  "enum": [
31666    ///    "in",
31667    ///    "not in"
31668    ///  ]
31669    ///}
31670    /// ```
31671    /// </details>
31672    #[derive(
31673        ::serde::Deserialize,
31674        ::serde::Serialize,
31675        Clone,
31676        Copy,
31677        Debug,
31678        Eq,
31679        Hash,
31680        Ord,
31681        PartialEq,
31682        PartialOrd,
31683    )]
31684    pub enum SolAddressCriterionOperator {
31685        #[serde(rename = "in")]
31686        In,
31687        #[serde(rename = "not in")]
31688        NotIn,
31689    }
31690    impl ::std::convert::From<&Self> for SolAddressCriterionOperator {
31691        fn from(value: &SolAddressCriterionOperator) -> Self {
31692            value.clone()
31693        }
31694    }
31695    impl ::std::fmt::Display for SolAddressCriterionOperator {
31696        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31697            match *self {
31698                Self::In => f.write_str("in"),
31699                Self::NotIn => f.write_str("not in"),
31700            }
31701        }
31702    }
31703    impl ::std::str::FromStr for SolAddressCriterionOperator {
31704        type Err = self::error::ConversionError;
31705        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31706            match value {
31707                "in" => Ok(Self::In),
31708                "not in" => Ok(Self::NotIn),
31709                _ => Err("invalid value".into()),
31710            }
31711        }
31712    }
31713    impl ::std::convert::TryFrom<&str> for SolAddressCriterionOperator {
31714        type Error = self::error::ConversionError;
31715        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31716            value.parse()
31717        }
31718    }
31719    impl ::std::convert::TryFrom<&::std::string::String> for SolAddressCriterionOperator {
31720        type Error = self::error::ConversionError;
31721        fn try_from(
31722            value: &::std::string::String,
31723        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31724            value.parse()
31725        }
31726    }
31727    impl ::std::convert::TryFrom<::std::string::String> for SolAddressCriterionOperator {
31728        type Error = self::error::ConversionError;
31729        fn try_from(
31730            value: ::std::string::String,
31731        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31732            value.parse()
31733        }
31734    }
31735    ///The type of criterion to use. This should be `solAddress`.
31736    ///
31737    /// <details><summary>JSON schema</summary>
31738    ///
31739    /// ```json
31740    ///{
31741    ///  "description": "The type of criterion to use. This should be `solAddress`.",
31742    ///  "examples": [
31743    ///    "solAddress"
31744    ///  ],
31745    ///  "type": "string",
31746    ///  "enum": [
31747    ///    "solAddress"
31748    ///  ]
31749    ///}
31750    /// ```
31751    /// </details>
31752    #[derive(
31753        ::serde::Deserialize,
31754        ::serde::Serialize,
31755        Clone,
31756        Copy,
31757        Debug,
31758        Eq,
31759        Hash,
31760        Ord,
31761        PartialEq,
31762        PartialOrd,
31763    )]
31764    pub enum SolAddressCriterionType {
31765        #[serde(rename = "solAddress")]
31766        SolAddress,
31767    }
31768    impl ::std::convert::From<&Self> for SolAddressCriterionType {
31769        fn from(value: &SolAddressCriterionType) -> Self {
31770            value.clone()
31771        }
31772    }
31773    impl ::std::fmt::Display for SolAddressCriterionType {
31774        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31775            match *self {
31776                Self::SolAddress => f.write_str("solAddress"),
31777            }
31778        }
31779    }
31780    impl ::std::str::FromStr for SolAddressCriterionType {
31781        type Err = self::error::ConversionError;
31782        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31783            match value {
31784                "solAddress" => Ok(Self::SolAddress),
31785                _ => Err("invalid value".into()),
31786            }
31787        }
31788    }
31789    impl ::std::convert::TryFrom<&str> for SolAddressCriterionType {
31790        type Error = self::error::ConversionError;
31791        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
31792            value.parse()
31793        }
31794    }
31795    impl ::std::convert::TryFrom<&::std::string::String> for SolAddressCriterionType {
31796        type Error = self::error::ConversionError;
31797        fn try_from(
31798            value: &::std::string::String,
31799        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31800            value.parse()
31801        }
31802    }
31803    impl ::std::convert::TryFrom<::std::string::String> for SolAddressCriterionType {
31804        type Error = self::error::ConversionError;
31805        fn try_from(
31806            value: ::std::string::String,
31807        ) -> ::std::result::Result<Self, self::error::ConversionError> {
31808            value.parse()
31809        }
31810    }
31811    ///A single condition to apply against a specific instruction type and its parameters.
31812    ///
31813    /// <details><summary>JSON schema</summary>
31814    ///
31815    /// ```json
31816    ///{
31817    ///  "description": "A single condition to apply against a specific instruction type and its parameters.",
31818    ///  "type": "object",
31819    ///  "required": [
31820    ///    "instruction"
31821    ///  ],
31822    ///  "properties": {
31823    ///    "instruction": {
31824    ///      "description": "The instruction name.",
31825    ///      "examples": [
31826    ///        "transfer_checked"
31827    ///      ],
31828    ///      "type": "string"
31829    ///    },
31830    ///    "params": {
31831    ///      "description": "Parameter conditions for the instruction.",
31832    ///      "examples": [
31833    ///        [
31834    ///          {
31835    ///            "name": "amount",
31836    ///            "operator": "<=",
31837    ///            "value": "1000000"
31838    ///          },
31839    ///          {
31840    ///            "name": "decimals",
31841    ///            "operator": "==",
31842    ///            "value": "6"
31843    ///          },
31844    ///          {
31845    ///            "name": "owner",
31846    ///            "operator": "in",
31847    ///            "values": [
31848    ///              "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
31849    ///              "So11111111111111111111111111111111111111112"
31850    ///            ]
31851    ///          }
31852    ///        ]
31853    ///      ],
31854    ///      "type": "array",
31855    ///      "items": {
31856    ///        "description": "A list of parameter conditions to apply against a specific instruction's data.",
31857    ///        "oneOf": [
31858    ///          {
31859    ///            "$ref": "#/components/schemas/SolDataParameterCondition"
31860    ///          },
31861    ///          {
31862    ///            "$ref": "#/components/schemas/SolDataParameterConditionList"
31863    ///          }
31864    ///        ]
31865    ///      }
31866    ///    }
31867    ///  },
31868    ///  "x-audience": "public"
31869    ///}
31870    /// ```
31871    /// </details>
31872    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31873    pub struct SolDataCondition {
31874        ///The instruction name.
31875        pub instruction: ::std::string::String,
31876        ///Parameter conditions for the instruction.
31877        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
31878        pub params: ::std::vec::Vec<SolDataConditionParamsItem>,
31879    }
31880    impl ::std::convert::From<&SolDataCondition> for SolDataCondition {
31881        fn from(value: &SolDataCondition) -> Self {
31882            value.clone()
31883        }
31884    }
31885    impl SolDataCondition {
31886        pub fn builder() -> builder::SolDataCondition {
31887            Default::default()
31888        }
31889    }
31890    ///A list of parameter conditions to apply against a specific instruction's data.
31891    ///
31892    /// <details><summary>JSON schema</summary>
31893    ///
31894    /// ```json
31895    ///{
31896    ///  "description": "A list of parameter conditions to apply against a specific instruction's data.",
31897    ///  "oneOf": [
31898    ///    {
31899    ///      "$ref": "#/components/schemas/SolDataParameterCondition"
31900    ///    },
31901    ///    {
31902    ///      "$ref": "#/components/schemas/SolDataParameterConditionList"
31903    ///    }
31904    ///  ]
31905    ///}
31906    /// ```
31907    /// </details>
31908    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
31909    #[serde(untagged)]
31910    pub enum SolDataConditionParamsItem {
31911        Variant0(SolDataParameterCondition),
31912        Variant1(SolDataParameterConditionList),
31913    }
31914    impl ::std::convert::From<&Self> for SolDataConditionParamsItem {
31915        fn from(value: &SolDataConditionParamsItem) -> Self {
31916            value.clone()
31917        }
31918    }
31919    impl ::std::convert::From<SolDataParameterCondition> for SolDataConditionParamsItem {
31920        fn from(value: SolDataParameterCondition) -> Self {
31921            Self::Variant0(value)
31922        }
31923    }
31924    impl ::std::convert::From<SolDataParameterConditionList> for SolDataConditionParamsItem {
31925        fn from(value: SolDataParameterConditionList) -> Self {
31926            Self::Variant1(value)
31927        }
31928    }
31929    ///A schema for specifying criterion for instruction data in a Solana transaction.
31930    ///
31931    /// <details><summary>JSON schema</summary>
31932    ///
31933    /// ```json
31934    ///{
31935    ///  "description": "A schema for specifying criterion for instruction data in a Solana transaction.",
31936    ///  "type": "object",
31937    ///  "required": [
31938    ///    "conditions",
31939    ///    "idls",
31940    ///    "type"
31941    ///  ],
31942    ///  "properties": {
31943    ///    "conditions": {
31944    ///      "description": "A list of conditions to apply against the transaction instruction. Only one condition must evaluate to true for this criterion to be met.",
31945    ///      "examples": [
31946    ///        [
31947    ///          {
31948    ///            "instruction": "transfer_checked",
31949    ///            "params": [
31950    ///              {
31951    ///                "name": "lamports",
31952    ///                "operator": "<=",
31953    ///                "value": "1000000"
31954    ///              },
31955    ///              {
31956    ///                "name": "space",
31957    ///                "operator": "==",
31958    ///                "value": "64"
31959    ///              }
31960    ///            ]
31961    ///          }
31962    ///        ]
31963    ///      ],
31964    ///      "type": "array",
31965    ///      "items": {
31966    ///        "$ref": "#/components/schemas/SolDataCondition"
31967    ///      }
31968    ///    },
31969    ///    "idls": {
31970    ///      "description": "List of IDL specifications. Can contain known program names (strings) or custom IDL objects.",
31971    ///      "examples": [
31972    ///        [
31973    ///          "SystemProgram",
31974    ///          "TokenProgram",
31975    ///          {
31976    ///            "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
31977    ///            "instructions": [
31978    ///              {
31979    ///                "args": [
31980    ///                  {
31981    ///                    "name": "amount",
31982    ///                    "type": "u64"
31983    ///                  },
31984    ///                  {
31985    ///                    "name": "decimals",
31986    ///                    "type": "u8"
31987    ///                  }
31988    ///                ],
31989    ///                "discriminator": [
31990    ///                  119,
31991    ///                  250,
31992    ///                  202,
31993    ///                  24,
31994    ///                  253,
31995    ///                  135,
31996    ///                  244,
31997    ///                  121
31998    ///                ],
31999    ///                "name": "transfer_checked"
32000    ///              }
32001    ///            ]
32002    ///          }
32003    ///        ]
32004    ///      ],
32005    ///      "type": "array",
32006    ///      "items": {
32007    ///        "oneOf": [
32008    ///          {
32009    ///            "$ref": "#/components/schemas/KnownIdlType"
32010    ///          },
32011    ///          {
32012    ///            "$ref": "#/components/schemas/Idl"
32013    ///          }
32014    ///        ]
32015    ///      }
32016    ///    },
32017    ///    "type": {
32018    ///      "description": "The type of criterion to use. This should be `solData`.",
32019    ///      "examples": [
32020    ///        "solData"
32021    ///      ],
32022    ///      "type": "string",
32023    ///      "enum": [
32024    ///        "solData"
32025    ///      ]
32026    ///    }
32027    ///  },
32028    ///  "x-audience": "public"
32029    ///}
32030    /// ```
32031    /// </details>
32032    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32033    pub struct SolDataCriterion {
32034        ///A list of conditions to apply against the transaction instruction. Only one condition must evaluate to true for this criterion to be met.
32035        pub conditions: ::std::vec::Vec<SolDataCondition>,
32036        ///List of IDL specifications. Can contain known program names (strings) or custom IDL objects.
32037        pub idls: ::std::vec::Vec<SolDataCriterionIdlsItem>,
32038        ///The type of criterion to use. This should be `solData`.
32039        #[serde(rename = "type")]
32040        pub type_: SolDataCriterionType,
32041    }
32042    impl ::std::convert::From<&SolDataCriterion> for SolDataCriterion {
32043        fn from(value: &SolDataCriterion) -> Self {
32044            value.clone()
32045        }
32046    }
32047    impl SolDataCriterion {
32048        pub fn builder() -> builder::SolDataCriterion {
32049            Default::default()
32050        }
32051    }
32052    ///`SolDataCriterionIdlsItem`
32053    ///
32054    /// <details><summary>JSON schema</summary>
32055    ///
32056    /// ```json
32057    ///{
32058    ///  "oneOf": [
32059    ///    {
32060    ///      "$ref": "#/components/schemas/KnownIdlType"
32061    ///    },
32062    ///    {
32063    ///      "$ref": "#/components/schemas/Idl"
32064    ///    }
32065    ///  ]
32066    ///}
32067    /// ```
32068    /// </details>
32069    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32070    #[serde(untagged)]
32071    pub enum SolDataCriterionIdlsItem {
32072        KnownIdlType(KnownIdlType),
32073        Idl(Idl),
32074    }
32075    impl ::std::convert::From<&Self> for SolDataCriterionIdlsItem {
32076        fn from(value: &SolDataCriterionIdlsItem) -> Self {
32077            value.clone()
32078        }
32079    }
32080    impl ::std::convert::From<KnownIdlType> for SolDataCriterionIdlsItem {
32081        fn from(value: KnownIdlType) -> Self {
32082            Self::KnownIdlType(value)
32083        }
32084    }
32085    impl ::std::convert::From<Idl> for SolDataCriterionIdlsItem {
32086        fn from(value: Idl) -> Self {
32087            Self::Idl(value)
32088        }
32089    }
32090    ///The type of criterion to use. This should be `solData`.
32091    ///
32092    /// <details><summary>JSON schema</summary>
32093    ///
32094    /// ```json
32095    ///{
32096    ///  "description": "The type of criterion to use. This should be `solData`.",
32097    ///  "examples": [
32098    ///    "solData"
32099    ///  ],
32100    ///  "type": "string",
32101    ///  "enum": [
32102    ///    "solData"
32103    ///  ]
32104    ///}
32105    /// ```
32106    /// </details>
32107    #[derive(
32108        ::serde::Deserialize,
32109        ::serde::Serialize,
32110        Clone,
32111        Copy,
32112        Debug,
32113        Eq,
32114        Hash,
32115        Ord,
32116        PartialEq,
32117        PartialOrd,
32118    )]
32119    pub enum SolDataCriterionType {
32120        #[serde(rename = "solData")]
32121        SolData,
32122    }
32123    impl ::std::convert::From<&Self> for SolDataCriterionType {
32124        fn from(value: &SolDataCriterionType) -> Self {
32125            value.clone()
32126        }
32127    }
32128    impl ::std::fmt::Display for SolDataCriterionType {
32129        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32130            match *self {
32131                Self::SolData => f.write_str("solData"),
32132            }
32133        }
32134    }
32135    impl ::std::str::FromStr for SolDataCriterionType {
32136        type Err = self::error::ConversionError;
32137        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32138            match value {
32139                "solData" => Ok(Self::SolData),
32140                _ => Err("invalid value".into()),
32141            }
32142        }
32143    }
32144    impl ::std::convert::TryFrom<&str> for SolDataCriterionType {
32145        type Error = self::error::ConversionError;
32146        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32147            value.parse()
32148        }
32149    }
32150    impl ::std::convert::TryFrom<&::std::string::String> for SolDataCriterionType {
32151        type Error = self::error::ConversionError;
32152        fn try_from(
32153            value: &::std::string::String,
32154        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32155            value.parse()
32156        }
32157    }
32158    impl ::std::convert::TryFrom<::std::string::String> for SolDataCriterionType {
32159        type Error = self::error::ConversionError;
32160        fn try_from(
32161            value: ::std::string::String,
32162        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32163            value.parse()
32164        }
32165    }
32166    ///A single parameter condition to apply against a specific instruction's parameters.
32167    ///
32168    /// <details><summary>JSON schema</summary>
32169    ///
32170    /// ```json
32171    ///{
32172    ///  "title": "SolDataParameterCondition",
32173    ///  "description": "A single parameter condition to apply against a specific instruction's parameters.",
32174    ///  "type": "object",
32175    ///  "required": [
32176    ///    "name",
32177    ///    "operator",
32178    ///    "value"
32179    ///  ],
32180    ///  "properties": {
32181    ///    "name": {
32182    ///      "description": "The parameter name.",
32183    ///      "examples": [
32184    ///        "amount"
32185    ///      ],
32186    ///      "type": "string"
32187    ///    },
32188    ///    "operator": {
32189    ///      "description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
32190    ///      "examples": [
32191    ///        "=="
32192    ///      ],
32193    ///      "type": "string",
32194    ///      "enum": [
32195    ///        "GreaterThan",
32196    ///        "GreaterThanOrEqual",
32197    ///        "LessThan",
32198    ///        "LessThanOrEqual",
32199    ///        "Equal"
32200    ///      ]
32201    ///    },
32202    ///    "value": {
32203    ///      "description": "The value to compare against.",
32204    ///      "examples": [
32205    ///        "1000000"
32206    ///      ],
32207    ///      "type": "string"
32208    ///    }
32209    ///  },
32210    ///  "x-audience": "public"
32211    ///}
32212    /// ```
32213    /// </details>
32214    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32215    pub struct SolDataParameterCondition {
32216        ///The parameter name.
32217        pub name: ::std::string::String,
32218        ///The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
32219        pub operator: SolDataParameterConditionOperator,
32220        ///The value to compare against.
32221        pub value: ::std::string::String,
32222    }
32223    impl ::std::convert::From<&SolDataParameterCondition> for SolDataParameterCondition {
32224        fn from(value: &SolDataParameterCondition) -> Self {
32225            value.clone()
32226        }
32227    }
32228    impl SolDataParameterCondition {
32229        pub fn builder() -> builder::SolDataParameterCondition {
32230            Default::default()
32231        }
32232    }
32233    ///A single parameter condition to apply against a specific instruction's parameters.
32234    ///
32235    /// <details><summary>JSON schema</summary>
32236    ///
32237    /// ```json
32238    ///{
32239    ///  "title": "SolDataParameterConditionList",
32240    ///  "description": "A single parameter condition to apply against a specific instruction's parameters.",
32241    ///  "type": "object",
32242    ///  "required": [
32243    ///    "name",
32244    ///    "operator",
32245    ///    "values"
32246    ///  ],
32247    ///  "properties": {
32248    ///    "name": {
32249    ///      "description": "The parameter name.",
32250    ///      "examples": [
32251    ///        "amount"
32252    ///      ],
32253    ///      "type": "string"
32254    ///    },
32255    ///    "operator": {
32256    ///      "description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
32257    ///      "examples": [
32258    ///        "in"
32259    ///      ],
32260    ///      "type": "string",
32261    ///      "enum": [
32262    ///        "in",
32263    ///        "not in"
32264    ///      ]
32265    ///    },
32266    ///    "values": {
32267    ///      "description": "The values to compare against.",
32268    ///      "examples": [
32269    ///        [
32270    ///          "1000000",
32271    ///          "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT",
32272    ///          "6"
32273    ///        ]
32274    ///      ],
32275    ///      "type": "array",
32276    ///      "items": {
32277    ///        "description": "A single potential value to compare against the resolved `name` value.",
32278    ///        "examples": [
32279    ///          "1000000"
32280    ///        ],
32281    ///        "type": "string"
32282    ///      }
32283    ///    }
32284    ///  },
32285    ///  "x-audience": "public"
32286    ///}
32287    /// ```
32288    /// </details>
32289    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32290    pub struct SolDataParameterConditionList {
32291        ///The parameter name.
32292        pub name: ::std::string::String,
32293        ///The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
32294        pub operator: SolDataParameterConditionListOperator,
32295        ///The values to compare against.
32296        pub values: ::std::vec::Vec<::std::string::String>,
32297    }
32298    impl ::std::convert::From<&SolDataParameterConditionList> for SolDataParameterConditionList {
32299        fn from(value: &SolDataParameterConditionList) -> Self {
32300            value.clone()
32301        }
32302    }
32303    impl SolDataParameterConditionList {
32304        pub fn builder() -> builder::SolDataParameterConditionList {
32305            Default::default()
32306        }
32307    }
32308    ///The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
32309    ///
32310    /// <details><summary>JSON schema</summary>
32311    ///
32312    /// ```json
32313    ///{
32314    ///  "description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
32315    ///  "examples": [
32316    ///    "in"
32317    ///  ],
32318    ///  "type": "string",
32319    ///  "enum": [
32320    ///    "in",
32321    ///    "not in"
32322    ///  ]
32323    ///}
32324    /// ```
32325    /// </details>
32326    #[derive(
32327        ::serde::Deserialize,
32328        ::serde::Serialize,
32329        Clone,
32330        Copy,
32331        Debug,
32332        Eq,
32333        Hash,
32334        Ord,
32335        PartialEq,
32336        PartialOrd,
32337    )]
32338    pub enum SolDataParameterConditionListOperator {
32339        #[serde(rename = "in")]
32340        In,
32341        #[serde(rename = "not in")]
32342        NotIn,
32343    }
32344    impl ::std::convert::From<&Self> for SolDataParameterConditionListOperator {
32345        fn from(value: &SolDataParameterConditionListOperator) -> Self {
32346            value.clone()
32347        }
32348    }
32349    impl ::std::fmt::Display for SolDataParameterConditionListOperator {
32350        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32351            match *self {
32352                Self::In => f.write_str("in"),
32353                Self::NotIn => f.write_str("not in"),
32354            }
32355        }
32356    }
32357    impl ::std::str::FromStr for SolDataParameterConditionListOperator {
32358        type Err = self::error::ConversionError;
32359        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32360            match value {
32361                "in" => Ok(Self::In),
32362                "not in" => Ok(Self::NotIn),
32363                _ => Err("invalid value".into()),
32364            }
32365        }
32366    }
32367    impl ::std::convert::TryFrom<&str> for SolDataParameterConditionListOperator {
32368        type Error = self::error::ConversionError;
32369        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32370            value.parse()
32371        }
32372    }
32373    impl ::std::convert::TryFrom<&::std::string::String> for SolDataParameterConditionListOperator {
32374        type Error = self::error::ConversionError;
32375        fn try_from(
32376            value: &::std::string::String,
32377        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32378            value.parse()
32379        }
32380    }
32381    impl ::std::convert::TryFrom<::std::string::String> for SolDataParameterConditionListOperator {
32382        type Error = self::error::ConversionError;
32383        fn try_from(
32384            value: ::std::string::String,
32385        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32386            value.parse()
32387        }
32388    }
32389    ///The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.
32390    ///
32391    /// <details><summary>JSON schema</summary>
32392    ///
32393    /// ```json
32394    ///{
32395    ///  "description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
32396    ///  "examples": [
32397    ///    "=="
32398    ///  ],
32399    ///  "type": "string",
32400    ///  "enum": [
32401    ///    "GreaterThan",
32402    ///    "GreaterThanOrEqual",
32403    ///    "LessThan",
32404    ///    "LessThanOrEqual",
32405    ///    "Equal"
32406    ///  ]
32407    ///}
32408    /// ```
32409    /// </details>
32410    #[derive(
32411        ::serde::Deserialize,
32412        ::serde::Serialize,
32413        Clone,
32414        Copy,
32415        Debug,
32416        Eq,
32417        Hash,
32418        Ord,
32419        PartialEq,
32420        PartialOrd,
32421    )]
32422    pub enum SolDataParameterConditionOperator {
32423        GreaterThan,
32424        GreaterThanOrEqual,
32425        LessThan,
32426        LessThanOrEqual,
32427        Equal,
32428    }
32429    impl ::std::convert::From<&Self> for SolDataParameterConditionOperator {
32430        fn from(value: &SolDataParameterConditionOperator) -> Self {
32431            value.clone()
32432        }
32433    }
32434    impl ::std::fmt::Display for SolDataParameterConditionOperator {
32435        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32436            match *self {
32437                Self::GreaterThan => f.write_str("GreaterThan"),
32438                Self::GreaterThanOrEqual => f.write_str("GreaterThanOrEqual"),
32439                Self::LessThan => f.write_str("LessThan"),
32440                Self::LessThanOrEqual => f.write_str("LessThanOrEqual"),
32441                Self::Equal => f.write_str("Equal"),
32442            }
32443        }
32444    }
32445    impl ::std::str::FromStr for SolDataParameterConditionOperator {
32446        type Err = self::error::ConversionError;
32447        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32448            match value {
32449                "GreaterThan" => Ok(Self::GreaterThan),
32450                "GreaterThanOrEqual" => Ok(Self::GreaterThanOrEqual),
32451                "LessThan" => Ok(Self::LessThan),
32452                "LessThanOrEqual" => Ok(Self::LessThanOrEqual),
32453                "Equal" => Ok(Self::Equal),
32454                _ => Err("invalid value".into()),
32455            }
32456        }
32457    }
32458    impl ::std::convert::TryFrom<&str> for SolDataParameterConditionOperator {
32459        type Error = self::error::ConversionError;
32460        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32461            value.parse()
32462        }
32463    }
32464    impl ::std::convert::TryFrom<&::std::string::String> for SolDataParameterConditionOperator {
32465        type Error = self::error::ConversionError;
32466        fn try_from(
32467            value: &::std::string::String,
32468        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32469            value.parse()
32470        }
32471    }
32472    impl ::std::convert::TryFrom<::std::string::String> for SolDataParameterConditionOperator {
32473        type Error = self::error::ConversionError;
32474        fn try_from(
32475            value: ::std::string::String,
32476        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32477            value.parse()
32478        }
32479    }
32480    ///The criterion for the message of a Solana transaction.
32481    ///
32482    /// <details><summary>JSON schema</summary>
32483    ///
32484    /// ```json
32485    ///{
32486    ///  "title": "SolMessageCriterion",
32487    ///  "description": "The criterion for the message of a Solana transaction.",
32488    ///  "type": "object",
32489    ///  "required": [
32490    ///    "match",
32491    ///    "type"
32492    ///  ],
32493    ///  "properties": {
32494    ///    "match": {
32495    ///      "description": "A regular expression the field is matched against.",
32496    ///      "examples": [
32497    ///        "^hello ([a-z]+)$"
32498    ///      ],
32499    ///      "type": "string"
32500    ///    },
32501    ///    "type": {
32502    ///      "description": "The type of criterion to use. This should be `solMessage`.",
32503    ///      "examples": [
32504    ///        "solMessage"
32505    ///      ],
32506    ///      "type": "string",
32507    ///      "enum": [
32508    ///        "solMessage"
32509    ///      ]
32510    ///    }
32511    ///  },
32512    ///  "x-audience": "public"
32513    ///}
32514    /// ```
32515    /// </details>
32516    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32517    pub struct SolMessageCriterion {
32518        ///A regular expression the field is matched against.
32519        #[serde(rename = "match")]
32520        pub match_: ::std::string::String,
32521        ///The type of criterion to use. This should be `solMessage`.
32522        #[serde(rename = "type")]
32523        pub type_: SolMessageCriterionType,
32524    }
32525    impl ::std::convert::From<&SolMessageCriterion> for SolMessageCriterion {
32526        fn from(value: &SolMessageCriterion) -> Self {
32527            value.clone()
32528        }
32529    }
32530    impl SolMessageCriterion {
32531        pub fn builder() -> builder::SolMessageCriterion {
32532            Default::default()
32533        }
32534    }
32535    ///The type of criterion to use. This should be `solMessage`.
32536    ///
32537    /// <details><summary>JSON schema</summary>
32538    ///
32539    /// ```json
32540    ///{
32541    ///  "description": "The type of criterion to use. This should be `solMessage`.",
32542    ///  "examples": [
32543    ///    "solMessage"
32544    ///  ],
32545    ///  "type": "string",
32546    ///  "enum": [
32547    ///    "solMessage"
32548    ///  ]
32549    ///}
32550    /// ```
32551    /// </details>
32552    #[derive(
32553        ::serde::Deserialize,
32554        ::serde::Serialize,
32555        Clone,
32556        Copy,
32557        Debug,
32558        Eq,
32559        Hash,
32560        Ord,
32561        PartialEq,
32562        PartialOrd,
32563    )]
32564    pub enum SolMessageCriterionType {
32565        #[serde(rename = "solMessage")]
32566        SolMessage,
32567    }
32568    impl ::std::convert::From<&Self> for SolMessageCriterionType {
32569        fn from(value: &SolMessageCriterionType) -> Self {
32570            value.clone()
32571        }
32572    }
32573    impl ::std::fmt::Display for SolMessageCriterionType {
32574        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32575            match *self {
32576                Self::SolMessage => f.write_str("solMessage"),
32577            }
32578        }
32579    }
32580    impl ::std::str::FromStr for SolMessageCriterionType {
32581        type Err = self::error::ConversionError;
32582        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32583            match value {
32584                "solMessage" => Ok(Self::SolMessage),
32585                _ => Err("invalid value".into()),
32586            }
32587        }
32588    }
32589    impl ::std::convert::TryFrom<&str> for SolMessageCriterionType {
32590        type Error = self::error::ConversionError;
32591        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32592            value.parse()
32593        }
32594    }
32595    impl ::std::convert::TryFrom<&::std::string::String> for SolMessageCriterionType {
32596        type Error = self::error::ConversionError;
32597        fn try_from(
32598            value: &::std::string::String,
32599        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32600            value.parse()
32601        }
32602    }
32603    impl ::std::convert::TryFrom<::std::string::String> for SolMessageCriterionType {
32604        type Error = self::error::ConversionError;
32605        fn try_from(
32606            value: ::std::string::String,
32607        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32608            value.parse()
32609        }
32610    }
32611    ///The criterion for the Solana network of a transaction.
32612    ///
32613    /// <details><summary>JSON schema</summary>
32614    ///
32615    /// ```json
32616    ///{
32617    ///  "title": "SolNetworkCriterion",
32618    ///  "description": "The criterion for the Solana network of a transaction.",
32619    ///  "type": "object",
32620    ///  "required": [
32621    ///    "networks",
32622    ///    "operator",
32623    ///    "type"
32624    ///  ],
32625    ///  "properties": {
32626    ///    "networks": {
32627    ///      "description": "The Solana networks that the transaction's intended network should be compared to.",
32628    ///      "examples": [
32629    ///        [
32630    ///          "solana-devnet",
32631    ///          "solana"
32632    ///        ]
32633    ///      ],
32634    ///      "type": "array",
32635    ///      "items": {
32636    ///        "description": "The Solana network the transaction is for.",
32637    ///        "examples": [
32638    ///          "solana-devnet"
32639    ///        ],
32640    ///        "type": "string",
32641    ///        "enum": [
32642    ///          "solana-devnet",
32643    ///          "solana"
32644    ///        ]
32645    ///      }
32646    ///    },
32647    ///    "operator": {
32648    ///      "description": "The operator to use for the comparison. The transaction's intended network will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.",
32649    ///      "examples": [
32650    ///        "in"
32651    ///      ],
32652    ///      "type": "string",
32653    ///      "enum": [
32654    ///        "in",
32655    ///        "not in"
32656    ///      ]
32657    ///    },
32658    ///    "type": {
32659    ///      "description": "The type of criterion to use. This should be `solNetwork`.",
32660    ///      "examples": [
32661    ///        "solNetwork"
32662    ///      ],
32663    ///      "type": "string",
32664    ///      "enum": [
32665    ///        "solNetwork"
32666    ///      ]
32667    ///    }
32668    ///  },
32669    ///  "x-audience": "public"
32670    ///}
32671    /// ```
32672    /// </details>
32673    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32674    pub struct SolNetworkCriterion {
32675        ///The Solana networks that the transaction's intended network should be compared to.
32676        pub networks: ::std::vec::Vec<SolNetworkCriterionNetworksItem>,
32677        ///The operator to use for the comparison. The transaction's intended network will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.
32678        pub operator: SolNetworkCriterionOperator,
32679        ///The type of criterion to use. This should be `solNetwork`.
32680        #[serde(rename = "type")]
32681        pub type_: SolNetworkCriterionType,
32682    }
32683    impl ::std::convert::From<&SolNetworkCriterion> for SolNetworkCriterion {
32684        fn from(value: &SolNetworkCriterion) -> Self {
32685            value.clone()
32686        }
32687    }
32688    impl SolNetworkCriterion {
32689        pub fn builder() -> builder::SolNetworkCriterion {
32690            Default::default()
32691        }
32692    }
32693    ///The Solana network the transaction is for.
32694    ///
32695    /// <details><summary>JSON schema</summary>
32696    ///
32697    /// ```json
32698    ///{
32699    ///  "description": "The Solana network the transaction is for.",
32700    ///  "examples": [
32701    ///    "solana-devnet"
32702    ///  ],
32703    ///  "type": "string",
32704    ///  "enum": [
32705    ///    "solana-devnet",
32706    ///    "solana"
32707    ///  ]
32708    ///}
32709    /// ```
32710    /// </details>
32711    #[derive(
32712        ::serde::Deserialize,
32713        ::serde::Serialize,
32714        Clone,
32715        Copy,
32716        Debug,
32717        Eq,
32718        Hash,
32719        Ord,
32720        PartialEq,
32721        PartialOrd,
32722    )]
32723    pub enum SolNetworkCriterionNetworksItem {
32724        #[serde(rename = "solana-devnet")]
32725        SolanaDevnet,
32726        #[serde(rename = "solana")]
32727        Solana,
32728    }
32729    impl ::std::convert::From<&Self> for SolNetworkCriterionNetworksItem {
32730        fn from(value: &SolNetworkCriterionNetworksItem) -> Self {
32731            value.clone()
32732        }
32733    }
32734    impl ::std::fmt::Display for SolNetworkCriterionNetworksItem {
32735        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32736            match *self {
32737                Self::SolanaDevnet => f.write_str("solana-devnet"),
32738                Self::Solana => f.write_str("solana"),
32739            }
32740        }
32741    }
32742    impl ::std::str::FromStr for SolNetworkCriterionNetworksItem {
32743        type Err = self::error::ConversionError;
32744        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32745            match value {
32746                "solana-devnet" => Ok(Self::SolanaDevnet),
32747                "solana" => Ok(Self::Solana),
32748                _ => Err("invalid value".into()),
32749            }
32750        }
32751    }
32752    impl ::std::convert::TryFrom<&str> for SolNetworkCriterionNetworksItem {
32753        type Error = self::error::ConversionError;
32754        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32755            value.parse()
32756        }
32757    }
32758    impl ::std::convert::TryFrom<&::std::string::String> for SolNetworkCriterionNetworksItem {
32759        type Error = self::error::ConversionError;
32760        fn try_from(
32761            value: &::std::string::String,
32762        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32763            value.parse()
32764        }
32765    }
32766    impl ::std::convert::TryFrom<::std::string::String> for SolNetworkCriterionNetworksItem {
32767        type Error = self::error::ConversionError;
32768        fn try_from(
32769            value: ::std::string::String,
32770        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32771            value.parse()
32772        }
32773    }
32774    ///The operator to use for the comparison. The transaction's intended network will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.
32775    ///
32776    /// <details><summary>JSON schema</summary>
32777    ///
32778    /// ```json
32779    ///{
32780    ///  "description": "The operator to use for the comparison. The transaction's intended network will be on the left-hand side of the operator, and the `networks` field will be on the right-hand side.",
32781    ///  "examples": [
32782    ///    "in"
32783    ///  ],
32784    ///  "type": "string",
32785    ///  "enum": [
32786    ///    "in",
32787    ///    "not in"
32788    ///  ]
32789    ///}
32790    /// ```
32791    /// </details>
32792    #[derive(
32793        ::serde::Deserialize,
32794        ::serde::Serialize,
32795        Clone,
32796        Copy,
32797        Debug,
32798        Eq,
32799        Hash,
32800        Ord,
32801        PartialEq,
32802        PartialOrd,
32803    )]
32804    pub enum SolNetworkCriterionOperator {
32805        #[serde(rename = "in")]
32806        In,
32807        #[serde(rename = "not in")]
32808        NotIn,
32809    }
32810    impl ::std::convert::From<&Self> for SolNetworkCriterionOperator {
32811        fn from(value: &SolNetworkCriterionOperator) -> Self {
32812            value.clone()
32813        }
32814    }
32815    impl ::std::fmt::Display for SolNetworkCriterionOperator {
32816        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32817            match *self {
32818                Self::In => f.write_str("in"),
32819                Self::NotIn => f.write_str("not in"),
32820            }
32821        }
32822    }
32823    impl ::std::str::FromStr for SolNetworkCriterionOperator {
32824        type Err = self::error::ConversionError;
32825        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32826            match value {
32827                "in" => Ok(Self::In),
32828                "not in" => Ok(Self::NotIn),
32829                _ => Err("invalid value".into()),
32830            }
32831        }
32832    }
32833    impl ::std::convert::TryFrom<&str> for SolNetworkCriterionOperator {
32834        type Error = self::error::ConversionError;
32835        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32836            value.parse()
32837        }
32838    }
32839    impl ::std::convert::TryFrom<&::std::string::String> for SolNetworkCriterionOperator {
32840        type Error = self::error::ConversionError;
32841        fn try_from(
32842            value: &::std::string::String,
32843        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32844            value.parse()
32845        }
32846    }
32847    impl ::std::convert::TryFrom<::std::string::String> for SolNetworkCriterionOperator {
32848        type Error = self::error::ConversionError;
32849        fn try_from(
32850            value: ::std::string::String,
32851        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32852            value.parse()
32853        }
32854    }
32855    ///The type of criterion to use. This should be `solNetwork`.
32856    ///
32857    /// <details><summary>JSON schema</summary>
32858    ///
32859    /// ```json
32860    ///{
32861    ///  "description": "The type of criterion to use. This should be `solNetwork`.",
32862    ///  "examples": [
32863    ///    "solNetwork"
32864    ///  ],
32865    ///  "type": "string",
32866    ///  "enum": [
32867    ///    "solNetwork"
32868    ///  ]
32869    ///}
32870    /// ```
32871    /// </details>
32872    #[derive(
32873        ::serde::Deserialize,
32874        ::serde::Serialize,
32875        Clone,
32876        Copy,
32877        Debug,
32878        Eq,
32879        Hash,
32880        Ord,
32881        PartialEq,
32882        PartialOrd,
32883    )]
32884    pub enum SolNetworkCriterionType {
32885        #[serde(rename = "solNetwork")]
32886        SolNetwork,
32887    }
32888    impl ::std::convert::From<&Self> for SolNetworkCriterionType {
32889        fn from(value: &SolNetworkCriterionType) -> Self {
32890            value.clone()
32891        }
32892    }
32893    impl ::std::fmt::Display for SolNetworkCriterionType {
32894        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32895            match *self {
32896                Self::SolNetwork => f.write_str("solNetwork"),
32897            }
32898        }
32899    }
32900    impl ::std::str::FromStr for SolNetworkCriterionType {
32901        type Err = self::error::ConversionError;
32902        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32903            match value {
32904                "solNetwork" => Ok(Self::SolNetwork),
32905                _ => Err("invalid value".into()),
32906            }
32907        }
32908    }
32909    impl ::std::convert::TryFrom<&str> for SolNetworkCriterionType {
32910        type Error = self::error::ConversionError;
32911        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
32912            value.parse()
32913        }
32914    }
32915    impl ::std::convert::TryFrom<&::std::string::String> for SolNetworkCriterionType {
32916        type Error = self::error::ConversionError;
32917        fn try_from(
32918            value: &::std::string::String,
32919        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32920            value.parse()
32921        }
32922    }
32923    impl ::std::convert::TryFrom<::std::string::String> for SolNetworkCriterionType {
32924        type Error = self::error::ConversionError;
32925        fn try_from(
32926            value: ::std::string::String,
32927        ) -> ::std::result::Result<Self, self::error::ConversionError> {
32928            value.parse()
32929        }
32930    }
32931    ///The criterion for the SOL value in lamports of a native transfer instruction in a Solana transaction.
32932    ///
32933    /// <details><summary>JSON schema</summary>
32934    ///
32935    /// ```json
32936    ///{
32937    ///  "title": "SolValueCriterion",
32938    ///  "description": "The criterion for the SOL value in lamports of a native transfer instruction in a Solana transaction.",
32939    ///  "type": "object",
32940    ///  "required": [
32941    ///    "operator",
32942    ///    "solValue",
32943    ///    "type"
32944    ///  ],
32945    ///  "properties": {
32946    ///    "operator": {
32947    ///      "description": "The operator to use for the comparison. The transaction instruction's `value` field will be on the left-hand side of the operator, and the `solValue` field will be on the right-hand side.",
32948    ///      "examples": [
32949    ///        "<="
32950    ///      ],
32951    ///      "type": "string",
32952    ///      "enum": [
32953    ///        "GreaterThan",
32954    ///        "GreaterThanOrEqual",
32955    ///        "LessThan",
32956    ///        "LessThanOrEqual",
32957    ///        "Equal"
32958    ///      ]
32959    ///    },
32960    ///    "solValue": {
32961    ///      "description": "The amount of SOL in lamports that the transaction instruction's `value` field should be compared to.",
32962    ///      "examples": [
32963    ///        "1000000000000000000"
32964    ///      ],
32965    ///      "type": "string"
32966    ///    },
32967    ///    "type": {
32968    ///      "description": "The type of criterion to use. This should be `solValue`.",
32969    ///      "examples": [
32970    ///        "solValue"
32971    ///      ],
32972    ///      "type": "string",
32973    ///      "enum": [
32974    ///        "solValue"
32975    ///      ]
32976    ///    }
32977    ///  },
32978    ///  "x-audience": "public"
32979    ///}
32980    /// ```
32981    /// </details>
32982    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
32983    pub struct SolValueCriterion {
32984        ///The operator to use for the comparison. The transaction instruction's `value` field will be on the left-hand side of the operator, and the `solValue` field will be on the right-hand side.
32985        pub operator: SolValueCriterionOperator,
32986        ///The amount of SOL in lamports that the transaction instruction's `value` field should be compared to.
32987        #[serde(rename = "solValue")]
32988        pub sol_value: ::std::string::String,
32989        ///The type of criterion to use. This should be `solValue`.
32990        #[serde(rename = "type")]
32991        pub type_: SolValueCriterionType,
32992    }
32993    impl ::std::convert::From<&SolValueCriterion> for SolValueCriterion {
32994        fn from(value: &SolValueCriterion) -> Self {
32995            value.clone()
32996        }
32997    }
32998    impl SolValueCriterion {
32999        pub fn builder() -> builder::SolValueCriterion {
33000            Default::default()
33001        }
33002    }
33003    ///The operator to use for the comparison. The transaction instruction's `value` field will be on the left-hand side of the operator, and the `solValue` field will be on the right-hand side.
33004    ///
33005    /// <details><summary>JSON schema</summary>
33006    ///
33007    /// ```json
33008    ///{
33009    ///  "description": "The operator to use for the comparison. The transaction instruction's `value` field will be on the left-hand side of the operator, and the `solValue` field will be on the right-hand side.",
33010    ///  "examples": [
33011    ///    "<="
33012    ///  ],
33013    ///  "type": "string",
33014    ///  "enum": [
33015    ///    "GreaterThan",
33016    ///    "GreaterThanOrEqual",
33017    ///    "LessThan",
33018    ///    "LessThanOrEqual",
33019    ///    "Equal"
33020    ///  ]
33021    ///}
33022    /// ```
33023    /// </details>
33024    #[derive(
33025        ::serde::Deserialize,
33026        ::serde::Serialize,
33027        Clone,
33028        Copy,
33029        Debug,
33030        Eq,
33031        Hash,
33032        Ord,
33033        PartialEq,
33034        PartialOrd,
33035    )]
33036    pub enum SolValueCriterionOperator {
33037        GreaterThan,
33038        GreaterThanOrEqual,
33039        LessThan,
33040        LessThanOrEqual,
33041        Equal,
33042    }
33043    impl ::std::convert::From<&Self> for SolValueCriterionOperator {
33044        fn from(value: &SolValueCriterionOperator) -> Self {
33045            value.clone()
33046        }
33047    }
33048    impl ::std::fmt::Display for SolValueCriterionOperator {
33049        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33050            match *self {
33051                Self::GreaterThan => f.write_str("GreaterThan"),
33052                Self::GreaterThanOrEqual => f.write_str("GreaterThanOrEqual"),
33053                Self::LessThan => f.write_str("LessThan"),
33054                Self::LessThanOrEqual => f.write_str("LessThanOrEqual"),
33055                Self::Equal => f.write_str("Equal"),
33056            }
33057        }
33058    }
33059    impl ::std::str::FromStr for SolValueCriterionOperator {
33060        type Err = self::error::ConversionError;
33061        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33062            match value {
33063                "GreaterThan" => Ok(Self::GreaterThan),
33064                "GreaterThanOrEqual" => Ok(Self::GreaterThanOrEqual),
33065                "LessThan" => Ok(Self::LessThan),
33066                "LessThanOrEqual" => Ok(Self::LessThanOrEqual),
33067                "Equal" => Ok(Self::Equal),
33068                _ => Err("invalid value".into()),
33069            }
33070        }
33071    }
33072    impl ::std::convert::TryFrom<&str> for SolValueCriterionOperator {
33073        type Error = self::error::ConversionError;
33074        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33075            value.parse()
33076        }
33077    }
33078    impl ::std::convert::TryFrom<&::std::string::String> for SolValueCriterionOperator {
33079        type Error = self::error::ConversionError;
33080        fn try_from(
33081            value: &::std::string::String,
33082        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33083            value.parse()
33084        }
33085    }
33086    impl ::std::convert::TryFrom<::std::string::String> for SolValueCriterionOperator {
33087        type Error = self::error::ConversionError;
33088        fn try_from(
33089            value: ::std::string::String,
33090        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33091            value.parse()
33092        }
33093    }
33094    ///The type of criterion to use. This should be `solValue`.
33095    ///
33096    /// <details><summary>JSON schema</summary>
33097    ///
33098    /// ```json
33099    ///{
33100    ///  "description": "The type of criterion to use. This should be `solValue`.",
33101    ///  "examples": [
33102    ///    "solValue"
33103    ///  ],
33104    ///  "type": "string",
33105    ///  "enum": [
33106    ///    "solValue"
33107    ///  ]
33108    ///}
33109    /// ```
33110    /// </details>
33111    #[derive(
33112        ::serde::Deserialize,
33113        ::serde::Serialize,
33114        Clone,
33115        Copy,
33116        Debug,
33117        Eq,
33118        Hash,
33119        Ord,
33120        PartialEq,
33121        PartialOrd,
33122    )]
33123    pub enum SolValueCriterionType {
33124        #[serde(rename = "solValue")]
33125        SolValue,
33126    }
33127    impl ::std::convert::From<&Self> for SolValueCriterionType {
33128        fn from(value: &SolValueCriterionType) -> Self {
33129            value.clone()
33130        }
33131    }
33132    impl ::std::fmt::Display for SolValueCriterionType {
33133        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
33134            match *self {
33135                Self::SolValue => f.write_str("solValue"),
33136            }
33137        }
33138    }
33139    impl ::std::str::FromStr for SolValueCriterionType {
33140        type Err = self::error::ConversionError;
33141        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33142            match value {
33143                "solValue" => Ok(Self::SolValue),
33144                _ => Err("invalid value".into()),
33145            }
33146        }
33147    }
33148    impl ::std::convert::TryFrom<&str> for SolValueCriterionType {
33149        type Error = self::error::ConversionError;
33150        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33151            value.parse()
33152        }
33153    }
33154    impl ::std::convert::TryFrom<&::std::string::String> for SolValueCriterionType {
33155        type Error = self::error::ConversionError;
33156        fn try_from(
33157            value: &::std::string::String,
33158        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33159            value.parse()
33160        }
33161    }
33162    impl ::std::convert::TryFrom<::std::string::String> for SolValueCriterionType {
33163        type Error = self::error::ConversionError;
33164        fn try_from(
33165            value: ::std::string::String,
33166        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33167            value.parse()
33168        }
33169    }
33170    ///`SolanaAccount`
33171    ///
33172    /// <details><summary>JSON schema</summary>
33173    ///
33174    /// ```json
33175    ///{
33176    ///  "type": "object",
33177    ///  "required": [
33178    ///    "address"
33179    ///  ],
33180    ///  "properties": {
33181    ///    "address": {
33182    ///      "description": "The base58 encoded Solana address.",
33183    ///      "examples": [
33184    ///        "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
33185    ///      ],
33186    ///      "type": "string",
33187    ///      "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
33188    ///    },
33189    ///    "createdAt": {
33190    ///      "description": "The ISO 8601 UTC timestamp at which the account was created.",
33191    ///      "examples": [
33192    ///        "2025-03-25T12:00:00Z"
33193    ///      ],
33194    ///      "type": "string",
33195    ///      "format": "date-time"
33196    ///    },
33197    ///    "name": {
33198    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names are guaranteed to be unique across all Solana accounts in the developer's CDP Project.",
33199    ///      "examples": [
33200    ///        "my-account"
33201    ///      ],
33202    ///      "type": "string",
33203    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
33204    ///    },
33205    ///    "policies": {
33206    ///      "description": "The list of policy IDs that apply to the account. This will include both the project-level policy and the account-level policy, if one exists.",
33207    ///      "examples": [
33208    ///        [
33209    ///          "123e4567-e89b-12d3-a456-426614174000"
33210    ///        ]
33211    ///      ],
33212    ///      "type": "array",
33213    ///      "items": {
33214    ///        "type": "string",
33215    ///        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
33216    ///      },
33217    ///      "x-audience": "public"
33218    ///    },
33219    ///    "updatedAt": {
33220    ///      "description": "The ISO 8601 UTC timestamp at which the account was last updated.",
33221    ///      "examples": [
33222    ///        "2025-03-26T12:00:00Z"
33223    ///      ],
33224    ///      "type": "string",
33225    ///      "format": "date-time"
33226    ///    }
33227    ///  }
33228    ///}
33229    /// ```
33230    /// </details>
33231    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33232    pub struct SolanaAccount {
33233        ///The base58 encoded Solana address.
33234        pub address: SolanaAccountAddress,
33235        ///The ISO 8601 UTC timestamp at which the account was created.
33236        #[serde(
33237            rename = "createdAt",
33238            default,
33239            skip_serializing_if = "::std::option::Option::is_none"
33240        )]
33241        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
33242        /**An optional name for the account.
33243        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
33244        Account names are guaranteed to be unique across all Solana accounts in the developer's CDP Project.*/
33245        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
33246        pub name: ::std::option::Option<SolanaAccountName>,
33247        ///The list of policy IDs that apply to the account. This will include both the project-level policy and the account-level policy, if one exists.
33248        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
33249        pub policies: ::std::vec::Vec<SolanaAccountPoliciesItem>,
33250        ///The ISO 8601 UTC timestamp at which the account was last updated.
33251        #[serde(
33252            rename = "updatedAt",
33253            default,
33254            skip_serializing_if = "::std::option::Option::is_none"
33255        )]
33256        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
33257    }
33258    impl ::std::convert::From<&SolanaAccount> for SolanaAccount {
33259        fn from(value: &SolanaAccount) -> Self {
33260            value.clone()
33261        }
33262    }
33263    impl SolanaAccount {
33264        pub fn builder() -> builder::SolanaAccount {
33265            Default::default()
33266        }
33267    }
33268    ///The base58 encoded Solana address.
33269    ///
33270    /// <details><summary>JSON schema</summary>
33271    ///
33272    /// ```json
33273    ///{
33274    ///  "description": "The base58 encoded Solana address.",
33275    ///  "examples": [
33276    ///    "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
33277    ///  ],
33278    ///  "type": "string",
33279    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
33280    ///}
33281    /// ```
33282    /// </details>
33283    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33284    #[serde(transparent)]
33285    pub struct SolanaAccountAddress(::std::string::String);
33286    impl ::std::ops::Deref for SolanaAccountAddress {
33287        type Target = ::std::string::String;
33288        fn deref(&self) -> &::std::string::String {
33289            &self.0
33290        }
33291    }
33292    impl ::std::convert::From<SolanaAccountAddress> for ::std::string::String {
33293        fn from(value: SolanaAccountAddress) -> Self {
33294            value.0
33295        }
33296    }
33297    impl ::std::convert::From<&SolanaAccountAddress> for SolanaAccountAddress {
33298        fn from(value: &SolanaAccountAddress) -> Self {
33299            value.clone()
33300        }
33301    }
33302    impl ::std::str::FromStr for SolanaAccountAddress {
33303        type Err = self::error::ConversionError;
33304        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33305            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
33306                ::std::sync::LazyLock::new(|| {
33307                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
33308                });
33309            if PATTERN.find(value).is_none() {
33310                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
33311            }
33312            Ok(Self(value.to_string()))
33313        }
33314    }
33315    impl ::std::convert::TryFrom<&str> for SolanaAccountAddress {
33316        type Error = self::error::ConversionError;
33317        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33318            value.parse()
33319        }
33320    }
33321    impl ::std::convert::TryFrom<&::std::string::String> for SolanaAccountAddress {
33322        type Error = self::error::ConversionError;
33323        fn try_from(
33324            value: &::std::string::String,
33325        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33326            value.parse()
33327        }
33328    }
33329    impl ::std::convert::TryFrom<::std::string::String> for SolanaAccountAddress {
33330        type Error = self::error::ConversionError;
33331        fn try_from(
33332            value: ::std::string::String,
33333        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33334            value.parse()
33335        }
33336    }
33337    impl<'de> ::serde::Deserialize<'de> for SolanaAccountAddress {
33338        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
33339        where
33340            D: ::serde::Deserializer<'de>,
33341        {
33342            ::std::string::String::deserialize(deserializer)?
33343                .parse()
33344                .map_err(|e: self::error::ConversionError| {
33345                    <D::Error as ::serde::de::Error>::custom(e.to_string())
33346                })
33347        }
33348    }
33349    /**An optional name for the account.
33350    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
33351    Account names are guaranteed to be unique across all Solana accounts in the developer's CDP Project.*/
33352    ///
33353    /// <details><summary>JSON schema</summary>
33354    ///
33355    /// ```json
33356    ///{
33357    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names are guaranteed to be unique across all Solana accounts in the developer's CDP Project.",
33358    ///  "examples": [
33359    ///    "my-account"
33360    ///  ],
33361    ///  "type": "string",
33362    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
33363    ///}
33364    /// ```
33365    /// </details>
33366    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33367    #[serde(transparent)]
33368    pub struct SolanaAccountName(::std::string::String);
33369    impl ::std::ops::Deref for SolanaAccountName {
33370        type Target = ::std::string::String;
33371        fn deref(&self) -> &::std::string::String {
33372            &self.0
33373        }
33374    }
33375    impl ::std::convert::From<SolanaAccountName> for ::std::string::String {
33376        fn from(value: SolanaAccountName) -> Self {
33377            value.0
33378        }
33379    }
33380    impl ::std::convert::From<&SolanaAccountName> for SolanaAccountName {
33381        fn from(value: &SolanaAccountName) -> Self {
33382            value.clone()
33383        }
33384    }
33385    impl ::std::str::FromStr for SolanaAccountName {
33386        type Err = self::error::ConversionError;
33387        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33388            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
33389                ::std::sync::LazyLock::new(|| {
33390                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
33391                });
33392            if PATTERN.find(value).is_none() {
33393                return Err(
33394                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
33395                );
33396            }
33397            Ok(Self(value.to_string()))
33398        }
33399    }
33400    impl ::std::convert::TryFrom<&str> for SolanaAccountName {
33401        type Error = self::error::ConversionError;
33402        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33403            value.parse()
33404        }
33405    }
33406    impl ::std::convert::TryFrom<&::std::string::String> for SolanaAccountName {
33407        type Error = self::error::ConversionError;
33408        fn try_from(
33409            value: &::std::string::String,
33410        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33411            value.parse()
33412        }
33413    }
33414    impl ::std::convert::TryFrom<::std::string::String> for SolanaAccountName {
33415        type Error = self::error::ConversionError;
33416        fn try_from(
33417            value: ::std::string::String,
33418        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33419            value.parse()
33420        }
33421    }
33422    impl<'de> ::serde::Deserialize<'de> for SolanaAccountName {
33423        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
33424        where
33425            D: ::serde::Deserializer<'de>,
33426        {
33427            ::std::string::String::deserialize(deserializer)?
33428                .parse()
33429                .map_err(|e: self::error::ConversionError| {
33430                    <D::Error as ::serde::de::Error>::custom(e.to_string())
33431                })
33432        }
33433    }
33434    ///`SolanaAccountPoliciesItem`
33435    ///
33436    /// <details><summary>JSON schema</summary>
33437    ///
33438    /// ```json
33439    ///{
33440    ///  "type": "string",
33441    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
33442    ///}
33443    /// ```
33444    /// </details>
33445    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33446    #[serde(transparent)]
33447    pub struct SolanaAccountPoliciesItem(::std::string::String);
33448    impl ::std::ops::Deref for SolanaAccountPoliciesItem {
33449        type Target = ::std::string::String;
33450        fn deref(&self) -> &::std::string::String {
33451            &self.0
33452        }
33453    }
33454    impl ::std::convert::From<SolanaAccountPoliciesItem> for ::std::string::String {
33455        fn from(value: SolanaAccountPoliciesItem) -> Self {
33456            value.0
33457        }
33458    }
33459    impl ::std::convert::From<&SolanaAccountPoliciesItem> for SolanaAccountPoliciesItem {
33460        fn from(value: &SolanaAccountPoliciesItem) -> Self {
33461            value.clone()
33462        }
33463    }
33464    impl ::std::str::FromStr for SolanaAccountPoliciesItem {
33465        type Err = self::error::ConversionError;
33466        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33467            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
33468                || {
33469                    ::regress::Regex::new(
33470                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
33471                    )
33472                    .unwrap()
33473                },
33474            );
33475            if PATTERN.find(value).is_none() {
33476                return Err(
33477                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
33478                        .into(),
33479                );
33480            }
33481            Ok(Self(value.to_string()))
33482        }
33483    }
33484    impl ::std::convert::TryFrom<&str> for SolanaAccountPoliciesItem {
33485        type Error = self::error::ConversionError;
33486        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33487            value.parse()
33488        }
33489    }
33490    impl ::std::convert::TryFrom<&::std::string::String> for SolanaAccountPoliciesItem {
33491        type Error = self::error::ConversionError;
33492        fn try_from(
33493            value: &::std::string::String,
33494        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33495            value.parse()
33496        }
33497    }
33498    impl ::std::convert::TryFrom<::std::string::String> for SolanaAccountPoliciesItem {
33499        type Error = self::error::ConversionError;
33500        fn try_from(
33501            value: ::std::string::String,
33502        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33503            value.parse()
33504        }
33505    }
33506    impl<'de> ::serde::Deserialize<'de> for SolanaAccountPoliciesItem {
33507        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
33508        where
33509            D: ::serde::Deserializer<'de>,
33510        {
33511            ::std::string::String::deserialize(deserializer)?
33512                .parse()
33513                .map_err(|e: self::error::ConversionError| {
33514                    <D::Error as ::serde::de::Error>::custom(e.to_string())
33515                })
33516        }
33517    }
33518    ///General information about a Solana token. Includes the mint address, and other identifying information.
33519    ///
33520    /// <details><summary>JSON schema</summary>
33521    ///
33522    /// ```json
33523    ///{
33524    ///  "description": "General information about a Solana token. Includes the mint address, and other identifying information.",
33525    ///  "examples": [
33526    ///    {
33527    ///      "mintAddress": "So11111111111111111111111111111111111111111",
33528    ///      "name": "Solana",
33529    ///      "symbol": "SOL"
33530    ///    }
33531    ///  ],
33532    ///  "type": "object",
33533    ///  "required": [
33534    ///    "mintAddress"
33535    ///  ],
33536    ///  "properties": {
33537    ///    "mintAddress": {
33538    ///      "description": "The mint address of the token.\nFor native SOL, the mint address is `So11111111111111111111111111111111111111111`. For SPL tokens, this is the mint address where the token is defined.",
33539    ///      "examples": [
33540    ///        "So11111111111111111111111111111111111111111"
33541    ///      ],
33542    ///      "type": "string",
33543    ///      "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
33544    ///    },
33545    ///    "name": {
33546    ///      "description": "The name of this token (ex: \"Solana\", \"USD Coin\", \"Raydium\").\nThe token name is not unique. It is possible for two different tokens to have the same name.\nFor the native SOL token, this name is \"Solana\". For SPL tokens, this name is defined in the token's metadata.\nNot all tokens have a name. This field will only be populated when the token has metadata available.",
33547    ///      "examples": [
33548    ///        "Solana"
33549    ///      ],
33550    ///      "type": "string"
33551    ///    },
33552    ///    "symbol": {
33553    ///      "description": "The symbol of this token (ex: SOL, USDC, RAY).\nThe token symbol is not unique. It is possible for two different tokens to have the same symbol.\nFor the native SOL token, this symbol is \"SOL\". For SPL tokens, this symbol is defined in the token's metadata.\nNot all tokens have a symbol. This field will only be populated when the token has metadata available.",
33554    ///      "examples": [
33555    ///        "SOL"
33556    ///      ],
33557    ///      "type": "string"
33558    ///    }
33559    ///  }
33560    ///}
33561    /// ```
33562    /// </details>
33563    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33564    pub struct SolanaToken {
33565        /**The mint address of the token.
33566        For native SOL, the mint address is `So11111111111111111111111111111111111111111`. For SPL tokens, this is the mint address where the token is defined.*/
33567        #[serde(rename = "mintAddress")]
33568        pub mint_address: SolanaTokenMintAddress,
33569        /**The name of this token (ex: "Solana", "USD Coin", "Raydium").
33570        The token name is not unique. It is possible for two different tokens to have the same name.
33571        For the native SOL token, this name is "Solana". For SPL tokens, this name is defined in the token's metadata.
33572        Not all tokens have a name. This field will only be populated when the token has metadata available.*/
33573        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
33574        pub name: ::std::option::Option<::std::string::String>,
33575        /**The symbol of this token (ex: SOL, USDC, RAY).
33576        The token symbol is not unique. It is possible for two different tokens to have the same symbol.
33577        For the native SOL token, this symbol is "SOL". For SPL tokens, this symbol is defined in the token's metadata.
33578        Not all tokens have a symbol. This field will only be populated when the token has metadata available.*/
33579        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
33580        pub symbol: ::std::option::Option<::std::string::String>,
33581    }
33582    impl ::std::convert::From<&SolanaToken> for SolanaToken {
33583        fn from(value: &SolanaToken) -> Self {
33584            value.clone()
33585        }
33586    }
33587    impl SolanaToken {
33588        pub fn builder() -> builder::SolanaToken {
33589            Default::default()
33590        }
33591    }
33592    ///Amount of a given Solana token.
33593    ///
33594    /// <details><summary>JSON schema</summary>
33595    ///
33596    /// ```json
33597    ///{
33598    ///  "description": "Amount of a given Solana token.",
33599    ///  "examples": [
33600    ///    {
33601    ///      "amount": "1250000000",
33602    ///      "decimals": 9
33603    ///    }
33604    ///  ],
33605    ///  "type": "object",
33606    ///  "required": [
33607    ///    "amount",
33608    ///    "decimals"
33609    ///  ],
33610    ///  "properties": {
33611    ///    "amount": {
33612    ///      "description": "The amount is denominated in the smallest indivisible unit of the token. For SOL, the smallest indivisible unit is lamports (10^-9 SOL). For SPL tokens, the smallest unit is defined by the token's decimals configuration.",
33613    ///      "examples": [
33614    ///        "1250000000"
33615    ///      ],
33616    ///      "type": "string",
33617    ///      "pattern": "^[0-9]+$"
33618    ///    },
33619    ///    "decimals": {
33620    ///      "description": "'decimals' is the exponential value N that satisfies the equation `amount * 10^-N = standard_denomination`. The standard denomination is the most commonly used denomination for the token.\n- For native SOL, `decimals` is 9 (1 SOL = 10^9 lamports). - For SPL tokens, `decimals` is defined in the token's mint configuration.",
33621    ///      "examples": [
33622    ///        9
33623    ///      ],
33624    ///      "type": "integer",
33625    ///      "format": "int64"
33626    ///    }
33627    ///  }
33628    ///}
33629    /// ```
33630    /// </details>
33631    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33632    pub struct SolanaTokenAmount {
33633        ///The amount is denominated in the smallest indivisible unit of the token. For SOL, the smallest indivisible unit is lamports (10^-9 SOL). For SPL tokens, the smallest unit is defined by the token's decimals configuration.
33634        pub amount: SolanaTokenAmountAmount,
33635        /**'decimals' is the exponential value N that satisfies the equation `amount * 10^-N = standard_denomination`. The standard denomination is the most commonly used denomination for the token.
33636        - For native SOL, `decimals` is 9 (1 SOL = 10^9 lamports). - For SPL tokens, `decimals` is defined in the token's mint configuration.*/
33637        pub decimals: i64,
33638    }
33639    impl ::std::convert::From<&SolanaTokenAmount> for SolanaTokenAmount {
33640        fn from(value: &SolanaTokenAmount) -> Self {
33641            value.clone()
33642        }
33643    }
33644    impl SolanaTokenAmount {
33645        pub fn builder() -> builder::SolanaTokenAmount {
33646            Default::default()
33647        }
33648    }
33649    ///The amount is denominated in the smallest indivisible unit of the token. For SOL, the smallest indivisible unit is lamports (10^-9 SOL). For SPL tokens, the smallest unit is defined by the token's decimals configuration.
33650    ///
33651    /// <details><summary>JSON schema</summary>
33652    ///
33653    /// ```json
33654    ///{
33655    ///  "description": "The amount is denominated in the smallest indivisible unit of the token. For SOL, the smallest indivisible unit is lamports (10^-9 SOL). For SPL tokens, the smallest unit is defined by the token's decimals configuration.",
33656    ///  "examples": [
33657    ///    "1250000000"
33658    ///  ],
33659    ///  "type": "string",
33660    ///  "pattern": "^[0-9]+$"
33661    ///}
33662    /// ```
33663    /// </details>
33664    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33665    #[serde(transparent)]
33666    pub struct SolanaTokenAmountAmount(::std::string::String);
33667    impl ::std::ops::Deref for SolanaTokenAmountAmount {
33668        type Target = ::std::string::String;
33669        fn deref(&self) -> &::std::string::String {
33670            &self.0
33671        }
33672    }
33673    impl ::std::convert::From<SolanaTokenAmountAmount> for ::std::string::String {
33674        fn from(value: SolanaTokenAmountAmount) -> Self {
33675            value.0
33676        }
33677    }
33678    impl ::std::convert::From<&SolanaTokenAmountAmount> for SolanaTokenAmountAmount {
33679        fn from(value: &SolanaTokenAmountAmount) -> Self {
33680            value.clone()
33681        }
33682    }
33683    impl ::std::str::FromStr for SolanaTokenAmountAmount {
33684        type Err = self::error::ConversionError;
33685        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33686            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
33687                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[0-9]+$").unwrap());
33688            if PATTERN.find(value).is_none() {
33689                return Err("doesn't match pattern \"^[0-9]+$\"".into());
33690            }
33691            Ok(Self(value.to_string()))
33692        }
33693    }
33694    impl ::std::convert::TryFrom<&str> for SolanaTokenAmountAmount {
33695        type Error = self::error::ConversionError;
33696        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33697            value.parse()
33698        }
33699    }
33700    impl ::std::convert::TryFrom<&::std::string::String> for SolanaTokenAmountAmount {
33701        type Error = self::error::ConversionError;
33702        fn try_from(
33703            value: &::std::string::String,
33704        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33705            value.parse()
33706        }
33707    }
33708    impl ::std::convert::TryFrom<::std::string::String> for SolanaTokenAmountAmount {
33709        type Error = self::error::ConversionError;
33710        fn try_from(
33711            value: ::std::string::String,
33712        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33713            value.parse()
33714        }
33715    }
33716    impl<'de> ::serde::Deserialize<'de> for SolanaTokenAmountAmount {
33717        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
33718        where
33719            D: ::serde::Deserializer<'de>,
33720        {
33721            ::std::string::String::deserialize(deserializer)?
33722                .parse()
33723                .map_err(|e: self::error::ConversionError| {
33724                    <D::Error as ::serde::de::Error>::custom(e.to_string())
33725                })
33726        }
33727    }
33728    ///`SolanaTokenBalance`
33729    ///
33730    /// <details><summary>JSON schema</summary>
33731    ///
33732    /// ```json
33733    ///{
33734    ///  "type": "object",
33735    ///  "required": [
33736    ///    "amount",
33737    ///    "token"
33738    ///  ],
33739    ///  "properties": {
33740    ///    "amount": {
33741    ///      "$ref": "#/components/schemas/SolanaTokenAmount"
33742    ///    },
33743    ///    "token": {
33744    ///      "$ref": "#/components/schemas/SolanaToken"
33745    ///    }
33746    ///  }
33747    ///}
33748    /// ```
33749    /// </details>
33750    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33751    pub struct SolanaTokenBalance {
33752        pub amount: SolanaTokenAmount,
33753        pub token: SolanaToken,
33754    }
33755    impl ::std::convert::From<&SolanaTokenBalance> for SolanaTokenBalance {
33756        fn from(value: &SolanaTokenBalance) -> Self {
33757            value.clone()
33758        }
33759    }
33760    impl SolanaTokenBalance {
33761        pub fn builder() -> builder::SolanaTokenBalance {
33762            Default::default()
33763        }
33764    }
33765    /**The mint address of the token.
33766    For native SOL, the mint address is `So11111111111111111111111111111111111111111`. For SPL tokens, this is the mint address where the token is defined.*/
33767    ///
33768    /// <details><summary>JSON schema</summary>
33769    ///
33770    /// ```json
33771    ///{
33772    ///  "description": "The mint address of the token.\nFor native SOL, the mint address is `So11111111111111111111111111111111111111111`. For SPL tokens, this is the mint address where the token is defined.",
33773    ///  "examples": [
33774    ///    "So11111111111111111111111111111111111111111"
33775    ///  ],
33776    ///  "type": "string",
33777    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
33778    ///}
33779    /// ```
33780    /// </details>
33781    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33782    #[serde(transparent)]
33783    pub struct SolanaTokenMintAddress(::std::string::String);
33784    impl ::std::ops::Deref for SolanaTokenMintAddress {
33785        type Target = ::std::string::String;
33786        fn deref(&self) -> &::std::string::String {
33787            &self.0
33788        }
33789    }
33790    impl ::std::convert::From<SolanaTokenMintAddress> for ::std::string::String {
33791        fn from(value: SolanaTokenMintAddress) -> Self {
33792            value.0
33793        }
33794    }
33795    impl ::std::convert::From<&SolanaTokenMintAddress> for SolanaTokenMintAddress {
33796        fn from(value: &SolanaTokenMintAddress) -> Self {
33797            value.clone()
33798        }
33799    }
33800    impl ::std::str::FromStr for SolanaTokenMintAddress {
33801        type Err = self::error::ConversionError;
33802        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33803            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
33804                ::std::sync::LazyLock::new(|| {
33805                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
33806                });
33807            if PATTERN.find(value).is_none() {
33808                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
33809            }
33810            Ok(Self(value.to_string()))
33811        }
33812    }
33813    impl ::std::convert::TryFrom<&str> for SolanaTokenMintAddress {
33814        type Error = self::error::ConversionError;
33815        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
33816            value.parse()
33817        }
33818    }
33819    impl ::std::convert::TryFrom<&::std::string::String> for SolanaTokenMintAddress {
33820        type Error = self::error::ConversionError;
33821        fn try_from(
33822            value: &::std::string::String,
33823        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33824            value.parse()
33825        }
33826    }
33827    impl ::std::convert::TryFrom<::std::string::String> for SolanaTokenMintAddress {
33828        type Error = self::error::ConversionError;
33829        fn try_from(
33830            value: ::std::string::String,
33831        ) -> ::std::result::Result<Self, self::error::ConversionError> {
33832            value.parse()
33833        }
33834    }
33835    impl<'de> ::serde::Deserialize<'de> for SolanaTokenMintAddress {
33836        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
33837        where
33838            D: ::serde::Deserializer<'de>,
33839        {
33840            ::std::string::String::deserialize(deserializer)?
33841                .parse()
33842                .map_err(|e: self::error::ConversionError| {
33843                    <D::Error as ::serde::de::Error>::custom(e.to_string())
33844                })
33845        }
33846    }
33847    ///The core spend permission.
33848    ///
33849    /// <details><summary>JSON schema</summary>
33850    ///
33851    /// ```json
33852    ///{
33853    ///  "description": "The core spend permission.",
33854    ///  "examples": [
33855    ///    {
33856    ///      "account": "0xd53Ee96438383Bb1eff07958D110B81363E9Ab47",
33857    ///      "allowance": "1000000000000000000",
33858    ///      "end": "281474976710655",
33859    ///      "extraData": "0x",
33860    ///      "period": "86400",
33861    ///      "salt": "0",
33862    ///      "spender": "0x9Fb909eA400c2b8D99Be292DADf07e63B814527c",
33863    ///      "start": "0",
33864    ///      "token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
33865    ///    }
33866    ///  ],
33867    ///  "type": "object",
33868    ///  "required": [
33869    ///    "account",
33870    ///    "allowance",
33871    ///    "end",
33872    ///    "extraData",
33873    ///    "period",
33874    ///    "salt",
33875    ///    "spender",
33876    ///    "start",
33877    ///    "token"
33878    ///  ],
33879    ///  "properties": {
33880    ///    "account": {
33881    ///      "description": "Smart account this spend permission is valid for.",
33882    ///      "examples": [
33883    ///        "0xd53Ee96438383Bb1eff07958D110B81363E9Ab47"
33884    ///      ],
33885    ///      "type": "string",
33886    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
33887    ///    },
33888    ///    "allowance": {
33889    ///      "description": "Maximum allowed value to spend, in atomic units for the specified token, within each period.",
33890    ///      "examples": [
33891    ///        "1000000000000000000"
33892    ///      ],
33893    ///      "type": "string"
33894    ///    },
33895    ///    "end": {
33896    ///      "description": "The expiration time for this spend permission, in Unix seconds.",
33897    ///      "examples": [
33898    ///        "281474976710655"
33899    ///      ],
33900    ///      "type": "string"
33901    ///    },
33902    ///    "extraData": {
33903    ///      "description": "Arbitrary data to include in the permission.",
33904    ///      "examples": [
33905    ///        "0x"
33906    ///      ],
33907    ///      "type": "string"
33908    ///    },
33909    ///    "period": {
33910    ///      "description": "Time duration for resetting used allowance on a recurring basis (seconds).",
33911    ///      "examples": [
33912    ///        "86400"
33913    ///      ],
33914    ///      "type": "string"
33915    ///    },
33916    ///    "salt": {
33917    ///      "description": "An arbitrary salt to differentiate unique spend permissions with otherwise identical data.",
33918    ///      "examples": [
33919    ///        "0"
33920    ///      ],
33921    ///      "type": "string"
33922    ///    },
33923    ///    "spender": {
33924    ///      "description": "Entity that can spend account's tokens.",
33925    ///      "examples": [
33926    ///        "0x9Fb909eA400c2b8D99Be292DADf07e63B814527c"
33927    ///      ],
33928    ///      "type": "string",
33929    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
33930    ///    },
33931    ///    "start": {
33932    ///      "description": "The start time for this spend permission, in Unix seconds.",
33933    ///      "examples": [
33934    ///        "0"
33935    ///      ],
33936    ///      "type": "string"
33937    ///    },
33938    ///    "token": {
33939    ///      "description": "Token address (ERC-7528 native token address or ERC-20 contract).",
33940    ///      "examples": [
33941    ///        "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
33942    ///      ],
33943    ///      "type": "string",
33944    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
33945    ///    }
33946    ///  }
33947    ///}
33948    /// ```
33949    /// </details>
33950    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
33951    pub struct SpendPermission {
33952        ///Smart account this spend permission is valid for.
33953        pub account: SpendPermissionAccount,
33954        ///Maximum allowed value to spend, in atomic units for the specified token, within each period.
33955        pub allowance: ::std::string::String,
33956        ///The expiration time for this spend permission, in Unix seconds.
33957        pub end: ::std::string::String,
33958        ///Arbitrary data to include in the permission.
33959        #[serde(rename = "extraData")]
33960        pub extra_data: ::std::string::String,
33961        ///Time duration for resetting used allowance on a recurring basis (seconds).
33962        pub period: ::std::string::String,
33963        ///An arbitrary salt to differentiate unique spend permissions with otherwise identical data.
33964        pub salt: ::std::string::String,
33965        ///Entity that can spend account's tokens.
33966        pub spender: SpendPermissionSpender,
33967        ///The start time for this spend permission, in Unix seconds.
33968        pub start: ::std::string::String,
33969        ///Token address (ERC-7528 native token address or ERC-20 contract).
33970        pub token: SpendPermissionToken,
33971    }
33972    impl ::std::convert::From<&SpendPermission> for SpendPermission {
33973        fn from(value: &SpendPermission) -> Self {
33974            value.clone()
33975        }
33976    }
33977    impl SpendPermission {
33978        pub fn builder() -> builder::SpendPermission {
33979            Default::default()
33980        }
33981    }
33982    ///Smart account this spend permission is valid for.
33983    ///
33984    /// <details><summary>JSON schema</summary>
33985    ///
33986    /// ```json
33987    ///{
33988    ///  "description": "Smart account this spend permission is valid for.",
33989    ///  "examples": [
33990    ///    "0xd53Ee96438383Bb1eff07958D110B81363E9Ab47"
33991    ///  ],
33992    ///  "type": "string",
33993    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
33994    ///}
33995    /// ```
33996    /// </details>
33997    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33998    #[serde(transparent)]
33999    pub struct SpendPermissionAccount(::std::string::String);
34000    impl ::std::ops::Deref for SpendPermissionAccount {
34001        type Target = ::std::string::String;
34002        fn deref(&self) -> &::std::string::String {
34003            &self.0
34004        }
34005    }
34006    impl ::std::convert::From<SpendPermissionAccount> for ::std::string::String {
34007        fn from(value: SpendPermissionAccount) -> Self {
34008            value.0
34009        }
34010    }
34011    impl ::std::convert::From<&SpendPermissionAccount> for SpendPermissionAccount {
34012        fn from(value: &SpendPermissionAccount) -> Self {
34013            value.clone()
34014        }
34015    }
34016    impl ::std::str::FromStr for SpendPermissionAccount {
34017        type Err = self::error::ConversionError;
34018        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34019            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
34020                ::std::sync::LazyLock::new(|| {
34021                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
34022                });
34023            if PATTERN.find(value).is_none() {
34024                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
34025            }
34026            Ok(Self(value.to_string()))
34027        }
34028    }
34029    impl ::std::convert::TryFrom<&str> for SpendPermissionAccount {
34030        type Error = self::error::ConversionError;
34031        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34032            value.parse()
34033        }
34034    }
34035    impl ::std::convert::TryFrom<&::std::string::String> for SpendPermissionAccount {
34036        type Error = self::error::ConversionError;
34037        fn try_from(
34038            value: &::std::string::String,
34039        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34040            value.parse()
34041        }
34042    }
34043    impl ::std::convert::TryFrom<::std::string::String> for SpendPermissionAccount {
34044        type Error = self::error::ConversionError;
34045        fn try_from(
34046            value: ::std::string::String,
34047        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34048            value.parse()
34049        }
34050    }
34051    impl<'de> ::serde::Deserialize<'de> for SpendPermissionAccount {
34052        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
34053        where
34054            D: ::serde::Deserializer<'de>,
34055        {
34056            ::std::string::String::deserialize(deserializer)?
34057                .parse()
34058                .map_err(|e: self::error::ConversionError| {
34059                    <D::Error as ::serde::de::Error>::custom(e.to_string())
34060                })
34061        }
34062    }
34063    ///The network the spend permission is on.
34064    ///
34065    /// <details><summary>JSON schema</summary>
34066    ///
34067    /// ```json
34068    ///{
34069    ///  "description": "The network the spend permission is on.",
34070    ///  "examples": [
34071    ///    "base"
34072    ///  ],
34073    ///  "type": "string",
34074    ///  "enum": [
34075    ///    "base",
34076    ///    "base-sepolia",
34077    ///    "ethereum",
34078    ///    "ethereum-sepolia",
34079    ///    "optimism",
34080    ///    "arbitrum",
34081    ///    "avalanche",
34082    ///    "polygon"
34083    ///  ]
34084    ///}
34085    /// ```
34086    /// </details>
34087    #[derive(
34088        ::serde::Deserialize,
34089        ::serde::Serialize,
34090        Clone,
34091        Copy,
34092        Debug,
34093        Eq,
34094        Hash,
34095        Ord,
34096        PartialEq,
34097        PartialOrd,
34098    )]
34099    pub enum SpendPermissionNetwork {
34100        #[serde(rename = "base")]
34101        Base,
34102        #[serde(rename = "base-sepolia")]
34103        BaseSepolia,
34104        #[serde(rename = "ethereum")]
34105        Ethereum,
34106        #[serde(rename = "ethereum-sepolia")]
34107        EthereumSepolia,
34108        #[serde(rename = "optimism")]
34109        Optimism,
34110        #[serde(rename = "arbitrum")]
34111        Arbitrum,
34112        #[serde(rename = "avalanche")]
34113        Avalanche,
34114        #[serde(rename = "polygon")]
34115        Polygon,
34116    }
34117    impl ::std::convert::From<&Self> for SpendPermissionNetwork {
34118        fn from(value: &SpendPermissionNetwork) -> Self {
34119            value.clone()
34120        }
34121    }
34122    impl ::std::fmt::Display for SpendPermissionNetwork {
34123        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34124            match *self {
34125                Self::Base => f.write_str("base"),
34126                Self::BaseSepolia => f.write_str("base-sepolia"),
34127                Self::Ethereum => f.write_str("ethereum"),
34128                Self::EthereumSepolia => f.write_str("ethereum-sepolia"),
34129                Self::Optimism => f.write_str("optimism"),
34130                Self::Arbitrum => f.write_str("arbitrum"),
34131                Self::Avalanche => f.write_str("avalanche"),
34132                Self::Polygon => f.write_str("polygon"),
34133            }
34134        }
34135    }
34136    impl ::std::str::FromStr for SpendPermissionNetwork {
34137        type Err = self::error::ConversionError;
34138        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34139            match value {
34140                "base" => Ok(Self::Base),
34141                "base-sepolia" => Ok(Self::BaseSepolia),
34142                "ethereum" => Ok(Self::Ethereum),
34143                "ethereum-sepolia" => Ok(Self::EthereumSepolia),
34144                "optimism" => Ok(Self::Optimism),
34145                "arbitrum" => Ok(Self::Arbitrum),
34146                "avalanche" => Ok(Self::Avalanche),
34147                "polygon" => Ok(Self::Polygon),
34148                _ => Err("invalid value".into()),
34149            }
34150        }
34151    }
34152    impl ::std::convert::TryFrom<&str> for SpendPermissionNetwork {
34153        type Error = self::error::ConversionError;
34154        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34155            value.parse()
34156        }
34157    }
34158    impl ::std::convert::TryFrom<&::std::string::String> for SpendPermissionNetwork {
34159        type Error = self::error::ConversionError;
34160        fn try_from(
34161            value: &::std::string::String,
34162        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34163            value.parse()
34164        }
34165    }
34166    impl ::std::convert::TryFrom<::std::string::String> for SpendPermissionNetwork {
34167        type Error = self::error::ConversionError;
34168        fn try_from(
34169            value: ::std::string::String,
34170        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34171            value.parse()
34172        }
34173    }
34174    ///`SpendPermissionResponseObject`
34175    ///
34176    /// <details><summary>JSON schema</summary>
34177    ///
34178    /// ```json
34179    ///{
34180    ///  "type": "object",
34181    ///  "required": [
34182    ///    "createdAt",
34183    ///    "network",
34184    ///    "permission",
34185    ///    "permissionHash",
34186    ///    "revoked"
34187    ///  ],
34188    ///  "properties": {
34189    ///    "createdAt": {
34190    ///      "description": "The UTC ISO 8601 timestamp when the permission was created.",
34191    ///      "examples": [
34192    ///        "2025-03-25T12:00:00Z"
34193    ///      ],
34194    ///      "type": "string",
34195    ///      "format": "date-time"
34196    ///    },
34197    ///    "network": {
34198    ///      "$ref": "#/components/schemas/SpendPermissionNetwork"
34199    ///    },
34200    ///    "permission": {
34201    ///      "$ref": "#/components/schemas/SpendPermission"
34202    ///    },
34203    ///    "permissionHash": {
34204    ///      "description": "Unique hash identifier for this permission.",
34205    ///      "examples": [
34206    ///        "0x62bc94756bb6221a7913beab6024171fc60d3380fdc06759bfac76e8ccb3f63d"
34207    ///      ],
34208    ///      "type": "string"
34209    ///    },
34210    ///    "revoked": {
34211    ///      "description": "Whether this permission has been revoked.",
34212    ///      "examples": [
34213    ///        false
34214    ///      ],
34215    ///      "type": "boolean"
34216    ///    },
34217    ///    "revokedAt": {
34218    ///      "description": "The UTC ISO 8601 timestamp when the permission was revoked (if applicable).",
34219    ///      "examples": [
34220    ///        "2025-03-25T12:00:00Z"
34221    ///      ],
34222    ///      "type": "string",
34223    ///      "format": "date-time"
34224    ///    }
34225    ///  }
34226    ///}
34227    /// ```
34228    /// </details>
34229    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34230    pub struct SpendPermissionResponseObject {
34231        ///The UTC ISO 8601 timestamp when the permission was created.
34232        #[serde(rename = "createdAt")]
34233        pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
34234        pub network: SpendPermissionNetwork,
34235        pub permission: SpendPermission,
34236        ///Unique hash identifier for this permission.
34237        #[serde(rename = "permissionHash")]
34238        pub permission_hash: ::std::string::String,
34239        ///Whether this permission has been revoked.
34240        pub revoked: bool,
34241        ///The UTC ISO 8601 timestamp when the permission was revoked (if applicable).
34242        #[serde(
34243            rename = "revokedAt",
34244            default,
34245            skip_serializing_if = "::std::option::Option::is_none"
34246        )]
34247        pub revoked_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
34248    }
34249    impl ::std::convert::From<&SpendPermissionResponseObject> for SpendPermissionResponseObject {
34250        fn from(value: &SpendPermissionResponseObject) -> Self {
34251            value.clone()
34252        }
34253    }
34254    impl SpendPermissionResponseObject {
34255        pub fn builder() -> builder::SpendPermissionResponseObject {
34256            Default::default()
34257        }
34258    }
34259    ///Entity that can spend account's tokens.
34260    ///
34261    /// <details><summary>JSON schema</summary>
34262    ///
34263    /// ```json
34264    ///{
34265    ///  "description": "Entity that can spend account's tokens.",
34266    ///  "examples": [
34267    ///    "0x9Fb909eA400c2b8D99Be292DADf07e63B814527c"
34268    ///  ],
34269    ///  "type": "string",
34270    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
34271    ///}
34272    /// ```
34273    /// </details>
34274    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34275    #[serde(transparent)]
34276    pub struct SpendPermissionSpender(::std::string::String);
34277    impl ::std::ops::Deref for SpendPermissionSpender {
34278        type Target = ::std::string::String;
34279        fn deref(&self) -> &::std::string::String {
34280            &self.0
34281        }
34282    }
34283    impl ::std::convert::From<SpendPermissionSpender> for ::std::string::String {
34284        fn from(value: SpendPermissionSpender) -> Self {
34285            value.0
34286        }
34287    }
34288    impl ::std::convert::From<&SpendPermissionSpender> for SpendPermissionSpender {
34289        fn from(value: &SpendPermissionSpender) -> Self {
34290            value.clone()
34291        }
34292    }
34293    impl ::std::str::FromStr for SpendPermissionSpender {
34294        type Err = self::error::ConversionError;
34295        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34296            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
34297                ::std::sync::LazyLock::new(|| {
34298                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
34299                });
34300            if PATTERN.find(value).is_none() {
34301                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
34302            }
34303            Ok(Self(value.to_string()))
34304        }
34305    }
34306    impl ::std::convert::TryFrom<&str> for SpendPermissionSpender {
34307        type Error = self::error::ConversionError;
34308        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34309            value.parse()
34310        }
34311    }
34312    impl ::std::convert::TryFrom<&::std::string::String> for SpendPermissionSpender {
34313        type Error = self::error::ConversionError;
34314        fn try_from(
34315            value: &::std::string::String,
34316        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34317            value.parse()
34318        }
34319    }
34320    impl ::std::convert::TryFrom<::std::string::String> for SpendPermissionSpender {
34321        type Error = self::error::ConversionError;
34322        fn try_from(
34323            value: ::std::string::String,
34324        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34325            value.parse()
34326        }
34327    }
34328    impl<'de> ::serde::Deserialize<'de> for SpendPermissionSpender {
34329        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
34330        where
34331            D: ::serde::Deserializer<'de>,
34332        {
34333            ::std::string::String::deserialize(deserializer)?
34334                .parse()
34335                .map_err(|e: self::error::ConversionError| {
34336                    <D::Error as ::serde::de::Error>::custom(e.to_string())
34337                })
34338        }
34339    }
34340    ///Token address (ERC-7528 native token address or ERC-20 contract).
34341    ///
34342    /// <details><summary>JSON schema</summary>
34343    ///
34344    /// ```json
34345    ///{
34346    ///  "description": "Token address (ERC-7528 native token address or ERC-20 contract).",
34347    ///  "examples": [
34348    ///    "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
34349    ///  ],
34350    ///  "type": "string",
34351    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
34352    ///}
34353    /// ```
34354    /// </details>
34355    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34356    #[serde(transparent)]
34357    pub struct SpendPermissionToken(::std::string::String);
34358    impl ::std::ops::Deref for SpendPermissionToken {
34359        type Target = ::std::string::String;
34360        fn deref(&self) -> &::std::string::String {
34361            &self.0
34362        }
34363    }
34364    impl ::std::convert::From<SpendPermissionToken> for ::std::string::String {
34365        fn from(value: SpendPermissionToken) -> Self {
34366            value.0
34367        }
34368    }
34369    impl ::std::convert::From<&SpendPermissionToken> for SpendPermissionToken {
34370        fn from(value: &SpendPermissionToken) -> Self {
34371            value.clone()
34372        }
34373    }
34374    impl ::std::str::FromStr for SpendPermissionToken {
34375        type Err = self::error::ConversionError;
34376        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34377            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
34378                ::std::sync::LazyLock::new(|| {
34379                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
34380                });
34381            if PATTERN.find(value).is_none() {
34382                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
34383            }
34384            Ok(Self(value.to_string()))
34385        }
34386    }
34387    impl ::std::convert::TryFrom<&str> for SpendPermissionToken {
34388        type Error = self::error::ConversionError;
34389        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34390            value.parse()
34391        }
34392    }
34393    impl ::std::convert::TryFrom<&::std::string::String> for SpendPermissionToken {
34394        type Error = self::error::ConversionError;
34395        fn try_from(
34396            value: &::std::string::String,
34397        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34398            value.parse()
34399        }
34400    }
34401    impl ::std::convert::TryFrom<::std::string::String> for SpendPermissionToken {
34402        type Error = self::error::ConversionError;
34403        fn try_from(
34404            value: ::std::string::String,
34405        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34406            value.parse()
34407        }
34408    }
34409    impl<'de> ::serde::Deserialize<'de> for SpendPermissionToken {
34410        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
34411        where
34412            D: ::serde::Deserializer<'de>,
34413        {
34414            ::std::string::String::deserialize(deserializer)?
34415                .parse()
34416                .map_err(|e: self::error::ConversionError| {
34417                    <D::Error as ::serde::de::Error>::custom(e.to_string())
34418                })
34419        }
34420    }
34421    ///The criterion for the recipient addresses of a Solana transaction's SPL token transfer instructions.
34422    ///
34423    /// <details><summary>JSON schema</summary>
34424    ///
34425    /// ```json
34426    ///{
34427    ///  "title": "SplAddressCriterion",
34428    ///  "description": "The criterion for the recipient addresses of a Solana transaction's SPL token transfer instructions.",
34429    ///  "type": "object",
34430    ///  "required": [
34431    ///    "addresses",
34432    ///    "operator",
34433    ///    "type"
34434    ///  ],
34435    ///  "properties": {
34436    ///    "addresses": {
34437    ///      "description": "The Solana addresses that are compared to the list of SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
34438    ///      "examples": [
34439    ///        [
34440    ///          "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
34441    ///        ]
34442    ///      ],
34443    ///      "type": "array",
34444    ///      "items": {
34445    ///        "description": "The Solana address that is compared to the list of SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
34446    ///        "type": "string",
34447    ///        "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
34448    ///      }
34449    ///    },
34450    ///    "operator": {
34451    ///      "description": "The operator to use for the comparison. Each of the SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
34452    ///      "examples": [
34453    ///        "in"
34454    ///      ],
34455    ///      "type": "string",
34456    ///      "enum": [
34457    ///        "in",
34458    ///        "not in"
34459    ///      ]
34460    ///    },
34461    ///    "type": {
34462    ///      "description": "The type of criterion to use. This should be `splAddress`.",
34463    ///      "examples": [
34464    ///        "splAddress"
34465    ///      ],
34466    ///      "type": "string",
34467    ///      "enum": [
34468    ///        "splAddress"
34469    ///      ]
34470    ///    }
34471    ///  },
34472    ///  "x-audience": "public"
34473    ///}
34474    /// ```
34475    /// </details>
34476    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34477    pub struct SplAddressCriterion {
34478        ///The Solana addresses that are compared to the list of SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.
34479        pub addresses: ::std::vec::Vec<SplAddressCriterionAddressesItem>,
34480        ///The operator to use for the comparison. Each of the SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
34481        pub operator: SplAddressCriterionOperator,
34482        ///The type of criterion to use. This should be `splAddress`.
34483        #[serde(rename = "type")]
34484        pub type_: SplAddressCriterionType,
34485    }
34486    impl ::std::convert::From<&SplAddressCriterion> for SplAddressCriterion {
34487        fn from(value: &SplAddressCriterion) -> Self {
34488            value.clone()
34489        }
34490    }
34491    impl SplAddressCriterion {
34492        pub fn builder() -> builder::SplAddressCriterion {
34493            Default::default()
34494        }
34495    }
34496    ///The Solana address that is compared to the list of SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.
34497    ///
34498    /// <details><summary>JSON schema</summary>
34499    ///
34500    /// ```json
34501    ///{
34502    ///  "description": "The Solana address that is compared to the list of SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array.",
34503    ///  "type": "string",
34504    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
34505    ///}
34506    /// ```
34507    /// </details>
34508    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34509    #[serde(transparent)]
34510    pub struct SplAddressCriterionAddressesItem(::std::string::String);
34511    impl ::std::ops::Deref for SplAddressCriterionAddressesItem {
34512        type Target = ::std::string::String;
34513        fn deref(&self) -> &::std::string::String {
34514            &self.0
34515        }
34516    }
34517    impl ::std::convert::From<SplAddressCriterionAddressesItem> for ::std::string::String {
34518        fn from(value: SplAddressCriterionAddressesItem) -> Self {
34519            value.0
34520        }
34521    }
34522    impl ::std::convert::From<&SplAddressCriterionAddressesItem> for SplAddressCriterionAddressesItem {
34523        fn from(value: &SplAddressCriterionAddressesItem) -> Self {
34524            value.clone()
34525        }
34526    }
34527    impl ::std::str::FromStr for SplAddressCriterionAddressesItem {
34528        type Err = self::error::ConversionError;
34529        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34530            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
34531                ::std::sync::LazyLock::new(|| {
34532                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
34533                });
34534            if PATTERN.find(value).is_none() {
34535                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
34536            }
34537            Ok(Self(value.to_string()))
34538        }
34539    }
34540    impl ::std::convert::TryFrom<&str> for SplAddressCriterionAddressesItem {
34541        type Error = self::error::ConversionError;
34542        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34543            value.parse()
34544        }
34545    }
34546    impl ::std::convert::TryFrom<&::std::string::String> for SplAddressCriterionAddressesItem {
34547        type Error = self::error::ConversionError;
34548        fn try_from(
34549            value: &::std::string::String,
34550        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34551            value.parse()
34552        }
34553    }
34554    impl ::std::convert::TryFrom<::std::string::String> for SplAddressCriterionAddressesItem {
34555        type Error = self::error::ConversionError;
34556        fn try_from(
34557            value: ::std::string::String,
34558        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34559            value.parse()
34560        }
34561    }
34562    impl<'de> ::serde::Deserialize<'de> for SplAddressCriterionAddressesItem {
34563        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
34564        where
34565            D: ::serde::Deserializer<'de>,
34566        {
34567            ::std::string::String::deserialize(deserializer)?
34568                .parse()
34569                .map_err(|e: self::error::ConversionError| {
34570                    <D::Error as ::serde::de::Error>::custom(e.to_string())
34571                })
34572        }
34573    }
34574    ///The operator to use for the comparison. Each of the SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
34575    ///
34576    /// <details><summary>JSON schema</summary>
34577    ///
34578    /// ```json
34579    ///{
34580    ///  "description": "The operator to use for the comparison. Each of the SPL token transfer recipient addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.",
34581    ///  "examples": [
34582    ///    "in"
34583    ///  ],
34584    ///  "type": "string",
34585    ///  "enum": [
34586    ///    "in",
34587    ///    "not in"
34588    ///  ]
34589    ///}
34590    /// ```
34591    /// </details>
34592    #[derive(
34593        ::serde::Deserialize,
34594        ::serde::Serialize,
34595        Clone,
34596        Copy,
34597        Debug,
34598        Eq,
34599        Hash,
34600        Ord,
34601        PartialEq,
34602        PartialOrd,
34603    )]
34604    pub enum SplAddressCriterionOperator {
34605        #[serde(rename = "in")]
34606        In,
34607        #[serde(rename = "not in")]
34608        NotIn,
34609    }
34610    impl ::std::convert::From<&Self> for SplAddressCriterionOperator {
34611        fn from(value: &SplAddressCriterionOperator) -> Self {
34612            value.clone()
34613        }
34614    }
34615    impl ::std::fmt::Display for SplAddressCriterionOperator {
34616        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34617            match *self {
34618                Self::In => f.write_str("in"),
34619                Self::NotIn => f.write_str("not in"),
34620            }
34621        }
34622    }
34623    impl ::std::str::FromStr for SplAddressCriterionOperator {
34624        type Err = self::error::ConversionError;
34625        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34626            match value {
34627                "in" => Ok(Self::In),
34628                "not in" => Ok(Self::NotIn),
34629                _ => Err("invalid value".into()),
34630            }
34631        }
34632    }
34633    impl ::std::convert::TryFrom<&str> for SplAddressCriterionOperator {
34634        type Error = self::error::ConversionError;
34635        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34636            value.parse()
34637        }
34638    }
34639    impl ::std::convert::TryFrom<&::std::string::String> for SplAddressCriterionOperator {
34640        type Error = self::error::ConversionError;
34641        fn try_from(
34642            value: &::std::string::String,
34643        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34644            value.parse()
34645        }
34646    }
34647    impl ::std::convert::TryFrom<::std::string::String> for SplAddressCriterionOperator {
34648        type Error = self::error::ConversionError;
34649        fn try_from(
34650            value: ::std::string::String,
34651        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34652            value.parse()
34653        }
34654    }
34655    ///The type of criterion to use. This should be `splAddress`.
34656    ///
34657    /// <details><summary>JSON schema</summary>
34658    ///
34659    /// ```json
34660    ///{
34661    ///  "description": "The type of criterion to use. This should be `splAddress`.",
34662    ///  "examples": [
34663    ///    "splAddress"
34664    ///  ],
34665    ///  "type": "string",
34666    ///  "enum": [
34667    ///    "splAddress"
34668    ///  ]
34669    ///}
34670    /// ```
34671    /// </details>
34672    #[derive(
34673        ::serde::Deserialize,
34674        ::serde::Serialize,
34675        Clone,
34676        Copy,
34677        Debug,
34678        Eq,
34679        Hash,
34680        Ord,
34681        PartialEq,
34682        PartialOrd,
34683    )]
34684    pub enum SplAddressCriterionType {
34685        #[serde(rename = "splAddress")]
34686        SplAddress,
34687    }
34688    impl ::std::convert::From<&Self> for SplAddressCriterionType {
34689        fn from(value: &SplAddressCriterionType) -> Self {
34690            value.clone()
34691        }
34692    }
34693    impl ::std::fmt::Display for SplAddressCriterionType {
34694        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34695            match *self {
34696                Self::SplAddress => f.write_str("splAddress"),
34697            }
34698        }
34699    }
34700    impl ::std::str::FromStr for SplAddressCriterionType {
34701        type Err = self::error::ConversionError;
34702        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34703            match value {
34704                "splAddress" => Ok(Self::SplAddress),
34705                _ => Err("invalid value".into()),
34706            }
34707        }
34708    }
34709    impl ::std::convert::TryFrom<&str> for SplAddressCriterionType {
34710        type Error = self::error::ConversionError;
34711        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34712            value.parse()
34713        }
34714    }
34715    impl ::std::convert::TryFrom<&::std::string::String> for SplAddressCriterionType {
34716        type Error = self::error::ConversionError;
34717        fn try_from(
34718            value: &::std::string::String,
34719        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34720            value.parse()
34721        }
34722    }
34723    impl ::std::convert::TryFrom<::std::string::String> for SplAddressCriterionType {
34724        type Error = self::error::ConversionError;
34725        fn try_from(
34726            value: ::std::string::String,
34727        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34728            value.parse()
34729        }
34730    }
34731    ///The criterion for the SPL token value of a SPL token transfer instruction in a Solana transaction.
34732    ///
34733    /// <details><summary>JSON schema</summary>
34734    ///
34735    /// ```json
34736    ///{
34737    ///  "title": "SplValueCriterion",
34738    ///  "description": "The criterion for the SPL token value of a SPL token transfer instruction in a Solana transaction.",
34739    ///  "type": "object",
34740    ///  "required": [
34741    ///    "operator",
34742    ///    "splValue",
34743    ///    "type"
34744    ///  ],
34745    ///  "properties": {
34746    ///    "operator": {
34747    ///      "description": "The operator to use for the comparison. The transaction instruction's `value` field will be on the left-hand side of the operator, and the `splValue` field will be on the right-hand side.",
34748    ///      "examples": [
34749    ///        "<="
34750    ///      ],
34751    ///      "type": "string",
34752    ///      "enum": [
34753    ///        "GreaterThan",
34754    ///        "GreaterThanOrEqual",
34755    ///        "LessThan",
34756    ///        "LessThanOrEqual",
34757    ///        "Equal"
34758    ///      ]
34759    ///    },
34760    ///    "splValue": {
34761    ///      "description": "The amount of the SPL token that the transaction instruction's `value` field should be compared to.",
34762    ///      "examples": [
34763    ///        "1000000000000000000"
34764    ///      ],
34765    ///      "type": "string"
34766    ///    },
34767    ///    "type": {
34768    ///      "description": "The type of criterion to use. This should be `splValue`.",
34769    ///      "examples": [
34770    ///        "splValue"
34771    ///      ],
34772    ///      "type": "string",
34773    ///      "enum": [
34774    ///        "splValue"
34775    ///      ]
34776    ///    }
34777    ///  },
34778    ///  "x-audience": "public"
34779    ///}
34780    /// ```
34781    /// </details>
34782    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
34783    pub struct SplValueCriterion {
34784        ///The operator to use for the comparison. The transaction instruction's `value` field will be on the left-hand side of the operator, and the `splValue` field will be on the right-hand side.
34785        pub operator: SplValueCriterionOperator,
34786        ///The amount of the SPL token that the transaction instruction's `value` field should be compared to.
34787        #[serde(rename = "splValue")]
34788        pub spl_value: ::std::string::String,
34789        ///The type of criterion to use. This should be `splValue`.
34790        #[serde(rename = "type")]
34791        pub type_: SplValueCriterionType,
34792    }
34793    impl ::std::convert::From<&SplValueCriterion> for SplValueCriterion {
34794        fn from(value: &SplValueCriterion) -> Self {
34795            value.clone()
34796        }
34797    }
34798    impl SplValueCriterion {
34799        pub fn builder() -> builder::SplValueCriterion {
34800            Default::default()
34801        }
34802    }
34803    ///The operator to use for the comparison. The transaction instruction's `value` field will be on the left-hand side of the operator, and the `splValue` field will be on the right-hand side.
34804    ///
34805    /// <details><summary>JSON schema</summary>
34806    ///
34807    /// ```json
34808    ///{
34809    ///  "description": "The operator to use for the comparison. The transaction instruction's `value` field will be on the left-hand side of the operator, and the `splValue` field will be on the right-hand side.",
34810    ///  "examples": [
34811    ///    "<="
34812    ///  ],
34813    ///  "type": "string",
34814    ///  "enum": [
34815    ///    "GreaterThan",
34816    ///    "GreaterThanOrEqual",
34817    ///    "LessThan",
34818    ///    "LessThanOrEqual",
34819    ///    "Equal"
34820    ///  ]
34821    ///}
34822    /// ```
34823    /// </details>
34824    #[derive(
34825        ::serde::Deserialize,
34826        ::serde::Serialize,
34827        Clone,
34828        Copy,
34829        Debug,
34830        Eq,
34831        Hash,
34832        Ord,
34833        PartialEq,
34834        PartialOrd,
34835    )]
34836    pub enum SplValueCriterionOperator {
34837        GreaterThan,
34838        GreaterThanOrEqual,
34839        LessThan,
34840        LessThanOrEqual,
34841        Equal,
34842    }
34843    impl ::std::convert::From<&Self> for SplValueCriterionOperator {
34844        fn from(value: &SplValueCriterionOperator) -> Self {
34845            value.clone()
34846        }
34847    }
34848    impl ::std::fmt::Display for SplValueCriterionOperator {
34849        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34850            match *self {
34851                Self::GreaterThan => f.write_str("GreaterThan"),
34852                Self::GreaterThanOrEqual => f.write_str("GreaterThanOrEqual"),
34853                Self::LessThan => f.write_str("LessThan"),
34854                Self::LessThanOrEqual => f.write_str("LessThanOrEqual"),
34855                Self::Equal => f.write_str("Equal"),
34856            }
34857        }
34858    }
34859    impl ::std::str::FromStr for SplValueCriterionOperator {
34860        type Err = self::error::ConversionError;
34861        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34862            match value {
34863                "GreaterThan" => Ok(Self::GreaterThan),
34864                "GreaterThanOrEqual" => Ok(Self::GreaterThanOrEqual),
34865                "LessThan" => Ok(Self::LessThan),
34866                "LessThanOrEqual" => Ok(Self::LessThanOrEqual),
34867                "Equal" => Ok(Self::Equal),
34868                _ => Err("invalid value".into()),
34869            }
34870        }
34871    }
34872    impl ::std::convert::TryFrom<&str> for SplValueCriterionOperator {
34873        type Error = self::error::ConversionError;
34874        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34875            value.parse()
34876        }
34877    }
34878    impl ::std::convert::TryFrom<&::std::string::String> for SplValueCriterionOperator {
34879        type Error = self::error::ConversionError;
34880        fn try_from(
34881            value: &::std::string::String,
34882        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34883            value.parse()
34884        }
34885    }
34886    impl ::std::convert::TryFrom<::std::string::String> for SplValueCriterionOperator {
34887        type Error = self::error::ConversionError;
34888        fn try_from(
34889            value: ::std::string::String,
34890        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34891            value.parse()
34892        }
34893    }
34894    ///The type of criterion to use. This should be `splValue`.
34895    ///
34896    /// <details><summary>JSON schema</summary>
34897    ///
34898    /// ```json
34899    ///{
34900    ///  "description": "The type of criterion to use. This should be `splValue`.",
34901    ///  "examples": [
34902    ///    "splValue"
34903    ///  ],
34904    ///  "type": "string",
34905    ///  "enum": [
34906    ///    "splValue"
34907    ///  ]
34908    ///}
34909    /// ```
34910    /// </details>
34911    #[derive(
34912        ::serde::Deserialize,
34913        ::serde::Serialize,
34914        Clone,
34915        Copy,
34916        Debug,
34917        Eq,
34918        Hash,
34919        Ord,
34920        PartialEq,
34921        PartialOrd,
34922    )]
34923    pub enum SplValueCriterionType {
34924        #[serde(rename = "splValue")]
34925        SplValue,
34926    }
34927    impl ::std::convert::From<&Self> for SplValueCriterionType {
34928        fn from(value: &SplValueCriterionType) -> Self {
34929            value.clone()
34930        }
34931    }
34932    impl ::std::fmt::Display for SplValueCriterionType {
34933        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34934            match *self {
34935                Self::SplValue => f.write_str("splValue"),
34936            }
34937        }
34938    }
34939    impl ::std::str::FromStr for SplValueCriterionType {
34940        type Err = self::error::ConversionError;
34941        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34942            match value {
34943                "splValue" => Ok(Self::SplValue),
34944                _ => Err("invalid value".into()),
34945            }
34946        }
34947    }
34948    impl ::std::convert::TryFrom<&str> for SplValueCriterionType {
34949        type Error = self::error::ConversionError;
34950        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
34951            value.parse()
34952        }
34953    }
34954    impl ::std::convert::TryFrom<&::std::string::String> for SplValueCriterionType {
34955        type Error = self::error::ConversionError;
34956        fn try_from(
34957            value: &::std::string::String,
34958        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34959            value.parse()
34960        }
34961    }
34962    impl ::std::convert::TryFrom<::std::string::String> for SplValueCriterionType {
34963        type Error = self::error::ConversionError;
34964        fn try_from(
34965            value: ::std::string::String,
34966        ) -> ::std::result::Result<Self, self::error::ConversionError> {
34967            value.parse()
34968        }
34969    }
34970    ///`SupportedX402PaymentKindsResponse`
34971    ///
34972    /// <details><summary>JSON schema</summary>
34973    ///
34974    /// ```json
34975    ///{
34976    ///  "type": "object",
34977    ///  "required": [
34978    ///    "extensions",
34979    ///    "kinds",
34980    ///    "signers"
34981    ///  ],
34982    ///  "properties": {
34983    ///    "extensions": {
34984    ///      "description": "The list of supported x402 extensions.",
34985    ///      "examples": [
34986    ///        [
34987    ///          "bazaar"
34988    ///        ]
34989    ///      ],
34990    ///      "type": "array",
34991    ///      "items": {
34992    ///        "type": "string"
34993    ///      }
34994    ///    },
34995    ///    "kinds": {
34996    ///      "description": "The list of supported payment kinds.",
34997    ///      "examples": [
34998    ///        [
34999    ///          {
35000    ///            "network": "base",
35001    ///            "scheme": "exact",
35002    ///            "x402Version": 1
35003    ///          },
35004    ///          {
35005    ///            "network": "base-sepolia",
35006    ///            "scheme": "exact",
35007    ///            "x402Version": 1
35008    ///          },
35009    ///          {
35010    ///            "network": "solana",
35011    ///            "scheme": "exact",
35012    ///            "x402Version": 1
35013    ///          },
35014    ///          {
35015    ///            "network": "solana-devnet",
35016    ///            "scheme": "exact",
35017    ///            "x402Version": 1
35018    ///          }
35019    ///        ]
35020    ///      ],
35021    ///      "type": "array",
35022    ///      "items": {
35023    ///        "$ref": "#/components/schemas/x402SupportedPaymentKind"
35024    ///      }
35025    ///    },
35026    ///    "signers": {
35027    ///      "description": "A map of CAIP-2 network or protocol family patterns to their supported signer addresses.",
35028    ///      "examples": [
35029    ///        {
35030    ///          "eip155:*": [
35031    ///            "0x1234567890abcdef1234567890abcdef12345678",
35032    ///            "0xabcdef1234567890abcdef1234567890abcdef12"
35033    ///          ],
35034    ///          "solana:*": [
35035    ///            "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
35036    ///          ]
35037    ///        }
35038    ///      ],
35039    ///      "type": "object",
35040    ///      "additionalProperties": {
35041    ///        "type": "array",
35042    ///        "items": {
35043    ///          "type": "string"
35044    ///        }
35045    ///      }
35046    ///    }
35047    ///  }
35048    ///}
35049    /// ```
35050    /// </details>
35051    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35052    pub struct SupportedX402PaymentKindsResponse {
35053        ///The list of supported x402 extensions.
35054        pub extensions: ::std::vec::Vec<::std::string::String>,
35055        ///The list of supported payment kinds.
35056        pub kinds: ::std::vec::Vec<X402SupportedPaymentKind>,
35057        ///A map of CAIP-2 network or protocol family patterns to their supported signer addresses.
35058        pub signers: ::std::collections::HashMap<
35059            ::std::string::String,
35060            ::std::vec::Vec<::std::string::String>,
35061        >,
35062    }
35063    impl ::std::convert::From<&SupportedX402PaymentKindsResponse>
35064        for SupportedX402PaymentKindsResponse
35065    {
35066        fn from(value: &SupportedX402PaymentKindsResponse) -> Self {
35067            value.clone()
35068        }
35069    }
35070    impl SupportedX402PaymentKindsResponse {
35071        pub fn builder() -> builder::SupportedX402PaymentKindsResponse {
35072            Default::default()
35073        }
35074    }
35075    ///`SwapUnavailableResponse`
35076    ///
35077    /// <details><summary>JSON schema</summary>
35078    ///
35079    /// ```json
35080    ///{
35081    ///  "title": "SwapUnavailableResponse",
35082    ///  "examples": [
35083    ///    {
35084    ///      "liquidityAvailable": false
35085    ///    }
35086    ///  ],
35087    ///  "type": "object",
35088    ///  "required": [
35089    ///    "liquidityAvailable"
35090    ///  ],
35091    ///  "properties": {
35092    ///    "liquidityAvailable": {
35093    ///      "description": "Whether sufficient liquidity is available to settle the swap. All other fields in the response will be empty if this is false.",
35094    ///      "examples": [
35095    ///        false
35096    ///      ],
35097    ///      "type": "boolean",
35098    ///      "enum": [
35099    ///        false
35100    ///      ]
35101    ///    }
35102    ///  }
35103    ///}
35104    /// ```
35105    /// </details>
35106    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35107    pub struct SwapUnavailableResponse {
35108        ///Whether sufficient liquidity is available to settle the swap. All other fields in the response will be empty if this is false.
35109        #[serde(rename = "liquidityAvailable")]
35110        pub liquidity_available: bool,
35111    }
35112    impl ::std::convert::From<&SwapUnavailableResponse> for SwapUnavailableResponse {
35113        fn from(value: &SwapUnavailableResponse) -> Self {
35114            value.clone()
35115        }
35116    }
35117    impl SwapUnavailableResponse {
35118        pub fn builder() -> builder::SwapUnavailableResponse {
35119            Default::default()
35120        }
35121    }
35122    ///The 0x-prefixed address that holds the `fromToken` balance and has the `Permit2` allowance set for the swap.
35123    ///
35124    /// <details><summary>JSON schema</summary>
35125    ///
35126    /// ```json
35127    ///{
35128    ///  "description": "The 0x-prefixed address that holds the `fromToken` balance and has the `Permit2` allowance set for the swap.",
35129    ///  "examples": [
35130    ///    "0xAc0974bec39a17e36ba4a6b4d238ff944bacb478"
35131    ///  ],
35132    ///  "type": "string",
35133    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
35134    ///}
35135    /// ```
35136    /// </details>
35137    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35138    #[serde(transparent)]
35139    pub struct Taker(::std::string::String);
35140    impl ::std::ops::Deref for Taker {
35141        type Target = ::std::string::String;
35142        fn deref(&self) -> &::std::string::String {
35143            &self.0
35144        }
35145    }
35146    impl ::std::convert::From<Taker> for ::std::string::String {
35147        fn from(value: Taker) -> Self {
35148            value.0
35149        }
35150    }
35151    impl ::std::convert::From<&Taker> for Taker {
35152        fn from(value: &Taker) -> Self {
35153            value.clone()
35154        }
35155    }
35156    impl ::std::str::FromStr for Taker {
35157        type Err = self::error::ConversionError;
35158        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35159            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
35160                ::std::sync::LazyLock::new(|| {
35161                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
35162                });
35163            if PATTERN.find(value).is_none() {
35164                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
35165            }
35166            Ok(Self(value.to_string()))
35167        }
35168    }
35169    impl ::std::convert::TryFrom<&str> for Taker {
35170        type Error = self::error::ConversionError;
35171        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35172            value.parse()
35173        }
35174    }
35175    impl ::std::convert::TryFrom<&::std::string::String> for Taker {
35176        type Error = self::error::ConversionError;
35177        fn try_from(
35178            value: &::std::string::String,
35179        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35180            value.parse()
35181        }
35182    }
35183    impl ::std::convert::TryFrom<::std::string::String> for Taker {
35184        type Error = self::error::ConversionError;
35185        fn try_from(
35186            value: ::std::string::String,
35187        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35188            value.parse()
35189        }
35190    }
35191    impl<'de> ::serde::Deserialize<'de> for Taker {
35192        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
35193        where
35194            D: ::serde::Deserializer<'de>,
35195        {
35196            ::std::string::String::deserialize(deserializer)?
35197                .parse()
35198                .map_err(|e: self::error::ConversionError| {
35199                    <D::Error as ::serde::de::Error>::custom(e.to_string())
35200                })
35201        }
35202    }
35203    ///The 0x-prefixed contract address of the token to receive.
35204    ///
35205    /// <details><summary>JSON schema</summary>
35206    ///
35207    /// ```json
35208    ///{
35209    ///  "description": "The 0x-prefixed contract address of the token to receive.",
35210    ///  "examples": [
35211    ///    "0x7F5c764cBc14f9669B88837ca1490cCa17c31607"
35212    ///  ],
35213    ///  "type": "string",
35214    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
35215    ///}
35216    /// ```
35217    /// </details>
35218    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35219    #[serde(transparent)]
35220    pub struct ToToken(::std::string::String);
35221    impl ::std::ops::Deref for ToToken {
35222        type Target = ::std::string::String;
35223        fn deref(&self) -> &::std::string::String {
35224            &self.0
35225        }
35226    }
35227    impl ::std::convert::From<ToToken> for ::std::string::String {
35228        fn from(value: ToToken) -> Self {
35229            value.0
35230        }
35231    }
35232    impl ::std::convert::From<&ToToken> for ToToken {
35233        fn from(value: &ToToken) -> Self {
35234            value.clone()
35235        }
35236    }
35237    impl ::std::str::FromStr for ToToken {
35238        type Err = self::error::ConversionError;
35239        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35240            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
35241                ::std::sync::LazyLock::new(|| {
35242                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
35243                });
35244            if PATTERN.find(value).is_none() {
35245                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
35246            }
35247            Ok(Self(value.to_string()))
35248        }
35249    }
35250    impl ::std::convert::TryFrom<&str> for ToToken {
35251        type Error = self::error::ConversionError;
35252        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35253            value.parse()
35254        }
35255    }
35256    impl ::std::convert::TryFrom<&::std::string::String> for ToToken {
35257        type Error = self::error::ConversionError;
35258        fn try_from(
35259            value: &::std::string::String,
35260        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35261            value.parse()
35262        }
35263    }
35264    impl ::std::convert::TryFrom<::std::string::String> for ToToken {
35265        type Error = self::error::ConversionError;
35266        fn try_from(
35267            value: ::std::string::String,
35268        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35269            value.parse()
35270        }
35271    }
35272    impl<'de> ::serde::Deserialize<'de> for ToToken {
35273        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
35274        where
35275            D: ::serde::Deserializer<'de>,
35276        {
35277            ::std::string::String::deserialize(deserializer)?
35278                .parse()
35279                .map_err(|e: self::error::ConversionError| {
35280                    <D::Error as ::serde::de::Error>::custom(e.to_string())
35281                })
35282        }
35283    }
35284    ///General information about a token. Includes the type, the network, and other identifying information.
35285    ///
35286    /// <details><summary>JSON schema</summary>
35287    ///
35288    /// ```json
35289    ///{
35290    ///  "description": "General information about a token. Includes the type, the network, and other identifying information.",
35291    ///  "examples": [
35292    ///    {
35293    ///      "contractAddress": "0x1234567890123456789012345678901234567890",
35294    ///      "name": "Ether",
35295    ///      "network": "base",
35296    ///      "symbol": "ETH"
35297    ///    }
35298    ///  ],
35299    ///  "type": "object",
35300    ///  "required": [
35301    ///    "contractAddress",
35302    ///    "network"
35303    ///  ],
35304    ///  "properties": {
35305    ///    "contractAddress": {
35306    ///      "description": "The contract address of the token.\nFor Ether, the contract address is `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` per [EIP-7528](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7528.md). For ERC-20 tokens, this is the contract address where the token is deployed.",
35307    ///      "examples": [
35308    ///        "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
35309    ///      ],
35310    ///      "type": "string",
35311    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
35312    ///    },
35313    ///    "name": {
35314    ///      "description": "The name of this token (ex: \"Solana\", \"Ether\", \"USD Coin\").\nThe token name is not unique. It is possible for two different tokens to have the same name.\nFor native gas tokens, this name is defined via convention. As an example, for ETH on Ethereum mainnet, the name is \"Ether\". For ERC-20 tokens, this name is defined via configuration. `name` will be the string returned by `function name() public view returns (string)` on the underlying token contract.\nNot all tokens have a name, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#name). This field will only be populated when the token's underlying ERC-20 contract has a `name()` function.\nFurther, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future.",
35315    ///      "examples": [
35316    ///        "Ether"
35317    ///      ],
35318    ///      "type": "string"
35319    ///    },
35320    ///    "network": {
35321    ///      "$ref": "#/components/schemas/ListEvmTokenBalancesNetwork"
35322    ///    },
35323    ///    "symbol": {
35324    ///      "description": "The symbol of this token (ex: SOL, ETH, USDC).\nThe token symbol is not unique. It is possible for two different tokens to have the same symbol.\nFor native gas tokens, this symbol is defined via convention. As an example, for ETH on Ethereum mainnet, the symbol is \"ETH\". For ERC-20 tokens, this symbol is defined via configuration. `symbol` will be the string returned by `function symbol() public view returns (string)` on the underlying token contract.\nNot all tokens have a symbol, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#symbol). This field will only be populated when the token's underlying ERC-20 contract has a `symbol()` function.\nFurther, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future.",
35325    ///      "examples": [
35326    ///        "ETH"
35327    ///      ],
35328    ///      "type": "string"
35329    ///    }
35330    ///  }
35331    ///}
35332    /// ```
35333    /// </details>
35334    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35335    pub struct Token {
35336        /**The contract address of the token.
35337        For Ether, the contract address is `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` per [EIP-7528](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7528.md). For ERC-20 tokens, this is the contract address where the token is deployed.*/
35338        #[serde(rename = "contractAddress")]
35339        pub contract_address: TokenContractAddress,
35340        /**The name of this token (ex: "Solana", "Ether", "USD Coin").
35341        The token name is not unique. It is possible for two different tokens to have the same name.
35342        For native gas tokens, this name is defined via convention. As an example, for ETH on Ethereum mainnet, the name is "Ether". For ERC-20 tokens, this name is defined via configuration. `name` will be the string returned by `function name() public view returns (string)` on the underlying token contract.
35343        Not all tokens have a name, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#name). This field will only be populated when the token's underlying ERC-20 contract has a `name()` function.
35344        Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future.*/
35345        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35346        pub name: ::std::option::Option<::std::string::String>,
35347        pub network: ListEvmTokenBalancesNetwork,
35348        /**The symbol of this token (ex: SOL, ETH, USDC).
35349        The token symbol is not unique. It is possible for two different tokens to have the same symbol.
35350        For native gas tokens, this symbol is defined via convention. As an example, for ETH on Ethereum mainnet, the symbol is "ETH". For ERC-20 tokens, this symbol is defined via configuration. `symbol` will be the string returned by `function symbol() public view returns (string)` on the underlying token contract.
35351        Not all tokens have a symbol, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#symbol). This field will only be populated when the token's underlying ERC-20 contract has a `symbol()` function.
35352        Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future.*/
35353        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35354        pub symbol: ::std::option::Option<::std::string::String>,
35355    }
35356    impl ::std::convert::From<&Token> for Token {
35357        fn from(value: &Token) -> Self {
35358            value.clone()
35359        }
35360    }
35361    impl Token {
35362        pub fn builder() -> builder::Token {
35363            Default::default()
35364        }
35365    }
35366    ///Amount of a given token.
35367    ///
35368    /// <details><summary>JSON schema</summary>
35369    ///
35370    /// ```json
35371    ///{
35372    ///  "description": "Amount of a given token.",
35373    ///  "examples": [
35374    ///    {
35375    ///      "amount": "125000000000000000000",
35376    ///      "decimals": 18
35377    ///    }
35378    ///  ],
35379    ///  "type": "object",
35380    ///  "required": [
35381    ///    "amount",
35382    ///    "decimals"
35383    ///  ],
35384    ///  "properties": {
35385    ///    "amount": {
35386    ///      "description": "The amount is denominated in the smallest indivisible unit of the token. For ETH, the smallest indivisible unit is Wei (10^-18 ETH). For ERC-20s, the smallest unit is the unit returned from `function totalSupply() public view returns (uint256)`.",
35387    ///      "examples": [
35388    ///        "1250000000000000000"
35389    ///      ],
35390    ///      "type": "string",
35391    ///      "pattern": "^[0-9]+$"
35392    ///    },
35393    ///    "decimals": {
35394    ///      "description": "'decimals' is the exponential value N that satisfies the equation `amount * 10^-N = standard_denomination`. The standard denomination is the most commonly used denomination for the token.\n- In the case of the native gas token, `decimals` is defined via convention. As an example, for ETH of Ethereum mainnet, the standard denomination is 10^-18 the smallest denomination (Wei). As such, for ETH on Ethereum mainnet, `decimals` is 18. - In the case of ERC-20 tokens, `decimals` is defined via configuration. `decimals` will be the number returned by `function decimals() public view returns (uint8)` on the underlying token contract.\nNot all tokens have a `decimals` field, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#decimals). This field will be left empty if the underlying token contract doesn't implement `decimals`.\nFurther, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future.",
35395    ///      "examples": [
35396    ///        18
35397    ///      ],
35398    ///      "type": "integer",
35399    ///      "format": "int64"
35400    ///    }
35401    ///  }
35402    ///}
35403    /// ```
35404    /// </details>
35405    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35406    pub struct TokenAmount {
35407        ///The amount is denominated in the smallest indivisible unit of the token. For ETH, the smallest indivisible unit is Wei (10^-18 ETH). For ERC-20s, the smallest unit is the unit returned from `function totalSupply() public view returns (uint256)`.
35408        pub amount: TokenAmountAmount,
35409        /**'decimals' is the exponential value N that satisfies the equation `amount * 10^-N = standard_denomination`. The standard denomination is the most commonly used denomination for the token.
35410        - In the case of the native gas token, `decimals` is defined via convention. As an example, for ETH of Ethereum mainnet, the standard denomination is 10^-18 the smallest denomination (Wei). As such, for ETH on Ethereum mainnet, `decimals` is 18. - In the case of ERC-20 tokens, `decimals` is defined via configuration. `decimals` will be the number returned by `function decimals() public view returns (uint8)` on the underlying token contract.
35411        Not all tokens have a `decimals` field, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#decimals). This field will be left empty if the underlying token contract doesn't implement `decimals`.
35412        Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future.*/
35413        pub decimals: i64,
35414    }
35415    impl ::std::convert::From<&TokenAmount> for TokenAmount {
35416        fn from(value: &TokenAmount) -> Self {
35417            value.clone()
35418        }
35419    }
35420    impl TokenAmount {
35421        pub fn builder() -> builder::TokenAmount {
35422            Default::default()
35423        }
35424    }
35425    ///The amount is denominated in the smallest indivisible unit of the token. For ETH, the smallest indivisible unit is Wei (10^-18 ETH). For ERC-20s, the smallest unit is the unit returned from `function totalSupply() public view returns (uint256)`.
35426    ///
35427    /// <details><summary>JSON schema</summary>
35428    ///
35429    /// ```json
35430    ///{
35431    ///  "description": "The amount is denominated in the smallest indivisible unit of the token. For ETH, the smallest indivisible unit is Wei (10^-18 ETH). For ERC-20s, the smallest unit is the unit returned from `function totalSupply() public view returns (uint256)`.",
35432    ///  "examples": [
35433    ///    "1250000000000000000"
35434    ///  ],
35435    ///  "type": "string",
35436    ///  "pattern": "^[0-9]+$"
35437    ///}
35438    /// ```
35439    /// </details>
35440    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35441    #[serde(transparent)]
35442    pub struct TokenAmountAmount(::std::string::String);
35443    impl ::std::ops::Deref for TokenAmountAmount {
35444        type Target = ::std::string::String;
35445        fn deref(&self) -> &::std::string::String {
35446            &self.0
35447        }
35448    }
35449    impl ::std::convert::From<TokenAmountAmount> for ::std::string::String {
35450        fn from(value: TokenAmountAmount) -> Self {
35451            value.0
35452        }
35453    }
35454    impl ::std::convert::From<&TokenAmountAmount> for TokenAmountAmount {
35455        fn from(value: &TokenAmountAmount) -> Self {
35456            value.clone()
35457        }
35458    }
35459    impl ::std::str::FromStr for TokenAmountAmount {
35460        type Err = self::error::ConversionError;
35461        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35462            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
35463                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^[0-9]+$").unwrap());
35464            if PATTERN.find(value).is_none() {
35465                return Err("doesn't match pattern \"^[0-9]+$\"".into());
35466            }
35467            Ok(Self(value.to_string()))
35468        }
35469    }
35470    impl ::std::convert::TryFrom<&str> for TokenAmountAmount {
35471        type Error = self::error::ConversionError;
35472        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35473            value.parse()
35474        }
35475    }
35476    impl ::std::convert::TryFrom<&::std::string::String> for TokenAmountAmount {
35477        type Error = self::error::ConversionError;
35478        fn try_from(
35479            value: &::std::string::String,
35480        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35481            value.parse()
35482        }
35483    }
35484    impl ::std::convert::TryFrom<::std::string::String> for TokenAmountAmount {
35485        type Error = self::error::ConversionError;
35486        fn try_from(
35487            value: ::std::string::String,
35488        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35489            value.parse()
35490        }
35491    }
35492    impl<'de> ::serde::Deserialize<'de> for TokenAmountAmount {
35493        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
35494        where
35495            D: ::serde::Deserializer<'de>,
35496        {
35497            ::std::string::String::deserialize(deserializer)?
35498                .parse()
35499                .map_err(|e: self::error::ConversionError| {
35500                    <D::Error as ::serde::de::Error>::custom(e.to_string())
35501                })
35502        }
35503    }
35504    ///`TokenBalance`
35505    ///
35506    /// <details><summary>JSON schema</summary>
35507    ///
35508    /// ```json
35509    ///{
35510    ///  "type": "object",
35511    ///  "required": [
35512    ///    "amount",
35513    ///    "token"
35514    ///  ],
35515    ///  "properties": {
35516    ///    "amount": {
35517    ///      "$ref": "#/components/schemas/TokenAmount"
35518    ///    },
35519    ///    "token": {
35520    ///      "$ref": "#/components/schemas/Token"
35521    ///    }
35522    ///  }
35523    ///}
35524    /// ```
35525    /// </details>
35526    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35527    pub struct TokenBalance {
35528        pub amount: TokenAmount,
35529        pub token: Token,
35530    }
35531    impl ::std::convert::From<&TokenBalance> for TokenBalance {
35532        fn from(value: &TokenBalance) -> Self {
35533            value.clone()
35534        }
35535    }
35536    impl TokenBalance {
35537        pub fn builder() -> builder::TokenBalance {
35538            Default::default()
35539        }
35540    }
35541    /**The contract address of the token.
35542    For Ether, the contract address is `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` per [EIP-7528](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7528.md). For ERC-20 tokens, this is the contract address where the token is deployed.*/
35543    ///
35544    /// <details><summary>JSON schema</summary>
35545    ///
35546    /// ```json
35547    ///{
35548    ///  "description": "The contract address of the token.\nFor Ether, the contract address is `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` per [EIP-7528](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7528.md). For ERC-20 tokens, this is the contract address where the token is deployed.",
35549    ///  "examples": [
35550    ///    "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
35551    ///  ],
35552    ///  "type": "string",
35553    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
35554    ///}
35555    /// ```
35556    /// </details>
35557    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35558    #[serde(transparent)]
35559    pub struct TokenContractAddress(::std::string::String);
35560    impl ::std::ops::Deref for TokenContractAddress {
35561        type Target = ::std::string::String;
35562        fn deref(&self) -> &::std::string::String {
35563            &self.0
35564        }
35565    }
35566    impl ::std::convert::From<TokenContractAddress> for ::std::string::String {
35567        fn from(value: TokenContractAddress) -> Self {
35568            value.0
35569        }
35570    }
35571    impl ::std::convert::From<&TokenContractAddress> for TokenContractAddress {
35572        fn from(value: &TokenContractAddress) -> Self {
35573            value.clone()
35574        }
35575    }
35576    impl ::std::str::FromStr for TokenContractAddress {
35577        type Err = self::error::ConversionError;
35578        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35579            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
35580                ::std::sync::LazyLock::new(|| {
35581                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
35582                });
35583            if PATTERN.find(value).is_none() {
35584                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
35585            }
35586            Ok(Self(value.to_string()))
35587        }
35588    }
35589    impl ::std::convert::TryFrom<&str> for TokenContractAddress {
35590        type Error = self::error::ConversionError;
35591        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35592            value.parse()
35593        }
35594    }
35595    impl ::std::convert::TryFrom<&::std::string::String> for TokenContractAddress {
35596        type Error = self::error::ConversionError;
35597        fn try_from(
35598            value: &::std::string::String,
35599        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35600            value.parse()
35601        }
35602    }
35603    impl ::std::convert::TryFrom<::std::string::String> for TokenContractAddress {
35604        type Error = self::error::ConversionError;
35605        fn try_from(
35606            value: ::std::string::String,
35607        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35608            value.parse()
35609        }
35610    }
35611    impl<'de> ::serde::Deserialize<'de> for TokenContractAddress {
35612        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
35613        where
35614            D: ::serde::Deserializer<'de>,
35615        {
35616            ::std::string::String::deserialize(deserializer)?
35617                .parse()
35618                .map_err(|e: self::error::ConversionError| {
35619                    <D::Error as ::serde::de::Error>::custom(e.to_string())
35620                })
35621        }
35622    }
35623    ///`TokenFee`
35624    ///
35625    /// <details><summary>JSON schema</summary>
35626    ///
35627    /// ```json
35628    ///{
35629    ///  "type": "object",
35630    ///  "required": [
35631    ///    "amount",
35632    ///    "token"
35633    ///  ],
35634    ///  "properties": {
35635    ///    "amount": {
35636    ///      "description": "The estimated amount of the fee in atomic units of the `token`. For example, `1000000000000000` if the fee is in ETH equates to 0.001 ETH, `10000` if the fee is in USDC equates to 0.01 USDC, etc.",
35637    ///      "examples": [
35638    ///        "1000000000000000000"
35639    ///      ],
35640    ///      "type": "string",
35641    ///      "pattern": "^\\d+$"
35642    ///    },
35643    ///    "token": {
35644    ///      "description": "The contract address of the token that the fee is paid in. The address `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` is used for the native token of the network (e.g. ETH).",
35645    ///      "examples": [
35646    ///        "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
35647    ///      ],
35648    ///      "type": "string",
35649    ///      "pattern": "^0x[a-fA-F0-9]{40}$"
35650    ///    }
35651    ///  }
35652    ///}
35653    /// ```
35654    /// </details>
35655    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35656    pub struct TokenFee {
35657        ///The estimated amount of the fee in atomic units of the `token`. For example, `1000000000000000` if the fee is in ETH equates to 0.001 ETH, `10000` if the fee is in USDC equates to 0.01 USDC, etc.
35658        pub amount: TokenFeeAmount,
35659        ///The contract address of the token that the fee is paid in. The address `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` is used for the native token of the network (e.g. ETH).
35660        pub token: TokenFeeToken,
35661    }
35662    impl ::std::convert::From<&TokenFee> for TokenFee {
35663        fn from(value: &TokenFee) -> Self {
35664            value.clone()
35665        }
35666    }
35667    impl TokenFee {
35668        pub fn builder() -> builder::TokenFee {
35669            Default::default()
35670        }
35671    }
35672    ///The estimated amount of the fee in atomic units of the `token`. For example, `1000000000000000` if the fee is in ETH equates to 0.001 ETH, `10000` if the fee is in USDC equates to 0.01 USDC, etc.
35673    ///
35674    /// <details><summary>JSON schema</summary>
35675    ///
35676    /// ```json
35677    ///{
35678    ///  "description": "The estimated amount of the fee in atomic units of the `token`. For example, `1000000000000000` if the fee is in ETH equates to 0.001 ETH, `10000` if the fee is in USDC equates to 0.01 USDC, etc.",
35679    ///  "examples": [
35680    ///    "1000000000000000000"
35681    ///  ],
35682    ///  "type": "string",
35683    ///  "pattern": "^\\d+$"
35684    ///}
35685    /// ```
35686    /// </details>
35687    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35688    #[serde(transparent)]
35689    pub struct TokenFeeAmount(::std::string::String);
35690    impl ::std::ops::Deref for TokenFeeAmount {
35691        type Target = ::std::string::String;
35692        fn deref(&self) -> &::std::string::String {
35693            &self.0
35694        }
35695    }
35696    impl ::std::convert::From<TokenFeeAmount> for ::std::string::String {
35697        fn from(value: TokenFeeAmount) -> Self {
35698            value.0
35699        }
35700    }
35701    impl ::std::convert::From<&TokenFeeAmount> for TokenFeeAmount {
35702        fn from(value: &TokenFeeAmount) -> Self {
35703            value.clone()
35704        }
35705    }
35706    impl ::std::str::FromStr for TokenFeeAmount {
35707        type Err = self::error::ConversionError;
35708        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35709            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
35710                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^\\d+$").unwrap());
35711            if PATTERN.find(value).is_none() {
35712                return Err("doesn't match pattern \"^\\d+$\"".into());
35713            }
35714            Ok(Self(value.to_string()))
35715        }
35716    }
35717    impl ::std::convert::TryFrom<&str> for TokenFeeAmount {
35718        type Error = self::error::ConversionError;
35719        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35720            value.parse()
35721        }
35722    }
35723    impl ::std::convert::TryFrom<&::std::string::String> for TokenFeeAmount {
35724        type Error = self::error::ConversionError;
35725        fn try_from(
35726            value: &::std::string::String,
35727        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35728            value.parse()
35729        }
35730    }
35731    impl ::std::convert::TryFrom<::std::string::String> for TokenFeeAmount {
35732        type Error = self::error::ConversionError;
35733        fn try_from(
35734            value: ::std::string::String,
35735        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35736            value.parse()
35737        }
35738    }
35739    impl<'de> ::serde::Deserialize<'de> for TokenFeeAmount {
35740        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
35741        where
35742            D: ::serde::Deserializer<'de>,
35743        {
35744            ::std::string::String::deserialize(deserializer)?
35745                .parse()
35746                .map_err(|e: self::error::ConversionError| {
35747                    <D::Error as ::serde::de::Error>::custom(e.to_string())
35748                })
35749        }
35750    }
35751    ///The contract address of the token that the fee is paid in. The address `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` is used for the native token of the network (e.g. ETH).
35752    ///
35753    /// <details><summary>JSON schema</summary>
35754    ///
35755    /// ```json
35756    ///{
35757    ///  "description": "The contract address of the token that the fee is paid in. The address `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` is used for the native token of the network (e.g. ETH).",
35758    ///  "examples": [
35759    ///    "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
35760    ///  ],
35761    ///  "type": "string",
35762    ///  "pattern": "^0x[a-fA-F0-9]{40}$"
35763    ///}
35764    /// ```
35765    /// </details>
35766    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35767    #[serde(transparent)]
35768    pub struct TokenFeeToken(::std::string::String);
35769    impl ::std::ops::Deref for TokenFeeToken {
35770        type Target = ::std::string::String;
35771        fn deref(&self) -> &::std::string::String {
35772            &self.0
35773        }
35774    }
35775    impl ::std::convert::From<TokenFeeToken> for ::std::string::String {
35776        fn from(value: TokenFeeToken) -> Self {
35777            value.0
35778        }
35779    }
35780    impl ::std::convert::From<&TokenFeeToken> for TokenFeeToken {
35781        fn from(value: &TokenFeeToken) -> Self {
35782            value.clone()
35783        }
35784    }
35785    impl ::std::str::FromStr for TokenFeeToken {
35786        type Err = self::error::ConversionError;
35787        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35788            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
35789                ::std::sync::LazyLock::new(|| {
35790                    ::regress::Regex::new("^0x[a-fA-F0-9]{40}$").unwrap()
35791                });
35792            if PATTERN.find(value).is_none() {
35793                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{40}$\"".into());
35794            }
35795            Ok(Self(value.to_string()))
35796        }
35797    }
35798    impl ::std::convert::TryFrom<&str> for TokenFeeToken {
35799        type Error = self::error::ConversionError;
35800        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35801            value.parse()
35802        }
35803    }
35804    impl ::std::convert::TryFrom<&::std::string::String> for TokenFeeToken {
35805        type Error = self::error::ConversionError;
35806        fn try_from(
35807            value: &::std::string::String,
35808        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35809            value.parse()
35810        }
35811    }
35812    impl ::std::convert::TryFrom<::std::string::String> for TokenFeeToken {
35813        type Error = self::error::ConversionError;
35814        fn try_from(
35815            value: ::std::string::String,
35816        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35817            value.parse()
35818        }
35819    }
35820    impl<'de> ::serde::Deserialize<'de> for TokenFeeToken {
35821        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
35822        where
35823            D: ::serde::Deserializer<'de>,
35824        {
35825            ::std::string::String::deserialize(deserializer)?
35826                .parse()
35827                .map_err(|e: self::error::ConversionError| {
35828                    <D::Error as ::serde::de::Error>::custom(e.to_string())
35829                })
35830        }
35831    }
35832    ///`UpdateEvmAccountAddress`
35833    ///
35834    /// <details><summary>JSON schema</summary>
35835    ///
35836    /// ```json
35837    ///{
35838    ///  "type": "string",
35839    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
35840    ///}
35841    /// ```
35842    /// </details>
35843    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35844    #[serde(transparent)]
35845    pub struct UpdateEvmAccountAddress(::std::string::String);
35846    impl ::std::ops::Deref for UpdateEvmAccountAddress {
35847        type Target = ::std::string::String;
35848        fn deref(&self) -> &::std::string::String {
35849            &self.0
35850        }
35851    }
35852    impl ::std::convert::From<UpdateEvmAccountAddress> for ::std::string::String {
35853        fn from(value: UpdateEvmAccountAddress) -> Self {
35854            value.0
35855        }
35856    }
35857    impl ::std::convert::From<&UpdateEvmAccountAddress> for UpdateEvmAccountAddress {
35858        fn from(value: &UpdateEvmAccountAddress) -> Self {
35859            value.clone()
35860        }
35861    }
35862    impl ::std::str::FromStr for UpdateEvmAccountAddress {
35863        type Err = self::error::ConversionError;
35864        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35865            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
35866                ::std::sync::LazyLock::new(|| {
35867                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
35868                });
35869            if PATTERN.find(value).is_none() {
35870                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
35871            }
35872            Ok(Self(value.to_string()))
35873        }
35874    }
35875    impl ::std::convert::TryFrom<&str> for UpdateEvmAccountAddress {
35876        type Error = self::error::ConversionError;
35877        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
35878            value.parse()
35879        }
35880    }
35881    impl ::std::convert::TryFrom<&::std::string::String> for UpdateEvmAccountAddress {
35882        type Error = self::error::ConversionError;
35883        fn try_from(
35884            value: &::std::string::String,
35885        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35886            value.parse()
35887        }
35888    }
35889    impl ::std::convert::TryFrom<::std::string::String> for UpdateEvmAccountAddress {
35890        type Error = self::error::ConversionError;
35891        fn try_from(
35892            value: ::std::string::String,
35893        ) -> ::std::result::Result<Self, self::error::ConversionError> {
35894            value.parse()
35895        }
35896    }
35897    impl<'de> ::serde::Deserialize<'de> for UpdateEvmAccountAddress {
35898        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
35899        where
35900            D: ::serde::Deserializer<'de>,
35901        {
35902            ::std::string::String::deserialize(deserializer)?
35903                .parse()
35904                .map_err(|e: self::error::ConversionError| {
35905                    <D::Error as ::serde::de::Error>::custom(e.to_string())
35906                })
35907        }
35908    }
35909    ///`UpdateEvmAccountBody`
35910    ///
35911    /// <details><summary>JSON schema</summary>
35912    ///
35913    /// ```json
35914    ///{
35915    ///  "type": "object",
35916    ///  "properties": {
35917    ///    "accountPolicy": {
35918    ///      "description": "The ID of the account-level policy to apply to the account, or an empty string to unset attached policy.",
35919    ///      "examples": [
35920    ///        "123e4567-e89b-12d3-a456-426614174000"
35921    ///      ],
35922    ///      "type": "string",
35923    ///      "pattern": "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^$)",
35924    ///      "x-audience": "public"
35925    ///    },
35926    ///    "name": {
35927    ///      "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
35928    ///      "examples": [
35929    ///        "my-wallet"
35930    ///      ],
35931    ///      "type": "string",
35932    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
35933    ///    }
35934    ///  }
35935    ///}
35936    /// ```
35937    /// </details>
35938    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
35939    pub struct UpdateEvmAccountBody {
35940        ///The ID of the account-level policy to apply to the account, or an empty string to unset attached policy.
35941        #[serde(
35942            rename = "accountPolicy",
35943            default,
35944            skip_serializing_if = "::std::option::Option::is_none"
35945        )]
35946        pub account_policy: ::std::option::Option<UpdateEvmAccountBodyAccountPolicy>,
35947        /**An optional name for the account.
35948        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
35949        Account names must be unique across all EVM accounts in the developer's CDP Project.*/
35950        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35951        pub name: ::std::option::Option<UpdateEvmAccountBodyName>,
35952    }
35953    impl ::std::convert::From<&UpdateEvmAccountBody> for UpdateEvmAccountBody {
35954        fn from(value: &UpdateEvmAccountBody) -> Self {
35955            value.clone()
35956        }
35957    }
35958    impl ::std::default::Default for UpdateEvmAccountBody {
35959        fn default() -> Self {
35960            Self {
35961                account_policy: Default::default(),
35962                name: Default::default(),
35963            }
35964        }
35965    }
35966    impl UpdateEvmAccountBody {
35967        pub fn builder() -> builder::UpdateEvmAccountBody {
35968            Default::default()
35969        }
35970    }
35971    ///The ID of the account-level policy to apply to the account, or an empty string to unset attached policy.
35972    ///
35973    /// <details><summary>JSON schema</summary>
35974    ///
35975    /// ```json
35976    ///{
35977    ///  "description": "The ID of the account-level policy to apply to the account, or an empty string to unset attached policy.",
35978    ///  "examples": [
35979    ///    "123e4567-e89b-12d3-a456-426614174000"
35980    ///  ],
35981    ///  "type": "string",
35982    ///  "pattern": "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^$)",
35983    ///  "x-audience": "public"
35984    ///}
35985    /// ```
35986    /// </details>
35987    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35988    #[serde(transparent)]
35989    pub struct UpdateEvmAccountBodyAccountPolicy(::std::string::String);
35990    impl ::std::ops::Deref for UpdateEvmAccountBodyAccountPolicy {
35991        type Target = ::std::string::String;
35992        fn deref(&self) -> &::std::string::String {
35993            &self.0
35994        }
35995    }
35996    impl ::std::convert::From<UpdateEvmAccountBodyAccountPolicy> for ::std::string::String {
35997        fn from(value: UpdateEvmAccountBodyAccountPolicy) -> Self {
35998            value.0
35999        }
36000    }
36001    impl ::std::convert::From<&UpdateEvmAccountBodyAccountPolicy>
36002        for UpdateEvmAccountBodyAccountPolicy
36003    {
36004        fn from(value: &UpdateEvmAccountBodyAccountPolicy) -> Self {
36005            value.clone()
36006        }
36007    }
36008    impl ::std::str::FromStr for UpdateEvmAccountBodyAccountPolicy {
36009        type Err = self::error::ConversionError;
36010        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36011            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
36012                || {
36013                    ::regress::Regex::new(
36014                        "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^$)",
36015                    )
36016                    .unwrap()
36017                },
36018            );
36019            if PATTERN.find(value).is_none() {
36020                return Err(
36021                    "doesn't match pattern \"(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^$)\""
36022                        .into(),
36023                );
36024            }
36025            Ok(Self(value.to_string()))
36026        }
36027    }
36028    impl ::std::convert::TryFrom<&str> for UpdateEvmAccountBodyAccountPolicy {
36029        type Error = self::error::ConversionError;
36030        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36031            value.parse()
36032        }
36033    }
36034    impl ::std::convert::TryFrom<&::std::string::String> for UpdateEvmAccountBodyAccountPolicy {
36035        type Error = self::error::ConversionError;
36036        fn try_from(
36037            value: &::std::string::String,
36038        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36039            value.parse()
36040        }
36041    }
36042    impl ::std::convert::TryFrom<::std::string::String> for UpdateEvmAccountBodyAccountPolicy {
36043        type Error = self::error::ConversionError;
36044        fn try_from(
36045            value: ::std::string::String,
36046        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36047            value.parse()
36048        }
36049    }
36050    impl<'de> ::serde::Deserialize<'de> for UpdateEvmAccountBodyAccountPolicy {
36051        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36052        where
36053            D: ::serde::Deserializer<'de>,
36054        {
36055            ::std::string::String::deserialize(deserializer)?
36056                .parse()
36057                .map_err(|e: self::error::ConversionError| {
36058                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36059                })
36060        }
36061    }
36062    /**An optional name for the account.
36063    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
36064    Account names must be unique across all EVM accounts in the developer's CDP Project.*/
36065    ///
36066    /// <details><summary>JSON schema</summary>
36067    ///
36068    /// ```json
36069    ///{
36070    ///  "description": "An optional name for the account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM accounts in the developer's CDP Project.",
36071    ///  "examples": [
36072    ///    "my-wallet"
36073    ///  ],
36074    ///  "type": "string",
36075    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
36076    ///}
36077    /// ```
36078    /// </details>
36079    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36080    #[serde(transparent)]
36081    pub struct UpdateEvmAccountBodyName(::std::string::String);
36082    impl ::std::ops::Deref for UpdateEvmAccountBodyName {
36083        type Target = ::std::string::String;
36084        fn deref(&self) -> &::std::string::String {
36085            &self.0
36086        }
36087    }
36088    impl ::std::convert::From<UpdateEvmAccountBodyName> for ::std::string::String {
36089        fn from(value: UpdateEvmAccountBodyName) -> Self {
36090            value.0
36091        }
36092    }
36093    impl ::std::convert::From<&UpdateEvmAccountBodyName> for UpdateEvmAccountBodyName {
36094        fn from(value: &UpdateEvmAccountBodyName) -> Self {
36095            value.clone()
36096        }
36097    }
36098    impl ::std::str::FromStr for UpdateEvmAccountBodyName {
36099        type Err = self::error::ConversionError;
36100        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36101            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
36102                ::std::sync::LazyLock::new(|| {
36103                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
36104                });
36105            if PATTERN.find(value).is_none() {
36106                return Err(
36107                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
36108                );
36109            }
36110            Ok(Self(value.to_string()))
36111        }
36112    }
36113    impl ::std::convert::TryFrom<&str> for UpdateEvmAccountBodyName {
36114        type Error = self::error::ConversionError;
36115        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36116            value.parse()
36117        }
36118    }
36119    impl ::std::convert::TryFrom<&::std::string::String> for UpdateEvmAccountBodyName {
36120        type Error = self::error::ConversionError;
36121        fn try_from(
36122            value: &::std::string::String,
36123        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36124            value.parse()
36125        }
36126    }
36127    impl ::std::convert::TryFrom<::std::string::String> for UpdateEvmAccountBodyName {
36128        type Error = self::error::ConversionError;
36129        fn try_from(
36130            value: ::std::string::String,
36131        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36132            value.parse()
36133        }
36134    }
36135    impl<'de> ::serde::Deserialize<'de> for UpdateEvmAccountBodyName {
36136        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36137        where
36138            D: ::serde::Deserializer<'de>,
36139        {
36140            ::std::string::String::deserialize(deserializer)?
36141                .parse()
36142                .map_err(|e: self::error::ConversionError| {
36143                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36144                })
36145        }
36146    }
36147    ///`UpdateEvmAccountXIdempotencyKey`
36148    ///
36149    /// <details><summary>JSON schema</summary>
36150    ///
36151    /// ```json
36152    ///{
36153    ///  "type": "string",
36154    ///  "maxLength": 36,
36155    ///  "minLength": 36,
36156    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
36157    ///}
36158    /// ```
36159    /// </details>
36160    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36161    #[serde(transparent)]
36162    pub struct UpdateEvmAccountXIdempotencyKey(::std::string::String);
36163    impl ::std::ops::Deref for UpdateEvmAccountXIdempotencyKey {
36164        type Target = ::std::string::String;
36165        fn deref(&self) -> &::std::string::String {
36166            &self.0
36167        }
36168    }
36169    impl ::std::convert::From<UpdateEvmAccountXIdempotencyKey> for ::std::string::String {
36170        fn from(value: UpdateEvmAccountXIdempotencyKey) -> Self {
36171            value.0
36172        }
36173    }
36174    impl ::std::convert::From<&UpdateEvmAccountXIdempotencyKey> for UpdateEvmAccountXIdempotencyKey {
36175        fn from(value: &UpdateEvmAccountXIdempotencyKey) -> Self {
36176            value.clone()
36177        }
36178    }
36179    impl ::std::str::FromStr for UpdateEvmAccountXIdempotencyKey {
36180        type Err = self::error::ConversionError;
36181        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36182            if value.chars().count() > 36usize {
36183                return Err("longer than 36 characters".into());
36184            }
36185            if value.chars().count() < 36usize {
36186                return Err("shorter than 36 characters".into());
36187            }
36188            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
36189                ::std::sync::LazyLock::new(|| {
36190                    ::regress::Regex::new(
36191                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
36192                    )
36193                    .unwrap()
36194                });
36195            if PATTERN.find(value).is_none() {
36196                return Err(
36197                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
36198                        .into(),
36199                );
36200            }
36201            Ok(Self(value.to_string()))
36202        }
36203    }
36204    impl ::std::convert::TryFrom<&str> for UpdateEvmAccountXIdempotencyKey {
36205        type Error = self::error::ConversionError;
36206        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36207            value.parse()
36208        }
36209    }
36210    impl ::std::convert::TryFrom<&::std::string::String> for UpdateEvmAccountXIdempotencyKey {
36211        type Error = self::error::ConversionError;
36212        fn try_from(
36213            value: &::std::string::String,
36214        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36215            value.parse()
36216        }
36217    }
36218    impl ::std::convert::TryFrom<::std::string::String> for UpdateEvmAccountXIdempotencyKey {
36219        type Error = self::error::ConversionError;
36220        fn try_from(
36221            value: ::std::string::String,
36222        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36223            value.parse()
36224        }
36225    }
36226    impl<'de> ::serde::Deserialize<'de> for UpdateEvmAccountXIdempotencyKey {
36227        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36228        where
36229            D: ::serde::Deserializer<'de>,
36230        {
36231            ::std::string::String::deserialize(deserializer)?
36232                .parse()
36233                .map_err(|e: self::error::ConversionError| {
36234                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36235                })
36236        }
36237    }
36238    ///`UpdateEvmSmartAccountAddress`
36239    ///
36240    /// <details><summary>JSON schema</summary>
36241    ///
36242    /// ```json
36243    ///{
36244    ///  "type": "string",
36245    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
36246    ///}
36247    /// ```
36248    /// </details>
36249    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36250    #[serde(transparent)]
36251    pub struct UpdateEvmSmartAccountAddress(::std::string::String);
36252    impl ::std::ops::Deref for UpdateEvmSmartAccountAddress {
36253        type Target = ::std::string::String;
36254        fn deref(&self) -> &::std::string::String {
36255            &self.0
36256        }
36257    }
36258    impl ::std::convert::From<UpdateEvmSmartAccountAddress> for ::std::string::String {
36259        fn from(value: UpdateEvmSmartAccountAddress) -> Self {
36260            value.0
36261        }
36262    }
36263    impl ::std::convert::From<&UpdateEvmSmartAccountAddress> for UpdateEvmSmartAccountAddress {
36264        fn from(value: &UpdateEvmSmartAccountAddress) -> Self {
36265            value.clone()
36266        }
36267    }
36268    impl ::std::str::FromStr for UpdateEvmSmartAccountAddress {
36269        type Err = self::error::ConversionError;
36270        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36271            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
36272                ::std::sync::LazyLock::new(|| {
36273                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
36274                });
36275            if PATTERN.find(value).is_none() {
36276                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
36277            }
36278            Ok(Self(value.to_string()))
36279        }
36280    }
36281    impl ::std::convert::TryFrom<&str> for UpdateEvmSmartAccountAddress {
36282        type Error = self::error::ConversionError;
36283        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36284            value.parse()
36285        }
36286    }
36287    impl ::std::convert::TryFrom<&::std::string::String> for UpdateEvmSmartAccountAddress {
36288        type Error = self::error::ConversionError;
36289        fn try_from(
36290            value: &::std::string::String,
36291        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36292            value.parse()
36293        }
36294    }
36295    impl ::std::convert::TryFrom<::std::string::String> for UpdateEvmSmartAccountAddress {
36296        type Error = self::error::ConversionError;
36297        fn try_from(
36298            value: ::std::string::String,
36299        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36300            value.parse()
36301        }
36302    }
36303    impl<'de> ::serde::Deserialize<'de> for UpdateEvmSmartAccountAddress {
36304        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36305        where
36306            D: ::serde::Deserializer<'de>,
36307        {
36308            ::std::string::String::deserialize(deserializer)?
36309                .parse()
36310                .map_err(|e: self::error::ConversionError| {
36311                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36312                })
36313        }
36314    }
36315    ///`UpdateEvmSmartAccountBody`
36316    ///
36317    /// <details><summary>JSON schema</summary>
36318    ///
36319    /// ```json
36320    ///{
36321    ///  "type": "object",
36322    ///  "properties": {
36323    ///    "name": {
36324    ///      "description": "An optional name for the smart account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM smart accounts in the developer's CDP Project.",
36325    ///      "examples": [
36326    ///        "my-smart-account"
36327    ///      ],
36328    ///      "type": "string",
36329    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
36330    ///    }
36331    ///  }
36332    ///}
36333    /// ```
36334    /// </details>
36335    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
36336    pub struct UpdateEvmSmartAccountBody {
36337        /**An optional name for the smart account.
36338        Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
36339        Account names must be unique across all EVM smart accounts in the developer's CDP Project.*/
36340        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
36341        pub name: ::std::option::Option<UpdateEvmSmartAccountBodyName>,
36342    }
36343    impl ::std::convert::From<&UpdateEvmSmartAccountBody> for UpdateEvmSmartAccountBody {
36344        fn from(value: &UpdateEvmSmartAccountBody) -> Self {
36345            value.clone()
36346        }
36347    }
36348    impl ::std::default::Default for UpdateEvmSmartAccountBody {
36349        fn default() -> Self {
36350            Self {
36351                name: Default::default(),
36352            }
36353        }
36354    }
36355    impl UpdateEvmSmartAccountBody {
36356        pub fn builder() -> builder::UpdateEvmSmartAccountBody {
36357            Default::default()
36358        }
36359    }
36360    /**An optional name for the smart account.
36361    Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
36362    Account names must be unique across all EVM smart accounts in the developer's CDP Project.*/
36363    ///
36364    /// <details><summary>JSON schema</summary>
36365    ///
36366    /// ```json
36367    ///{
36368    ///  "description": "An optional name for the smart account.\nAccount names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all EVM smart accounts in the developer's CDP Project.",
36369    ///  "examples": [
36370    ///    "my-smart-account"
36371    ///  ],
36372    ///  "type": "string",
36373    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
36374    ///}
36375    /// ```
36376    /// </details>
36377    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36378    #[serde(transparent)]
36379    pub struct UpdateEvmSmartAccountBodyName(::std::string::String);
36380    impl ::std::ops::Deref for UpdateEvmSmartAccountBodyName {
36381        type Target = ::std::string::String;
36382        fn deref(&self) -> &::std::string::String {
36383            &self.0
36384        }
36385    }
36386    impl ::std::convert::From<UpdateEvmSmartAccountBodyName> for ::std::string::String {
36387        fn from(value: UpdateEvmSmartAccountBodyName) -> Self {
36388            value.0
36389        }
36390    }
36391    impl ::std::convert::From<&UpdateEvmSmartAccountBodyName> for UpdateEvmSmartAccountBodyName {
36392        fn from(value: &UpdateEvmSmartAccountBodyName) -> Self {
36393            value.clone()
36394        }
36395    }
36396    impl ::std::str::FromStr for UpdateEvmSmartAccountBodyName {
36397        type Err = self::error::ConversionError;
36398        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36399            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
36400                ::std::sync::LazyLock::new(|| {
36401                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
36402                });
36403            if PATTERN.find(value).is_none() {
36404                return Err(
36405                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
36406                );
36407            }
36408            Ok(Self(value.to_string()))
36409        }
36410    }
36411    impl ::std::convert::TryFrom<&str> for UpdateEvmSmartAccountBodyName {
36412        type Error = self::error::ConversionError;
36413        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36414            value.parse()
36415        }
36416    }
36417    impl ::std::convert::TryFrom<&::std::string::String> for UpdateEvmSmartAccountBodyName {
36418        type Error = self::error::ConversionError;
36419        fn try_from(
36420            value: &::std::string::String,
36421        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36422            value.parse()
36423        }
36424    }
36425    impl ::std::convert::TryFrom<::std::string::String> for UpdateEvmSmartAccountBodyName {
36426        type Error = self::error::ConversionError;
36427        fn try_from(
36428            value: ::std::string::String,
36429        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36430            value.parse()
36431        }
36432    }
36433    impl<'de> ::serde::Deserialize<'de> for UpdateEvmSmartAccountBodyName {
36434        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36435        where
36436            D: ::serde::Deserializer<'de>,
36437        {
36438            ::std::string::String::deserialize(deserializer)?
36439                .parse()
36440                .map_err(|e: self::error::ConversionError| {
36441                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36442                })
36443        }
36444    }
36445    ///`UpdatePolicyBody`
36446    ///
36447    /// <details><summary>JSON schema</summary>
36448    ///
36449    /// ```json
36450    ///{
36451    ///  "type": "object",
36452    ///  "required": [
36453    ///    "rules"
36454    ///  ],
36455    ///  "properties": {
36456    ///    "description": {
36457    ///      "description": "An optional human-readable description for the policy.\nPolicy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.",
36458    ///      "examples": [
36459    ///        "Default policy"
36460    ///      ],
36461    ///      "type": "string",
36462    ///      "pattern": "^[A-Za-z0-9 ,.]{1,50}$"
36463    ///    },
36464    ///    "rules": {
36465    ///      "description": "A list of rules that comprise the policy. There is a limit of 10 rules per policy.",
36466    ///      "type": "array",
36467    ///      "items": {
36468    ///        "$ref": "#/components/schemas/Rule"
36469    ///      }
36470    ///    }
36471    ///  }
36472    ///}
36473    /// ```
36474    /// </details>
36475    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
36476    pub struct UpdatePolicyBody {
36477        /**An optional human-readable description for the policy.
36478        Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.*/
36479        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
36480        pub description: ::std::option::Option<UpdatePolicyBodyDescription>,
36481        ///A list of rules that comprise the policy. There is a limit of 10 rules per policy.
36482        pub rules: ::std::vec::Vec<Rule>,
36483    }
36484    impl ::std::convert::From<&UpdatePolicyBody> for UpdatePolicyBody {
36485        fn from(value: &UpdatePolicyBody) -> Self {
36486            value.clone()
36487        }
36488    }
36489    impl UpdatePolicyBody {
36490        pub fn builder() -> builder::UpdatePolicyBody {
36491            Default::default()
36492        }
36493    }
36494    /**An optional human-readable description for the policy.
36495    Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.*/
36496    ///
36497    /// <details><summary>JSON schema</summary>
36498    ///
36499    /// ```json
36500    ///{
36501    ///  "description": "An optional human-readable description for the policy.\nPolicy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.",
36502    ///  "examples": [
36503    ///    "Default policy"
36504    ///  ],
36505    ///  "type": "string",
36506    ///  "pattern": "^[A-Za-z0-9 ,.]{1,50}$"
36507    ///}
36508    /// ```
36509    /// </details>
36510    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36511    #[serde(transparent)]
36512    pub struct UpdatePolicyBodyDescription(::std::string::String);
36513    impl ::std::ops::Deref for UpdatePolicyBodyDescription {
36514        type Target = ::std::string::String;
36515        fn deref(&self) -> &::std::string::String {
36516            &self.0
36517        }
36518    }
36519    impl ::std::convert::From<UpdatePolicyBodyDescription> for ::std::string::String {
36520        fn from(value: UpdatePolicyBodyDescription) -> Self {
36521            value.0
36522        }
36523    }
36524    impl ::std::convert::From<&UpdatePolicyBodyDescription> for UpdatePolicyBodyDescription {
36525        fn from(value: &UpdatePolicyBodyDescription) -> Self {
36526            value.clone()
36527        }
36528    }
36529    impl ::std::str::FromStr for UpdatePolicyBodyDescription {
36530        type Err = self::error::ConversionError;
36531        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36532            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
36533                ::std::sync::LazyLock::new(|| {
36534                    ::regress::Regex::new("^[A-Za-z0-9 ,.]{1,50}$").unwrap()
36535                });
36536            if PATTERN.find(value).is_none() {
36537                return Err("doesn't match pattern \"^[A-Za-z0-9 ,.]{1,50}$\"".into());
36538            }
36539            Ok(Self(value.to_string()))
36540        }
36541    }
36542    impl ::std::convert::TryFrom<&str> for UpdatePolicyBodyDescription {
36543        type Error = self::error::ConversionError;
36544        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36545            value.parse()
36546        }
36547    }
36548    impl ::std::convert::TryFrom<&::std::string::String> for UpdatePolicyBodyDescription {
36549        type Error = self::error::ConversionError;
36550        fn try_from(
36551            value: &::std::string::String,
36552        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36553            value.parse()
36554        }
36555    }
36556    impl ::std::convert::TryFrom<::std::string::String> for UpdatePolicyBodyDescription {
36557        type Error = self::error::ConversionError;
36558        fn try_from(
36559            value: ::std::string::String,
36560        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36561            value.parse()
36562        }
36563    }
36564    impl<'de> ::serde::Deserialize<'de> for UpdatePolicyBodyDescription {
36565        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36566        where
36567            D: ::serde::Deserializer<'de>,
36568        {
36569            ::std::string::String::deserialize(deserializer)?
36570                .parse()
36571                .map_err(|e: self::error::ConversionError| {
36572                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36573                })
36574        }
36575    }
36576    ///`UpdatePolicyPolicyId`
36577    ///
36578    /// <details><summary>JSON schema</summary>
36579    ///
36580    /// ```json
36581    ///{
36582    ///  "type": "string",
36583    ///  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
36584    ///}
36585    /// ```
36586    /// </details>
36587    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36588    #[serde(transparent)]
36589    pub struct UpdatePolicyPolicyId(::std::string::String);
36590    impl ::std::ops::Deref for UpdatePolicyPolicyId {
36591        type Target = ::std::string::String;
36592        fn deref(&self) -> &::std::string::String {
36593            &self.0
36594        }
36595    }
36596    impl ::std::convert::From<UpdatePolicyPolicyId> for ::std::string::String {
36597        fn from(value: UpdatePolicyPolicyId) -> Self {
36598            value.0
36599        }
36600    }
36601    impl ::std::convert::From<&UpdatePolicyPolicyId> for UpdatePolicyPolicyId {
36602        fn from(value: &UpdatePolicyPolicyId) -> Self {
36603            value.clone()
36604        }
36605    }
36606    impl ::std::str::FromStr for UpdatePolicyPolicyId {
36607        type Err = self::error::ConversionError;
36608        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36609            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
36610                || {
36611                    ::regress::Regex::new(
36612                        "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
36613                    )
36614                    .unwrap()
36615                },
36616            );
36617            if PATTERN.find(value).is_none() {
36618                return Err(
36619                    "doesn't match pattern \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\""
36620                        .into(),
36621                );
36622            }
36623            Ok(Self(value.to_string()))
36624        }
36625    }
36626    impl ::std::convert::TryFrom<&str> for UpdatePolicyPolicyId {
36627        type Error = self::error::ConversionError;
36628        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36629            value.parse()
36630        }
36631    }
36632    impl ::std::convert::TryFrom<&::std::string::String> for UpdatePolicyPolicyId {
36633        type Error = self::error::ConversionError;
36634        fn try_from(
36635            value: &::std::string::String,
36636        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36637            value.parse()
36638        }
36639    }
36640    impl ::std::convert::TryFrom<::std::string::String> for UpdatePolicyPolicyId {
36641        type Error = self::error::ConversionError;
36642        fn try_from(
36643            value: ::std::string::String,
36644        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36645            value.parse()
36646        }
36647    }
36648    impl<'de> ::serde::Deserialize<'de> for UpdatePolicyPolicyId {
36649        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36650        where
36651            D: ::serde::Deserializer<'de>,
36652        {
36653            ::std::string::String::deserialize(deserializer)?
36654                .parse()
36655                .map_err(|e: self::error::ConversionError| {
36656                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36657                })
36658        }
36659    }
36660    ///`UpdatePolicyXIdempotencyKey`
36661    ///
36662    /// <details><summary>JSON schema</summary>
36663    ///
36664    /// ```json
36665    ///{
36666    ///  "type": "string",
36667    ///  "maxLength": 36,
36668    ///  "minLength": 36,
36669    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
36670    ///}
36671    /// ```
36672    /// </details>
36673    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36674    #[serde(transparent)]
36675    pub struct UpdatePolicyXIdempotencyKey(::std::string::String);
36676    impl ::std::ops::Deref for UpdatePolicyXIdempotencyKey {
36677        type Target = ::std::string::String;
36678        fn deref(&self) -> &::std::string::String {
36679            &self.0
36680        }
36681    }
36682    impl ::std::convert::From<UpdatePolicyXIdempotencyKey> for ::std::string::String {
36683        fn from(value: UpdatePolicyXIdempotencyKey) -> Self {
36684            value.0
36685        }
36686    }
36687    impl ::std::convert::From<&UpdatePolicyXIdempotencyKey> for UpdatePolicyXIdempotencyKey {
36688        fn from(value: &UpdatePolicyXIdempotencyKey) -> Self {
36689            value.clone()
36690        }
36691    }
36692    impl ::std::str::FromStr for UpdatePolicyXIdempotencyKey {
36693        type Err = self::error::ConversionError;
36694        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36695            if value.chars().count() > 36usize {
36696                return Err("longer than 36 characters".into());
36697            }
36698            if value.chars().count() < 36usize {
36699                return Err("shorter than 36 characters".into());
36700            }
36701            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
36702                ::std::sync::LazyLock::new(|| {
36703                    ::regress::Regex::new(
36704                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
36705                    )
36706                    .unwrap()
36707                });
36708            if PATTERN.find(value).is_none() {
36709                return Err(
36710                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
36711                        .into(),
36712                );
36713            }
36714            Ok(Self(value.to_string()))
36715        }
36716    }
36717    impl ::std::convert::TryFrom<&str> for UpdatePolicyXIdempotencyKey {
36718        type Error = self::error::ConversionError;
36719        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36720            value.parse()
36721        }
36722    }
36723    impl ::std::convert::TryFrom<&::std::string::String> for UpdatePolicyXIdempotencyKey {
36724        type Error = self::error::ConversionError;
36725        fn try_from(
36726            value: &::std::string::String,
36727        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36728            value.parse()
36729        }
36730    }
36731    impl ::std::convert::TryFrom<::std::string::String> for UpdatePolicyXIdempotencyKey {
36732        type Error = self::error::ConversionError;
36733        fn try_from(
36734            value: ::std::string::String,
36735        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36736            value.parse()
36737        }
36738    }
36739    impl<'de> ::serde::Deserialize<'de> for UpdatePolicyXIdempotencyKey {
36740        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36741        where
36742            D: ::serde::Deserializer<'de>,
36743        {
36744            ::std::string::String::deserialize(deserializer)?
36745                .parse()
36746                .map_err(|e: self::error::ConversionError| {
36747                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36748                })
36749        }
36750    }
36751    ///`UpdateSolanaAccountAddress`
36752    ///
36753    /// <details><summary>JSON schema</summary>
36754    ///
36755    /// ```json
36756    ///{
36757    ///  "type": "string",
36758    ///  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
36759    ///}
36760    /// ```
36761    /// </details>
36762    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36763    #[serde(transparent)]
36764    pub struct UpdateSolanaAccountAddress(::std::string::String);
36765    impl ::std::ops::Deref for UpdateSolanaAccountAddress {
36766        type Target = ::std::string::String;
36767        fn deref(&self) -> &::std::string::String {
36768            &self.0
36769        }
36770    }
36771    impl ::std::convert::From<UpdateSolanaAccountAddress> for ::std::string::String {
36772        fn from(value: UpdateSolanaAccountAddress) -> Self {
36773            value.0
36774        }
36775    }
36776    impl ::std::convert::From<&UpdateSolanaAccountAddress> for UpdateSolanaAccountAddress {
36777        fn from(value: &UpdateSolanaAccountAddress) -> Self {
36778            value.clone()
36779        }
36780    }
36781    impl ::std::str::FromStr for UpdateSolanaAccountAddress {
36782        type Err = self::error::ConversionError;
36783        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36784            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
36785                ::std::sync::LazyLock::new(|| {
36786                    ::regress::Regex::new("^[1-9A-HJ-NP-Za-km-z]{32,44}$").unwrap()
36787                });
36788            if PATTERN.find(value).is_none() {
36789                return Err("doesn't match pattern \"^[1-9A-HJ-NP-Za-km-z]{32,44}$\"".into());
36790            }
36791            Ok(Self(value.to_string()))
36792        }
36793    }
36794    impl ::std::convert::TryFrom<&str> for UpdateSolanaAccountAddress {
36795        type Error = self::error::ConversionError;
36796        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36797            value.parse()
36798        }
36799    }
36800    impl ::std::convert::TryFrom<&::std::string::String> for UpdateSolanaAccountAddress {
36801        type Error = self::error::ConversionError;
36802        fn try_from(
36803            value: &::std::string::String,
36804        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36805            value.parse()
36806        }
36807    }
36808    impl ::std::convert::TryFrom<::std::string::String> for UpdateSolanaAccountAddress {
36809        type Error = self::error::ConversionError;
36810        fn try_from(
36811            value: ::std::string::String,
36812        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36813            value.parse()
36814        }
36815    }
36816    impl<'de> ::serde::Deserialize<'de> for UpdateSolanaAccountAddress {
36817        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36818        where
36819            D: ::serde::Deserializer<'de>,
36820        {
36821            ::std::string::String::deserialize(deserializer)?
36822                .parse()
36823                .map_err(|e: self::error::ConversionError| {
36824                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36825                })
36826        }
36827    }
36828    ///`UpdateSolanaAccountBody`
36829    ///
36830    /// <details><summary>JSON schema</summary>
36831    ///
36832    /// ```json
36833    ///{
36834    ///  "type": "object",
36835    ///  "properties": {
36836    ///    "accountPolicy": {
36837    ///      "description": "The ID of the account-level policy to apply to the account, or an empty string to unset attached policy.",
36838    ///      "examples": [
36839    ///        "123e4567-e89b-12d3-a456-426614174000"
36840    ///      ],
36841    ///      "type": "string",
36842    ///      "pattern": "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^$)",
36843    ///      "x-audience": "public"
36844    ///    },
36845    ///    "name": {
36846    ///      "description": "An optional name for the account. Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all Solana accounts in the developer's CDP Project.",
36847    ///      "examples": [
36848    ///        "my-wallet"
36849    ///      ],
36850    ///      "type": "string",
36851    ///      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
36852    ///    }
36853    ///  }
36854    ///}
36855    /// ```
36856    /// </details>
36857    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
36858    pub struct UpdateSolanaAccountBody {
36859        ///The ID of the account-level policy to apply to the account, or an empty string to unset attached policy.
36860        #[serde(
36861            rename = "accountPolicy",
36862            default,
36863            skip_serializing_if = "::std::option::Option::is_none"
36864        )]
36865        pub account_policy: ::std::option::Option<UpdateSolanaAccountBodyAccountPolicy>,
36866        /**An optional name for the account. Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
36867        Account names must be unique across all Solana accounts in the developer's CDP Project.*/
36868        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
36869        pub name: ::std::option::Option<UpdateSolanaAccountBodyName>,
36870    }
36871    impl ::std::convert::From<&UpdateSolanaAccountBody> for UpdateSolanaAccountBody {
36872        fn from(value: &UpdateSolanaAccountBody) -> Self {
36873            value.clone()
36874        }
36875    }
36876    impl ::std::default::Default for UpdateSolanaAccountBody {
36877        fn default() -> Self {
36878            Self {
36879                account_policy: Default::default(),
36880                name: Default::default(),
36881            }
36882        }
36883    }
36884    impl UpdateSolanaAccountBody {
36885        pub fn builder() -> builder::UpdateSolanaAccountBody {
36886            Default::default()
36887        }
36888    }
36889    ///The ID of the account-level policy to apply to the account, or an empty string to unset attached policy.
36890    ///
36891    /// <details><summary>JSON schema</summary>
36892    ///
36893    /// ```json
36894    ///{
36895    ///  "description": "The ID of the account-level policy to apply to the account, or an empty string to unset attached policy.",
36896    ///  "examples": [
36897    ///    "123e4567-e89b-12d3-a456-426614174000"
36898    ///  ],
36899    ///  "type": "string",
36900    ///  "pattern": "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^$)",
36901    ///  "x-audience": "public"
36902    ///}
36903    /// ```
36904    /// </details>
36905    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36906    #[serde(transparent)]
36907    pub struct UpdateSolanaAccountBodyAccountPolicy(::std::string::String);
36908    impl ::std::ops::Deref for UpdateSolanaAccountBodyAccountPolicy {
36909        type Target = ::std::string::String;
36910        fn deref(&self) -> &::std::string::String {
36911            &self.0
36912        }
36913    }
36914    impl ::std::convert::From<UpdateSolanaAccountBodyAccountPolicy> for ::std::string::String {
36915        fn from(value: UpdateSolanaAccountBodyAccountPolicy) -> Self {
36916            value.0
36917        }
36918    }
36919    impl ::std::convert::From<&UpdateSolanaAccountBodyAccountPolicy>
36920        for UpdateSolanaAccountBodyAccountPolicy
36921    {
36922        fn from(value: &UpdateSolanaAccountBodyAccountPolicy) -> Self {
36923            value.clone()
36924        }
36925    }
36926    impl ::std::str::FromStr for UpdateSolanaAccountBodyAccountPolicy {
36927        type Err = self::error::ConversionError;
36928        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36929            static PATTERN: ::std::sync::LazyLock<::regress::Regex> = ::std::sync::LazyLock::new(
36930                || {
36931                    ::regress::Regex::new(
36932                        "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^$)",
36933                    )
36934                    .unwrap()
36935                },
36936            );
36937            if PATTERN.find(value).is_none() {
36938                return Err(
36939                    "doesn't match pattern \"(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^$)\""
36940                        .into(),
36941                );
36942            }
36943            Ok(Self(value.to_string()))
36944        }
36945    }
36946    impl ::std::convert::TryFrom<&str> for UpdateSolanaAccountBodyAccountPolicy {
36947        type Error = self::error::ConversionError;
36948        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
36949            value.parse()
36950        }
36951    }
36952    impl ::std::convert::TryFrom<&::std::string::String> for UpdateSolanaAccountBodyAccountPolicy {
36953        type Error = self::error::ConversionError;
36954        fn try_from(
36955            value: &::std::string::String,
36956        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36957            value.parse()
36958        }
36959    }
36960    impl ::std::convert::TryFrom<::std::string::String> for UpdateSolanaAccountBodyAccountPolicy {
36961        type Error = self::error::ConversionError;
36962        fn try_from(
36963            value: ::std::string::String,
36964        ) -> ::std::result::Result<Self, self::error::ConversionError> {
36965            value.parse()
36966        }
36967    }
36968    impl<'de> ::serde::Deserialize<'de> for UpdateSolanaAccountBodyAccountPolicy {
36969        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
36970        where
36971            D: ::serde::Deserializer<'de>,
36972        {
36973            ::std::string::String::deserialize(deserializer)?
36974                .parse()
36975                .map_err(|e: self::error::ConversionError| {
36976                    <D::Error as ::serde::de::Error>::custom(e.to_string())
36977                })
36978        }
36979    }
36980    /**An optional name for the account. Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.
36981    Account names must be unique across all Solana accounts in the developer's CDP Project.*/
36982    ///
36983    /// <details><summary>JSON schema</summary>
36984    ///
36985    /// ```json
36986    ///{
36987    ///  "description": "An optional name for the account. Account names can consist of alphanumeric characters and hyphens, and be between 2 and 36 characters long.\nAccount names must be unique across all Solana accounts in the developer's CDP Project.",
36988    ///  "examples": [
36989    ///    "my-wallet"
36990    ///  ],
36991    ///  "type": "string",
36992    ///  "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$"
36993    ///}
36994    /// ```
36995    /// </details>
36996    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36997    #[serde(transparent)]
36998    pub struct UpdateSolanaAccountBodyName(::std::string::String);
36999    impl ::std::ops::Deref for UpdateSolanaAccountBodyName {
37000        type Target = ::std::string::String;
37001        fn deref(&self) -> &::std::string::String {
37002            &self.0
37003        }
37004    }
37005    impl ::std::convert::From<UpdateSolanaAccountBodyName> for ::std::string::String {
37006        fn from(value: UpdateSolanaAccountBodyName) -> Self {
37007            value.0
37008        }
37009    }
37010    impl ::std::convert::From<&UpdateSolanaAccountBodyName> for UpdateSolanaAccountBodyName {
37011        fn from(value: &UpdateSolanaAccountBodyName) -> Self {
37012            value.clone()
37013        }
37014    }
37015    impl ::std::str::FromStr for UpdateSolanaAccountBodyName {
37016        type Err = self::error::ConversionError;
37017        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37018            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
37019                ::std::sync::LazyLock::new(|| {
37020                    ::regress::Regex::new("^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$").unwrap()
37021                });
37022            if PATTERN.find(value).is_none() {
37023                return Err(
37024                    "doesn't match pattern \"^[A-Za-z0-9][A-Za-z0-9-]{0,34}[A-Za-z0-9]$\"".into(),
37025                );
37026            }
37027            Ok(Self(value.to_string()))
37028        }
37029    }
37030    impl ::std::convert::TryFrom<&str> for UpdateSolanaAccountBodyName {
37031        type Error = self::error::ConversionError;
37032        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37033            value.parse()
37034        }
37035    }
37036    impl ::std::convert::TryFrom<&::std::string::String> for UpdateSolanaAccountBodyName {
37037        type Error = self::error::ConversionError;
37038        fn try_from(
37039            value: &::std::string::String,
37040        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37041            value.parse()
37042        }
37043    }
37044    impl ::std::convert::TryFrom<::std::string::String> for UpdateSolanaAccountBodyName {
37045        type Error = self::error::ConversionError;
37046        fn try_from(
37047            value: ::std::string::String,
37048        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37049            value.parse()
37050        }
37051    }
37052    impl<'de> ::serde::Deserialize<'de> for UpdateSolanaAccountBodyName {
37053        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
37054        where
37055            D: ::serde::Deserializer<'de>,
37056        {
37057            ::std::string::String::deserialize(deserializer)?
37058                .parse()
37059                .map_err(|e: self::error::ConversionError| {
37060                    <D::Error as ::serde::de::Error>::custom(e.to_string())
37061                })
37062        }
37063    }
37064    ///`UpdateSolanaAccountXIdempotencyKey`
37065    ///
37066    /// <details><summary>JSON schema</summary>
37067    ///
37068    /// ```json
37069    ///{
37070    ///  "type": "string",
37071    ///  "maxLength": 36,
37072    ///  "minLength": 36,
37073    ///  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
37074    ///}
37075    /// ```
37076    /// </details>
37077    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37078    #[serde(transparent)]
37079    pub struct UpdateSolanaAccountXIdempotencyKey(::std::string::String);
37080    impl ::std::ops::Deref for UpdateSolanaAccountXIdempotencyKey {
37081        type Target = ::std::string::String;
37082        fn deref(&self) -> &::std::string::String {
37083            &self.0
37084        }
37085    }
37086    impl ::std::convert::From<UpdateSolanaAccountXIdempotencyKey> for ::std::string::String {
37087        fn from(value: UpdateSolanaAccountXIdempotencyKey) -> Self {
37088            value.0
37089        }
37090    }
37091    impl ::std::convert::From<&UpdateSolanaAccountXIdempotencyKey>
37092        for UpdateSolanaAccountXIdempotencyKey
37093    {
37094        fn from(value: &UpdateSolanaAccountXIdempotencyKey) -> Self {
37095            value.clone()
37096        }
37097    }
37098    impl ::std::str::FromStr for UpdateSolanaAccountXIdempotencyKey {
37099        type Err = self::error::ConversionError;
37100        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37101            if value.chars().count() > 36usize {
37102                return Err("longer than 36 characters".into());
37103            }
37104            if value.chars().count() < 36usize {
37105                return Err("shorter than 36 characters".into());
37106            }
37107            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
37108                ::std::sync::LazyLock::new(|| {
37109                    ::regress::Regex::new(
37110                        "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
37111                    )
37112                    .unwrap()
37113                });
37114            if PATTERN.find(value).is_none() {
37115                return Err(
37116                    "doesn't match pattern \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\""
37117                        .into(),
37118                );
37119            }
37120            Ok(Self(value.to_string()))
37121        }
37122    }
37123    impl ::std::convert::TryFrom<&str> for UpdateSolanaAccountXIdempotencyKey {
37124        type Error = self::error::ConversionError;
37125        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37126            value.parse()
37127        }
37128    }
37129    impl ::std::convert::TryFrom<&::std::string::String> for UpdateSolanaAccountXIdempotencyKey {
37130        type Error = self::error::ConversionError;
37131        fn try_from(
37132            value: &::std::string::String,
37133        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37134            value.parse()
37135        }
37136    }
37137    impl ::std::convert::TryFrom<::std::string::String> for UpdateSolanaAccountXIdempotencyKey {
37138        type Error = self::error::ConversionError;
37139        fn try_from(
37140            value: ::std::string::String,
37141        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37142            value.parse()
37143        }
37144    }
37145    impl<'de> ::serde::Deserialize<'de> for UpdateSolanaAccountXIdempotencyKey {
37146        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
37147        where
37148            D: ::serde::Deserializer<'de>,
37149        {
37150            ::std::string::String::deserialize(deserializer)?
37151                .parse()
37152                .map_err(|e: self::error::ConversionError| {
37153                    <D::Error as ::serde::de::Error>::custom(e.to_string())
37154                })
37155        }
37156    }
37157    ///A valid URI.
37158    ///
37159    /// <details><summary>JSON schema</summary>
37160    ///
37161    /// ```json
37162    ///{
37163    ///  "description": "A valid URI.",
37164    ///  "examples": [
37165    ///    "foo://bar"
37166    ///  ],
37167    ///  "type": "string",
37168    ///  "format": "uri",
37169    ///  "maxLength": 2048,
37170    ///  "minLength": 5,
37171    ///  "pattern": "^.*://.*$"
37172    ///}
37173    /// ```
37174    /// </details>
37175    #[derive(
37176        ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
37177    )]
37178    #[serde(transparent)]
37179    pub struct Uri(pub ::std::string::String);
37180    impl ::std::ops::Deref for Uri {
37181        type Target = ::std::string::String;
37182        fn deref(&self) -> &::std::string::String {
37183            &self.0
37184        }
37185    }
37186    impl ::std::convert::From<Uri> for ::std::string::String {
37187        fn from(value: Uri) -> Self {
37188            value.0
37189        }
37190    }
37191    impl ::std::convert::From<&Uri> for Uri {
37192        fn from(value: &Uri) -> Self {
37193            value.clone()
37194        }
37195    }
37196    impl ::std::convert::From<::std::string::String> for Uri {
37197        fn from(value: ::std::string::String) -> Self {
37198            Self(value)
37199        }
37200    }
37201    impl ::std::str::FromStr for Uri {
37202        type Err = ::std::convert::Infallible;
37203        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
37204            Ok(Self(value.to_string()))
37205        }
37206    }
37207    impl ::std::fmt::Display for Uri {
37208        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
37209            self.0.fmt(f)
37210        }
37211    }
37212    ///A valid HTTP or HTTPS URL.
37213    ///
37214    /// <details><summary>JSON schema</summary>
37215    ///
37216    /// ```json
37217    ///{
37218    ///  "description": "A valid HTTP or HTTPS URL.",
37219    ///  "examples": [
37220    ///    "https://example.com"
37221    ///  ],
37222    ///  "type": "string",
37223    ///  "format": "uri",
37224    ///  "maxLength": 2048,
37225    ///  "minLength": 11,
37226    ///  "pattern": "^https?://.*$"
37227    ///}
37228    /// ```
37229    /// </details>
37230    #[derive(
37231        ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
37232    )]
37233    #[serde(transparent)]
37234    pub struct Url(pub ::std::string::String);
37235    impl ::std::ops::Deref for Url {
37236        type Target = ::std::string::String;
37237        fn deref(&self) -> &::std::string::String {
37238            &self.0
37239        }
37240    }
37241    impl ::std::convert::From<Url> for ::std::string::String {
37242        fn from(value: Url) -> Self {
37243            value.0
37244        }
37245    }
37246    impl ::std::convert::From<&Url> for Url {
37247        fn from(value: &Url) -> Self {
37248            value.clone()
37249        }
37250    }
37251    impl ::std::convert::From<::std::string::String> for Url {
37252        fn from(value: ::std::string::String) -> Self {
37253            Self(value)
37254        }
37255    }
37256    impl ::std::str::FromStr for Url {
37257        type Err = ::std::convert::Infallible;
37258        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
37259            Ok(Self(value.to_string()))
37260        }
37261    }
37262    impl ::std::fmt::Display for Url {
37263        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
37264            self.0.fmt(f)
37265        }
37266    }
37267    ///The receipt that contains information about the execution of user operation.
37268    ///
37269    /// <details><summary>JSON schema</summary>
37270    ///
37271    /// ```json
37272    ///{
37273    ///  "description": "The receipt that contains information about the execution of user operation.",
37274    ///  "examples": [
37275    ///    {
37276    ///      "blockHash": "0x386544b58930c0ec9e8f3ed09fb4cdb76b9ae0a1a37ddcacebe3925b57978e65",
37277    ///      "blockNumber": 29338819,
37278    ///      "gasUsed": "100000",
37279    ///      "revert": {
37280    ///        "data": "0x123",
37281    ///        "message": "reason for failure"
37282    ///      }
37283    ///    }
37284    ///  ],
37285    ///  "type": "object",
37286    ///  "properties": {
37287    ///    "blockHash": {
37288    ///      "description": "The block hash of the block including the transaction as 0x-prefixed string.",
37289    ///      "examples": [
37290    ///        "0x386544b58930c0ec9e8f3ed09fb4cdb76b9ae0a1a37ddcacebe3925b57978e65"
37291    ///      ],
37292    ///      "type": "string",
37293    ///      "pattern": "^0x[0-9a-fA-F]{64}$|^$"
37294    ///    },
37295    ///    "blockNumber": {
37296    ///      "description": "The block height (number) of the block including the transaction.",
37297    ///      "examples": [
37298    ///        29338819
37299    ///      ],
37300    ///      "type": "integer"
37301    ///    },
37302    ///    "gasUsed": {
37303    ///      "description": "The gas used for landing this user operation.",
37304    ///      "examples": [
37305    ///        "100000"
37306    ///      ],
37307    ///      "type": "string"
37308    ///    },
37309    ///    "revert": {
37310    ///      "$ref": "#/components/schemas/UserOperationReceiptRevert"
37311    ///    },
37312    ///    "transactionHash": {
37313    ///      "description": "The hash of this transaction as 0x-prefixed string.",
37314    ///      "examples": [
37315    ///        "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
37316    ///      ],
37317    ///      "type": "string",
37318    ///      "pattern": "^0x[a-fA-F0-9]{64}$"
37319    ///    }
37320    ///  }
37321    ///}
37322    /// ```
37323    /// </details>
37324    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37325    pub struct UserOperationReceipt {
37326        ///The block hash of the block including the transaction as 0x-prefixed string.
37327        #[serde(
37328            rename = "blockHash",
37329            default,
37330            skip_serializing_if = "::std::option::Option::is_none"
37331        )]
37332        pub block_hash: ::std::option::Option<UserOperationReceiptBlockHash>,
37333        ///The block height (number) of the block including the transaction.
37334        #[serde(
37335            rename = "blockNumber",
37336            default,
37337            skip_serializing_if = "::std::option::Option::is_none"
37338        )]
37339        pub block_number: ::std::option::Option<i64>,
37340        ///The gas used for landing this user operation.
37341        #[serde(
37342            rename = "gasUsed",
37343            default,
37344            skip_serializing_if = "::std::option::Option::is_none"
37345        )]
37346        pub gas_used: ::std::option::Option<::std::string::String>,
37347        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
37348        pub revert: ::std::option::Option<UserOperationReceiptRevert>,
37349        ///The hash of this transaction as 0x-prefixed string.
37350        #[serde(
37351            rename = "transactionHash",
37352            default,
37353            skip_serializing_if = "::std::option::Option::is_none"
37354        )]
37355        pub transaction_hash: ::std::option::Option<UserOperationReceiptTransactionHash>,
37356    }
37357    impl ::std::convert::From<&UserOperationReceipt> for UserOperationReceipt {
37358        fn from(value: &UserOperationReceipt) -> Self {
37359            value.clone()
37360        }
37361    }
37362    impl ::std::default::Default for UserOperationReceipt {
37363        fn default() -> Self {
37364            Self {
37365                block_hash: Default::default(),
37366                block_number: Default::default(),
37367                gas_used: Default::default(),
37368                revert: Default::default(),
37369                transaction_hash: Default::default(),
37370            }
37371        }
37372    }
37373    impl UserOperationReceipt {
37374        pub fn builder() -> builder::UserOperationReceipt {
37375            Default::default()
37376        }
37377    }
37378    ///The block hash of the block including the transaction as 0x-prefixed string.
37379    ///
37380    /// <details><summary>JSON schema</summary>
37381    ///
37382    /// ```json
37383    ///{
37384    ///  "description": "The block hash of the block including the transaction as 0x-prefixed string.",
37385    ///  "examples": [
37386    ///    "0x386544b58930c0ec9e8f3ed09fb4cdb76b9ae0a1a37ddcacebe3925b57978e65"
37387    ///  ],
37388    ///  "type": "string",
37389    ///  "pattern": "^0x[0-9a-fA-F]{64}$|^$"
37390    ///}
37391    /// ```
37392    /// </details>
37393    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37394    #[serde(transparent)]
37395    pub struct UserOperationReceiptBlockHash(::std::string::String);
37396    impl ::std::ops::Deref for UserOperationReceiptBlockHash {
37397        type Target = ::std::string::String;
37398        fn deref(&self) -> &::std::string::String {
37399            &self.0
37400        }
37401    }
37402    impl ::std::convert::From<UserOperationReceiptBlockHash> for ::std::string::String {
37403        fn from(value: UserOperationReceiptBlockHash) -> Self {
37404            value.0
37405        }
37406    }
37407    impl ::std::convert::From<&UserOperationReceiptBlockHash> for UserOperationReceiptBlockHash {
37408        fn from(value: &UserOperationReceiptBlockHash) -> Self {
37409            value.clone()
37410        }
37411    }
37412    impl ::std::str::FromStr for UserOperationReceiptBlockHash {
37413        type Err = self::error::ConversionError;
37414        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37415            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
37416                ::std::sync::LazyLock::new(|| {
37417                    ::regress::Regex::new("^0x[0-9a-fA-F]{64}$|^$").unwrap()
37418                });
37419            if PATTERN.find(value).is_none() {
37420                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{64}$|^$\"".into());
37421            }
37422            Ok(Self(value.to_string()))
37423        }
37424    }
37425    impl ::std::convert::TryFrom<&str> for UserOperationReceiptBlockHash {
37426        type Error = self::error::ConversionError;
37427        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37428            value.parse()
37429        }
37430    }
37431    impl ::std::convert::TryFrom<&::std::string::String> for UserOperationReceiptBlockHash {
37432        type Error = self::error::ConversionError;
37433        fn try_from(
37434            value: &::std::string::String,
37435        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37436            value.parse()
37437        }
37438    }
37439    impl ::std::convert::TryFrom<::std::string::String> for UserOperationReceiptBlockHash {
37440        type Error = self::error::ConversionError;
37441        fn try_from(
37442            value: ::std::string::String,
37443        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37444            value.parse()
37445        }
37446    }
37447    impl<'de> ::serde::Deserialize<'de> for UserOperationReceiptBlockHash {
37448        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
37449        where
37450            D: ::serde::Deserializer<'de>,
37451        {
37452            ::std::string::String::deserialize(deserializer)?
37453                .parse()
37454                .map_err(|e: self::error::ConversionError| {
37455                    <D::Error as ::serde::de::Error>::custom(e.to_string())
37456                })
37457        }
37458    }
37459    ///The revert data if the user operation has reverted.
37460    ///
37461    /// <details><summary>JSON schema</summary>
37462    ///
37463    /// ```json
37464    ///{
37465    ///  "description": "The revert data if the user operation has reverted.",
37466    ///  "examples": [
37467    ///    {
37468    ///      "data": "0x123",
37469    ///      "message": "reason for failure"
37470    ///    }
37471    ///  ],
37472    ///  "type": "object",
37473    ///  "required": [
37474    ///    "data",
37475    ///    "message"
37476    ///  ],
37477    ///  "properties": {
37478    ///    "data": {
37479    ///      "description": "The 0x-prefixed raw hex string.",
37480    ///      "examples": [
37481    ///        "0x123"
37482    ///      ],
37483    ///      "type": "string",
37484    ///      "pattern": "^0x[0-9a-fA-F]*$"
37485    ///    },
37486    ///    "message": {
37487    ///      "description": "Human-readable revert reason if able to decode.",
37488    ///      "examples": [
37489    ///        "reason for failure"
37490    ///      ],
37491    ///      "type": "string"
37492    ///    }
37493    ///  }
37494    ///}
37495    /// ```
37496    /// </details>
37497    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37498    pub struct UserOperationReceiptRevert {
37499        ///The 0x-prefixed raw hex string.
37500        pub data: UserOperationReceiptRevertData,
37501        ///Human-readable revert reason if able to decode.
37502        pub message: ::std::string::String,
37503    }
37504    impl ::std::convert::From<&UserOperationReceiptRevert> for UserOperationReceiptRevert {
37505        fn from(value: &UserOperationReceiptRevert) -> Self {
37506            value.clone()
37507        }
37508    }
37509    impl UserOperationReceiptRevert {
37510        pub fn builder() -> builder::UserOperationReceiptRevert {
37511            Default::default()
37512        }
37513    }
37514    ///The 0x-prefixed raw hex string.
37515    ///
37516    /// <details><summary>JSON schema</summary>
37517    ///
37518    /// ```json
37519    ///{
37520    ///  "description": "The 0x-prefixed raw hex string.",
37521    ///  "examples": [
37522    ///    "0x123"
37523    ///  ],
37524    ///  "type": "string",
37525    ///  "pattern": "^0x[0-9a-fA-F]*$"
37526    ///}
37527    /// ```
37528    /// </details>
37529    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37530    #[serde(transparent)]
37531    pub struct UserOperationReceiptRevertData(::std::string::String);
37532    impl ::std::ops::Deref for UserOperationReceiptRevertData {
37533        type Target = ::std::string::String;
37534        fn deref(&self) -> &::std::string::String {
37535            &self.0
37536        }
37537    }
37538    impl ::std::convert::From<UserOperationReceiptRevertData> for ::std::string::String {
37539        fn from(value: UserOperationReceiptRevertData) -> Self {
37540            value.0
37541        }
37542    }
37543    impl ::std::convert::From<&UserOperationReceiptRevertData> for UserOperationReceiptRevertData {
37544        fn from(value: &UserOperationReceiptRevertData) -> Self {
37545            value.clone()
37546        }
37547    }
37548    impl ::std::str::FromStr for UserOperationReceiptRevertData {
37549        type Err = self::error::ConversionError;
37550        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37551            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
37552                ::std::sync::LazyLock::new(|| ::regress::Regex::new("^0x[0-9a-fA-F]*$").unwrap());
37553            if PATTERN.find(value).is_none() {
37554                return Err("doesn't match pattern \"^0x[0-9a-fA-F]*$\"".into());
37555            }
37556            Ok(Self(value.to_string()))
37557        }
37558    }
37559    impl ::std::convert::TryFrom<&str> for UserOperationReceiptRevertData {
37560        type Error = self::error::ConversionError;
37561        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37562            value.parse()
37563        }
37564    }
37565    impl ::std::convert::TryFrom<&::std::string::String> for UserOperationReceiptRevertData {
37566        type Error = self::error::ConversionError;
37567        fn try_from(
37568            value: &::std::string::String,
37569        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37570            value.parse()
37571        }
37572    }
37573    impl ::std::convert::TryFrom<::std::string::String> for UserOperationReceiptRevertData {
37574        type Error = self::error::ConversionError;
37575        fn try_from(
37576            value: ::std::string::String,
37577        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37578            value.parse()
37579        }
37580    }
37581    impl<'de> ::serde::Deserialize<'de> for UserOperationReceiptRevertData {
37582        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
37583        where
37584            D: ::serde::Deserializer<'de>,
37585        {
37586            ::std::string::String::deserialize(deserializer)?
37587                .parse()
37588                .map_err(|e: self::error::ConversionError| {
37589                    <D::Error as ::serde::de::Error>::custom(e.to_string())
37590                })
37591        }
37592    }
37593    ///The hash of this transaction as 0x-prefixed string.
37594    ///
37595    /// <details><summary>JSON schema</summary>
37596    ///
37597    /// ```json
37598    ///{
37599    ///  "description": "The hash of this transaction as 0x-prefixed string.",
37600    ///  "examples": [
37601    ///    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
37602    ///  ],
37603    ///  "type": "string",
37604    ///  "pattern": "^0x[a-fA-F0-9]{64}$"
37605    ///}
37606    /// ```
37607    /// </details>
37608    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37609    #[serde(transparent)]
37610    pub struct UserOperationReceiptTransactionHash(::std::string::String);
37611    impl ::std::ops::Deref for UserOperationReceiptTransactionHash {
37612        type Target = ::std::string::String;
37613        fn deref(&self) -> &::std::string::String {
37614            &self.0
37615        }
37616    }
37617    impl ::std::convert::From<UserOperationReceiptTransactionHash> for ::std::string::String {
37618        fn from(value: UserOperationReceiptTransactionHash) -> Self {
37619            value.0
37620        }
37621    }
37622    impl ::std::convert::From<&UserOperationReceiptTransactionHash>
37623        for UserOperationReceiptTransactionHash
37624    {
37625        fn from(value: &UserOperationReceiptTransactionHash) -> Self {
37626            value.clone()
37627        }
37628    }
37629    impl ::std::str::FromStr for UserOperationReceiptTransactionHash {
37630        type Err = self::error::ConversionError;
37631        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37632            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
37633                ::std::sync::LazyLock::new(|| {
37634                    ::regress::Regex::new("^0x[a-fA-F0-9]{64}$").unwrap()
37635                });
37636            if PATTERN.find(value).is_none() {
37637                return Err("doesn't match pattern \"^0x[a-fA-F0-9]{64}$\"".into());
37638            }
37639            Ok(Self(value.to_string()))
37640        }
37641    }
37642    impl ::std::convert::TryFrom<&str> for UserOperationReceiptTransactionHash {
37643        type Error = self::error::ConversionError;
37644        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37645            value.parse()
37646        }
37647    }
37648    impl ::std::convert::TryFrom<&::std::string::String> for UserOperationReceiptTransactionHash {
37649        type Error = self::error::ConversionError;
37650        fn try_from(
37651            value: &::std::string::String,
37652        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37653            value.parse()
37654        }
37655    }
37656    impl ::std::convert::TryFrom<::std::string::String> for UserOperationReceiptTransactionHash {
37657        type Error = self::error::ConversionError;
37658        fn try_from(
37659            value: ::std::string::String,
37660        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37661            value.parse()
37662        }
37663    }
37664    impl<'de> ::serde::Deserialize<'de> for UserOperationReceiptTransactionHash {
37665        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
37666        where
37667            D: ::serde::Deserializer<'de>,
37668        {
37669            ::std::string::String::deserialize(deserializer)?
37670                .parse()
37671                .map_err(|e: self::error::ConversionError| {
37672                    <D::Error as ::serde::de::Error>::custom(e.to_string())
37673                })
37674        }
37675    }
37676    ///The request body for a developer to verify an end user's access token.
37677    ///
37678    /// <details><summary>JSON schema</summary>
37679    ///
37680    /// ```json
37681    ///{
37682    ///  "description": "The request body for a developer to verify an end user's access token.",
37683    ///  "type": "object",
37684    ///  "required": [
37685    ///    "accessToken"
37686    ///  ],
37687    ///  "properties": {
37688    ///    "accessToken": {
37689    ///      "description": "The access token in JWT format to verify.",
37690    ///      "examples": [
37691    ///        "eyJhbGciOiJFUzI1NiIsImtpZCI6IjA1ZGNmYTU1LWY1NzktNDg5YS1iNThhLTFlMDI5Nzk0N2VlNiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjZHAtYXBpIiwiYXV0aF90eXBlIjoiZW1haWwiLCJleHAiOjE3NTM5ODAyOTksImlhdCI6MTc1Mzk3ODQ5OSwiaXNzIjoiY2RwLWFwaSIsImp0aSI6IjA3ZWY5M2JlLTYzMDQtNGQ1YS05NmE3LWJlMGI5MWI0ZTE3NCIsInByb2plY3RfaWQiOiJjNzRkOGI4OC0wOTNiLTQyZDItOGE4Yy1kZGM1YzVlMGViNDMiLCJzdWIiOiJjYTM4YTM4ZC0xNmE5LTRkMjYtYTcxZC0zOWY2NmY5YzZiN2UifQ.1SU0pOy-WR002qUw4hd_UmZWRSLz-ZL6v7PvQvZMKVE6a51x_tqeUeRGaTGuYl1whg0eccMObmK7FqXKRH6E4g"
37692    ///      ],
37693    ///      "type": "string"
37694    ///    }
37695    ///  }
37696    ///}
37697    /// ```
37698    /// </details>
37699    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37700    pub struct ValidateEndUserAccessTokenBody {
37701        ///The access token in JWT format to verify.
37702        #[serde(rename = "accessToken")]
37703        pub access_token: ::std::string::String,
37704    }
37705    impl ::std::convert::From<&ValidateEndUserAccessTokenBody> for ValidateEndUserAccessTokenBody {
37706        fn from(value: &ValidateEndUserAccessTokenBody) -> Self {
37707            value.clone()
37708        }
37709    }
37710    impl ValidateEndUserAccessTokenBody {
37711        pub fn builder() -> builder::ValidateEndUserAccessTokenBody {
37712            Default::default()
37713        }
37714    }
37715    ///`VerifyX402PaymentBody`
37716    ///
37717    /// <details><summary>JSON schema</summary>
37718    ///
37719    /// ```json
37720    ///{
37721    ///  "type": "object",
37722    ///  "required": [
37723    ///    "paymentPayload",
37724    ///    "paymentRequirements",
37725    ///    "x402Version"
37726    ///  ],
37727    ///  "properties": {
37728    ///    "paymentPayload": {
37729    ///      "$ref": "#/components/schemas/x402PaymentPayload"
37730    ///    },
37731    ///    "paymentRequirements": {
37732    ///      "$ref": "#/components/schemas/x402PaymentRequirements"
37733    ///    },
37734    ///    "x402Version": {
37735    ///      "$ref": "#/components/schemas/X402Version"
37736    ///    }
37737    ///  }
37738    ///}
37739    /// ```
37740    /// </details>
37741    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37742    pub struct VerifyX402PaymentBody {
37743        #[serde(rename = "paymentPayload")]
37744        pub payment_payload: X402PaymentPayload,
37745        #[serde(rename = "paymentRequirements")]
37746        pub payment_requirements: X402PaymentRequirements,
37747        #[serde(rename = "x402Version")]
37748        pub x402_version: X402Version,
37749    }
37750    impl ::std::convert::From<&VerifyX402PaymentBody> for VerifyX402PaymentBody {
37751        fn from(value: &VerifyX402PaymentBody) -> Self {
37752            value.clone()
37753        }
37754    }
37755    impl VerifyX402PaymentBody {
37756        pub fn builder() -> builder::VerifyX402PaymentBody {
37757            Default::default()
37758        }
37759    }
37760    ///`VerifyX402PaymentResponse`
37761    ///
37762    /// <details><summary>JSON schema</summary>
37763    ///
37764    /// ```json
37765    ///{
37766    ///  "type": "object",
37767    ///  "required": [
37768    ///    "isValid",
37769    ///    "payer"
37770    ///  ],
37771    ///  "properties": {
37772    ///    "invalidReason": {
37773    ///      "$ref": "#/components/schemas/x402VerifyInvalidReason"
37774    ///    },
37775    ///    "isValid": {
37776    ///      "description": "Indicates whether the payment is valid.",
37777    ///      "examples": [
37778    ///        false
37779    ///      ],
37780    ///      "type": "boolean"
37781    ///    },
37782    ///    "payer": {
37783    ///      "description": "The onchain address of the client that is paying for the resource.\n\nFor EVM networks, the payer will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the payer will be a base58-encoded Solana address.",
37784    ///      "examples": [
37785    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
37786    ///      ],
37787    ///      "type": "string",
37788    ///      "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
37789    ///    }
37790    ///  }
37791    ///}
37792    /// ```
37793    /// </details>
37794    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37795    pub struct VerifyX402PaymentResponse {
37796        #[serde(
37797            rename = "invalidReason",
37798            default,
37799            skip_serializing_if = "::std::option::Option::is_none"
37800        )]
37801        pub invalid_reason: ::std::option::Option<X402VerifyInvalidReason>,
37802        ///Indicates whether the payment is valid.
37803        #[serde(rename = "isValid")]
37804        pub is_valid: bool,
37805        /**The onchain address of the client that is paying for the resource.
37806
37807        For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
37808
37809        For Solana-based networks, the payer will be a base58-encoded Solana address.*/
37810        pub payer: VerifyX402PaymentResponsePayer,
37811    }
37812    impl ::std::convert::From<&VerifyX402PaymentResponse> for VerifyX402PaymentResponse {
37813        fn from(value: &VerifyX402PaymentResponse) -> Self {
37814            value.clone()
37815        }
37816    }
37817    impl VerifyX402PaymentResponse {
37818        pub fn builder() -> builder::VerifyX402PaymentResponse {
37819            Default::default()
37820        }
37821    }
37822    /**The onchain address of the client that is paying for the resource.
37823
37824    For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
37825
37826    For Solana-based networks, the payer will be a base58-encoded Solana address.*/
37827    ///
37828    /// <details><summary>JSON schema</summary>
37829    ///
37830    /// ```json
37831    ///{
37832    ///  "description": "The onchain address of the client that is paying for the resource.\n\nFor EVM networks, the payer will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the payer will be a base58-encoded Solana address.",
37833    ///  "examples": [
37834    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
37835    ///  ],
37836    ///  "type": "string",
37837    ///  "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
37838    ///}
37839    /// ```
37840    /// </details>
37841    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
37842    #[serde(transparent)]
37843    pub struct VerifyX402PaymentResponsePayer(::std::string::String);
37844    impl ::std::ops::Deref for VerifyX402PaymentResponsePayer {
37845        type Target = ::std::string::String;
37846        fn deref(&self) -> &::std::string::String {
37847            &self.0
37848        }
37849    }
37850    impl ::std::convert::From<VerifyX402PaymentResponsePayer> for ::std::string::String {
37851        fn from(value: VerifyX402PaymentResponsePayer) -> Self {
37852            value.0
37853        }
37854    }
37855    impl ::std::convert::From<&VerifyX402PaymentResponsePayer> for VerifyX402PaymentResponsePayer {
37856        fn from(value: &VerifyX402PaymentResponsePayer) -> Self {
37857            value.clone()
37858        }
37859    }
37860    impl ::std::str::FromStr for VerifyX402PaymentResponsePayer {
37861        type Err = self::error::ConversionError;
37862        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37863            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
37864                ::std::sync::LazyLock::new(|| {
37865                    ::regress::Regex::new("^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$")
37866                        .unwrap()
37867                });
37868            if PATTERN.find(value).is_none() {
37869                return Err(
37870                    "doesn't match pattern \"^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$\""
37871                        .into(),
37872                );
37873            }
37874            Ok(Self(value.to_string()))
37875        }
37876    }
37877    impl ::std::convert::TryFrom<&str> for VerifyX402PaymentResponsePayer {
37878        type Error = self::error::ConversionError;
37879        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
37880            value.parse()
37881        }
37882    }
37883    impl ::std::convert::TryFrom<&::std::string::String> for VerifyX402PaymentResponsePayer {
37884        type Error = self::error::ConversionError;
37885        fn try_from(
37886            value: &::std::string::String,
37887        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37888            value.parse()
37889        }
37890    }
37891    impl ::std::convert::TryFrom<::std::string::String> for VerifyX402PaymentResponsePayer {
37892        type Error = self::error::ConversionError;
37893        fn try_from(
37894            value: ::std::string::String,
37895        ) -> ::std::result::Result<Self, self::error::ConversionError> {
37896            value.parse()
37897        }
37898    }
37899    impl<'de> ::serde::Deserialize<'de> for VerifyX402PaymentResponsePayer {
37900        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
37901        where
37902            D: ::serde::Deserializer<'de>,
37903        {
37904            ::std::string::String::deserialize(deserializer)?
37905                .parse()
37906                .map_err(|e: self::error::ConversionError| {
37907                    <D::Error as ::serde::de::Error>::custom(e.to_string())
37908                })
37909        }
37910    }
37911    ///`WebhookSubscriptionListResponse`
37912    ///
37913    /// <details><summary>JSON schema</summary>
37914    ///
37915    /// ```json
37916    ///{
37917    ///  "allOf": [
37918    ///    {
37919    ///      "description": "Response containing a list of webhook subscriptions.",
37920    ///      "type": "object",
37921    ///      "required": [
37922    ///        "subscriptions"
37923    ///      ],
37924    ///      "properties": {
37925    ///        "subscriptions": {
37926    ///          "description": "The list of webhook subscriptions.",
37927    ///          "type": "array",
37928    ///          "items": {
37929    ///            "$ref": "#/components/schemas/WebhookSubscriptionResponse"
37930    ///          }
37931    ///        }
37932    ///      }
37933    ///    },
37934    ///    {
37935    ///      "$ref": "#/components/schemas/ListResponse"
37936    ///    }
37937    ///  ]
37938    ///}
37939    /// ```
37940    /// </details>
37941    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
37942    pub struct WebhookSubscriptionListResponse {
37943        ///The token for the next page of items, if any.
37944        #[serde(
37945            rename = "nextPageToken",
37946            default,
37947            skip_serializing_if = "::std::option::Option::is_none"
37948        )]
37949        pub next_page_token: ::std::option::Option<::std::string::String>,
37950        ///The list of webhook subscriptions.
37951        pub subscriptions: ::std::vec::Vec<WebhookSubscriptionResponse>,
37952    }
37953    impl ::std::convert::From<&WebhookSubscriptionListResponse> for WebhookSubscriptionListResponse {
37954        fn from(value: &WebhookSubscriptionListResponse) -> Self {
37955            value.clone()
37956        }
37957    }
37958    impl WebhookSubscriptionListResponse {
37959        pub fn builder() -> builder::WebhookSubscriptionListResponse {
37960            Default::default()
37961        }
37962    }
37963    /**Request to create a new webhook subscription with support for both traditional single-label
37964    and multi-label filtering formats.
37965    */
37966    ///
37967    /// <details><summary>JSON schema</summary>
37968    ///
37969    /// ```json
37970    ///{
37971    ///  "description": "Request to create a new webhook subscription with support for both traditional single-label\nand multi-label filtering formats.\n",
37972    ///  "type": "object",
37973    ///  "oneOf": [
37974    ///    {
37975    ///      "title": "Traditional single-label format",
37976    ///      "not": {
37977    ///        "required": [
37978    ///          "labels"
37979    ///        ]
37980    ///      },
37981    ///      "required": [
37982    ///        "eventTypes",
37983    ///        "isEnabled",
37984    ///        "labelKey",
37985    ///        "labelValue",
37986    ///        "target"
37987    ///      ]
37988    ///    },
37989    ///    {
37990    ///      "title": "Multi-label format with total overlap logic",
37991    ///      "not": {
37992    ///        "anyOf": [
37993    ///          {
37994    ///            "required": [
37995    ///              "labelKey"
37996    ///            ]
37997    ///          },
37998    ///          {
37999    ///            "required": [
38000    ///              "labelValue"
38001    ///            ]
38002    ///          }
38003    ///        ]
38004    ///      },
38005    ///      "required": [
38006    ///        "eventTypes",
38007    ///        "isEnabled",
38008    ///        "labels",
38009    ///        "target"
38010    ///      ]
38011    ///    }
38012    ///  ],
38013    ///  "properties": {
38014    ///    "description": {
38015    ///      "description": "Description of the webhook subscription.",
38016    ///      "examples": [
38017    ///        "Subscription for token transfer events"
38018    ///      ],
38019    ///      "type": "string"
38020    ///    },
38021    ///    "eventTypes": {
38022    ///      "description": "Types of events to subscribe to. Event types follow a three-part dot-separated format:\nservice.resource.verb (e.g., \"onchain.activity.detected\", \"wallet.activity.detected\", \"onramp.transaction.created\").\nThe subscription will only receive events matching these types AND the label filter(s).\n",
38023    ///      "examples": [
38024    ///        [
38025    ///          "onchain.activity.detected"
38026    ///        ]
38027    ///      ],
38028    ///      "type": "array",
38029    ///      "items": {
38030    ///        "type": "string"
38031    ///      }
38032    ///    },
38033    ///    "isEnabled": {
38034    ///      "description": "Whether the subscription is enabled.",
38035    ///      "examples": [
38036    ///        true
38037    ///      ],
38038    ///      "type": "boolean"
38039    ///    },
38040    ///    "labelKey": {
38041    ///      "description": "Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair\nin addition to the event types. Only events matching both the event types AND this label filter will be delivered.\nNOTE: Use either (labelKey + labelValue) OR labels, not both.\n",
38042    ///      "examples": [
38043    ///        "contract_address"
38044    ///      ],
38045    ///      "type": "string"
38046    ///    },
38047    ///    "labelValue": {
38048    ///      "description": "Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).\nOnly events with this exact label value will be delivered.\nNOTE: Use either (labelKey + labelValue) OR labels, not both.\n",
38049    ///      "examples": [
38050    ///        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
38051    ///      ],
38052    ///      "type": "string"
38053    ///    },
38054    ///    "labels": {
38055    ///      "description": "Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when\nan event contains ALL the key-value pairs specified here. Additional labels on\nthe event are allowed and will not prevent matching.\nNOTE: Use either labels OR (labelKey + labelValue), not both.\n",
38056    ///      "examples": [
38057    ///        {
38058    ///          "contract_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
38059    ///          "env": "dev",
38060    ///          "team": "payments"
38061    ///        }
38062    ///      ],
38063    ///      "type": "object",
38064    ///      "additionalProperties": {
38065    ///        "type": "string"
38066    ///      }
38067    ///    },
38068    ///    "metadata": {
38069    ///      "description": "Additional metadata for the subscription.",
38070    ///      "examples": [
38071    ///        {
38072    ///          "custom_field": "custom_value",
38073    ///          "webhook_version": "v1"
38074    ///        }
38075    ///      ],
38076    ///      "type": "object",
38077    ///      "additionalProperties": true
38078    ///    },
38079    ///    "target": {
38080    ///      "$ref": "#/components/schemas/WebhookTarget"
38081    ///    }
38082    ///  }
38083    ///}
38084    /// ```
38085    /// </details>
38086    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38087    #[serde(untagged)]
38088    pub enum WebhookSubscriptionRequest {
38089        Variant0(WebhookSubscriptionRequestVariant0),
38090        Variant1(WebhookSubscriptionRequestVariant1),
38091    }
38092    impl ::std::convert::From<&Self> for WebhookSubscriptionRequest {
38093        fn from(value: &WebhookSubscriptionRequest) -> Self {
38094            value.clone()
38095        }
38096    }
38097    impl ::std::convert::From<WebhookSubscriptionRequestVariant0> for WebhookSubscriptionRequest {
38098        fn from(value: WebhookSubscriptionRequestVariant0) -> Self {
38099            Self::Variant0(value)
38100        }
38101    }
38102    impl ::std::convert::From<WebhookSubscriptionRequestVariant1> for WebhookSubscriptionRequest {
38103        fn from(value: WebhookSubscriptionRequestVariant1) -> Self {
38104            Self::Variant1(value)
38105        }
38106    }
38107    ///`WebhookSubscriptionRequestVariant0`
38108    ///
38109    /// <details><summary>JSON schema</summary>
38110    ///
38111    /// ```json
38112    ///{
38113    ///  "allOf": [
38114    ///    {
38115    ///      "type": "object",
38116    ///      "properties": {
38117    ///        "description": {
38118    ///          "description": "Description of the webhook subscription.",
38119    ///          "examples": [
38120    ///            "Subscription for token transfer events"
38121    ///          ],
38122    ///          "type": "string"
38123    ///        },
38124    ///        "eventTypes": {
38125    ///          "description": "Types of events to subscribe to. Event types follow a three-part dot-separated format:\nservice.resource.verb (e.g., \"onchain.activity.detected\", \"wallet.activity.detected\", \"onramp.transaction.created\").\nThe subscription will only receive events matching these types AND the label filter(s).\n",
38126    ///          "examples": [
38127    ///            [
38128    ///              "onchain.activity.detected"
38129    ///            ]
38130    ///          ],
38131    ///          "type": "array",
38132    ///          "items": {
38133    ///            "type": "string"
38134    ///          }
38135    ///        },
38136    ///        "isEnabled": {
38137    ///          "description": "Whether the subscription is enabled.",
38138    ///          "examples": [
38139    ///            true
38140    ///          ],
38141    ///          "type": "boolean"
38142    ///        },
38143    ///        "labelKey": {
38144    ///          "description": "Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair\nin addition to the event types. Only events matching both the event types AND this label filter will be delivered.\nNOTE: Use either (labelKey + labelValue) OR labels, not both.\n",
38145    ///          "examples": [
38146    ///            "contract_address"
38147    ///          ],
38148    ///          "type": "string"
38149    ///        },
38150    ///        "labelValue": {
38151    ///          "description": "Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).\nOnly events with this exact label value will be delivered.\nNOTE: Use either (labelKey + labelValue) OR labels, not both.\n",
38152    ///          "examples": [
38153    ///            "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
38154    ///          ],
38155    ///          "type": "string"
38156    ///        },
38157    ///        "labels": {
38158    ///          "description": "Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when\nan event contains ALL the key-value pairs specified here. Additional labels on\nthe event are allowed and will not prevent matching.\nNOTE: Use either labels OR (labelKey + labelValue), not both.\n",
38159    ///          "examples": [
38160    ///            {
38161    ///              "contract_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
38162    ///              "env": "dev",
38163    ///              "team": "payments"
38164    ///            }
38165    ///          ],
38166    ///          "type": "object",
38167    ///          "additionalProperties": {
38168    ///            "type": "string"
38169    ///          }
38170    ///        },
38171    ///        "metadata": {
38172    ///          "description": "Additional metadata for the subscription.",
38173    ///          "examples": [
38174    ///            {
38175    ///              "custom_field": "custom_value",
38176    ///              "webhook_version": "v1"
38177    ///            }
38178    ///          ],
38179    ///          "type": "object",
38180    ///          "additionalProperties": true
38181    ///        },
38182    ///        "target": {
38183    ///          "$ref": "#/components/schemas/WebhookTarget"
38184    ///        }
38185    ///      }
38186    ///    },
38187    ///    {
38188    ///      "title": "Traditional single-label format",
38189    ///      "not": {
38190    ///        "required": [
38191    ///          "labels"
38192    ///        ]
38193    ///      },
38194    ///      "required": [
38195    ///        "eventTypes",
38196    ///        "isEnabled",
38197    ///        "labelKey",
38198    ///        "labelValue",
38199    ///        "target"
38200    ///      ]
38201    ///    },
38202    ///    {
38203    ///      "not": {
38204    ///        "title": "Multi-label format with total overlap logic",
38205    ///        "not": {
38206    ///          "anyOf": [
38207    ///            {
38208    ///              "required": [
38209    ///                "labelKey"
38210    ///              ]
38211    ///            },
38212    ///            {
38213    ///              "required": [
38214    ///                "labelValue"
38215    ///              ]
38216    ///            }
38217    ///          ]
38218    ///        },
38219    ///        "required": [
38220    ///          "eventTypes",
38221    ///          "isEnabled",
38222    ///          "labels",
38223    ///          "target"
38224    ///        ]
38225    ///      }
38226    ///    }
38227    ///  ]
38228    ///}
38229    /// ```
38230    /// </details>
38231    #[derive(
38232        ::serde::Deserialize,
38233        ::serde::Serialize,
38234        Clone,
38235        Copy,
38236        Debug,
38237        Eq,
38238        Hash,
38239        Ord,
38240        PartialEq,
38241        PartialOrd,
38242    )]
38243    #[serde(deny_unknown_fields)]
38244    pub enum WebhookSubscriptionRequestVariant0 {}
38245    impl ::std::convert::From<&Self> for WebhookSubscriptionRequestVariant0 {
38246        fn from(value: &WebhookSubscriptionRequestVariant0) -> Self {
38247            value.clone()
38248        }
38249    }
38250    ///`WebhookSubscriptionRequestVariant1`
38251    ///
38252    /// <details><summary>JSON schema</summary>
38253    ///
38254    /// ```json
38255    ///{
38256    ///  "allOf": [
38257    ///    {
38258    ///      "type": "object",
38259    ///      "properties": {
38260    ///        "description": {
38261    ///          "description": "Description of the webhook subscription.",
38262    ///          "examples": [
38263    ///            "Subscription for token transfer events"
38264    ///          ],
38265    ///          "type": "string"
38266    ///        },
38267    ///        "eventTypes": {
38268    ///          "description": "Types of events to subscribe to. Event types follow a three-part dot-separated format:\nservice.resource.verb (e.g., \"onchain.activity.detected\", \"wallet.activity.detected\", \"onramp.transaction.created\").\nThe subscription will only receive events matching these types AND the label filter(s).\n",
38269    ///          "examples": [
38270    ///            [
38271    ///              "onchain.activity.detected"
38272    ///            ]
38273    ///          ],
38274    ///          "type": "array",
38275    ///          "items": {
38276    ///            "type": "string"
38277    ///          }
38278    ///        },
38279    ///        "isEnabled": {
38280    ///          "description": "Whether the subscription is enabled.",
38281    ///          "examples": [
38282    ///            true
38283    ///          ],
38284    ///          "type": "boolean"
38285    ///        },
38286    ///        "labelKey": {
38287    ///          "description": "Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair\nin addition to the event types. Only events matching both the event types AND this label filter will be delivered.\nNOTE: Use either (labelKey + labelValue) OR labels, not both.\n",
38288    ///          "examples": [
38289    ///            "contract_address"
38290    ///          ],
38291    ///          "type": "string"
38292    ///        },
38293    ///        "labelValue": {
38294    ///          "description": "Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).\nOnly events with this exact label value will be delivered.\nNOTE: Use either (labelKey + labelValue) OR labels, not both.\n",
38295    ///          "examples": [
38296    ///            "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
38297    ///          ],
38298    ///          "type": "string"
38299    ///        },
38300    ///        "labels": {
38301    ///          "description": "Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when\nan event contains ALL the key-value pairs specified here. Additional labels on\nthe event are allowed and will not prevent matching.\nNOTE: Use either labels OR (labelKey + labelValue), not both.\n",
38302    ///          "examples": [
38303    ///            {
38304    ///              "contract_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
38305    ///              "env": "dev",
38306    ///              "team": "payments"
38307    ///            }
38308    ///          ],
38309    ///          "type": "object",
38310    ///          "additionalProperties": {
38311    ///            "type": "string"
38312    ///          }
38313    ///        },
38314    ///        "metadata": {
38315    ///          "description": "Additional metadata for the subscription.",
38316    ///          "examples": [
38317    ///            {
38318    ///              "custom_field": "custom_value",
38319    ///              "webhook_version": "v1"
38320    ///            }
38321    ///          ],
38322    ///          "type": "object",
38323    ///          "additionalProperties": true
38324    ///        },
38325    ///        "target": {
38326    ///          "$ref": "#/components/schemas/WebhookTarget"
38327    ///        }
38328    ///      }
38329    ///    },
38330    ///    {
38331    ///      "title": "Multi-label format with total overlap logic",
38332    ///      "not": {
38333    ///        "anyOf": [
38334    ///          {
38335    ///            "required": [
38336    ///              "labelKey"
38337    ///            ]
38338    ///          },
38339    ///          {
38340    ///            "required": [
38341    ///              "labelValue"
38342    ///            ]
38343    ///          }
38344    ///        ]
38345    ///      },
38346    ///      "required": [
38347    ///        "eventTypes",
38348    ///        "isEnabled",
38349    ///        "labels",
38350    ///        "target"
38351    ///      ]
38352    ///    },
38353    ///    {
38354    ///      "not": {
38355    ///        "title": "Traditional single-label format",
38356    ///        "not": {
38357    ///          "required": [
38358    ///            "labels"
38359    ///          ]
38360    ///        },
38361    ///        "required": [
38362    ///          "eventTypes",
38363    ///          "isEnabled",
38364    ///          "labelKey",
38365    ///          "labelValue",
38366    ///          "target"
38367    ///        ]
38368    ///      }
38369    ///    }
38370    ///  ]
38371    ///}
38372    /// ```
38373    /// </details>
38374    #[derive(
38375        ::serde::Deserialize,
38376        ::serde::Serialize,
38377        Clone,
38378        Copy,
38379        Debug,
38380        Eq,
38381        Hash,
38382        Ord,
38383        PartialEq,
38384        PartialOrd,
38385    )]
38386    #[serde(deny_unknown_fields)]
38387    pub enum WebhookSubscriptionRequestVariant1 {}
38388    impl ::std::convert::From<&Self> for WebhookSubscriptionRequestVariant1 {
38389        fn from(value: &WebhookSubscriptionRequestVariant1) -> Self {
38390            value.clone()
38391        }
38392    }
38393    ///Response containing webhook subscription details.
38394    ///
38395    /// <details><summary>JSON schema</summary>
38396    ///
38397    /// ```json
38398    ///{
38399    ///  "description": "Response containing webhook subscription details.",
38400    ///  "examples": [
38401    ///    {
38402    ///      "createdAt": "2025-11-12T09:19:52.051Z",
38403    ///      "description": "USDC Transfer events to specific address.",
38404    ///      "eventTypes": [
38405    ///        "onchain.activity.detected"
38406    ///      ],
38407    ///      "isEnabled": true,
38408    ///      "labelKey": "event_name",
38409    ///      "labelValue": "Transfer",
38410    ///      "labels": {
38411    ///        "contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
38412    ///        "event_name": "Transfer",
38413    ///        "network": "base-mainnet",
38414    ///        "transaction_to": "0xf5042e6ffac5a625d4e7848e0b01373d8eb9e222"
38415    ///      },
38416    ///      "metadata": {
38417    ///        "secret": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
38418    ///      },
38419    ///      "secret": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
38420    ///      "subscriptionId": "123e4567-e89b-12d3-a456-426614174000",
38421    ///      "target": {
38422    ///        "url": "https://api.example.com/webhooks"
38423    ///      }
38424    ///    }
38425    ///  ],
38426    ///  "type": "object",
38427    ///  "required": [
38428    ///    "createdAt",
38429    ///    "eventTypes",
38430    ///    "isEnabled",
38431    ///    "secret",
38432    ///    "subscriptionId",
38433    ///    "target"
38434    ///  ],
38435    ///  "properties": {
38436    ///    "createdAt": {
38437    ///      "description": "When the subscription was created.",
38438    ///      "examples": [
38439    ///        "2025-01-15T10:30:00Z"
38440    ///      ],
38441    ///      "type": "string",
38442    ///      "format": "date-time"
38443    ///    },
38444    ///    "description": {
38445    ///      "description": "Description of the webhook subscription.",
38446    ///      "examples": [
38447    ///        "Subscription for token transfer events"
38448    ///      ],
38449    ///      "type": "string"
38450    ///    },
38451    ///    "eventTypes": {
38452    ///      "description": "Types of events to subscribe to. Event types follow a three-part dot-separated format:\nservice.resource.verb (e.g., \"onchain.activity.detected\", \"wallet.activity.detected\", \"onramp.transaction.created\").\n",
38453    ///      "examples": [
38454    ///        [
38455    ///          "onchain.activity.detected"
38456    ///        ]
38457    ///      ],
38458    ///      "type": "array",
38459    ///      "items": {
38460    ///        "type": "string"
38461    ///      }
38462    ///    },
38463    ///    "isEnabled": {
38464    ///      "description": "Whether the subscription is enabled.",
38465    ///      "examples": [
38466    ///        true
38467    ///      ],
38468    ///      "type": "boolean"
38469    ///    },
38470    ///    "labelKey": {
38471    ///      "description": "Label key for filtering events. Present when subscription uses traditional single-label format.\n",
38472    ///      "examples": [
38473    ///        "contract_address"
38474    ///      ],
38475    ///      "type": "string"
38476    ///    },
38477    ///    "labelValue": {
38478    ///      "description": "Label value for filtering events. Present when subscription uses traditional single-label format.\n",
38479    ///      "examples": [
38480    ///        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
38481    ///      ],
38482    ///      "type": "string"
38483    ///    },
38484    ///    "labels": {
38485    ///      "description": "Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.\nPresent when subscription uses multi-label format.\n",
38486    ///      "examples": [
38487    ///        {
38488    ///          "contract_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
38489    ///          "env": "dev",
38490    ///          "team": "payments"
38491    ///        }
38492    ///      ],
38493    ///      "type": "object",
38494    ///      "additionalProperties": {
38495    ///        "type": "string"
38496    ///      }
38497    ///    },
38498    ///    "metadata": {
38499    ///      "description": "Additional metadata for the subscription.",
38500    ///      "examples": [
38501    ///        {
38502    ///          "secret": "123e4567-e89b-12d3-a456-426614174000"
38503    ///        }
38504    ///      ],
38505    ///      "type": "object",
38506    ///      "properties": {
38507    ///        "secret": {
38508    ///          "description": "Use the root-level `secret` field instead. Maintained for backward compatibility only.",
38509    ///          "deprecated": true,
38510    ///          "examples": [
38511    ///            "123e4567-e89b-12d3-a456-426614174000"
38512    ///          ],
38513    ///          "type": "string",
38514    ///          "format": "uuid"
38515    ///        }
38516    ///      }
38517    ///    },
38518    ///    "secret": {
38519    ///      "description": "Secret for webhook signature validation.",
38520    ///      "examples": [
38521    ///        "123e4567-e89b-12d3-a456-426614174000"
38522    ///      ],
38523    ///      "type": "string",
38524    ///      "format": "uuid"
38525    ///    },
38526    ///    "subscriptionId": {
38527    ///      "description": "Unique identifier for the subscription.",
38528    ///      "examples": [
38529    ///        "123e4567-e89b-12d3-a456-426614174000"
38530    ///      ],
38531    ///      "type": "string",
38532    ///      "format": "uuid"
38533    ///    },
38534    ///    "target": {
38535    ///      "$ref": "#/components/schemas/WebhookTarget"
38536    ///    }
38537    ///  }
38538    ///}
38539    /// ```
38540    /// </details>
38541    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38542    pub struct WebhookSubscriptionResponse {
38543        ///When the subscription was created.
38544        #[serde(rename = "createdAt")]
38545        pub created_at: ::chrono::DateTime<::chrono::offset::Utc>,
38546        ///Description of the webhook subscription.
38547        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
38548        pub description: ::std::option::Option<::std::string::String>,
38549        /**Types of events to subscribe to. Event types follow a three-part dot-separated format:
38550        service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
38551        */
38552        #[serde(rename = "eventTypes")]
38553        pub event_types: ::std::vec::Vec<::std::string::String>,
38554        ///Whether the subscription is enabled.
38555        #[serde(rename = "isEnabled")]
38556        pub is_enabled: bool,
38557        /**Label key for filtering events. Present when subscription uses traditional single-label format.
38558         */
38559        #[serde(
38560            rename = "labelKey",
38561            default,
38562            skip_serializing_if = "::std::option::Option::is_none"
38563        )]
38564        pub label_key: ::std::option::Option<::std::string::String>,
38565        /**Label value for filtering events. Present when subscription uses traditional single-label format.
38566         */
38567        #[serde(
38568            rename = "labelValue",
38569            default,
38570            skip_serializing_if = "::std::option::Option::is_none"
38571        )]
38572        pub label_value: ::std::option::Option<::std::string::String>,
38573        /**Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.
38574        Present when subscription uses multi-label format.
38575        */
38576        #[serde(
38577            default,
38578            skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
38579        )]
38580        pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
38581        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
38582        pub metadata: ::std::option::Option<WebhookSubscriptionResponseMetadata>,
38583        ///Secret for webhook signature validation.
38584        pub secret: ::uuid::Uuid,
38585        ///Unique identifier for the subscription.
38586        #[serde(rename = "subscriptionId")]
38587        pub subscription_id: ::uuid::Uuid,
38588        pub target: WebhookTarget,
38589    }
38590    impl ::std::convert::From<&WebhookSubscriptionResponse> for WebhookSubscriptionResponse {
38591        fn from(value: &WebhookSubscriptionResponse) -> Self {
38592            value.clone()
38593        }
38594    }
38595    impl WebhookSubscriptionResponse {
38596        pub fn builder() -> builder::WebhookSubscriptionResponse {
38597            Default::default()
38598        }
38599    }
38600    ///Additional metadata for the subscription.
38601    ///
38602    /// <details><summary>JSON schema</summary>
38603    ///
38604    /// ```json
38605    ///{
38606    ///  "description": "Additional metadata for the subscription.",
38607    ///  "examples": [
38608    ///    {
38609    ///      "secret": "123e4567-e89b-12d3-a456-426614174000"
38610    ///    }
38611    ///  ],
38612    ///  "type": "object",
38613    ///  "properties": {
38614    ///    "secret": {
38615    ///      "description": "Use the root-level `secret` field instead. Maintained for backward compatibility only.",
38616    ///      "deprecated": true,
38617    ///      "examples": [
38618    ///        "123e4567-e89b-12d3-a456-426614174000"
38619    ///      ],
38620    ///      "type": "string",
38621    ///      "format": "uuid"
38622    ///    }
38623    ///  }
38624    ///}
38625    /// ```
38626    /// </details>
38627    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38628    pub struct WebhookSubscriptionResponseMetadata {
38629        ///Use the root-level `secret` field instead. Maintained for backward compatibility only.
38630        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
38631        pub secret: ::std::option::Option<::uuid::Uuid>,
38632    }
38633    impl ::std::convert::From<&WebhookSubscriptionResponseMetadata>
38634        for WebhookSubscriptionResponseMetadata
38635    {
38636        fn from(value: &WebhookSubscriptionResponseMetadata) -> Self {
38637            value.clone()
38638        }
38639    }
38640    impl ::std::default::Default for WebhookSubscriptionResponseMetadata {
38641        fn default() -> Self {
38642            Self {
38643                secret: Default::default(),
38644            }
38645        }
38646    }
38647    impl WebhookSubscriptionResponseMetadata {
38648        pub fn builder() -> builder::WebhookSubscriptionResponseMetadata {
38649            Default::default()
38650        }
38651    }
38652    /**Request to update an existing webhook subscription. The update format must match
38653    the original subscription format (traditional or multi-label).
38654    */
38655    ///
38656    /// <details><summary>JSON schema</summary>
38657    ///
38658    /// ```json
38659    ///{
38660    ///  "description": "Request to update an existing webhook subscription. The update format must match\nthe original subscription format (traditional or multi-label).\n",
38661    ///  "type": "object",
38662    ///  "oneOf": [
38663    ///    {
38664    ///      "title": "Traditional single-label update format",
38665    ///      "not": {
38666    ///        "required": [
38667    ///          "labels"
38668    ///        ]
38669    ///      },
38670    ///      "required": [
38671    ///        "eventTypes",
38672    ///        "isEnabled",
38673    ///        "labelKey",
38674    ///        "labelValue",
38675    ///        "target"
38676    ///      ]
38677    ///    },
38678    ///    {
38679    ///      "title": "Multi-label update format with total overlap logic",
38680    ///      "not": {
38681    ///        "anyOf": [
38682    ///          {
38683    ///            "required": [
38684    ///              "labelKey"
38685    ///            ]
38686    ///          },
38687    ///          {
38688    ///            "required": [
38689    ///              "labelValue"
38690    ///            ]
38691    ///          }
38692    ///        ]
38693    ///      },
38694    ///      "required": [
38695    ///        "eventTypes",
38696    ///        "isEnabled",
38697    ///        "labels",
38698    ///        "target"
38699    ///      ]
38700    ///    }
38701    ///  ],
38702    ///  "properties": {
38703    ///    "description": {
38704    ///      "description": "Description of the webhook subscription.",
38705    ///      "examples": [
38706    ///        "Updated subscription for token transfer events"
38707    ///      ],
38708    ///      "type": "string"
38709    ///    },
38710    ///    "eventTypes": {
38711    ///      "description": "Types of events to subscribe to. Event types follow a three-part dot-separated format:\nservice.resource.verb (e.g., \"onchain.activity.detected\", \"wallet.activity.detected\", \"onramp.transaction.created\").\n",
38712    ///      "examples": [
38713    ///        [
38714    ///          "onchain.activity.detected"
38715    ///        ]
38716    ///      ],
38717    ///      "type": "array",
38718    ///      "items": {
38719    ///        "type": "string"
38720    ///      }
38721    ///    },
38722    ///    "isEnabled": {
38723    ///      "description": "Whether the subscription is enabled.",
38724    ///      "examples": [
38725    ///        false
38726    ///      ],
38727    ///      "type": "boolean"
38728    ///    },
38729    ///    "labelKey": {
38730    ///      "description": "Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.\n",
38731    ///      "examples": [
38732    ///        "contract_address"
38733    ///      ],
38734    ///      "type": "string"
38735    ///    },
38736    ///    "labelValue": {
38737    ///      "description": "Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.\n",
38738    ///      "examples": [
38739    ///        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
38740    ///      ],
38741    ///      "type": "string"
38742    ///    },
38743    ///    "labels": {
38744    ///      "description": "Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when\nan event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.\n",
38745    ///      "examples": [
38746    ///        {
38747    ///          "env": "prod",
38748    ///          "service": "api"
38749    ///        }
38750    ///      ],
38751    ///      "type": "object",
38752    ///      "additionalProperties": {
38753    ///        "type": "string"
38754    ///      }
38755    ///    },
38756    ///    "metadata": {
38757    ///      "description": "Additional metadata for the subscription.",
38758    ///      "examples": [
38759    ///        {
38760    ///          "updated_field": "updated_value",
38761    ///          "webhook_version": "v2"
38762    ///        }
38763    ///      ],
38764    ///      "type": "object",
38765    ///      "additionalProperties": true
38766    ///    },
38767    ///    "target": {
38768    ///      "$ref": "#/components/schemas/WebhookTarget"
38769    ///    }
38770    ///  }
38771    ///}
38772    /// ```
38773    /// </details>
38774    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
38775    #[serde(untagged)]
38776    pub enum WebhookSubscriptionUpdateRequest {
38777        Variant0(WebhookSubscriptionUpdateRequestVariant0),
38778        Variant1(WebhookSubscriptionUpdateRequestVariant1),
38779    }
38780    impl ::std::convert::From<&Self> for WebhookSubscriptionUpdateRequest {
38781        fn from(value: &WebhookSubscriptionUpdateRequest) -> Self {
38782            value.clone()
38783        }
38784    }
38785    impl ::std::convert::From<WebhookSubscriptionUpdateRequestVariant0>
38786        for WebhookSubscriptionUpdateRequest
38787    {
38788        fn from(value: WebhookSubscriptionUpdateRequestVariant0) -> Self {
38789            Self::Variant0(value)
38790        }
38791    }
38792    impl ::std::convert::From<WebhookSubscriptionUpdateRequestVariant1>
38793        for WebhookSubscriptionUpdateRequest
38794    {
38795        fn from(value: WebhookSubscriptionUpdateRequestVariant1) -> Self {
38796            Self::Variant1(value)
38797        }
38798    }
38799    ///`WebhookSubscriptionUpdateRequestVariant0`
38800    ///
38801    /// <details><summary>JSON schema</summary>
38802    ///
38803    /// ```json
38804    ///{
38805    ///  "allOf": [
38806    ///    {
38807    ///      "type": "object",
38808    ///      "properties": {
38809    ///        "description": {
38810    ///          "description": "Description of the webhook subscription.",
38811    ///          "examples": [
38812    ///            "Updated subscription for token transfer events"
38813    ///          ],
38814    ///          "type": "string"
38815    ///        },
38816    ///        "eventTypes": {
38817    ///          "description": "Types of events to subscribe to. Event types follow a three-part dot-separated format:\nservice.resource.verb (e.g., \"onchain.activity.detected\", \"wallet.activity.detected\", \"onramp.transaction.created\").\n",
38818    ///          "examples": [
38819    ///            [
38820    ///              "onchain.activity.detected"
38821    ///            ]
38822    ///          ],
38823    ///          "type": "array",
38824    ///          "items": {
38825    ///            "type": "string"
38826    ///          }
38827    ///        },
38828    ///        "isEnabled": {
38829    ///          "description": "Whether the subscription is enabled.",
38830    ///          "examples": [
38831    ///            false
38832    ///          ],
38833    ///          "type": "boolean"
38834    ///        },
38835    ///        "labelKey": {
38836    ///          "description": "Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.\n",
38837    ///          "examples": [
38838    ///            "contract_address"
38839    ///          ],
38840    ///          "type": "string"
38841    ///        },
38842    ///        "labelValue": {
38843    ///          "description": "Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.\n",
38844    ///          "examples": [
38845    ///            "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
38846    ///          ],
38847    ///          "type": "string"
38848    ///        },
38849    ///        "labels": {
38850    ///          "description": "Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when\nan event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.\n",
38851    ///          "examples": [
38852    ///            {
38853    ///              "env": "prod",
38854    ///              "service": "api"
38855    ///            }
38856    ///          ],
38857    ///          "type": "object",
38858    ///          "additionalProperties": {
38859    ///            "type": "string"
38860    ///          }
38861    ///        },
38862    ///        "metadata": {
38863    ///          "description": "Additional metadata for the subscription.",
38864    ///          "examples": [
38865    ///            {
38866    ///              "updated_field": "updated_value",
38867    ///              "webhook_version": "v2"
38868    ///            }
38869    ///          ],
38870    ///          "type": "object",
38871    ///          "additionalProperties": true
38872    ///        },
38873    ///        "target": {
38874    ///          "$ref": "#/components/schemas/WebhookTarget"
38875    ///        }
38876    ///      }
38877    ///    },
38878    ///    {
38879    ///      "title": "Traditional single-label update format",
38880    ///      "not": {
38881    ///        "required": [
38882    ///          "labels"
38883    ///        ]
38884    ///      },
38885    ///      "required": [
38886    ///        "eventTypes",
38887    ///        "isEnabled",
38888    ///        "labelKey",
38889    ///        "labelValue",
38890    ///        "target"
38891    ///      ]
38892    ///    },
38893    ///    {
38894    ///      "not": {
38895    ///        "title": "Multi-label update format with total overlap logic",
38896    ///        "not": {
38897    ///          "anyOf": [
38898    ///            {
38899    ///              "required": [
38900    ///                "labelKey"
38901    ///              ]
38902    ///            },
38903    ///            {
38904    ///              "required": [
38905    ///                "labelValue"
38906    ///              ]
38907    ///            }
38908    ///          ]
38909    ///        },
38910    ///        "required": [
38911    ///          "eventTypes",
38912    ///          "isEnabled",
38913    ///          "labels",
38914    ///          "target"
38915    ///        ]
38916    ///      }
38917    ///    }
38918    ///  ]
38919    ///}
38920    /// ```
38921    /// </details>
38922    #[derive(
38923        ::serde::Deserialize,
38924        ::serde::Serialize,
38925        Clone,
38926        Copy,
38927        Debug,
38928        Eq,
38929        Hash,
38930        Ord,
38931        PartialEq,
38932        PartialOrd,
38933    )]
38934    #[serde(deny_unknown_fields)]
38935    pub enum WebhookSubscriptionUpdateRequestVariant0 {}
38936    impl ::std::convert::From<&Self> for WebhookSubscriptionUpdateRequestVariant0 {
38937        fn from(value: &WebhookSubscriptionUpdateRequestVariant0) -> Self {
38938            value.clone()
38939        }
38940    }
38941    ///`WebhookSubscriptionUpdateRequestVariant1`
38942    ///
38943    /// <details><summary>JSON schema</summary>
38944    ///
38945    /// ```json
38946    ///{
38947    ///  "allOf": [
38948    ///    {
38949    ///      "type": "object",
38950    ///      "properties": {
38951    ///        "description": {
38952    ///          "description": "Description of the webhook subscription.",
38953    ///          "examples": [
38954    ///            "Updated subscription for token transfer events"
38955    ///          ],
38956    ///          "type": "string"
38957    ///        },
38958    ///        "eventTypes": {
38959    ///          "description": "Types of events to subscribe to. Event types follow a three-part dot-separated format:\nservice.resource.verb (e.g., \"onchain.activity.detected\", \"wallet.activity.detected\", \"onramp.transaction.created\").\n",
38960    ///          "examples": [
38961    ///            [
38962    ///              "onchain.activity.detected"
38963    ///            ]
38964    ///          ],
38965    ///          "type": "array",
38966    ///          "items": {
38967    ///            "type": "string"
38968    ///          }
38969    ///        },
38970    ///        "isEnabled": {
38971    ///          "description": "Whether the subscription is enabled.",
38972    ///          "examples": [
38973    ///            false
38974    ///          ],
38975    ///          "type": "boolean"
38976    ///        },
38977    ///        "labelKey": {
38978    ///          "description": "Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.\n",
38979    ///          "examples": [
38980    ///            "contract_address"
38981    ///          ],
38982    ///          "type": "string"
38983    ///        },
38984    ///        "labelValue": {
38985    ///          "description": "Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.\n",
38986    ///          "examples": [
38987    ///            "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
38988    ///          ],
38989    ///          "type": "string"
38990    ///        },
38991    ///        "labels": {
38992    ///          "description": "Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when\nan event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.\n",
38993    ///          "examples": [
38994    ///            {
38995    ///              "env": "prod",
38996    ///              "service": "api"
38997    ///            }
38998    ///          ],
38999    ///          "type": "object",
39000    ///          "additionalProperties": {
39001    ///            "type": "string"
39002    ///          }
39003    ///        },
39004    ///        "metadata": {
39005    ///          "description": "Additional metadata for the subscription.",
39006    ///          "examples": [
39007    ///            {
39008    ///              "updated_field": "updated_value",
39009    ///              "webhook_version": "v2"
39010    ///            }
39011    ///          ],
39012    ///          "type": "object",
39013    ///          "additionalProperties": true
39014    ///        },
39015    ///        "target": {
39016    ///          "$ref": "#/components/schemas/WebhookTarget"
39017    ///        }
39018    ///      }
39019    ///    },
39020    ///    {
39021    ///      "title": "Multi-label update format with total overlap logic",
39022    ///      "not": {
39023    ///        "anyOf": [
39024    ///          {
39025    ///            "required": [
39026    ///              "labelKey"
39027    ///            ]
39028    ///          },
39029    ///          {
39030    ///            "required": [
39031    ///              "labelValue"
39032    ///            ]
39033    ///          }
39034    ///        ]
39035    ///      },
39036    ///      "required": [
39037    ///        "eventTypes",
39038    ///        "isEnabled",
39039    ///        "labels",
39040    ///        "target"
39041    ///      ]
39042    ///    },
39043    ///    {
39044    ///      "not": {
39045    ///        "title": "Traditional single-label update format",
39046    ///        "not": {
39047    ///          "required": [
39048    ///            "labels"
39049    ///          ]
39050    ///        },
39051    ///        "required": [
39052    ///          "eventTypes",
39053    ///          "isEnabled",
39054    ///          "labelKey",
39055    ///          "labelValue",
39056    ///          "target"
39057    ///        ]
39058    ///      }
39059    ///    }
39060    ///  ]
39061    ///}
39062    /// ```
39063    /// </details>
39064    #[derive(
39065        ::serde::Deserialize,
39066        ::serde::Serialize,
39067        Clone,
39068        Copy,
39069        Debug,
39070        Eq,
39071        Hash,
39072        Ord,
39073        PartialEq,
39074        PartialOrd,
39075    )]
39076    #[serde(deny_unknown_fields)]
39077    pub enum WebhookSubscriptionUpdateRequestVariant1 {}
39078    impl ::std::convert::From<&Self> for WebhookSubscriptionUpdateRequestVariant1 {
39079        fn from(value: &WebhookSubscriptionUpdateRequestVariant1) -> Self {
39080            value.clone()
39081        }
39082    }
39083    /**Target configuration for webhook delivery.
39084    Specifies the destination URL and any custom headers to include in webhook requests.
39085    */
39086    ///
39087    /// <details><summary>JSON schema</summary>
39088    ///
39089    /// ```json
39090    ///{
39091    ///  "description": "Target configuration for webhook delivery.\nSpecifies the destination URL and any custom headers to include in webhook requests.\n",
39092    ///  "examples": [
39093    ///    {
39094    ///      "headers": {
39095    ///        "Authorization": "Bearer token123",
39096    ///        "Content-Type": "application/json"
39097    ///      },
39098    ///      "url": "https://api.example.com/webhooks"
39099    ///    }
39100    ///  ],
39101    ///  "type": "object",
39102    ///  "required": [
39103    ///    "url"
39104    ///  ],
39105    ///  "properties": {
39106    ///    "headers": {
39107    ///      "description": "Additional headers to include in webhook requests.",
39108    ///      "examples": [
39109    ///        {
39110    ///          "Authorization": "Bearer token123",
39111    ///          "Content-Type": "application/json"
39112    ///        }
39113    ///      ],
39114    ///      "type": "object",
39115    ///      "additionalProperties": {
39116    ///        "type": "string"
39117    ///      }
39118    ///    },
39119    ///    "url": {
39120    ///      "description": "The webhook URL to deliver events to.",
39121    ///      "examples": [
39122    ///        "https://api.example.com/webhooks"
39123    ///      ],
39124    ///      "allOf": [
39125    ///        {
39126    ///          "$ref": "#/components/schemas/Url"
39127    ///        }
39128    ///      ]
39129    ///    }
39130    ///  }
39131    ///}
39132    /// ```
39133    /// </details>
39134    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39135    pub struct WebhookTarget {
39136        ///Additional headers to include in webhook requests.
39137        #[serde(
39138            default,
39139            skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
39140        )]
39141        pub headers: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
39142        ///The webhook URL to deliver events to.
39143        pub url: Url,
39144    }
39145    impl ::std::convert::From<&WebhookTarget> for WebhookTarget {
39146        fn from(value: &WebhookTarget) -> Self {
39147            value.clone()
39148        }
39149    }
39150    impl WebhookTarget {
39151        pub fn builder() -> builder::WebhookTarget {
39152            Default::default()
39153        }
39154    }
39155    ///The x402 protocol exact scheme payload for EVM networks. The scheme is implemented using ERC-3009. For more details, please see [EVM Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md).
39156    ///
39157    /// <details><summary>JSON schema</summary>
39158    ///
39159    /// ```json
39160    ///{
39161    ///  "title": "x402ExactEvmPayload",
39162    ///  "description": "The x402 protocol exact scheme payload for EVM networks. The scheme is implemented using ERC-3009. For more details, please see [EVM Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md).",
39163    ///  "examples": [
39164    ///    {
39165    ///      "authorization": {
39166    ///        "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
39167    ///        "nonce": "0x1234567890abcdef1234567890abcdef12345678",
39168    ///        "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
39169    ///        "validAfter": "1716150000",
39170    ///        "validBefore": "1716150000",
39171    ///        "value": "1000000000000000000"
39172    ///      },
39173    ///      "signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480"
39174    ///    }
39175    ///  ],
39176    ///  "type": "object",
39177    ///  "required": [
39178    ///    "authorization",
39179    ///    "signature"
39180    ///  ],
39181    ///  "properties": {
39182    ///    "authorization": {
39183    ///      "description": "The authorization data for the ERC-3009 authorization message.",
39184    ///      "examples": [
39185    ///        {
39186    ///          "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
39187    ///          "nonce": "0x1234567890abcdef1234567890abcdef12345678",
39188    ///          "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
39189    ///          "validAfter": "1716150000",
39190    ///          "validBefore": "1716150000",
39191    ///          "value": "1000000000000000000"
39192    ///        }
39193    ///      ],
39194    ///      "type": "object",
39195    ///      "required": [
39196    ///        "from",
39197    ///        "nonce",
39198    ///        "to",
39199    ///        "validAfter",
39200    ///        "validBefore",
39201    ///        "value"
39202    ///      ],
39203    ///      "properties": {
39204    ///        "from": {
39205    ///          "description": "The 0x-prefixed, checksum EVM address of the sender of the payment.",
39206    ///          "examples": [
39207    ///            "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
39208    ///          ],
39209    ///          "type": "string",
39210    ///          "pattern": "^0x[0-9a-fA-F]{40}$"
39211    ///        },
39212    ///        "nonce": {
39213    ///          "description": "The hex-encoded nonce of the payment.",
39214    ///          "examples": [
39215    ///            "0x1234567890abcdef1234567890abcdef12345678"
39216    ///          ],
39217    ///          "type": "string"
39218    ///        },
39219    ///        "to": {
39220    ///          "description": "The 0x-prefixed, checksum EVM address of the recipient of the payment.",
39221    ///          "examples": [
39222    ///            "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
39223    ///          ],
39224    ///          "type": "string",
39225    ///          "pattern": "^0x[0-9a-fA-F]{40}$"
39226    ///        },
39227    ///        "validAfter": {
39228    ///          "description": "The unix timestamp after which the payment is valid.",
39229    ///          "examples": [
39230    ///            "1716150000"
39231    ///          ],
39232    ///          "type": "string"
39233    ///        },
39234    ///        "validBefore": {
39235    ///          "description": "The unix timestamp before which the payment is valid.",
39236    ///          "examples": [
39237    ///            "1716150000"
39238    ///          ],
39239    ///          "type": "string"
39240    ///        },
39241    ///        "value": {
39242    ///          "description": "The value of the payment, in atomic units of the payment asset.",
39243    ///          "examples": [
39244    ///            "1000000000000000000"
39245    ///          ],
39246    ///          "type": "string"
39247    ///        }
39248    ///      }
39249    ///    },
39250    ///    "signature": {
39251    ///      "description": "The EIP-712 hex-encoded signature of the ERC-3009 authorization message.",
39252    ///      "examples": [
39253    ///        "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480"
39254    ///      ],
39255    ///      "type": "string"
39256    ///    }
39257    ///  }
39258    ///}
39259    /// ```
39260    /// </details>
39261    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39262    pub struct X402ExactEvmPayload {
39263        pub authorization: X402ExactEvmPayloadAuthorization,
39264        ///The EIP-712 hex-encoded signature of the ERC-3009 authorization message.
39265        pub signature: ::std::string::String,
39266    }
39267    impl ::std::convert::From<&X402ExactEvmPayload> for X402ExactEvmPayload {
39268        fn from(value: &X402ExactEvmPayload) -> Self {
39269            value.clone()
39270        }
39271    }
39272    impl X402ExactEvmPayload {
39273        pub fn builder() -> builder::X402ExactEvmPayload {
39274            Default::default()
39275        }
39276    }
39277    ///The authorization data for the ERC-3009 authorization message.
39278    ///
39279    /// <details><summary>JSON schema</summary>
39280    ///
39281    /// ```json
39282    ///{
39283    ///  "description": "The authorization data for the ERC-3009 authorization message.",
39284    ///  "examples": [
39285    ///    {
39286    ///      "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
39287    ///      "nonce": "0x1234567890abcdef1234567890abcdef12345678",
39288    ///      "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
39289    ///      "validAfter": "1716150000",
39290    ///      "validBefore": "1716150000",
39291    ///      "value": "1000000000000000000"
39292    ///    }
39293    ///  ],
39294    ///  "type": "object",
39295    ///  "required": [
39296    ///    "from",
39297    ///    "nonce",
39298    ///    "to",
39299    ///    "validAfter",
39300    ///    "validBefore",
39301    ///    "value"
39302    ///  ],
39303    ///  "properties": {
39304    ///    "from": {
39305    ///      "description": "The 0x-prefixed, checksum EVM address of the sender of the payment.",
39306    ///      "examples": [
39307    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
39308    ///      ],
39309    ///      "type": "string",
39310    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
39311    ///    },
39312    ///    "nonce": {
39313    ///      "description": "The hex-encoded nonce of the payment.",
39314    ///      "examples": [
39315    ///        "0x1234567890abcdef1234567890abcdef12345678"
39316    ///      ],
39317    ///      "type": "string"
39318    ///    },
39319    ///    "to": {
39320    ///      "description": "The 0x-prefixed, checksum EVM address of the recipient of the payment.",
39321    ///      "examples": [
39322    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
39323    ///      ],
39324    ///      "type": "string",
39325    ///      "pattern": "^0x[0-9a-fA-F]{40}$"
39326    ///    },
39327    ///    "validAfter": {
39328    ///      "description": "The unix timestamp after which the payment is valid.",
39329    ///      "examples": [
39330    ///        "1716150000"
39331    ///      ],
39332    ///      "type": "string"
39333    ///    },
39334    ///    "validBefore": {
39335    ///      "description": "The unix timestamp before which the payment is valid.",
39336    ///      "examples": [
39337    ///        "1716150000"
39338    ///      ],
39339    ///      "type": "string"
39340    ///    },
39341    ///    "value": {
39342    ///      "description": "The value of the payment, in atomic units of the payment asset.",
39343    ///      "examples": [
39344    ///        "1000000000000000000"
39345    ///      ],
39346    ///      "type": "string"
39347    ///    }
39348    ///  }
39349    ///}
39350    /// ```
39351    /// </details>
39352    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39353    pub struct X402ExactEvmPayloadAuthorization {
39354        ///The 0x-prefixed, checksum EVM address of the sender of the payment.
39355        pub from: X402ExactEvmPayloadAuthorizationFrom,
39356        ///The hex-encoded nonce of the payment.
39357        pub nonce: ::std::string::String,
39358        ///The 0x-prefixed, checksum EVM address of the recipient of the payment.
39359        pub to: X402ExactEvmPayloadAuthorizationTo,
39360        ///The unix timestamp after which the payment is valid.
39361        #[serde(rename = "validAfter")]
39362        pub valid_after: ::std::string::String,
39363        ///The unix timestamp before which the payment is valid.
39364        #[serde(rename = "validBefore")]
39365        pub valid_before: ::std::string::String,
39366        ///The value of the payment, in atomic units of the payment asset.
39367        pub value: ::std::string::String,
39368    }
39369    impl ::std::convert::From<&X402ExactEvmPayloadAuthorization> for X402ExactEvmPayloadAuthorization {
39370        fn from(value: &X402ExactEvmPayloadAuthorization) -> Self {
39371            value.clone()
39372        }
39373    }
39374    impl X402ExactEvmPayloadAuthorization {
39375        pub fn builder() -> builder::X402ExactEvmPayloadAuthorization {
39376            Default::default()
39377        }
39378    }
39379    ///The 0x-prefixed, checksum EVM address of the sender of the payment.
39380    ///
39381    /// <details><summary>JSON schema</summary>
39382    ///
39383    /// ```json
39384    ///{
39385    ///  "description": "The 0x-prefixed, checksum EVM address of the sender of the payment.",
39386    ///  "examples": [
39387    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
39388    ///  ],
39389    ///  "type": "string",
39390    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
39391    ///}
39392    /// ```
39393    /// </details>
39394    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39395    #[serde(transparent)]
39396    pub struct X402ExactEvmPayloadAuthorizationFrom(::std::string::String);
39397    impl ::std::ops::Deref for X402ExactEvmPayloadAuthorizationFrom {
39398        type Target = ::std::string::String;
39399        fn deref(&self) -> &::std::string::String {
39400            &self.0
39401        }
39402    }
39403    impl ::std::convert::From<X402ExactEvmPayloadAuthorizationFrom> for ::std::string::String {
39404        fn from(value: X402ExactEvmPayloadAuthorizationFrom) -> Self {
39405            value.0
39406        }
39407    }
39408    impl ::std::convert::From<&X402ExactEvmPayloadAuthorizationFrom>
39409        for X402ExactEvmPayloadAuthorizationFrom
39410    {
39411        fn from(value: &X402ExactEvmPayloadAuthorizationFrom) -> Self {
39412            value.clone()
39413        }
39414    }
39415    impl ::std::str::FromStr for X402ExactEvmPayloadAuthorizationFrom {
39416        type Err = self::error::ConversionError;
39417        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
39418            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
39419                ::std::sync::LazyLock::new(|| {
39420                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
39421                });
39422            if PATTERN.find(value).is_none() {
39423                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
39424            }
39425            Ok(Self(value.to_string()))
39426        }
39427    }
39428    impl ::std::convert::TryFrom<&str> for X402ExactEvmPayloadAuthorizationFrom {
39429        type Error = self::error::ConversionError;
39430        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
39431            value.parse()
39432        }
39433    }
39434    impl ::std::convert::TryFrom<&::std::string::String> for X402ExactEvmPayloadAuthorizationFrom {
39435        type Error = self::error::ConversionError;
39436        fn try_from(
39437            value: &::std::string::String,
39438        ) -> ::std::result::Result<Self, self::error::ConversionError> {
39439            value.parse()
39440        }
39441    }
39442    impl ::std::convert::TryFrom<::std::string::String> for X402ExactEvmPayloadAuthorizationFrom {
39443        type Error = self::error::ConversionError;
39444        fn try_from(
39445            value: ::std::string::String,
39446        ) -> ::std::result::Result<Self, self::error::ConversionError> {
39447            value.parse()
39448        }
39449    }
39450    impl<'de> ::serde::Deserialize<'de> for X402ExactEvmPayloadAuthorizationFrom {
39451        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
39452        where
39453            D: ::serde::Deserializer<'de>,
39454        {
39455            ::std::string::String::deserialize(deserializer)?
39456                .parse()
39457                .map_err(|e: self::error::ConversionError| {
39458                    <D::Error as ::serde::de::Error>::custom(e.to_string())
39459                })
39460        }
39461    }
39462    ///The 0x-prefixed, checksum EVM address of the recipient of the payment.
39463    ///
39464    /// <details><summary>JSON schema</summary>
39465    ///
39466    /// ```json
39467    ///{
39468    ///  "description": "The 0x-prefixed, checksum EVM address of the recipient of the payment.",
39469    ///  "examples": [
39470    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
39471    ///  ],
39472    ///  "type": "string",
39473    ///  "pattern": "^0x[0-9a-fA-F]{40}$"
39474    ///}
39475    /// ```
39476    /// </details>
39477    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
39478    #[serde(transparent)]
39479    pub struct X402ExactEvmPayloadAuthorizationTo(::std::string::String);
39480    impl ::std::ops::Deref for X402ExactEvmPayloadAuthorizationTo {
39481        type Target = ::std::string::String;
39482        fn deref(&self) -> &::std::string::String {
39483            &self.0
39484        }
39485    }
39486    impl ::std::convert::From<X402ExactEvmPayloadAuthorizationTo> for ::std::string::String {
39487        fn from(value: X402ExactEvmPayloadAuthorizationTo) -> Self {
39488            value.0
39489        }
39490    }
39491    impl ::std::convert::From<&X402ExactEvmPayloadAuthorizationTo>
39492        for X402ExactEvmPayloadAuthorizationTo
39493    {
39494        fn from(value: &X402ExactEvmPayloadAuthorizationTo) -> Self {
39495            value.clone()
39496        }
39497    }
39498    impl ::std::str::FromStr for X402ExactEvmPayloadAuthorizationTo {
39499        type Err = self::error::ConversionError;
39500        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
39501            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
39502                ::std::sync::LazyLock::new(|| {
39503                    ::regress::Regex::new("^0x[0-9a-fA-F]{40}$").unwrap()
39504                });
39505            if PATTERN.find(value).is_none() {
39506                return Err("doesn't match pattern \"^0x[0-9a-fA-F]{40}$\"".into());
39507            }
39508            Ok(Self(value.to_string()))
39509        }
39510    }
39511    impl ::std::convert::TryFrom<&str> for X402ExactEvmPayloadAuthorizationTo {
39512        type Error = self::error::ConversionError;
39513        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
39514            value.parse()
39515        }
39516    }
39517    impl ::std::convert::TryFrom<&::std::string::String> for X402ExactEvmPayloadAuthorizationTo {
39518        type Error = self::error::ConversionError;
39519        fn try_from(
39520            value: &::std::string::String,
39521        ) -> ::std::result::Result<Self, self::error::ConversionError> {
39522            value.parse()
39523        }
39524    }
39525    impl ::std::convert::TryFrom<::std::string::String> for X402ExactEvmPayloadAuthorizationTo {
39526        type Error = self::error::ConversionError;
39527        fn try_from(
39528            value: ::std::string::String,
39529        ) -> ::std::result::Result<Self, self::error::ConversionError> {
39530            value.parse()
39531        }
39532    }
39533    impl<'de> ::serde::Deserialize<'de> for X402ExactEvmPayloadAuthorizationTo {
39534        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
39535        where
39536            D: ::serde::Deserializer<'de>,
39537        {
39538            ::std::string::String::deserialize(deserializer)?
39539                .parse()
39540                .map_err(|e: self::error::ConversionError| {
39541                    <D::Error as ::serde::de::Error>::custom(e.to_string())
39542                })
39543        }
39544    }
39545    ///The x402 protocol exact scheme payload for Solana networks. For more details, please see [Solana Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md).
39546    ///
39547    /// <details><summary>JSON schema</summary>
39548    ///
39549    /// ```json
39550    ///{
39551    ///  "title": "x402ExactSolanaPayload",
39552    ///  "description": "The x402 protocol exact scheme payload for Solana networks. For more details, please see [Solana Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md).",
39553    ///  "examples": [
39554    ///    {
39555    ///      "transaction": "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAQECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8CBgMBAQAAAAIBAwQAAAAABgIAAAAAAAYDBQEBAAAGBAgAAAAABgUAAAAA6AMAAAAAAAAGBgUBAQEBBgcEAQAAAAYICgMBAQIDBgkCBgAAAAYKAwABAQEGCwMGAQEBBgwDAAABAQAAAAA="
39556    ///    }
39557    ///  ],
39558    ///  "type": "object",
39559    ///  "required": [
39560    ///    "transaction"
39561    ///  ],
39562    ///  "properties": {
39563    ///    "transaction": {
39564    ///      "description": "The base64-encoded Solana transaction.",
39565    ///      "examples": [
39566    ///        "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAQECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8CBgMBAQAAAAIBAwQAAAAABgIAAAAAAAYDBQEBAAAGBAgAAAAABgUAAAAA6AMAAAAAAAAGBgUBAQEBBgcEAQAAAAYICgMBAQIDBgkCBgAAAAYKAwABAQEGCwMGAQEBBgwDAAABAQAAAAA="
39567    ///      ],
39568    ///      "type": "string"
39569    ///    }
39570    ///  }
39571    ///}
39572    /// ```
39573    /// </details>
39574    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39575    pub struct X402ExactSolanaPayload {
39576        ///The base64-encoded Solana transaction.
39577        pub transaction: ::std::string::String,
39578    }
39579    impl ::std::convert::From<&X402ExactSolanaPayload> for X402ExactSolanaPayload {
39580        fn from(value: &X402ExactSolanaPayload) -> Self {
39581            value.clone()
39582        }
39583    }
39584    impl X402ExactSolanaPayload {
39585        pub fn builder() -> builder::X402ExactSolanaPayload {
39586            Default::default()
39587        }
39588    }
39589    ///The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
39590    ///
39591    /// <details><summary>JSON schema</summary>
39592    ///
39593    /// ```json
39594    ///{
39595    ///  "description": "The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.",
39596    ///  "type": "object",
39597    ///  "oneOf": [
39598    ///    {
39599    ///      "$ref": "#/components/schemas/x402V1PaymentPayload"
39600    ///    },
39601    ///    {
39602    ///      "$ref": "#/components/schemas/x402V2PaymentPayload"
39603    ///    }
39604    ///  ]
39605    ///}
39606    /// ```
39607    /// </details>
39608    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39609    #[serde(untagged)]
39610    pub enum X402PaymentPayload {
39611        #[serde(rename = "X402V1PaymentPayload")]
39612        X402v1PaymentPayload(X402V1PaymentPayload),
39613        #[serde(rename = "X402V2PaymentPayload")]
39614        X402v2PaymentPayload(X402V2PaymentPayload),
39615    }
39616    impl ::std::convert::From<&Self> for X402PaymentPayload {
39617        fn from(value: &X402PaymentPayload) -> Self {
39618            value.clone()
39619        }
39620    }
39621    impl ::std::convert::From<X402V1PaymentPayload> for X402PaymentPayload {
39622        fn from(value: X402V1PaymentPayload) -> Self {
39623            Self::X402v1PaymentPayload(value)
39624        }
39625    }
39626    impl ::std::convert::From<X402V2PaymentPayload> for X402PaymentPayload {
39627        fn from(value: X402V2PaymentPayload) -> Self {
39628            Self::X402v2PaymentPayload(value)
39629        }
39630    }
39631    ///The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
39632    ///
39633    /// <details><summary>JSON schema</summary>
39634    ///
39635    /// ```json
39636    ///{
39637    ///  "description": "The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.",
39638    ///  "type": "object",
39639    ///  "oneOf": [
39640    ///    {
39641    ///      "$ref": "#/components/schemas/x402V1PaymentRequirements"
39642    ///    },
39643    ///    {
39644    ///      "$ref": "#/components/schemas/x402V2PaymentRequirements"
39645    ///    }
39646    ///  ]
39647    ///}
39648    /// ```
39649    /// </details>
39650    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39651    #[serde(untagged)]
39652    pub enum X402PaymentRequirements {
39653        #[serde(rename = "X402V1PaymentRequirements")]
39654        X402v1PaymentRequirements(X402V1PaymentRequirements),
39655        #[serde(rename = "X402V2PaymentRequirements")]
39656        X402v2PaymentRequirements(X402V2PaymentRequirements),
39657    }
39658    impl ::std::convert::From<&Self> for X402PaymentRequirements {
39659        fn from(value: &X402PaymentRequirements) -> Self {
39660            value.clone()
39661        }
39662    }
39663    impl ::std::convert::From<X402V1PaymentRequirements> for X402PaymentRequirements {
39664        fn from(value: X402V1PaymentRequirements) -> Self {
39665            Self::X402v1PaymentRequirements(value)
39666        }
39667    }
39668    impl ::std::convert::From<X402V2PaymentRequirements> for X402PaymentRequirements {
39669        fn from(value: X402V2PaymentRequirements) -> Self {
39670            Self::X402v2PaymentRequirements(value)
39671        }
39672    }
39673    ///Describes the resource being accessed in x402 protocol.
39674    ///
39675    /// <details><summary>JSON schema</summary>
39676    ///
39677    /// ```json
39678    ///{
39679    ///  "description": "Describes the resource being accessed in x402 protocol.",
39680    ///  "type": "object",
39681    ///  "properties": {
39682    ///    "description": {
39683    ///      "description": "The description of the resource.",
39684    ///      "examples": [
39685    ///        "Premium API access for data analysis"
39686    ///      ],
39687    ///      "type": "string"
39688    ///    },
39689    ///    "mimeType": {
39690    ///      "description": "The MIME type of the resource response.",
39691    ///      "examples": [
39692    ///        "application/json"
39693    ///      ],
39694    ///      "type": "string"
39695    ///    },
39696    ///    "url": {
39697    ///      "description": "The URL of the resource.",
39698    ///      "examples": [
39699    ///        "https://api.example.com/premium/resource/123"
39700    ///      ],
39701    ///      "type": "string"
39702    ///    }
39703    ///  }
39704    ///}
39705    /// ```
39706    /// </details>
39707    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39708    pub struct X402ResourceInfo {
39709        ///The description of the resource.
39710        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
39711        pub description: ::std::option::Option<::std::string::String>,
39712        ///The MIME type of the resource response.
39713        #[serde(
39714            rename = "mimeType",
39715            default,
39716            skip_serializing_if = "::std::option::Option::is_none"
39717        )]
39718        pub mime_type: ::std::option::Option<::std::string::String>,
39719        ///The URL of the resource.
39720        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
39721        pub url: ::std::option::Option<::std::string::String>,
39722    }
39723    impl ::std::convert::From<&X402ResourceInfo> for X402ResourceInfo {
39724        fn from(value: &X402ResourceInfo) -> Self {
39725            value.clone()
39726        }
39727    }
39728    impl ::std::default::Default for X402ResourceInfo {
39729        fn default() -> Self {
39730            Self {
39731                description: Default::default(),
39732                mime_type: Default::default(),
39733                url: Default::default(),
39734            }
39735        }
39736    }
39737    impl X402ResourceInfo {
39738        pub fn builder() -> builder::X402ResourceInfo {
39739            Default::default()
39740        }
39741    }
39742    ///The reason the payment settlement errored on the x402 protocol.
39743    ///
39744    /// <details><summary>JSON schema</summary>
39745    ///
39746    /// ```json
39747    ///{
39748    ///  "description": "The reason the payment settlement errored on the x402 protocol.",
39749    ///  "examples": [
39750    ///    "insufficient_funds"
39751    ///  ],
39752    ///  "type": "string",
39753    ///  "enum": [
39754    ///    "insufficient_funds",
39755    ///    "invalid_scheme",
39756    ///    "invalid_network",
39757    ///    "invalid_x402_version",
39758    ///    "invalid_payment_requirements",
39759    ///    "invalid_payload",
39760    ///    "invalid_exact_evm_payload_authorization_value",
39761    ///    "invalid_exact_evm_payload_authorization_valid_after",
39762    ///    "invalid_exact_evm_payload_authorization_valid_before",
39763    ///    "invalid_exact_evm_payload_authorization_typed_data_message",
39764    ///    "invalid_exact_evm_payload_authorization_from_address_kyt",
39765    ///    "invalid_exact_evm_payload_authorization_to_address_kyt",
39766    ///    "invalid_exact_evm_payload_signature_address",
39767    ///    "settle_exact_svm_block_height_exceeded",
39768    ///    "settle_exact_svm_transaction_confirmation_timed_out"
39769    ///  ]
39770    ///}
39771    /// ```
39772    /// </details>
39773    #[derive(
39774        ::serde::Deserialize,
39775        ::serde::Serialize,
39776        Clone,
39777        Copy,
39778        Debug,
39779        Eq,
39780        Hash,
39781        Ord,
39782        PartialEq,
39783        PartialOrd,
39784    )]
39785    pub enum X402SettleErrorReason {
39786        #[serde(rename = "insufficient_funds")]
39787        InsufficientFunds,
39788        #[serde(rename = "invalid_scheme")]
39789        InvalidScheme,
39790        #[serde(rename = "invalid_network")]
39791        InvalidNetwork,
39792        #[serde(rename = "invalid_x402_version")]
39793        InvalidX402Version,
39794        #[serde(rename = "invalid_payment_requirements")]
39795        InvalidPaymentRequirements,
39796        #[serde(rename = "invalid_payload")]
39797        InvalidPayload,
39798        #[serde(rename = "invalid_exact_evm_payload_authorization_value")]
39799        InvalidExactEvmPayloadAuthorizationValue,
39800        #[serde(rename = "invalid_exact_evm_payload_authorization_valid_after")]
39801        InvalidExactEvmPayloadAuthorizationValidAfter,
39802        #[serde(rename = "invalid_exact_evm_payload_authorization_valid_before")]
39803        InvalidExactEvmPayloadAuthorizationValidBefore,
39804        #[serde(rename = "invalid_exact_evm_payload_authorization_typed_data_message")]
39805        InvalidExactEvmPayloadAuthorizationTypedDataMessage,
39806        #[serde(rename = "invalid_exact_evm_payload_authorization_from_address_kyt")]
39807        InvalidExactEvmPayloadAuthorizationFromAddressKyt,
39808        #[serde(rename = "invalid_exact_evm_payload_authorization_to_address_kyt")]
39809        InvalidExactEvmPayloadAuthorizationToAddressKyt,
39810        #[serde(rename = "invalid_exact_evm_payload_signature_address")]
39811        InvalidExactEvmPayloadSignatureAddress,
39812        #[serde(rename = "settle_exact_svm_block_height_exceeded")]
39813        SettleExactSvmBlockHeightExceeded,
39814        #[serde(rename = "settle_exact_svm_transaction_confirmation_timed_out")]
39815        SettleExactSvmTransactionConfirmationTimedOut,
39816    }
39817    impl ::std::convert::From<&Self> for X402SettleErrorReason {
39818        fn from(value: &X402SettleErrorReason) -> Self {
39819            value.clone()
39820        }
39821    }
39822    impl ::std::fmt::Display for X402SettleErrorReason {
39823        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
39824            match *self {
39825                Self::InsufficientFunds => f.write_str("insufficient_funds"),
39826                Self::InvalidScheme => f.write_str("invalid_scheme"),
39827                Self::InvalidNetwork => f.write_str("invalid_network"),
39828                Self::InvalidX402Version => f.write_str("invalid_x402_version"),
39829                Self::InvalidPaymentRequirements => f.write_str("invalid_payment_requirements"),
39830                Self::InvalidPayload => f.write_str("invalid_payload"),
39831                Self::InvalidExactEvmPayloadAuthorizationValue => {
39832                    f.write_str("invalid_exact_evm_payload_authorization_value")
39833                }
39834                Self::InvalidExactEvmPayloadAuthorizationValidAfter => {
39835                    f.write_str("invalid_exact_evm_payload_authorization_valid_after")
39836                }
39837                Self::InvalidExactEvmPayloadAuthorizationValidBefore => {
39838                    f.write_str("invalid_exact_evm_payload_authorization_valid_before")
39839                }
39840                Self::InvalidExactEvmPayloadAuthorizationTypedDataMessage => {
39841                    f.write_str("invalid_exact_evm_payload_authorization_typed_data_message")
39842                }
39843                Self::InvalidExactEvmPayloadAuthorizationFromAddressKyt => {
39844                    f.write_str("invalid_exact_evm_payload_authorization_from_address_kyt")
39845                }
39846                Self::InvalidExactEvmPayloadAuthorizationToAddressKyt => {
39847                    f.write_str("invalid_exact_evm_payload_authorization_to_address_kyt")
39848                }
39849                Self::InvalidExactEvmPayloadSignatureAddress => {
39850                    f.write_str("invalid_exact_evm_payload_signature_address")
39851                }
39852                Self::SettleExactSvmBlockHeightExceeded => {
39853                    f.write_str("settle_exact_svm_block_height_exceeded")
39854                }
39855                Self::SettleExactSvmTransactionConfirmationTimedOut => {
39856                    f.write_str("settle_exact_svm_transaction_confirmation_timed_out")
39857                }
39858            }
39859        }
39860    }
39861    impl ::std::str::FromStr for X402SettleErrorReason {
39862        type Err = self::error::ConversionError;
39863        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
39864            match value {
39865                "insufficient_funds" => Ok(Self::InsufficientFunds),
39866                "invalid_scheme" => Ok(Self::InvalidScheme),
39867                "invalid_network" => Ok(Self::InvalidNetwork),
39868                "invalid_x402_version" => Ok(Self::InvalidX402Version),
39869                "invalid_payment_requirements" => Ok(Self::InvalidPaymentRequirements),
39870                "invalid_payload" => Ok(Self::InvalidPayload),
39871                "invalid_exact_evm_payload_authorization_value" => {
39872                    Ok(Self::InvalidExactEvmPayloadAuthorizationValue)
39873                }
39874                "invalid_exact_evm_payload_authorization_valid_after" => {
39875                    Ok(Self::InvalidExactEvmPayloadAuthorizationValidAfter)
39876                }
39877                "invalid_exact_evm_payload_authorization_valid_before" => {
39878                    Ok(Self::InvalidExactEvmPayloadAuthorizationValidBefore)
39879                }
39880                "invalid_exact_evm_payload_authorization_typed_data_message" => {
39881                    Ok(Self::InvalidExactEvmPayloadAuthorizationTypedDataMessage)
39882                }
39883                "invalid_exact_evm_payload_authorization_from_address_kyt" => {
39884                    Ok(Self::InvalidExactEvmPayloadAuthorizationFromAddressKyt)
39885                }
39886                "invalid_exact_evm_payload_authorization_to_address_kyt" => {
39887                    Ok(Self::InvalidExactEvmPayloadAuthorizationToAddressKyt)
39888                }
39889                "invalid_exact_evm_payload_signature_address" => {
39890                    Ok(Self::InvalidExactEvmPayloadSignatureAddress)
39891                }
39892                "settle_exact_svm_block_height_exceeded" => {
39893                    Ok(Self::SettleExactSvmBlockHeightExceeded)
39894                }
39895                "settle_exact_svm_transaction_confirmation_timed_out" => {
39896                    Ok(Self::SettleExactSvmTransactionConfirmationTimedOut)
39897                }
39898                _ => Err("invalid value".into()),
39899            }
39900        }
39901    }
39902    impl ::std::convert::TryFrom<&str> for X402SettleErrorReason {
39903        type Error = self::error::ConversionError;
39904        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
39905            value.parse()
39906        }
39907    }
39908    impl ::std::convert::TryFrom<&::std::string::String> for X402SettleErrorReason {
39909        type Error = self::error::ConversionError;
39910        fn try_from(
39911            value: &::std::string::String,
39912        ) -> ::std::result::Result<Self, self::error::ConversionError> {
39913            value.parse()
39914        }
39915    }
39916    impl ::std::convert::TryFrom<::std::string::String> for X402SettleErrorReason {
39917        type Error = self::error::ConversionError;
39918        fn try_from(
39919            value: ::std::string::String,
39920        ) -> ::std::result::Result<Self, self::error::ConversionError> {
39921            value.parse()
39922        }
39923    }
39924    ///The supported payment kind for the x402 protocol. A kind is comprised of a scheme and a network, which together uniquely identify a way to move money on the x402 protocol. For more details, please see [x402 Schemes](https://github.com/coinbase/x402?tab=readme-ov-file#schemes).
39925    ///
39926    /// <details><summary>JSON schema</summary>
39927    ///
39928    /// ```json
39929    ///{
39930    ///  "description": "The supported payment kind for the x402 protocol. A kind is comprised of a scheme and a network, which together uniquely identify a way to move money on the x402 protocol. For more details, please see [x402 Schemes](https://github.com/coinbase/x402?tab=readme-ov-file#schemes).",
39931    ///  "type": "object",
39932    ///  "required": [
39933    ///    "network",
39934    ///    "scheme",
39935    ///    "x402Version"
39936    ///  ],
39937    ///  "properties": {
39938    ///    "extra": {
39939    ///      "description": "The optional additional scheme-specific payment info.",
39940    ///      "examples": [
39941    ///        {
39942    ///          "feePayer": "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
39943    ///        }
39944    ///      ],
39945    ///      "type": "object",
39946    ///      "additionalProperties": true
39947    ///    },
39948    ///    "network": {
39949    ///      "description": "The network of the blockchain.",
39950    ///      "examples": [
39951    ///        "base"
39952    ///      ],
39953    ///      "type": "string"
39954    ///    },
39955    ///    "scheme": {
39956    ///      "description": "The scheme of the payment protocol.",
39957    ///      "examples": [
39958    ///        "exact"
39959    ///      ],
39960    ///      "type": "string",
39961    ///      "enum": [
39962    ///        "exact"
39963    ///      ]
39964    ///    },
39965    ///    "x402Version": {
39966    ///      "$ref": "#/components/schemas/X402Version"
39967    ///    }
39968    ///  }
39969    ///}
39970    /// ```
39971    /// </details>
39972    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
39973    pub struct X402SupportedPaymentKind {
39974        ///The optional additional scheme-specific payment info.
39975        #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
39976        pub extra: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
39977        ///The network of the blockchain.
39978        pub network: ::std::string::String,
39979        ///The scheme of the payment protocol.
39980        pub scheme: X402SupportedPaymentKindScheme,
39981        #[serde(rename = "x402Version")]
39982        pub x402_version: X402Version,
39983    }
39984    impl ::std::convert::From<&X402SupportedPaymentKind> for X402SupportedPaymentKind {
39985        fn from(value: &X402SupportedPaymentKind) -> Self {
39986            value.clone()
39987        }
39988    }
39989    impl X402SupportedPaymentKind {
39990        pub fn builder() -> builder::X402SupportedPaymentKind {
39991            Default::default()
39992        }
39993    }
39994    ///The network of the blockchain.
39995    ///
39996    /// <details><summary>JSON schema</summary>
39997    ///
39998    /// ```json
39999    ///{
40000    ///  "description": "The network of the blockchain.",
40001    ///  "examples": [
40002    ///    "base"
40003    ///  ],
40004    ///  "type": "string",
40005    ///  "enum": [
40006    ///    "base-sepolia",
40007    ///    "base",
40008    ///    "solana-devnet",
40009    ///    "solana"
40010    ///  ]
40011    ///}
40012    /// ```
40013    /// </details>
40014    #[derive(
40015        ::serde::Deserialize,
40016        ::serde::Serialize,
40017        Clone,
40018        Copy,
40019        Debug,
40020        Eq,
40021        Hash,
40022        Ord,
40023        PartialEq,
40024        PartialOrd,
40025    )]
40026    pub enum X402SupportedPaymentKindNetwork {
40027        #[serde(rename = "base-sepolia")]
40028        BaseSepolia,
40029        #[serde(rename = "base")]
40030        Base,
40031        #[serde(rename = "solana-devnet")]
40032        SolanaDevnet,
40033        #[serde(rename = "solana")]
40034        Solana,
40035    }
40036    impl ::std::convert::From<&Self> for X402SupportedPaymentKindNetwork {
40037        fn from(value: &X402SupportedPaymentKindNetwork) -> Self {
40038            value.clone()
40039        }
40040    }
40041    impl ::std::fmt::Display for X402SupportedPaymentKindNetwork {
40042        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40043            match *self {
40044                Self::BaseSepolia => f.write_str("base-sepolia"),
40045                Self::Base => f.write_str("base"),
40046                Self::SolanaDevnet => f.write_str("solana-devnet"),
40047                Self::Solana => f.write_str("solana"),
40048            }
40049        }
40050    }
40051    impl ::std::str::FromStr for X402SupportedPaymentKindNetwork {
40052        type Err = self::error::ConversionError;
40053        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40054            match value {
40055                "base-sepolia" => Ok(Self::BaseSepolia),
40056                "base" => Ok(Self::Base),
40057                "solana-devnet" => Ok(Self::SolanaDevnet),
40058                "solana" => Ok(Self::Solana),
40059                _ => Err("invalid value".into()),
40060            }
40061        }
40062    }
40063    impl ::std::convert::TryFrom<&str> for X402SupportedPaymentKindNetwork {
40064        type Error = self::error::ConversionError;
40065        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40066            value.parse()
40067        }
40068    }
40069    impl ::std::convert::TryFrom<&::std::string::String> for X402SupportedPaymentKindNetwork {
40070        type Error = self::error::ConversionError;
40071        fn try_from(
40072            value: &::std::string::String,
40073        ) -> ::std::result::Result<Self, self::error::ConversionError> {
40074            value.parse()
40075        }
40076    }
40077    impl ::std::convert::TryFrom<::std::string::String> for X402SupportedPaymentKindNetwork {
40078        type Error = self::error::ConversionError;
40079        fn try_from(
40080            value: ::std::string::String,
40081        ) -> ::std::result::Result<Self, self::error::ConversionError> {
40082            value.parse()
40083        }
40084    }
40085    ///The scheme of the payment protocol.
40086    ///
40087    /// <details><summary>JSON schema</summary>
40088    ///
40089    /// ```json
40090    ///{
40091    ///  "description": "The scheme of the payment protocol.",
40092    ///  "examples": [
40093    ///    "exact"
40094    ///  ],
40095    ///  "type": "string",
40096    ///  "enum": [
40097    ///    "exact"
40098    ///  ]
40099    ///}
40100    /// ```
40101    /// </details>
40102    #[derive(
40103        ::serde::Deserialize,
40104        ::serde::Serialize,
40105        Clone,
40106        Copy,
40107        Debug,
40108        Eq,
40109        Hash,
40110        Ord,
40111        PartialEq,
40112        PartialOrd,
40113    )]
40114    pub enum X402SupportedPaymentKindScheme {
40115        #[serde(rename = "exact")]
40116        Exact,
40117    }
40118    impl ::std::convert::From<&Self> for X402SupportedPaymentKindScheme {
40119        fn from(value: &X402SupportedPaymentKindScheme) -> Self {
40120            value.clone()
40121        }
40122    }
40123    impl ::std::fmt::Display for X402SupportedPaymentKindScheme {
40124        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40125            match *self {
40126                Self::Exact => f.write_str("exact"),
40127            }
40128        }
40129    }
40130    impl ::std::str::FromStr for X402SupportedPaymentKindScheme {
40131        type Err = self::error::ConversionError;
40132        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40133            match value {
40134                "exact" => Ok(Self::Exact),
40135                _ => Err("invalid value".into()),
40136            }
40137        }
40138    }
40139    impl ::std::convert::TryFrom<&str> for X402SupportedPaymentKindScheme {
40140        type Error = self::error::ConversionError;
40141        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40142            value.parse()
40143        }
40144    }
40145    impl ::std::convert::TryFrom<&::std::string::String> for X402SupportedPaymentKindScheme {
40146        type Error = self::error::ConversionError;
40147        fn try_from(
40148            value: &::std::string::String,
40149        ) -> ::std::result::Result<Self, self::error::ConversionError> {
40150            value.parse()
40151        }
40152    }
40153    impl ::std::convert::TryFrom<::std::string::String> for X402SupportedPaymentKindScheme {
40154        type Error = self::error::ConversionError;
40155        fn try_from(
40156            value: ::std::string::String,
40157        ) -> ::std::result::Result<Self, self::error::ConversionError> {
40158            value.parse()
40159        }
40160    }
40161    ///The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
40162    ///
40163    /// <details><summary>JSON schema</summary>
40164    ///
40165    /// ```json
40166    ///{
40167    ///  "description": "The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.",
40168    ///  "examples": [
40169    ///    {
40170    ///      "network": "base",
40171    ///      "payload": {
40172    ///        "authorization": {
40173    ///          "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
40174    ///          "nonce": "0x1234567890abcdef1234567890abcdef12345678",
40175    ///          "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
40176    ///          "validAfter": "1716150000",
40177    ///          "validBefore": "1716150000",
40178    ///          "value": "1000000000000000000"
40179    ///        },
40180    ///        "signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480"
40181    ///      },
40182    ///      "scheme": "exact",
40183    ///      "x402Version": 1
40184    ///    }
40185    ///  ],
40186    ///  "type": "object",
40187    ///  "required": [
40188    ///    "network",
40189    ///    "payload",
40190    ///    "scheme",
40191    ///    "x402Version"
40192    ///  ],
40193    ///  "properties": {
40194    ///    "network": {
40195    ///      "description": "The network of the blockchain to send payment on.",
40196    ///      "examples": [
40197    ///        "base"
40198    ///      ],
40199    ///      "type": "string",
40200    ///      "enum": [
40201    ///        "base-sepolia",
40202    ///        "base",
40203    ///        "solana-devnet",
40204    ///        "solana"
40205    ///      ]
40206    ///    },
40207    ///    "payload": {
40208    ///      "description": "The payload of the payment depending on the x402Version, scheme, and network.",
40209    ///      "examples": [
40210    ///        {
40211    ///          "authorization": {
40212    ///            "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
40213    ///            "nonce": "0x1234567890abcdef1234567890abcdef12345678",
40214    ///            "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
40215    ///            "validAfter": "1716150000",
40216    ///            "validBefore": "1716150000",
40217    ///            "value": "1000000000000000000"
40218    ///          },
40219    ///          "signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480"
40220    ///        }
40221    ///      ],
40222    ///      "type": "object",
40223    ///      "oneOf": [
40224    ///        {
40225    ///          "$ref": "#/components/schemas/x402ExactEvmPayload"
40226    ///        },
40227    ///        {
40228    ///          "$ref": "#/components/schemas/x402ExactSolanaPayload"
40229    ///        }
40230    ///      ]
40231    ///    },
40232    ///    "scheme": {
40233    ///      "description": "The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.",
40234    ///      "examples": [
40235    ///        "exact"
40236    ///      ],
40237    ///      "type": "string",
40238    ///      "enum": [
40239    ///        "exact"
40240    ///      ]
40241    ///    },
40242    ///    "x402Version": {
40243    ///      "$ref": "#/components/schemas/X402Version"
40244    ///    }
40245    ///  }
40246    ///}
40247    /// ```
40248    /// </details>
40249    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40250    pub struct X402V1PaymentPayload {
40251        ///The network of the blockchain to send payment on.
40252        pub network: X402v1PaymentPayloadNetwork,
40253        ///The payload of the payment depending on the x402Version, scheme, and network.
40254        pub payload: X402v1PaymentPayloadPayload,
40255        ///The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
40256        pub scheme: X402v1PaymentPayloadScheme,
40257        #[serde(rename = "x402Version")]
40258        pub x402_version: X402Version,
40259    }
40260    impl ::std::convert::From<&X402V1PaymentPayload> for X402V1PaymentPayload {
40261        fn from(value: &X402V1PaymentPayload) -> Self {
40262            value.clone()
40263        }
40264    }
40265    impl X402V1PaymentPayload {
40266        pub fn builder() -> builder::X402V1PaymentPayload {
40267            Default::default()
40268        }
40269    }
40270    ///The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
40271    ///
40272    /// <details><summary>JSON schema</summary>
40273    ///
40274    /// ```json
40275    ///{
40276    ///  "description": "The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.",
40277    ///  "type": "object",
40278    ///  "required": [
40279    ///    "asset",
40280    ///    "description",
40281    ///    "maxAmountRequired",
40282    ///    "maxTimeoutSeconds",
40283    ///    "mimeType",
40284    ///    "network",
40285    ///    "payTo",
40286    ///    "resource",
40287    ///    "scheme"
40288    ///  ],
40289    ///  "properties": {
40290    ///    "asset": {
40291    ///      "description": "The asset to pay with.\n\nFor EVM networks, the asset will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the asset will be a base58-encoded Solana address.",
40292    ///      "examples": [
40293    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
40294    ///      ],
40295    ///      "type": "string",
40296    ///      "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
40297    ///    },
40298    ///    "description": {
40299    ///      "description": "The description of the resource.",
40300    ///      "examples": [
40301    ///        "Premium API access for data analysis"
40302    ///      ],
40303    ///      "type": "string"
40304    ///    },
40305    ///    "extra": {
40306    ///      "description": "The optional additional scheme-specific payment info.",
40307    ///      "examples": [
40308    ///        {
40309    ///          "gasLimit": "1000000"
40310    ///        }
40311    ///      ],
40312    ///      "type": "object",
40313    ///      "additionalProperties": true
40314    ///    },
40315    ///    "maxAmountRequired": {
40316    ///      "description": "The maximum amount required to pay for the resource in atomic units of the payment asset.",
40317    ///      "examples": [
40318    ///        "1000000"
40319    ///      ],
40320    ///      "type": "string"
40321    ///    },
40322    ///    "maxTimeoutSeconds": {
40323    ///      "description": "The maximum time in seconds for the resource server to respond.",
40324    ///      "examples": [
40325    ///        10
40326    ///      ],
40327    ///      "type": "integer"
40328    ///    },
40329    ///    "mimeType": {
40330    ///      "description": "The MIME type of the resource response.",
40331    ///      "examples": [
40332    ///        "application/json"
40333    ///      ],
40334    ///      "type": "string"
40335    ///    },
40336    ///    "network": {
40337    ///      "description": "The network of the blockchain to send payment on.",
40338    ///      "examples": [
40339    ///        "base"
40340    ///      ],
40341    ///      "type": "string",
40342    ///      "enum": [
40343    ///        "base-sepolia",
40344    ///        "base",
40345    ///        "solana-devnet",
40346    ///        "solana"
40347    ///      ]
40348    ///    },
40349    ///    "outputSchema": {
40350    ///      "description": "The optional JSON schema describing the resource output.",
40351    ///      "examples": [
40352    ///        {
40353    ///          "data": "string"
40354    ///        }
40355    ///      ],
40356    ///      "type": "object",
40357    ///      "additionalProperties": true
40358    ///    },
40359    ///    "payTo": {
40360    ///      "description": "The destination to pay value to.\n\nFor EVM networks, payTo will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, payTo will be a base58-encoded Solana address.",
40361    ///      "examples": [
40362    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
40363    ///      ],
40364    ///      "type": "string",
40365    ///      "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
40366    ///    },
40367    ///    "resource": {
40368    ///      "description": "The URL of the resource to pay for.",
40369    ///      "examples": [
40370    ///        "https://api.example.com/premium/resource/123"
40371    ///      ],
40372    ///      "type": "string"
40373    ///    },
40374    ///    "scheme": {
40375    ///      "description": "The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.",
40376    ///      "examples": [
40377    ///        "exact"
40378    ///      ],
40379    ///      "type": "string",
40380    ///      "enum": [
40381    ///        "exact"
40382    ///      ]
40383    ///    }
40384    ///  }
40385    ///}
40386    /// ```
40387    /// </details>
40388    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40389    pub struct X402V1PaymentRequirements {
40390        /**The asset to pay with.
40391
40392        For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
40393
40394        For Solana-based networks, the asset will be a base58-encoded Solana address.*/
40395        pub asset: X402v1PaymentRequirementsAsset,
40396        ///The description of the resource.
40397        pub description: ::std::string::String,
40398        ///The optional additional scheme-specific payment info.
40399        #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
40400        pub extra: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
40401        ///The maximum amount required to pay for the resource in atomic units of the payment asset.
40402        #[serde(rename = "maxAmountRequired")]
40403        pub max_amount_required: ::std::string::String,
40404        ///The maximum time in seconds for the resource server to respond.
40405        #[serde(rename = "maxTimeoutSeconds")]
40406        pub max_timeout_seconds: i64,
40407        ///The MIME type of the resource response.
40408        #[serde(rename = "mimeType")]
40409        pub mime_type: ::std::string::String,
40410        ///The network of the blockchain to send payment on.
40411        pub network: X402v1PaymentRequirementsNetwork,
40412        ///The optional JSON schema describing the resource output.
40413        #[serde(
40414            rename = "outputSchema",
40415            default,
40416            skip_serializing_if = "::serde_json::Map::is_empty"
40417        )]
40418        pub output_schema: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
40419        /**The destination to pay value to.
40420
40421        For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
40422
40423        For Solana-based networks, payTo will be a base58-encoded Solana address.*/
40424        #[serde(rename = "payTo")]
40425        pub pay_to: X402v1PaymentRequirementsPayTo,
40426        ///The URL of the resource to pay for.
40427        pub resource: ::std::string::String,
40428        ///The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
40429        pub scheme: X402v1PaymentRequirementsScheme,
40430    }
40431    impl ::std::convert::From<&X402V1PaymentRequirements> for X402V1PaymentRequirements {
40432        fn from(value: &X402V1PaymentRequirements) -> Self {
40433            value.clone()
40434        }
40435    }
40436    impl X402V1PaymentRequirements {
40437        pub fn builder() -> builder::X402V1PaymentRequirements {
40438            Default::default()
40439        }
40440    }
40441    ///The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
40442    ///
40443    /// <details><summary>JSON schema</summary>
40444    ///
40445    /// ```json
40446    ///{
40447    ///  "description": "The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.",
40448    ///  "examples": [
40449    ///    {
40450    ///      "accepted": {
40451    ///        "amount": "1000",
40452    ///        "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
40453    ///        "extra": {
40454    ///          "name": "USDC",
40455    ///          "version": "2"
40456    ///        },
40457    ///        "maxTimeoutSeconds": 60,
40458    ///        "network": "eip155:84532",
40459    ///        "payTo": "0x122F8Fcaf2152420445Aa424E1D8C0306935B5c9",
40460    ///        "scheme": "exact"
40461    ///      },
40462    ///      "payload": {
40463    ///        "authorization": {
40464    ///          "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
40465    ///          "nonce": "0x1234567890abcdef1234567890abcdef12345678",
40466    ///          "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
40467    ///          "validAfter": "1716150000",
40468    ///          "validBefore": "1716150000",
40469    ///          "value": "1000000000000000000"
40470    ///        },
40471    ///        "signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480"
40472    ///      },
40473    ///      "resource": {
40474    ///        "description": "Premium API access for data analysis.",
40475    ///        "mimeType": "application/json",
40476    ///        "url": "https://api.example.com/premium/resource/123"
40477    ///      },
40478    ///      "x402Version": 2
40479    ///    }
40480    ///  ],
40481    ///  "type": "object",
40482    ///  "required": [
40483    ///    "accepted",
40484    ///    "payload",
40485    ///    "x402Version"
40486    ///  ],
40487    ///  "properties": {
40488    ///    "accepted": {
40489    ///      "$ref": "#/components/schemas/x402V2PaymentRequirements"
40490    ///    },
40491    ///    "extensions": {
40492    ///      "description": "Optional protocol extensions.",
40493    ///      "examples": [
40494    ///        {
40495    ///          "bazaar": {
40496    ///            "discoveryEnabled": true
40497    ///          }
40498    ///        }
40499    ///      ],
40500    ///      "type": "object",
40501    ///      "additionalProperties": true
40502    ///    },
40503    ///    "payload": {
40504    ///      "description": "The payload of the payment depending on the x402Version, scheme, and network.",
40505    ///      "examples": [
40506    ///        {
40507    ///          "authorization": {
40508    ///            "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
40509    ///            "nonce": "0x1234567890abcdef1234567890abcdef12345678",
40510    ///            "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
40511    ///            "validAfter": "1716150000",
40512    ///            "validBefore": "1716150000",
40513    ///            "value": "1000000000000000000"
40514    ///          },
40515    ///          "signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480"
40516    ///        }
40517    ///      ],
40518    ///      "type": "object",
40519    ///      "oneOf": [
40520    ///        {
40521    ///          "$ref": "#/components/schemas/x402ExactEvmPayload"
40522    ///        },
40523    ///        {
40524    ///          "$ref": "#/components/schemas/x402ExactSolanaPayload"
40525    ///        }
40526    ///      ]
40527    ///    },
40528    ///    "resource": {
40529    ///      "$ref": "#/components/schemas/x402ResourceInfo"
40530    ///    },
40531    ///    "x402Version": {
40532    ///      "$ref": "#/components/schemas/X402Version"
40533    ///    }
40534    ///  }
40535    ///}
40536    /// ```
40537    /// </details>
40538    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40539    pub struct X402V2PaymentPayload {
40540        pub accepted: X402V2PaymentRequirements,
40541        ///Optional protocol extensions.
40542        #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
40543        pub extensions: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
40544        ///The payload of the payment depending on the x402Version, scheme, and network.
40545        pub payload: X402v2PaymentPayloadPayload,
40546        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
40547        pub resource: ::std::option::Option<X402ResourceInfo>,
40548        #[serde(rename = "x402Version")]
40549        pub x402_version: X402Version,
40550    }
40551    impl ::std::convert::From<&X402V2PaymentPayload> for X402V2PaymentPayload {
40552        fn from(value: &X402V2PaymentPayload) -> Self {
40553            value.clone()
40554        }
40555    }
40556    impl X402V2PaymentPayload {
40557        pub fn builder() -> builder::X402V2PaymentPayload {
40558            Default::default()
40559        }
40560    }
40561    ///The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
40562    ///
40563    /// <details><summary>JSON schema</summary>
40564    ///
40565    /// ```json
40566    ///{
40567    ///  "description": "The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.",
40568    ///  "type": "object",
40569    ///  "required": [
40570    ///    "amount",
40571    ///    "asset",
40572    ///    "maxTimeoutSeconds",
40573    ///    "network",
40574    ///    "payTo",
40575    ///    "scheme"
40576    ///  ],
40577    ///  "properties": {
40578    ///    "amount": {
40579    ///      "description": "The amount to pay for the resource in atomic units of the payment asset.",
40580    ///      "examples": [
40581    ///        "1000000"
40582    ///      ],
40583    ///      "type": "string"
40584    ///    },
40585    ///    "asset": {
40586    ///      "description": "The asset to pay with.\n\nFor EVM networks, the asset will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the asset will be a base58-encoded Solana address.",
40587    ///      "examples": [
40588    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
40589    ///      ],
40590    ///      "type": "string",
40591    ///      "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
40592    ///    },
40593    ///    "extra": {
40594    ///      "description": "The optional additional scheme-specific payment info.",
40595    ///      "examples": [
40596    ///        {
40597    ///          "name": "USDC",
40598    ///          "version": "2"
40599    ///        }
40600    ///      ],
40601    ///      "type": "object",
40602    ///      "additionalProperties": true
40603    ///    },
40604    ///    "maxTimeoutSeconds": {
40605    ///      "description": "The maximum time in seconds for the resource server to respond.",
40606    ///      "examples": [
40607    ///        10
40608    ///      ],
40609    ///      "type": "integer"
40610    ///    },
40611    ///    "network": {
40612    ///      "description": "The network of the blockchain to send payment on in caip2 format.",
40613    ///      "examples": [
40614    ///        "eip155:1"
40615    ///      ],
40616    ///      "type": "string"
40617    ///    },
40618    ///    "payTo": {
40619    ///      "description": "The destination to pay value to.\n\nFor EVM networks, payTo will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, payTo will be a base58-encoded Solana address.",
40620    ///      "examples": [
40621    ///        "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
40622    ///      ],
40623    ///      "type": "string",
40624    ///      "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
40625    ///    },
40626    ///    "scheme": {
40627    ///      "description": "The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.",
40628    ///      "examples": [
40629    ///        "exact"
40630    ///      ],
40631    ///      "type": "string",
40632    ///      "enum": [
40633    ///        "exact"
40634    ///      ]
40635    ///    }
40636    ///  }
40637    ///}
40638    /// ```
40639    /// </details>
40640    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
40641    pub struct X402V2PaymentRequirements {
40642        ///The amount to pay for the resource in atomic units of the payment asset.
40643        pub amount: ::std::string::String,
40644        /**The asset to pay with.
40645
40646        For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
40647
40648        For Solana-based networks, the asset will be a base58-encoded Solana address.*/
40649        pub asset: X402v2PaymentRequirementsAsset,
40650        ///The optional additional scheme-specific payment info.
40651        #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
40652        pub extra: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
40653        ///The maximum time in seconds for the resource server to respond.
40654        #[serde(rename = "maxTimeoutSeconds")]
40655        pub max_timeout_seconds: i64,
40656        ///The network of the blockchain to send payment on in caip2 format.
40657        pub network: ::std::string::String,
40658        /**The destination to pay value to.
40659
40660        For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
40661
40662        For Solana-based networks, payTo will be a base58-encoded Solana address.*/
40663        #[serde(rename = "payTo")]
40664        pub pay_to: X402v2PaymentRequirementsPayTo,
40665        ///The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
40666        pub scheme: X402v2PaymentRequirementsScheme,
40667    }
40668    impl ::std::convert::From<&X402V2PaymentRequirements> for X402V2PaymentRequirements {
40669        fn from(value: &X402V2PaymentRequirements) -> Self {
40670            value.clone()
40671        }
40672    }
40673    impl X402V2PaymentRequirements {
40674        pub fn builder() -> builder::X402V2PaymentRequirements {
40675            Default::default()
40676        }
40677    }
40678    ///The reason the payment is invalid on the x402 protocol.
40679    ///
40680    /// <details><summary>JSON schema</summary>
40681    ///
40682    /// ```json
40683    ///{
40684    ///  "description": "The reason the payment is invalid on the x402 protocol.",
40685    ///  "examples": [
40686    ///    "insufficient_funds"
40687    ///  ],
40688    ///  "type": "string",
40689    ///  "enum": [
40690    ///    "insufficient_funds",
40691    ///    "invalid_scheme",
40692    ///    "invalid_network",
40693    ///    "invalid_x402_version",
40694    ///    "invalid_payment_requirements",
40695    ///    "invalid_payload",
40696    ///    "invalid_exact_evm_payload_authorization_value",
40697    ///    "invalid_exact_evm_payload_authorization_value_too_low",
40698    ///    "invalid_exact_evm_payload_authorization_valid_after",
40699    ///    "invalid_exact_evm_payload_authorization_valid_before",
40700    ///    "invalid_exact_evm_payload_authorization_typed_data_message",
40701    ///    "invalid_exact_evm_payload_authorization_from_address_kyt",
40702    ///    "invalid_exact_evm_payload_authorization_to_address_kyt",
40703    ///    "invalid_exact_evm_payload_signature",
40704    ///    "invalid_exact_evm_payload_signature_address",
40705    ///    "invalid_exact_svm_payload_transaction",
40706    ///    "invalid_exact_svm_payload_transaction_amount_mismatch",
40707    ///    "invalid_exact_svm_payload_transaction_create_ata_instruction",
40708    ///    "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee",
40709    ///    "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset",
40710    ///    "invalid_exact_svm_payload_transaction_instructions",
40711    ///    "invalid_exact_svm_payload_transaction_instructions_length",
40712    ///    "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction",
40713    ///    "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction",
40714    ///    "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high",
40715    ///    "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked",
40716    ///    "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked",
40717    ///    "invalid_exact_svm_payload_transaction_not_a_transfer_instruction",
40718    ///    "invalid_exact_svm_payload_transaction_cannot_derive_receiver_ata",
40719    ///    "invalid_exact_svm_payload_transaction_receiver_ata_not_found",
40720    ///    "invalid_exact_svm_payload_transaction_sender_ata_not_found",
40721    ///    "invalid_exact_svm_payload_transaction_simulation_failed",
40722    ///    "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata",
40723    ///    "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts",
40724    ///    "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds"
40725    ///  ]
40726    ///}
40727    /// ```
40728    /// </details>
40729    #[derive(
40730        ::serde::Deserialize,
40731        ::serde::Serialize,
40732        Clone,
40733        Copy,
40734        Debug,
40735        Eq,
40736        Hash,
40737        Ord,
40738        PartialEq,
40739        PartialOrd,
40740    )]
40741    pub enum X402VerifyInvalidReason {
40742        #[serde(rename = "insufficient_funds")]
40743        InsufficientFunds,
40744        #[serde(rename = "invalid_scheme")]
40745        InvalidScheme,
40746        #[serde(rename = "invalid_network")]
40747        InvalidNetwork,
40748        #[serde(rename = "invalid_x402_version")]
40749        InvalidX402Version,
40750        #[serde(rename = "invalid_payment_requirements")]
40751        InvalidPaymentRequirements,
40752        #[serde(rename = "invalid_payload")]
40753        InvalidPayload,
40754        #[serde(rename = "invalid_exact_evm_payload_authorization_value")]
40755        InvalidExactEvmPayloadAuthorizationValue,
40756        #[serde(rename = "invalid_exact_evm_payload_authorization_value_too_low")]
40757        InvalidExactEvmPayloadAuthorizationValueTooLow,
40758        #[serde(rename = "invalid_exact_evm_payload_authorization_valid_after")]
40759        InvalidExactEvmPayloadAuthorizationValidAfter,
40760        #[serde(rename = "invalid_exact_evm_payload_authorization_valid_before")]
40761        InvalidExactEvmPayloadAuthorizationValidBefore,
40762        #[serde(rename = "invalid_exact_evm_payload_authorization_typed_data_message")]
40763        InvalidExactEvmPayloadAuthorizationTypedDataMessage,
40764        #[serde(rename = "invalid_exact_evm_payload_authorization_from_address_kyt")]
40765        InvalidExactEvmPayloadAuthorizationFromAddressKyt,
40766        #[serde(rename = "invalid_exact_evm_payload_authorization_to_address_kyt")]
40767        InvalidExactEvmPayloadAuthorizationToAddressKyt,
40768        #[serde(rename = "invalid_exact_evm_payload_signature")]
40769        InvalidExactEvmPayloadSignature,
40770        #[serde(rename = "invalid_exact_evm_payload_signature_address")]
40771        InvalidExactEvmPayloadSignatureAddress,
40772        #[serde(rename = "invalid_exact_svm_payload_transaction")]
40773        InvalidExactSvmPayloadTransaction,
40774        #[serde(rename = "invalid_exact_svm_payload_transaction_amount_mismatch")]
40775        InvalidExactSvmPayloadTransactionAmountMismatch,
40776        #[serde(rename = "invalid_exact_svm_payload_transaction_create_ata_instruction")]
40777        InvalidExactSvmPayloadTransactionCreateAtaInstruction,
40778        #[serde(
40779            rename = "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee"
40780        )]
40781        InvalidExactSvmPayloadTransactionCreateAtaInstructionIncorrectPayee,
40782        #[serde(
40783            rename = "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset"
40784        )]
40785        InvalidExactSvmPayloadTransactionCreateAtaInstructionIncorrectAsset,
40786        #[serde(rename = "invalid_exact_svm_payload_transaction_instructions")]
40787        InvalidExactSvmPayloadTransactionInstructions,
40788        #[serde(rename = "invalid_exact_svm_payload_transaction_instructions_length")]
40789        InvalidExactSvmPayloadTransactionInstructionsLength,
40790        #[serde(
40791            rename = "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction"
40792        )]
40793        InvalidExactSvmPayloadTransactionInstructionsComputeLimitInstruction,
40794        #[serde(
40795            rename = "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction"
40796        )]
40797        InvalidExactSvmPayloadTransactionInstructionsComputePriceInstruction,
40798        #[serde(
40799            rename = "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high"
40800        )]
40801        InvalidExactSvmPayloadTransactionInstructionsComputePriceInstructionTooHigh,
40802        #[serde(
40803            rename = "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked"
40804        )]
40805        InvalidExactSvmPayloadTransactionInstructionNotSplTokenTransferChecked,
40806        #[serde(
40807            rename = "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked"
40808        )]
40809        InvalidExactSvmPayloadTransactionInstructionNotToken2022TransferChecked,
40810        #[serde(rename = "invalid_exact_svm_payload_transaction_not_a_transfer_instruction")]
40811        InvalidExactSvmPayloadTransactionNotATransferInstruction,
40812        #[serde(rename = "invalid_exact_svm_payload_transaction_cannot_derive_receiver_ata")]
40813        InvalidExactSvmPayloadTransactionCannotDeriveReceiverAta,
40814        #[serde(rename = "invalid_exact_svm_payload_transaction_receiver_ata_not_found")]
40815        InvalidExactSvmPayloadTransactionReceiverAtaNotFound,
40816        #[serde(rename = "invalid_exact_svm_payload_transaction_sender_ata_not_found")]
40817        InvalidExactSvmPayloadTransactionSenderAtaNotFound,
40818        #[serde(rename = "invalid_exact_svm_payload_transaction_simulation_failed")]
40819        InvalidExactSvmPayloadTransactionSimulationFailed,
40820        #[serde(rename = "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata")]
40821        InvalidExactSvmPayloadTransactionTransferToIncorrectAta,
40822        #[serde(
40823            rename = "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts"
40824        )]
40825        InvalidExactSvmPayloadTransactionFeePayerIncludedInInstructionAccounts,
40826        #[serde(rename = "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds")]
40827        InvalidExactSvmPayloadTransactionFeePayerTransferringFunds,
40828    }
40829    impl ::std::convert::From<&Self> for X402VerifyInvalidReason {
40830        fn from(value: &X402VerifyInvalidReason) -> Self {
40831            value.clone()
40832        }
40833    }
40834    impl ::std::fmt::Display for X402VerifyInvalidReason {
40835        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40836            match *self {
40837                Self::InsufficientFunds => f.write_str("insufficient_funds"),
40838                Self::InvalidScheme => f.write_str("invalid_scheme"),
40839                Self::InvalidNetwork => f.write_str("invalid_network"),
40840                Self::InvalidX402Version => f.write_str("invalid_x402_version"),
40841                Self::InvalidPaymentRequirements => {
40842                    f.write_str("invalid_payment_requirements")
40843                }
40844                Self::InvalidPayload => f.write_str("invalid_payload"),
40845                Self::InvalidExactEvmPayloadAuthorizationValue => {
40846                    f.write_str("invalid_exact_evm_payload_authorization_value")
40847                }
40848                Self::InvalidExactEvmPayloadAuthorizationValueTooLow => {
40849                    f.write_str("invalid_exact_evm_payload_authorization_value_too_low")
40850                }
40851                Self::InvalidExactEvmPayloadAuthorizationValidAfter => {
40852                    f.write_str("invalid_exact_evm_payload_authorization_valid_after")
40853                }
40854                Self::InvalidExactEvmPayloadAuthorizationValidBefore => {
40855                    f.write_str("invalid_exact_evm_payload_authorization_valid_before")
40856                }
40857                Self::InvalidExactEvmPayloadAuthorizationTypedDataMessage => {
40858                    f.write_str(
40859                        "invalid_exact_evm_payload_authorization_typed_data_message",
40860                    )
40861                }
40862                Self::InvalidExactEvmPayloadAuthorizationFromAddressKyt => {
40863                    f.write_str(
40864                        "invalid_exact_evm_payload_authorization_from_address_kyt",
40865                    )
40866                }
40867                Self::InvalidExactEvmPayloadAuthorizationToAddressKyt => {
40868                    f.write_str("invalid_exact_evm_payload_authorization_to_address_kyt")
40869                }
40870                Self::InvalidExactEvmPayloadSignature => {
40871                    f.write_str("invalid_exact_evm_payload_signature")
40872                }
40873                Self::InvalidExactEvmPayloadSignatureAddress => {
40874                    f.write_str("invalid_exact_evm_payload_signature_address")
40875                }
40876                Self::InvalidExactSvmPayloadTransaction => {
40877                    f.write_str("invalid_exact_svm_payload_transaction")
40878                }
40879                Self::InvalidExactSvmPayloadTransactionAmountMismatch => {
40880                    f.write_str("invalid_exact_svm_payload_transaction_amount_mismatch")
40881                }
40882                Self::InvalidExactSvmPayloadTransactionCreateAtaInstruction => {
40883                    f.write_str(
40884                        "invalid_exact_svm_payload_transaction_create_ata_instruction",
40885                    )
40886                }
40887                Self::InvalidExactSvmPayloadTransactionCreateAtaInstructionIncorrectPayee => {
40888                    f.write_str(
40889                        "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee",
40890                    )
40891                }
40892                Self::InvalidExactSvmPayloadTransactionCreateAtaInstructionIncorrectAsset => {
40893                    f.write_str(
40894                        "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset",
40895                    )
40896                }
40897                Self::InvalidExactSvmPayloadTransactionInstructions => {
40898                    f.write_str("invalid_exact_svm_payload_transaction_instructions")
40899                }
40900                Self::InvalidExactSvmPayloadTransactionInstructionsLength => {
40901                    f.write_str(
40902                        "invalid_exact_svm_payload_transaction_instructions_length",
40903                    )
40904                }
40905                Self::InvalidExactSvmPayloadTransactionInstructionsComputeLimitInstruction => {
40906                    f.write_str(
40907                        "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction",
40908                    )
40909                }
40910                Self::InvalidExactSvmPayloadTransactionInstructionsComputePriceInstruction => {
40911                    f.write_str(
40912                        "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction",
40913                    )
40914                }
40915                Self::InvalidExactSvmPayloadTransactionInstructionsComputePriceInstructionTooHigh => {
40916                    f.write_str(
40917                        "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high",
40918                    )
40919                }
40920                Self::InvalidExactSvmPayloadTransactionInstructionNotSplTokenTransferChecked => {
40921                    f.write_str(
40922                        "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked",
40923                    )
40924                }
40925                Self::InvalidExactSvmPayloadTransactionInstructionNotToken2022TransferChecked => {
40926                    f.write_str(
40927                        "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked",
40928                    )
40929                }
40930                Self::InvalidExactSvmPayloadTransactionNotATransferInstruction => {
40931                    f.write_str(
40932                        "invalid_exact_svm_payload_transaction_not_a_transfer_instruction",
40933                    )
40934                }
40935                Self::InvalidExactSvmPayloadTransactionCannotDeriveReceiverAta => {
40936                    f.write_str(
40937                        "invalid_exact_svm_payload_transaction_cannot_derive_receiver_ata",
40938                    )
40939                }
40940                Self::InvalidExactSvmPayloadTransactionReceiverAtaNotFound => {
40941                    f.write_str(
40942                        "invalid_exact_svm_payload_transaction_receiver_ata_not_found",
40943                    )
40944                }
40945                Self::InvalidExactSvmPayloadTransactionSenderAtaNotFound => {
40946                    f.write_str(
40947                        "invalid_exact_svm_payload_transaction_sender_ata_not_found",
40948                    )
40949                }
40950                Self::InvalidExactSvmPayloadTransactionSimulationFailed => {
40951                    f.write_str(
40952                        "invalid_exact_svm_payload_transaction_simulation_failed",
40953                    )
40954                }
40955                Self::InvalidExactSvmPayloadTransactionTransferToIncorrectAta => {
40956                    f.write_str(
40957                        "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata",
40958                    )
40959                }
40960                Self::InvalidExactSvmPayloadTransactionFeePayerIncludedInInstructionAccounts => {
40961                    f.write_str(
40962                        "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts",
40963                    )
40964                }
40965                Self::InvalidExactSvmPayloadTransactionFeePayerTransferringFunds => {
40966                    f.write_str(
40967                        "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds",
40968                    )
40969                }
40970            }
40971        }
40972    }
40973    impl ::std::str::FromStr for X402VerifyInvalidReason {
40974        type Err = self::error::ConversionError;
40975        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
40976            match value {
40977                "insufficient_funds" => Ok(Self::InsufficientFunds),
40978                "invalid_scheme" => Ok(Self::InvalidScheme),
40979                "invalid_network" => Ok(Self::InvalidNetwork),
40980                "invalid_x402_version" => Ok(Self::InvalidX402Version),
40981                "invalid_payment_requirements" => Ok(Self::InvalidPaymentRequirements),
40982                "invalid_payload" => Ok(Self::InvalidPayload),
40983                "invalid_exact_evm_payload_authorization_value" => {
40984                    Ok(Self::InvalidExactEvmPayloadAuthorizationValue)
40985                }
40986                "invalid_exact_evm_payload_authorization_value_too_low" => {
40987                    Ok(Self::InvalidExactEvmPayloadAuthorizationValueTooLow)
40988                }
40989                "invalid_exact_evm_payload_authorization_valid_after" => {
40990                    Ok(Self::InvalidExactEvmPayloadAuthorizationValidAfter)
40991                }
40992                "invalid_exact_evm_payload_authorization_valid_before" => {
40993                    Ok(Self::InvalidExactEvmPayloadAuthorizationValidBefore)
40994                }
40995                "invalid_exact_evm_payload_authorization_typed_data_message" => {
40996                    Ok(Self::InvalidExactEvmPayloadAuthorizationTypedDataMessage)
40997                }
40998                "invalid_exact_evm_payload_authorization_from_address_kyt" => {
40999                    Ok(Self::InvalidExactEvmPayloadAuthorizationFromAddressKyt)
41000                }
41001                "invalid_exact_evm_payload_authorization_to_address_kyt" => {
41002                    Ok(Self::InvalidExactEvmPayloadAuthorizationToAddressKyt)
41003                }
41004                "invalid_exact_evm_payload_signature" => {
41005                    Ok(Self::InvalidExactEvmPayloadSignature)
41006                }
41007                "invalid_exact_evm_payload_signature_address" => {
41008                    Ok(Self::InvalidExactEvmPayloadSignatureAddress)
41009                }
41010                "invalid_exact_svm_payload_transaction" => {
41011                    Ok(Self::InvalidExactSvmPayloadTransaction)
41012                }
41013                "invalid_exact_svm_payload_transaction_amount_mismatch" => {
41014                    Ok(Self::InvalidExactSvmPayloadTransactionAmountMismatch)
41015                }
41016                "invalid_exact_svm_payload_transaction_create_ata_instruction" => {
41017                    Ok(Self::InvalidExactSvmPayloadTransactionCreateAtaInstruction)
41018                }
41019                "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee" => {
41020                    Ok(
41021                        Self::InvalidExactSvmPayloadTransactionCreateAtaInstructionIncorrectPayee,
41022                    )
41023                }
41024                "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset" => {
41025                    Ok(
41026                        Self::InvalidExactSvmPayloadTransactionCreateAtaInstructionIncorrectAsset,
41027                    )
41028                }
41029                "invalid_exact_svm_payload_transaction_instructions" => {
41030                    Ok(Self::InvalidExactSvmPayloadTransactionInstructions)
41031                }
41032                "invalid_exact_svm_payload_transaction_instructions_length" => {
41033                    Ok(Self::InvalidExactSvmPayloadTransactionInstructionsLength)
41034                }
41035                "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction" => {
41036                    Ok(
41037                        Self::InvalidExactSvmPayloadTransactionInstructionsComputeLimitInstruction,
41038                    )
41039                }
41040                "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction" => {
41041                    Ok(
41042                        Self::InvalidExactSvmPayloadTransactionInstructionsComputePriceInstruction,
41043                    )
41044                }
41045                "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high" => {
41046                    Ok(
41047                        Self::InvalidExactSvmPayloadTransactionInstructionsComputePriceInstructionTooHigh,
41048                    )
41049                }
41050                "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked" => {
41051                    Ok(
41052                        Self::InvalidExactSvmPayloadTransactionInstructionNotSplTokenTransferChecked,
41053                    )
41054                }
41055                "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked" => {
41056                    Ok(
41057                        Self::InvalidExactSvmPayloadTransactionInstructionNotToken2022TransferChecked,
41058                    )
41059                }
41060                "invalid_exact_svm_payload_transaction_not_a_transfer_instruction" => {
41061                    Ok(Self::InvalidExactSvmPayloadTransactionNotATransferInstruction)
41062                }
41063                "invalid_exact_svm_payload_transaction_cannot_derive_receiver_ata" => {
41064                    Ok(Self::InvalidExactSvmPayloadTransactionCannotDeriveReceiverAta)
41065                }
41066                "invalid_exact_svm_payload_transaction_receiver_ata_not_found" => {
41067                    Ok(Self::InvalidExactSvmPayloadTransactionReceiverAtaNotFound)
41068                }
41069                "invalid_exact_svm_payload_transaction_sender_ata_not_found" => {
41070                    Ok(Self::InvalidExactSvmPayloadTransactionSenderAtaNotFound)
41071                }
41072                "invalid_exact_svm_payload_transaction_simulation_failed" => {
41073                    Ok(Self::InvalidExactSvmPayloadTransactionSimulationFailed)
41074                }
41075                "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata" => {
41076                    Ok(Self::InvalidExactSvmPayloadTransactionTransferToIncorrectAta)
41077                }
41078                "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts" => {
41079                    Ok(
41080                        Self::InvalidExactSvmPayloadTransactionFeePayerIncludedInInstructionAccounts,
41081                    )
41082                }
41083                "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds" => {
41084                    Ok(Self::InvalidExactSvmPayloadTransactionFeePayerTransferringFunds)
41085                }
41086                _ => Err("invalid value".into()),
41087            }
41088        }
41089    }
41090    impl ::std::convert::TryFrom<&str> for X402VerifyInvalidReason {
41091        type Error = self::error::ConversionError;
41092        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41093            value.parse()
41094        }
41095    }
41096    impl ::std::convert::TryFrom<&::std::string::String> for X402VerifyInvalidReason {
41097        type Error = self::error::ConversionError;
41098        fn try_from(
41099            value: &::std::string::String,
41100        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41101            value.parse()
41102        }
41103    }
41104    impl ::std::convert::TryFrom<::std::string::String> for X402VerifyInvalidReason {
41105        type Error = self::error::ConversionError;
41106        fn try_from(
41107            value: ::std::string::String,
41108        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41109            value.parse()
41110        }
41111    }
41112    ///The version of the x402 protocol.
41113    ///
41114    /// <details><summary>JSON schema</summary>
41115    ///
41116    /// ```json
41117    ///{
41118    ///  "description": "The version of the x402 protocol.",
41119    ///  "examples": [
41120    ///    1
41121    ///  ],
41122    ///  "type": "integer",
41123    ///  "enum": [
41124    ///    1,
41125    ///    2
41126    ///  ]
41127    ///}
41128    /// ```
41129    /// </details>
41130    #[derive(::serde::Serialize, Clone, Debug)]
41131    #[serde(transparent)]
41132    pub struct X402Version(i64);
41133    impl ::std::ops::Deref for X402Version {
41134        type Target = i64;
41135        fn deref(&self) -> &i64 {
41136            &self.0
41137        }
41138    }
41139    impl ::std::convert::From<X402Version> for i64 {
41140        fn from(value: X402Version) -> Self {
41141            value.0
41142        }
41143    }
41144    impl ::std::convert::From<&X402Version> for X402Version {
41145        fn from(value: &X402Version) -> Self {
41146            value.clone()
41147        }
41148    }
41149    impl ::std::convert::TryFrom<i64> for X402Version {
41150        type Error = self::error::ConversionError;
41151        fn try_from(value: i64) -> ::std::result::Result<Self, self::error::ConversionError> {
41152            if ![1_i64, 2_i64].contains(&value) {
41153                Err("invalid value".into())
41154            } else {
41155                Ok(Self(value))
41156            }
41157        }
41158    }
41159    impl<'de> ::serde::Deserialize<'de> for X402Version {
41160        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
41161        where
41162            D: ::serde::Deserializer<'de>,
41163        {
41164            Self::try_from(<i64>::deserialize(deserializer)?)
41165                .map_err(|e| <D::Error as ::serde::de::Error>::custom(e.to_string()))
41166        }
41167    }
41168    ///The network of the blockchain to send payment on.
41169    ///
41170    /// <details><summary>JSON schema</summary>
41171    ///
41172    /// ```json
41173    ///{
41174    ///  "description": "The network of the blockchain to send payment on.",
41175    ///  "examples": [
41176    ///    "base"
41177    ///  ],
41178    ///  "type": "string",
41179    ///  "enum": [
41180    ///    "base-sepolia",
41181    ///    "base",
41182    ///    "solana-devnet",
41183    ///    "solana"
41184    ///  ]
41185    ///}
41186    /// ```
41187    /// </details>
41188    #[derive(
41189        ::serde::Deserialize,
41190        ::serde::Serialize,
41191        Clone,
41192        Copy,
41193        Debug,
41194        Eq,
41195        Hash,
41196        Ord,
41197        PartialEq,
41198        PartialOrd,
41199    )]
41200    pub enum X402v1PaymentPayloadNetwork {
41201        #[serde(rename = "base-sepolia")]
41202        BaseSepolia,
41203        #[serde(rename = "base")]
41204        Base,
41205        #[serde(rename = "solana-devnet")]
41206        SolanaDevnet,
41207        #[serde(rename = "solana")]
41208        Solana,
41209    }
41210    impl ::std::convert::From<&Self> for X402v1PaymentPayloadNetwork {
41211        fn from(value: &X402v1PaymentPayloadNetwork) -> Self {
41212            value.clone()
41213        }
41214    }
41215    impl ::std::fmt::Display for X402v1PaymentPayloadNetwork {
41216        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41217            match *self {
41218                Self::BaseSepolia => f.write_str("base-sepolia"),
41219                Self::Base => f.write_str("base"),
41220                Self::SolanaDevnet => f.write_str("solana-devnet"),
41221                Self::Solana => f.write_str("solana"),
41222            }
41223        }
41224    }
41225    impl ::std::str::FromStr for X402v1PaymentPayloadNetwork {
41226        type Err = self::error::ConversionError;
41227        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41228            match value {
41229                "base-sepolia" => Ok(Self::BaseSepolia),
41230                "base" => Ok(Self::Base),
41231                "solana-devnet" => Ok(Self::SolanaDevnet),
41232                "solana" => Ok(Self::Solana),
41233                _ => Err("invalid value".into()),
41234            }
41235        }
41236    }
41237    impl ::std::convert::TryFrom<&str> for X402v1PaymentPayloadNetwork {
41238        type Error = self::error::ConversionError;
41239        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41240            value.parse()
41241        }
41242    }
41243    impl ::std::convert::TryFrom<&::std::string::String> for X402v1PaymentPayloadNetwork {
41244        type Error = self::error::ConversionError;
41245        fn try_from(
41246            value: &::std::string::String,
41247        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41248            value.parse()
41249        }
41250    }
41251    impl ::std::convert::TryFrom<::std::string::String> for X402v1PaymentPayloadNetwork {
41252        type Error = self::error::ConversionError;
41253        fn try_from(
41254            value: ::std::string::String,
41255        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41256            value.parse()
41257        }
41258    }
41259    ///The payload of the payment depending on the x402Version, scheme, and network.
41260    ///
41261    /// <details><summary>JSON schema</summary>
41262    ///
41263    /// ```json
41264    ///{
41265    ///  "description": "The payload of the payment depending on the x402Version, scheme, and network.",
41266    ///  "examples": [
41267    ///    {
41268    ///      "authorization": {
41269    ///        "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
41270    ///        "nonce": "0x1234567890abcdef1234567890abcdef12345678",
41271    ///        "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
41272    ///        "validAfter": "1716150000",
41273    ///        "validBefore": "1716150000",
41274    ///        "value": "1000000000000000000"
41275    ///      },
41276    ///      "signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480"
41277    ///    }
41278    ///  ],
41279    ///  "type": "object",
41280    ///  "oneOf": [
41281    ///    {
41282    ///      "$ref": "#/components/schemas/x402ExactEvmPayload"
41283    ///    },
41284    ///    {
41285    ///      "$ref": "#/components/schemas/x402ExactSolanaPayload"
41286    ///    }
41287    ///  ]
41288    ///}
41289    /// ```
41290    /// </details>
41291    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41292    #[serde(untagged)]
41293    pub enum X402v1PaymentPayloadPayload {
41294        EvmPayload(X402ExactEvmPayload),
41295        SolanaPayload(X402ExactSolanaPayload),
41296    }
41297    impl ::std::convert::From<&Self> for X402v1PaymentPayloadPayload {
41298        fn from(value: &X402v1PaymentPayloadPayload) -> Self {
41299            value.clone()
41300        }
41301    }
41302    impl ::std::convert::From<X402ExactEvmPayload> for X402v1PaymentPayloadPayload {
41303        fn from(value: X402ExactEvmPayload) -> Self {
41304            Self::EvmPayload(value)
41305        }
41306    }
41307    impl ::std::convert::From<X402ExactSolanaPayload> for X402v1PaymentPayloadPayload {
41308        fn from(value: X402ExactSolanaPayload) -> Self {
41309            Self::SolanaPayload(value)
41310        }
41311    }
41312    ///The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
41313    ///
41314    /// <details><summary>JSON schema</summary>
41315    ///
41316    /// ```json
41317    ///{
41318    ///  "description": "The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.",
41319    ///  "examples": [
41320    ///    "exact"
41321    ///  ],
41322    ///  "type": "string",
41323    ///  "enum": [
41324    ///    "exact"
41325    ///  ]
41326    ///}
41327    /// ```
41328    /// </details>
41329    #[derive(
41330        ::serde::Deserialize,
41331        ::serde::Serialize,
41332        Clone,
41333        Copy,
41334        Debug,
41335        Eq,
41336        Hash,
41337        Ord,
41338        PartialEq,
41339        PartialOrd,
41340    )]
41341    pub enum X402v1PaymentPayloadScheme {
41342        #[serde(rename = "exact")]
41343        Exact,
41344    }
41345    impl ::std::convert::From<&Self> for X402v1PaymentPayloadScheme {
41346        fn from(value: &X402v1PaymentPayloadScheme) -> Self {
41347            value.clone()
41348        }
41349    }
41350    impl ::std::fmt::Display for X402v1PaymentPayloadScheme {
41351        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41352            match *self {
41353                Self::Exact => f.write_str("exact"),
41354            }
41355        }
41356    }
41357    impl ::std::str::FromStr for X402v1PaymentPayloadScheme {
41358        type Err = self::error::ConversionError;
41359        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41360            match value {
41361                "exact" => Ok(Self::Exact),
41362                _ => Err("invalid value".into()),
41363            }
41364        }
41365    }
41366    impl ::std::convert::TryFrom<&str> for X402v1PaymentPayloadScheme {
41367        type Error = self::error::ConversionError;
41368        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41369            value.parse()
41370        }
41371    }
41372    impl ::std::convert::TryFrom<&::std::string::String> for X402v1PaymentPayloadScheme {
41373        type Error = self::error::ConversionError;
41374        fn try_from(
41375            value: &::std::string::String,
41376        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41377            value.parse()
41378        }
41379    }
41380    impl ::std::convert::TryFrom<::std::string::String> for X402v1PaymentPayloadScheme {
41381        type Error = self::error::ConversionError;
41382        fn try_from(
41383            value: ::std::string::String,
41384        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41385            value.parse()
41386        }
41387    }
41388    /**The asset to pay with.
41389
41390    For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
41391
41392    For Solana-based networks, the asset will be a base58-encoded Solana address.*/
41393    ///
41394    /// <details><summary>JSON schema</summary>
41395    ///
41396    /// ```json
41397    ///{
41398    ///  "description": "The asset to pay with.\n\nFor EVM networks, the asset will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the asset will be a base58-encoded Solana address.",
41399    ///  "examples": [
41400    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
41401    ///  ],
41402    ///  "type": "string",
41403    ///  "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
41404    ///}
41405    /// ```
41406    /// </details>
41407    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
41408    #[serde(transparent)]
41409    pub struct X402v1PaymentRequirementsAsset(::std::string::String);
41410    impl ::std::ops::Deref for X402v1PaymentRequirementsAsset {
41411        type Target = ::std::string::String;
41412        fn deref(&self) -> &::std::string::String {
41413            &self.0
41414        }
41415    }
41416    impl ::std::convert::From<X402v1PaymentRequirementsAsset> for ::std::string::String {
41417        fn from(value: X402v1PaymentRequirementsAsset) -> Self {
41418            value.0
41419        }
41420    }
41421    impl ::std::convert::From<&X402v1PaymentRequirementsAsset> for X402v1PaymentRequirementsAsset {
41422        fn from(value: &X402v1PaymentRequirementsAsset) -> Self {
41423            value.clone()
41424        }
41425    }
41426    impl ::std::str::FromStr for X402v1PaymentRequirementsAsset {
41427        type Err = self::error::ConversionError;
41428        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41429            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
41430                ::std::sync::LazyLock::new(|| {
41431                    ::regress::Regex::new("^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$")
41432                        .unwrap()
41433                });
41434            if PATTERN.find(value).is_none() {
41435                return Err(
41436                    "doesn't match pattern \"^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$\""
41437                        .into(),
41438                );
41439            }
41440            Ok(Self(value.to_string()))
41441        }
41442    }
41443    impl ::std::convert::TryFrom<&str> for X402v1PaymentRequirementsAsset {
41444        type Error = self::error::ConversionError;
41445        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41446            value.parse()
41447        }
41448    }
41449    impl ::std::convert::TryFrom<&::std::string::String> for X402v1PaymentRequirementsAsset {
41450        type Error = self::error::ConversionError;
41451        fn try_from(
41452            value: &::std::string::String,
41453        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41454            value.parse()
41455        }
41456    }
41457    impl ::std::convert::TryFrom<::std::string::String> for X402v1PaymentRequirementsAsset {
41458        type Error = self::error::ConversionError;
41459        fn try_from(
41460            value: ::std::string::String,
41461        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41462            value.parse()
41463        }
41464    }
41465    impl<'de> ::serde::Deserialize<'de> for X402v1PaymentRequirementsAsset {
41466        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
41467        where
41468            D: ::serde::Deserializer<'de>,
41469        {
41470            ::std::string::String::deserialize(deserializer)?
41471                .parse()
41472                .map_err(|e: self::error::ConversionError| {
41473                    <D::Error as ::serde::de::Error>::custom(e.to_string())
41474                })
41475        }
41476    }
41477    ///The network of the blockchain to send payment on.
41478    ///
41479    /// <details><summary>JSON schema</summary>
41480    ///
41481    /// ```json
41482    ///{
41483    ///  "description": "The network of the blockchain to send payment on.",
41484    ///  "examples": [
41485    ///    "base"
41486    ///  ],
41487    ///  "type": "string",
41488    ///  "enum": [
41489    ///    "base-sepolia",
41490    ///    "base",
41491    ///    "solana-devnet",
41492    ///    "solana"
41493    ///  ]
41494    ///}
41495    /// ```
41496    /// </details>
41497    #[derive(
41498        ::serde::Deserialize,
41499        ::serde::Serialize,
41500        Clone,
41501        Copy,
41502        Debug,
41503        Eq,
41504        Hash,
41505        Ord,
41506        PartialEq,
41507        PartialOrd,
41508    )]
41509    pub enum X402v1PaymentRequirementsNetwork {
41510        #[serde(rename = "base-sepolia")]
41511        BaseSepolia,
41512        #[serde(rename = "base")]
41513        Base,
41514        #[serde(rename = "solana-devnet")]
41515        SolanaDevnet,
41516        #[serde(rename = "solana")]
41517        Solana,
41518    }
41519    impl ::std::convert::From<&Self> for X402v1PaymentRequirementsNetwork {
41520        fn from(value: &X402v1PaymentRequirementsNetwork) -> Self {
41521            value.clone()
41522        }
41523    }
41524    impl ::std::fmt::Display for X402v1PaymentRequirementsNetwork {
41525        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41526            match *self {
41527                Self::BaseSepolia => f.write_str("base-sepolia"),
41528                Self::Base => f.write_str("base"),
41529                Self::SolanaDevnet => f.write_str("solana-devnet"),
41530                Self::Solana => f.write_str("solana"),
41531            }
41532        }
41533    }
41534    impl ::std::str::FromStr for X402v1PaymentRequirementsNetwork {
41535        type Err = self::error::ConversionError;
41536        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41537            match value {
41538                "base-sepolia" => Ok(Self::BaseSepolia),
41539                "base" => Ok(Self::Base),
41540                "solana-devnet" => Ok(Self::SolanaDevnet),
41541                "solana" => Ok(Self::Solana),
41542                _ => Err("invalid value".into()),
41543            }
41544        }
41545    }
41546    impl ::std::convert::TryFrom<&str> for X402v1PaymentRequirementsNetwork {
41547        type Error = self::error::ConversionError;
41548        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41549            value.parse()
41550        }
41551    }
41552    impl ::std::convert::TryFrom<&::std::string::String> for X402v1PaymentRequirementsNetwork {
41553        type Error = self::error::ConversionError;
41554        fn try_from(
41555            value: &::std::string::String,
41556        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41557            value.parse()
41558        }
41559    }
41560    impl ::std::convert::TryFrom<::std::string::String> for X402v1PaymentRequirementsNetwork {
41561        type Error = self::error::ConversionError;
41562        fn try_from(
41563            value: ::std::string::String,
41564        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41565            value.parse()
41566        }
41567    }
41568    /**The destination to pay value to.
41569
41570    For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
41571
41572    For Solana-based networks, payTo will be a base58-encoded Solana address.*/
41573    ///
41574    /// <details><summary>JSON schema</summary>
41575    ///
41576    /// ```json
41577    ///{
41578    ///  "description": "The destination to pay value to.\n\nFor EVM networks, payTo will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, payTo will be a base58-encoded Solana address.",
41579    ///  "examples": [
41580    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
41581    ///  ],
41582    ///  "type": "string",
41583    ///  "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
41584    ///}
41585    /// ```
41586    /// </details>
41587    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
41588    #[serde(transparent)]
41589    pub struct X402v1PaymentRequirementsPayTo(::std::string::String);
41590    impl ::std::ops::Deref for X402v1PaymentRequirementsPayTo {
41591        type Target = ::std::string::String;
41592        fn deref(&self) -> &::std::string::String {
41593            &self.0
41594        }
41595    }
41596    impl ::std::convert::From<X402v1PaymentRequirementsPayTo> for ::std::string::String {
41597        fn from(value: X402v1PaymentRequirementsPayTo) -> Self {
41598            value.0
41599        }
41600    }
41601    impl ::std::convert::From<&X402v1PaymentRequirementsPayTo> for X402v1PaymentRequirementsPayTo {
41602        fn from(value: &X402v1PaymentRequirementsPayTo) -> Self {
41603            value.clone()
41604        }
41605    }
41606    impl ::std::str::FromStr for X402v1PaymentRequirementsPayTo {
41607        type Err = self::error::ConversionError;
41608        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41609            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
41610                ::std::sync::LazyLock::new(|| {
41611                    ::regress::Regex::new("^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$")
41612                        .unwrap()
41613                });
41614            if PATTERN.find(value).is_none() {
41615                return Err(
41616                    "doesn't match pattern \"^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$\""
41617                        .into(),
41618                );
41619            }
41620            Ok(Self(value.to_string()))
41621        }
41622    }
41623    impl ::std::convert::TryFrom<&str> for X402v1PaymentRequirementsPayTo {
41624        type Error = self::error::ConversionError;
41625        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41626            value.parse()
41627        }
41628    }
41629    impl ::std::convert::TryFrom<&::std::string::String> for X402v1PaymentRequirementsPayTo {
41630        type Error = self::error::ConversionError;
41631        fn try_from(
41632            value: &::std::string::String,
41633        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41634            value.parse()
41635        }
41636    }
41637    impl ::std::convert::TryFrom<::std::string::String> for X402v1PaymentRequirementsPayTo {
41638        type Error = self::error::ConversionError;
41639        fn try_from(
41640            value: ::std::string::String,
41641        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41642            value.parse()
41643        }
41644    }
41645    impl<'de> ::serde::Deserialize<'de> for X402v1PaymentRequirementsPayTo {
41646        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
41647        where
41648            D: ::serde::Deserializer<'de>,
41649        {
41650            ::std::string::String::deserialize(deserializer)?
41651                .parse()
41652                .map_err(|e: self::error::ConversionError| {
41653                    <D::Error as ::serde::de::Error>::custom(e.to_string())
41654                })
41655        }
41656    }
41657    ///The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
41658    ///
41659    /// <details><summary>JSON schema</summary>
41660    ///
41661    /// ```json
41662    ///{
41663    ///  "description": "The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.",
41664    ///  "examples": [
41665    ///    "exact"
41666    ///  ],
41667    ///  "type": "string",
41668    ///  "enum": [
41669    ///    "exact"
41670    ///  ]
41671    ///}
41672    /// ```
41673    /// </details>
41674    #[derive(
41675        ::serde::Deserialize,
41676        ::serde::Serialize,
41677        Clone,
41678        Copy,
41679        Debug,
41680        Eq,
41681        Hash,
41682        Ord,
41683        PartialEq,
41684        PartialOrd,
41685    )]
41686    pub enum X402v1PaymentRequirementsScheme {
41687        #[serde(rename = "exact")]
41688        Exact,
41689    }
41690    impl ::std::convert::From<&Self> for X402v1PaymentRequirementsScheme {
41691        fn from(value: &X402v1PaymentRequirementsScheme) -> Self {
41692            value.clone()
41693        }
41694    }
41695    impl ::std::fmt::Display for X402v1PaymentRequirementsScheme {
41696        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41697            match *self {
41698                Self::Exact => f.write_str("exact"),
41699            }
41700        }
41701    }
41702    impl ::std::str::FromStr for X402v1PaymentRequirementsScheme {
41703        type Err = self::error::ConversionError;
41704        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41705            match value {
41706                "exact" => Ok(Self::Exact),
41707                _ => Err("invalid value".into()),
41708            }
41709        }
41710    }
41711    impl ::std::convert::TryFrom<&str> for X402v1PaymentRequirementsScheme {
41712        type Error = self::error::ConversionError;
41713        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41714            value.parse()
41715        }
41716    }
41717    impl ::std::convert::TryFrom<&::std::string::String> for X402v1PaymentRequirementsScheme {
41718        type Error = self::error::ConversionError;
41719        fn try_from(
41720            value: &::std::string::String,
41721        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41722            value.parse()
41723        }
41724    }
41725    impl ::std::convert::TryFrom<::std::string::String> for X402v1PaymentRequirementsScheme {
41726        type Error = self::error::ConversionError;
41727        fn try_from(
41728            value: ::std::string::String,
41729        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41730            value.parse()
41731        }
41732    }
41733    ///The payload of the payment depending on the x402Version, scheme, and network.
41734    ///
41735    /// <details><summary>JSON schema</summary>
41736    ///
41737    /// ```json
41738    ///{
41739    ///  "description": "The payload of the payment depending on the x402Version, scheme, and network.",
41740    ///  "examples": [
41741    ///    {
41742    ///      "authorization": {
41743    ///        "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
41744    ///        "nonce": "0x1234567890abcdef1234567890abcdef12345678",
41745    ///        "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
41746    ///        "validAfter": "1716150000",
41747    ///        "validBefore": "1716150000",
41748    ///        "value": "1000000000000000000"
41749    ///      },
41750    ///      "signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f13480"
41751    ///    }
41752    ///  ],
41753    ///  "type": "object",
41754    ///  "oneOf": [
41755    ///    {
41756    ///      "$ref": "#/components/schemas/x402ExactEvmPayload"
41757    ///    },
41758    ///    {
41759    ///      "$ref": "#/components/schemas/x402ExactSolanaPayload"
41760    ///    }
41761    ///  ]
41762    ///}
41763    /// ```
41764    /// </details>
41765    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
41766    #[serde(untagged)]
41767    pub enum X402v2PaymentPayloadPayload {
41768        EvmPayload(X402ExactEvmPayload),
41769        SolanaPayload(X402ExactSolanaPayload),
41770    }
41771    impl ::std::convert::From<&Self> for X402v2PaymentPayloadPayload {
41772        fn from(value: &X402v2PaymentPayloadPayload) -> Self {
41773            value.clone()
41774        }
41775    }
41776    impl ::std::convert::From<X402ExactEvmPayload> for X402v2PaymentPayloadPayload {
41777        fn from(value: X402ExactEvmPayload) -> Self {
41778            Self::EvmPayload(value)
41779        }
41780    }
41781    impl ::std::convert::From<X402ExactSolanaPayload> for X402v2PaymentPayloadPayload {
41782        fn from(value: X402ExactSolanaPayload) -> Self {
41783            Self::SolanaPayload(value)
41784        }
41785    }
41786    /**The asset to pay with.
41787
41788    For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
41789
41790    For Solana-based networks, the asset will be a base58-encoded Solana address.*/
41791    ///
41792    /// <details><summary>JSON schema</summary>
41793    ///
41794    /// ```json
41795    ///{
41796    ///  "description": "The asset to pay with.\n\nFor EVM networks, the asset will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the asset will be a base58-encoded Solana address.",
41797    ///  "examples": [
41798    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
41799    ///  ],
41800    ///  "type": "string",
41801    ///  "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
41802    ///}
41803    /// ```
41804    /// </details>
41805    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
41806    #[serde(transparent)]
41807    pub struct X402v2PaymentRequirementsAsset(::std::string::String);
41808    impl ::std::ops::Deref for X402v2PaymentRequirementsAsset {
41809        type Target = ::std::string::String;
41810        fn deref(&self) -> &::std::string::String {
41811            &self.0
41812        }
41813    }
41814    impl ::std::convert::From<X402v2PaymentRequirementsAsset> for ::std::string::String {
41815        fn from(value: X402v2PaymentRequirementsAsset) -> Self {
41816            value.0
41817        }
41818    }
41819    impl ::std::convert::From<&X402v2PaymentRequirementsAsset> for X402v2PaymentRequirementsAsset {
41820        fn from(value: &X402v2PaymentRequirementsAsset) -> Self {
41821            value.clone()
41822        }
41823    }
41824    impl ::std::str::FromStr for X402v2PaymentRequirementsAsset {
41825        type Err = self::error::ConversionError;
41826        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41827            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
41828                ::std::sync::LazyLock::new(|| {
41829                    ::regress::Regex::new("^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$")
41830                        .unwrap()
41831                });
41832            if PATTERN.find(value).is_none() {
41833                return Err(
41834                    "doesn't match pattern \"^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$\""
41835                        .into(),
41836                );
41837            }
41838            Ok(Self(value.to_string()))
41839        }
41840    }
41841    impl ::std::convert::TryFrom<&str> for X402v2PaymentRequirementsAsset {
41842        type Error = self::error::ConversionError;
41843        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41844            value.parse()
41845        }
41846    }
41847    impl ::std::convert::TryFrom<&::std::string::String> for X402v2PaymentRequirementsAsset {
41848        type Error = self::error::ConversionError;
41849        fn try_from(
41850            value: &::std::string::String,
41851        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41852            value.parse()
41853        }
41854    }
41855    impl ::std::convert::TryFrom<::std::string::String> for X402v2PaymentRequirementsAsset {
41856        type Error = self::error::ConversionError;
41857        fn try_from(
41858            value: ::std::string::String,
41859        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41860            value.parse()
41861        }
41862    }
41863    impl<'de> ::serde::Deserialize<'de> for X402v2PaymentRequirementsAsset {
41864        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
41865        where
41866            D: ::serde::Deserializer<'de>,
41867        {
41868            ::std::string::String::deserialize(deserializer)?
41869                .parse()
41870                .map_err(|e: self::error::ConversionError| {
41871                    <D::Error as ::serde::de::Error>::custom(e.to_string())
41872                })
41873        }
41874    }
41875    /**The destination to pay value to.
41876
41877    For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
41878
41879    For Solana-based networks, payTo will be a base58-encoded Solana address.*/
41880    ///
41881    /// <details><summary>JSON schema</summary>
41882    ///
41883    /// ```json
41884    ///{
41885    ///  "description": "The destination to pay value to.\n\nFor EVM networks, payTo will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, payTo will be a base58-encoded Solana address.",
41886    ///  "examples": [
41887    ///    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
41888    ///  ],
41889    ///  "type": "string",
41890    ///  "pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
41891    ///}
41892    /// ```
41893    /// </details>
41894    #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
41895    #[serde(transparent)]
41896    pub struct X402v2PaymentRequirementsPayTo(::std::string::String);
41897    impl ::std::ops::Deref for X402v2PaymentRequirementsPayTo {
41898        type Target = ::std::string::String;
41899        fn deref(&self) -> &::std::string::String {
41900            &self.0
41901        }
41902    }
41903    impl ::std::convert::From<X402v2PaymentRequirementsPayTo> for ::std::string::String {
41904        fn from(value: X402v2PaymentRequirementsPayTo) -> Self {
41905            value.0
41906        }
41907    }
41908    impl ::std::convert::From<&X402v2PaymentRequirementsPayTo> for X402v2PaymentRequirementsPayTo {
41909        fn from(value: &X402v2PaymentRequirementsPayTo) -> Self {
41910            value.clone()
41911        }
41912    }
41913    impl ::std::str::FromStr for X402v2PaymentRequirementsPayTo {
41914        type Err = self::error::ConversionError;
41915        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41916            static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
41917                ::std::sync::LazyLock::new(|| {
41918                    ::regress::Regex::new("^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$")
41919                        .unwrap()
41920                });
41921            if PATTERN.find(value).is_none() {
41922                return Err(
41923                    "doesn't match pattern \"^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$\""
41924                        .into(),
41925                );
41926            }
41927            Ok(Self(value.to_string()))
41928        }
41929    }
41930    impl ::std::convert::TryFrom<&str> for X402v2PaymentRequirementsPayTo {
41931        type Error = self::error::ConversionError;
41932        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
41933            value.parse()
41934        }
41935    }
41936    impl ::std::convert::TryFrom<&::std::string::String> for X402v2PaymentRequirementsPayTo {
41937        type Error = self::error::ConversionError;
41938        fn try_from(
41939            value: &::std::string::String,
41940        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41941            value.parse()
41942        }
41943    }
41944    impl ::std::convert::TryFrom<::std::string::String> for X402v2PaymentRequirementsPayTo {
41945        type Error = self::error::ConversionError;
41946        fn try_from(
41947            value: ::std::string::String,
41948        ) -> ::std::result::Result<Self, self::error::ConversionError> {
41949            value.parse()
41950        }
41951    }
41952    impl<'de> ::serde::Deserialize<'de> for X402v2PaymentRequirementsPayTo {
41953        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
41954        where
41955            D: ::serde::Deserializer<'de>,
41956        {
41957            ::std::string::String::deserialize(deserializer)?
41958                .parse()
41959                .map_err(|e: self::error::ConversionError| {
41960                    <D::Error as ::serde::de::Error>::custom(e.to_string())
41961                })
41962        }
41963    }
41964    ///The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
41965    ///
41966    /// <details><summary>JSON schema</summary>
41967    ///
41968    /// ```json
41969    ///{
41970    ///  "description": "The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.",
41971    ///  "examples": [
41972    ///    "exact"
41973    ///  ],
41974    ///  "type": "string",
41975    ///  "enum": [
41976    ///    "exact"
41977    ///  ]
41978    ///}
41979    /// ```
41980    /// </details>
41981    #[derive(
41982        ::serde::Deserialize,
41983        ::serde::Serialize,
41984        Clone,
41985        Copy,
41986        Debug,
41987        Eq,
41988        Hash,
41989        Ord,
41990        PartialEq,
41991        PartialOrd,
41992    )]
41993    pub enum X402v2PaymentRequirementsScheme {
41994        #[serde(rename = "exact")]
41995        Exact,
41996    }
41997    impl ::std::convert::From<&Self> for X402v2PaymentRequirementsScheme {
41998        fn from(value: &X402v2PaymentRequirementsScheme) -> Self {
41999            value.clone()
42000        }
42001    }
42002    impl ::std::fmt::Display for X402v2PaymentRequirementsScheme {
42003        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
42004            match *self {
42005                Self::Exact => f.write_str("exact"),
42006            }
42007        }
42008    }
42009    impl ::std::str::FromStr for X402v2PaymentRequirementsScheme {
42010        type Err = self::error::ConversionError;
42011        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42012            match value {
42013                "exact" => Ok(Self::Exact),
42014                _ => Err("invalid value".into()),
42015            }
42016        }
42017    }
42018    impl ::std::convert::TryFrom<&str> for X402v2PaymentRequirementsScheme {
42019        type Error = self::error::ConversionError;
42020        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
42021            value.parse()
42022        }
42023    }
42024    impl ::std::convert::TryFrom<&::std::string::String> for X402v2PaymentRequirementsScheme {
42025        type Error = self::error::ConversionError;
42026        fn try_from(
42027            value: &::std::string::String,
42028        ) -> ::std::result::Result<Self, self::error::ConversionError> {
42029            value.parse()
42030        }
42031    }
42032    impl ::std::convert::TryFrom<::std::string::String> for X402v2PaymentRequirementsScheme {
42033        type Error = self::error::ConversionError;
42034        fn try_from(
42035            value: ::std::string::String,
42036        ) -> ::std::result::Result<Self, self::error::ConversionError> {
42037            value.parse()
42038        }
42039    }
42040    /// Types for composing complex structures.
42041    pub mod builder {
42042        #[derive(Clone, Debug)]
42043        pub struct AbiFunction {
42044            constant: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
42045            gas: ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
42046            inputs:
42047                ::std::result::Result<::std::vec::Vec<super::AbiParameter>, ::std::string::String>,
42048            name: ::std::result::Result<::std::string::String, ::std::string::String>,
42049            outputs:
42050                ::std::result::Result<::std::vec::Vec<super::AbiParameter>, ::std::string::String>,
42051            payable: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
42052            state_mutability:
42053                ::std::result::Result<super::AbiStateMutability, ::std::string::String>,
42054            type_: ::std::result::Result<super::AbiFunctionType, ::std::string::String>,
42055        }
42056        impl ::std::default::Default for AbiFunction {
42057            fn default() -> Self {
42058                Self {
42059                    constant: Ok(Default::default()),
42060                    gas: Ok(Default::default()),
42061                    inputs: Err("no value supplied for inputs".to_string()),
42062                    name: Err("no value supplied for name".to_string()),
42063                    outputs: Err("no value supplied for outputs".to_string()),
42064                    payable: Ok(Default::default()),
42065                    state_mutability: Err("no value supplied for state_mutability".to_string()),
42066                    type_: Err("no value supplied for type_".to_string()),
42067                }
42068            }
42069        }
42070        impl AbiFunction {
42071            pub fn constant<T>(mut self, value: T) -> Self
42072            where
42073                T: ::std::convert::TryInto<::std::option::Option<bool>>,
42074                T::Error: ::std::fmt::Display,
42075            {
42076                self.constant = value
42077                    .try_into()
42078                    .map_err(|e| format!("error converting supplied value for constant: {}", e));
42079                self
42080            }
42081            pub fn gas<T>(mut self, value: T) -> Self
42082            where
42083                T: ::std::convert::TryInto<::std::option::Option<i64>>,
42084                T::Error: ::std::fmt::Display,
42085            {
42086                self.gas = value
42087                    .try_into()
42088                    .map_err(|e| format!("error converting supplied value for gas: {}", e));
42089                self
42090            }
42091            pub fn inputs<T>(mut self, value: T) -> Self
42092            where
42093                T: ::std::convert::TryInto<::std::vec::Vec<super::AbiParameter>>,
42094                T::Error: ::std::fmt::Display,
42095            {
42096                self.inputs = value
42097                    .try_into()
42098                    .map_err(|e| format!("error converting supplied value for inputs: {}", e));
42099                self
42100            }
42101            pub fn name<T>(mut self, value: T) -> Self
42102            where
42103                T: ::std::convert::TryInto<::std::string::String>,
42104                T::Error: ::std::fmt::Display,
42105            {
42106                self.name = value
42107                    .try_into()
42108                    .map_err(|e| format!("error converting supplied value for name: {}", e));
42109                self
42110            }
42111            pub fn outputs<T>(mut self, value: T) -> Self
42112            where
42113                T: ::std::convert::TryInto<::std::vec::Vec<super::AbiParameter>>,
42114                T::Error: ::std::fmt::Display,
42115            {
42116                self.outputs = value
42117                    .try_into()
42118                    .map_err(|e| format!("error converting supplied value for outputs: {}", e));
42119                self
42120            }
42121            pub fn payable<T>(mut self, value: T) -> Self
42122            where
42123                T: ::std::convert::TryInto<::std::option::Option<bool>>,
42124                T::Error: ::std::fmt::Display,
42125            {
42126                self.payable = value
42127                    .try_into()
42128                    .map_err(|e| format!("error converting supplied value for payable: {}", e));
42129                self
42130            }
42131            pub fn state_mutability<T>(mut self, value: T) -> Self
42132            where
42133                T: ::std::convert::TryInto<super::AbiStateMutability>,
42134                T::Error: ::std::fmt::Display,
42135            {
42136                self.state_mutability = value.try_into().map_err(|e| {
42137                    format!(
42138                        "error converting supplied value for state_mutability: {}",
42139                        e
42140                    )
42141                });
42142                self
42143            }
42144            pub fn type_<T>(mut self, value: T) -> Self
42145            where
42146                T: ::std::convert::TryInto<super::AbiFunctionType>,
42147                T::Error: ::std::fmt::Display,
42148            {
42149                self.type_ = value
42150                    .try_into()
42151                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
42152                self
42153            }
42154        }
42155        impl ::std::convert::TryFrom<AbiFunction> for super::AbiFunction {
42156            type Error = super::error::ConversionError;
42157            fn try_from(
42158                value: AbiFunction,
42159            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42160                Ok(Self {
42161                    constant: value.constant?,
42162                    gas: value.gas?,
42163                    inputs: value.inputs?,
42164                    name: value.name?,
42165                    outputs: value.outputs?,
42166                    payable: value.payable?,
42167                    state_mutability: value.state_mutability?,
42168                    type_: value.type_?,
42169                })
42170            }
42171        }
42172        impl ::std::convert::From<super::AbiFunction> for AbiFunction {
42173            fn from(value: super::AbiFunction) -> Self {
42174                Self {
42175                    constant: Ok(value.constant),
42176                    gas: Ok(value.gas),
42177                    inputs: Ok(value.inputs),
42178                    name: Ok(value.name),
42179                    outputs: Ok(value.outputs),
42180                    payable: Ok(value.payable),
42181                    state_mutability: Ok(value.state_mutability),
42182                    type_: Ok(value.type_),
42183                }
42184            }
42185        }
42186        #[derive(Clone, Debug)]
42187        pub struct AbiInput {
42188            additional_properties: ::std::result::Result<
42189                ::std::option::Option<::serde_json::Value>,
42190                ::std::string::String,
42191            >,
42192            type_: ::std::result::Result<super::AbiInputType, ::std::string::String>,
42193        }
42194        impl ::std::default::Default for AbiInput {
42195            fn default() -> Self {
42196                Self {
42197                    additional_properties: Ok(Default::default()),
42198                    type_: Err("no value supplied for type_".to_string()),
42199                }
42200            }
42201        }
42202        impl AbiInput {
42203            pub fn additional_properties<T>(mut self, value: T) -> Self
42204            where
42205                T: ::std::convert::TryInto<::std::option::Option<::serde_json::Value>>,
42206                T::Error: ::std::fmt::Display,
42207            {
42208                self.additional_properties = value.try_into().map_err(|e| {
42209                    format!(
42210                        "error converting supplied value for additional_properties: {}",
42211                        e
42212                    )
42213                });
42214                self
42215            }
42216            pub fn type_<T>(mut self, value: T) -> Self
42217            where
42218                T: ::std::convert::TryInto<super::AbiInputType>,
42219                T::Error: ::std::fmt::Display,
42220            {
42221                self.type_ = value
42222                    .try_into()
42223                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
42224                self
42225            }
42226        }
42227        impl ::std::convert::TryFrom<AbiInput> for super::AbiInput {
42228            type Error = super::error::ConversionError;
42229            fn try_from(
42230                value: AbiInput,
42231            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42232                Ok(Self {
42233                    additional_properties: value.additional_properties?,
42234                    type_: value.type_?,
42235                })
42236            }
42237        }
42238        impl ::std::convert::From<super::AbiInput> for AbiInput {
42239            fn from(value: super::AbiInput) -> Self {
42240                Self {
42241                    additional_properties: Ok(value.additional_properties),
42242                    type_: Ok(value.type_),
42243                }
42244            }
42245        }
42246        #[derive(Clone, Debug)]
42247        pub struct AbiParameter {
42248            components:
42249                ::std::result::Result<::std::vec::Vec<super::AbiParameter>, ::std::string::String>,
42250            internal_type: ::std::result::Result<
42251                ::std::option::Option<::std::string::String>,
42252                ::std::string::String,
42253            >,
42254            name: ::std::result::Result<
42255                ::std::option::Option<::std::string::String>,
42256                ::std::string::String,
42257            >,
42258            type_: ::std::result::Result<::std::string::String, ::std::string::String>,
42259        }
42260        impl ::std::default::Default for AbiParameter {
42261            fn default() -> Self {
42262                Self {
42263                    components: Ok(Default::default()),
42264                    internal_type: Ok(Default::default()),
42265                    name: Ok(Default::default()),
42266                    type_: Err("no value supplied for type_".to_string()),
42267                }
42268            }
42269        }
42270        impl AbiParameter {
42271            pub fn components<T>(mut self, value: T) -> Self
42272            where
42273                T: ::std::convert::TryInto<::std::vec::Vec<super::AbiParameter>>,
42274                T::Error: ::std::fmt::Display,
42275            {
42276                self.components = value
42277                    .try_into()
42278                    .map_err(|e| format!("error converting supplied value for components: {}", e));
42279                self
42280            }
42281            pub fn internal_type<T>(mut self, value: T) -> Self
42282            where
42283                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
42284                T::Error: ::std::fmt::Display,
42285            {
42286                self.internal_type = value.try_into().map_err(|e| {
42287                    format!("error converting supplied value for internal_type: {}", e)
42288                });
42289                self
42290            }
42291            pub fn name<T>(mut self, value: T) -> Self
42292            where
42293                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
42294                T::Error: ::std::fmt::Display,
42295            {
42296                self.name = value
42297                    .try_into()
42298                    .map_err(|e| format!("error converting supplied value for name: {}", e));
42299                self
42300            }
42301            pub fn type_<T>(mut self, value: T) -> Self
42302            where
42303                T: ::std::convert::TryInto<::std::string::String>,
42304                T::Error: ::std::fmt::Display,
42305            {
42306                self.type_ = value
42307                    .try_into()
42308                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
42309                self
42310            }
42311        }
42312        impl ::std::convert::TryFrom<AbiParameter> for super::AbiParameter {
42313            type Error = super::error::ConversionError;
42314            fn try_from(
42315                value: AbiParameter,
42316            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42317                Ok(Self {
42318                    components: value.components?,
42319                    internal_type: value.internal_type?,
42320                    name: value.name?,
42321                    type_: value.type_?,
42322                })
42323            }
42324        }
42325        impl ::std::convert::From<super::AbiParameter> for AbiParameter {
42326            fn from(value: super::AbiParameter) -> Self {
42327                Self {
42328                    components: Ok(value.components),
42329                    internal_type: Ok(value.internal_type),
42330                    name: Ok(value.name),
42331                    type_: Ok(value.type_),
42332                }
42333            }
42334        }
42335        #[derive(Clone, Debug)]
42336        pub struct AccountTokenAddressesResponse {
42337            account_address: ::std::result::Result<
42338                ::std::option::Option<::std::string::String>,
42339                ::std::string::String,
42340            >,
42341            token_addresses: ::std::result::Result<
42342                ::std::vec::Vec<super::AccountTokenAddressesResponseTokenAddressesItem>,
42343                ::std::string::String,
42344            >,
42345            total_count: ::std::result::Result<::std::option::Option<u64>, ::std::string::String>,
42346        }
42347        impl ::std::default::Default for AccountTokenAddressesResponse {
42348            fn default() -> Self {
42349                Self {
42350                    account_address: Ok(Default::default()),
42351                    token_addresses: Ok(Default::default()),
42352                    total_count: Ok(Default::default()),
42353                }
42354            }
42355        }
42356        impl AccountTokenAddressesResponse {
42357            pub fn account_address<T>(mut self, value: T) -> Self
42358            where
42359                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
42360                T::Error: ::std::fmt::Display,
42361            {
42362                self.account_address = value.try_into().map_err(|e| {
42363                    format!("error converting supplied value for account_address: {}", e)
42364                });
42365                self
42366            }
42367            pub fn token_addresses<T>(mut self, value: T) -> Self
42368            where
42369                T: ::std::convert::TryInto<
42370                    ::std::vec::Vec<super::AccountTokenAddressesResponseTokenAddressesItem>,
42371                >,
42372                T::Error: ::std::fmt::Display,
42373            {
42374                self.token_addresses = value.try_into().map_err(|e| {
42375                    format!("error converting supplied value for token_addresses: {}", e)
42376                });
42377                self
42378            }
42379            pub fn total_count<T>(mut self, value: T) -> Self
42380            where
42381                T: ::std::convert::TryInto<::std::option::Option<u64>>,
42382                T::Error: ::std::fmt::Display,
42383            {
42384                self.total_count = value
42385                    .try_into()
42386                    .map_err(|e| format!("error converting supplied value for total_count: {}", e));
42387                self
42388            }
42389        }
42390        impl ::std::convert::TryFrom<AccountTokenAddressesResponse>
42391            for super::AccountTokenAddressesResponse
42392        {
42393            type Error = super::error::ConversionError;
42394            fn try_from(
42395                value: AccountTokenAddressesResponse,
42396            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42397                Ok(Self {
42398                    account_address: value.account_address?,
42399                    token_addresses: value.token_addresses?,
42400                    total_count: value.total_count?,
42401                })
42402            }
42403        }
42404        impl ::std::convert::From<super::AccountTokenAddressesResponse> for AccountTokenAddressesResponse {
42405            fn from(value: super::AccountTokenAddressesResponse) -> Self {
42406                Self {
42407                    account_address: Ok(value.account_address),
42408                    token_addresses: Ok(value.token_addresses),
42409                    total_count: Ok(value.total_count),
42410                }
42411            }
42412        }
42413        #[derive(Clone, Debug)]
42414        pub struct CommonSwapResponse {
42415            block_number:
42416                ::std::result::Result<super::CommonSwapResponseBlockNumber, ::std::string::String>,
42417            fees: ::std::result::Result<super::CommonSwapResponseFees, ::std::string::String>,
42418            from_amount:
42419                ::std::result::Result<super::CommonSwapResponseFromAmount, ::std::string::String>,
42420            from_token:
42421                ::std::result::Result<super::CommonSwapResponseFromToken, ::std::string::String>,
42422            issues: ::std::result::Result<super::CommonSwapResponseIssues, ::std::string::String>,
42423            liquidity_available: ::std::result::Result<bool, ::std::string::String>,
42424            min_to_amount:
42425                ::std::result::Result<super::CommonSwapResponseMinToAmount, ::std::string::String>,
42426            to_amount:
42427                ::std::result::Result<super::CommonSwapResponseToAmount, ::std::string::String>,
42428            to_token:
42429                ::std::result::Result<super::CommonSwapResponseToToken, ::std::string::String>,
42430        }
42431        impl ::std::default::Default for CommonSwapResponse {
42432            fn default() -> Self {
42433                Self {
42434                    block_number: Err("no value supplied for block_number".to_string()),
42435                    fees: Err("no value supplied for fees".to_string()),
42436                    from_amount: Err("no value supplied for from_amount".to_string()),
42437                    from_token: Err("no value supplied for from_token".to_string()),
42438                    issues: Err("no value supplied for issues".to_string()),
42439                    liquidity_available: Err(
42440                        "no value supplied for liquidity_available".to_string()
42441                    ),
42442                    min_to_amount: Err("no value supplied for min_to_amount".to_string()),
42443                    to_amount: Err("no value supplied for to_amount".to_string()),
42444                    to_token: Err("no value supplied for to_token".to_string()),
42445                }
42446            }
42447        }
42448        impl CommonSwapResponse {
42449            pub fn block_number<T>(mut self, value: T) -> Self
42450            where
42451                T: ::std::convert::TryInto<super::CommonSwapResponseBlockNumber>,
42452                T::Error: ::std::fmt::Display,
42453            {
42454                self.block_number = value.try_into().map_err(|e| {
42455                    format!("error converting supplied value for block_number: {}", e)
42456                });
42457                self
42458            }
42459            pub fn fees<T>(mut self, value: T) -> Self
42460            where
42461                T: ::std::convert::TryInto<super::CommonSwapResponseFees>,
42462                T::Error: ::std::fmt::Display,
42463            {
42464                self.fees = value
42465                    .try_into()
42466                    .map_err(|e| format!("error converting supplied value for fees: {}", e));
42467                self
42468            }
42469            pub fn from_amount<T>(mut self, value: T) -> Self
42470            where
42471                T: ::std::convert::TryInto<super::CommonSwapResponseFromAmount>,
42472                T::Error: ::std::fmt::Display,
42473            {
42474                self.from_amount = value
42475                    .try_into()
42476                    .map_err(|e| format!("error converting supplied value for from_amount: {}", e));
42477                self
42478            }
42479            pub fn from_token<T>(mut self, value: T) -> Self
42480            where
42481                T: ::std::convert::TryInto<super::CommonSwapResponseFromToken>,
42482                T::Error: ::std::fmt::Display,
42483            {
42484                self.from_token = value
42485                    .try_into()
42486                    .map_err(|e| format!("error converting supplied value for from_token: {}", e));
42487                self
42488            }
42489            pub fn issues<T>(mut self, value: T) -> Self
42490            where
42491                T: ::std::convert::TryInto<super::CommonSwapResponseIssues>,
42492                T::Error: ::std::fmt::Display,
42493            {
42494                self.issues = value
42495                    .try_into()
42496                    .map_err(|e| format!("error converting supplied value for issues: {}", e));
42497                self
42498            }
42499            pub fn liquidity_available<T>(mut self, value: T) -> Self
42500            where
42501                T: ::std::convert::TryInto<bool>,
42502                T::Error: ::std::fmt::Display,
42503            {
42504                self.liquidity_available = value.try_into().map_err(|e| {
42505                    format!(
42506                        "error converting supplied value for liquidity_available: {}",
42507                        e
42508                    )
42509                });
42510                self
42511            }
42512            pub fn min_to_amount<T>(mut self, value: T) -> Self
42513            where
42514                T: ::std::convert::TryInto<super::CommonSwapResponseMinToAmount>,
42515                T::Error: ::std::fmt::Display,
42516            {
42517                self.min_to_amount = value.try_into().map_err(|e| {
42518                    format!("error converting supplied value for min_to_amount: {}", e)
42519                });
42520                self
42521            }
42522            pub fn to_amount<T>(mut self, value: T) -> Self
42523            where
42524                T: ::std::convert::TryInto<super::CommonSwapResponseToAmount>,
42525                T::Error: ::std::fmt::Display,
42526            {
42527                self.to_amount = value
42528                    .try_into()
42529                    .map_err(|e| format!("error converting supplied value for to_amount: {}", e));
42530                self
42531            }
42532            pub fn to_token<T>(mut self, value: T) -> Self
42533            where
42534                T: ::std::convert::TryInto<super::CommonSwapResponseToToken>,
42535                T::Error: ::std::fmt::Display,
42536            {
42537                self.to_token = value
42538                    .try_into()
42539                    .map_err(|e| format!("error converting supplied value for to_token: {}", e));
42540                self
42541            }
42542        }
42543        impl ::std::convert::TryFrom<CommonSwapResponse> for super::CommonSwapResponse {
42544            type Error = super::error::ConversionError;
42545            fn try_from(
42546                value: CommonSwapResponse,
42547            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42548                Ok(Self {
42549                    block_number: value.block_number?,
42550                    fees: value.fees?,
42551                    from_amount: value.from_amount?,
42552                    from_token: value.from_token?,
42553                    issues: value.issues?,
42554                    liquidity_available: value.liquidity_available?,
42555                    min_to_amount: value.min_to_amount?,
42556                    to_amount: value.to_amount?,
42557                    to_token: value.to_token?,
42558                })
42559            }
42560        }
42561        impl ::std::convert::From<super::CommonSwapResponse> for CommonSwapResponse {
42562            fn from(value: super::CommonSwapResponse) -> Self {
42563                Self {
42564                    block_number: Ok(value.block_number),
42565                    fees: Ok(value.fees),
42566                    from_amount: Ok(value.from_amount),
42567                    from_token: Ok(value.from_token),
42568                    issues: Ok(value.issues),
42569                    liquidity_available: Ok(value.liquidity_available),
42570                    min_to_amount: Ok(value.min_to_amount),
42571                    to_amount: Ok(value.to_amount),
42572                    to_token: Ok(value.to_token),
42573                }
42574            }
42575        }
42576        #[derive(Clone, Debug)]
42577        pub struct CommonSwapResponseFees {
42578            gas_fee: ::std::result::Result<
42579                ::std::option::Option<super::TokenFee>,
42580                ::std::string::String,
42581            >,
42582            protocol_fee: ::std::result::Result<
42583                ::std::option::Option<super::TokenFee>,
42584                ::std::string::String,
42585            >,
42586        }
42587        impl ::std::default::Default for CommonSwapResponseFees {
42588            fn default() -> Self {
42589                Self {
42590                    gas_fee: Err("no value supplied for gas_fee".to_string()),
42591                    protocol_fee: Err("no value supplied for protocol_fee".to_string()),
42592                }
42593            }
42594        }
42595        impl CommonSwapResponseFees {
42596            pub fn gas_fee<T>(mut self, value: T) -> Self
42597            where
42598                T: ::std::convert::TryInto<::std::option::Option<super::TokenFee>>,
42599                T::Error: ::std::fmt::Display,
42600            {
42601                self.gas_fee = value
42602                    .try_into()
42603                    .map_err(|e| format!("error converting supplied value for gas_fee: {}", e));
42604                self
42605            }
42606            pub fn protocol_fee<T>(mut self, value: T) -> Self
42607            where
42608                T: ::std::convert::TryInto<::std::option::Option<super::TokenFee>>,
42609                T::Error: ::std::fmt::Display,
42610            {
42611                self.protocol_fee = value.try_into().map_err(|e| {
42612                    format!("error converting supplied value for protocol_fee: {}", e)
42613                });
42614                self
42615            }
42616        }
42617        impl ::std::convert::TryFrom<CommonSwapResponseFees> for super::CommonSwapResponseFees {
42618            type Error = super::error::ConversionError;
42619            fn try_from(
42620                value: CommonSwapResponseFees,
42621            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42622                Ok(Self {
42623                    gas_fee: value.gas_fee?,
42624                    protocol_fee: value.protocol_fee?,
42625                })
42626            }
42627        }
42628        impl ::std::convert::From<super::CommonSwapResponseFees> for CommonSwapResponseFees {
42629            fn from(value: super::CommonSwapResponseFees) -> Self {
42630                Self {
42631                    gas_fee: Ok(value.gas_fee),
42632                    protocol_fee: Ok(value.protocol_fee),
42633                }
42634            }
42635        }
42636        #[derive(Clone, Debug)]
42637        pub struct CommonSwapResponseIssues {
42638            allowance: ::std::result::Result<
42639                ::std::option::Option<super::CommonSwapResponseIssuesAllowance>,
42640                ::std::string::String,
42641            >,
42642            balance: ::std::result::Result<
42643                ::std::option::Option<super::CommonSwapResponseIssuesBalance>,
42644                ::std::string::String,
42645            >,
42646            simulation_incomplete: ::std::result::Result<bool, ::std::string::String>,
42647        }
42648        impl ::std::default::Default for CommonSwapResponseIssues {
42649            fn default() -> Self {
42650                Self {
42651                    allowance: Err("no value supplied for allowance".to_string()),
42652                    balance: Err("no value supplied for balance".to_string()),
42653                    simulation_incomplete: Err(
42654                        "no value supplied for simulation_incomplete".to_string()
42655                    ),
42656                }
42657            }
42658        }
42659        impl CommonSwapResponseIssues {
42660            pub fn allowance<T>(mut self, value: T) -> Self
42661            where
42662                T: ::std::convert::TryInto<
42663                    ::std::option::Option<super::CommonSwapResponseIssuesAllowance>,
42664                >,
42665                T::Error: ::std::fmt::Display,
42666            {
42667                self.allowance = value
42668                    .try_into()
42669                    .map_err(|e| format!("error converting supplied value for allowance: {}", e));
42670                self
42671            }
42672            pub fn balance<T>(mut self, value: T) -> Self
42673            where
42674                T: ::std::convert::TryInto<
42675                    ::std::option::Option<super::CommonSwapResponseIssuesBalance>,
42676                >,
42677                T::Error: ::std::fmt::Display,
42678            {
42679                self.balance = value
42680                    .try_into()
42681                    .map_err(|e| format!("error converting supplied value for balance: {}", e));
42682                self
42683            }
42684            pub fn simulation_incomplete<T>(mut self, value: T) -> Self
42685            where
42686                T: ::std::convert::TryInto<bool>,
42687                T::Error: ::std::fmt::Display,
42688            {
42689                self.simulation_incomplete = value.try_into().map_err(|e| {
42690                    format!(
42691                        "error converting supplied value for simulation_incomplete: {}",
42692                        e
42693                    )
42694                });
42695                self
42696            }
42697        }
42698        impl ::std::convert::TryFrom<CommonSwapResponseIssues> for super::CommonSwapResponseIssues {
42699            type Error = super::error::ConversionError;
42700            fn try_from(
42701                value: CommonSwapResponseIssues,
42702            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42703                Ok(Self {
42704                    allowance: value.allowance?,
42705                    balance: value.balance?,
42706                    simulation_incomplete: value.simulation_incomplete?,
42707                })
42708            }
42709        }
42710        impl ::std::convert::From<super::CommonSwapResponseIssues> for CommonSwapResponseIssues {
42711            fn from(value: super::CommonSwapResponseIssues) -> Self {
42712                Self {
42713                    allowance: Ok(value.allowance),
42714                    balance: Ok(value.balance),
42715                    simulation_incomplete: Ok(value.simulation_incomplete),
42716                }
42717            }
42718        }
42719        #[derive(Clone, Debug)]
42720        pub struct CommonSwapResponseIssuesAllowance {
42721            current_allowance: ::std::result::Result<
42722                super::CommonSwapResponseIssuesAllowanceCurrentAllowance,
42723                ::std::string::String,
42724            >,
42725            spender: ::std::result::Result<
42726                super::CommonSwapResponseIssuesAllowanceSpender,
42727                ::std::string::String,
42728            >,
42729        }
42730        impl ::std::default::Default for CommonSwapResponseIssuesAllowance {
42731            fn default() -> Self {
42732                Self {
42733                    current_allowance: Err("no value supplied for current_allowance".to_string()),
42734                    spender: Err("no value supplied for spender".to_string()),
42735                }
42736            }
42737        }
42738        impl CommonSwapResponseIssuesAllowance {
42739            pub fn current_allowance<T>(mut self, value: T) -> Self
42740            where
42741                T: ::std::convert::TryInto<
42742                    super::CommonSwapResponseIssuesAllowanceCurrentAllowance,
42743                >,
42744                T::Error: ::std::fmt::Display,
42745            {
42746                self.current_allowance = value.try_into().map_err(|e| {
42747                    format!(
42748                        "error converting supplied value for current_allowance: {}",
42749                        e
42750                    )
42751                });
42752                self
42753            }
42754            pub fn spender<T>(mut self, value: T) -> Self
42755            where
42756                T: ::std::convert::TryInto<super::CommonSwapResponseIssuesAllowanceSpender>,
42757                T::Error: ::std::fmt::Display,
42758            {
42759                self.spender = value
42760                    .try_into()
42761                    .map_err(|e| format!("error converting supplied value for spender: {}", e));
42762                self
42763            }
42764        }
42765        impl ::std::convert::TryFrom<CommonSwapResponseIssuesAllowance>
42766            for super::CommonSwapResponseIssuesAllowance
42767        {
42768            type Error = super::error::ConversionError;
42769            fn try_from(
42770                value: CommonSwapResponseIssuesAllowance,
42771            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42772                Ok(Self {
42773                    current_allowance: value.current_allowance?,
42774                    spender: value.spender?,
42775                })
42776            }
42777        }
42778        impl ::std::convert::From<super::CommonSwapResponseIssuesAllowance>
42779            for CommonSwapResponseIssuesAllowance
42780        {
42781            fn from(value: super::CommonSwapResponseIssuesAllowance) -> Self {
42782                Self {
42783                    current_allowance: Ok(value.current_allowance),
42784                    spender: Ok(value.spender),
42785                }
42786            }
42787        }
42788        #[derive(Clone, Debug)]
42789        pub struct CommonSwapResponseIssuesBalance {
42790            current_balance: ::std::result::Result<
42791                super::CommonSwapResponseIssuesBalanceCurrentBalance,
42792                ::std::string::String,
42793            >,
42794            required_balance: ::std::result::Result<
42795                super::CommonSwapResponseIssuesBalanceRequiredBalance,
42796                ::std::string::String,
42797            >,
42798            token: ::std::result::Result<
42799                super::CommonSwapResponseIssuesBalanceToken,
42800                ::std::string::String,
42801            >,
42802        }
42803        impl ::std::default::Default for CommonSwapResponseIssuesBalance {
42804            fn default() -> Self {
42805                Self {
42806                    current_balance: Err("no value supplied for current_balance".to_string()),
42807                    required_balance: Err("no value supplied for required_balance".to_string()),
42808                    token: Err("no value supplied for token".to_string()),
42809                }
42810            }
42811        }
42812        impl CommonSwapResponseIssuesBalance {
42813            pub fn current_balance<T>(mut self, value: T) -> Self
42814            where
42815                T: ::std::convert::TryInto<super::CommonSwapResponseIssuesBalanceCurrentBalance>,
42816                T::Error: ::std::fmt::Display,
42817            {
42818                self.current_balance = value.try_into().map_err(|e| {
42819                    format!("error converting supplied value for current_balance: {}", e)
42820                });
42821                self
42822            }
42823            pub fn required_balance<T>(mut self, value: T) -> Self
42824            where
42825                T: ::std::convert::TryInto<super::CommonSwapResponseIssuesBalanceRequiredBalance>,
42826                T::Error: ::std::fmt::Display,
42827            {
42828                self.required_balance = value.try_into().map_err(|e| {
42829                    format!(
42830                        "error converting supplied value for required_balance: {}",
42831                        e
42832                    )
42833                });
42834                self
42835            }
42836            pub fn token<T>(mut self, value: T) -> Self
42837            where
42838                T: ::std::convert::TryInto<super::CommonSwapResponseIssuesBalanceToken>,
42839                T::Error: ::std::fmt::Display,
42840            {
42841                self.token = value
42842                    .try_into()
42843                    .map_err(|e| format!("error converting supplied value for token: {}", e));
42844                self
42845            }
42846        }
42847        impl ::std::convert::TryFrom<CommonSwapResponseIssuesBalance>
42848            for super::CommonSwapResponseIssuesBalance
42849        {
42850            type Error = super::error::ConversionError;
42851            fn try_from(
42852                value: CommonSwapResponseIssuesBalance,
42853            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42854                Ok(Self {
42855                    current_balance: value.current_balance?,
42856                    required_balance: value.required_balance?,
42857                    token: value.token?,
42858                })
42859            }
42860        }
42861        impl ::std::convert::From<super::CommonSwapResponseIssuesBalance>
42862            for CommonSwapResponseIssuesBalance
42863        {
42864            fn from(value: super::CommonSwapResponseIssuesBalance) -> Self {
42865                Self {
42866                    current_balance: Ok(value.current_balance),
42867                    required_balance: Ok(value.required_balance),
42868                    token: Ok(value.token),
42869                }
42870            }
42871        }
42872        #[derive(Clone, Debug)]
42873        pub struct CreateEndUserBody {
42874            authentication_methods:
42875                ::std::result::Result<super::AuthenticationMethods, ::std::string::String>,
42876            evm_account: ::std::result::Result<
42877                ::std::option::Option<super::CreateEndUserBodyEvmAccount>,
42878                ::std::string::String,
42879            >,
42880            solana_account: ::std::result::Result<
42881                ::std::option::Option<super::CreateEndUserBodySolanaAccount>,
42882                ::std::string::String,
42883            >,
42884            user_id: ::std::result::Result<
42885                ::std::option::Option<super::CreateEndUserBodyUserId>,
42886                ::std::string::String,
42887            >,
42888        }
42889        impl ::std::default::Default for CreateEndUserBody {
42890            fn default() -> Self {
42891                Self {
42892                    authentication_methods: Err(
42893                        "no value supplied for authentication_methods".to_string()
42894                    ),
42895                    evm_account: Ok(Default::default()),
42896                    solana_account: Ok(Default::default()),
42897                    user_id: Ok(Default::default()),
42898                }
42899            }
42900        }
42901        impl CreateEndUserBody {
42902            pub fn authentication_methods<T>(mut self, value: T) -> Self
42903            where
42904                T: ::std::convert::TryInto<super::AuthenticationMethods>,
42905                T::Error: ::std::fmt::Display,
42906            {
42907                self.authentication_methods = value.try_into().map_err(|e| {
42908                    format!(
42909                        "error converting supplied value for authentication_methods: {}",
42910                        e
42911                    )
42912                });
42913                self
42914            }
42915            pub fn evm_account<T>(mut self, value: T) -> Self
42916            where
42917                T: ::std::convert::TryInto<
42918                    ::std::option::Option<super::CreateEndUserBodyEvmAccount>,
42919                >,
42920                T::Error: ::std::fmt::Display,
42921            {
42922                self.evm_account = value
42923                    .try_into()
42924                    .map_err(|e| format!("error converting supplied value for evm_account: {}", e));
42925                self
42926            }
42927            pub fn solana_account<T>(mut self, value: T) -> Self
42928            where
42929                T: ::std::convert::TryInto<
42930                    ::std::option::Option<super::CreateEndUserBodySolanaAccount>,
42931                >,
42932                T::Error: ::std::fmt::Display,
42933            {
42934                self.solana_account = value.try_into().map_err(|e| {
42935                    format!("error converting supplied value for solana_account: {}", e)
42936                });
42937                self
42938            }
42939            pub fn user_id<T>(mut self, value: T) -> Self
42940            where
42941                T: ::std::convert::TryInto<::std::option::Option<super::CreateEndUserBodyUserId>>,
42942                T::Error: ::std::fmt::Display,
42943            {
42944                self.user_id = value
42945                    .try_into()
42946                    .map_err(|e| format!("error converting supplied value for user_id: {}", e));
42947                self
42948            }
42949        }
42950        impl ::std::convert::TryFrom<CreateEndUserBody> for super::CreateEndUserBody {
42951            type Error = super::error::ConversionError;
42952            fn try_from(
42953                value: CreateEndUserBody,
42954            ) -> ::std::result::Result<Self, super::error::ConversionError> {
42955                Ok(Self {
42956                    authentication_methods: value.authentication_methods?,
42957                    evm_account: value.evm_account?,
42958                    solana_account: value.solana_account?,
42959                    user_id: value.user_id?,
42960                })
42961            }
42962        }
42963        impl ::std::convert::From<super::CreateEndUserBody> for CreateEndUserBody {
42964            fn from(value: super::CreateEndUserBody) -> Self {
42965                Self {
42966                    authentication_methods: Ok(value.authentication_methods),
42967                    evm_account: Ok(value.evm_account),
42968                    solana_account: Ok(value.solana_account),
42969                    user_id: Ok(value.user_id),
42970                }
42971            }
42972        }
42973        #[derive(Clone, Debug)]
42974        pub struct CreateEndUserBodyEvmAccount {
42975            create_smart_account: ::std::result::Result<bool, ::std::string::String>,
42976        }
42977        impl ::std::default::Default for CreateEndUserBodyEvmAccount {
42978            fn default() -> Self {
42979                Self {
42980                    create_smart_account: Ok(Default::default()),
42981                }
42982            }
42983        }
42984        impl CreateEndUserBodyEvmAccount {
42985            pub fn create_smart_account<T>(mut self, value: T) -> Self
42986            where
42987                T: ::std::convert::TryInto<bool>,
42988                T::Error: ::std::fmt::Display,
42989            {
42990                self.create_smart_account = value.try_into().map_err(|e| {
42991                    format!(
42992                        "error converting supplied value for create_smart_account: {}",
42993                        e
42994                    )
42995                });
42996                self
42997            }
42998        }
42999        impl ::std::convert::TryFrom<CreateEndUserBodyEvmAccount> for super::CreateEndUserBodyEvmAccount {
43000            type Error = super::error::ConversionError;
43001            fn try_from(
43002                value: CreateEndUserBodyEvmAccount,
43003            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43004                Ok(Self {
43005                    create_smart_account: value.create_smart_account?,
43006                })
43007            }
43008        }
43009        impl ::std::convert::From<super::CreateEndUserBodyEvmAccount> for CreateEndUserBodyEvmAccount {
43010            fn from(value: super::CreateEndUserBodyEvmAccount) -> Self {
43011                Self {
43012                    create_smart_account: Ok(value.create_smart_account),
43013                }
43014            }
43015        }
43016        #[derive(Clone, Debug)]
43017        pub struct CreateEndUserBodySolanaAccount {
43018            create_smart_account: ::std::result::Result<bool, ::std::string::String>,
43019        }
43020        impl ::std::default::Default for CreateEndUserBodySolanaAccount {
43021            fn default() -> Self {
43022                Self {
43023                    create_smart_account: Ok(Default::default()),
43024                }
43025            }
43026        }
43027        impl CreateEndUserBodySolanaAccount {
43028            pub fn create_smart_account<T>(mut self, value: T) -> Self
43029            where
43030                T: ::std::convert::TryInto<bool>,
43031                T::Error: ::std::fmt::Display,
43032            {
43033                self.create_smart_account = value.try_into().map_err(|e| {
43034                    format!(
43035                        "error converting supplied value for create_smart_account: {}",
43036                        e
43037                    )
43038                });
43039                self
43040            }
43041        }
43042        impl ::std::convert::TryFrom<CreateEndUserBodySolanaAccount>
43043            for super::CreateEndUserBodySolanaAccount
43044        {
43045            type Error = super::error::ConversionError;
43046            fn try_from(
43047                value: CreateEndUserBodySolanaAccount,
43048            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43049                Ok(Self {
43050                    create_smart_account: value.create_smart_account?,
43051                })
43052            }
43053        }
43054        impl ::std::convert::From<super::CreateEndUserBodySolanaAccount>
43055            for CreateEndUserBodySolanaAccount
43056        {
43057            fn from(value: super::CreateEndUserBodySolanaAccount) -> Self {
43058                Self {
43059                    create_smart_account: Ok(value.create_smart_account),
43060                }
43061            }
43062        }
43063        #[derive(Clone, Debug)]
43064        pub struct CreateEvmAccountBody {
43065            account_policy: ::std::result::Result<
43066                ::std::option::Option<super::CreateEvmAccountBodyAccountPolicy>,
43067                ::std::string::String,
43068            >,
43069            name: ::std::result::Result<
43070                ::std::option::Option<super::CreateEvmAccountBodyName>,
43071                ::std::string::String,
43072            >,
43073        }
43074        impl ::std::default::Default for CreateEvmAccountBody {
43075            fn default() -> Self {
43076                Self {
43077                    account_policy: Ok(Default::default()),
43078                    name: Ok(Default::default()),
43079                }
43080            }
43081        }
43082        impl CreateEvmAccountBody {
43083            pub fn account_policy<T>(mut self, value: T) -> Self
43084            where
43085                T: ::std::convert::TryInto<
43086                    ::std::option::Option<super::CreateEvmAccountBodyAccountPolicy>,
43087                >,
43088                T::Error: ::std::fmt::Display,
43089            {
43090                self.account_policy = value.try_into().map_err(|e| {
43091                    format!("error converting supplied value for account_policy: {}", e)
43092                });
43093                self
43094            }
43095            pub fn name<T>(mut self, value: T) -> Self
43096            where
43097                T: ::std::convert::TryInto<::std::option::Option<super::CreateEvmAccountBodyName>>,
43098                T::Error: ::std::fmt::Display,
43099            {
43100                self.name = value
43101                    .try_into()
43102                    .map_err(|e| format!("error converting supplied value for name: {}", e));
43103                self
43104            }
43105        }
43106        impl ::std::convert::TryFrom<CreateEvmAccountBody> for super::CreateEvmAccountBody {
43107            type Error = super::error::ConversionError;
43108            fn try_from(
43109                value: CreateEvmAccountBody,
43110            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43111                Ok(Self {
43112                    account_policy: value.account_policy?,
43113                    name: value.name?,
43114                })
43115            }
43116        }
43117        impl ::std::convert::From<super::CreateEvmAccountBody> for CreateEvmAccountBody {
43118            fn from(value: super::CreateEvmAccountBody) -> Self {
43119                Self {
43120                    account_policy: Ok(value.account_policy),
43121                    name: Ok(value.name),
43122                }
43123            }
43124        }
43125        #[derive(Clone, Debug)]
43126        pub struct CreateEvmSmartAccountBody {
43127            name: ::std::result::Result<
43128                ::std::option::Option<super::CreateEvmSmartAccountBodyName>,
43129                ::std::string::String,
43130            >,
43131            owners: ::std::result::Result<
43132                ::std::vec::Vec<super::CreateEvmSmartAccountBodyOwnersItem>,
43133                ::std::string::String,
43134            >,
43135        }
43136        impl ::std::default::Default for CreateEvmSmartAccountBody {
43137            fn default() -> Self {
43138                Self {
43139                    name: Ok(Default::default()),
43140                    owners: Err("no value supplied for owners".to_string()),
43141                }
43142            }
43143        }
43144        impl CreateEvmSmartAccountBody {
43145            pub fn name<T>(mut self, value: T) -> Self
43146            where
43147                T: ::std::convert::TryInto<
43148                    ::std::option::Option<super::CreateEvmSmartAccountBodyName>,
43149                >,
43150                T::Error: ::std::fmt::Display,
43151            {
43152                self.name = value
43153                    .try_into()
43154                    .map_err(|e| format!("error converting supplied value for name: {}", e));
43155                self
43156            }
43157            pub fn owners<T>(mut self, value: T) -> Self
43158            where
43159                T: ::std::convert::TryInto<
43160                    ::std::vec::Vec<super::CreateEvmSmartAccountBodyOwnersItem>,
43161                >,
43162                T::Error: ::std::fmt::Display,
43163            {
43164                self.owners = value
43165                    .try_into()
43166                    .map_err(|e| format!("error converting supplied value for owners: {}", e));
43167                self
43168            }
43169        }
43170        impl ::std::convert::TryFrom<CreateEvmSmartAccountBody> for super::CreateEvmSmartAccountBody {
43171            type Error = super::error::ConversionError;
43172            fn try_from(
43173                value: CreateEvmSmartAccountBody,
43174            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43175                Ok(Self {
43176                    name: value.name?,
43177                    owners: value.owners?,
43178                })
43179            }
43180        }
43181        impl ::std::convert::From<super::CreateEvmSmartAccountBody> for CreateEvmSmartAccountBody {
43182            fn from(value: super::CreateEvmSmartAccountBody) -> Self {
43183                Self {
43184                    name: Ok(value.name),
43185                    owners: Ok(value.owners),
43186                }
43187            }
43188        }
43189        #[derive(Clone, Debug)]
43190        pub struct CreateEvmSwapQuoteBody {
43191            from_amount: ::std::result::Result<
43192                super::CreateEvmSwapQuoteBodyFromAmount,
43193                ::std::string::String,
43194            >,
43195            from_token: ::std::result::Result<
43196                super::CreateEvmSwapQuoteBodyFromToken,
43197                ::std::string::String,
43198            >,
43199            gas_price: ::std::result::Result<
43200                ::std::option::Option<super::CreateEvmSwapQuoteBodyGasPrice>,
43201                ::std::string::String,
43202            >,
43203            network: ::std::result::Result<super::EvmSwapsNetwork, ::std::string::String>,
43204            signer_address: ::std::result::Result<
43205                ::std::option::Option<super::CreateEvmSwapQuoteBodySignerAddress>,
43206                ::std::string::String,
43207            >,
43208            slippage_bps: ::std::result::Result<i64, ::std::string::String>,
43209            taker: ::std::result::Result<super::CreateEvmSwapQuoteBodyTaker, ::std::string::String>,
43210            to_token:
43211                ::std::result::Result<super::CreateEvmSwapQuoteBodyToToken, ::std::string::String>,
43212        }
43213        impl ::std::default::Default for CreateEvmSwapQuoteBody {
43214            fn default() -> Self {
43215                Self {
43216                    from_amount: Err("no value supplied for from_amount".to_string()),
43217                    from_token: Err("no value supplied for from_token".to_string()),
43218                    gas_price: Ok(Default::default()),
43219                    network: Err("no value supplied for network".to_string()),
43220                    signer_address: Ok(Default::default()),
43221                    slippage_bps: Ok(super::defaults::default_u64::<i64, 100>()),
43222                    taker: Err("no value supplied for taker".to_string()),
43223                    to_token: Err("no value supplied for to_token".to_string()),
43224                }
43225            }
43226        }
43227        impl CreateEvmSwapQuoteBody {
43228            pub fn from_amount<T>(mut self, value: T) -> Self
43229            where
43230                T: ::std::convert::TryInto<super::CreateEvmSwapQuoteBodyFromAmount>,
43231                T::Error: ::std::fmt::Display,
43232            {
43233                self.from_amount = value
43234                    .try_into()
43235                    .map_err(|e| format!("error converting supplied value for from_amount: {}", e));
43236                self
43237            }
43238            pub fn from_token<T>(mut self, value: T) -> Self
43239            where
43240                T: ::std::convert::TryInto<super::CreateEvmSwapQuoteBodyFromToken>,
43241                T::Error: ::std::fmt::Display,
43242            {
43243                self.from_token = value
43244                    .try_into()
43245                    .map_err(|e| format!("error converting supplied value for from_token: {}", e));
43246                self
43247            }
43248            pub fn gas_price<T>(mut self, value: T) -> Self
43249            where
43250                T: ::std::convert::TryInto<
43251                    ::std::option::Option<super::CreateEvmSwapQuoteBodyGasPrice>,
43252                >,
43253                T::Error: ::std::fmt::Display,
43254            {
43255                self.gas_price = value
43256                    .try_into()
43257                    .map_err(|e| format!("error converting supplied value for gas_price: {}", e));
43258                self
43259            }
43260            pub fn network<T>(mut self, value: T) -> Self
43261            where
43262                T: ::std::convert::TryInto<super::EvmSwapsNetwork>,
43263                T::Error: ::std::fmt::Display,
43264            {
43265                self.network = value
43266                    .try_into()
43267                    .map_err(|e| format!("error converting supplied value for network: {}", e));
43268                self
43269            }
43270            pub fn signer_address<T>(mut self, value: T) -> Self
43271            where
43272                T: ::std::convert::TryInto<
43273                    ::std::option::Option<super::CreateEvmSwapQuoteBodySignerAddress>,
43274                >,
43275                T::Error: ::std::fmt::Display,
43276            {
43277                self.signer_address = value.try_into().map_err(|e| {
43278                    format!("error converting supplied value for signer_address: {}", e)
43279                });
43280                self
43281            }
43282            pub fn slippage_bps<T>(mut self, value: T) -> Self
43283            where
43284                T: ::std::convert::TryInto<i64>,
43285                T::Error: ::std::fmt::Display,
43286            {
43287                self.slippage_bps = value.try_into().map_err(|e| {
43288                    format!("error converting supplied value for slippage_bps: {}", e)
43289                });
43290                self
43291            }
43292            pub fn taker<T>(mut self, value: T) -> Self
43293            where
43294                T: ::std::convert::TryInto<super::CreateEvmSwapQuoteBodyTaker>,
43295                T::Error: ::std::fmt::Display,
43296            {
43297                self.taker = value
43298                    .try_into()
43299                    .map_err(|e| format!("error converting supplied value for taker: {}", e));
43300                self
43301            }
43302            pub fn to_token<T>(mut self, value: T) -> Self
43303            where
43304                T: ::std::convert::TryInto<super::CreateEvmSwapQuoteBodyToToken>,
43305                T::Error: ::std::fmt::Display,
43306            {
43307                self.to_token = value
43308                    .try_into()
43309                    .map_err(|e| format!("error converting supplied value for to_token: {}", e));
43310                self
43311            }
43312        }
43313        impl ::std::convert::TryFrom<CreateEvmSwapQuoteBody> for super::CreateEvmSwapQuoteBody {
43314            type Error = super::error::ConversionError;
43315            fn try_from(
43316                value: CreateEvmSwapQuoteBody,
43317            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43318                Ok(Self {
43319                    from_amount: value.from_amount?,
43320                    from_token: value.from_token?,
43321                    gas_price: value.gas_price?,
43322                    network: value.network?,
43323                    signer_address: value.signer_address?,
43324                    slippage_bps: value.slippage_bps?,
43325                    taker: value.taker?,
43326                    to_token: value.to_token?,
43327                })
43328            }
43329        }
43330        impl ::std::convert::From<super::CreateEvmSwapQuoteBody> for CreateEvmSwapQuoteBody {
43331            fn from(value: super::CreateEvmSwapQuoteBody) -> Self {
43332                Self {
43333                    from_amount: Ok(value.from_amount),
43334                    from_token: Ok(value.from_token),
43335                    gas_price: Ok(value.gas_price),
43336                    network: Ok(value.network),
43337                    signer_address: Ok(value.signer_address),
43338                    slippage_bps: Ok(value.slippage_bps),
43339                    taker: Ok(value.taker),
43340                    to_token: Ok(value.to_token),
43341                }
43342            }
43343        }
43344        #[derive(Clone, Debug)]
43345        pub struct CreateOnrampOrderBody {
43346            agreement_accepted_at: ::std::result::Result<
43347                ::chrono::DateTime<::chrono::offset::Utc>,
43348                ::std::string::String,
43349            >,
43350            client_ip: ::std::result::Result<
43351                ::std::option::Option<::std::string::String>,
43352                ::std::string::String,
43353            >,
43354            destination_address:
43355                ::std::result::Result<::std::string::String, ::std::string::String>,
43356            destination_network:
43357                ::std::result::Result<::std::string::String, ::std::string::String>,
43358            domain: ::std::result::Result<
43359                ::std::option::Option<::std::string::String>,
43360                ::std::string::String,
43361            >,
43362            email: ::std::result::Result<::std::string::String, ::std::string::String>,
43363            is_quote: ::std::result::Result<bool, ::std::string::String>,
43364            partner_order_ref: ::std::result::Result<
43365                ::std::option::Option<::std::string::String>,
43366                ::std::string::String,
43367            >,
43368            partner_user_ref: ::std::result::Result<::std::string::String, ::std::string::String>,
43369            payment_amount: ::std::result::Result<
43370                ::std::option::Option<::std::string::String>,
43371                ::std::string::String,
43372            >,
43373            payment_currency: ::std::result::Result<::std::string::String, ::std::string::String>,
43374            payment_method:
43375                ::std::result::Result<super::OnrampOrderPaymentMethodTypeId, ::std::string::String>,
43376            phone_number: ::std::result::Result<::std::string::String, ::std::string::String>,
43377            phone_number_verified_at: ::std::result::Result<
43378                ::chrono::DateTime<::chrono::offset::Utc>,
43379                ::std::string::String,
43380            >,
43381            purchase_amount: ::std::result::Result<
43382                ::std::option::Option<::std::string::String>,
43383                ::std::string::String,
43384            >,
43385            purchase_currency: ::std::result::Result<::std::string::String, ::std::string::String>,
43386        }
43387        impl ::std::default::Default for CreateOnrampOrderBody {
43388            fn default() -> Self {
43389                Self {
43390                    agreement_accepted_at: Err(
43391                        "no value supplied for agreement_accepted_at".to_string()
43392                    ),
43393                    client_ip: Ok(Default::default()),
43394                    destination_address: Err(
43395                        "no value supplied for destination_address".to_string()
43396                    ),
43397                    destination_network: Err(
43398                        "no value supplied for destination_network".to_string()
43399                    ),
43400                    domain: Ok(Default::default()),
43401                    email: Err("no value supplied for email".to_string()),
43402                    is_quote: Ok(Default::default()),
43403                    partner_order_ref: Ok(Default::default()),
43404                    partner_user_ref: Err("no value supplied for partner_user_ref".to_string()),
43405                    payment_amount: Ok(Default::default()),
43406                    payment_currency: Err("no value supplied for payment_currency".to_string()),
43407                    payment_method: Err("no value supplied for payment_method".to_string()),
43408                    phone_number: Err("no value supplied for phone_number".to_string()),
43409                    phone_number_verified_at: Err(
43410                        "no value supplied for phone_number_verified_at".to_string()
43411                    ),
43412                    purchase_amount: Ok(Default::default()),
43413                    purchase_currency: Err("no value supplied for purchase_currency".to_string()),
43414                }
43415            }
43416        }
43417        impl CreateOnrampOrderBody {
43418            pub fn agreement_accepted_at<T>(mut self, value: T) -> Self
43419            where
43420                T: ::std::convert::TryInto<::chrono::DateTime<::chrono::offset::Utc>>,
43421                T::Error: ::std::fmt::Display,
43422            {
43423                self.agreement_accepted_at = value.try_into().map_err(|e| {
43424                    format!(
43425                        "error converting supplied value for agreement_accepted_at: {}",
43426                        e
43427                    )
43428                });
43429                self
43430            }
43431            pub fn client_ip<T>(mut self, value: T) -> Self
43432            where
43433                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43434                T::Error: ::std::fmt::Display,
43435            {
43436                self.client_ip = value
43437                    .try_into()
43438                    .map_err(|e| format!("error converting supplied value for client_ip: {}", e));
43439                self
43440            }
43441            pub fn destination_address<T>(mut self, value: T) -> Self
43442            where
43443                T: ::std::convert::TryInto<::std::string::String>,
43444                T::Error: ::std::fmt::Display,
43445            {
43446                self.destination_address = value.try_into().map_err(|e| {
43447                    format!(
43448                        "error converting supplied value for destination_address: {}",
43449                        e
43450                    )
43451                });
43452                self
43453            }
43454            pub fn destination_network<T>(mut self, value: T) -> Self
43455            where
43456                T: ::std::convert::TryInto<::std::string::String>,
43457                T::Error: ::std::fmt::Display,
43458            {
43459                self.destination_network = value.try_into().map_err(|e| {
43460                    format!(
43461                        "error converting supplied value for destination_network: {}",
43462                        e
43463                    )
43464                });
43465                self
43466            }
43467            pub fn domain<T>(mut self, value: T) -> Self
43468            where
43469                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43470                T::Error: ::std::fmt::Display,
43471            {
43472                self.domain = value
43473                    .try_into()
43474                    .map_err(|e| format!("error converting supplied value for domain: {}", e));
43475                self
43476            }
43477            pub fn email<T>(mut self, value: T) -> Self
43478            where
43479                T: ::std::convert::TryInto<::std::string::String>,
43480                T::Error: ::std::fmt::Display,
43481            {
43482                self.email = value
43483                    .try_into()
43484                    .map_err(|e| format!("error converting supplied value for email: {}", e));
43485                self
43486            }
43487            pub fn is_quote<T>(mut self, value: T) -> Self
43488            where
43489                T: ::std::convert::TryInto<bool>,
43490                T::Error: ::std::fmt::Display,
43491            {
43492                self.is_quote = value
43493                    .try_into()
43494                    .map_err(|e| format!("error converting supplied value for is_quote: {}", e));
43495                self
43496            }
43497            pub fn partner_order_ref<T>(mut self, value: T) -> Self
43498            where
43499                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43500                T::Error: ::std::fmt::Display,
43501            {
43502                self.partner_order_ref = value.try_into().map_err(|e| {
43503                    format!(
43504                        "error converting supplied value for partner_order_ref: {}",
43505                        e
43506                    )
43507                });
43508                self
43509            }
43510            pub fn partner_user_ref<T>(mut self, value: T) -> Self
43511            where
43512                T: ::std::convert::TryInto<::std::string::String>,
43513                T::Error: ::std::fmt::Display,
43514            {
43515                self.partner_user_ref = value.try_into().map_err(|e| {
43516                    format!(
43517                        "error converting supplied value for partner_user_ref: {}",
43518                        e
43519                    )
43520                });
43521                self
43522            }
43523            pub fn payment_amount<T>(mut self, value: T) -> Self
43524            where
43525                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43526                T::Error: ::std::fmt::Display,
43527            {
43528                self.payment_amount = value.try_into().map_err(|e| {
43529                    format!("error converting supplied value for payment_amount: {}", e)
43530                });
43531                self
43532            }
43533            pub fn payment_currency<T>(mut self, value: T) -> Self
43534            where
43535                T: ::std::convert::TryInto<::std::string::String>,
43536                T::Error: ::std::fmt::Display,
43537            {
43538                self.payment_currency = value.try_into().map_err(|e| {
43539                    format!(
43540                        "error converting supplied value for payment_currency: {}",
43541                        e
43542                    )
43543                });
43544                self
43545            }
43546            pub fn payment_method<T>(mut self, value: T) -> Self
43547            where
43548                T: ::std::convert::TryInto<super::OnrampOrderPaymentMethodTypeId>,
43549                T::Error: ::std::fmt::Display,
43550            {
43551                self.payment_method = value.try_into().map_err(|e| {
43552                    format!("error converting supplied value for payment_method: {}", e)
43553                });
43554                self
43555            }
43556            pub fn phone_number<T>(mut self, value: T) -> Self
43557            where
43558                T: ::std::convert::TryInto<::std::string::String>,
43559                T::Error: ::std::fmt::Display,
43560            {
43561                self.phone_number = value.try_into().map_err(|e| {
43562                    format!("error converting supplied value for phone_number: {}", e)
43563                });
43564                self
43565            }
43566            pub fn phone_number_verified_at<T>(mut self, value: T) -> Self
43567            where
43568                T: ::std::convert::TryInto<::chrono::DateTime<::chrono::offset::Utc>>,
43569                T::Error: ::std::fmt::Display,
43570            {
43571                self.phone_number_verified_at = value.try_into().map_err(|e| {
43572                    format!(
43573                        "error converting supplied value for phone_number_verified_at: {}",
43574                        e
43575                    )
43576                });
43577                self
43578            }
43579            pub fn purchase_amount<T>(mut self, value: T) -> Self
43580            where
43581                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43582                T::Error: ::std::fmt::Display,
43583            {
43584                self.purchase_amount = value.try_into().map_err(|e| {
43585                    format!("error converting supplied value for purchase_amount: {}", e)
43586                });
43587                self
43588            }
43589            pub fn purchase_currency<T>(mut self, value: T) -> Self
43590            where
43591                T: ::std::convert::TryInto<::std::string::String>,
43592                T::Error: ::std::fmt::Display,
43593            {
43594                self.purchase_currency = value.try_into().map_err(|e| {
43595                    format!(
43596                        "error converting supplied value for purchase_currency: {}",
43597                        e
43598                    )
43599                });
43600                self
43601            }
43602        }
43603        impl ::std::convert::TryFrom<CreateOnrampOrderBody> for super::CreateOnrampOrderBody {
43604            type Error = super::error::ConversionError;
43605            fn try_from(
43606                value: CreateOnrampOrderBody,
43607            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43608                Ok(Self {
43609                    agreement_accepted_at: value.agreement_accepted_at?,
43610                    client_ip: value.client_ip?,
43611                    destination_address: value.destination_address?,
43612                    destination_network: value.destination_network?,
43613                    domain: value.domain?,
43614                    email: value.email?,
43615                    is_quote: value.is_quote?,
43616                    partner_order_ref: value.partner_order_ref?,
43617                    partner_user_ref: value.partner_user_ref?,
43618                    payment_amount: value.payment_amount?,
43619                    payment_currency: value.payment_currency?,
43620                    payment_method: value.payment_method?,
43621                    phone_number: value.phone_number?,
43622                    phone_number_verified_at: value.phone_number_verified_at?,
43623                    purchase_amount: value.purchase_amount?,
43624                    purchase_currency: value.purchase_currency?,
43625                })
43626            }
43627        }
43628        impl ::std::convert::From<super::CreateOnrampOrderBody> for CreateOnrampOrderBody {
43629            fn from(value: super::CreateOnrampOrderBody) -> Self {
43630                Self {
43631                    agreement_accepted_at: Ok(value.agreement_accepted_at),
43632                    client_ip: Ok(value.client_ip),
43633                    destination_address: Ok(value.destination_address),
43634                    destination_network: Ok(value.destination_network),
43635                    domain: Ok(value.domain),
43636                    email: Ok(value.email),
43637                    is_quote: Ok(value.is_quote),
43638                    partner_order_ref: Ok(value.partner_order_ref),
43639                    partner_user_ref: Ok(value.partner_user_ref),
43640                    payment_amount: Ok(value.payment_amount),
43641                    payment_currency: Ok(value.payment_currency),
43642                    payment_method: Ok(value.payment_method),
43643                    phone_number: Ok(value.phone_number),
43644                    phone_number_verified_at: Ok(value.phone_number_verified_at),
43645                    purchase_amount: Ok(value.purchase_amount),
43646                    purchase_currency: Ok(value.purchase_currency),
43647                }
43648            }
43649        }
43650        #[derive(Clone, Debug)]
43651        pub struct CreateOnrampOrderResponse {
43652            order: ::std::result::Result<super::OnrampOrder, ::std::string::String>,
43653            payment_link: ::std::result::Result<
43654                ::std::option::Option<super::OnrampPaymentLink>,
43655                ::std::string::String,
43656            >,
43657        }
43658        impl ::std::default::Default for CreateOnrampOrderResponse {
43659            fn default() -> Self {
43660                Self {
43661                    order: Err("no value supplied for order".to_string()),
43662                    payment_link: Ok(Default::default()),
43663                }
43664            }
43665        }
43666        impl CreateOnrampOrderResponse {
43667            pub fn order<T>(mut self, value: T) -> Self
43668            where
43669                T: ::std::convert::TryInto<super::OnrampOrder>,
43670                T::Error: ::std::fmt::Display,
43671            {
43672                self.order = value
43673                    .try_into()
43674                    .map_err(|e| format!("error converting supplied value for order: {}", e));
43675                self
43676            }
43677            pub fn payment_link<T>(mut self, value: T) -> Self
43678            where
43679                T: ::std::convert::TryInto<::std::option::Option<super::OnrampPaymentLink>>,
43680                T::Error: ::std::fmt::Display,
43681            {
43682                self.payment_link = value.try_into().map_err(|e| {
43683                    format!("error converting supplied value for payment_link: {}", e)
43684                });
43685                self
43686            }
43687        }
43688        impl ::std::convert::TryFrom<CreateOnrampOrderResponse> for super::CreateOnrampOrderResponse {
43689            type Error = super::error::ConversionError;
43690            fn try_from(
43691                value: CreateOnrampOrderResponse,
43692            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43693                Ok(Self {
43694                    order: value.order?,
43695                    payment_link: value.payment_link?,
43696                })
43697            }
43698        }
43699        impl ::std::convert::From<super::CreateOnrampOrderResponse> for CreateOnrampOrderResponse {
43700            fn from(value: super::CreateOnrampOrderResponse) -> Self {
43701                Self {
43702                    order: Ok(value.order),
43703                    payment_link: Ok(value.payment_link),
43704                }
43705            }
43706        }
43707        #[derive(Clone, Debug)]
43708        pub struct CreateOnrampSessionBody {
43709            client_ip: ::std::result::Result<
43710                ::std::option::Option<::std::string::String>,
43711                ::std::string::String,
43712            >,
43713            country: ::std::result::Result<
43714                ::std::option::Option<::std::string::String>,
43715                ::std::string::String,
43716            >,
43717            destination_address:
43718                ::std::result::Result<::std::string::String, ::std::string::String>,
43719            destination_network:
43720                ::std::result::Result<::std::string::String, ::std::string::String>,
43721            partner_user_ref: ::std::result::Result<
43722                ::std::option::Option<::std::string::String>,
43723                ::std::string::String,
43724            >,
43725            payment_amount: ::std::result::Result<
43726                ::std::option::Option<::std::string::String>,
43727                ::std::string::String,
43728            >,
43729            payment_currency: ::std::result::Result<
43730                ::std::option::Option<::std::string::String>,
43731                ::std::string::String,
43732            >,
43733            payment_method: ::std::result::Result<
43734                ::std::option::Option<super::OnrampQuotePaymentMethodTypeId>,
43735                ::std::string::String,
43736            >,
43737            purchase_currency: ::std::result::Result<::std::string::String, ::std::string::String>,
43738            redirect_url:
43739                ::std::result::Result<::std::option::Option<super::Uri>, ::std::string::String>,
43740            subdivision: ::std::result::Result<
43741                ::std::option::Option<::std::string::String>,
43742                ::std::string::String,
43743            >,
43744        }
43745        impl ::std::default::Default for CreateOnrampSessionBody {
43746            fn default() -> Self {
43747                Self {
43748                    client_ip: Ok(Default::default()),
43749                    country: Ok(Default::default()),
43750                    destination_address: Err(
43751                        "no value supplied for destination_address".to_string()
43752                    ),
43753                    destination_network: Err(
43754                        "no value supplied for destination_network".to_string()
43755                    ),
43756                    partner_user_ref: Ok(Default::default()),
43757                    payment_amount: Ok(Default::default()),
43758                    payment_currency: Ok(Default::default()),
43759                    payment_method: Ok(Default::default()),
43760                    purchase_currency: Err("no value supplied for purchase_currency".to_string()),
43761                    redirect_url: Ok(Default::default()),
43762                    subdivision: Ok(Default::default()),
43763                }
43764            }
43765        }
43766        impl CreateOnrampSessionBody {
43767            pub fn client_ip<T>(mut self, value: T) -> Self
43768            where
43769                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43770                T::Error: ::std::fmt::Display,
43771            {
43772                self.client_ip = value
43773                    .try_into()
43774                    .map_err(|e| format!("error converting supplied value for client_ip: {}", e));
43775                self
43776            }
43777            pub fn country<T>(mut self, value: T) -> Self
43778            where
43779                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43780                T::Error: ::std::fmt::Display,
43781            {
43782                self.country = value
43783                    .try_into()
43784                    .map_err(|e| format!("error converting supplied value for country: {}", e));
43785                self
43786            }
43787            pub fn destination_address<T>(mut self, value: T) -> Self
43788            where
43789                T: ::std::convert::TryInto<::std::string::String>,
43790                T::Error: ::std::fmt::Display,
43791            {
43792                self.destination_address = value.try_into().map_err(|e| {
43793                    format!(
43794                        "error converting supplied value for destination_address: {}",
43795                        e
43796                    )
43797                });
43798                self
43799            }
43800            pub fn destination_network<T>(mut self, value: T) -> Self
43801            where
43802                T: ::std::convert::TryInto<::std::string::String>,
43803                T::Error: ::std::fmt::Display,
43804            {
43805                self.destination_network = value.try_into().map_err(|e| {
43806                    format!(
43807                        "error converting supplied value for destination_network: {}",
43808                        e
43809                    )
43810                });
43811                self
43812            }
43813            pub fn partner_user_ref<T>(mut self, value: T) -> Self
43814            where
43815                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43816                T::Error: ::std::fmt::Display,
43817            {
43818                self.partner_user_ref = value.try_into().map_err(|e| {
43819                    format!(
43820                        "error converting supplied value for partner_user_ref: {}",
43821                        e
43822                    )
43823                });
43824                self
43825            }
43826            pub fn payment_amount<T>(mut self, value: T) -> Self
43827            where
43828                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43829                T::Error: ::std::fmt::Display,
43830            {
43831                self.payment_amount = value.try_into().map_err(|e| {
43832                    format!("error converting supplied value for payment_amount: {}", e)
43833                });
43834                self
43835            }
43836            pub fn payment_currency<T>(mut self, value: T) -> Self
43837            where
43838                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43839                T::Error: ::std::fmt::Display,
43840            {
43841                self.payment_currency = value.try_into().map_err(|e| {
43842                    format!(
43843                        "error converting supplied value for payment_currency: {}",
43844                        e
43845                    )
43846                });
43847                self
43848            }
43849            pub fn payment_method<T>(mut self, value: T) -> Self
43850            where
43851                T: ::std::convert::TryInto<
43852                    ::std::option::Option<super::OnrampQuotePaymentMethodTypeId>,
43853                >,
43854                T::Error: ::std::fmt::Display,
43855            {
43856                self.payment_method = value.try_into().map_err(|e| {
43857                    format!("error converting supplied value for payment_method: {}", e)
43858                });
43859                self
43860            }
43861            pub fn purchase_currency<T>(mut self, value: T) -> Self
43862            where
43863                T: ::std::convert::TryInto<::std::string::String>,
43864                T::Error: ::std::fmt::Display,
43865            {
43866                self.purchase_currency = value.try_into().map_err(|e| {
43867                    format!(
43868                        "error converting supplied value for purchase_currency: {}",
43869                        e
43870                    )
43871                });
43872                self
43873            }
43874            pub fn redirect_url<T>(mut self, value: T) -> Self
43875            where
43876                T: ::std::convert::TryInto<::std::option::Option<super::Uri>>,
43877                T::Error: ::std::fmt::Display,
43878            {
43879                self.redirect_url = value.try_into().map_err(|e| {
43880                    format!("error converting supplied value for redirect_url: {}", e)
43881                });
43882                self
43883            }
43884            pub fn subdivision<T>(mut self, value: T) -> Self
43885            where
43886                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
43887                T::Error: ::std::fmt::Display,
43888            {
43889                self.subdivision = value
43890                    .try_into()
43891                    .map_err(|e| format!("error converting supplied value for subdivision: {}", e));
43892                self
43893            }
43894        }
43895        impl ::std::convert::TryFrom<CreateOnrampSessionBody> for super::CreateOnrampSessionBody {
43896            type Error = super::error::ConversionError;
43897            fn try_from(
43898                value: CreateOnrampSessionBody,
43899            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43900                Ok(Self {
43901                    client_ip: value.client_ip?,
43902                    country: value.country?,
43903                    destination_address: value.destination_address?,
43904                    destination_network: value.destination_network?,
43905                    partner_user_ref: value.partner_user_ref?,
43906                    payment_amount: value.payment_amount?,
43907                    payment_currency: value.payment_currency?,
43908                    payment_method: value.payment_method?,
43909                    purchase_currency: value.purchase_currency?,
43910                    redirect_url: value.redirect_url?,
43911                    subdivision: value.subdivision?,
43912                })
43913            }
43914        }
43915        impl ::std::convert::From<super::CreateOnrampSessionBody> for CreateOnrampSessionBody {
43916            fn from(value: super::CreateOnrampSessionBody) -> Self {
43917                Self {
43918                    client_ip: Ok(value.client_ip),
43919                    country: Ok(value.country),
43920                    destination_address: Ok(value.destination_address),
43921                    destination_network: Ok(value.destination_network),
43922                    partner_user_ref: Ok(value.partner_user_ref),
43923                    payment_amount: Ok(value.payment_amount),
43924                    payment_currency: Ok(value.payment_currency),
43925                    payment_method: Ok(value.payment_method),
43926                    purchase_currency: Ok(value.purchase_currency),
43927                    redirect_url: Ok(value.redirect_url),
43928                    subdivision: Ok(value.subdivision),
43929                }
43930            }
43931        }
43932        #[derive(Clone, Debug)]
43933        pub struct CreateOnrampSessionResponse {
43934            quote: ::std::result::Result<
43935                ::std::option::Option<super::OnrampQuote>,
43936                ::std::string::String,
43937            >,
43938            session: ::std::result::Result<super::OnrampSession, ::std::string::String>,
43939        }
43940        impl ::std::default::Default for CreateOnrampSessionResponse {
43941            fn default() -> Self {
43942                Self {
43943                    quote: Ok(Default::default()),
43944                    session: Err("no value supplied for session".to_string()),
43945                }
43946            }
43947        }
43948        impl CreateOnrampSessionResponse {
43949            pub fn quote<T>(mut self, value: T) -> Self
43950            where
43951                T: ::std::convert::TryInto<::std::option::Option<super::OnrampQuote>>,
43952                T::Error: ::std::fmt::Display,
43953            {
43954                self.quote = value
43955                    .try_into()
43956                    .map_err(|e| format!("error converting supplied value for quote: {}", e));
43957                self
43958            }
43959            pub fn session<T>(mut self, value: T) -> Self
43960            where
43961                T: ::std::convert::TryInto<super::OnrampSession>,
43962                T::Error: ::std::fmt::Display,
43963            {
43964                self.session = value
43965                    .try_into()
43966                    .map_err(|e| format!("error converting supplied value for session: {}", e));
43967                self
43968            }
43969        }
43970        impl ::std::convert::TryFrom<CreateOnrampSessionResponse> for super::CreateOnrampSessionResponse {
43971            type Error = super::error::ConversionError;
43972            fn try_from(
43973                value: CreateOnrampSessionResponse,
43974            ) -> ::std::result::Result<Self, super::error::ConversionError> {
43975                Ok(Self {
43976                    quote: value.quote?,
43977                    session: value.session?,
43978                })
43979            }
43980        }
43981        impl ::std::convert::From<super::CreateOnrampSessionResponse> for CreateOnrampSessionResponse {
43982            fn from(value: super::CreateOnrampSessionResponse) -> Self {
43983                Self {
43984                    quote: Ok(value.quote),
43985                    session: Ok(value.session),
43986                }
43987            }
43988        }
43989        #[derive(Clone, Debug)]
43990        pub struct CreatePolicyBody {
43991            description: ::std::result::Result<
43992                ::std::option::Option<super::CreatePolicyBodyDescription>,
43993                ::std::string::String,
43994            >,
43995            rules: ::std::result::Result<::std::vec::Vec<super::Rule>, ::std::string::String>,
43996            scope: ::std::result::Result<super::CreatePolicyBodyScope, ::std::string::String>,
43997        }
43998        impl ::std::default::Default for CreatePolicyBody {
43999            fn default() -> Self {
44000                Self {
44001                    description: Ok(Default::default()),
44002                    rules: Err("no value supplied for rules".to_string()),
44003                    scope: Err("no value supplied for scope".to_string()),
44004                }
44005            }
44006        }
44007        impl CreatePolicyBody {
44008            pub fn description<T>(mut self, value: T) -> Self
44009            where
44010                T: ::std::convert::TryInto<
44011                    ::std::option::Option<super::CreatePolicyBodyDescription>,
44012                >,
44013                T::Error: ::std::fmt::Display,
44014            {
44015                self.description = value
44016                    .try_into()
44017                    .map_err(|e| format!("error converting supplied value for description: {}", e));
44018                self
44019            }
44020            pub fn rules<T>(mut self, value: T) -> Self
44021            where
44022                T: ::std::convert::TryInto<::std::vec::Vec<super::Rule>>,
44023                T::Error: ::std::fmt::Display,
44024            {
44025                self.rules = value
44026                    .try_into()
44027                    .map_err(|e| format!("error converting supplied value for rules: {}", e));
44028                self
44029            }
44030            pub fn scope<T>(mut self, value: T) -> Self
44031            where
44032                T: ::std::convert::TryInto<super::CreatePolicyBodyScope>,
44033                T::Error: ::std::fmt::Display,
44034            {
44035                self.scope = value
44036                    .try_into()
44037                    .map_err(|e| format!("error converting supplied value for scope: {}", e));
44038                self
44039            }
44040        }
44041        impl ::std::convert::TryFrom<CreatePolicyBody> for super::CreatePolicyBody {
44042            type Error = super::error::ConversionError;
44043            fn try_from(
44044                value: CreatePolicyBody,
44045            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44046                Ok(Self {
44047                    description: value.description?,
44048                    rules: value.rules?,
44049                    scope: value.scope?,
44050                })
44051            }
44052        }
44053        impl ::std::convert::From<super::CreatePolicyBody> for CreatePolicyBody {
44054            fn from(value: super::CreatePolicyBody) -> Self {
44055                Self {
44056                    description: Ok(value.description),
44057                    rules: Ok(value.rules),
44058                    scope: Ok(value.scope),
44059                }
44060            }
44061        }
44062        #[derive(Clone, Debug)]
44063        pub struct CreateSolanaAccountBody {
44064            account_policy: ::std::result::Result<
44065                ::std::option::Option<super::CreateSolanaAccountBodyAccountPolicy>,
44066                ::std::string::String,
44067            >,
44068            name: ::std::result::Result<
44069                ::std::option::Option<super::CreateSolanaAccountBodyName>,
44070                ::std::string::String,
44071            >,
44072        }
44073        impl ::std::default::Default for CreateSolanaAccountBody {
44074            fn default() -> Self {
44075                Self {
44076                    account_policy: Ok(Default::default()),
44077                    name: Ok(Default::default()),
44078                }
44079            }
44080        }
44081        impl CreateSolanaAccountBody {
44082            pub fn account_policy<T>(mut self, value: T) -> Self
44083            where
44084                T: ::std::convert::TryInto<
44085                    ::std::option::Option<super::CreateSolanaAccountBodyAccountPolicy>,
44086                >,
44087                T::Error: ::std::fmt::Display,
44088            {
44089                self.account_policy = value.try_into().map_err(|e| {
44090                    format!("error converting supplied value for account_policy: {}", e)
44091                });
44092                self
44093            }
44094            pub fn name<T>(mut self, value: T) -> Self
44095            where
44096                T: ::std::convert::TryInto<
44097                    ::std::option::Option<super::CreateSolanaAccountBodyName>,
44098                >,
44099                T::Error: ::std::fmt::Display,
44100            {
44101                self.name = value
44102                    .try_into()
44103                    .map_err(|e| format!("error converting supplied value for name: {}", e));
44104                self
44105            }
44106        }
44107        impl ::std::convert::TryFrom<CreateSolanaAccountBody> for super::CreateSolanaAccountBody {
44108            type Error = super::error::ConversionError;
44109            fn try_from(
44110                value: CreateSolanaAccountBody,
44111            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44112                Ok(Self {
44113                    account_policy: value.account_policy?,
44114                    name: value.name?,
44115                })
44116            }
44117        }
44118        impl ::std::convert::From<super::CreateSolanaAccountBody> for CreateSolanaAccountBody {
44119            fn from(value: super::CreateSolanaAccountBody) -> Self {
44120                Self {
44121                    account_policy: Ok(value.account_policy),
44122                    name: Ok(value.name),
44123                }
44124            }
44125        }
44126        #[derive(Clone, Debug)]
44127        pub struct CreateSpendPermissionRequest {
44128            allowance: ::std::result::Result<::std::string::String, ::std::string::String>,
44129            end: ::std::result::Result<::std::string::String, ::std::string::String>,
44130            extra_data: ::std::result::Result<
44131                ::std::option::Option<::std::string::String>,
44132                ::std::string::String,
44133            >,
44134            network: ::std::result::Result<super::SpendPermissionNetwork, ::std::string::String>,
44135            paymaster_url:
44136                ::std::result::Result<::std::option::Option<super::Url>, ::std::string::String>,
44137            period: ::std::result::Result<::std::string::String, ::std::string::String>,
44138            salt: ::std::result::Result<
44139                ::std::option::Option<::std::string::String>,
44140                ::std::string::String,
44141            >,
44142            spender: ::std::result::Result<
44143                super::CreateSpendPermissionRequestSpender,
44144                ::std::string::String,
44145            >,
44146            start: ::std::result::Result<::std::string::String, ::std::string::String>,
44147            token: ::std::result::Result<
44148                super::CreateSpendPermissionRequestToken,
44149                ::std::string::String,
44150            >,
44151        }
44152        impl ::std::default::Default for CreateSpendPermissionRequest {
44153            fn default() -> Self {
44154                Self {
44155                    allowance: Err("no value supplied for allowance".to_string()),
44156                    end: Err("no value supplied for end".to_string()),
44157                    extra_data: Ok(Default::default()),
44158                    network: Err("no value supplied for network".to_string()),
44159                    paymaster_url: Ok(Default::default()),
44160                    period: Err("no value supplied for period".to_string()),
44161                    salt: Ok(Default::default()),
44162                    spender: Err("no value supplied for spender".to_string()),
44163                    start: Err("no value supplied for start".to_string()),
44164                    token: Err("no value supplied for token".to_string()),
44165                }
44166            }
44167        }
44168        impl CreateSpendPermissionRequest {
44169            pub fn allowance<T>(mut self, value: T) -> Self
44170            where
44171                T: ::std::convert::TryInto<::std::string::String>,
44172                T::Error: ::std::fmt::Display,
44173            {
44174                self.allowance = value
44175                    .try_into()
44176                    .map_err(|e| format!("error converting supplied value for allowance: {}", e));
44177                self
44178            }
44179            pub fn end<T>(mut self, value: T) -> Self
44180            where
44181                T: ::std::convert::TryInto<::std::string::String>,
44182                T::Error: ::std::fmt::Display,
44183            {
44184                self.end = value
44185                    .try_into()
44186                    .map_err(|e| format!("error converting supplied value for end: {}", e));
44187                self
44188            }
44189            pub fn extra_data<T>(mut self, value: T) -> Self
44190            where
44191                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
44192                T::Error: ::std::fmt::Display,
44193            {
44194                self.extra_data = value
44195                    .try_into()
44196                    .map_err(|e| format!("error converting supplied value for extra_data: {}", e));
44197                self
44198            }
44199            pub fn network<T>(mut self, value: T) -> Self
44200            where
44201                T: ::std::convert::TryInto<super::SpendPermissionNetwork>,
44202                T::Error: ::std::fmt::Display,
44203            {
44204                self.network = value
44205                    .try_into()
44206                    .map_err(|e| format!("error converting supplied value for network: {}", e));
44207                self
44208            }
44209            pub fn paymaster_url<T>(mut self, value: T) -> Self
44210            where
44211                T: ::std::convert::TryInto<::std::option::Option<super::Url>>,
44212                T::Error: ::std::fmt::Display,
44213            {
44214                self.paymaster_url = value.try_into().map_err(|e| {
44215                    format!("error converting supplied value for paymaster_url: {}", e)
44216                });
44217                self
44218            }
44219            pub fn period<T>(mut self, value: T) -> Self
44220            where
44221                T: ::std::convert::TryInto<::std::string::String>,
44222                T::Error: ::std::fmt::Display,
44223            {
44224                self.period = value
44225                    .try_into()
44226                    .map_err(|e| format!("error converting supplied value for period: {}", e));
44227                self
44228            }
44229            pub fn salt<T>(mut self, value: T) -> Self
44230            where
44231                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
44232                T::Error: ::std::fmt::Display,
44233            {
44234                self.salt = value
44235                    .try_into()
44236                    .map_err(|e| format!("error converting supplied value for salt: {}", e));
44237                self
44238            }
44239            pub fn spender<T>(mut self, value: T) -> Self
44240            where
44241                T: ::std::convert::TryInto<super::CreateSpendPermissionRequestSpender>,
44242                T::Error: ::std::fmt::Display,
44243            {
44244                self.spender = value
44245                    .try_into()
44246                    .map_err(|e| format!("error converting supplied value for spender: {}", e));
44247                self
44248            }
44249            pub fn start<T>(mut self, value: T) -> Self
44250            where
44251                T: ::std::convert::TryInto<::std::string::String>,
44252                T::Error: ::std::fmt::Display,
44253            {
44254                self.start = value
44255                    .try_into()
44256                    .map_err(|e| format!("error converting supplied value for start: {}", e));
44257                self
44258            }
44259            pub fn token<T>(mut self, value: T) -> Self
44260            where
44261                T: ::std::convert::TryInto<super::CreateSpendPermissionRequestToken>,
44262                T::Error: ::std::fmt::Display,
44263            {
44264                self.token = value
44265                    .try_into()
44266                    .map_err(|e| format!("error converting supplied value for token: {}", e));
44267                self
44268            }
44269        }
44270        impl ::std::convert::TryFrom<CreateSpendPermissionRequest> for super::CreateSpendPermissionRequest {
44271            type Error = super::error::ConversionError;
44272            fn try_from(
44273                value: CreateSpendPermissionRequest,
44274            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44275                Ok(Self {
44276                    allowance: value.allowance?,
44277                    end: value.end?,
44278                    extra_data: value.extra_data?,
44279                    network: value.network?,
44280                    paymaster_url: value.paymaster_url?,
44281                    period: value.period?,
44282                    salt: value.salt?,
44283                    spender: value.spender?,
44284                    start: value.start?,
44285                    token: value.token?,
44286                })
44287            }
44288        }
44289        impl ::std::convert::From<super::CreateSpendPermissionRequest> for CreateSpendPermissionRequest {
44290            fn from(value: super::CreateSpendPermissionRequest) -> Self {
44291                Self {
44292                    allowance: Ok(value.allowance),
44293                    end: Ok(value.end),
44294                    extra_data: Ok(value.extra_data),
44295                    network: Ok(value.network),
44296                    paymaster_url: Ok(value.paymaster_url),
44297                    period: Ok(value.period),
44298                    salt: Ok(value.salt),
44299                    spender: Ok(value.spender),
44300                    start: Ok(value.start),
44301                    token: Ok(value.token),
44302                }
44303            }
44304        }
44305        #[derive(Clone, Debug)]
44306        pub struct CreateSwapQuoteResponse {
44307            block_number: ::std::result::Result<
44308                super::CreateSwapQuoteResponseBlockNumber,
44309                ::std::string::String,
44310            >,
44311            fees: ::std::result::Result<super::CreateSwapQuoteResponseFees, ::std::string::String>,
44312            from_amount: ::std::result::Result<
44313                super::CreateSwapQuoteResponseFromAmount,
44314                ::std::string::String,
44315            >,
44316            from_token: ::std::result::Result<
44317                super::CreateSwapQuoteResponseFromToken,
44318                ::std::string::String,
44319            >,
44320            issues:
44321                ::std::result::Result<super::CreateSwapQuoteResponseIssues, ::std::string::String>,
44322            liquidity_available: ::std::result::Result<bool, ::std::string::String>,
44323            min_to_amount: ::std::result::Result<
44324                super::CreateSwapQuoteResponseMinToAmount,
44325                ::std::string::String,
44326            >,
44327            permit2: ::std::result::Result<
44328                ::std::option::Option<super::CreateSwapQuoteResponsePermit2>,
44329                ::std::string::String,
44330            >,
44331            to_amount: ::std::result::Result<
44332                super::CreateSwapQuoteResponseToAmount,
44333                ::std::string::String,
44334            >,
44335            to_token:
44336                ::std::result::Result<super::CreateSwapQuoteResponseToToken, ::std::string::String>,
44337            transaction: ::std::result::Result<
44338                super::CreateSwapQuoteResponseTransaction,
44339                ::std::string::String,
44340            >,
44341        }
44342        impl ::std::default::Default for CreateSwapQuoteResponse {
44343            fn default() -> Self {
44344                Self {
44345                    block_number: Err("no value supplied for block_number".to_string()),
44346                    fees: Err("no value supplied for fees".to_string()),
44347                    from_amount: Err("no value supplied for from_amount".to_string()),
44348                    from_token: Err("no value supplied for from_token".to_string()),
44349                    issues: Err("no value supplied for issues".to_string()),
44350                    liquidity_available: Err(
44351                        "no value supplied for liquidity_available".to_string()
44352                    ),
44353                    min_to_amount: Err("no value supplied for min_to_amount".to_string()),
44354                    permit2: Err("no value supplied for permit2".to_string()),
44355                    to_amount: Err("no value supplied for to_amount".to_string()),
44356                    to_token: Err("no value supplied for to_token".to_string()),
44357                    transaction: Err("no value supplied for transaction".to_string()),
44358                }
44359            }
44360        }
44361        impl CreateSwapQuoteResponse {
44362            pub fn block_number<T>(mut self, value: T) -> Self
44363            where
44364                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseBlockNumber>,
44365                T::Error: ::std::fmt::Display,
44366            {
44367                self.block_number = value.try_into().map_err(|e| {
44368                    format!("error converting supplied value for block_number: {}", e)
44369                });
44370                self
44371            }
44372            pub fn fees<T>(mut self, value: T) -> Self
44373            where
44374                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseFees>,
44375                T::Error: ::std::fmt::Display,
44376            {
44377                self.fees = value
44378                    .try_into()
44379                    .map_err(|e| format!("error converting supplied value for fees: {}", e));
44380                self
44381            }
44382            pub fn from_amount<T>(mut self, value: T) -> Self
44383            where
44384                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseFromAmount>,
44385                T::Error: ::std::fmt::Display,
44386            {
44387                self.from_amount = value
44388                    .try_into()
44389                    .map_err(|e| format!("error converting supplied value for from_amount: {}", e));
44390                self
44391            }
44392            pub fn from_token<T>(mut self, value: T) -> Self
44393            where
44394                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseFromToken>,
44395                T::Error: ::std::fmt::Display,
44396            {
44397                self.from_token = value
44398                    .try_into()
44399                    .map_err(|e| format!("error converting supplied value for from_token: {}", e));
44400                self
44401            }
44402            pub fn issues<T>(mut self, value: T) -> Self
44403            where
44404                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseIssues>,
44405                T::Error: ::std::fmt::Display,
44406            {
44407                self.issues = value
44408                    .try_into()
44409                    .map_err(|e| format!("error converting supplied value for issues: {}", e));
44410                self
44411            }
44412            pub fn liquidity_available<T>(mut self, value: T) -> Self
44413            where
44414                T: ::std::convert::TryInto<bool>,
44415                T::Error: ::std::fmt::Display,
44416            {
44417                self.liquidity_available = value.try_into().map_err(|e| {
44418                    format!(
44419                        "error converting supplied value for liquidity_available: {}",
44420                        e
44421                    )
44422                });
44423                self
44424            }
44425            pub fn min_to_amount<T>(mut self, value: T) -> Self
44426            where
44427                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseMinToAmount>,
44428                T::Error: ::std::fmt::Display,
44429            {
44430                self.min_to_amount = value.try_into().map_err(|e| {
44431                    format!("error converting supplied value for min_to_amount: {}", e)
44432                });
44433                self
44434            }
44435            pub fn permit2<T>(mut self, value: T) -> Self
44436            where
44437                T: ::std::convert::TryInto<
44438                    ::std::option::Option<super::CreateSwapQuoteResponsePermit2>,
44439                >,
44440                T::Error: ::std::fmt::Display,
44441            {
44442                self.permit2 = value
44443                    .try_into()
44444                    .map_err(|e| format!("error converting supplied value for permit2: {}", e));
44445                self
44446            }
44447            pub fn to_amount<T>(mut self, value: T) -> Self
44448            where
44449                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseToAmount>,
44450                T::Error: ::std::fmt::Display,
44451            {
44452                self.to_amount = value
44453                    .try_into()
44454                    .map_err(|e| format!("error converting supplied value for to_amount: {}", e));
44455                self
44456            }
44457            pub fn to_token<T>(mut self, value: T) -> Self
44458            where
44459                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseToToken>,
44460                T::Error: ::std::fmt::Display,
44461            {
44462                self.to_token = value
44463                    .try_into()
44464                    .map_err(|e| format!("error converting supplied value for to_token: {}", e));
44465                self
44466            }
44467            pub fn transaction<T>(mut self, value: T) -> Self
44468            where
44469                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseTransaction>,
44470                T::Error: ::std::fmt::Display,
44471            {
44472                self.transaction = value
44473                    .try_into()
44474                    .map_err(|e| format!("error converting supplied value for transaction: {}", e));
44475                self
44476            }
44477        }
44478        impl ::std::convert::TryFrom<CreateSwapQuoteResponse> for super::CreateSwapQuoteResponse {
44479            type Error = super::error::ConversionError;
44480            fn try_from(
44481                value: CreateSwapQuoteResponse,
44482            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44483                Ok(Self {
44484                    block_number: value.block_number?,
44485                    fees: value.fees?,
44486                    from_amount: value.from_amount?,
44487                    from_token: value.from_token?,
44488                    issues: value.issues?,
44489                    liquidity_available: value.liquidity_available?,
44490                    min_to_amount: value.min_to_amount?,
44491                    permit2: value.permit2?,
44492                    to_amount: value.to_amount?,
44493                    to_token: value.to_token?,
44494                    transaction: value.transaction?,
44495                })
44496            }
44497        }
44498        impl ::std::convert::From<super::CreateSwapQuoteResponse> for CreateSwapQuoteResponse {
44499            fn from(value: super::CreateSwapQuoteResponse) -> Self {
44500                Self {
44501                    block_number: Ok(value.block_number),
44502                    fees: Ok(value.fees),
44503                    from_amount: Ok(value.from_amount),
44504                    from_token: Ok(value.from_token),
44505                    issues: Ok(value.issues),
44506                    liquidity_available: Ok(value.liquidity_available),
44507                    min_to_amount: Ok(value.min_to_amount),
44508                    permit2: Ok(value.permit2),
44509                    to_amount: Ok(value.to_amount),
44510                    to_token: Ok(value.to_token),
44511                    transaction: Ok(value.transaction),
44512                }
44513            }
44514        }
44515        #[derive(Clone, Debug)]
44516        pub struct CreateSwapQuoteResponseFees {
44517            gas_fee: ::std::result::Result<
44518                ::std::option::Option<super::TokenFee>,
44519                ::std::string::String,
44520            >,
44521            protocol_fee: ::std::result::Result<
44522                ::std::option::Option<super::TokenFee>,
44523                ::std::string::String,
44524            >,
44525        }
44526        impl ::std::default::Default for CreateSwapQuoteResponseFees {
44527            fn default() -> Self {
44528                Self {
44529                    gas_fee: Err("no value supplied for gas_fee".to_string()),
44530                    protocol_fee: Err("no value supplied for protocol_fee".to_string()),
44531                }
44532            }
44533        }
44534        impl CreateSwapQuoteResponseFees {
44535            pub fn gas_fee<T>(mut self, value: T) -> Self
44536            where
44537                T: ::std::convert::TryInto<::std::option::Option<super::TokenFee>>,
44538                T::Error: ::std::fmt::Display,
44539            {
44540                self.gas_fee = value
44541                    .try_into()
44542                    .map_err(|e| format!("error converting supplied value for gas_fee: {}", e));
44543                self
44544            }
44545            pub fn protocol_fee<T>(mut self, value: T) -> Self
44546            where
44547                T: ::std::convert::TryInto<::std::option::Option<super::TokenFee>>,
44548                T::Error: ::std::fmt::Display,
44549            {
44550                self.protocol_fee = value.try_into().map_err(|e| {
44551                    format!("error converting supplied value for protocol_fee: {}", e)
44552                });
44553                self
44554            }
44555        }
44556        impl ::std::convert::TryFrom<CreateSwapQuoteResponseFees> for super::CreateSwapQuoteResponseFees {
44557            type Error = super::error::ConversionError;
44558            fn try_from(
44559                value: CreateSwapQuoteResponseFees,
44560            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44561                Ok(Self {
44562                    gas_fee: value.gas_fee?,
44563                    protocol_fee: value.protocol_fee?,
44564                })
44565            }
44566        }
44567        impl ::std::convert::From<super::CreateSwapQuoteResponseFees> for CreateSwapQuoteResponseFees {
44568            fn from(value: super::CreateSwapQuoteResponseFees) -> Self {
44569                Self {
44570                    gas_fee: Ok(value.gas_fee),
44571                    protocol_fee: Ok(value.protocol_fee),
44572                }
44573            }
44574        }
44575        #[derive(Clone, Debug)]
44576        pub struct CreateSwapQuoteResponseIssues {
44577            allowance: ::std::result::Result<
44578                ::std::option::Option<super::CreateSwapQuoteResponseIssuesAllowance>,
44579                ::std::string::String,
44580            >,
44581            balance: ::std::result::Result<
44582                ::std::option::Option<super::CreateSwapQuoteResponseIssuesBalance>,
44583                ::std::string::String,
44584            >,
44585            simulation_incomplete: ::std::result::Result<bool, ::std::string::String>,
44586        }
44587        impl ::std::default::Default for CreateSwapQuoteResponseIssues {
44588            fn default() -> Self {
44589                Self {
44590                    allowance: Err("no value supplied for allowance".to_string()),
44591                    balance: Err("no value supplied for balance".to_string()),
44592                    simulation_incomplete: Err(
44593                        "no value supplied for simulation_incomplete".to_string()
44594                    ),
44595                }
44596            }
44597        }
44598        impl CreateSwapQuoteResponseIssues {
44599            pub fn allowance<T>(mut self, value: T) -> Self
44600            where
44601                T: ::std::convert::TryInto<
44602                    ::std::option::Option<super::CreateSwapQuoteResponseIssuesAllowance>,
44603                >,
44604                T::Error: ::std::fmt::Display,
44605            {
44606                self.allowance = value
44607                    .try_into()
44608                    .map_err(|e| format!("error converting supplied value for allowance: {}", e));
44609                self
44610            }
44611            pub fn balance<T>(mut self, value: T) -> Self
44612            where
44613                T: ::std::convert::TryInto<
44614                    ::std::option::Option<super::CreateSwapQuoteResponseIssuesBalance>,
44615                >,
44616                T::Error: ::std::fmt::Display,
44617            {
44618                self.balance = value
44619                    .try_into()
44620                    .map_err(|e| format!("error converting supplied value for balance: {}", e));
44621                self
44622            }
44623            pub fn simulation_incomplete<T>(mut self, value: T) -> Self
44624            where
44625                T: ::std::convert::TryInto<bool>,
44626                T::Error: ::std::fmt::Display,
44627            {
44628                self.simulation_incomplete = value.try_into().map_err(|e| {
44629                    format!(
44630                        "error converting supplied value for simulation_incomplete: {}",
44631                        e
44632                    )
44633                });
44634                self
44635            }
44636        }
44637        impl ::std::convert::TryFrom<CreateSwapQuoteResponseIssues>
44638            for super::CreateSwapQuoteResponseIssues
44639        {
44640            type Error = super::error::ConversionError;
44641            fn try_from(
44642                value: CreateSwapQuoteResponseIssues,
44643            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44644                Ok(Self {
44645                    allowance: value.allowance?,
44646                    balance: value.balance?,
44647                    simulation_incomplete: value.simulation_incomplete?,
44648                })
44649            }
44650        }
44651        impl ::std::convert::From<super::CreateSwapQuoteResponseIssues> for CreateSwapQuoteResponseIssues {
44652            fn from(value: super::CreateSwapQuoteResponseIssues) -> Self {
44653                Self {
44654                    allowance: Ok(value.allowance),
44655                    balance: Ok(value.balance),
44656                    simulation_incomplete: Ok(value.simulation_incomplete),
44657                }
44658            }
44659        }
44660        #[derive(Clone, Debug)]
44661        pub struct CreateSwapQuoteResponseIssuesAllowance {
44662            current_allowance: ::std::result::Result<
44663                super::CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance,
44664                ::std::string::String,
44665            >,
44666            spender: ::std::result::Result<
44667                super::CreateSwapQuoteResponseIssuesAllowanceSpender,
44668                ::std::string::String,
44669            >,
44670        }
44671        impl ::std::default::Default for CreateSwapQuoteResponseIssuesAllowance {
44672            fn default() -> Self {
44673                Self {
44674                    current_allowance: Err("no value supplied for current_allowance".to_string()),
44675                    spender: Err("no value supplied for spender".to_string()),
44676                }
44677            }
44678        }
44679        impl CreateSwapQuoteResponseIssuesAllowance {
44680            pub fn current_allowance<T>(mut self, value: T) -> Self
44681            where
44682                T: ::std::convert::TryInto<
44683                    super::CreateSwapQuoteResponseIssuesAllowanceCurrentAllowance,
44684                >,
44685                T::Error: ::std::fmt::Display,
44686            {
44687                self.current_allowance = value.try_into().map_err(|e| {
44688                    format!(
44689                        "error converting supplied value for current_allowance: {}",
44690                        e
44691                    )
44692                });
44693                self
44694            }
44695            pub fn spender<T>(mut self, value: T) -> Self
44696            where
44697                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseIssuesAllowanceSpender>,
44698                T::Error: ::std::fmt::Display,
44699            {
44700                self.spender = value
44701                    .try_into()
44702                    .map_err(|e| format!("error converting supplied value for spender: {}", e));
44703                self
44704            }
44705        }
44706        impl ::std::convert::TryFrom<CreateSwapQuoteResponseIssuesAllowance>
44707            for super::CreateSwapQuoteResponseIssuesAllowance
44708        {
44709            type Error = super::error::ConversionError;
44710            fn try_from(
44711                value: CreateSwapQuoteResponseIssuesAllowance,
44712            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44713                Ok(Self {
44714                    current_allowance: value.current_allowance?,
44715                    spender: value.spender?,
44716                })
44717            }
44718        }
44719        impl ::std::convert::From<super::CreateSwapQuoteResponseIssuesAllowance>
44720            for CreateSwapQuoteResponseIssuesAllowance
44721        {
44722            fn from(value: super::CreateSwapQuoteResponseIssuesAllowance) -> Self {
44723                Self {
44724                    current_allowance: Ok(value.current_allowance),
44725                    spender: Ok(value.spender),
44726                }
44727            }
44728        }
44729        #[derive(Clone, Debug)]
44730        pub struct CreateSwapQuoteResponseIssuesBalance {
44731            current_balance: ::std::result::Result<
44732                super::CreateSwapQuoteResponseIssuesBalanceCurrentBalance,
44733                ::std::string::String,
44734            >,
44735            required_balance: ::std::result::Result<
44736                super::CreateSwapQuoteResponseIssuesBalanceRequiredBalance,
44737                ::std::string::String,
44738            >,
44739            token: ::std::result::Result<
44740                super::CreateSwapQuoteResponseIssuesBalanceToken,
44741                ::std::string::String,
44742            >,
44743        }
44744        impl ::std::default::Default for CreateSwapQuoteResponseIssuesBalance {
44745            fn default() -> Self {
44746                Self {
44747                    current_balance: Err("no value supplied for current_balance".to_string()),
44748                    required_balance: Err("no value supplied for required_balance".to_string()),
44749                    token: Err("no value supplied for token".to_string()),
44750                }
44751            }
44752        }
44753        impl CreateSwapQuoteResponseIssuesBalance {
44754            pub fn current_balance<T>(mut self, value: T) -> Self
44755            where
44756                T: ::std::convert::TryInto<
44757                    super::CreateSwapQuoteResponseIssuesBalanceCurrentBalance,
44758                >,
44759                T::Error: ::std::fmt::Display,
44760            {
44761                self.current_balance = value.try_into().map_err(|e| {
44762                    format!("error converting supplied value for current_balance: {}", e)
44763                });
44764                self
44765            }
44766            pub fn required_balance<T>(mut self, value: T) -> Self
44767            where
44768                T: ::std::convert::TryInto<
44769                    super::CreateSwapQuoteResponseIssuesBalanceRequiredBalance,
44770                >,
44771                T::Error: ::std::fmt::Display,
44772            {
44773                self.required_balance = value.try_into().map_err(|e| {
44774                    format!(
44775                        "error converting supplied value for required_balance: {}",
44776                        e
44777                    )
44778                });
44779                self
44780            }
44781            pub fn token<T>(mut self, value: T) -> Self
44782            where
44783                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseIssuesBalanceToken>,
44784                T::Error: ::std::fmt::Display,
44785            {
44786                self.token = value
44787                    .try_into()
44788                    .map_err(|e| format!("error converting supplied value for token: {}", e));
44789                self
44790            }
44791        }
44792        impl ::std::convert::TryFrom<CreateSwapQuoteResponseIssuesBalance>
44793            for super::CreateSwapQuoteResponseIssuesBalance
44794        {
44795            type Error = super::error::ConversionError;
44796            fn try_from(
44797                value: CreateSwapQuoteResponseIssuesBalance,
44798            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44799                Ok(Self {
44800                    current_balance: value.current_balance?,
44801                    required_balance: value.required_balance?,
44802                    token: value.token?,
44803                })
44804            }
44805        }
44806        impl ::std::convert::From<super::CreateSwapQuoteResponseIssuesBalance>
44807            for CreateSwapQuoteResponseIssuesBalance
44808        {
44809            fn from(value: super::CreateSwapQuoteResponseIssuesBalance) -> Self {
44810                Self {
44811                    current_balance: Ok(value.current_balance),
44812                    required_balance: Ok(value.required_balance),
44813                    token: Ok(value.token),
44814                }
44815            }
44816        }
44817        #[derive(Clone, Debug)]
44818        pub struct CreateSwapQuoteResponsePermit2 {
44819            eip712: ::std::result::Result<super::Eip712Message, ::std::string::String>,
44820            hash: ::std::result::Result<
44821                super::CreateSwapQuoteResponsePermit2Hash,
44822                ::std::string::String,
44823            >,
44824        }
44825        impl ::std::default::Default for CreateSwapQuoteResponsePermit2 {
44826            fn default() -> Self {
44827                Self {
44828                    eip712: Err("no value supplied for eip712".to_string()),
44829                    hash: Err("no value supplied for hash".to_string()),
44830                }
44831            }
44832        }
44833        impl CreateSwapQuoteResponsePermit2 {
44834            pub fn eip712<T>(mut self, value: T) -> Self
44835            where
44836                T: ::std::convert::TryInto<super::Eip712Message>,
44837                T::Error: ::std::fmt::Display,
44838            {
44839                self.eip712 = value
44840                    .try_into()
44841                    .map_err(|e| format!("error converting supplied value for eip712: {}", e));
44842                self
44843            }
44844            pub fn hash<T>(mut self, value: T) -> Self
44845            where
44846                T: ::std::convert::TryInto<super::CreateSwapQuoteResponsePermit2Hash>,
44847                T::Error: ::std::fmt::Display,
44848            {
44849                self.hash = value
44850                    .try_into()
44851                    .map_err(|e| format!("error converting supplied value for hash: {}", e));
44852                self
44853            }
44854        }
44855        impl ::std::convert::TryFrom<CreateSwapQuoteResponsePermit2>
44856            for super::CreateSwapQuoteResponsePermit2
44857        {
44858            type Error = super::error::ConversionError;
44859            fn try_from(
44860                value: CreateSwapQuoteResponsePermit2,
44861            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44862                Ok(Self {
44863                    eip712: value.eip712?,
44864                    hash: value.hash?,
44865                })
44866            }
44867        }
44868        impl ::std::convert::From<super::CreateSwapQuoteResponsePermit2>
44869            for CreateSwapQuoteResponsePermit2
44870        {
44871            fn from(value: super::CreateSwapQuoteResponsePermit2) -> Self {
44872                Self {
44873                    eip712: Ok(value.eip712),
44874                    hash: Ok(value.hash),
44875                }
44876            }
44877        }
44878        #[derive(Clone, Debug)]
44879        pub struct CreateSwapQuoteResponseTransaction {
44880            data: ::std::result::Result<::std::string::String, ::std::string::String>,
44881            gas: ::std::result::Result<
44882                super::CreateSwapQuoteResponseTransactionGas,
44883                ::std::string::String,
44884            >,
44885            gas_price: ::std::result::Result<
44886                super::CreateSwapQuoteResponseTransactionGasPrice,
44887                ::std::string::String,
44888            >,
44889            to: ::std::result::Result<
44890                super::CreateSwapQuoteResponseTransactionTo,
44891                ::std::string::String,
44892            >,
44893            value: ::std::result::Result<
44894                super::CreateSwapQuoteResponseTransactionValue,
44895                ::std::string::String,
44896            >,
44897        }
44898        impl ::std::default::Default for CreateSwapQuoteResponseTransaction {
44899            fn default() -> Self {
44900                Self {
44901                    data: Err("no value supplied for data".to_string()),
44902                    gas: Err("no value supplied for gas".to_string()),
44903                    gas_price: Err("no value supplied for gas_price".to_string()),
44904                    to: Err("no value supplied for to".to_string()),
44905                    value: Err("no value supplied for value".to_string()),
44906                }
44907            }
44908        }
44909        impl CreateSwapQuoteResponseTransaction {
44910            pub fn data<T>(mut self, value: T) -> Self
44911            where
44912                T: ::std::convert::TryInto<::std::string::String>,
44913                T::Error: ::std::fmt::Display,
44914            {
44915                self.data = value
44916                    .try_into()
44917                    .map_err(|e| format!("error converting supplied value for data: {}", e));
44918                self
44919            }
44920            pub fn gas<T>(mut self, value: T) -> Self
44921            where
44922                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseTransactionGas>,
44923                T::Error: ::std::fmt::Display,
44924            {
44925                self.gas = value
44926                    .try_into()
44927                    .map_err(|e| format!("error converting supplied value for gas: {}", e));
44928                self
44929            }
44930            pub fn gas_price<T>(mut self, value: T) -> Self
44931            where
44932                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseTransactionGasPrice>,
44933                T::Error: ::std::fmt::Display,
44934            {
44935                self.gas_price = value
44936                    .try_into()
44937                    .map_err(|e| format!("error converting supplied value for gas_price: {}", e));
44938                self
44939            }
44940            pub fn to<T>(mut self, value: T) -> Self
44941            where
44942                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseTransactionTo>,
44943                T::Error: ::std::fmt::Display,
44944            {
44945                self.to = value
44946                    .try_into()
44947                    .map_err(|e| format!("error converting supplied value for to: {}", e));
44948                self
44949            }
44950            pub fn value<T>(mut self, value: T) -> Self
44951            where
44952                T: ::std::convert::TryInto<super::CreateSwapQuoteResponseTransactionValue>,
44953                T::Error: ::std::fmt::Display,
44954            {
44955                self.value = value
44956                    .try_into()
44957                    .map_err(|e| format!("error converting supplied value for value: {}", e));
44958                self
44959            }
44960        }
44961        impl ::std::convert::TryFrom<CreateSwapQuoteResponseTransaction>
44962            for super::CreateSwapQuoteResponseTransaction
44963        {
44964            type Error = super::error::ConversionError;
44965            fn try_from(
44966                value: CreateSwapQuoteResponseTransaction,
44967            ) -> ::std::result::Result<Self, super::error::ConversionError> {
44968                Ok(Self {
44969                    data: value.data?,
44970                    gas: value.gas?,
44971                    gas_price: value.gas_price?,
44972                    to: value.to?,
44973                    value: value.value?,
44974                })
44975            }
44976        }
44977        impl ::std::convert::From<super::CreateSwapQuoteResponseTransaction>
44978            for CreateSwapQuoteResponseTransaction
44979        {
44980            fn from(value: super::CreateSwapQuoteResponseTransaction) -> Self {
44981                Self {
44982                    data: Ok(value.data),
44983                    gas: Ok(value.gas),
44984                    gas_price: Ok(value.gas_price),
44985                    to: Ok(value.to),
44986                    value: Ok(value.value),
44987                }
44988            }
44989        }
44990        #[derive(Clone, Debug)]
44991        pub struct DeveloperJwtAuthentication {
44992            kid: ::std::result::Result<::std::string::String, ::std::string::String>,
44993            sub: ::std::result::Result<::std::string::String, ::std::string::String>,
44994            type_:
44995                ::std::result::Result<super::DeveloperJwtAuthenticationType, ::std::string::String>,
44996        }
44997        impl ::std::default::Default for DeveloperJwtAuthentication {
44998            fn default() -> Self {
44999                Self {
45000                    kid: Err("no value supplied for kid".to_string()),
45001                    sub: Err("no value supplied for sub".to_string()),
45002                    type_: Err("no value supplied for type_".to_string()),
45003                }
45004            }
45005        }
45006        impl DeveloperJwtAuthentication {
45007            pub fn kid<T>(mut self, value: T) -> Self
45008            where
45009                T: ::std::convert::TryInto<::std::string::String>,
45010                T::Error: ::std::fmt::Display,
45011            {
45012                self.kid = value
45013                    .try_into()
45014                    .map_err(|e| format!("error converting supplied value for kid: {}", e));
45015                self
45016            }
45017            pub fn sub<T>(mut self, value: T) -> Self
45018            where
45019                T: ::std::convert::TryInto<::std::string::String>,
45020                T::Error: ::std::fmt::Display,
45021            {
45022                self.sub = value
45023                    .try_into()
45024                    .map_err(|e| format!("error converting supplied value for sub: {}", e));
45025                self
45026            }
45027            pub fn type_<T>(mut self, value: T) -> Self
45028            where
45029                T: ::std::convert::TryInto<super::DeveloperJwtAuthenticationType>,
45030                T::Error: ::std::fmt::Display,
45031            {
45032                self.type_ = value
45033                    .try_into()
45034                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
45035                self
45036            }
45037        }
45038        impl ::std::convert::TryFrom<DeveloperJwtAuthentication> for super::DeveloperJwtAuthentication {
45039            type Error = super::error::ConversionError;
45040            fn try_from(
45041                value: DeveloperJwtAuthentication,
45042            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45043                Ok(Self {
45044                    kid: value.kid?,
45045                    sub: value.sub?,
45046                    type_: value.type_?,
45047                })
45048            }
45049        }
45050        impl ::std::convert::From<super::DeveloperJwtAuthentication> for DeveloperJwtAuthentication {
45051            fn from(value: super::DeveloperJwtAuthentication) -> Self {
45052                Self {
45053                    kid: Ok(value.kid),
45054                    sub: Ok(value.sub),
45055                    type_: Ok(value.type_),
45056                }
45057            }
45058        }
45059        #[derive(Clone, Debug)]
45060        pub struct Eip712Domain {
45061            chain_id: ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
45062            name: ::std::result::Result<
45063                ::std::option::Option<::std::string::String>,
45064                ::std::string::String,
45065            >,
45066            salt: ::std::result::Result<
45067                ::std::option::Option<super::Eip712DomainSalt>,
45068                ::std::string::String,
45069            >,
45070            verifying_contract: ::std::result::Result<
45071                ::std::option::Option<super::Eip712DomainVerifyingContract>,
45072                ::std::string::String,
45073            >,
45074            version: ::std::result::Result<
45075                ::std::option::Option<::std::string::String>,
45076                ::std::string::String,
45077            >,
45078        }
45079        impl ::std::default::Default for Eip712Domain {
45080            fn default() -> Self {
45081                Self {
45082                    chain_id: Ok(Default::default()),
45083                    name: Ok(Default::default()),
45084                    salt: Ok(Default::default()),
45085                    verifying_contract: Ok(Default::default()),
45086                    version: Ok(Default::default()),
45087                }
45088            }
45089        }
45090        impl Eip712Domain {
45091            pub fn chain_id<T>(mut self, value: T) -> Self
45092            where
45093                T: ::std::convert::TryInto<::std::option::Option<i64>>,
45094                T::Error: ::std::fmt::Display,
45095            {
45096                self.chain_id = value
45097                    .try_into()
45098                    .map_err(|e| format!("error converting supplied value for chain_id: {}", e));
45099                self
45100            }
45101            pub fn name<T>(mut self, value: T) -> Self
45102            where
45103                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
45104                T::Error: ::std::fmt::Display,
45105            {
45106                self.name = value
45107                    .try_into()
45108                    .map_err(|e| format!("error converting supplied value for name: {}", e));
45109                self
45110            }
45111            pub fn salt<T>(mut self, value: T) -> Self
45112            where
45113                T: ::std::convert::TryInto<::std::option::Option<super::Eip712DomainSalt>>,
45114                T::Error: ::std::fmt::Display,
45115            {
45116                self.salt = value
45117                    .try_into()
45118                    .map_err(|e| format!("error converting supplied value for salt: {}", e));
45119                self
45120            }
45121            pub fn verifying_contract<T>(mut self, value: T) -> Self
45122            where
45123                T: ::std::convert::TryInto<
45124                    ::std::option::Option<super::Eip712DomainVerifyingContract>,
45125                >,
45126                T::Error: ::std::fmt::Display,
45127            {
45128                self.verifying_contract = value.try_into().map_err(|e| {
45129                    format!(
45130                        "error converting supplied value for verifying_contract: {}",
45131                        e
45132                    )
45133                });
45134                self
45135            }
45136            pub fn version<T>(mut self, value: T) -> Self
45137            where
45138                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
45139                T::Error: ::std::fmt::Display,
45140            {
45141                self.version = value
45142                    .try_into()
45143                    .map_err(|e| format!("error converting supplied value for version: {}", e));
45144                self
45145            }
45146        }
45147        impl ::std::convert::TryFrom<Eip712Domain> for super::Eip712Domain {
45148            type Error = super::error::ConversionError;
45149            fn try_from(
45150                value: Eip712Domain,
45151            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45152                Ok(Self {
45153                    chain_id: value.chain_id?,
45154                    name: value.name?,
45155                    salt: value.salt?,
45156                    verifying_contract: value.verifying_contract?,
45157                    version: value.version?,
45158                })
45159            }
45160        }
45161        impl ::std::convert::From<super::Eip712Domain> for Eip712Domain {
45162            fn from(value: super::Eip712Domain) -> Self {
45163                Self {
45164                    chain_id: Ok(value.chain_id),
45165                    name: Ok(value.name),
45166                    salt: Ok(value.salt),
45167                    verifying_contract: Ok(value.verifying_contract),
45168                    version: Ok(value.version),
45169                }
45170            }
45171        }
45172        #[derive(Clone, Debug)]
45173        pub struct Eip712Message {
45174            domain: ::std::result::Result<super::Eip712Domain, ::std::string::String>,
45175            message: ::std::result::Result<
45176                ::serde_json::Map<::std::string::String, ::serde_json::Value>,
45177                ::std::string::String,
45178            >,
45179            primary_type: ::std::result::Result<::std::string::String, ::std::string::String>,
45180            types: ::std::result::Result<super::Eip712Types, ::std::string::String>,
45181        }
45182        impl ::std::default::Default for Eip712Message {
45183            fn default() -> Self {
45184                Self {
45185                    domain: Err("no value supplied for domain".to_string()),
45186                    message: Err("no value supplied for message".to_string()),
45187                    primary_type: Err("no value supplied for primary_type".to_string()),
45188                    types: Err("no value supplied for types".to_string()),
45189                }
45190            }
45191        }
45192        impl Eip712Message {
45193            pub fn domain<T>(mut self, value: T) -> Self
45194            where
45195                T: ::std::convert::TryInto<super::Eip712Domain>,
45196                T::Error: ::std::fmt::Display,
45197            {
45198                self.domain = value
45199                    .try_into()
45200                    .map_err(|e| format!("error converting supplied value for domain: {}", e));
45201                self
45202            }
45203            pub fn message<T>(mut self, value: T) -> Self
45204            where
45205                T: ::std::convert::TryInto<
45206                    ::serde_json::Map<::std::string::String, ::serde_json::Value>,
45207                >,
45208                T::Error: ::std::fmt::Display,
45209            {
45210                self.message = value
45211                    .try_into()
45212                    .map_err(|e| format!("error converting supplied value for message: {}", e));
45213                self
45214            }
45215            pub fn primary_type<T>(mut self, value: T) -> Self
45216            where
45217                T: ::std::convert::TryInto<::std::string::String>,
45218                T::Error: ::std::fmt::Display,
45219            {
45220                self.primary_type = value.try_into().map_err(|e| {
45221                    format!("error converting supplied value for primary_type: {}", e)
45222                });
45223                self
45224            }
45225            pub fn types<T>(mut self, value: T) -> Self
45226            where
45227                T: ::std::convert::TryInto<super::Eip712Types>,
45228                T::Error: ::std::fmt::Display,
45229            {
45230                self.types = value
45231                    .try_into()
45232                    .map_err(|e| format!("error converting supplied value for types: {}", e));
45233                self
45234            }
45235        }
45236        impl ::std::convert::TryFrom<Eip712Message> for super::Eip712Message {
45237            type Error = super::error::ConversionError;
45238            fn try_from(
45239                value: Eip712Message,
45240            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45241                Ok(Self {
45242                    domain: value.domain?,
45243                    message: value.message?,
45244                    primary_type: value.primary_type?,
45245                    types: value.types?,
45246                })
45247            }
45248        }
45249        impl ::std::convert::From<super::Eip712Message> for Eip712Message {
45250            fn from(value: super::Eip712Message) -> Self {
45251                Self {
45252                    domain: Ok(value.domain),
45253                    message: Ok(value.message),
45254                    primary_type: Ok(value.primary_type),
45255                    types: Ok(value.types),
45256                }
45257            }
45258        }
45259        #[derive(Clone, Debug)]
45260        pub struct EmailAuthentication {
45261            email: ::std::result::Result<::std::string::String, ::std::string::String>,
45262            type_: ::std::result::Result<super::EmailAuthenticationType, ::std::string::String>,
45263        }
45264        impl ::std::default::Default for EmailAuthentication {
45265            fn default() -> Self {
45266                Self {
45267                    email: Err("no value supplied for email".to_string()),
45268                    type_: Err("no value supplied for type_".to_string()),
45269                }
45270            }
45271        }
45272        impl EmailAuthentication {
45273            pub fn email<T>(mut self, value: T) -> Self
45274            where
45275                T: ::std::convert::TryInto<::std::string::String>,
45276                T::Error: ::std::fmt::Display,
45277            {
45278                self.email = value
45279                    .try_into()
45280                    .map_err(|e| format!("error converting supplied value for email: {}", e));
45281                self
45282            }
45283            pub fn type_<T>(mut self, value: T) -> Self
45284            where
45285                T: ::std::convert::TryInto<super::EmailAuthenticationType>,
45286                T::Error: ::std::fmt::Display,
45287            {
45288                self.type_ = value
45289                    .try_into()
45290                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
45291                self
45292            }
45293        }
45294        impl ::std::convert::TryFrom<EmailAuthentication> for super::EmailAuthentication {
45295            type Error = super::error::ConversionError;
45296            fn try_from(
45297                value: EmailAuthentication,
45298            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45299                Ok(Self {
45300                    email: value.email?,
45301                    type_: value.type_?,
45302                })
45303            }
45304        }
45305        impl ::std::convert::From<super::EmailAuthentication> for EmailAuthentication {
45306            fn from(value: super::EmailAuthentication) -> Self {
45307                Self {
45308                    email: Ok(value.email),
45309                    type_: Ok(value.type_),
45310                }
45311            }
45312        }
45313        #[derive(Clone, Debug)]
45314        pub struct EndUser {
45315            authentication_methods:
45316                ::std::result::Result<super::AuthenticationMethods, ::std::string::String>,
45317            created_at: ::std::result::Result<
45318                ::chrono::DateTime<::chrono::offset::Utc>,
45319                ::std::string::String,
45320            >,
45321            evm_account_objects: ::std::result::Result<
45322                ::std::vec::Vec<super::EndUserEvmAccount>,
45323                ::std::string::String,
45324            >,
45325            evm_accounts: ::std::result::Result<
45326                ::std::vec::Vec<super::EndUserEvmAccountsItem>,
45327                ::std::string::String,
45328            >,
45329            evm_smart_account_objects: ::std::result::Result<
45330                ::std::vec::Vec<super::EndUserEvmSmartAccount>,
45331                ::std::string::String,
45332            >,
45333            evm_smart_accounts: ::std::result::Result<
45334                ::std::vec::Vec<super::EndUserEvmSmartAccountsItem>,
45335                ::std::string::String,
45336            >,
45337            solana_account_objects: ::std::result::Result<
45338                ::std::vec::Vec<super::EndUserSolanaAccount>,
45339                ::std::string::String,
45340            >,
45341            solana_accounts: ::std::result::Result<
45342                ::std::vec::Vec<super::EndUserSolanaAccountsItem>,
45343                ::std::string::String,
45344            >,
45345            user_id: ::std::result::Result<super::EndUserUserId, ::std::string::String>,
45346        }
45347        impl ::std::default::Default for EndUser {
45348            fn default() -> Self {
45349                Self {
45350                    authentication_methods: Err(
45351                        "no value supplied for authentication_methods".to_string()
45352                    ),
45353                    created_at: Err("no value supplied for created_at".to_string()),
45354                    evm_account_objects: Err(
45355                        "no value supplied for evm_account_objects".to_string()
45356                    ),
45357                    evm_accounts: Err("no value supplied for evm_accounts".to_string()),
45358                    evm_smart_account_objects: Err(
45359                        "no value supplied for evm_smart_account_objects".to_string(),
45360                    ),
45361                    evm_smart_accounts: Err("no value supplied for evm_smart_accounts".to_string()),
45362                    solana_account_objects: Err(
45363                        "no value supplied for solana_account_objects".to_string()
45364                    ),
45365                    solana_accounts: Err("no value supplied for solana_accounts".to_string()),
45366                    user_id: Err("no value supplied for user_id".to_string()),
45367                }
45368            }
45369        }
45370        impl EndUser {
45371            pub fn authentication_methods<T>(mut self, value: T) -> Self
45372            where
45373                T: ::std::convert::TryInto<super::AuthenticationMethods>,
45374                T::Error: ::std::fmt::Display,
45375            {
45376                self.authentication_methods = value.try_into().map_err(|e| {
45377                    format!(
45378                        "error converting supplied value for authentication_methods: {}",
45379                        e
45380                    )
45381                });
45382                self
45383            }
45384            pub fn created_at<T>(mut self, value: T) -> Self
45385            where
45386                T: ::std::convert::TryInto<::chrono::DateTime<::chrono::offset::Utc>>,
45387                T::Error: ::std::fmt::Display,
45388            {
45389                self.created_at = value
45390                    .try_into()
45391                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
45392                self
45393            }
45394            pub fn evm_account_objects<T>(mut self, value: T) -> Self
45395            where
45396                T: ::std::convert::TryInto<::std::vec::Vec<super::EndUserEvmAccount>>,
45397                T::Error: ::std::fmt::Display,
45398            {
45399                self.evm_account_objects = value.try_into().map_err(|e| {
45400                    format!(
45401                        "error converting supplied value for evm_account_objects: {}",
45402                        e
45403                    )
45404                });
45405                self
45406            }
45407            pub fn evm_accounts<T>(mut self, value: T) -> Self
45408            where
45409                T: ::std::convert::TryInto<::std::vec::Vec<super::EndUserEvmAccountsItem>>,
45410                T::Error: ::std::fmt::Display,
45411            {
45412                self.evm_accounts = value.try_into().map_err(|e| {
45413                    format!("error converting supplied value for evm_accounts: {}", e)
45414                });
45415                self
45416            }
45417            pub fn evm_smart_account_objects<T>(mut self, value: T) -> Self
45418            where
45419                T: ::std::convert::TryInto<::std::vec::Vec<super::EndUserEvmSmartAccount>>,
45420                T::Error: ::std::fmt::Display,
45421            {
45422                self.evm_smart_account_objects = value.try_into().map_err(|e| {
45423                    format!(
45424                        "error converting supplied value for evm_smart_account_objects: {}",
45425                        e
45426                    )
45427                });
45428                self
45429            }
45430            pub fn evm_smart_accounts<T>(mut self, value: T) -> Self
45431            where
45432                T: ::std::convert::TryInto<::std::vec::Vec<super::EndUserEvmSmartAccountsItem>>,
45433                T::Error: ::std::fmt::Display,
45434            {
45435                self.evm_smart_accounts = value.try_into().map_err(|e| {
45436                    format!(
45437                        "error converting supplied value for evm_smart_accounts: {}",
45438                        e
45439                    )
45440                });
45441                self
45442            }
45443            pub fn solana_account_objects<T>(mut self, value: T) -> Self
45444            where
45445                T: ::std::convert::TryInto<::std::vec::Vec<super::EndUserSolanaAccount>>,
45446                T::Error: ::std::fmt::Display,
45447            {
45448                self.solana_account_objects = value.try_into().map_err(|e| {
45449                    format!(
45450                        "error converting supplied value for solana_account_objects: {}",
45451                        e
45452                    )
45453                });
45454                self
45455            }
45456            pub fn solana_accounts<T>(mut self, value: T) -> Self
45457            where
45458                T: ::std::convert::TryInto<::std::vec::Vec<super::EndUserSolanaAccountsItem>>,
45459                T::Error: ::std::fmt::Display,
45460            {
45461                self.solana_accounts = value.try_into().map_err(|e| {
45462                    format!("error converting supplied value for solana_accounts: {}", e)
45463                });
45464                self
45465            }
45466            pub fn user_id<T>(mut self, value: T) -> Self
45467            where
45468                T: ::std::convert::TryInto<super::EndUserUserId>,
45469                T::Error: ::std::fmt::Display,
45470            {
45471                self.user_id = value
45472                    .try_into()
45473                    .map_err(|e| format!("error converting supplied value for user_id: {}", e));
45474                self
45475            }
45476        }
45477        impl ::std::convert::TryFrom<EndUser> for super::EndUser {
45478            type Error = super::error::ConversionError;
45479            fn try_from(
45480                value: EndUser,
45481            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45482                Ok(Self {
45483                    authentication_methods: value.authentication_methods?,
45484                    created_at: value.created_at?,
45485                    evm_account_objects: value.evm_account_objects?,
45486                    evm_accounts: value.evm_accounts?,
45487                    evm_smart_account_objects: value.evm_smart_account_objects?,
45488                    evm_smart_accounts: value.evm_smart_accounts?,
45489                    solana_account_objects: value.solana_account_objects?,
45490                    solana_accounts: value.solana_accounts?,
45491                    user_id: value.user_id?,
45492                })
45493            }
45494        }
45495        impl ::std::convert::From<super::EndUser> for EndUser {
45496            fn from(value: super::EndUser) -> Self {
45497                Self {
45498                    authentication_methods: Ok(value.authentication_methods),
45499                    created_at: Ok(value.created_at),
45500                    evm_account_objects: Ok(value.evm_account_objects),
45501                    evm_accounts: Ok(value.evm_accounts),
45502                    evm_smart_account_objects: Ok(value.evm_smart_account_objects),
45503                    evm_smart_accounts: Ok(value.evm_smart_accounts),
45504                    solana_account_objects: Ok(value.solana_account_objects),
45505                    solana_accounts: Ok(value.solana_accounts),
45506                    user_id: Ok(value.user_id),
45507                }
45508            }
45509        }
45510        #[derive(Clone, Debug)]
45511        pub struct EndUserEvmAccount {
45512            address: ::std::result::Result<super::EndUserEvmAccountAddress, ::std::string::String>,
45513            created_at: ::std::result::Result<
45514                ::chrono::DateTime<::chrono::offset::Utc>,
45515                ::std::string::String,
45516            >,
45517        }
45518        impl ::std::default::Default for EndUserEvmAccount {
45519            fn default() -> Self {
45520                Self {
45521                    address: Err("no value supplied for address".to_string()),
45522                    created_at: Err("no value supplied for created_at".to_string()),
45523                }
45524            }
45525        }
45526        impl EndUserEvmAccount {
45527            pub fn address<T>(mut self, value: T) -> Self
45528            where
45529                T: ::std::convert::TryInto<super::EndUserEvmAccountAddress>,
45530                T::Error: ::std::fmt::Display,
45531            {
45532                self.address = value
45533                    .try_into()
45534                    .map_err(|e| format!("error converting supplied value for address: {}", e));
45535                self
45536            }
45537            pub fn created_at<T>(mut self, value: T) -> Self
45538            where
45539                T: ::std::convert::TryInto<::chrono::DateTime<::chrono::offset::Utc>>,
45540                T::Error: ::std::fmt::Display,
45541            {
45542                self.created_at = value
45543                    .try_into()
45544                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
45545                self
45546            }
45547        }
45548        impl ::std::convert::TryFrom<EndUserEvmAccount> for super::EndUserEvmAccount {
45549            type Error = super::error::ConversionError;
45550            fn try_from(
45551                value: EndUserEvmAccount,
45552            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45553                Ok(Self {
45554                    address: value.address?,
45555                    created_at: value.created_at?,
45556                })
45557            }
45558        }
45559        impl ::std::convert::From<super::EndUserEvmAccount> for EndUserEvmAccount {
45560            fn from(value: super::EndUserEvmAccount) -> Self {
45561                Self {
45562                    address: Ok(value.address),
45563                    created_at: Ok(value.created_at),
45564                }
45565            }
45566        }
45567        #[derive(Clone, Debug)]
45568        pub struct EndUserEvmSmartAccount {
45569            address:
45570                ::std::result::Result<super::EndUserEvmSmartAccountAddress, ::std::string::String>,
45571            created_at: ::std::result::Result<
45572                ::chrono::DateTime<::chrono::offset::Utc>,
45573                ::std::string::String,
45574            >,
45575            owner_addresses: ::std::result::Result<
45576                ::std::vec::Vec<super::EndUserEvmSmartAccountOwnerAddressesItem>,
45577                ::std::string::String,
45578            >,
45579        }
45580        impl ::std::default::Default for EndUserEvmSmartAccount {
45581            fn default() -> Self {
45582                Self {
45583                    address: Err("no value supplied for address".to_string()),
45584                    created_at: Err("no value supplied for created_at".to_string()),
45585                    owner_addresses: Err("no value supplied for owner_addresses".to_string()),
45586                }
45587            }
45588        }
45589        impl EndUserEvmSmartAccount {
45590            pub fn address<T>(mut self, value: T) -> Self
45591            where
45592                T: ::std::convert::TryInto<super::EndUserEvmSmartAccountAddress>,
45593                T::Error: ::std::fmt::Display,
45594            {
45595                self.address = value
45596                    .try_into()
45597                    .map_err(|e| format!("error converting supplied value for address: {}", e));
45598                self
45599            }
45600            pub fn created_at<T>(mut self, value: T) -> Self
45601            where
45602                T: ::std::convert::TryInto<::chrono::DateTime<::chrono::offset::Utc>>,
45603                T::Error: ::std::fmt::Display,
45604            {
45605                self.created_at = value
45606                    .try_into()
45607                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
45608                self
45609            }
45610            pub fn owner_addresses<T>(mut self, value: T) -> Self
45611            where
45612                T: ::std::convert::TryInto<
45613                    ::std::vec::Vec<super::EndUserEvmSmartAccountOwnerAddressesItem>,
45614                >,
45615                T::Error: ::std::fmt::Display,
45616            {
45617                self.owner_addresses = value.try_into().map_err(|e| {
45618                    format!("error converting supplied value for owner_addresses: {}", e)
45619                });
45620                self
45621            }
45622        }
45623        impl ::std::convert::TryFrom<EndUserEvmSmartAccount> for super::EndUserEvmSmartAccount {
45624            type Error = super::error::ConversionError;
45625            fn try_from(
45626                value: EndUserEvmSmartAccount,
45627            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45628                Ok(Self {
45629                    address: value.address?,
45630                    created_at: value.created_at?,
45631                    owner_addresses: value.owner_addresses?,
45632                })
45633            }
45634        }
45635        impl ::std::convert::From<super::EndUserEvmSmartAccount> for EndUserEvmSmartAccount {
45636            fn from(value: super::EndUserEvmSmartAccount) -> Self {
45637                Self {
45638                    address: Ok(value.address),
45639                    created_at: Ok(value.created_at),
45640                    owner_addresses: Ok(value.owner_addresses),
45641                }
45642            }
45643        }
45644        #[derive(Clone, Debug)]
45645        pub struct EndUserSolanaAccount {
45646            address:
45647                ::std::result::Result<super::EndUserSolanaAccountAddress, ::std::string::String>,
45648            created_at: ::std::result::Result<
45649                ::chrono::DateTime<::chrono::offset::Utc>,
45650                ::std::string::String,
45651            >,
45652        }
45653        impl ::std::default::Default for EndUserSolanaAccount {
45654            fn default() -> Self {
45655                Self {
45656                    address: Err("no value supplied for address".to_string()),
45657                    created_at: Err("no value supplied for created_at".to_string()),
45658                }
45659            }
45660        }
45661        impl EndUserSolanaAccount {
45662            pub fn address<T>(mut self, value: T) -> Self
45663            where
45664                T: ::std::convert::TryInto<super::EndUserSolanaAccountAddress>,
45665                T::Error: ::std::fmt::Display,
45666            {
45667                self.address = value
45668                    .try_into()
45669                    .map_err(|e| format!("error converting supplied value for address: {}", e));
45670                self
45671            }
45672            pub fn created_at<T>(mut self, value: T) -> Self
45673            where
45674                T: ::std::convert::TryInto<::chrono::DateTime<::chrono::offset::Utc>>,
45675                T::Error: ::std::fmt::Display,
45676            {
45677                self.created_at = value
45678                    .try_into()
45679                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
45680                self
45681            }
45682        }
45683        impl ::std::convert::TryFrom<EndUserSolanaAccount> for super::EndUserSolanaAccount {
45684            type Error = super::error::ConversionError;
45685            fn try_from(
45686                value: EndUserSolanaAccount,
45687            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45688                Ok(Self {
45689                    address: value.address?,
45690                    created_at: value.created_at?,
45691                })
45692            }
45693        }
45694        impl ::std::convert::From<super::EndUserSolanaAccount> for EndUserSolanaAccount {
45695            fn from(value: super::EndUserSolanaAccount) -> Self {
45696                Self {
45697                    address: Ok(value.address),
45698                    created_at: Ok(value.created_at),
45699                }
45700            }
45701        }
45702        #[derive(Clone, Debug)]
45703        pub struct Error {
45704            correlation_id: ::std::result::Result<
45705                ::std::option::Option<::std::string::String>,
45706                ::std::string::String,
45707            >,
45708            error_link:
45709                ::std::result::Result<::std::option::Option<super::Url>, ::std::string::String>,
45710            error_message: ::std::result::Result<::std::string::String, ::std::string::String>,
45711            error_type: ::std::result::Result<super::ErrorType, ::std::string::String>,
45712        }
45713        impl ::std::default::Default for Error {
45714            fn default() -> Self {
45715                Self {
45716                    correlation_id: Ok(Default::default()),
45717                    error_link: Ok(Default::default()),
45718                    error_message: Err("no value supplied for error_message".to_string()),
45719                    error_type: Err("no value supplied for error_type".to_string()),
45720                }
45721            }
45722        }
45723        impl Error {
45724            pub fn correlation_id<T>(mut self, value: T) -> Self
45725            where
45726                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
45727                T::Error: ::std::fmt::Display,
45728            {
45729                self.correlation_id = value.try_into().map_err(|e| {
45730                    format!("error converting supplied value for correlation_id: {}", e)
45731                });
45732                self
45733            }
45734            pub fn error_link<T>(mut self, value: T) -> Self
45735            where
45736                T: ::std::convert::TryInto<::std::option::Option<super::Url>>,
45737                T::Error: ::std::fmt::Display,
45738            {
45739                self.error_link = value
45740                    .try_into()
45741                    .map_err(|e| format!("error converting supplied value for error_link: {}", e));
45742                self
45743            }
45744            pub fn error_message<T>(mut self, value: T) -> Self
45745            where
45746                T: ::std::convert::TryInto<::std::string::String>,
45747                T::Error: ::std::fmt::Display,
45748            {
45749                self.error_message = value.try_into().map_err(|e| {
45750                    format!("error converting supplied value for error_message: {}", e)
45751                });
45752                self
45753            }
45754            pub fn error_type<T>(mut self, value: T) -> Self
45755            where
45756                T: ::std::convert::TryInto<super::ErrorType>,
45757                T::Error: ::std::fmt::Display,
45758            {
45759                self.error_type = value
45760                    .try_into()
45761                    .map_err(|e| format!("error converting supplied value for error_type: {}", e));
45762                self
45763            }
45764        }
45765        impl ::std::convert::TryFrom<Error> for super::Error {
45766            type Error = super::error::ConversionError;
45767            fn try_from(
45768                value: Error,
45769            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45770                Ok(Self {
45771                    correlation_id: value.correlation_id?,
45772                    error_link: value.error_link?,
45773                    error_message: value.error_message?,
45774                    error_type: value.error_type?,
45775                })
45776            }
45777        }
45778        impl ::std::convert::From<super::Error> for Error {
45779            fn from(value: super::Error) -> Self {
45780                Self {
45781                    correlation_id: Ok(value.correlation_id),
45782                    error_link: Ok(value.error_link),
45783                    error_message: Ok(value.error_message),
45784                    error_type: Ok(value.error_type),
45785                }
45786            }
45787        }
45788        #[derive(Clone, Debug)]
45789        pub struct EthValueCriterion {
45790            eth_value:
45791                ::std::result::Result<super::EthValueCriterionEthValue, ::std::string::String>,
45792            operator:
45793                ::std::result::Result<super::EthValueCriterionOperator, ::std::string::String>,
45794            type_: ::std::result::Result<super::EthValueCriterionType, ::std::string::String>,
45795        }
45796        impl ::std::default::Default for EthValueCriterion {
45797            fn default() -> Self {
45798                Self {
45799                    eth_value: Err("no value supplied for eth_value".to_string()),
45800                    operator: Err("no value supplied for operator".to_string()),
45801                    type_: Err("no value supplied for type_".to_string()),
45802                }
45803            }
45804        }
45805        impl EthValueCriterion {
45806            pub fn eth_value<T>(mut self, value: T) -> Self
45807            where
45808                T: ::std::convert::TryInto<super::EthValueCriterionEthValue>,
45809                T::Error: ::std::fmt::Display,
45810            {
45811                self.eth_value = value
45812                    .try_into()
45813                    .map_err(|e| format!("error converting supplied value for eth_value: {}", e));
45814                self
45815            }
45816            pub fn operator<T>(mut self, value: T) -> Self
45817            where
45818                T: ::std::convert::TryInto<super::EthValueCriterionOperator>,
45819                T::Error: ::std::fmt::Display,
45820            {
45821                self.operator = value
45822                    .try_into()
45823                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
45824                self
45825            }
45826            pub fn type_<T>(mut self, value: T) -> Self
45827            where
45828                T: ::std::convert::TryInto<super::EthValueCriterionType>,
45829                T::Error: ::std::fmt::Display,
45830            {
45831                self.type_ = value
45832                    .try_into()
45833                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
45834                self
45835            }
45836        }
45837        impl ::std::convert::TryFrom<EthValueCriterion> for super::EthValueCriterion {
45838            type Error = super::error::ConversionError;
45839            fn try_from(
45840                value: EthValueCriterion,
45841            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45842                Ok(Self {
45843                    eth_value: value.eth_value?,
45844                    operator: value.operator?,
45845                    type_: value.type_?,
45846                })
45847            }
45848        }
45849        impl ::std::convert::From<super::EthValueCriterion> for EthValueCriterion {
45850            fn from(value: super::EthValueCriterion) -> Self {
45851                Self {
45852                    eth_value: Ok(value.eth_value),
45853                    operator: Ok(value.operator),
45854                    type_: Ok(value.type_),
45855                }
45856            }
45857        }
45858        #[derive(Clone, Debug)]
45859        pub struct EvmAccount {
45860            address: ::std::result::Result<super::EvmAccountAddress, ::std::string::String>,
45861            created_at: ::std::result::Result<
45862                ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
45863                ::std::string::String,
45864            >,
45865            name: ::std::result::Result<
45866                ::std::option::Option<super::EvmAccountName>,
45867                ::std::string::String,
45868            >,
45869            policies: ::std::result::Result<
45870                ::std::vec::Vec<super::EvmAccountPoliciesItem>,
45871                ::std::string::String,
45872            >,
45873            updated_at: ::std::result::Result<
45874                ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
45875                ::std::string::String,
45876            >,
45877        }
45878        impl ::std::default::Default for EvmAccount {
45879            fn default() -> Self {
45880                Self {
45881                    address: Err("no value supplied for address".to_string()),
45882                    created_at: Ok(Default::default()),
45883                    name: Ok(Default::default()),
45884                    policies: Ok(Default::default()),
45885                    updated_at: Ok(Default::default()),
45886                }
45887            }
45888        }
45889        impl EvmAccount {
45890            pub fn address<T>(mut self, value: T) -> Self
45891            where
45892                T: ::std::convert::TryInto<super::EvmAccountAddress>,
45893                T::Error: ::std::fmt::Display,
45894            {
45895                self.address = value
45896                    .try_into()
45897                    .map_err(|e| format!("error converting supplied value for address: {}", e));
45898                self
45899            }
45900            pub fn created_at<T>(mut self, value: T) -> Self
45901            where
45902                T: ::std::convert::TryInto<
45903                    ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
45904                >,
45905                T::Error: ::std::fmt::Display,
45906            {
45907                self.created_at = value
45908                    .try_into()
45909                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
45910                self
45911            }
45912            pub fn name<T>(mut self, value: T) -> Self
45913            where
45914                T: ::std::convert::TryInto<::std::option::Option<super::EvmAccountName>>,
45915                T::Error: ::std::fmt::Display,
45916            {
45917                self.name = value
45918                    .try_into()
45919                    .map_err(|e| format!("error converting supplied value for name: {}", e));
45920                self
45921            }
45922            pub fn policies<T>(mut self, value: T) -> Self
45923            where
45924                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmAccountPoliciesItem>>,
45925                T::Error: ::std::fmt::Display,
45926            {
45927                self.policies = value
45928                    .try_into()
45929                    .map_err(|e| format!("error converting supplied value for policies: {}", e));
45930                self
45931            }
45932            pub fn updated_at<T>(mut self, value: T) -> Self
45933            where
45934                T: ::std::convert::TryInto<
45935                    ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
45936                >,
45937                T::Error: ::std::fmt::Display,
45938            {
45939                self.updated_at = value
45940                    .try_into()
45941                    .map_err(|e| format!("error converting supplied value for updated_at: {}", e));
45942                self
45943            }
45944        }
45945        impl ::std::convert::TryFrom<EvmAccount> for super::EvmAccount {
45946            type Error = super::error::ConversionError;
45947            fn try_from(
45948                value: EvmAccount,
45949            ) -> ::std::result::Result<Self, super::error::ConversionError> {
45950                Ok(Self {
45951                    address: value.address?,
45952                    created_at: value.created_at?,
45953                    name: value.name?,
45954                    policies: value.policies?,
45955                    updated_at: value.updated_at?,
45956                })
45957            }
45958        }
45959        impl ::std::convert::From<super::EvmAccount> for EvmAccount {
45960            fn from(value: super::EvmAccount) -> Self {
45961                Self {
45962                    address: Ok(value.address),
45963                    created_at: Ok(value.created_at),
45964                    name: Ok(value.name),
45965                    policies: Ok(value.policies),
45966                    updated_at: Ok(value.updated_at),
45967                }
45968            }
45969        }
45970        #[derive(Clone, Debug)]
45971        pub struct EvmAddressCriterion {
45972            addresses: ::std::result::Result<
45973                ::std::vec::Vec<super::EvmAddressCriterionAddressesItem>,
45974                ::std::string::String,
45975            >,
45976            operator:
45977                ::std::result::Result<super::EvmAddressCriterionOperator, ::std::string::String>,
45978            type_: ::std::result::Result<super::EvmAddressCriterionType, ::std::string::String>,
45979        }
45980        impl ::std::default::Default for EvmAddressCriterion {
45981            fn default() -> Self {
45982                Self {
45983                    addresses: Err("no value supplied for addresses".to_string()),
45984                    operator: Err("no value supplied for operator".to_string()),
45985                    type_: Err("no value supplied for type_".to_string()),
45986                }
45987            }
45988        }
45989        impl EvmAddressCriterion {
45990            pub fn addresses<T>(mut self, value: T) -> Self
45991            where
45992                T: ::std::convert::TryInto<
45993                    ::std::vec::Vec<super::EvmAddressCriterionAddressesItem>,
45994                >,
45995                T::Error: ::std::fmt::Display,
45996            {
45997                self.addresses = value
45998                    .try_into()
45999                    .map_err(|e| format!("error converting supplied value for addresses: {}", e));
46000                self
46001            }
46002            pub fn operator<T>(mut self, value: T) -> Self
46003            where
46004                T: ::std::convert::TryInto<super::EvmAddressCriterionOperator>,
46005                T::Error: ::std::fmt::Display,
46006            {
46007                self.operator = value
46008                    .try_into()
46009                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
46010                self
46011            }
46012            pub fn type_<T>(mut self, value: T) -> Self
46013            where
46014                T: ::std::convert::TryInto<super::EvmAddressCriterionType>,
46015                T::Error: ::std::fmt::Display,
46016            {
46017                self.type_ = value
46018                    .try_into()
46019                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
46020                self
46021            }
46022        }
46023        impl ::std::convert::TryFrom<EvmAddressCriterion> for super::EvmAddressCriterion {
46024            type Error = super::error::ConversionError;
46025            fn try_from(
46026                value: EvmAddressCriterion,
46027            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46028                Ok(Self {
46029                    addresses: value.addresses?,
46030                    operator: value.operator?,
46031                    type_: value.type_?,
46032                })
46033            }
46034        }
46035        impl ::std::convert::From<super::EvmAddressCriterion> for EvmAddressCriterion {
46036            fn from(value: super::EvmAddressCriterion) -> Self {
46037                Self {
46038                    addresses: Ok(value.addresses),
46039                    operator: Ok(value.operator),
46040                    type_: Ok(value.type_),
46041                }
46042            }
46043        }
46044        #[derive(Clone, Debug)]
46045        pub struct EvmCall {
46046            data: ::std::result::Result<super::EvmCallData, ::std::string::String>,
46047            override_gas_limit: ::std::result::Result<
46048                ::std::option::Option<::std::string::String>,
46049                ::std::string::String,
46050            >,
46051            to: ::std::result::Result<super::EvmCallTo, ::std::string::String>,
46052            value: ::std::result::Result<::std::string::String, ::std::string::String>,
46053        }
46054        impl ::std::default::Default for EvmCall {
46055            fn default() -> Self {
46056                Self {
46057                    data: Err("no value supplied for data".to_string()),
46058                    override_gas_limit: Ok(Default::default()),
46059                    to: Err("no value supplied for to".to_string()),
46060                    value: Err("no value supplied for value".to_string()),
46061                }
46062            }
46063        }
46064        impl EvmCall {
46065            pub fn data<T>(mut self, value: T) -> Self
46066            where
46067                T: ::std::convert::TryInto<super::EvmCallData>,
46068                T::Error: ::std::fmt::Display,
46069            {
46070                self.data = value
46071                    .try_into()
46072                    .map_err(|e| format!("error converting supplied value for data: {}", e));
46073                self
46074            }
46075            pub fn override_gas_limit<T>(mut self, value: T) -> Self
46076            where
46077                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
46078                T::Error: ::std::fmt::Display,
46079            {
46080                self.override_gas_limit = value.try_into().map_err(|e| {
46081                    format!(
46082                        "error converting supplied value for override_gas_limit: {}",
46083                        e
46084                    )
46085                });
46086                self
46087            }
46088            pub fn to<T>(mut self, value: T) -> Self
46089            where
46090                T: ::std::convert::TryInto<super::EvmCallTo>,
46091                T::Error: ::std::fmt::Display,
46092            {
46093                self.to = value
46094                    .try_into()
46095                    .map_err(|e| format!("error converting supplied value for to: {}", e));
46096                self
46097            }
46098            pub fn value<T>(mut self, value: T) -> Self
46099            where
46100                T: ::std::convert::TryInto<::std::string::String>,
46101                T::Error: ::std::fmt::Display,
46102            {
46103                self.value = value
46104                    .try_into()
46105                    .map_err(|e| format!("error converting supplied value for value: {}", e));
46106                self
46107            }
46108        }
46109        impl ::std::convert::TryFrom<EvmCall> for super::EvmCall {
46110            type Error = super::error::ConversionError;
46111            fn try_from(
46112                value: EvmCall,
46113            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46114                Ok(Self {
46115                    data: value.data?,
46116                    override_gas_limit: value.override_gas_limit?,
46117                    to: value.to?,
46118                    value: value.value?,
46119                })
46120            }
46121        }
46122        impl ::std::convert::From<super::EvmCall> for EvmCall {
46123            fn from(value: super::EvmCall) -> Self {
46124                Self {
46125                    data: Ok(value.data),
46126                    override_gas_limit: Ok(value.override_gas_limit),
46127                    to: Ok(value.to),
46128                    value: Ok(value.value),
46129                }
46130            }
46131        }
46132        #[derive(Clone, Debug)]
46133        pub struct EvmDataCondition {
46134            function: ::std::result::Result<::std::string::String, ::std::string::String>,
46135            params: ::std::result::Result<
46136                ::std::vec::Vec<super::EvmDataConditionParamsItem>,
46137                ::std::string::String,
46138            >,
46139        }
46140        impl ::std::default::Default for EvmDataCondition {
46141            fn default() -> Self {
46142                Self {
46143                    function: Err("no value supplied for function".to_string()),
46144                    params: Ok(Default::default()),
46145                }
46146            }
46147        }
46148        impl EvmDataCondition {
46149            pub fn function<T>(mut self, value: T) -> Self
46150            where
46151                T: ::std::convert::TryInto<::std::string::String>,
46152                T::Error: ::std::fmt::Display,
46153            {
46154                self.function = value
46155                    .try_into()
46156                    .map_err(|e| format!("error converting supplied value for function: {}", e));
46157                self
46158            }
46159            pub fn params<T>(mut self, value: T) -> Self
46160            where
46161                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmDataConditionParamsItem>>,
46162                T::Error: ::std::fmt::Display,
46163            {
46164                self.params = value
46165                    .try_into()
46166                    .map_err(|e| format!("error converting supplied value for params: {}", e));
46167                self
46168            }
46169        }
46170        impl ::std::convert::TryFrom<EvmDataCondition> for super::EvmDataCondition {
46171            type Error = super::error::ConversionError;
46172            fn try_from(
46173                value: EvmDataCondition,
46174            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46175                Ok(Self {
46176                    function: value.function?,
46177                    params: value.params?,
46178                })
46179            }
46180        }
46181        impl ::std::convert::From<super::EvmDataCondition> for EvmDataCondition {
46182            fn from(value: super::EvmDataCondition) -> Self {
46183                Self {
46184                    function: Ok(value.function),
46185                    params: Ok(value.params),
46186                }
46187            }
46188        }
46189        #[derive(Clone, Debug)]
46190        pub struct EvmDataCriterion {
46191            abi: ::std::result::Result<super::EvmDataCriterionAbi, ::std::string::String>,
46192            conditions: ::std::result::Result<
46193                ::std::vec::Vec<super::EvmDataCondition>,
46194                ::std::string::String,
46195            >,
46196            type_: ::std::result::Result<super::EvmDataCriterionType, ::std::string::String>,
46197        }
46198        impl ::std::default::Default for EvmDataCriterion {
46199            fn default() -> Self {
46200                Self {
46201                    abi: Err("no value supplied for abi".to_string()),
46202                    conditions: Err("no value supplied for conditions".to_string()),
46203                    type_: Err("no value supplied for type_".to_string()),
46204                }
46205            }
46206        }
46207        impl EvmDataCriterion {
46208            pub fn abi<T>(mut self, value: T) -> Self
46209            where
46210                T: ::std::convert::TryInto<super::EvmDataCriterionAbi>,
46211                T::Error: ::std::fmt::Display,
46212            {
46213                self.abi = value
46214                    .try_into()
46215                    .map_err(|e| format!("error converting supplied value for abi: {}", e));
46216                self
46217            }
46218            pub fn conditions<T>(mut self, value: T) -> Self
46219            where
46220                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmDataCondition>>,
46221                T::Error: ::std::fmt::Display,
46222            {
46223                self.conditions = value
46224                    .try_into()
46225                    .map_err(|e| format!("error converting supplied value for conditions: {}", e));
46226                self
46227            }
46228            pub fn type_<T>(mut self, value: T) -> Self
46229            where
46230                T: ::std::convert::TryInto<super::EvmDataCriterionType>,
46231                T::Error: ::std::fmt::Display,
46232            {
46233                self.type_ = value
46234                    .try_into()
46235                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
46236                self
46237            }
46238        }
46239        impl ::std::convert::TryFrom<EvmDataCriterion> for super::EvmDataCriterion {
46240            type Error = super::error::ConversionError;
46241            fn try_from(
46242                value: EvmDataCriterion,
46243            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46244                Ok(Self {
46245                    abi: value.abi?,
46246                    conditions: value.conditions?,
46247                    type_: value.type_?,
46248                })
46249            }
46250        }
46251        impl ::std::convert::From<super::EvmDataCriterion> for EvmDataCriterion {
46252            fn from(value: super::EvmDataCriterion) -> Self {
46253                Self {
46254                    abi: Ok(value.abi),
46255                    conditions: Ok(value.conditions),
46256                    type_: Ok(value.type_),
46257                }
46258            }
46259        }
46260        #[derive(Clone, Debug)]
46261        pub struct EvmDataParameterCondition {
46262            name: ::std::result::Result<::std::string::String, ::std::string::String>,
46263            operator: ::std::result::Result<
46264                super::EvmDataParameterConditionOperator,
46265                ::std::string::String,
46266            >,
46267            value: ::std::result::Result<::std::string::String, ::std::string::String>,
46268        }
46269        impl ::std::default::Default for EvmDataParameterCondition {
46270            fn default() -> Self {
46271                Self {
46272                    name: Err("no value supplied for name".to_string()),
46273                    operator: Err("no value supplied for operator".to_string()),
46274                    value: Err("no value supplied for value".to_string()),
46275                }
46276            }
46277        }
46278        impl EvmDataParameterCondition {
46279            pub fn name<T>(mut self, value: T) -> Self
46280            where
46281                T: ::std::convert::TryInto<::std::string::String>,
46282                T::Error: ::std::fmt::Display,
46283            {
46284                self.name = value
46285                    .try_into()
46286                    .map_err(|e| format!("error converting supplied value for name: {}", e));
46287                self
46288            }
46289            pub fn operator<T>(mut self, value: T) -> Self
46290            where
46291                T: ::std::convert::TryInto<super::EvmDataParameterConditionOperator>,
46292                T::Error: ::std::fmt::Display,
46293            {
46294                self.operator = value
46295                    .try_into()
46296                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
46297                self
46298            }
46299            pub fn value<T>(mut self, value: T) -> Self
46300            where
46301                T: ::std::convert::TryInto<::std::string::String>,
46302                T::Error: ::std::fmt::Display,
46303            {
46304                self.value = value
46305                    .try_into()
46306                    .map_err(|e| format!("error converting supplied value for value: {}", e));
46307                self
46308            }
46309        }
46310        impl ::std::convert::TryFrom<EvmDataParameterCondition> for super::EvmDataParameterCondition {
46311            type Error = super::error::ConversionError;
46312            fn try_from(
46313                value: EvmDataParameterCondition,
46314            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46315                Ok(Self {
46316                    name: value.name?,
46317                    operator: value.operator?,
46318                    value: value.value?,
46319                })
46320            }
46321        }
46322        impl ::std::convert::From<super::EvmDataParameterCondition> for EvmDataParameterCondition {
46323            fn from(value: super::EvmDataParameterCondition) -> Self {
46324                Self {
46325                    name: Ok(value.name),
46326                    operator: Ok(value.operator),
46327                    value: Ok(value.value),
46328                }
46329            }
46330        }
46331        #[derive(Clone, Debug)]
46332        pub struct EvmDataParameterConditionList {
46333            name: ::std::result::Result<::std::string::String, ::std::string::String>,
46334            operator: ::std::result::Result<
46335                super::EvmDataParameterConditionListOperator,
46336                ::std::string::String,
46337            >,
46338            values: ::std::result::Result<
46339                ::std::vec::Vec<::std::string::String>,
46340                ::std::string::String,
46341            >,
46342        }
46343        impl ::std::default::Default for EvmDataParameterConditionList {
46344            fn default() -> Self {
46345                Self {
46346                    name: Err("no value supplied for name".to_string()),
46347                    operator: Err("no value supplied for operator".to_string()),
46348                    values: Err("no value supplied for values".to_string()),
46349                }
46350            }
46351        }
46352        impl EvmDataParameterConditionList {
46353            pub fn name<T>(mut self, value: T) -> Self
46354            where
46355                T: ::std::convert::TryInto<::std::string::String>,
46356                T::Error: ::std::fmt::Display,
46357            {
46358                self.name = value
46359                    .try_into()
46360                    .map_err(|e| format!("error converting supplied value for name: {}", e));
46361                self
46362            }
46363            pub fn operator<T>(mut self, value: T) -> Self
46364            where
46365                T: ::std::convert::TryInto<super::EvmDataParameterConditionListOperator>,
46366                T::Error: ::std::fmt::Display,
46367            {
46368                self.operator = value
46369                    .try_into()
46370                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
46371                self
46372            }
46373            pub fn values<T>(mut self, value: T) -> Self
46374            where
46375                T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
46376                T::Error: ::std::fmt::Display,
46377            {
46378                self.values = value
46379                    .try_into()
46380                    .map_err(|e| format!("error converting supplied value for values: {}", e));
46381                self
46382            }
46383        }
46384        impl ::std::convert::TryFrom<EvmDataParameterConditionList>
46385            for super::EvmDataParameterConditionList
46386        {
46387            type Error = super::error::ConversionError;
46388            fn try_from(
46389                value: EvmDataParameterConditionList,
46390            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46391                Ok(Self {
46392                    name: value.name?,
46393                    operator: value.operator?,
46394                    values: value.values?,
46395                })
46396            }
46397        }
46398        impl ::std::convert::From<super::EvmDataParameterConditionList> for EvmDataParameterConditionList {
46399            fn from(value: super::EvmDataParameterConditionList) -> Self {
46400                Self {
46401                    name: Ok(value.name),
46402                    operator: Ok(value.operator),
46403                    values: Ok(value.values),
46404                }
46405            }
46406        }
46407        #[derive(Clone, Debug)]
46408        pub struct EvmMessageCriterion {
46409            match_: ::std::result::Result<::std::string::String, ::std::string::String>,
46410            type_: ::std::result::Result<super::EvmMessageCriterionType, ::std::string::String>,
46411        }
46412        impl ::std::default::Default for EvmMessageCriterion {
46413            fn default() -> Self {
46414                Self {
46415                    match_: Err("no value supplied for match_".to_string()),
46416                    type_: Err("no value supplied for type_".to_string()),
46417                }
46418            }
46419        }
46420        impl EvmMessageCriterion {
46421            pub fn match_<T>(mut self, value: T) -> Self
46422            where
46423                T: ::std::convert::TryInto<::std::string::String>,
46424                T::Error: ::std::fmt::Display,
46425            {
46426                self.match_ = value
46427                    .try_into()
46428                    .map_err(|e| format!("error converting supplied value for match_: {}", e));
46429                self
46430            }
46431            pub fn type_<T>(mut self, value: T) -> Self
46432            where
46433                T: ::std::convert::TryInto<super::EvmMessageCriterionType>,
46434                T::Error: ::std::fmt::Display,
46435            {
46436                self.type_ = value
46437                    .try_into()
46438                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
46439                self
46440            }
46441        }
46442        impl ::std::convert::TryFrom<EvmMessageCriterion> for super::EvmMessageCriterion {
46443            type Error = super::error::ConversionError;
46444            fn try_from(
46445                value: EvmMessageCriterion,
46446            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46447                Ok(Self {
46448                    match_: value.match_?,
46449                    type_: value.type_?,
46450                })
46451            }
46452        }
46453        impl ::std::convert::From<super::EvmMessageCriterion> for EvmMessageCriterion {
46454            fn from(value: super::EvmMessageCriterion) -> Self {
46455                Self {
46456                    match_: Ok(value.match_),
46457                    type_: Ok(value.type_),
46458                }
46459            }
46460        }
46461        #[derive(Clone, Debug)]
46462        pub struct EvmNetworkCriterion {
46463            networks: ::std::result::Result<
46464                ::std::vec::Vec<super::EvmNetworkCriterionNetworksItem>,
46465                ::std::string::String,
46466            >,
46467            operator:
46468                ::std::result::Result<super::EvmNetworkCriterionOperator, ::std::string::String>,
46469            type_: ::std::result::Result<super::EvmNetworkCriterionType, ::std::string::String>,
46470        }
46471        impl ::std::default::Default for EvmNetworkCriterion {
46472            fn default() -> Self {
46473                Self {
46474                    networks: Err("no value supplied for networks".to_string()),
46475                    operator: Err("no value supplied for operator".to_string()),
46476                    type_: Err("no value supplied for type_".to_string()),
46477                }
46478            }
46479        }
46480        impl EvmNetworkCriterion {
46481            pub fn networks<T>(mut self, value: T) -> Self
46482            where
46483                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmNetworkCriterionNetworksItem>>,
46484                T::Error: ::std::fmt::Display,
46485            {
46486                self.networks = value
46487                    .try_into()
46488                    .map_err(|e| format!("error converting supplied value for networks: {}", e));
46489                self
46490            }
46491            pub fn operator<T>(mut self, value: T) -> Self
46492            where
46493                T: ::std::convert::TryInto<super::EvmNetworkCriterionOperator>,
46494                T::Error: ::std::fmt::Display,
46495            {
46496                self.operator = value
46497                    .try_into()
46498                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
46499                self
46500            }
46501            pub fn type_<T>(mut self, value: T) -> Self
46502            where
46503                T: ::std::convert::TryInto<super::EvmNetworkCriterionType>,
46504                T::Error: ::std::fmt::Display,
46505            {
46506                self.type_ = value
46507                    .try_into()
46508                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
46509                self
46510            }
46511        }
46512        impl ::std::convert::TryFrom<EvmNetworkCriterion> for super::EvmNetworkCriterion {
46513            type Error = super::error::ConversionError;
46514            fn try_from(
46515                value: EvmNetworkCriterion,
46516            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46517                Ok(Self {
46518                    networks: value.networks?,
46519                    operator: value.operator?,
46520                    type_: value.type_?,
46521                })
46522            }
46523        }
46524        impl ::std::convert::From<super::EvmNetworkCriterion> for EvmNetworkCriterion {
46525            fn from(value: super::EvmNetworkCriterion) -> Self {
46526                Self {
46527                    networks: Ok(value.networks),
46528                    operator: Ok(value.operator),
46529                    type_: Ok(value.type_),
46530                }
46531            }
46532        }
46533        #[derive(Clone, Debug)]
46534        pub struct EvmSmartAccount {
46535            address: ::std::result::Result<super::EvmSmartAccountAddress, ::std::string::String>,
46536            created_at: ::std::result::Result<
46537                ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
46538                ::std::string::String,
46539            >,
46540            name: ::std::result::Result<
46541                ::std::option::Option<super::EvmSmartAccountName>,
46542                ::std::string::String,
46543            >,
46544            owners: ::std::result::Result<
46545                ::std::vec::Vec<super::EvmSmartAccountOwnersItem>,
46546                ::std::string::String,
46547            >,
46548            policies: ::std::result::Result<
46549                ::std::vec::Vec<super::EvmSmartAccountPoliciesItem>,
46550                ::std::string::String,
46551            >,
46552            updated_at: ::std::result::Result<
46553                ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
46554                ::std::string::String,
46555            >,
46556        }
46557        impl ::std::default::Default for EvmSmartAccount {
46558            fn default() -> Self {
46559                Self {
46560                    address: Err("no value supplied for address".to_string()),
46561                    created_at: Ok(Default::default()),
46562                    name: Ok(Default::default()),
46563                    owners: Err("no value supplied for owners".to_string()),
46564                    policies: Ok(Default::default()),
46565                    updated_at: Ok(Default::default()),
46566                }
46567            }
46568        }
46569        impl EvmSmartAccount {
46570            pub fn address<T>(mut self, value: T) -> Self
46571            where
46572                T: ::std::convert::TryInto<super::EvmSmartAccountAddress>,
46573                T::Error: ::std::fmt::Display,
46574            {
46575                self.address = value
46576                    .try_into()
46577                    .map_err(|e| format!("error converting supplied value for address: {}", e));
46578                self
46579            }
46580            pub fn created_at<T>(mut self, value: T) -> Self
46581            where
46582                T: ::std::convert::TryInto<
46583                    ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
46584                >,
46585                T::Error: ::std::fmt::Display,
46586            {
46587                self.created_at = value
46588                    .try_into()
46589                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
46590                self
46591            }
46592            pub fn name<T>(mut self, value: T) -> Self
46593            where
46594                T: ::std::convert::TryInto<::std::option::Option<super::EvmSmartAccountName>>,
46595                T::Error: ::std::fmt::Display,
46596            {
46597                self.name = value
46598                    .try_into()
46599                    .map_err(|e| format!("error converting supplied value for name: {}", e));
46600                self
46601            }
46602            pub fn owners<T>(mut self, value: T) -> Self
46603            where
46604                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmSmartAccountOwnersItem>>,
46605                T::Error: ::std::fmt::Display,
46606            {
46607                self.owners = value
46608                    .try_into()
46609                    .map_err(|e| format!("error converting supplied value for owners: {}", e));
46610                self
46611            }
46612            pub fn policies<T>(mut self, value: T) -> Self
46613            where
46614                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmSmartAccountPoliciesItem>>,
46615                T::Error: ::std::fmt::Display,
46616            {
46617                self.policies = value
46618                    .try_into()
46619                    .map_err(|e| format!("error converting supplied value for policies: {}", e));
46620                self
46621            }
46622            pub fn updated_at<T>(mut self, value: T) -> Self
46623            where
46624                T: ::std::convert::TryInto<
46625                    ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
46626                >,
46627                T::Error: ::std::fmt::Display,
46628            {
46629                self.updated_at = value
46630                    .try_into()
46631                    .map_err(|e| format!("error converting supplied value for updated_at: {}", e));
46632                self
46633            }
46634        }
46635        impl ::std::convert::TryFrom<EvmSmartAccount> for super::EvmSmartAccount {
46636            type Error = super::error::ConversionError;
46637            fn try_from(
46638                value: EvmSmartAccount,
46639            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46640                Ok(Self {
46641                    address: value.address?,
46642                    created_at: value.created_at?,
46643                    name: value.name?,
46644                    owners: value.owners?,
46645                    policies: value.policies?,
46646                    updated_at: value.updated_at?,
46647                })
46648            }
46649        }
46650        impl ::std::convert::From<super::EvmSmartAccount> for EvmSmartAccount {
46651            fn from(value: super::EvmSmartAccount) -> Self {
46652                Self {
46653                    address: Ok(value.address),
46654                    created_at: Ok(value.created_at),
46655                    name: Ok(value.name),
46656                    owners: Ok(value.owners),
46657                    policies: Ok(value.policies),
46658                    updated_at: Ok(value.updated_at),
46659                }
46660            }
46661        }
46662        #[derive(Clone, Debug)]
46663        pub struct EvmTypedAddressCondition {
46664            addresses: ::std::result::Result<
46665                ::std::vec::Vec<super::EvmTypedAddressConditionAddressesItem>,
46666                ::std::string::String,
46667            >,
46668            operator: ::std::result::Result<
46669                super::EvmTypedAddressConditionOperator,
46670                ::std::string::String,
46671            >,
46672            path: ::std::result::Result<::std::string::String, ::std::string::String>,
46673        }
46674        impl ::std::default::Default for EvmTypedAddressCondition {
46675            fn default() -> Self {
46676                Self {
46677                    addresses: Err("no value supplied for addresses".to_string()),
46678                    operator: Err("no value supplied for operator".to_string()),
46679                    path: Err("no value supplied for path".to_string()),
46680                }
46681            }
46682        }
46683        impl EvmTypedAddressCondition {
46684            pub fn addresses<T>(mut self, value: T) -> Self
46685            where
46686                T: ::std::convert::TryInto<
46687                    ::std::vec::Vec<super::EvmTypedAddressConditionAddressesItem>,
46688                >,
46689                T::Error: ::std::fmt::Display,
46690            {
46691                self.addresses = value
46692                    .try_into()
46693                    .map_err(|e| format!("error converting supplied value for addresses: {}", e));
46694                self
46695            }
46696            pub fn operator<T>(mut self, value: T) -> Self
46697            where
46698                T: ::std::convert::TryInto<super::EvmTypedAddressConditionOperator>,
46699                T::Error: ::std::fmt::Display,
46700            {
46701                self.operator = value
46702                    .try_into()
46703                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
46704                self
46705            }
46706            pub fn path<T>(mut self, value: T) -> Self
46707            where
46708                T: ::std::convert::TryInto<::std::string::String>,
46709                T::Error: ::std::fmt::Display,
46710            {
46711                self.path = value
46712                    .try_into()
46713                    .map_err(|e| format!("error converting supplied value for path: {}", e));
46714                self
46715            }
46716        }
46717        impl ::std::convert::TryFrom<EvmTypedAddressCondition> for super::EvmTypedAddressCondition {
46718            type Error = super::error::ConversionError;
46719            fn try_from(
46720                value: EvmTypedAddressCondition,
46721            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46722                Ok(Self {
46723                    addresses: value.addresses?,
46724                    operator: value.operator?,
46725                    path: value.path?,
46726                })
46727            }
46728        }
46729        impl ::std::convert::From<super::EvmTypedAddressCondition> for EvmTypedAddressCondition {
46730            fn from(value: super::EvmTypedAddressCondition) -> Self {
46731                Self {
46732                    addresses: Ok(value.addresses),
46733                    operator: Ok(value.operator),
46734                    path: Ok(value.path),
46735                }
46736            }
46737        }
46738        #[derive(Clone, Debug)]
46739        pub struct EvmTypedNumericalCondition {
46740            operator: ::std::result::Result<
46741                super::EvmTypedNumericalConditionOperator,
46742                ::std::string::String,
46743            >,
46744            path: ::std::result::Result<::std::string::String, ::std::string::String>,
46745            value: ::std::result::Result<
46746                super::EvmTypedNumericalConditionValue,
46747                ::std::string::String,
46748            >,
46749        }
46750        impl ::std::default::Default for EvmTypedNumericalCondition {
46751            fn default() -> Self {
46752                Self {
46753                    operator: Err("no value supplied for operator".to_string()),
46754                    path: Err("no value supplied for path".to_string()),
46755                    value: Err("no value supplied for value".to_string()),
46756                }
46757            }
46758        }
46759        impl EvmTypedNumericalCondition {
46760            pub fn operator<T>(mut self, value: T) -> Self
46761            where
46762                T: ::std::convert::TryInto<super::EvmTypedNumericalConditionOperator>,
46763                T::Error: ::std::fmt::Display,
46764            {
46765                self.operator = value
46766                    .try_into()
46767                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
46768                self
46769            }
46770            pub fn path<T>(mut self, value: T) -> Self
46771            where
46772                T: ::std::convert::TryInto<::std::string::String>,
46773                T::Error: ::std::fmt::Display,
46774            {
46775                self.path = value
46776                    .try_into()
46777                    .map_err(|e| format!("error converting supplied value for path: {}", e));
46778                self
46779            }
46780            pub fn value<T>(mut self, value: T) -> Self
46781            where
46782                T: ::std::convert::TryInto<super::EvmTypedNumericalConditionValue>,
46783                T::Error: ::std::fmt::Display,
46784            {
46785                self.value = value
46786                    .try_into()
46787                    .map_err(|e| format!("error converting supplied value for value: {}", e));
46788                self
46789            }
46790        }
46791        impl ::std::convert::TryFrom<EvmTypedNumericalCondition> for super::EvmTypedNumericalCondition {
46792            type Error = super::error::ConversionError;
46793            fn try_from(
46794                value: EvmTypedNumericalCondition,
46795            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46796                Ok(Self {
46797                    operator: value.operator?,
46798                    path: value.path?,
46799                    value: value.value?,
46800                })
46801            }
46802        }
46803        impl ::std::convert::From<super::EvmTypedNumericalCondition> for EvmTypedNumericalCondition {
46804            fn from(value: super::EvmTypedNumericalCondition) -> Self {
46805                Self {
46806                    operator: Ok(value.operator),
46807                    path: Ok(value.path),
46808                    value: Ok(value.value),
46809                }
46810            }
46811        }
46812        #[derive(Clone, Debug)]
46813        pub struct EvmTypedStringCondition {
46814            match_: ::std::result::Result<::std::string::String, ::std::string::String>,
46815            path: ::std::result::Result<::std::string::String, ::std::string::String>,
46816        }
46817        impl ::std::default::Default for EvmTypedStringCondition {
46818            fn default() -> Self {
46819                Self {
46820                    match_: Err("no value supplied for match_".to_string()),
46821                    path: Err("no value supplied for path".to_string()),
46822                }
46823            }
46824        }
46825        impl EvmTypedStringCondition {
46826            pub fn match_<T>(mut self, value: T) -> Self
46827            where
46828                T: ::std::convert::TryInto<::std::string::String>,
46829                T::Error: ::std::fmt::Display,
46830            {
46831                self.match_ = value
46832                    .try_into()
46833                    .map_err(|e| format!("error converting supplied value for match_: {}", e));
46834                self
46835            }
46836            pub fn path<T>(mut self, value: T) -> Self
46837            where
46838                T: ::std::convert::TryInto<::std::string::String>,
46839                T::Error: ::std::fmt::Display,
46840            {
46841                self.path = value
46842                    .try_into()
46843                    .map_err(|e| format!("error converting supplied value for path: {}", e));
46844                self
46845            }
46846        }
46847        impl ::std::convert::TryFrom<EvmTypedStringCondition> for super::EvmTypedStringCondition {
46848            type Error = super::error::ConversionError;
46849            fn try_from(
46850                value: EvmTypedStringCondition,
46851            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46852                Ok(Self {
46853                    match_: value.match_?,
46854                    path: value.path?,
46855                })
46856            }
46857        }
46858        impl ::std::convert::From<super::EvmTypedStringCondition> for EvmTypedStringCondition {
46859            fn from(value: super::EvmTypedStringCondition) -> Self {
46860                Self {
46861                    match_: Ok(value.match_),
46862                    path: Ok(value.path),
46863                }
46864            }
46865        }
46866        #[derive(Clone, Debug)]
46867        pub struct EvmUserOperation {
46868            calls: ::std::result::Result<::std::vec::Vec<super::EvmCall>, ::std::string::String>,
46869            network: ::std::result::Result<super::EvmUserOperationNetwork, ::std::string::String>,
46870            receipts: ::std::result::Result<
46871                ::std::vec::Vec<super::UserOperationReceipt>,
46872                ::std::string::String,
46873            >,
46874            status: ::std::result::Result<super::EvmUserOperationStatus, ::std::string::String>,
46875            transaction_hash: ::std::result::Result<
46876                ::std::option::Option<super::EvmUserOperationTransactionHash>,
46877                ::std::string::String,
46878            >,
46879            user_op_hash:
46880                ::std::result::Result<super::EvmUserOperationUserOpHash, ::std::string::String>,
46881        }
46882        impl ::std::default::Default for EvmUserOperation {
46883            fn default() -> Self {
46884                Self {
46885                    calls: Err("no value supplied for calls".to_string()),
46886                    network: Err("no value supplied for network".to_string()),
46887                    receipts: Ok(Default::default()),
46888                    status: Err("no value supplied for status".to_string()),
46889                    transaction_hash: Ok(Default::default()),
46890                    user_op_hash: Err("no value supplied for user_op_hash".to_string()),
46891                }
46892            }
46893        }
46894        impl EvmUserOperation {
46895            pub fn calls<T>(mut self, value: T) -> Self
46896            where
46897                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmCall>>,
46898                T::Error: ::std::fmt::Display,
46899            {
46900                self.calls = value
46901                    .try_into()
46902                    .map_err(|e| format!("error converting supplied value for calls: {}", e));
46903                self
46904            }
46905            pub fn network<T>(mut self, value: T) -> Self
46906            where
46907                T: ::std::convert::TryInto<super::EvmUserOperationNetwork>,
46908                T::Error: ::std::fmt::Display,
46909            {
46910                self.network = value
46911                    .try_into()
46912                    .map_err(|e| format!("error converting supplied value for network: {}", e));
46913                self
46914            }
46915            pub fn receipts<T>(mut self, value: T) -> Self
46916            where
46917                T: ::std::convert::TryInto<::std::vec::Vec<super::UserOperationReceipt>>,
46918                T::Error: ::std::fmt::Display,
46919            {
46920                self.receipts = value
46921                    .try_into()
46922                    .map_err(|e| format!("error converting supplied value for receipts: {}", e));
46923                self
46924            }
46925            pub fn status<T>(mut self, value: T) -> Self
46926            where
46927                T: ::std::convert::TryInto<super::EvmUserOperationStatus>,
46928                T::Error: ::std::fmt::Display,
46929            {
46930                self.status = value
46931                    .try_into()
46932                    .map_err(|e| format!("error converting supplied value for status: {}", e));
46933                self
46934            }
46935            pub fn transaction_hash<T>(mut self, value: T) -> Self
46936            where
46937                T: ::std::convert::TryInto<
46938                    ::std::option::Option<super::EvmUserOperationTransactionHash>,
46939                >,
46940                T::Error: ::std::fmt::Display,
46941            {
46942                self.transaction_hash = value.try_into().map_err(|e| {
46943                    format!(
46944                        "error converting supplied value for transaction_hash: {}",
46945                        e
46946                    )
46947                });
46948                self
46949            }
46950            pub fn user_op_hash<T>(mut self, value: T) -> Self
46951            where
46952                T: ::std::convert::TryInto<super::EvmUserOperationUserOpHash>,
46953                T::Error: ::std::fmt::Display,
46954            {
46955                self.user_op_hash = value.try_into().map_err(|e| {
46956                    format!("error converting supplied value for user_op_hash: {}", e)
46957                });
46958                self
46959            }
46960        }
46961        impl ::std::convert::TryFrom<EvmUserOperation> for super::EvmUserOperation {
46962            type Error = super::error::ConversionError;
46963            fn try_from(
46964                value: EvmUserOperation,
46965            ) -> ::std::result::Result<Self, super::error::ConversionError> {
46966                Ok(Self {
46967                    calls: value.calls?,
46968                    network: value.network?,
46969                    receipts: value.receipts?,
46970                    status: value.status?,
46971                    transaction_hash: value.transaction_hash?,
46972                    user_op_hash: value.user_op_hash?,
46973                })
46974            }
46975        }
46976        impl ::std::convert::From<super::EvmUserOperation> for EvmUserOperation {
46977            fn from(value: super::EvmUserOperation) -> Self {
46978                Self {
46979                    calls: Ok(value.calls),
46980                    network: Ok(value.network),
46981                    receipts: Ok(value.receipts),
46982                    status: Ok(value.status),
46983                    transaction_hash: Ok(value.transaction_hash),
46984                    user_op_hash: Ok(value.user_op_hash),
46985                }
46986            }
46987        }
46988        #[derive(Clone, Debug)]
46989        pub struct ExportEvmAccountBody {
46990            export_encryption_key:
46991                ::std::result::Result<::std::string::String, ::std::string::String>,
46992        }
46993        impl ::std::default::Default for ExportEvmAccountBody {
46994            fn default() -> Self {
46995                Self {
46996                    export_encryption_key: Err(
46997                        "no value supplied for export_encryption_key".to_string()
46998                    ),
46999                }
47000            }
47001        }
47002        impl ExportEvmAccountBody {
47003            pub fn export_encryption_key<T>(mut self, value: T) -> Self
47004            where
47005                T: ::std::convert::TryInto<::std::string::String>,
47006                T::Error: ::std::fmt::Display,
47007            {
47008                self.export_encryption_key = value.try_into().map_err(|e| {
47009                    format!(
47010                        "error converting supplied value for export_encryption_key: {}",
47011                        e
47012                    )
47013                });
47014                self
47015            }
47016        }
47017        impl ::std::convert::TryFrom<ExportEvmAccountBody> for super::ExportEvmAccountBody {
47018            type Error = super::error::ConversionError;
47019            fn try_from(
47020                value: ExportEvmAccountBody,
47021            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47022                Ok(Self {
47023                    export_encryption_key: value.export_encryption_key?,
47024                })
47025            }
47026        }
47027        impl ::std::convert::From<super::ExportEvmAccountBody> for ExportEvmAccountBody {
47028            fn from(value: super::ExportEvmAccountBody) -> Self {
47029                Self {
47030                    export_encryption_key: Ok(value.export_encryption_key),
47031                }
47032            }
47033        }
47034        #[derive(Clone, Debug)]
47035        pub struct ExportEvmAccountByNameBody {
47036            export_encryption_key:
47037                ::std::result::Result<::std::string::String, ::std::string::String>,
47038        }
47039        impl ::std::default::Default for ExportEvmAccountByNameBody {
47040            fn default() -> Self {
47041                Self {
47042                    export_encryption_key: Err(
47043                        "no value supplied for export_encryption_key".to_string()
47044                    ),
47045                }
47046            }
47047        }
47048        impl ExportEvmAccountByNameBody {
47049            pub fn export_encryption_key<T>(mut self, value: T) -> Self
47050            where
47051                T: ::std::convert::TryInto<::std::string::String>,
47052                T::Error: ::std::fmt::Display,
47053            {
47054                self.export_encryption_key = value.try_into().map_err(|e| {
47055                    format!(
47056                        "error converting supplied value for export_encryption_key: {}",
47057                        e
47058                    )
47059                });
47060                self
47061            }
47062        }
47063        impl ::std::convert::TryFrom<ExportEvmAccountByNameBody> for super::ExportEvmAccountByNameBody {
47064            type Error = super::error::ConversionError;
47065            fn try_from(
47066                value: ExportEvmAccountByNameBody,
47067            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47068                Ok(Self {
47069                    export_encryption_key: value.export_encryption_key?,
47070                })
47071            }
47072        }
47073        impl ::std::convert::From<super::ExportEvmAccountByNameBody> for ExportEvmAccountByNameBody {
47074            fn from(value: super::ExportEvmAccountByNameBody) -> Self {
47075                Self {
47076                    export_encryption_key: Ok(value.export_encryption_key),
47077                }
47078            }
47079        }
47080        #[derive(Clone, Debug)]
47081        pub struct ExportEvmAccountByNameResponse {
47082            encrypted_private_key:
47083                ::std::result::Result<::std::string::String, ::std::string::String>,
47084        }
47085        impl ::std::default::Default for ExportEvmAccountByNameResponse {
47086            fn default() -> Self {
47087                Self {
47088                    encrypted_private_key: Err(
47089                        "no value supplied for encrypted_private_key".to_string()
47090                    ),
47091                }
47092            }
47093        }
47094        impl ExportEvmAccountByNameResponse {
47095            pub fn encrypted_private_key<T>(mut self, value: T) -> Self
47096            where
47097                T: ::std::convert::TryInto<::std::string::String>,
47098                T::Error: ::std::fmt::Display,
47099            {
47100                self.encrypted_private_key = value.try_into().map_err(|e| {
47101                    format!(
47102                        "error converting supplied value for encrypted_private_key: {}",
47103                        e
47104                    )
47105                });
47106                self
47107            }
47108        }
47109        impl ::std::convert::TryFrom<ExportEvmAccountByNameResponse>
47110            for super::ExportEvmAccountByNameResponse
47111        {
47112            type Error = super::error::ConversionError;
47113            fn try_from(
47114                value: ExportEvmAccountByNameResponse,
47115            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47116                Ok(Self {
47117                    encrypted_private_key: value.encrypted_private_key?,
47118                })
47119            }
47120        }
47121        impl ::std::convert::From<super::ExportEvmAccountByNameResponse>
47122            for ExportEvmAccountByNameResponse
47123        {
47124            fn from(value: super::ExportEvmAccountByNameResponse) -> Self {
47125                Self {
47126                    encrypted_private_key: Ok(value.encrypted_private_key),
47127                }
47128            }
47129        }
47130        #[derive(Clone, Debug)]
47131        pub struct ExportEvmAccountResponse {
47132            encrypted_private_key:
47133                ::std::result::Result<::std::string::String, ::std::string::String>,
47134        }
47135        impl ::std::default::Default for ExportEvmAccountResponse {
47136            fn default() -> Self {
47137                Self {
47138                    encrypted_private_key: Err(
47139                        "no value supplied for encrypted_private_key".to_string()
47140                    ),
47141                }
47142            }
47143        }
47144        impl ExportEvmAccountResponse {
47145            pub fn encrypted_private_key<T>(mut self, value: T) -> Self
47146            where
47147                T: ::std::convert::TryInto<::std::string::String>,
47148                T::Error: ::std::fmt::Display,
47149            {
47150                self.encrypted_private_key = value.try_into().map_err(|e| {
47151                    format!(
47152                        "error converting supplied value for encrypted_private_key: {}",
47153                        e
47154                    )
47155                });
47156                self
47157            }
47158        }
47159        impl ::std::convert::TryFrom<ExportEvmAccountResponse> for super::ExportEvmAccountResponse {
47160            type Error = super::error::ConversionError;
47161            fn try_from(
47162                value: ExportEvmAccountResponse,
47163            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47164                Ok(Self {
47165                    encrypted_private_key: value.encrypted_private_key?,
47166                })
47167            }
47168        }
47169        impl ::std::convert::From<super::ExportEvmAccountResponse> for ExportEvmAccountResponse {
47170            fn from(value: super::ExportEvmAccountResponse) -> Self {
47171                Self {
47172                    encrypted_private_key: Ok(value.encrypted_private_key),
47173                }
47174            }
47175        }
47176        #[derive(Clone, Debug)]
47177        pub struct ExportSolanaAccountBody {
47178            export_encryption_key:
47179                ::std::result::Result<::std::string::String, ::std::string::String>,
47180        }
47181        impl ::std::default::Default for ExportSolanaAccountBody {
47182            fn default() -> Self {
47183                Self {
47184                    export_encryption_key: Err(
47185                        "no value supplied for export_encryption_key".to_string()
47186                    ),
47187                }
47188            }
47189        }
47190        impl ExportSolanaAccountBody {
47191            pub fn export_encryption_key<T>(mut self, value: T) -> Self
47192            where
47193                T: ::std::convert::TryInto<::std::string::String>,
47194                T::Error: ::std::fmt::Display,
47195            {
47196                self.export_encryption_key = value.try_into().map_err(|e| {
47197                    format!(
47198                        "error converting supplied value for export_encryption_key: {}",
47199                        e
47200                    )
47201                });
47202                self
47203            }
47204        }
47205        impl ::std::convert::TryFrom<ExportSolanaAccountBody> for super::ExportSolanaAccountBody {
47206            type Error = super::error::ConversionError;
47207            fn try_from(
47208                value: ExportSolanaAccountBody,
47209            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47210                Ok(Self {
47211                    export_encryption_key: value.export_encryption_key?,
47212                })
47213            }
47214        }
47215        impl ::std::convert::From<super::ExportSolanaAccountBody> for ExportSolanaAccountBody {
47216            fn from(value: super::ExportSolanaAccountBody) -> Self {
47217                Self {
47218                    export_encryption_key: Ok(value.export_encryption_key),
47219                }
47220            }
47221        }
47222        #[derive(Clone, Debug)]
47223        pub struct ExportSolanaAccountByNameBody {
47224            export_encryption_key:
47225                ::std::result::Result<::std::string::String, ::std::string::String>,
47226        }
47227        impl ::std::default::Default for ExportSolanaAccountByNameBody {
47228            fn default() -> Self {
47229                Self {
47230                    export_encryption_key: Err(
47231                        "no value supplied for export_encryption_key".to_string()
47232                    ),
47233                }
47234            }
47235        }
47236        impl ExportSolanaAccountByNameBody {
47237            pub fn export_encryption_key<T>(mut self, value: T) -> Self
47238            where
47239                T: ::std::convert::TryInto<::std::string::String>,
47240                T::Error: ::std::fmt::Display,
47241            {
47242                self.export_encryption_key = value.try_into().map_err(|e| {
47243                    format!(
47244                        "error converting supplied value for export_encryption_key: {}",
47245                        e
47246                    )
47247                });
47248                self
47249            }
47250        }
47251        impl ::std::convert::TryFrom<ExportSolanaAccountByNameBody>
47252            for super::ExportSolanaAccountByNameBody
47253        {
47254            type Error = super::error::ConversionError;
47255            fn try_from(
47256                value: ExportSolanaAccountByNameBody,
47257            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47258                Ok(Self {
47259                    export_encryption_key: value.export_encryption_key?,
47260                })
47261            }
47262        }
47263        impl ::std::convert::From<super::ExportSolanaAccountByNameBody> for ExportSolanaAccountByNameBody {
47264            fn from(value: super::ExportSolanaAccountByNameBody) -> Self {
47265                Self {
47266                    export_encryption_key: Ok(value.export_encryption_key),
47267                }
47268            }
47269        }
47270        #[derive(Clone, Debug)]
47271        pub struct ExportSolanaAccountByNameResponse {
47272            encrypted_private_key:
47273                ::std::result::Result<::std::string::String, ::std::string::String>,
47274        }
47275        impl ::std::default::Default for ExportSolanaAccountByNameResponse {
47276            fn default() -> Self {
47277                Self {
47278                    encrypted_private_key: Err(
47279                        "no value supplied for encrypted_private_key".to_string()
47280                    ),
47281                }
47282            }
47283        }
47284        impl ExportSolanaAccountByNameResponse {
47285            pub fn encrypted_private_key<T>(mut self, value: T) -> Self
47286            where
47287                T: ::std::convert::TryInto<::std::string::String>,
47288                T::Error: ::std::fmt::Display,
47289            {
47290                self.encrypted_private_key = value.try_into().map_err(|e| {
47291                    format!(
47292                        "error converting supplied value for encrypted_private_key: {}",
47293                        e
47294                    )
47295                });
47296                self
47297            }
47298        }
47299        impl ::std::convert::TryFrom<ExportSolanaAccountByNameResponse>
47300            for super::ExportSolanaAccountByNameResponse
47301        {
47302            type Error = super::error::ConversionError;
47303            fn try_from(
47304                value: ExportSolanaAccountByNameResponse,
47305            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47306                Ok(Self {
47307                    encrypted_private_key: value.encrypted_private_key?,
47308                })
47309            }
47310        }
47311        impl ::std::convert::From<super::ExportSolanaAccountByNameResponse>
47312            for ExportSolanaAccountByNameResponse
47313        {
47314            fn from(value: super::ExportSolanaAccountByNameResponse) -> Self {
47315                Self {
47316                    encrypted_private_key: Ok(value.encrypted_private_key),
47317                }
47318            }
47319        }
47320        #[derive(Clone, Debug)]
47321        pub struct ExportSolanaAccountResponse {
47322            encrypted_private_key:
47323                ::std::result::Result<::std::string::String, ::std::string::String>,
47324        }
47325        impl ::std::default::Default for ExportSolanaAccountResponse {
47326            fn default() -> Self {
47327                Self {
47328                    encrypted_private_key: Err(
47329                        "no value supplied for encrypted_private_key".to_string()
47330                    ),
47331                }
47332            }
47333        }
47334        impl ExportSolanaAccountResponse {
47335            pub fn encrypted_private_key<T>(mut self, value: T) -> Self
47336            where
47337                T: ::std::convert::TryInto<::std::string::String>,
47338                T::Error: ::std::fmt::Display,
47339            {
47340                self.encrypted_private_key = value.try_into().map_err(|e| {
47341                    format!(
47342                        "error converting supplied value for encrypted_private_key: {}",
47343                        e
47344                    )
47345                });
47346                self
47347            }
47348        }
47349        impl ::std::convert::TryFrom<ExportSolanaAccountResponse> for super::ExportSolanaAccountResponse {
47350            type Error = super::error::ConversionError;
47351            fn try_from(
47352                value: ExportSolanaAccountResponse,
47353            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47354                Ok(Self {
47355                    encrypted_private_key: value.encrypted_private_key?,
47356                })
47357            }
47358        }
47359        impl ::std::convert::From<super::ExportSolanaAccountResponse> for ExportSolanaAccountResponse {
47360            fn from(value: super::ExportSolanaAccountResponse) -> Self {
47361                Self {
47362                    encrypted_private_key: Ok(value.encrypted_private_key),
47363                }
47364            }
47365        }
47366        #[derive(Clone, Debug)]
47367        pub struct GetOnrampOrderByIdResponse {
47368            order: ::std::result::Result<super::OnrampOrder, ::std::string::String>,
47369        }
47370        impl ::std::default::Default for GetOnrampOrderByIdResponse {
47371            fn default() -> Self {
47372                Self {
47373                    order: Err("no value supplied for order".to_string()),
47374                }
47375            }
47376        }
47377        impl GetOnrampOrderByIdResponse {
47378            pub fn order<T>(mut self, value: T) -> Self
47379            where
47380                T: ::std::convert::TryInto<super::OnrampOrder>,
47381                T::Error: ::std::fmt::Display,
47382            {
47383                self.order = value
47384                    .try_into()
47385                    .map_err(|e| format!("error converting supplied value for order: {}", e));
47386                self
47387            }
47388        }
47389        impl ::std::convert::TryFrom<GetOnrampOrderByIdResponse> for super::GetOnrampOrderByIdResponse {
47390            type Error = super::error::ConversionError;
47391            fn try_from(
47392                value: GetOnrampOrderByIdResponse,
47393            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47394                Ok(Self {
47395                    order: value.order?,
47396                })
47397            }
47398        }
47399        impl ::std::convert::From<super::GetOnrampOrderByIdResponse> for GetOnrampOrderByIdResponse {
47400            fn from(value: super::GetOnrampOrderByIdResponse) -> Self {
47401                Self {
47402                    order: Ok(value.order),
47403                }
47404            }
47405        }
47406        #[derive(Clone, Debug)]
47407        pub struct GetSwapPriceResponse {
47408            block_number: ::std::result::Result<
47409                super::GetSwapPriceResponseBlockNumber,
47410                ::std::string::String,
47411            >,
47412            fees: ::std::result::Result<super::GetSwapPriceResponseFees, ::std::string::String>,
47413            from_amount:
47414                ::std::result::Result<super::GetSwapPriceResponseFromAmount, ::std::string::String>,
47415            from_token:
47416                ::std::result::Result<super::GetSwapPriceResponseFromToken, ::std::string::String>,
47417            gas: ::std::result::Result<
47418                ::std::option::Option<super::GetSwapPriceResponseGas>,
47419                ::std::string::String,
47420            >,
47421            gas_price:
47422                ::std::result::Result<super::GetSwapPriceResponseGasPrice, ::std::string::String>,
47423            issues: ::std::result::Result<super::GetSwapPriceResponseIssues, ::std::string::String>,
47424            liquidity_available: ::std::result::Result<bool, ::std::string::String>,
47425            min_to_amount: ::std::result::Result<
47426                super::GetSwapPriceResponseMinToAmount,
47427                ::std::string::String,
47428            >,
47429            to_amount:
47430                ::std::result::Result<super::GetSwapPriceResponseToAmount, ::std::string::String>,
47431            to_token:
47432                ::std::result::Result<super::GetSwapPriceResponseToToken, ::std::string::String>,
47433        }
47434        impl ::std::default::Default for GetSwapPriceResponse {
47435            fn default() -> Self {
47436                Self {
47437                    block_number: Err("no value supplied for block_number".to_string()),
47438                    fees: Err("no value supplied for fees".to_string()),
47439                    from_amount: Err("no value supplied for from_amount".to_string()),
47440                    from_token: Err("no value supplied for from_token".to_string()),
47441                    gas: Err("no value supplied for gas".to_string()),
47442                    gas_price: Err("no value supplied for gas_price".to_string()),
47443                    issues: Err("no value supplied for issues".to_string()),
47444                    liquidity_available: Err(
47445                        "no value supplied for liquidity_available".to_string()
47446                    ),
47447                    min_to_amount: Err("no value supplied for min_to_amount".to_string()),
47448                    to_amount: Err("no value supplied for to_amount".to_string()),
47449                    to_token: Err("no value supplied for to_token".to_string()),
47450                }
47451            }
47452        }
47453        impl GetSwapPriceResponse {
47454            pub fn block_number<T>(mut self, value: T) -> Self
47455            where
47456                T: ::std::convert::TryInto<super::GetSwapPriceResponseBlockNumber>,
47457                T::Error: ::std::fmt::Display,
47458            {
47459                self.block_number = value.try_into().map_err(|e| {
47460                    format!("error converting supplied value for block_number: {}", e)
47461                });
47462                self
47463            }
47464            pub fn fees<T>(mut self, value: T) -> Self
47465            where
47466                T: ::std::convert::TryInto<super::GetSwapPriceResponseFees>,
47467                T::Error: ::std::fmt::Display,
47468            {
47469                self.fees = value
47470                    .try_into()
47471                    .map_err(|e| format!("error converting supplied value for fees: {}", e));
47472                self
47473            }
47474            pub fn from_amount<T>(mut self, value: T) -> Self
47475            where
47476                T: ::std::convert::TryInto<super::GetSwapPriceResponseFromAmount>,
47477                T::Error: ::std::fmt::Display,
47478            {
47479                self.from_amount = value
47480                    .try_into()
47481                    .map_err(|e| format!("error converting supplied value for from_amount: {}", e));
47482                self
47483            }
47484            pub fn from_token<T>(mut self, value: T) -> Self
47485            where
47486                T: ::std::convert::TryInto<super::GetSwapPriceResponseFromToken>,
47487                T::Error: ::std::fmt::Display,
47488            {
47489                self.from_token = value
47490                    .try_into()
47491                    .map_err(|e| format!("error converting supplied value for from_token: {}", e));
47492                self
47493            }
47494            pub fn gas<T>(mut self, value: T) -> Self
47495            where
47496                T: ::std::convert::TryInto<::std::option::Option<super::GetSwapPriceResponseGas>>,
47497                T::Error: ::std::fmt::Display,
47498            {
47499                self.gas = value
47500                    .try_into()
47501                    .map_err(|e| format!("error converting supplied value for gas: {}", e));
47502                self
47503            }
47504            pub fn gas_price<T>(mut self, value: T) -> Self
47505            where
47506                T: ::std::convert::TryInto<super::GetSwapPriceResponseGasPrice>,
47507                T::Error: ::std::fmt::Display,
47508            {
47509                self.gas_price = value
47510                    .try_into()
47511                    .map_err(|e| format!("error converting supplied value for gas_price: {}", e));
47512                self
47513            }
47514            pub fn issues<T>(mut self, value: T) -> Self
47515            where
47516                T: ::std::convert::TryInto<super::GetSwapPriceResponseIssues>,
47517                T::Error: ::std::fmt::Display,
47518            {
47519                self.issues = value
47520                    .try_into()
47521                    .map_err(|e| format!("error converting supplied value for issues: {}", e));
47522                self
47523            }
47524            pub fn liquidity_available<T>(mut self, value: T) -> Self
47525            where
47526                T: ::std::convert::TryInto<bool>,
47527                T::Error: ::std::fmt::Display,
47528            {
47529                self.liquidity_available = value.try_into().map_err(|e| {
47530                    format!(
47531                        "error converting supplied value for liquidity_available: {}",
47532                        e
47533                    )
47534                });
47535                self
47536            }
47537            pub fn min_to_amount<T>(mut self, value: T) -> Self
47538            where
47539                T: ::std::convert::TryInto<super::GetSwapPriceResponseMinToAmount>,
47540                T::Error: ::std::fmt::Display,
47541            {
47542                self.min_to_amount = value.try_into().map_err(|e| {
47543                    format!("error converting supplied value for min_to_amount: {}", e)
47544                });
47545                self
47546            }
47547            pub fn to_amount<T>(mut self, value: T) -> Self
47548            where
47549                T: ::std::convert::TryInto<super::GetSwapPriceResponseToAmount>,
47550                T::Error: ::std::fmt::Display,
47551            {
47552                self.to_amount = value
47553                    .try_into()
47554                    .map_err(|e| format!("error converting supplied value for to_amount: {}", e));
47555                self
47556            }
47557            pub fn to_token<T>(mut self, value: T) -> Self
47558            where
47559                T: ::std::convert::TryInto<super::GetSwapPriceResponseToToken>,
47560                T::Error: ::std::fmt::Display,
47561            {
47562                self.to_token = value
47563                    .try_into()
47564                    .map_err(|e| format!("error converting supplied value for to_token: {}", e));
47565                self
47566            }
47567        }
47568        impl ::std::convert::TryFrom<GetSwapPriceResponse> for super::GetSwapPriceResponse {
47569            type Error = super::error::ConversionError;
47570            fn try_from(
47571                value: GetSwapPriceResponse,
47572            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47573                Ok(Self {
47574                    block_number: value.block_number?,
47575                    fees: value.fees?,
47576                    from_amount: value.from_amount?,
47577                    from_token: value.from_token?,
47578                    gas: value.gas?,
47579                    gas_price: value.gas_price?,
47580                    issues: value.issues?,
47581                    liquidity_available: value.liquidity_available?,
47582                    min_to_amount: value.min_to_amount?,
47583                    to_amount: value.to_amount?,
47584                    to_token: value.to_token?,
47585                })
47586            }
47587        }
47588        impl ::std::convert::From<super::GetSwapPriceResponse> for GetSwapPriceResponse {
47589            fn from(value: super::GetSwapPriceResponse) -> Self {
47590                Self {
47591                    block_number: Ok(value.block_number),
47592                    fees: Ok(value.fees),
47593                    from_amount: Ok(value.from_amount),
47594                    from_token: Ok(value.from_token),
47595                    gas: Ok(value.gas),
47596                    gas_price: Ok(value.gas_price),
47597                    issues: Ok(value.issues),
47598                    liquidity_available: Ok(value.liquidity_available),
47599                    min_to_amount: Ok(value.min_to_amount),
47600                    to_amount: Ok(value.to_amount),
47601                    to_token: Ok(value.to_token),
47602                }
47603            }
47604        }
47605        #[derive(Clone, Debug)]
47606        pub struct GetSwapPriceResponseFees {
47607            gas_fee: ::std::result::Result<
47608                ::std::option::Option<super::TokenFee>,
47609                ::std::string::String,
47610            >,
47611            protocol_fee: ::std::result::Result<
47612                ::std::option::Option<super::TokenFee>,
47613                ::std::string::String,
47614            >,
47615        }
47616        impl ::std::default::Default for GetSwapPriceResponseFees {
47617            fn default() -> Self {
47618                Self {
47619                    gas_fee: Err("no value supplied for gas_fee".to_string()),
47620                    protocol_fee: Err("no value supplied for protocol_fee".to_string()),
47621                }
47622            }
47623        }
47624        impl GetSwapPriceResponseFees {
47625            pub fn gas_fee<T>(mut self, value: T) -> Self
47626            where
47627                T: ::std::convert::TryInto<::std::option::Option<super::TokenFee>>,
47628                T::Error: ::std::fmt::Display,
47629            {
47630                self.gas_fee = value
47631                    .try_into()
47632                    .map_err(|e| format!("error converting supplied value for gas_fee: {}", e));
47633                self
47634            }
47635            pub fn protocol_fee<T>(mut self, value: T) -> Self
47636            where
47637                T: ::std::convert::TryInto<::std::option::Option<super::TokenFee>>,
47638                T::Error: ::std::fmt::Display,
47639            {
47640                self.protocol_fee = value.try_into().map_err(|e| {
47641                    format!("error converting supplied value for protocol_fee: {}", e)
47642                });
47643                self
47644            }
47645        }
47646        impl ::std::convert::TryFrom<GetSwapPriceResponseFees> for super::GetSwapPriceResponseFees {
47647            type Error = super::error::ConversionError;
47648            fn try_from(
47649                value: GetSwapPriceResponseFees,
47650            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47651                Ok(Self {
47652                    gas_fee: value.gas_fee?,
47653                    protocol_fee: value.protocol_fee?,
47654                })
47655            }
47656        }
47657        impl ::std::convert::From<super::GetSwapPriceResponseFees> for GetSwapPriceResponseFees {
47658            fn from(value: super::GetSwapPriceResponseFees) -> Self {
47659                Self {
47660                    gas_fee: Ok(value.gas_fee),
47661                    protocol_fee: Ok(value.protocol_fee),
47662                }
47663            }
47664        }
47665        #[derive(Clone, Debug)]
47666        pub struct GetSwapPriceResponseIssues {
47667            allowance: ::std::result::Result<
47668                ::std::option::Option<super::GetSwapPriceResponseIssuesAllowance>,
47669                ::std::string::String,
47670            >,
47671            balance: ::std::result::Result<
47672                ::std::option::Option<super::GetSwapPriceResponseIssuesBalance>,
47673                ::std::string::String,
47674            >,
47675            simulation_incomplete: ::std::result::Result<bool, ::std::string::String>,
47676        }
47677        impl ::std::default::Default for GetSwapPriceResponseIssues {
47678            fn default() -> Self {
47679                Self {
47680                    allowance: Err("no value supplied for allowance".to_string()),
47681                    balance: Err("no value supplied for balance".to_string()),
47682                    simulation_incomplete: Err(
47683                        "no value supplied for simulation_incomplete".to_string()
47684                    ),
47685                }
47686            }
47687        }
47688        impl GetSwapPriceResponseIssues {
47689            pub fn allowance<T>(mut self, value: T) -> Self
47690            where
47691                T: ::std::convert::TryInto<
47692                    ::std::option::Option<super::GetSwapPriceResponseIssuesAllowance>,
47693                >,
47694                T::Error: ::std::fmt::Display,
47695            {
47696                self.allowance = value
47697                    .try_into()
47698                    .map_err(|e| format!("error converting supplied value for allowance: {}", e));
47699                self
47700            }
47701            pub fn balance<T>(mut self, value: T) -> Self
47702            where
47703                T: ::std::convert::TryInto<
47704                    ::std::option::Option<super::GetSwapPriceResponseIssuesBalance>,
47705                >,
47706                T::Error: ::std::fmt::Display,
47707            {
47708                self.balance = value
47709                    .try_into()
47710                    .map_err(|e| format!("error converting supplied value for balance: {}", e));
47711                self
47712            }
47713            pub fn simulation_incomplete<T>(mut self, value: T) -> Self
47714            where
47715                T: ::std::convert::TryInto<bool>,
47716                T::Error: ::std::fmt::Display,
47717            {
47718                self.simulation_incomplete = value.try_into().map_err(|e| {
47719                    format!(
47720                        "error converting supplied value for simulation_incomplete: {}",
47721                        e
47722                    )
47723                });
47724                self
47725            }
47726        }
47727        impl ::std::convert::TryFrom<GetSwapPriceResponseIssues> for super::GetSwapPriceResponseIssues {
47728            type Error = super::error::ConversionError;
47729            fn try_from(
47730                value: GetSwapPriceResponseIssues,
47731            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47732                Ok(Self {
47733                    allowance: value.allowance?,
47734                    balance: value.balance?,
47735                    simulation_incomplete: value.simulation_incomplete?,
47736                })
47737            }
47738        }
47739        impl ::std::convert::From<super::GetSwapPriceResponseIssues> for GetSwapPriceResponseIssues {
47740            fn from(value: super::GetSwapPriceResponseIssues) -> Self {
47741                Self {
47742                    allowance: Ok(value.allowance),
47743                    balance: Ok(value.balance),
47744                    simulation_incomplete: Ok(value.simulation_incomplete),
47745                }
47746            }
47747        }
47748        #[derive(Clone, Debug)]
47749        pub struct GetSwapPriceResponseIssuesAllowance {
47750            current_allowance: ::std::result::Result<
47751                super::GetSwapPriceResponseIssuesAllowanceCurrentAllowance,
47752                ::std::string::String,
47753            >,
47754            spender: ::std::result::Result<
47755                super::GetSwapPriceResponseIssuesAllowanceSpender,
47756                ::std::string::String,
47757            >,
47758        }
47759        impl ::std::default::Default for GetSwapPriceResponseIssuesAllowance {
47760            fn default() -> Self {
47761                Self {
47762                    current_allowance: Err("no value supplied for current_allowance".to_string()),
47763                    spender: Err("no value supplied for spender".to_string()),
47764                }
47765            }
47766        }
47767        impl GetSwapPriceResponseIssuesAllowance {
47768            pub fn current_allowance<T>(mut self, value: T) -> Self
47769            where
47770                T: ::std::convert::TryInto<
47771                    super::GetSwapPriceResponseIssuesAllowanceCurrentAllowance,
47772                >,
47773                T::Error: ::std::fmt::Display,
47774            {
47775                self.current_allowance = value.try_into().map_err(|e| {
47776                    format!(
47777                        "error converting supplied value for current_allowance: {}",
47778                        e
47779                    )
47780                });
47781                self
47782            }
47783            pub fn spender<T>(mut self, value: T) -> Self
47784            where
47785                T: ::std::convert::TryInto<super::GetSwapPriceResponseIssuesAllowanceSpender>,
47786                T::Error: ::std::fmt::Display,
47787            {
47788                self.spender = value
47789                    .try_into()
47790                    .map_err(|e| format!("error converting supplied value for spender: {}", e));
47791                self
47792            }
47793        }
47794        impl ::std::convert::TryFrom<GetSwapPriceResponseIssuesAllowance>
47795            for super::GetSwapPriceResponseIssuesAllowance
47796        {
47797            type Error = super::error::ConversionError;
47798            fn try_from(
47799                value: GetSwapPriceResponseIssuesAllowance,
47800            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47801                Ok(Self {
47802                    current_allowance: value.current_allowance?,
47803                    spender: value.spender?,
47804                })
47805            }
47806        }
47807        impl ::std::convert::From<super::GetSwapPriceResponseIssuesAllowance>
47808            for GetSwapPriceResponseIssuesAllowance
47809        {
47810            fn from(value: super::GetSwapPriceResponseIssuesAllowance) -> Self {
47811                Self {
47812                    current_allowance: Ok(value.current_allowance),
47813                    spender: Ok(value.spender),
47814                }
47815            }
47816        }
47817        #[derive(Clone, Debug)]
47818        pub struct GetSwapPriceResponseIssuesBalance {
47819            current_balance: ::std::result::Result<
47820                super::GetSwapPriceResponseIssuesBalanceCurrentBalance,
47821                ::std::string::String,
47822            >,
47823            required_balance: ::std::result::Result<
47824                super::GetSwapPriceResponseIssuesBalanceRequiredBalance,
47825                ::std::string::String,
47826            >,
47827            token: ::std::result::Result<
47828                super::GetSwapPriceResponseIssuesBalanceToken,
47829                ::std::string::String,
47830            >,
47831        }
47832        impl ::std::default::Default for GetSwapPriceResponseIssuesBalance {
47833            fn default() -> Self {
47834                Self {
47835                    current_balance: Err("no value supplied for current_balance".to_string()),
47836                    required_balance: Err("no value supplied for required_balance".to_string()),
47837                    token: Err("no value supplied for token".to_string()),
47838                }
47839            }
47840        }
47841        impl GetSwapPriceResponseIssuesBalance {
47842            pub fn current_balance<T>(mut self, value: T) -> Self
47843            where
47844                T: ::std::convert::TryInto<super::GetSwapPriceResponseIssuesBalanceCurrentBalance>,
47845                T::Error: ::std::fmt::Display,
47846            {
47847                self.current_balance = value.try_into().map_err(|e| {
47848                    format!("error converting supplied value for current_balance: {}", e)
47849                });
47850                self
47851            }
47852            pub fn required_balance<T>(mut self, value: T) -> Self
47853            where
47854                T: ::std::convert::TryInto<super::GetSwapPriceResponseIssuesBalanceRequiredBalance>,
47855                T::Error: ::std::fmt::Display,
47856            {
47857                self.required_balance = value.try_into().map_err(|e| {
47858                    format!(
47859                        "error converting supplied value for required_balance: {}",
47860                        e
47861                    )
47862                });
47863                self
47864            }
47865            pub fn token<T>(mut self, value: T) -> Self
47866            where
47867                T: ::std::convert::TryInto<super::GetSwapPriceResponseIssuesBalanceToken>,
47868                T::Error: ::std::fmt::Display,
47869            {
47870                self.token = value
47871                    .try_into()
47872                    .map_err(|e| format!("error converting supplied value for token: {}", e));
47873                self
47874            }
47875        }
47876        impl ::std::convert::TryFrom<GetSwapPriceResponseIssuesBalance>
47877            for super::GetSwapPriceResponseIssuesBalance
47878        {
47879            type Error = super::error::ConversionError;
47880            fn try_from(
47881                value: GetSwapPriceResponseIssuesBalance,
47882            ) -> ::std::result::Result<Self, super::error::ConversionError> {
47883                Ok(Self {
47884                    current_balance: value.current_balance?,
47885                    required_balance: value.required_balance?,
47886                    token: value.token?,
47887                })
47888            }
47889        }
47890        impl ::std::convert::From<super::GetSwapPriceResponseIssuesBalance>
47891            for GetSwapPriceResponseIssuesBalance
47892        {
47893            fn from(value: super::GetSwapPriceResponseIssuesBalance) -> Self {
47894                Self {
47895                    current_balance: Ok(value.current_balance),
47896                    required_balance: Ok(value.required_balance),
47897                    token: Ok(value.token),
47898                }
47899            }
47900        }
47901        #[derive(Clone, Debug)]
47902        pub struct Idl {
47903            address: ::std::result::Result<::std::string::String, ::std::string::String>,
47904            instructions: ::std::result::Result<
47905                ::std::vec::Vec<super::IdlInstructionsItem>,
47906                ::std::string::String,
47907            >,
47908            metadata: ::std::result::Result<
47909                ::std::option::Option<super::IdlMetadata>,
47910                ::std::string::String,
47911            >,
47912            types: ::std::result::Result<
47913                ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
47914                ::std::string::String,
47915            >,
47916        }
47917        impl ::std::default::Default for Idl {
47918            fn default() -> Self {
47919                Self {
47920                    address: Err("no value supplied for address".to_string()),
47921                    instructions: Err("no value supplied for instructions".to_string()),
47922                    metadata: Ok(Default::default()),
47923                    types: Ok(Default::default()),
47924                }
47925            }
47926        }
47927        impl Idl {
47928            pub fn address<T>(mut self, value: T) -> Self
47929            where
47930                T: ::std::convert::TryInto<::std::string::String>,
47931                T::Error: ::std::fmt::Display,
47932            {
47933                self.address = value
47934                    .try_into()
47935                    .map_err(|e| format!("error converting supplied value for address: {}", e));
47936                self
47937            }
47938            pub fn instructions<T>(mut self, value: T) -> Self
47939            where
47940                T: ::std::convert::TryInto<::std::vec::Vec<super::IdlInstructionsItem>>,
47941                T::Error: ::std::fmt::Display,
47942            {
47943                self.instructions = value.try_into().map_err(|e| {
47944                    format!("error converting supplied value for instructions: {}", e)
47945                });
47946                self
47947            }
47948            pub fn metadata<T>(mut self, value: T) -> Self
47949            where
47950                T: ::std::convert::TryInto<::std::option::Option<super::IdlMetadata>>,
47951                T::Error: ::std::fmt::Display,
47952            {
47953                self.metadata = value
47954                    .try_into()
47955                    .map_err(|e| format!("error converting supplied value for metadata: {}", e));
47956                self
47957            }
47958            pub fn types<T>(mut self, value: T) -> Self
47959            where
47960                T: ::std::convert::TryInto<
47961                    ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
47962                >,
47963                T::Error: ::std::fmt::Display,
47964            {
47965                self.types = value
47966                    .try_into()
47967                    .map_err(|e| format!("error converting supplied value for types: {}", e));
47968                self
47969            }
47970        }
47971        impl ::std::convert::TryFrom<Idl> for super::Idl {
47972            type Error = super::error::ConversionError;
47973            fn try_from(value: Idl) -> ::std::result::Result<Self, super::error::ConversionError> {
47974                Ok(Self {
47975                    address: value.address?,
47976                    instructions: value.instructions?,
47977                    metadata: value.metadata?,
47978                    types: value.types?,
47979                })
47980            }
47981        }
47982        impl ::std::convert::From<super::Idl> for Idl {
47983            fn from(value: super::Idl) -> Self {
47984                Self {
47985                    address: Ok(value.address),
47986                    instructions: Ok(value.instructions),
47987                    metadata: Ok(value.metadata),
47988                    types: Ok(value.types),
47989                }
47990            }
47991        }
47992        #[derive(Clone, Debug)]
47993        pub struct IdlInstructionsItem {
47994            accounts: ::std::result::Result<
47995                ::std::vec::Vec<super::IdlInstructionsItemAccountsItem>,
47996                ::std::string::String,
47997            >,
47998            args: ::std::result::Result<
47999                ::std::vec::Vec<super::IdlInstructionsItemArgsItem>,
48000                ::std::string::String,
48001            >,
48002            discriminator: ::std::result::Result<[u8; 8usize], ::std::string::String>,
48003            name: ::std::result::Result<::std::string::String, ::std::string::String>,
48004        }
48005        impl ::std::default::Default for IdlInstructionsItem {
48006            fn default() -> Self {
48007                Self {
48008                    accounts: Ok(Default::default()),
48009                    args: Err("no value supplied for args".to_string()),
48010                    discriminator: Err("no value supplied for discriminator".to_string()),
48011                    name: Err("no value supplied for name".to_string()),
48012                }
48013            }
48014        }
48015        impl IdlInstructionsItem {
48016            pub fn accounts<T>(mut self, value: T) -> Self
48017            where
48018                T: ::std::convert::TryInto<::std::vec::Vec<super::IdlInstructionsItemAccountsItem>>,
48019                T::Error: ::std::fmt::Display,
48020            {
48021                self.accounts = value
48022                    .try_into()
48023                    .map_err(|e| format!("error converting supplied value for accounts: {}", e));
48024                self
48025            }
48026            pub fn args<T>(mut self, value: T) -> Self
48027            where
48028                T: ::std::convert::TryInto<::std::vec::Vec<super::IdlInstructionsItemArgsItem>>,
48029                T::Error: ::std::fmt::Display,
48030            {
48031                self.args = value
48032                    .try_into()
48033                    .map_err(|e| format!("error converting supplied value for args: {}", e));
48034                self
48035            }
48036            pub fn discriminator<T>(mut self, value: T) -> Self
48037            where
48038                T: ::std::convert::TryInto<[u8; 8usize]>,
48039                T::Error: ::std::fmt::Display,
48040            {
48041                self.discriminator = value.try_into().map_err(|e| {
48042                    format!("error converting supplied value for discriminator: {}", e)
48043                });
48044                self
48045            }
48046            pub fn name<T>(mut self, value: T) -> Self
48047            where
48048                T: ::std::convert::TryInto<::std::string::String>,
48049                T::Error: ::std::fmt::Display,
48050            {
48051                self.name = value
48052                    .try_into()
48053                    .map_err(|e| format!("error converting supplied value for name: {}", e));
48054                self
48055            }
48056        }
48057        impl ::std::convert::TryFrom<IdlInstructionsItem> for super::IdlInstructionsItem {
48058            type Error = super::error::ConversionError;
48059            fn try_from(
48060                value: IdlInstructionsItem,
48061            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48062                Ok(Self {
48063                    accounts: value.accounts?,
48064                    args: value.args?,
48065                    discriminator: value.discriminator?,
48066                    name: value.name?,
48067                })
48068            }
48069        }
48070        impl ::std::convert::From<super::IdlInstructionsItem> for IdlInstructionsItem {
48071            fn from(value: super::IdlInstructionsItem) -> Self {
48072                Self {
48073                    accounts: Ok(value.accounts),
48074                    args: Ok(value.args),
48075                    discriminator: Ok(value.discriminator),
48076                    name: Ok(value.name),
48077                }
48078            }
48079        }
48080        #[derive(Clone, Debug)]
48081        pub struct IdlInstructionsItemAccountsItem {
48082            name: ::std::result::Result<::std::string::String, ::std::string::String>,
48083            signer: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
48084            writable: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
48085        }
48086        impl ::std::default::Default for IdlInstructionsItemAccountsItem {
48087            fn default() -> Self {
48088                Self {
48089                    name: Err("no value supplied for name".to_string()),
48090                    signer: Ok(Default::default()),
48091                    writable: Ok(Default::default()),
48092                }
48093            }
48094        }
48095        impl IdlInstructionsItemAccountsItem {
48096            pub fn name<T>(mut self, value: T) -> Self
48097            where
48098                T: ::std::convert::TryInto<::std::string::String>,
48099                T::Error: ::std::fmt::Display,
48100            {
48101                self.name = value
48102                    .try_into()
48103                    .map_err(|e| format!("error converting supplied value for name: {}", e));
48104                self
48105            }
48106            pub fn signer<T>(mut self, value: T) -> Self
48107            where
48108                T: ::std::convert::TryInto<::std::option::Option<bool>>,
48109                T::Error: ::std::fmt::Display,
48110            {
48111                self.signer = value
48112                    .try_into()
48113                    .map_err(|e| format!("error converting supplied value for signer: {}", e));
48114                self
48115            }
48116            pub fn writable<T>(mut self, value: T) -> Self
48117            where
48118                T: ::std::convert::TryInto<::std::option::Option<bool>>,
48119                T::Error: ::std::fmt::Display,
48120            {
48121                self.writable = value
48122                    .try_into()
48123                    .map_err(|e| format!("error converting supplied value for writable: {}", e));
48124                self
48125            }
48126        }
48127        impl ::std::convert::TryFrom<IdlInstructionsItemAccountsItem>
48128            for super::IdlInstructionsItemAccountsItem
48129        {
48130            type Error = super::error::ConversionError;
48131            fn try_from(
48132                value: IdlInstructionsItemAccountsItem,
48133            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48134                Ok(Self {
48135                    name: value.name?,
48136                    signer: value.signer?,
48137                    writable: value.writable?,
48138                })
48139            }
48140        }
48141        impl ::std::convert::From<super::IdlInstructionsItemAccountsItem>
48142            for IdlInstructionsItemAccountsItem
48143        {
48144            fn from(value: super::IdlInstructionsItemAccountsItem) -> Self {
48145                Self {
48146                    name: Ok(value.name),
48147                    signer: Ok(value.signer),
48148                    writable: Ok(value.writable),
48149                }
48150            }
48151        }
48152        #[derive(Clone, Debug)]
48153        pub struct IdlInstructionsItemArgsItem {
48154            name: ::std::result::Result<::std::string::String, ::std::string::String>,
48155            type_: ::std::result::Result<::std::string::String, ::std::string::String>,
48156        }
48157        impl ::std::default::Default for IdlInstructionsItemArgsItem {
48158            fn default() -> Self {
48159                Self {
48160                    name: Err("no value supplied for name".to_string()),
48161                    type_: Err("no value supplied for type_".to_string()),
48162                }
48163            }
48164        }
48165        impl IdlInstructionsItemArgsItem {
48166            pub fn name<T>(mut self, value: T) -> Self
48167            where
48168                T: ::std::convert::TryInto<::std::string::String>,
48169                T::Error: ::std::fmt::Display,
48170            {
48171                self.name = value
48172                    .try_into()
48173                    .map_err(|e| format!("error converting supplied value for name: {}", e));
48174                self
48175            }
48176            pub fn type_<T>(mut self, value: T) -> Self
48177            where
48178                T: ::std::convert::TryInto<::std::string::String>,
48179                T::Error: ::std::fmt::Display,
48180            {
48181                self.type_ = value
48182                    .try_into()
48183                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
48184                self
48185            }
48186        }
48187        impl ::std::convert::TryFrom<IdlInstructionsItemArgsItem> for super::IdlInstructionsItemArgsItem {
48188            type Error = super::error::ConversionError;
48189            fn try_from(
48190                value: IdlInstructionsItemArgsItem,
48191            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48192                Ok(Self {
48193                    name: value.name?,
48194                    type_: value.type_?,
48195                })
48196            }
48197        }
48198        impl ::std::convert::From<super::IdlInstructionsItemArgsItem> for IdlInstructionsItemArgsItem {
48199            fn from(value: super::IdlInstructionsItemArgsItem) -> Self {
48200                Self {
48201                    name: Ok(value.name),
48202                    type_: Ok(value.type_),
48203                }
48204            }
48205        }
48206        #[derive(Clone, Debug)]
48207        pub struct IdlMetadata {
48208            name: ::std::result::Result<
48209                ::std::option::Option<::std::string::String>,
48210                ::std::string::String,
48211            >,
48212            spec: ::std::result::Result<
48213                ::std::option::Option<::std::string::String>,
48214                ::std::string::String,
48215            >,
48216            version: ::std::result::Result<
48217                ::std::option::Option<::std::string::String>,
48218                ::std::string::String,
48219            >,
48220        }
48221        impl ::std::default::Default for IdlMetadata {
48222            fn default() -> Self {
48223                Self {
48224                    name: Ok(Default::default()),
48225                    spec: Ok(Default::default()),
48226                    version: Ok(Default::default()),
48227                }
48228            }
48229        }
48230        impl IdlMetadata {
48231            pub fn name<T>(mut self, value: T) -> Self
48232            where
48233                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48234                T::Error: ::std::fmt::Display,
48235            {
48236                self.name = value
48237                    .try_into()
48238                    .map_err(|e| format!("error converting supplied value for name: {}", e));
48239                self
48240            }
48241            pub fn spec<T>(mut self, value: T) -> Self
48242            where
48243                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48244                T::Error: ::std::fmt::Display,
48245            {
48246                self.spec = value
48247                    .try_into()
48248                    .map_err(|e| format!("error converting supplied value for spec: {}", e));
48249                self
48250            }
48251            pub fn version<T>(mut self, value: T) -> Self
48252            where
48253                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48254                T::Error: ::std::fmt::Display,
48255            {
48256                self.version = value
48257                    .try_into()
48258                    .map_err(|e| format!("error converting supplied value for version: {}", e));
48259                self
48260            }
48261        }
48262        impl ::std::convert::TryFrom<IdlMetadata> for super::IdlMetadata {
48263            type Error = super::error::ConversionError;
48264            fn try_from(
48265                value: IdlMetadata,
48266            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48267                Ok(Self {
48268                    name: value.name?,
48269                    spec: value.spec?,
48270                    version: value.version?,
48271                })
48272            }
48273        }
48274        impl ::std::convert::From<super::IdlMetadata> for IdlMetadata {
48275            fn from(value: super::IdlMetadata) -> Self {
48276                Self {
48277                    name: Ok(value.name),
48278                    spec: Ok(value.spec),
48279                    version: Ok(value.version),
48280                }
48281            }
48282        }
48283        #[derive(Clone, Debug)]
48284        pub struct ImportEvmAccountBody {
48285            account_policy: ::std::result::Result<
48286                ::std::option::Option<super::ImportEvmAccountBodyAccountPolicy>,
48287                ::std::string::String,
48288            >,
48289            encrypted_private_key:
48290                ::std::result::Result<::std::string::String, ::std::string::String>,
48291            name: ::std::result::Result<
48292                ::std::option::Option<super::ImportEvmAccountBodyName>,
48293                ::std::string::String,
48294            >,
48295        }
48296        impl ::std::default::Default for ImportEvmAccountBody {
48297            fn default() -> Self {
48298                Self {
48299                    account_policy: Ok(Default::default()),
48300                    encrypted_private_key: Err(
48301                        "no value supplied for encrypted_private_key".to_string()
48302                    ),
48303                    name: Ok(Default::default()),
48304                }
48305            }
48306        }
48307        impl ImportEvmAccountBody {
48308            pub fn account_policy<T>(mut self, value: T) -> Self
48309            where
48310                T: ::std::convert::TryInto<
48311                    ::std::option::Option<super::ImportEvmAccountBodyAccountPolicy>,
48312                >,
48313                T::Error: ::std::fmt::Display,
48314            {
48315                self.account_policy = value.try_into().map_err(|e| {
48316                    format!("error converting supplied value for account_policy: {}", e)
48317                });
48318                self
48319            }
48320            pub fn encrypted_private_key<T>(mut self, value: T) -> Self
48321            where
48322                T: ::std::convert::TryInto<::std::string::String>,
48323                T::Error: ::std::fmt::Display,
48324            {
48325                self.encrypted_private_key = value.try_into().map_err(|e| {
48326                    format!(
48327                        "error converting supplied value for encrypted_private_key: {}",
48328                        e
48329                    )
48330                });
48331                self
48332            }
48333            pub fn name<T>(mut self, value: T) -> Self
48334            where
48335                T: ::std::convert::TryInto<::std::option::Option<super::ImportEvmAccountBodyName>>,
48336                T::Error: ::std::fmt::Display,
48337            {
48338                self.name = value
48339                    .try_into()
48340                    .map_err(|e| format!("error converting supplied value for name: {}", e));
48341                self
48342            }
48343        }
48344        impl ::std::convert::TryFrom<ImportEvmAccountBody> for super::ImportEvmAccountBody {
48345            type Error = super::error::ConversionError;
48346            fn try_from(
48347                value: ImportEvmAccountBody,
48348            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48349                Ok(Self {
48350                    account_policy: value.account_policy?,
48351                    encrypted_private_key: value.encrypted_private_key?,
48352                    name: value.name?,
48353                })
48354            }
48355        }
48356        impl ::std::convert::From<super::ImportEvmAccountBody> for ImportEvmAccountBody {
48357            fn from(value: super::ImportEvmAccountBody) -> Self {
48358                Self {
48359                    account_policy: Ok(value.account_policy),
48360                    encrypted_private_key: Ok(value.encrypted_private_key),
48361                    name: Ok(value.name),
48362                }
48363            }
48364        }
48365        #[derive(Clone, Debug)]
48366        pub struct ImportSolanaAccountBody {
48367            encrypted_private_key:
48368                ::std::result::Result<::std::string::String, ::std::string::String>,
48369            name: ::std::result::Result<
48370                ::std::option::Option<super::ImportSolanaAccountBodyName>,
48371                ::std::string::String,
48372            >,
48373        }
48374        impl ::std::default::Default for ImportSolanaAccountBody {
48375            fn default() -> Self {
48376                Self {
48377                    encrypted_private_key: Err(
48378                        "no value supplied for encrypted_private_key".to_string()
48379                    ),
48380                    name: Ok(Default::default()),
48381                }
48382            }
48383        }
48384        impl ImportSolanaAccountBody {
48385            pub fn encrypted_private_key<T>(mut self, value: T) -> Self
48386            where
48387                T: ::std::convert::TryInto<::std::string::String>,
48388                T::Error: ::std::fmt::Display,
48389            {
48390                self.encrypted_private_key = value.try_into().map_err(|e| {
48391                    format!(
48392                        "error converting supplied value for encrypted_private_key: {}",
48393                        e
48394                    )
48395                });
48396                self
48397            }
48398            pub fn name<T>(mut self, value: T) -> Self
48399            where
48400                T: ::std::convert::TryInto<
48401                    ::std::option::Option<super::ImportSolanaAccountBodyName>,
48402                >,
48403                T::Error: ::std::fmt::Display,
48404            {
48405                self.name = value
48406                    .try_into()
48407                    .map_err(|e| format!("error converting supplied value for name: {}", e));
48408                self
48409            }
48410        }
48411        impl ::std::convert::TryFrom<ImportSolanaAccountBody> for super::ImportSolanaAccountBody {
48412            type Error = super::error::ConversionError;
48413            fn try_from(
48414                value: ImportSolanaAccountBody,
48415            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48416                Ok(Self {
48417                    encrypted_private_key: value.encrypted_private_key?,
48418                    name: value.name?,
48419                })
48420            }
48421        }
48422        impl ::std::convert::From<super::ImportSolanaAccountBody> for ImportSolanaAccountBody {
48423            fn from(value: super::ImportSolanaAccountBody) -> Self {
48424                Self {
48425                    encrypted_private_key: Ok(value.encrypted_private_key),
48426                    name: Ok(value.name),
48427                }
48428            }
48429        }
48430        #[derive(Clone, Debug)]
48431        pub struct ListDataTokenBalancesResponse {
48432            balances:
48433                ::std::result::Result<::std::vec::Vec<super::TokenBalance>, ::std::string::String>,
48434            next_page_token: ::std::result::Result<
48435                ::std::option::Option<::std::string::String>,
48436                ::std::string::String,
48437            >,
48438        }
48439        impl ::std::default::Default for ListDataTokenBalancesResponse {
48440            fn default() -> Self {
48441                Self {
48442                    balances: Err("no value supplied for balances".to_string()),
48443                    next_page_token: Ok(Default::default()),
48444                }
48445            }
48446        }
48447        impl ListDataTokenBalancesResponse {
48448            pub fn balances<T>(mut self, value: T) -> Self
48449            where
48450                T: ::std::convert::TryInto<::std::vec::Vec<super::TokenBalance>>,
48451                T::Error: ::std::fmt::Display,
48452            {
48453                self.balances = value
48454                    .try_into()
48455                    .map_err(|e| format!("error converting supplied value for balances: {}", e));
48456                self
48457            }
48458            pub fn next_page_token<T>(mut self, value: T) -> Self
48459            where
48460                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48461                T::Error: ::std::fmt::Display,
48462            {
48463                self.next_page_token = value.try_into().map_err(|e| {
48464                    format!("error converting supplied value for next_page_token: {}", e)
48465                });
48466                self
48467            }
48468        }
48469        impl ::std::convert::TryFrom<ListDataTokenBalancesResponse>
48470            for super::ListDataTokenBalancesResponse
48471        {
48472            type Error = super::error::ConversionError;
48473            fn try_from(
48474                value: ListDataTokenBalancesResponse,
48475            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48476                Ok(Self {
48477                    balances: value.balances?,
48478                    next_page_token: value.next_page_token?,
48479                })
48480            }
48481        }
48482        impl ::std::convert::From<super::ListDataTokenBalancesResponse> for ListDataTokenBalancesResponse {
48483            fn from(value: super::ListDataTokenBalancesResponse) -> Self {
48484                Self {
48485                    balances: Ok(value.balances),
48486                    next_page_token: Ok(value.next_page_token),
48487                }
48488            }
48489        }
48490        #[derive(Clone, Debug)]
48491        pub struct ListEndUsersResponse {
48492            end_users:
48493                ::std::result::Result<::std::vec::Vec<super::EndUser>, ::std::string::String>,
48494            next_page_token: ::std::result::Result<
48495                ::std::option::Option<::std::string::String>,
48496                ::std::string::String,
48497            >,
48498        }
48499        impl ::std::default::Default for ListEndUsersResponse {
48500            fn default() -> Self {
48501                Self {
48502                    end_users: Err("no value supplied for end_users".to_string()),
48503                    next_page_token: Ok(Default::default()),
48504                }
48505            }
48506        }
48507        impl ListEndUsersResponse {
48508            pub fn end_users<T>(mut self, value: T) -> Self
48509            where
48510                T: ::std::convert::TryInto<::std::vec::Vec<super::EndUser>>,
48511                T::Error: ::std::fmt::Display,
48512            {
48513                self.end_users = value
48514                    .try_into()
48515                    .map_err(|e| format!("error converting supplied value for end_users: {}", e));
48516                self
48517            }
48518            pub fn next_page_token<T>(mut self, value: T) -> Self
48519            where
48520                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48521                T::Error: ::std::fmt::Display,
48522            {
48523                self.next_page_token = value.try_into().map_err(|e| {
48524                    format!("error converting supplied value for next_page_token: {}", e)
48525                });
48526                self
48527            }
48528        }
48529        impl ::std::convert::TryFrom<ListEndUsersResponse> for super::ListEndUsersResponse {
48530            type Error = super::error::ConversionError;
48531            fn try_from(
48532                value: ListEndUsersResponse,
48533            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48534                Ok(Self {
48535                    end_users: value.end_users?,
48536                    next_page_token: value.next_page_token?,
48537                })
48538            }
48539        }
48540        impl ::std::convert::From<super::ListEndUsersResponse> for ListEndUsersResponse {
48541            fn from(value: super::ListEndUsersResponse) -> Self {
48542                Self {
48543                    end_users: Ok(value.end_users),
48544                    next_page_token: Ok(value.next_page_token),
48545                }
48546            }
48547        }
48548        #[derive(Clone, Debug)]
48549        pub struct ListEvmAccountsResponse {
48550            accounts:
48551                ::std::result::Result<::std::vec::Vec<super::EvmAccount>, ::std::string::String>,
48552            next_page_token: ::std::result::Result<
48553                ::std::option::Option<::std::string::String>,
48554                ::std::string::String,
48555            >,
48556        }
48557        impl ::std::default::Default for ListEvmAccountsResponse {
48558            fn default() -> Self {
48559                Self {
48560                    accounts: Err("no value supplied for accounts".to_string()),
48561                    next_page_token: Ok(Default::default()),
48562                }
48563            }
48564        }
48565        impl ListEvmAccountsResponse {
48566            pub fn accounts<T>(mut self, value: T) -> Self
48567            where
48568                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmAccount>>,
48569                T::Error: ::std::fmt::Display,
48570            {
48571                self.accounts = value
48572                    .try_into()
48573                    .map_err(|e| format!("error converting supplied value for accounts: {}", e));
48574                self
48575            }
48576            pub fn next_page_token<T>(mut self, value: T) -> Self
48577            where
48578                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48579                T::Error: ::std::fmt::Display,
48580            {
48581                self.next_page_token = value.try_into().map_err(|e| {
48582                    format!("error converting supplied value for next_page_token: {}", e)
48583                });
48584                self
48585            }
48586        }
48587        impl ::std::convert::TryFrom<ListEvmAccountsResponse> for super::ListEvmAccountsResponse {
48588            type Error = super::error::ConversionError;
48589            fn try_from(
48590                value: ListEvmAccountsResponse,
48591            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48592                Ok(Self {
48593                    accounts: value.accounts?,
48594                    next_page_token: value.next_page_token?,
48595                })
48596            }
48597        }
48598        impl ::std::convert::From<super::ListEvmAccountsResponse> for ListEvmAccountsResponse {
48599            fn from(value: super::ListEvmAccountsResponse) -> Self {
48600                Self {
48601                    accounts: Ok(value.accounts),
48602                    next_page_token: Ok(value.next_page_token),
48603                }
48604            }
48605        }
48606        #[derive(Clone, Debug)]
48607        pub struct ListEvmSmartAccountsResponse {
48608            accounts: ::std::result::Result<
48609                ::std::vec::Vec<super::EvmSmartAccount>,
48610                ::std::string::String,
48611            >,
48612            next_page_token: ::std::result::Result<
48613                ::std::option::Option<::std::string::String>,
48614                ::std::string::String,
48615            >,
48616        }
48617        impl ::std::default::Default for ListEvmSmartAccountsResponse {
48618            fn default() -> Self {
48619                Self {
48620                    accounts: Err("no value supplied for accounts".to_string()),
48621                    next_page_token: Ok(Default::default()),
48622                }
48623            }
48624        }
48625        impl ListEvmSmartAccountsResponse {
48626            pub fn accounts<T>(mut self, value: T) -> Self
48627            where
48628                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmSmartAccount>>,
48629                T::Error: ::std::fmt::Display,
48630            {
48631                self.accounts = value
48632                    .try_into()
48633                    .map_err(|e| format!("error converting supplied value for accounts: {}", e));
48634                self
48635            }
48636            pub fn next_page_token<T>(mut self, value: T) -> Self
48637            where
48638                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48639                T::Error: ::std::fmt::Display,
48640            {
48641                self.next_page_token = value.try_into().map_err(|e| {
48642                    format!("error converting supplied value for next_page_token: {}", e)
48643                });
48644                self
48645            }
48646        }
48647        impl ::std::convert::TryFrom<ListEvmSmartAccountsResponse> for super::ListEvmSmartAccountsResponse {
48648            type Error = super::error::ConversionError;
48649            fn try_from(
48650                value: ListEvmSmartAccountsResponse,
48651            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48652                Ok(Self {
48653                    accounts: value.accounts?,
48654                    next_page_token: value.next_page_token?,
48655                })
48656            }
48657        }
48658        impl ::std::convert::From<super::ListEvmSmartAccountsResponse> for ListEvmSmartAccountsResponse {
48659            fn from(value: super::ListEvmSmartAccountsResponse) -> Self {
48660                Self {
48661                    accounts: Ok(value.accounts),
48662                    next_page_token: Ok(value.next_page_token),
48663                }
48664            }
48665        }
48666        #[derive(Clone, Debug)]
48667        pub struct ListEvmTokenBalancesResponse {
48668            balances:
48669                ::std::result::Result<::std::vec::Vec<super::TokenBalance>, ::std::string::String>,
48670            next_page_token: ::std::result::Result<
48671                ::std::option::Option<::std::string::String>,
48672                ::std::string::String,
48673            >,
48674        }
48675        impl ::std::default::Default for ListEvmTokenBalancesResponse {
48676            fn default() -> Self {
48677                Self {
48678                    balances: Err("no value supplied for balances".to_string()),
48679                    next_page_token: Ok(Default::default()),
48680                }
48681            }
48682        }
48683        impl ListEvmTokenBalancesResponse {
48684            pub fn balances<T>(mut self, value: T) -> Self
48685            where
48686                T: ::std::convert::TryInto<::std::vec::Vec<super::TokenBalance>>,
48687                T::Error: ::std::fmt::Display,
48688            {
48689                self.balances = value
48690                    .try_into()
48691                    .map_err(|e| format!("error converting supplied value for balances: {}", e));
48692                self
48693            }
48694            pub fn next_page_token<T>(mut self, value: T) -> Self
48695            where
48696                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48697                T::Error: ::std::fmt::Display,
48698            {
48699                self.next_page_token = value.try_into().map_err(|e| {
48700                    format!("error converting supplied value for next_page_token: {}", e)
48701                });
48702                self
48703            }
48704        }
48705        impl ::std::convert::TryFrom<ListEvmTokenBalancesResponse> for super::ListEvmTokenBalancesResponse {
48706            type Error = super::error::ConversionError;
48707            fn try_from(
48708                value: ListEvmTokenBalancesResponse,
48709            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48710                Ok(Self {
48711                    balances: value.balances?,
48712                    next_page_token: value.next_page_token?,
48713                })
48714            }
48715        }
48716        impl ::std::convert::From<super::ListEvmTokenBalancesResponse> for ListEvmTokenBalancesResponse {
48717            fn from(value: super::ListEvmTokenBalancesResponse) -> Self {
48718                Self {
48719                    balances: Ok(value.balances),
48720                    next_page_token: Ok(value.next_page_token),
48721                }
48722            }
48723        }
48724        #[derive(Clone, Debug)]
48725        pub struct ListPoliciesResponse {
48726            next_page_token: ::std::result::Result<
48727                ::std::option::Option<::std::string::String>,
48728                ::std::string::String,
48729            >,
48730            policies: ::std::result::Result<::std::vec::Vec<super::Policy>, ::std::string::String>,
48731        }
48732        impl ::std::default::Default for ListPoliciesResponse {
48733            fn default() -> Self {
48734                Self {
48735                    next_page_token: Ok(Default::default()),
48736                    policies: Err("no value supplied for policies".to_string()),
48737                }
48738            }
48739        }
48740        impl ListPoliciesResponse {
48741            pub fn next_page_token<T>(mut self, value: T) -> Self
48742            where
48743                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48744                T::Error: ::std::fmt::Display,
48745            {
48746                self.next_page_token = value.try_into().map_err(|e| {
48747                    format!("error converting supplied value for next_page_token: {}", e)
48748                });
48749                self
48750            }
48751            pub fn policies<T>(mut self, value: T) -> Self
48752            where
48753                T: ::std::convert::TryInto<::std::vec::Vec<super::Policy>>,
48754                T::Error: ::std::fmt::Display,
48755            {
48756                self.policies = value
48757                    .try_into()
48758                    .map_err(|e| format!("error converting supplied value for policies: {}", e));
48759                self
48760            }
48761        }
48762        impl ::std::convert::TryFrom<ListPoliciesResponse> for super::ListPoliciesResponse {
48763            type Error = super::error::ConversionError;
48764            fn try_from(
48765                value: ListPoliciesResponse,
48766            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48767                Ok(Self {
48768                    next_page_token: value.next_page_token?,
48769                    policies: value.policies?,
48770                })
48771            }
48772        }
48773        impl ::std::convert::From<super::ListPoliciesResponse> for ListPoliciesResponse {
48774            fn from(value: super::ListPoliciesResponse) -> Self {
48775                Self {
48776                    next_page_token: Ok(value.next_page_token),
48777                    policies: Ok(value.policies),
48778                }
48779            }
48780        }
48781        #[derive(Clone, Debug)]
48782        pub struct ListResponse {
48783            next_page_token: ::std::result::Result<
48784                ::std::option::Option<::std::string::String>,
48785                ::std::string::String,
48786            >,
48787        }
48788        impl ::std::default::Default for ListResponse {
48789            fn default() -> Self {
48790                Self {
48791                    next_page_token: Ok(Default::default()),
48792                }
48793            }
48794        }
48795        impl ListResponse {
48796            pub fn next_page_token<T>(mut self, value: T) -> Self
48797            where
48798                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48799                T::Error: ::std::fmt::Display,
48800            {
48801                self.next_page_token = value.try_into().map_err(|e| {
48802                    format!("error converting supplied value for next_page_token: {}", e)
48803                });
48804                self
48805            }
48806        }
48807        impl ::std::convert::TryFrom<ListResponse> for super::ListResponse {
48808            type Error = super::error::ConversionError;
48809            fn try_from(
48810                value: ListResponse,
48811            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48812                Ok(Self {
48813                    next_page_token: value.next_page_token?,
48814                })
48815            }
48816        }
48817        impl ::std::convert::From<super::ListResponse> for ListResponse {
48818            fn from(value: super::ListResponse) -> Self {
48819                Self {
48820                    next_page_token: Ok(value.next_page_token),
48821                }
48822            }
48823        }
48824        #[derive(Clone, Debug)]
48825        pub struct ListSolanaAccountsResponse {
48826            accounts:
48827                ::std::result::Result<::std::vec::Vec<super::SolanaAccount>, ::std::string::String>,
48828            next_page_token: ::std::result::Result<
48829                ::std::option::Option<::std::string::String>,
48830                ::std::string::String,
48831            >,
48832        }
48833        impl ::std::default::Default for ListSolanaAccountsResponse {
48834            fn default() -> Self {
48835                Self {
48836                    accounts: Err("no value supplied for accounts".to_string()),
48837                    next_page_token: Ok(Default::default()),
48838                }
48839            }
48840        }
48841        impl ListSolanaAccountsResponse {
48842            pub fn accounts<T>(mut self, value: T) -> Self
48843            where
48844                T: ::std::convert::TryInto<::std::vec::Vec<super::SolanaAccount>>,
48845                T::Error: ::std::fmt::Display,
48846            {
48847                self.accounts = value
48848                    .try_into()
48849                    .map_err(|e| format!("error converting supplied value for accounts: {}", e));
48850                self
48851            }
48852            pub fn next_page_token<T>(mut self, value: T) -> Self
48853            where
48854                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48855                T::Error: ::std::fmt::Display,
48856            {
48857                self.next_page_token = value.try_into().map_err(|e| {
48858                    format!("error converting supplied value for next_page_token: {}", e)
48859                });
48860                self
48861            }
48862        }
48863        impl ::std::convert::TryFrom<ListSolanaAccountsResponse> for super::ListSolanaAccountsResponse {
48864            type Error = super::error::ConversionError;
48865            fn try_from(
48866                value: ListSolanaAccountsResponse,
48867            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48868                Ok(Self {
48869                    accounts: value.accounts?,
48870                    next_page_token: value.next_page_token?,
48871                })
48872            }
48873        }
48874        impl ::std::convert::From<super::ListSolanaAccountsResponse> for ListSolanaAccountsResponse {
48875            fn from(value: super::ListSolanaAccountsResponse) -> Self {
48876                Self {
48877                    accounts: Ok(value.accounts),
48878                    next_page_token: Ok(value.next_page_token),
48879                }
48880            }
48881        }
48882        #[derive(Clone, Debug)]
48883        pub struct ListSolanaTokenBalancesResponse {
48884            balances: ::std::result::Result<
48885                ::std::vec::Vec<super::SolanaTokenBalance>,
48886                ::std::string::String,
48887            >,
48888            next_page_token: ::std::result::Result<
48889                ::std::option::Option<::std::string::String>,
48890                ::std::string::String,
48891            >,
48892        }
48893        impl ::std::default::Default for ListSolanaTokenBalancesResponse {
48894            fn default() -> Self {
48895                Self {
48896                    balances: Err("no value supplied for balances".to_string()),
48897                    next_page_token: Ok(Default::default()),
48898                }
48899            }
48900        }
48901        impl ListSolanaTokenBalancesResponse {
48902            pub fn balances<T>(mut self, value: T) -> Self
48903            where
48904                T: ::std::convert::TryInto<::std::vec::Vec<super::SolanaTokenBalance>>,
48905                T::Error: ::std::fmt::Display,
48906            {
48907                self.balances = value
48908                    .try_into()
48909                    .map_err(|e| format!("error converting supplied value for balances: {}", e));
48910                self
48911            }
48912            pub fn next_page_token<T>(mut self, value: T) -> Self
48913            where
48914                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48915                T::Error: ::std::fmt::Display,
48916            {
48917                self.next_page_token = value.try_into().map_err(|e| {
48918                    format!("error converting supplied value for next_page_token: {}", e)
48919                });
48920                self
48921            }
48922        }
48923        impl ::std::convert::TryFrom<ListSolanaTokenBalancesResponse>
48924            for super::ListSolanaTokenBalancesResponse
48925        {
48926            type Error = super::error::ConversionError;
48927            fn try_from(
48928                value: ListSolanaTokenBalancesResponse,
48929            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48930                Ok(Self {
48931                    balances: value.balances?,
48932                    next_page_token: value.next_page_token?,
48933                })
48934            }
48935        }
48936        impl ::std::convert::From<super::ListSolanaTokenBalancesResponse>
48937            for ListSolanaTokenBalancesResponse
48938        {
48939            fn from(value: super::ListSolanaTokenBalancesResponse) -> Self {
48940                Self {
48941                    balances: Ok(value.balances),
48942                    next_page_token: Ok(value.next_page_token),
48943                }
48944            }
48945        }
48946        #[derive(Clone, Debug)]
48947        pub struct ListSpendPermissionsResponse {
48948            next_page_token: ::std::result::Result<
48949                ::std::option::Option<::std::string::String>,
48950                ::std::string::String,
48951            >,
48952            spend_permissions: ::std::result::Result<
48953                ::std::vec::Vec<super::SpendPermissionResponseObject>,
48954                ::std::string::String,
48955            >,
48956        }
48957        impl ::std::default::Default for ListSpendPermissionsResponse {
48958            fn default() -> Self {
48959                Self {
48960                    next_page_token: Ok(Default::default()),
48961                    spend_permissions: Err("no value supplied for spend_permissions".to_string()),
48962                }
48963            }
48964        }
48965        impl ListSpendPermissionsResponse {
48966            pub fn next_page_token<T>(mut self, value: T) -> Self
48967            where
48968                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
48969                T::Error: ::std::fmt::Display,
48970            {
48971                self.next_page_token = value.try_into().map_err(|e| {
48972                    format!("error converting supplied value for next_page_token: {}", e)
48973                });
48974                self
48975            }
48976            pub fn spend_permissions<T>(mut self, value: T) -> Self
48977            where
48978                T: ::std::convert::TryInto<::std::vec::Vec<super::SpendPermissionResponseObject>>,
48979                T::Error: ::std::fmt::Display,
48980            {
48981                self.spend_permissions = value.try_into().map_err(|e| {
48982                    format!(
48983                        "error converting supplied value for spend_permissions: {}",
48984                        e
48985                    )
48986                });
48987                self
48988            }
48989        }
48990        impl ::std::convert::TryFrom<ListSpendPermissionsResponse> for super::ListSpendPermissionsResponse {
48991            type Error = super::error::ConversionError;
48992            fn try_from(
48993                value: ListSpendPermissionsResponse,
48994            ) -> ::std::result::Result<Self, super::error::ConversionError> {
48995                Ok(Self {
48996                    next_page_token: value.next_page_token?,
48997                    spend_permissions: value.spend_permissions?,
48998                })
48999            }
49000        }
49001        impl ::std::convert::From<super::ListSpendPermissionsResponse> for ListSpendPermissionsResponse {
49002            fn from(value: super::ListSpendPermissionsResponse) -> Self {
49003                Self {
49004                    next_page_token: Ok(value.next_page_token),
49005                    spend_permissions: Ok(value.spend_permissions),
49006                }
49007            }
49008        }
49009        #[derive(Clone, Debug)]
49010        pub struct MintAddressCriterion {
49011            addresses: ::std::result::Result<
49012                ::std::vec::Vec<super::MintAddressCriterionAddressesItem>,
49013                ::std::string::String,
49014            >,
49015            operator:
49016                ::std::result::Result<super::MintAddressCriterionOperator, ::std::string::String>,
49017            type_: ::std::result::Result<super::MintAddressCriterionType, ::std::string::String>,
49018        }
49019        impl ::std::default::Default for MintAddressCriterion {
49020            fn default() -> Self {
49021                Self {
49022                    addresses: Err("no value supplied for addresses".to_string()),
49023                    operator: Err("no value supplied for operator".to_string()),
49024                    type_: Err("no value supplied for type_".to_string()),
49025                }
49026            }
49027        }
49028        impl MintAddressCriterion {
49029            pub fn addresses<T>(mut self, value: T) -> Self
49030            where
49031                T: ::std::convert::TryInto<
49032                    ::std::vec::Vec<super::MintAddressCriterionAddressesItem>,
49033                >,
49034                T::Error: ::std::fmt::Display,
49035            {
49036                self.addresses = value
49037                    .try_into()
49038                    .map_err(|e| format!("error converting supplied value for addresses: {}", e));
49039                self
49040            }
49041            pub fn operator<T>(mut self, value: T) -> Self
49042            where
49043                T: ::std::convert::TryInto<super::MintAddressCriterionOperator>,
49044                T::Error: ::std::fmt::Display,
49045            {
49046                self.operator = value
49047                    .try_into()
49048                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
49049                self
49050            }
49051            pub fn type_<T>(mut self, value: T) -> Self
49052            where
49053                T: ::std::convert::TryInto<super::MintAddressCriterionType>,
49054                T::Error: ::std::fmt::Display,
49055            {
49056                self.type_ = value
49057                    .try_into()
49058                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
49059                self
49060            }
49061        }
49062        impl ::std::convert::TryFrom<MintAddressCriterion> for super::MintAddressCriterion {
49063            type Error = super::error::ConversionError;
49064            fn try_from(
49065                value: MintAddressCriterion,
49066            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49067                Ok(Self {
49068                    addresses: value.addresses?,
49069                    operator: value.operator?,
49070                    type_: value.type_?,
49071                })
49072            }
49073        }
49074        impl ::std::convert::From<super::MintAddressCriterion> for MintAddressCriterion {
49075            fn from(value: super::MintAddressCriterion) -> Self {
49076                Self {
49077                    addresses: Ok(value.addresses),
49078                    operator: Ok(value.operator),
49079                    type_: Ok(value.type_),
49080                }
49081            }
49082        }
49083        #[derive(Clone, Debug)]
49084        pub struct NetUsdChangeCriterion {
49085            change_cents: ::std::result::Result<i64, ::std::string::String>,
49086            operator:
49087                ::std::result::Result<super::NetUsdChangeCriterionOperator, ::std::string::String>,
49088            type_: ::std::result::Result<super::NetUsdChangeCriterionType, ::std::string::String>,
49089        }
49090        impl ::std::default::Default for NetUsdChangeCriterion {
49091            fn default() -> Self {
49092                Self {
49093                    change_cents: Err("no value supplied for change_cents".to_string()),
49094                    operator: Err("no value supplied for operator".to_string()),
49095                    type_: Err("no value supplied for type_".to_string()),
49096                }
49097            }
49098        }
49099        impl NetUsdChangeCriterion {
49100            pub fn change_cents<T>(mut self, value: T) -> Self
49101            where
49102                T: ::std::convert::TryInto<i64>,
49103                T::Error: ::std::fmt::Display,
49104            {
49105                self.change_cents = value.try_into().map_err(|e| {
49106                    format!("error converting supplied value for change_cents: {}", e)
49107                });
49108                self
49109            }
49110            pub fn operator<T>(mut self, value: T) -> Self
49111            where
49112                T: ::std::convert::TryInto<super::NetUsdChangeCriterionOperator>,
49113                T::Error: ::std::fmt::Display,
49114            {
49115                self.operator = value
49116                    .try_into()
49117                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
49118                self
49119            }
49120            pub fn type_<T>(mut self, value: T) -> Self
49121            where
49122                T: ::std::convert::TryInto<super::NetUsdChangeCriterionType>,
49123                T::Error: ::std::fmt::Display,
49124            {
49125                self.type_ = value
49126                    .try_into()
49127                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
49128                self
49129            }
49130        }
49131        impl ::std::convert::TryFrom<NetUsdChangeCriterion> for super::NetUsdChangeCriterion {
49132            type Error = super::error::ConversionError;
49133            fn try_from(
49134                value: NetUsdChangeCriterion,
49135            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49136                Ok(Self {
49137                    change_cents: value.change_cents?,
49138                    operator: value.operator?,
49139                    type_: value.type_?,
49140                })
49141            }
49142        }
49143        impl ::std::convert::From<super::NetUsdChangeCriterion> for NetUsdChangeCriterion {
49144            fn from(value: super::NetUsdChangeCriterion) -> Self {
49145                Self {
49146                    change_cents: Ok(value.change_cents),
49147                    operator: Ok(value.operator),
49148                    type_: Ok(value.type_),
49149                }
49150            }
49151        }
49152        #[derive(Clone, Debug)]
49153        pub struct OAuth2Authentication {
49154            email: ::std::result::Result<
49155                ::std::option::Option<::std::string::String>,
49156                ::std::string::String,
49157            >,
49158            name: ::std::result::Result<
49159                ::std::option::Option<::std::string::String>,
49160                ::std::string::String,
49161            >,
49162            sub: ::std::result::Result<::std::string::String, ::std::string::String>,
49163            type_: ::std::result::Result<super::OAuth2ProviderType, ::std::string::String>,
49164            username: ::std::result::Result<
49165                ::std::option::Option<::std::string::String>,
49166                ::std::string::String,
49167            >,
49168        }
49169        impl ::std::default::Default for OAuth2Authentication {
49170            fn default() -> Self {
49171                Self {
49172                    email: Ok(Default::default()),
49173                    name: Ok(Default::default()),
49174                    sub: Err("no value supplied for sub".to_string()),
49175                    type_: Err("no value supplied for type_".to_string()),
49176                    username: Ok(Default::default()),
49177                }
49178            }
49179        }
49180        impl OAuth2Authentication {
49181            pub fn email<T>(mut self, value: T) -> Self
49182            where
49183                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
49184                T::Error: ::std::fmt::Display,
49185            {
49186                self.email = value
49187                    .try_into()
49188                    .map_err(|e| format!("error converting supplied value for email: {}", e));
49189                self
49190            }
49191            pub fn name<T>(mut self, value: T) -> Self
49192            where
49193                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
49194                T::Error: ::std::fmt::Display,
49195            {
49196                self.name = value
49197                    .try_into()
49198                    .map_err(|e| format!("error converting supplied value for name: {}", e));
49199                self
49200            }
49201            pub fn sub<T>(mut self, value: T) -> Self
49202            where
49203                T: ::std::convert::TryInto<::std::string::String>,
49204                T::Error: ::std::fmt::Display,
49205            {
49206                self.sub = value
49207                    .try_into()
49208                    .map_err(|e| format!("error converting supplied value for sub: {}", e));
49209                self
49210            }
49211            pub fn type_<T>(mut self, value: T) -> Self
49212            where
49213                T: ::std::convert::TryInto<super::OAuth2ProviderType>,
49214                T::Error: ::std::fmt::Display,
49215            {
49216                self.type_ = value
49217                    .try_into()
49218                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
49219                self
49220            }
49221            pub fn username<T>(mut self, value: T) -> Self
49222            where
49223                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
49224                T::Error: ::std::fmt::Display,
49225            {
49226                self.username = value
49227                    .try_into()
49228                    .map_err(|e| format!("error converting supplied value for username: {}", e));
49229                self
49230            }
49231        }
49232        impl ::std::convert::TryFrom<OAuth2Authentication> for super::OAuth2Authentication {
49233            type Error = super::error::ConversionError;
49234            fn try_from(
49235                value: OAuth2Authentication,
49236            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49237                Ok(Self {
49238                    email: value.email?,
49239                    name: value.name?,
49240                    sub: value.sub?,
49241                    type_: value.type_?,
49242                    username: value.username?,
49243                })
49244            }
49245        }
49246        impl ::std::convert::From<super::OAuth2Authentication> for OAuth2Authentication {
49247            fn from(value: super::OAuth2Authentication) -> Self {
49248                Self {
49249                    email: Ok(value.email),
49250                    name: Ok(value.name),
49251                    sub: Ok(value.sub),
49252                    type_: Ok(value.type_),
49253                    username: Ok(value.username),
49254                }
49255            }
49256        }
49257        #[derive(Clone, Debug)]
49258        pub struct OnchainDataQuery {
49259            cache: ::std::result::Result<
49260                ::std::option::Option<super::QueryResultCacheConfiguration>,
49261                ::std::string::String,
49262            >,
49263            sql: ::std::result::Result<super::OnchainDataQuerySql, ::std::string::String>,
49264        }
49265        impl ::std::default::Default for OnchainDataQuery {
49266            fn default() -> Self {
49267                Self {
49268                    cache: Ok(Default::default()),
49269                    sql: Err("no value supplied for sql".to_string()),
49270                }
49271            }
49272        }
49273        impl OnchainDataQuery {
49274            pub fn cache<T>(mut self, value: T) -> Self
49275            where
49276                T: ::std::convert::TryInto<
49277                    ::std::option::Option<super::QueryResultCacheConfiguration>,
49278                >,
49279                T::Error: ::std::fmt::Display,
49280            {
49281                self.cache = value
49282                    .try_into()
49283                    .map_err(|e| format!("error converting supplied value for cache: {}", e));
49284                self
49285            }
49286            pub fn sql<T>(mut self, value: T) -> Self
49287            where
49288                T: ::std::convert::TryInto<super::OnchainDataQuerySql>,
49289                T::Error: ::std::fmt::Display,
49290            {
49291                self.sql = value
49292                    .try_into()
49293                    .map_err(|e| format!("error converting supplied value for sql: {}", e));
49294                self
49295            }
49296        }
49297        impl ::std::convert::TryFrom<OnchainDataQuery> for super::OnchainDataQuery {
49298            type Error = super::error::ConversionError;
49299            fn try_from(
49300                value: OnchainDataQuery,
49301            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49302                Ok(Self {
49303                    cache: value.cache?,
49304                    sql: value.sql?,
49305                })
49306            }
49307        }
49308        impl ::std::convert::From<super::OnchainDataQuery> for OnchainDataQuery {
49309            fn from(value: super::OnchainDataQuery) -> Self {
49310                Self {
49311                    cache: Ok(value.cache),
49312                    sql: Ok(value.sql),
49313                }
49314            }
49315        }
49316        #[derive(Clone, Debug)]
49317        pub struct OnchainDataResult {
49318            metadata: ::std::result::Result<
49319                ::std::option::Option<super::OnchainDataResultMetadata>,
49320                ::std::string::String,
49321            >,
49322            result: ::std::result::Result<
49323                ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
49324                ::std::string::String,
49325            >,
49326            schema: ::std::result::Result<
49327                ::std::option::Option<super::OnchainDataResultSchema>,
49328                ::std::string::String,
49329            >,
49330        }
49331        impl ::std::default::Default for OnchainDataResult {
49332            fn default() -> Self {
49333                Self {
49334                    metadata: Ok(Default::default()),
49335                    result: Ok(Default::default()),
49336                    schema: Ok(Default::default()),
49337                }
49338            }
49339        }
49340        impl OnchainDataResult {
49341            pub fn metadata<T>(mut self, value: T) -> Self
49342            where
49343                T: ::std::convert::TryInto<::std::option::Option<super::OnchainDataResultMetadata>>,
49344                T::Error: ::std::fmt::Display,
49345            {
49346                self.metadata = value
49347                    .try_into()
49348                    .map_err(|e| format!("error converting supplied value for metadata: {}", e));
49349                self
49350            }
49351            pub fn result<T>(mut self, value: T) -> Self
49352            where
49353                T: ::std::convert::TryInto<
49354                    ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
49355                >,
49356                T::Error: ::std::fmt::Display,
49357            {
49358                self.result = value
49359                    .try_into()
49360                    .map_err(|e| format!("error converting supplied value for result: {}", e));
49361                self
49362            }
49363            pub fn schema<T>(mut self, value: T) -> Self
49364            where
49365                T: ::std::convert::TryInto<::std::option::Option<super::OnchainDataResultSchema>>,
49366                T::Error: ::std::fmt::Display,
49367            {
49368                self.schema = value
49369                    .try_into()
49370                    .map_err(|e| format!("error converting supplied value for schema: {}", e));
49371                self
49372            }
49373        }
49374        impl ::std::convert::TryFrom<OnchainDataResult> for super::OnchainDataResult {
49375            type Error = super::error::ConversionError;
49376            fn try_from(
49377                value: OnchainDataResult,
49378            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49379                Ok(Self {
49380                    metadata: value.metadata?,
49381                    result: value.result?,
49382                    schema: value.schema?,
49383                })
49384            }
49385        }
49386        impl ::std::convert::From<super::OnchainDataResult> for OnchainDataResult {
49387            fn from(value: super::OnchainDataResult) -> Self {
49388                Self {
49389                    metadata: Ok(value.metadata),
49390                    result: Ok(value.result),
49391                    schema: Ok(value.schema),
49392                }
49393            }
49394        }
49395        #[derive(Clone, Debug)]
49396        pub struct OnchainDataResultMetadata {
49397            cached: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
49398            execution_time_ms:
49399                ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
49400            execution_timestamp: ::std::result::Result<
49401                ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
49402                ::std::string::String,
49403            >,
49404            row_count: ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
49405        }
49406        impl ::std::default::Default for OnchainDataResultMetadata {
49407            fn default() -> Self {
49408                Self {
49409                    cached: Ok(Default::default()),
49410                    execution_time_ms: Ok(Default::default()),
49411                    execution_timestamp: Ok(Default::default()),
49412                    row_count: Ok(Default::default()),
49413                }
49414            }
49415        }
49416        impl OnchainDataResultMetadata {
49417            pub fn cached<T>(mut self, value: T) -> Self
49418            where
49419                T: ::std::convert::TryInto<::std::option::Option<bool>>,
49420                T::Error: ::std::fmt::Display,
49421            {
49422                self.cached = value
49423                    .try_into()
49424                    .map_err(|e| format!("error converting supplied value for cached: {}", e));
49425                self
49426            }
49427            pub fn execution_time_ms<T>(mut self, value: T) -> Self
49428            where
49429                T: ::std::convert::TryInto<::std::option::Option<i64>>,
49430                T::Error: ::std::fmt::Display,
49431            {
49432                self.execution_time_ms = value.try_into().map_err(|e| {
49433                    format!(
49434                        "error converting supplied value for execution_time_ms: {}",
49435                        e
49436                    )
49437                });
49438                self
49439            }
49440            pub fn execution_timestamp<T>(mut self, value: T) -> Self
49441            where
49442                T: ::std::convert::TryInto<
49443                    ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
49444                >,
49445                T::Error: ::std::fmt::Display,
49446            {
49447                self.execution_timestamp = value.try_into().map_err(|e| {
49448                    format!(
49449                        "error converting supplied value for execution_timestamp: {}",
49450                        e
49451                    )
49452                });
49453                self
49454            }
49455            pub fn row_count<T>(mut self, value: T) -> Self
49456            where
49457                T: ::std::convert::TryInto<::std::option::Option<i64>>,
49458                T::Error: ::std::fmt::Display,
49459            {
49460                self.row_count = value
49461                    .try_into()
49462                    .map_err(|e| format!("error converting supplied value for row_count: {}", e));
49463                self
49464            }
49465        }
49466        impl ::std::convert::TryFrom<OnchainDataResultMetadata> for super::OnchainDataResultMetadata {
49467            type Error = super::error::ConversionError;
49468            fn try_from(
49469                value: OnchainDataResultMetadata,
49470            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49471                Ok(Self {
49472                    cached: value.cached?,
49473                    execution_time_ms: value.execution_time_ms?,
49474                    execution_timestamp: value.execution_timestamp?,
49475                    row_count: value.row_count?,
49476                })
49477            }
49478        }
49479        impl ::std::convert::From<super::OnchainDataResultMetadata> for OnchainDataResultMetadata {
49480            fn from(value: super::OnchainDataResultMetadata) -> Self {
49481                Self {
49482                    cached: Ok(value.cached),
49483                    execution_time_ms: Ok(value.execution_time_ms),
49484                    execution_timestamp: Ok(value.execution_timestamp),
49485                    row_count: Ok(value.row_count),
49486                }
49487            }
49488        }
49489        #[derive(Clone, Debug)]
49490        pub struct OnchainDataResultSchema {
49491            columns: ::std::result::Result<
49492                ::std::vec::Vec<super::OnchainDataResultSchemaColumnsItem>,
49493                ::std::string::String,
49494            >,
49495        }
49496        impl ::std::default::Default for OnchainDataResultSchema {
49497            fn default() -> Self {
49498                Self {
49499                    columns: Ok(Default::default()),
49500                }
49501            }
49502        }
49503        impl OnchainDataResultSchema {
49504            pub fn columns<T>(mut self, value: T) -> Self
49505            where
49506                T: ::std::convert::TryInto<
49507                    ::std::vec::Vec<super::OnchainDataResultSchemaColumnsItem>,
49508                >,
49509                T::Error: ::std::fmt::Display,
49510            {
49511                self.columns = value
49512                    .try_into()
49513                    .map_err(|e| format!("error converting supplied value for columns: {}", e));
49514                self
49515            }
49516        }
49517        impl ::std::convert::TryFrom<OnchainDataResultSchema> for super::OnchainDataResultSchema {
49518            type Error = super::error::ConversionError;
49519            fn try_from(
49520                value: OnchainDataResultSchema,
49521            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49522                Ok(Self {
49523                    columns: value.columns?,
49524                })
49525            }
49526        }
49527        impl ::std::convert::From<super::OnchainDataResultSchema> for OnchainDataResultSchema {
49528            fn from(value: super::OnchainDataResultSchema) -> Self {
49529                Self {
49530                    columns: Ok(value.columns),
49531                }
49532            }
49533        }
49534        #[derive(Clone, Debug)]
49535        pub struct OnchainDataResultSchemaColumnsItem {
49536            name: ::std::result::Result<
49537                ::std::option::Option<::std::string::String>,
49538                ::std::string::String,
49539            >,
49540            type_: ::std::result::Result<
49541                ::std::option::Option<super::OnchainDataResultSchemaColumnsItemType>,
49542                ::std::string::String,
49543            >,
49544        }
49545        impl ::std::default::Default for OnchainDataResultSchemaColumnsItem {
49546            fn default() -> Self {
49547                Self {
49548                    name: Ok(Default::default()),
49549                    type_: Ok(Default::default()),
49550                }
49551            }
49552        }
49553        impl OnchainDataResultSchemaColumnsItem {
49554            pub fn name<T>(mut self, value: T) -> Self
49555            where
49556                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
49557                T::Error: ::std::fmt::Display,
49558            {
49559                self.name = value
49560                    .try_into()
49561                    .map_err(|e| format!("error converting supplied value for name: {}", e));
49562                self
49563            }
49564            pub fn type_<T>(mut self, value: T) -> Self
49565            where
49566                T: ::std::convert::TryInto<
49567                    ::std::option::Option<super::OnchainDataResultSchemaColumnsItemType>,
49568                >,
49569                T::Error: ::std::fmt::Display,
49570            {
49571                self.type_ = value
49572                    .try_into()
49573                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
49574                self
49575            }
49576        }
49577        impl ::std::convert::TryFrom<OnchainDataResultSchemaColumnsItem>
49578            for super::OnchainDataResultSchemaColumnsItem
49579        {
49580            type Error = super::error::ConversionError;
49581            fn try_from(
49582                value: OnchainDataResultSchemaColumnsItem,
49583            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49584                Ok(Self {
49585                    name: value.name?,
49586                    type_: value.type_?,
49587                })
49588            }
49589        }
49590        impl ::std::convert::From<super::OnchainDataResultSchemaColumnsItem>
49591            for OnchainDataResultSchemaColumnsItem
49592        {
49593            fn from(value: super::OnchainDataResultSchemaColumnsItem) -> Self {
49594                Self {
49595                    name: Ok(value.name),
49596                    type_: Ok(value.type_),
49597                }
49598            }
49599        }
49600        #[derive(Clone, Debug)]
49601        pub struct OnrampOrder {
49602            created_at: ::std::result::Result<::std::string::String, ::std::string::String>,
49603            destination_address:
49604                ::std::result::Result<::std::string::String, ::std::string::String>,
49605            destination_network:
49606                ::std::result::Result<::std::string::String, ::std::string::String>,
49607            exchange_rate: ::std::result::Result<::std::string::String, ::std::string::String>,
49608            fees: ::std::result::Result<
49609                ::std::vec::Vec<super::OnrampOrderFee>,
49610                ::std::string::String,
49611            >,
49612            order_id: ::std::result::Result<::std::string::String, ::std::string::String>,
49613            partner_user_ref: ::std::result::Result<
49614                ::std::option::Option<::std::string::String>,
49615                ::std::string::String,
49616            >,
49617            payment_currency: ::std::result::Result<::std::string::String, ::std::string::String>,
49618            payment_method:
49619                ::std::result::Result<super::OnrampOrderPaymentMethodTypeId, ::std::string::String>,
49620            payment_subtotal: ::std::result::Result<::std::string::String, ::std::string::String>,
49621            payment_total: ::std::result::Result<::std::string::String, ::std::string::String>,
49622            purchase_amount: ::std::result::Result<::std::string::String, ::std::string::String>,
49623            purchase_currency: ::std::result::Result<::std::string::String, ::std::string::String>,
49624            status: ::std::result::Result<super::OnrampOrderStatus, ::std::string::String>,
49625            tx_hash: ::std::result::Result<
49626                ::std::option::Option<::std::string::String>,
49627                ::std::string::String,
49628            >,
49629            updated_at: ::std::result::Result<::std::string::String, ::std::string::String>,
49630        }
49631        impl ::std::default::Default for OnrampOrder {
49632            fn default() -> Self {
49633                Self {
49634                    created_at: Err("no value supplied for created_at".to_string()),
49635                    destination_address: Err(
49636                        "no value supplied for destination_address".to_string()
49637                    ),
49638                    destination_network: Err(
49639                        "no value supplied for destination_network".to_string()
49640                    ),
49641                    exchange_rate: Err("no value supplied for exchange_rate".to_string()),
49642                    fees: Err("no value supplied for fees".to_string()),
49643                    order_id: Err("no value supplied for order_id".to_string()),
49644                    partner_user_ref: Ok(Default::default()),
49645                    payment_currency: Err("no value supplied for payment_currency".to_string()),
49646                    payment_method: Err("no value supplied for payment_method".to_string()),
49647                    payment_subtotal: Err("no value supplied for payment_subtotal".to_string()),
49648                    payment_total: Err("no value supplied for payment_total".to_string()),
49649                    purchase_amount: Err("no value supplied for purchase_amount".to_string()),
49650                    purchase_currency: Err("no value supplied for purchase_currency".to_string()),
49651                    status: Err("no value supplied for status".to_string()),
49652                    tx_hash: Ok(Default::default()),
49653                    updated_at: Err("no value supplied for updated_at".to_string()),
49654                }
49655            }
49656        }
49657        impl OnrampOrder {
49658            pub fn created_at<T>(mut self, value: T) -> Self
49659            where
49660                T: ::std::convert::TryInto<::std::string::String>,
49661                T::Error: ::std::fmt::Display,
49662            {
49663                self.created_at = value
49664                    .try_into()
49665                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
49666                self
49667            }
49668            pub fn destination_address<T>(mut self, value: T) -> Self
49669            where
49670                T: ::std::convert::TryInto<::std::string::String>,
49671                T::Error: ::std::fmt::Display,
49672            {
49673                self.destination_address = value.try_into().map_err(|e| {
49674                    format!(
49675                        "error converting supplied value for destination_address: {}",
49676                        e
49677                    )
49678                });
49679                self
49680            }
49681            pub fn destination_network<T>(mut self, value: T) -> Self
49682            where
49683                T: ::std::convert::TryInto<::std::string::String>,
49684                T::Error: ::std::fmt::Display,
49685            {
49686                self.destination_network = value.try_into().map_err(|e| {
49687                    format!(
49688                        "error converting supplied value for destination_network: {}",
49689                        e
49690                    )
49691                });
49692                self
49693            }
49694            pub fn exchange_rate<T>(mut self, value: T) -> Self
49695            where
49696                T: ::std::convert::TryInto<::std::string::String>,
49697                T::Error: ::std::fmt::Display,
49698            {
49699                self.exchange_rate = value.try_into().map_err(|e| {
49700                    format!("error converting supplied value for exchange_rate: {}", e)
49701                });
49702                self
49703            }
49704            pub fn fees<T>(mut self, value: T) -> Self
49705            where
49706                T: ::std::convert::TryInto<::std::vec::Vec<super::OnrampOrderFee>>,
49707                T::Error: ::std::fmt::Display,
49708            {
49709                self.fees = value
49710                    .try_into()
49711                    .map_err(|e| format!("error converting supplied value for fees: {}", e));
49712                self
49713            }
49714            pub fn order_id<T>(mut self, value: T) -> Self
49715            where
49716                T: ::std::convert::TryInto<::std::string::String>,
49717                T::Error: ::std::fmt::Display,
49718            {
49719                self.order_id = value
49720                    .try_into()
49721                    .map_err(|e| format!("error converting supplied value for order_id: {}", e));
49722                self
49723            }
49724            pub fn partner_user_ref<T>(mut self, value: T) -> Self
49725            where
49726                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
49727                T::Error: ::std::fmt::Display,
49728            {
49729                self.partner_user_ref = value.try_into().map_err(|e| {
49730                    format!(
49731                        "error converting supplied value for partner_user_ref: {}",
49732                        e
49733                    )
49734                });
49735                self
49736            }
49737            pub fn payment_currency<T>(mut self, value: T) -> Self
49738            where
49739                T: ::std::convert::TryInto<::std::string::String>,
49740                T::Error: ::std::fmt::Display,
49741            {
49742                self.payment_currency = value.try_into().map_err(|e| {
49743                    format!(
49744                        "error converting supplied value for payment_currency: {}",
49745                        e
49746                    )
49747                });
49748                self
49749            }
49750            pub fn payment_method<T>(mut self, value: T) -> Self
49751            where
49752                T: ::std::convert::TryInto<super::OnrampOrderPaymentMethodTypeId>,
49753                T::Error: ::std::fmt::Display,
49754            {
49755                self.payment_method = value.try_into().map_err(|e| {
49756                    format!("error converting supplied value for payment_method: {}", e)
49757                });
49758                self
49759            }
49760            pub fn payment_subtotal<T>(mut self, value: T) -> Self
49761            where
49762                T: ::std::convert::TryInto<::std::string::String>,
49763                T::Error: ::std::fmt::Display,
49764            {
49765                self.payment_subtotal = value.try_into().map_err(|e| {
49766                    format!(
49767                        "error converting supplied value for payment_subtotal: {}",
49768                        e
49769                    )
49770                });
49771                self
49772            }
49773            pub fn payment_total<T>(mut self, value: T) -> Self
49774            where
49775                T: ::std::convert::TryInto<::std::string::String>,
49776                T::Error: ::std::fmt::Display,
49777            {
49778                self.payment_total = value.try_into().map_err(|e| {
49779                    format!("error converting supplied value for payment_total: {}", e)
49780                });
49781                self
49782            }
49783            pub fn purchase_amount<T>(mut self, value: T) -> Self
49784            where
49785                T: ::std::convert::TryInto<::std::string::String>,
49786                T::Error: ::std::fmt::Display,
49787            {
49788                self.purchase_amount = value.try_into().map_err(|e| {
49789                    format!("error converting supplied value for purchase_amount: {}", e)
49790                });
49791                self
49792            }
49793            pub fn purchase_currency<T>(mut self, value: T) -> Self
49794            where
49795                T: ::std::convert::TryInto<::std::string::String>,
49796                T::Error: ::std::fmt::Display,
49797            {
49798                self.purchase_currency = value.try_into().map_err(|e| {
49799                    format!(
49800                        "error converting supplied value for purchase_currency: {}",
49801                        e
49802                    )
49803                });
49804                self
49805            }
49806            pub fn status<T>(mut self, value: T) -> Self
49807            where
49808                T: ::std::convert::TryInto<super::OnrampOrderStatus>,
49809                T::Error: ::std::fmt::Display,
49810            {
49811                self.status = value
49812                    .try_into()
49813                    .map_err(|e| format!("error converting supplied value for status: {}", e));
49814                self
49815            }
49816            pub fn tx_hash<T>(mut self, value: T) -> Self
49817            where
49818                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
49819                T::Error: ::std::fmt::Display,
49820            {
49821                self.tx_hash = value
49822                    .try_into()
49823                    .map_err(|e| format!("error converting supplied value for tx_hash: {}", e));
49824                self
49825            }
49826            pub fn updated_at<T>(mut self, value: T) -> Self
49827            where
49828                T: ::std::convert::TryInto<::std::string::String>,
49829                T::Error: ::std::fmt::Display,
49830            {
49831                self.updated_at = value
49832                    .try_into()
49833                    .map_err(|e| format!("error converting supplied value for updated_at: {}", e));
49834                self
49835            }
49836        }
49837        impl ::std::convert::TryFrom<OnrampOrder> for super::OnrampOrder {
49838            type Error = super::error::ConversionError;
49839            fn try_from(
49840                value: OnrampOrder,
49841            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49842                Ok(Self {
49843                    created_at: value.created_at?,
49844                    destination_address: value.destination_address?,
49845                    destination_network: value.destination_network?,
49846                    exchange_rate: value.exchange_rate?,
49847                    fees: value.fees?,
49848                    order_id: value.order_id?,
49849                    partner_user_ref: value.partner_user_ref?,
49850                    payment_currency: value.payment_currency?,
49851                    payment_method: value.payment_method?,
49852                    payment_subtotal: value.payment_subtotal?,
49853                    payment_total: value.payment_total?,
49854                    purchase_amount: value.purchase_amount?,
49855                    purchase_currency: value.purchase_currency?,
49856                    status: value.status?,
49857                    tx_hash: value.tx_hash?,
49858                    updated_at: value.updated_at?,
49859                })
49860            }
49861        }
49862        impl ::std::convert::From<super::OnrampOrder> for OnrampOrder {
49863            fn from(value: super::OnrampOrder) -> Self {
49864                Self {
49865                    created_at: Ok(value.created_at),
49866                    destination_address: Ok(value.destination_address),
49867                    destination_network: Ok(value.destination_network),
49868                    exchange_rate: Ok(value.exchange_rate),
49869                    fees: Ok(value.fees),
49870                    order_id: Ok(value.order_id),
49871                    partner_user_ref: Ok(value.partner_user_ref),
49872                    payment_currency: Ok(value.payment_currency),
49873                    payment_method: Ok(value.payment_method),
49874                    payment_subtotal: Ok(value.payment_subtotal),
49875                    payment_total: Ok(value.payment_total),
49876                    purchase_amount: Ok(value.purchase_amount),
49877                    purchase_currency: Ok(value.purchase_currency),
49878                    status: Ok(value.status),
49879                    tx_hash: Ok(value.tx_hash),
49880                    updated_at: Ok(value.updated_at),
49881                }
49882            }
49883        }
49884        #[derive(Clone, Debug)]
49885        pub struct OnrampOrderFee {
49886            amount: ::std::result::Result<::std::string::String, ::std::string::String>,
49887            currency: ::std::result::Result<::std::string::String, ::std::string::String>,
49888            type_: ::std::result::Result<super::OnrampOrderFeeType, ::std::string::String>,
49889        }
49890        impl ::std::default::Default for OnrampOrderFee {
49891            fn default() -> Self {
49892                Self {
49893                    amount: Err("no value supplied for amount".to_string()),
49894                    currency: Err("no value supplied for currency".to_string()),
49895                    type_: Err("no value supplied for type_".to_string()),
49896                }
49897            }
49898        }
49899        impl OnrampOrderFee {
49900            pub fn amount<T>(mut self, value: T) -> Self
49901            where
49902                T: ::std::convert::TryInto<::std::string::String>,
49903                T::Error: ::std::fmt::Display,
49904            {
49905                self.amount = value
49906                    .try_into()
49907                    .map_err(|e| format!("error converting supplied value for amount: {}", e));
49908                self
49909            }
49910            pub fn currency<T>(mut self, value: T) -> Self
49911            where
49912                T: ::std::convert::TryInto<::std::string::String>,
49913                T::Error: ::std::fmt::Display,
49914            {
49915                self.currency = value
49916                    .try_into()
49917                    .map_err(|e| format!("error converting supplied value for currency: {}", e));
49918                self
49919            }
49920            pub fn type_<T>(mut self, value: T) -> Self
49921            where
49922                T: ::std::convert::TryInto<super::OnrampOrderFeeType>,
49923                T::Error: ::std::fmt::Display,
49924            {
49925                self.type_ = value
49926                    .try_into()
49927                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
49928                self
49929            }
49930        }
49931        impl ::std::convert::TryFrom<OnrampOrderFee> for super::OnrampOrderFee {
49932            type Error = super::error::ConversionError;
49933            fn try_from(
49934                value: OnrampOrderFee,
49935            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49936                Ok(Self {
49937                    amount: value.amount?,
49938                    currency: value.currency?,
49939                    type_: value.type_?,
49940                })
49941            }
49942        }
49943        impl ::std::convert::From<super::OnrampOrderFee> for OnrampOrderFee {
49944            fn from(value: super::OnrampOrderFee) -> Self {
49945                Self {
49946                    amount: Ok(value.amount),
49947                    currency: Ok(value.currency),
49948                    type_: Ok(value.type_),
49949                }
49950            }
49951        }
49952        #[derive(Clone, Debug)]
49953        pub struct OnrampPaymentLink {
49954            payment_link_type:
49955                ::std::result::Result<super::OnrampPaymentLinkType, ::std::string::String>,
49956            url: ::std::result::Result<super::Url, ::std::string::String>,
49957        }
49958        impl ::std::default::Default for OnrampPaymentLink {
49959            fn default() -> Self {
49960                Self {
49961                    payment_link_type: Err("no value supplied for payment_link_type".to_string()),
49962                    url: Err("no value supplied for url".to_string()),
49963                }
49964            }
49965        }
49966        impl OnrampPaymentLink {
49967            pub fn payment_link_type<T>(mut self, value: T) -> Self
49968            where
49969                T: ::std::convert::TryInto<super::OnrampPaymentLinkType>,
49970                T::Error: ::std::fmt::Display,
49971            {
49972                self.payment_link_type = value.try_into().map_err(|e| {
49973                    format!(
49974                        "error converting supplied value for payment_link_type: {}",
49975                        e
49976                    )
49977                });
49978                self
49979            }
49980            pub fn url<T>(mut self, value: T) -> Self
49981            where
49982                T: ::std::convert::TryInto<super::Url>,
49983                T::Error: ::std::fmt::Display,
49984            {
49985                self.url = value
49986                    .try_into()
49987                    .map_err(|e| format!("error converting supplied value for url: {}", e));
49988                self
49989            }
49990        }
49991        impl ::std::convert::TryFrom<OnrampPaymentLink> for super::OnrampPaymentLink {
49992            type Error = super::error::ConversionError;
49993            fn try_from(
49994                value: OnrampPaymentLink,
49995            ) -> ::std::result::Result<Self, super::error::ConversionError> {
49996                Ok(Self {
49997                    payment_link_type: value.payment_link_type?,
49998                    url: value.url?,
49999                })
50000            }
50001        }
50002        impl ::std::convert::From<super::OnrampPaymentLink> for OnrampPaymentLink {
50003            fn from(value: super::OnrampPaymentLink) -> Self {
50004                Self {
50005                    payment_link_type: Ok(value.payment_link_type),
50006                    url: Ok(value.url),
50007                }
50008            }
50009        }
50010        #[derive(Clone, Debug)]
50011        pub struct OnrampQuote {
50012            destination_network:
50013                ::std::result::Result<::std::string::String, ::std::string::String>,
50014            exchange_rate: ::std::result::Result<::std::string::String, ::std::string::String>,
50015            fees: ::std::result::Result<
50016                ::std::vec::Vec<super::OnrampOrderFee>,
50017                ::std::string::String,
50018            >,
50019            payment_currency: ::std::result::Result<::std::string::String, ::std::string::String>,
50020            payment_subtotal: ::std::result::Result<::std::string::String, ::std::string::String>,
50021            payment_total: ::std::result::Result<::std::string::String, ::std::string::String>,
50022            purchase_amount: ::std::result::Result<::std::string::String, ::std::string::String>,
50023            purchase_currency: ::std::result::Result<::std::string::String, ::std::string::String>,
50024        }
50025        impl ::std::default::Default for OnrampQuote {
50026            fn default() -> Self {
50027                Self {
50028                    destination_network: Err(
50029                        "no value supplied for destination_network".to_string()
50030                    ),
50031                    exchange_rate: Err("no value supplied for exchange_rate".to_string()),
50032                    fees: Err("no value supplied for fees".to_string()),
50033                    payment_currency: Err("no value supplied for payment_currency".to_string()),
50034                    payment_subtotal: Err("no value supplied for payment_subtotal".to_string()),
50035                    payment_total: Err("no value supplied for payment_total".to_string()),
50036                    purchase_amount: Err("no value supplied for purchase_amount".to_string()),
50037                    purchase_currency: Err("no value supplied for purchase_currency".to_string()),
50038                }
50039            }
50040        }
50041        impl OnrampQuote {
50042            pub fn destination_network<T>(mut self, value: T) -> Self
50043            where
50044                T: ::std::convert::TryInto<::std::string::String>,
50045                T::Error: ::std::fmt::Display,
50046            {
50047                self.destination_network = value.try_into().map_err(|e| {
50048                    format!(
50049                        "error converting supplied value for destination_network: {}",
50050                        e
50051                    )
50052                });
50053                self
50054            }
50055            pub fn exchange_rate<T>(mut self, value: T) -> Self
50056            where
50057                T: ::std::convert::TryInto<::std::string::String>,
50058                T::Error: ::std::fmt::Display,
50059            {
50060                self.exchange_rate = value.try_into().map_err(|e| {
50061                    format!("error converting supplied value for exchange_rate: {}", e)
50062                });
50063                self
50064            }
50065            pub fn fees<T>(mut self, value: T) -> Self
50066            where
50067                T: ::std::convert::TryInto<::std::vec::Vec<super::OnrampOrderFee>>,
50068                T::Error: ::std::fmt::Display,
50069            {
50070                self.fees = value
50071                    .try_into()
50072                    .map_err(|e| format!("error converting supplied value for fees: {}", e));
50073                self
50074            }
50075            pub fn payment_currency<T>(mut self, value: T) -> Self
50076            where
50077                T: ::std::convert::TryInto<::std::string::String>,
50078                T::Error: ::std::fmt::Display,
50079            {
50080                self.payment_currency = value.try_into().map_err(|e| {
50081                    format!(
50082                        "error converting supplied value for payment_currency: {}",
50083                        e
50084                    )
50085                });
50086                self
50087            }
50088            pub fn payment_subtotal<T>(mut self, value: T) -> Self
50089            where
50090                T: ::std::convert::TryInto<::std::string::String>,
50091                T::Error: ::std::fmt::Display,
50092            {
50093                self.payment_subtotal = value.try_into().map_err(|e| {
50094                    format!(
50095                        "error converting supplied value for payment_subtotal: {}",
50096                        e
50097                    )
50098                });
50099                self
50100            }
50101            pub fn payment_total<T>(mut self, value: T) -> Self
50102            where
50103                T: ::std::convert::TryInto<::std::string::String>,
50104                T::Error: ::std::fmt::Display,
50105            {
50106                self.payment_total = value.try_into().map_err(|e| {
50107                    format!("error converting supplied value for payment_total: {}", e)
50108                });
50109                self
50110            }
50111            pub fn purchase_amount<T>(mut self, value: T) -> Self
50112            where
50113                T: ::std::convert::TryInto<::std::string::String>,
50114                T::Error: ::std::fmt::Display,
50115            {
50116                self.purchase_amount = value.try_into().map_err(|e| {
50117                    format!("error converting supplied value for purchase_amount: {}", e)
50118                });
50119                self
50120            }
50121            pub fn purchase_currency<T>(mut self, value: T) -> Self
50122            where
50123                T: ::std::convert::TryInto<::std::string::String>,
50124                T::Error: ::std::fmt::Display,
50125            {
50126                self.purchase_currency = value.try_into().map_err(|e| {
50127                    format!(
50128                        "error converting supplied value for purchase_currency: {}",
50129                        e
50130                    )
50131                });
50132                self
50133            }
50134        }
50135        impl ::std::convert::TryFrom<OnrampQuote> for super::OnrampQuote {
50136            type Error = super::error::ConversionError;
50137            fn try_from(
50138                value: OnrampQuote,
50139            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50140                Ok(Self {
50141                    destination_network: value.destination_network?,
50142                    exchange_rate: value.exchange_rate?,
50143                    fees: value.fees?,
50144                    payment_currency: value.payment_currency?,
50145                    payment_subtotal: value.payment_subtotal?,
50146                    payment_total: value.payment_total?,
50147                    purchase_amount: value.purchase_amount?,
50148                    purchase_currency: value.purchase_currency?,
50149                })
50150            }
50151        }
50152        impl ::std::convert::From<super::OnrampQuote> for OnrampQuote {
50153            fn from(value: super::OnrampQuote) -> Self {
50154                Self {
50155                    destination_network: Ok(value.destination_network),
50156                    exchange_rate: Ok(value.exchange_rate),
50157                    fees: Ok(value.fees),
50158                    payment_currency: Ok(value.payment_currency),
50159                    payment_subtotal: Ok(value.payment_subtotal),
50160                    payment_total: Ok(value.payment_total),
50161                    purchase_amount: Ok(value.purchase_amount),
50162                    purchase_currency: Ok(value.purchase_currency),
50163                }
50164            }
50165        }
50166        #[derive(Clone, Debug)]
50167        pub struct OnrampSession {
50168            onramp_url: ::std::result::Result<super::Url, ::std::string::String>,
50169        }
50170        impl ::std::default::Default for OnrampSession {
50171            fn default() -> Self {
50172                Self {
50173                    onramp_url: Err("no value supplied for onramp_url".to_string()),
50174                }
50175            }
50176        }
50177        impl OnrampSession {
50178            pub fn onramp_url<T>(mut self, value: T) -> Self
50179            where
50180                T: ::std::convert::TryInto<super::Url>,
50181                T::Error: ::std::fmt::Display,
50182            {
50183                self.onramp_url = value
50184                    .try_into()
50185                    .map_err(|e| format!("error converting supplied value for onramp_url: {}", e));
50186                self
50187            }
50188        }
50189        impl ::std::convert::TryFrom<OnrampSession> for super::OnrampSession {
50190            type Error = super::error::ConversionError;
50191            fn try_from(
50192                value: OnrampSession,
50193            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50194                Ok(Self {
50195                    onramp_url: value.onramp_url?,
50196                })
50197            }
50198        }
50199        impl ::std::convert::From<super::OnrampSession> for OnrampSession {
50200            fn from(value: super::OnrampSession) -> Self {
50201                Self {
50202                    onramp_url: Ok(value.onramp_url),
50203                }
50204            }
50205        }
50206        #[derive(Clone, Debug)]
50207        pub struct Policy {
50208            created_at: ::std::result::Result<::std::string::String, ::std::string::String>,
50209            description: ::std::result::Result<
50210                ::std::option::Option<super::PolicyDescription>,
50211                ::std::string::String,
50212            >,
50213            id: ::std::result::Result<super::PolicyId, ::std::string::String>,
50214            rules: ::std::result::Result<::std::vec::Vec<super::Rule>, ::std::string::String>,
50215            scope: ::std::result::Result<super::PolicyScope, ::std::string::String>,
50216            updated_at: ::std::result::Result<::std::string::String, ::std::string::String>,
50217        }
50218        impl ::std::default::Default for Policy {
50219            fn default() -> Self {
50220                Self {
50221                    created_at: Err("no value supplied for created_at".to_string()),
50222                    description: Ok(Default::default()),
50223                    id: Err("no value supplied for id".to_string()),
50224                    rules: Err("no value supplied for rules".to_string()),
50225                    scope: Err("no value supplied for scope".to_string()),
50226                    updated_at: Err("no value supplied for updated_at".to_string()),
50227                }
50228            }
50229        }
50230        impl Policy {
50231            pub fn created_at<T>(mut self, value: T) -> Self
50232            where
50233                T: ::std::convert::TryInto<::std::string::String>,
50234                T::Error: ::std::fmt::Display,
50235            {
50236                self.created_at = value
50237                    .try_into()
50238                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
50239                self
50240            }
50241            pub fn description<T>(mut self, value: T) -> Self
50242            where
50243                T: ::std::convert::TryInto<::std::option::Option<super::PolicyDescription>>,
50244                T::Error: ::std::fmt::Display,
50245            {
50246                self.description = value
50247                    .try_into()
50248                    .map_err(|e| format!("error converting supplied value for description: {}", e));
50249                self
50250            }
50251            pub fn id<T>(mut self, value: T) -> Self
50252            where
50253                T: ::std::convert::TryInto<super::PolicyId>,
50254                T::Error: ::std::fmt::Display,
50255            {
50256                self.id = value
50257                    .try_into()
50258                    .map_err(|e| format!("error converting supplied value for id: {}", e));
50259                self
50260            }
50261            pub fn rules<T>(mut self, value: T) -> Self
50262            where
50263                T: ::std::convert::TryInto<::std::vec::Vec<super::Rule>>,
50264                T::Error: ::std::fmt::Display,
50265            {
50266                self.rules = value
50267                    .try_into()
50268                    .map_err(|e| format!("error converting supplied value for rules: {}", e));
50269                self
50270            }
50271            pub fn scope<T>(mut self, value: T) -> Self
50272            where
50273                T: ::std::convert::TryInto<super::PolicyScope>,
50274                T::Error: ::std::fmt::Display,
50275            {
50276                self.scope = value
50277                    .try_into()
50278                    .map_err(|e| format!("error converting supplied value for scope: {}", e));
50279                self
50280            }
50281            pub fn updated_at<T>(mut self, value: T) -> Self
50282            where
50283                T: ::std::convert::TryInto<::std::string::String>,
50284                T::Error: ::std::fmt::Display,
50285            {
50286                self.updated_at = value
50287                    .try_into()
50288                    .map_err(|e| format!("error converting supplied value for updated_at: {}", e));
50289                self
50290            }
50291        }
50292        impl ::std::convert::TryFrom<Policy> for super::Policy {
50293            type Error = super::error::ConversionError;
50294            fn try_from(
50295                value: Policy,
50296            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50297                Ok(Self {
50298                    created_at: value.created_at?,
50299                    description: value.description?,
50300                    id: value.id?,
50301                    rules: value.rules?,
50302                    scope: value.scope?,
50303                    updated_at: value.updated_at?,
50304                })
50305            }
50306        }
50307        impl ::std::convert::From<super::Policy> for Policy {
50308            fn from(value: super::Policy) -> Self {
50309                Self {
50310                    created_at: Ok(value.created_at),
50311                    description: Ok(value.description),
50312                    id: Ok(value.id),
50313                    rules: Ok(value.rules),
50314                    scope: Ok(value.scope),
50315                    updated_at: Ok(value.updated_at),
50316                }
50317            }
50318        }
50319        #[derive(Clone, Debug)]
50320        pub struct PrepareAndSendUserOperationBody {
50321            calls: ::std::result::Result<::std::vec::Vec<super::EvmCall>, ::std::string::String>,
50322            network: ::std::result::Result<super::EvmUserOperationNetwork, ::std::string::String>,
50323            paymaster_url:
50324                ::std::result::Result<::std::option::Option<super::Url>, ::std::string::String>,
50325        }
50326        impl ::std::default::Default for PrepareAndSendUserOperationBody {
50327            fn default() -> Self {
50328                Self {
50329                    calls: Err("no value supplied for calls".to_string()),
50330                    network: Err("no value supplied for network".to_string()),
50331                    paymaster_url: Ok(Default::default()),
50332                }
50333            }
50334        }
50335        impl PrepareAndSendUserOperationBody {
50336            pub fn calls<T>(mut self, value: T) -> Self
50337            where
50338                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmCall>>,
50339                T::Error: ::std::fmt::Display,
50340            {
50341                self.calls = value
50342                    .try_into()
50343                    .map_err(|e| format!("error converting supplied value for calls: {}", e));
50344                self
50345            }
50346            pub fn network<T>(mut self, value: T) -> Self
50347            where
50348                T: ::std::convert::TryInto<super::EvmUserOperationNetwork>,
50349                T::Error: ::std::fmt::Display,
50350            {
50351                self.network = value
50352                    .try_into()
50353                    .map_err(|e| format!("error converting supplied value for network: {}", e));
50354                self
50355            }
50356            pub fn paymaster_url<T>(mut self, value: T) -> Self
50357            where
50358                T: ::std::convert::TryInto<::std::option::Option<super::Url>>,
50359                T::Error: ::std::fmt::Display,
50360            {
50361                self.paymaster_url = value.try_into().map_err(|e| {
50362                    format!("error converting supplied value for paymaster_url: {}", e)
50363                });
50364                self
50365            }
50366        }
50367        impl ::std::convert::TryFrom<PrepareAndSendUserOperationBody>
50368            for super::PrepareAndSendUserOperationBody
50369        {
50370            type Error = super::error::ConversionError;
50371            fn try_from(
50372                value: PrepareAndSendUserOperationBody,
50373            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50374                Ok(Self {
50375                    calls: value.calls?,
50376                    network: value.network?,
50377                    paymaster_url: value.paymaster_url?,
50378                })
50379            }
50380        }
50381        impl ::std::convert::From<super::PrepareAndSendUserOperationBody>
50382            for PrepareAndSendUserOperationBody
50383        {
50384            fn from(value: super::PrepareAndSendUserOperationBody) -> Self {
50385                Self {
50386                    calls: Ok(value.calls),
50387                    network: Ok(value.network),
50388                    paymaster_url: Ok(value.paymaster_url),
50389                }
50390            }
50391        }
50392        #[derive(Clone, Debug)]
50393        pub struct PrepareUserOperationBody {
50394            calls: ::std::result::Result<::std::vec::Vec<super::EvmCall>, ::std::string::String>,
50395            data_suffix: ::std::result::Result<
50396                ::std::option::Option<super::PrepareUserOperationBodyDataSuffix>,
50397                ::std::string::String,
50398            >,
50399            network: ::std::result::Result<super::EvmUserOperationNetwork, ::std::string::String>,
50400            paymaster_url:
50401                ::std::result::Result<::std::option::Option<super::Url>, ::std::string::String>,
50402        }
50403        impl ::std::default::Default for PrepareUserOperationBody {
50404            fn default() -> Self {
50405                Self {
50406                    calls: Err("no value supplied for calls".to_string()),
50407                    data_suffix: Ok(Default::default()),
50408                    network: Err("no value supplied for network".to_string()),
50409                    paymaster_url: Ok(Default::default()),
50410                }
50411            }
50412        }
50413        impl PrepareUserOperationBody {
50414            pub fn calls<T>(mut self, value: T) -> Self
50415            where
50416                T: ::std::convert::TryInto<::std::vec::Vec<super::EvmCall>>,
50417                T::Error: ::std::fmt::Display,
50418            {
50419                self.calls = value
50420                    .try_into()
50421                    .map_err(|e| format!("error converting supplied value for calls: {}", e));
50422                self
50423            }
50424            pub fn data_suffix<T>(mut self, value: T) -> Self
50425            where
50426                T: ::std::convert::TryInto<
50427                    ::std::option::Option<super::PrepareUserOperationBodyDataSuffix>,
50428                >,
50429                T::Error: ::std::fmt::Display,
50430            {
50431                self.data_suffix = value
50432                    .try_into()
50433                    .map_err(|e| format!("error converting supplied value for data_suffix: {}", e));
50434                self
50435            }
50436            pub fn network<T>(mut self, value: T) -> Self
50437            where
50438                T: ::std::convert::TryInto<super::EvmUserOperationNetwork>,
50439                T::Error: ::std::fmt::Display,
50440            {
50441                self.network = value
50442                    .try_into()
50443                    .map_err(|e| format!("error converting supplied value for network: {}", e));
50444                self
50445            }
50446            pub fn paymaster_url<T>(mut self, value: T) -> Self
50447            where
50448                T: ::std::convert::TryInto<::std::option::Option<super::Url>>,
50449                T::Error: ::std::fmt::Display,
50450            {
50451                self.paymaster_url = value.try_into().map_err(|e| {
50452                    format!("error converting supplied value for paymaster_url: {}", e)
50453                });
50454                self
50455            }
50456        }
50457        impl ::std::convert::TryFrom<PrepareUserOperationBody> for super::PrepareUserOperationBody {
50458            type Error = super::error::ConversionError;
50459            fn try_from(
50460                value: PrepareUserOperationBody,
50461            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50462                Ok(Self {
50463                    calls: value.calls?,
50464                    data_suffix: value.data_suffix?,
50465                    network: value.network?,
50466                    paymaster_url: value.paymaster_url?,
50467                })
50468            }
50469        }
50470        impl ::std::convert::From<super::PrepareUserOperationBody> for PrepareUserOperationBody {
50471            fn from(value: super::PrepareUserOperationBody) -> Self {
50472                Self {
50473                    calls: Ok(value.calls),
50474                    data_suffix: Ok(value.data_suffix),
50475                    network: Ok(value.network),
50476                    paymaster_url: Ok(value.paymaster_url),
50477                }
50478            }
50479        }
50480        #[derive(Clone, Debug)]
50481        pub struct PrepareUserOperationRule {
50482            action:
50483                ::std::result::Result<super::PrepareUserOperationRuleAction, ::std::string::String>,
50484            criteria:
50485                ::std::result::Result<super::PrepareUserOperationCriteria, ::std::string::String>,
50486            operation: ::std::result::Result<
50487                super::PrepareUserOperationRuleOperation,
50488                ::std::string::String,
50489            >,
50490        }
50491        impl ::std::default::Default for PrepareUserOperationRule {
50492            fn default() -> Self {
50493                Self {
50494                    action: Err("no value supplied for action".to_string()),
50495                    criteria: Err("no value supplied for criteria".to_string()),
50496                    operation: Err("no value supplied for operation".to_string()),
50497                }
50498            }
50499        }
50500        impl PrepareUserOperationRule {
50501            pub fn action<T>(mut self, value: T) -> Self
50502            where
50503                T: ::std::convert::TryInto<super::PrepareUserOperationRuleAction>,
50504                T::Error: ::std::fmt::Display,
50505            {
50506                self.action = value
50507                    .try_into()
50508                    .map_err(|e| format!("error converting supplied value for action: {}", e));
50509                self
50510            }
50511            pub fn criteria<T>(mut self, value: T) -> Self
50512            where
50513                T: ::std::convert::TryInto<super::PrepareUserOperationCriteria>,
50514                T::Error: ::std::fmt::Display,
50515            {
50516                self.criteria = value
50517                    .try_into()
50518                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
50519                self
50520            }
50521            pub fn operation<T>(mut self, value: T) -> Self
50522            where
50523                T: ::std::convert::TryInto<super::PrepareUserOperationRuleOperation>,
50524                T::Error: ::std::fmt::Display,
50525            {
50526                self.operation = value
50527                    .try_into()
50528                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
50529                self
50530            }
50531        }
50532        impl ::std::convert::TryFrom<PrepareUserOperationRule> for super::PrepareUserOperationRule {
50533            type Error = super::error::ConversionError;
50534            fn try_from(
50535                value: PrepareUserOperationRule,
50536            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50537                Ok(Self {
50538                    action: value.action?,
50539                    criteria: value.criteria?,
50540                    operation: value.operation?,
50541                })
50542            }
50543        }
50544        impl ::std::convert::From<super::PrepareUserOperationRule> for PrepareUserOperationRule {
50545            fn from(value: super::PrepareUserOperationRule) -> Self {
50546                Self {
50547                    action: Ok(value.action),
50548                    criteria: Ok(value.criteria),
50549                    operation: Ok(value.operation),
50550                }
50551            }
50552        }
50553        #[derive(Clone, Debug)]
50554        pub struct ProgramIdCriterion {
50555            operator:
50556                ::std::result::Result<super::ProgramIdCriterionOperator, ::std::string::String>,
50557            program_ids: ::std::result::Result<
50558                ::std::vec::Vec<super::ProgramIdCriterionProgramIdsItem>,
50559                ::std::string::String,
50560            >,
50561            type_: ::std::result::Result<super::ProgramIdCriterionType, ::std::string::String>,
50562        }
50563        impl ::std::default::Default for ProgramIdCriterion {
50564            fn default() -> Self {
50565                Self {
50566                    operator: Err("no value supplied for operator".to_string()),
50567                    program_ids: Err("no value supplied for program_ids".to_string()),
50568                    type_: Err("no value supplied for type_".to_string()),
50569                }
50570            }
50571        }
50572        impl ProgramIdCriterion {
50573            pub fn operator<T>(mut self, value: T) -> Self
50574            where
50575                T: ::std::convert::TryInto<super::ProgramIdCriterionOperator>,
50576                T::Error: ::std::fmt::Display,
50577            {
50578                self.operator = value
50579                    .try_into()
50580                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
50581                self
50582            }
50583            pub fn program_ids<T>(mut self, value: T) -> Self
50584            where
50585                T: ::std::convert::TryInto<
50586                    ::std::vec::Vec<super::ProgramIdCriterionProgramIdsItem>,
50587                >,
50588                T::Error: ::std::fmt::Display,
50589            {
50590                self.program_ids = value
50591                    .try_into()
50592                    .map_err(|e| format!("error converting supplied value for program_ids: {}", e));
50593                self
50594            }
50595            pub fn type_<T>(mut self, value: T) -> Self
50596            where
50597                T: ::std::convert::TryInto<super::ProgramIdCriterionType>,
50598                T::Error: ::std::fmt::Display,
50599            {
50600                self.type_ = value
50601                    .try_into()
50602                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
50603                self
50604            }
50605        }
50606        impl ::std::convert::TryFrom<ProgramIdCriterion> for super::ProgramIdCriterion {
50607            type Error = super::error::ConversionError;
50608            fn try_from(
50609                value: ProgramIdCriterion,
50610            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50611                Ok(Self {
50612                    operator: value.operator?,
50613                    program_ids: value.program_ids?,
50614                    type_: value.type_?,
50615                })
50616            }
50617        }
50618        impl ::std::convert::From<super::ProgramIdCriterion> for ProgramIdCriterion {
50619            fn from(value: super::ProgramIdCriterion) -> Self {
50620                Self {
50621                    operator: Ok(value.operator),
50622                    program_ids: Ok(value.program_ids),
50623                    type_: Ok(value.type_),
50624                }
50625            }
50626        }
50627        #[derive(Clone, Debug)]
50628        pub struct QueryResultCacheConfiguration {
50629            max_age_ms: ::std::result::Result<i64, ::std::string::String>,
50630        }
50631        impl ::std::default::Default for QueryResultCacheConfiguration {
50632            fn default() -> Self {
50633                Self {
50634                    max_age_ms: Ok(super::defaults::default_u64::<i64, 500>()),
50635                }
50636            }
50637        }
50638        impl QueryResultCacheConfiguration {
50639            pub fn max_age_ms<T>(mut self, value: T) -> Self
50640            where
50641                T: ::std::convert::TryInto<i64>,
50642                T::Error: ::std::fmt::Display,
50643            {
50644                self.max_age_ms = value
50645                    .try_into()
50646                    .map_err(|e| format!("error converting supplied value for max_age_ms: {}", e));
50647                self
50648            }
50649        }
50650        impl ::std::convert::TryFrom<QueryResultCacheConfiguration>
50651            for super::QueryResultCacheConfiguration
50652        {
50653            type Error = super::error::ConversionError;
50654            fn try_from(
50655                value: QueryResultCacheConfiguration,
50656            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50657                Ok(Self {
50658                    max_age_ms: value.max_age_ms?,
50659                })
50660            }
50661        }
50662        impl ::std::convert::From<super::QueryResultCacheConfiguration> for QueryResultCacheConfiguration {
50663            fn from(value: super::QueryResultCacheConfiguration) -> Self {
50664                Self {
50665                    max_age_ms: Ok(value.max_age_ms),
50666                }
50667            }
50668        }
50669        #[derive(Clone, Debug)]
50670        pub struct RequestEvmFaucetBody {
50671            address:
50672                ::std::result::Result<super::RequestEvmFaucetBodyAddress, ::std::string::String>,
50673            network:
50674                ::std::result::Result<super::RequestEvmFaucetBodyNetwork, ::std::string::String>,
50675            token: ::std::result::Result<super::RequestEvmFaucetBodyToken, ::std::string::String>,
50676        }
50677        impl ::std::default::Default for RequestEvmFaucetBody {
50678            fn default() -> Self {
50679                Self {
50680                    address: Err("no value supplied for address".to_string()),
50681                    network: Err("no value supplied for network".to_string()),
50682                    token: Err("no value supplied for token".to_string()),
50683                }
50684            }
50685        }
50686        impl RequestEvmFaucetBody {
50687            pub fn address<T>(mut self, value: T) -> Self
50688            where
50689                T: ::std::convert::TryInto<super::RequestEvmFaucetBodyAddress>,
50690                T::Error: ::std::fmt::Display,
50691            {
50692                self.address = value
50693                    .try_into()
50694                    .map_err(|e| format!("error converting supplied value for address: {}", e));
50695                self
50696            }
50697            pub fn network<T>(mut self, value: T) -> Self
50698            where
50699                T: ::std::convert::TryInto<super::RequestEvmFaucetBodyNetwork>,
50700                T::Error: ::std::fmt::Display,
50701            {
50702                self.network = value
50703                    .try_into()
50704                    .map_err(|e| format!("error converting supplied value for network: {}", e));
50705                self
50706            }
50707            pub fn token<T>(mut self, value: T) -> Self
50708            where
50709                T: ::std::convert::TryInto<super::RequestEvmFaucetBodyToken>,
50710                T::Error: ::std::fmt::Display,
50711            {
50712                self.token = value
50713                    .try_into()
50714                    .map_err(|e| format!("error converting supplied value for token: {}", e));
50715                self
50716            }
50717        }
50718        impl ::std::convert::TryFrom<RequestEvmFaucetBody> for super::RequestEvmFaucetBody {
50719            type Error = super::error::ConversionError;
50720            fn try_from(
50721                value: RequestEvmFaucetBody,
50722            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50723                Ok(Self {
50724                    address: value.address?,
50725                    network: value.network?,
50726                    token: value.token?,
50727                })
50728            }
50729        }
50730        impl ::std::convert::From<super::RequestEvmFaucetBody> for RequestEvmFaucetBody {
50731            fn from(value: super::RequestEvmFaucetBody) -> Self {
50732                Self {
50733                    address: Ok(value.address),
50734                    network: Ok(value.network),
50735                    token: Ok(value.token),
50736                }
50737            }
50738        }
50739        #[derive(Clone, Debug)]
50740        pub struct RequestEvmFaucetResponse {
50741            transaction_hash: ::std::result::Result<::std::string::String, ::std::string::String>,
50742        }
50743        impl ::std::default::Default for RequestEvmFaucetResponse {
50744            fn default() -> Self {
50745                Self {
50746                    transaction_hash: Err("no value supplied for transaction_hash".to_string()),
50747                }
50748            }
50749        }
50750        impl RequestEvmFaucetResponse {
50751            pub fn transaction_hash<T>(mut self, value: T) -> Self
50752            where
50753                T: ::std::convert::TryInto<::std::string::String>,
50754                T::Error: ::std::fmt::Display,
50755            {
50756                self.transaction_hash = value.try_into().map_err(|e| {
50757                    format!(
50758                        "error converting supplied value for transaction_hash: {}",
50759                        e
50760                    )
50761                });
50762                self
50763            }
50764        }
50765        impl ::std::convert::TryFrom<RequestEvmFaucetResponse> for super::RequestEvmFaucetResponse {
50766            type Error = super::error::ConversionError;
50767            fn try_from(
50768                value: RequestEvmFaucetResponse,
50769            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50770                Ok(Self {
50771                    transaction_hash: value.transaction_hash?,
50772                })
50773            }
50774        }
50775        impl ::std::convert::From<super::RequestEvmFaucetResponse> for RequestEvmFaucetResponse {
50776            fn from(value: super::RequestEvmFaucetResponse) -> Self {
50777                Self {
50778                    transaction_hash: Ok(value.transaction_hash),
50779                }
50780            }
50781        }
50782        #[derive(Clone, Debug)]
50783        pub struct RequestSolanaFaucetBody {
50784            address:
50785                ::std::result::Result<super::RequestSolanaFaucetBodyAddress, ::std::string::String>,
50786            token:
50787                ::std::result::Result<super::RequestSolanaFaucetBodyToken, ::std::string::String>,
50788        }
50789        impl ::std::default::Default for RequestSolanaFaucetBody {
50790            fn default() -> Self {
50791                Self {
50792                    address: Err("no value supplied for address".to_string()),
50793                    token: Err("no value supplied for token".to_string()),
50794                }
50795            }
50796        }
50797        impl RequestSolanaFaucetBody {
50798            pub fn address<T>(mut self, value: T) -> Self
50799            where
50800                T: ::std::convert::TryInto<super::RequestSolanaFaucetBodyAddress>,
50801                T::Error: ::std::fmt::Display,
50802            {
50803                self.address = value
50804                    .try_into()
50805                    .map_err(|e| format!("error converting supplied value for address: {}", e));
50806                self
50807            }
50808            pub fn token<T>(mut self, value: T) -> Self
50809            where
50810                T: ::std::convert::TryInto<super::RequestSolanaFaucetBodyToken>,
50811                T::Error: ::std::fmt::Display,
50812            {
50813                self.token = value
50814                    .try_into()
50815                    .map_err(|e| format!("error converting supplied value for token: {}", e));
50816                self
50817            }
50818        }
50819        impl ::std::convert::TryFrom<RequestSolanaFaucetBody> for super::RequestSolanaFaucetBody {
50820            type Error = super::error::ConversionError;
50821            fn try_from(
50822                value: RequestSolanaFaucetBody,
50823            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50824                Ok(Self {
50825                    address: value.address?,
50826                    token: value.token?,
50827                })
50828            }
50829        }
50830        impl ::std::convert::From<super::RequestSolanaFaucetBody> for RequestSolanaFaucetBody {
50831            fn from(value: super::RequestSolanaFaucetBody) -> Self {
50832                Self {
50833                    address: Ok(value.address),
50834                    token: Ok(value.token),
50835                }
50836            }
50837        }
50838        #[derive(Clone, Debug)]
50839        pub struct RequestSolanaFaucetResponse {
50840            transaction_signature:
50841                ::std::result::Result<::std::string::String, ::std::string::String>,
50842        }
50843        impl ::std::default::Default for RequestSolanaFaucetResponse {
50844            fn default() -> Self {
50845                Self {
50846                    transaction_signature: Err(
50847                        "no value supplied for transaction_signature".to_string()
50848                    ),
50849                }
50850            }
50851        }
50852        impl RequestSolanaFaucetResponse {
50853            pub fn transaction_signature<T>(mut self, value: T) -> Self
50854            where
50855                T: ::std::convert::TryInto<::std::string::String>,
50856                T::Error: ::std::fmt::Display,
50857            {
50858                self.transaction_signature = value.try_into().map_err(|e| {
50859                    format!(
50860                        "error converting supplied value for transaction_signature: {}",
50861                        e
50862                    )
50863                });
50864                self
50865            }
50866        }
50867        impl ::std::convert::TryFrom<RequestSolanaFaucetResponse> for super::RequestSolanaFaucetResponse {
50868            type Error = super::error::ConversionError;
50869            fn try_from(
50870                value: RequestSolanaFaucetResponse,
50871            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50872                Ok(Self {
50873                    transaction_signature: value.transaction_signature?,
50874                })
50875            }
50876        }
50877        impl ::std::convert::From<super::RequestSolanaFaucetResponse> for RequestSolanaFaucetResponse {
50878            fn from(value: super::RequestSolanaFaucetResponse) -> Self {
50879                Self {
50880                    transaction_signature: Ok(value.transaction_signature),
50881                }
50882            }
50883        }
50884        #[derive(Clone, Debug)]
50885        pub struct RevokeSpendPermissionRequest {
50886            network: ::std::result::Result<super::SpendPermissionNetwork, ::std::string::String>,
50887            paymaster_url:
50888                ::std::result::Result<::std::option::Option<super::Url>, ::std::string::String>,
50889            permission_hash: ::std::result::Result<::std::string::String, ::std::string::String>,
50890        }
50891        impl ::std::default::Default for RevokeSpendPermissionRequest {
50892            fn default() -> Self {
50893                Self {
50894                    network: Err("no value supplied for network".to_string()),
50895                    paymaster_url: Ok(Default::default()),
50896                    permission_hash: Err("no value supplied for permission_hash".to_string()),
50897                }
50898            }
50899        }
50900        impl RevokeSpendPermissionRequest {
50901            pub fn network<T>(mut self, value: T) -> Self
50902            where
50903                T: ::std::convert::TryInto<super::SpendPermissionNetwork>,
50904                T::Error: ::std::fmt::Display,
50905            {
50906                self.network = value
50907                    .try_into()
50908                    .map_err(|e| format!("error converting supplied value for network: {}", e));
50909                self
50910            }
50911            pub fn paymaster_url<T>(mut self, value: T) -> Self
50912            where
50913                T: ::std::convert::TryInto<::std::option::Option<super::Url>>,
50914                T::Error: ::std::fmt::Display,
50915            {
50916                self.paymaster_url = value.try_into().map_err(|e| {
50917                    format!("error converting supplied value for paymaster_url: {}", e)
50918                });
50919                self
50920            }
50921            pub fn permission_hash<T>(mut self, value: T) -> Self
50922            where
50923                T: ::std::convert::TryInto<::std::string::String>,
50924                T::Error: ::std::fmt::Display,
50925            {
50926                self.permission_hash = value.try_into().map_err(|e| {
50927                    format!("error converting supplied value for permission_hash: {}", e)
50928                });
50929                self
50930            }
50931        }
50932        impl ::std::convert::TryFrom<RevokeSpendPermissionRequest> for super::RevokeSpendPermissionRequest {
50933            type Error = super::error::ConversionError;
50934            fn try_from(
50935                value: RevokeSpendPermissionRequest,
50936            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50937                Ok(Self {
50938                    network: value.network?,
50939                    paymaster_url: value.paymaster_url?,
50940                    permission_hash: value.permission_hash?,
50941                })
50942            }
50943        }
50944        impl ::std::convert::From<super::RevokeSpendPermissionRequest> for RevokeSpendPermissionRequest {
50945            fn from(value: super::RevokeSpendPermissionRequest) -> Self {
50946                Self {
50947                    network: Ok(value.network),
50948                    paymaster_url: Ok(value.paymaster_url),
50949                    permission_hash: Ok(value.permission_hash),
50950                }
50951            }
50952        }
50953        #[derive(Clone, Debug)]
50954        pub struct SendEvmTransactionBody {
50955            network:
50956                ::std::result::Result<super::SendEvmTransactionBodyNetwork, ::std::string::String>,
50957            transaction: ::std::result::Result<::std::string::String, ::std::string::String>,
50958        }
50959        impl ::std::default::Default for SendEvmTransactionBody {
50960            fn default() -> Self {
50961                Self {
50962                    network: Err("no value supplied for network".to_string()),
50963                    transaction: Err("no value supplied for transaction".to_string()),
50964                }
50965            }
50966        }
50967        impl SendEvmTransactionBody {
50968            pub fn network<T>(mut self, value: T) -> Self
50969            where
50970                T: ::std::convert::TryInto<super::SendEvmTransactionBodyNetwork>,
50971                T::Error: ::std::fmt::Display,
50972            {
50973                self.network = value
50974                    .try_into()
50975                    .map_err(|e| format!("error converting supplied value for network: {}", e));
50976                self
50977            }
50978            pub fn transaction<T>(mut self, value: T) -> Self
50979            where
50980                T: ::std::convert::TryInto<::std::string::String>,
50981                T::Error: ::std::fmt::Display,
50982            {
50983                self.transaction = value
50984                    .try_into()
50985                    .map_err(|e| format!("error converting supplied value for transaction: {}", e));
50986                self
50987            }
50988        }
50989        impl ::std::convert::TryFrom<SendEvmTransactionBody> for super::SendEvmTransactionBody {
50990            type Error = super::error::ConversionError;
50991            fn try_from(
50992                value: SendEvmTransactionBody,
50993            ) -> ::std::result::Result<Self, super::error::ConversionError> {
50994                Ok(Self {
50995                    network: value.network?,
50996                    transaction: value.transaction?,
50997                })
50998            }
50999        }
51000        impl ::std::convert::From<super::SendEvmTransactionBody> for SendEvmTransactionBody {
51001            fn from(value: super::SendEvmTransactionBody) -> Self {
51002                Self {
51003                    network: Ok(value.network),
51004                    transaction: Ok(value.transaction),
51005                }
51006            }
51007        }
51008        #[derive(Clone, Debug)]
51009        pub struct SendEvmTransactionResponse {
51010            transaction_hash: ::std::result::Result<::std::string::String, ::std::string::String>,
51011        }
51012        impl ::std::default::Default for SendEvmTransactionResponse {
51013            fn default() -> Self {
51014                Self {
51015                    transaction_hash: Err("no value supplied for transaction_hash".to_string()),
51016                }
51017            }
51018        }
51019        impl SendEvmTransactionResponse {
51020            pub fn transaction_hash<T>(mut self, value: T) -> Self
51021            where
51022                T: ::std::convert::TryInto<::std::string::String>,
51023                T::Error: ::std::fmt::Display,
51024            {
51025                self.transaction_hash = value.try_into().map_err(|e| {
51026                    format!(
51027                        "error converting supplied value for transaction_hash: {}",
51028                        e
51029                    )
51030                });
51031                self
51032            }
51033        }
51034        impl ::std::convert::TryFrom<SendEvmTransactionResponse> for super::SendEvmTransactionResponse {
51035            type Error = super::error::ConversionError;
51036            fn try_from(
51037                value: SendEvmTransactionResponse,
51038            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51039                Ok(Self {
51040                    transaction_hash: value.transaction_hash?,
51041                })
51042            }
51043        }
51044        impl ::std::convert::From<super::SendEvmTransactionResponse> for SendEvmTransactionResponse {
51045            fn from(value: super::SendEvmTransactionResponse) -> Self {
51046                Self {
51047                    transaction_hash: Ok(value.transaction_hash),
51048                }
51049            }
51050        }
51051        #[derive(Clone, Debug)]
51052        pub struct SendEvmTransactionRule {
51053            action:
51054                ::std::result::Result<super::SendEvmTransactionRuleAction, ::std::string::String>,
51055            criteria:
51056                ::std::result::Result<super::SendEvmTransactionCriteria, ::std::string::String>,
51057            operation: ::std::result::Result<
51058                super::SendEvmTransactionRuleOperation,
51059                ::std::string::String,
51060            >,
51061        }
51062        impl ::std::default::Default for SendEvmTransactionRule {
51063            fn default() -> Self {
51064                Self {
51065                    action: Err("no value supplied for action".to_string()),
51066                    criteria: Err("no value supplied for criteria".to_string()),
51067                    operation: Err("no value supplied for operation".to_string()),
51068                }
51069            }
51070        }
51071        impl SendEvmTransactionRule {
51072            pub fn action<T>(mut self, value: T) -> Self
51073            where
51074                T: ::std::convert::TryInto<super::SendEvmTransactionRuleAction>,
51075                T::Error: ::std::fmt::Display,
51076            {
51077                self.action = value
51078                    .try_into()
51079                    .map_err(|e| format!("error converting supplied value for action: {}", e));
51080                self
51081            }
51082            pub fn criteria<T>(mut self, value: T) -> Self
51083            where
51084                T: ::std::convert::TryInto<super::SendEvmTransactionCriteria>,
51085                T::Error: ::std::fmt::Display,
51086            {
51087                self.criteria = value
51088                    .try_into()
51089                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
51090                self
51091            }
51092            pub fn operation<T>(mut self, value: T) -> Self
51093            where
51094                T: ::std::convert::TryInto<super::SendEvmTransactionRuleOperation>,
51095                T::Error: ::std::fmt::Display,
51096            {
51097                self.operation = value
51098                    .try_into()
51099                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
51100                self
51101            }
51102        }
51103        impl ::std::convert::TryFrom<SendEvmTransactionRule> for super::SendEvmTransactionRule {
51104            type Error = super::error::ConversionError;
51105            fn try_from(
51106                value: SendEvmTransactionRule,
51107            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51108                Ok(Self {
51109                    action: value.action?,
51110                    criteria: value.criteria?,
51111                    operation: value.operation?,
51112                })
51113            }
51114        }
51115        impl ::std::convert::From<super::SendEvmTransactionRule> for SendEvmTransactionRule {
51116            fn from(value: super::SendEvmTransactionRule) -> Self {
51117                Self {
51118                    action: Ok(value.action),
51119                    criteria: Ok(value.criteria),
51120                    operation: Ok(value.operation),
51121                }
51122            }
51123        }
51124        #[derive(Clone, Debug)]
51125        pub struct SendSolTransactionRule {
51126            action:
51127                ::std::result::Result<super::SendSolTransactionRuleAction, ::std::string::String>,
51128            criteria:
51129                ::std::result::Result<super::SendSolTransactionCriteria, ::std::string::String>,
51130            operation: ::std::result::Result<
51131                super::SendSolTransactionRuleOperation,
51132                ::std::string::String,
51133            >,
51134        }
51135        impl ::std::default::Default for SendSolTransactionRule {
51136            fn default() -> Self {
51137                Self {
51138                    action: Err("no value supplied for action".to_string()),
51139                    criteria: Err("no value supplied for criteria".to_string()),
51140                    operation: Err("no value supplied for operation".to_string()),
51141                }
51142            }
51143        }
51144        impl SendSolTransactionRule {
51145            pub fn action<T>(mut self, value: T) -> Self
51146            where
51147                T: ::std::convert::TryInto<super::SendSolTransactionRuleAction>,
51148                T::Error: ::std::fmt::Display,
51149            {
51150                self.action = value
51151                    .try_into()
51152                    .map_err(|e| format!("error converting supplied value for action: {}", e));
51153                self
51154            }
51155            pub fn criteria<T>(mut self, value: T) -> Self
51156            where
51157                T: ::std::convert::TryInto<super::SendSolTransactionCriteria>,
51158                T::Error: ::std::fmt::Display,
51159            {
51160                self.criteria = value
51161                    .try_into()
51162                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
51163                self
51164            }
51165            pub fn operation<T>(mut self, value: T) -> Self
51166            where
51167                T: ::std::convert::TryInto<super::SendSolTransactionRuleOperation>,
51168                T::Error: ::std::fmt::Display,
51169            {
51170                self.operation = value
51171                    .try_into()
51172                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
51173                self
51174            }
51175        }
51176        impl ::std::convert::TryFrom<SendSolTransactionRule> for super::SendSolTransactionRule {
51177            type Error = super::error::ConversionError;
51178            fn try_from(
51179                value: SendSolTransactionRule,
51180            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51181                Ok(Self {
51182                    action: value.action?,
51183                    criteria: value.criteria?,
51184                    operation: value.operation?,
51185                })
51186            }
51187        }
51188        impl ::std::convert::From<super::SendSolTransactionRule> for SendSolTransactionRule {
51189            fn from(value: super::SendSolTransactionRule) -> Self {
51190                Self {
51191                    action: Ok(value.action),
51192                    criteria: Ok(value.criteria),
51193                    operation: Ok(value.operation),
51194                }
51195            }
51196        }
51197        #[derive(Clone, Debug)]
51198        pub struct SendSolanaTransactionBody {
51199            network: ::std::result::Result<
51200                super::SendSolanaTransactionBodyNetwork,
51201                ::std::string::String,
51202            >,
51203            transaction: ::std::result::Result<::std::string::String, ::std::string::String>,
51204        }
51205        impl ::std::default::Default for SendSolanaTransactionBody {
51206            fn default() -> Self {
51207                Self {
51208                    network: Err("no value supplied for network".to_string()),
51209                    transaction: Err("no value supplied for transaction".to_string()),
51210                }
51211            }
51212        }
51213        impl SendSolanaTransactionBody {
51214            pub fn network<T>(mut self, value: T) -> Self
51215            where
51216                T: ::std::convert::TryInto<super::SendSolanaTransactionBodyNetwork>,
51217                T::Error: ::std::fmt::Display,
51218            {
51219                self.network = value
51220                    .try_into()
51221                    .map_err(|e| format!("error converting supplied value for network: {}", e));
51222                self
51223            }
51224            pub fn transaction<T>(mut self, value: T) -> Self
51225            where
51226                T: ::std::convert::TryInto<::std::string::String>,
51227                T::Error: ::std::fmt::Display,
51228            {
51229                self.transaction = value
51230                    .try_into()
51231                    .map_err(|e| format!("error converting supplied value for transaction: {}", e));
51232                self
51233            }
51234        }
51235        impl ::std::convert::TryFrom<SendSolanaTransactionBody> for super::SendSolanaTransactionBody {
51236            type Error = super::error::ConversionError;
51237            fn try_from(
51238                value: SendSolanaTransactionBody,
51239            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51240                Ok(Self {
51241                    network: value.network?,
51242                    transaction: value.transaction?,
51243                })
51244            }
51245        }
51246        impl ::std::convert::From<super::SendSolanaTransactionBody> for SendSolanaTransactionBody {
51247            fn from(value: super::SendSolanaTransactionBody) -> Self {
51248                Self {
51249                    network: Ok(value.network),
51250                    transaction: Ok(value.transaction),
51251                }
51252            }
51253        }
51254        #[derive(Clone, Debug)]
51255        pub struct SendSolanaTransactionResponse {
51256            transaction_signature:
51257                ::std::result::Result<::std::string::String, ::std::string::String>,
51258        }
51259        impl ::std::default::Default for SendSolanaTransactionResponse {
51260            fn default() -> Self {
51261                Self {
51262                    transaction_signature: Err(
51263                        "no value supplied for transaction_signature".to_string()
51264                    ),
51265                }
51266            }
51267        }
51268        impl SendSolanaTransactionResponse {
51269            pub fn transaction_signature<T>(mut self, value: T) -> Self
51270            where
51271                T: ::std::convert::TryInto<::std::string::String>,
51272                T::Error: ::std::fmt::Display,
51273            {
51274                self.transaction_signature = value.try_into().map_err(|e| {
51275                    format!(
51276                        "error converting supplied value for transaction_signature: {}",
51277                        e
51278                    )
51279                });
51280                self
51281            }
51282        }
51283        impl ::std::convert::TryFrom<SendSolanaTransactionResponse>
51284            for super::SendSolanaTransactionResponse
51285        {
51286            type Error = super::error::ConversionError;
51287            fn try_from(
51288                value: SendSolanaTransactionResponse,
51289            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51290                Ok(Self {
51291                    transaction_signature: value.transaction_signature?,
51292                })
51293            }
51294        }
51295        impl ::std::convert::From<super::SendSolanaTransactionResponse> for SendSolanaTransactionResponse {
51296            fn from(value: super::SendSolanaTransactionResponse) -> Self {
51297                Self {
51298                    transaction_signature: Ok(value.transaction_signature),
51299                }
51300            }
51301        }
51302        #[derive(Clone, Debug)]
51303        pub struct SendUserOperationBody {
51304            signature: ::std::result::Result<::std::string::String, ::std::string::String>,
51305        }
51306        impl ::std::default::Default for SendUserOperationBody {
51307            fn default() -> Self {
51308                Self {
51309                    signature: Err("no value supplied for signature".to_string()),
51310                }
51311            }
51312        }
51313        impl SendUserOperationBody {
51314            pub fn signature<T>(mut self, value: T) -> Self
51315            where
51316                T: ::std::convert::TryInto<::std::string::String>,
51317                T::Error: ::std::fmt::Display,
51318            {
51319                self.signature = value
51320                    .try_into()
51321                    .map_err(|e| format!("error converting supplied value for signature: {}", e));
51322                self
51323            }
51324        }
51325        impl ::std::convert::TryFrom<SendUserOperationBody> for super::SendUserOperationBody {
51326            type Error = super::error::ConversionError;
51327            fn try_from(
51328                value: SendUserOperationBody,
51329            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51330                Ok(Self {
51331                    signature: value.signature?,
51332                })
51333            }
51334        }
51335        impl ::std::convert::From<super::SendUserOperationBody> for SendUserOperationBody {
51336            fn from(value: super::SendUserOperationBody) -> Self {
51337                Self {
51338                    signature: Ok(value.signature),
51339                }
51340            }
51341        }
51342        #[derive(Clone, Debug)]
51343        pub struct SendUserOperationRule {
51344            action:
51345                ::std::result::Result<super::SendUserOperationRuleAction, ::std::string::String>,
51346            criteria:
51347                ::std::result::Result<super::SendUserOperationCriteria, ::std::string::String>,
51348            operation:
51349                ::std::result::Result<super::SendUserOperationRuleOperation, ::std::string::String>,
51350        }
51351        impl ::std::default::Default for SendUserOperationRule {
51352            fn default() -> Self {
51353                Self {
51354                    action: Err("no value supplied for action".to_string()),
51355                    criteria: Err("no value supplied for criteria".to_string()),
51356                    operation: Err("no value supplied for operation".to_string()),
51357                }
51358            }
51359        }
51360        impl SendUserOperationRule {
51361            pub fn action<T>(mut self, value: T) -> Self
51362            where
51363                T: ::std::convert::TryInto<super::SendUserOperationRuleAction>,
51364                T::Error: ::std::fmt::Display,
51365            {
51366                self.action = value
51367                    .try_into()
51368                    .map_err(|e| format!("error converting supplied value for action: {}", e));
51369                self
51370            }
51371            pub fn criteria<T>(mut self, value: T) -> Self
51372            where
51373                T: ::std::convert::TryInto<super::SendUserOperationCriteria>,
51374                T::Error: ::std::fmt::Display,
51375            {
51376                self.criteria = value
51377                    .try_into()
51378                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
51379                self
51380            }
51381            pub fn operation<T>(mut self, value: T) -> Self
51382            where
51383                T: ::std::convert::TryInto<super::SendUserOperationRuleOperation>,
51384                T::Error: ::std::fmt::Display,
51385            {
51386                self.operation = value
51387                    .try_into()
51388                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
51389                self
51390            }
51391        }
51392        impl ::std::convert::TryFrom<SendUserOperationRule> for super::SendUserOperationRule {
51393            type Error = super::error::ConversionError;
51394            fn try_from(
51395                value: SendUserOperationRule,
51396            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51397                Ok(Self {
51398                    action: value.action?,
51399                    criteria: value.criteria?,
51400                    operation: value.operation?,
51401                })
51402            }
51403        }
51404        impl ::std::convert::From<super::SendUserOperationRule> for SendUserOperationRule {
51405            fn from(value: super::SendUserOperationRule) -> Self {
51406                Self {
51407                    action: Ok(value.action),
51408                    criteria: Ok(value.criteria),
51409                    operation: Ok(value.operation),
51410                }
51411            }
51412        }
51413        #[derive(Clone, Debug)]
51414        pub struct SettleX402PaymentBody {
51415            payment_payload:
51416                ::std::result::Result<super::X402PaymentPayload, ::std::string::String>,
51417            payment_requirements:
51418                ::std::result::Result<super::X402PaymentRequirements, ::std::string::String>,
51419            x402_version: ::std::result::Result<super::X402Version, ::std::string::String>,
51420        }
51421        impl ::std::default::Default for SettleX402PaymentBody {
51422            fn default() -> Self {
51423                Self {
51424                    payment_payload: Err("no value supplied for payment_payload".to_string()),
51425                    payment_requirements: Err(
51426                        "no value supplied for payment_requirements".to_string()
51427                    ),
51428                    x402_version: Err("no value supplied for x402_version".to_string()),
51429                }
51430            }
51431        }
51432        impl SettleX402PaymentBody {
51433            pub fn payment_payload<T>(mut self, value: T) -> Self
51434            where
51435                T: ::std::convert::TryInto<super::X402PaymentPayload>,
51436                T::Error: ::std::fmt::Display,
51437            {
51438                self.payment_payload = value.try_into().map_err(|e| {
51439                    format!("error converting supplied value for payment_payload: {}", e)
51440                });
51441                self
51442            }
51443            pub fn payment_requirements<T>(mut self, value: T) -> Self
51444            where
51445                T: ::std::convert::TryInto<super::X402PaymentRequirements>,
51446                T::Error: ::std::fmt::Display,
51447            {
51448                self.payment_requirements = value.try_into().map_err(|e| {
51449                    format!(
51450                        "error converting supplied value for payment_requirements: {}",
51451                        e
51452                    )
51453                });
51454                self
51455            }
51456            pub fn x402_version<T>(mut self, value: T) -> Self
51457            where
51458                T: ::std::convert::TryInto<super::X402Version>,
51459                T::Error: ::std::fmt::Display,
51460            {
51461                self.x402_version = value.try_into().map_err(|e| {
51462                    format!("error converting supplied value for x402_version: {}", e)
51463                });
51464                self
51465            }
51466        }
51467        impl ::std::convert::TryFrom<SettleX402PaymentBody> for super::SettleX402PaymentBody {
51468            type Error = super::error::ConversionError;
51469            fn try_from(
51470                value: SettleX402PaymentBody,
51471            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51472                Ok(Self {
51473                    payment_payload: value.payment_payload?,
51474                    payment_requirements: value.payment_requirements?,
51475                    x402_version: value.x402_version?,
51476                })
51477            }
51478        }
51479        impl ::std::convert::From<super::SettleX402PaymentBody> for SettleX402PaymentBody {
51480            fn from(value: super::SettleX402PaymentBody) -> Self {
51481                Self {
51482                    payment_payload: Ok(value.payment_payload),
51483                    payment_requirements: Ok(value.payment_requirements),
51484                    x402_version: Ok(value.x402_version),
51485                }
51486            }
51487        }
51488        #[derive(Clone, Debug)]
51489        pub struct SettleX402PaymentResponse {
51490            error_reason: ::std::result::Result<
51491                ::std::option::Option<super::X402SettleErrorReason>,
51492                ::std::string::String,
51493            >,
51494            network: ::std::result::Result<::std::string::String, ::std::string::String>,
51495            payer:
51496                ::std::result::Result<super::SettleX402PaymentResponsePayer, ::std::string::String>,
51497            success: ::std::result::Result<bool, ::std::string::String>,
51498            transaction: ::std::result::Result<
51499                super::SettleX402PaymentResponseTransaction,
51500                ::std::string::String,
51501            >,
51502        }
51503        impl ::std::default::Default for SettleX402PaymentResponse {
51504            fn default() -> Self {
51505                Self {
51506                    error_reason: Ok(Default::default()),
51507                    network: Err("no value supplied for network".to_string()),
51508                    payer: Err("no value supplied for payer".to_string()),
51509                    success: Err("no value supplied for success".to_string()),
51510                    transaction: Err("no value supplied for transaction".to_string()),
51511                }
51512            }
51513        }
51514        impl SettleX402PaymentResponse {
51515            pub fn error_reason<T>(mut self, value: T) -> Self
51516            where
51517                T: ::std::convert::TryInto<::std::option::Option<super::X402SettleErrorReason>>,
51518                T::Error: ::std::fmt::Display,
51519            {
51520                self.error_reason = value.try_into().map_err(|e| {
51521                    format!("error converting supplied value for error_reason: {}", e)
51522                });
51523                self
51524            }
51525            pub fn network<T>(mut self, value: T) -> Self
51526            where
51527                T: ::std::convert::TryInto<::std::string::String>,
51528                T::Error: ::std::fmt::Display,
51529            {
51530                self.network = value
51531                    .try_into()
51532                    .map_err(|e| format!("error converting supplied value for network: {}", e));
51533                self
51534            }
51535            pub fn payer<T>(mut self, value: T) -> Self
51536            where
51537                T: ::std::convert::TryInto<super::SettleX402PaymentResponsePayer>,
51538                T::Error: ::std::fmt::Display,
51539            {
51540                self.payer = value
51541                    .try_into()
51542                    .map_err(|e| format!("error converting supplied value for payer: {}", e));
51543                self
51544            }
51545            pub fn success<T>(mut self, value: T) -> Self
51546            where
51547                T: ::std::convert::TryInto<bool>,
51548                T::Error: ::std::fmt::Display,
51549            {
51550                self.success = value
51551                    .try_into()
51552                    .map_err(|e| format!("error converting supplied value for success: {}", e));
51553                self
51554            }
51555            pub fn transaction<T>(mut self, value: T) -> Self
51556            where
51557                T: ::std::convert::TryInto<super::SettleX402PaymentResponseTransaction>,
51558                T::Error: ::std::fmt::Display,
51559            {
51560                self.transaction = value
51561                    .try_into()
51562                    .map_err(|e| format!("error converting supplied value for transaction: {}", e));
51563                self
51564            }
51565        }
51566        impl ::std::convert::TryFrom<SettleX402PaymentResponse> for super::SettleX402PaymentResponse {
51567            type Error = super::error::ConversionError;
51568            fn try_from(
51569                value: SettleX402PaymentResponse,
51570            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51571                Ok(Self {
51572                    error_reason: value.error_reason?,
51573                    network: value.network?,
51574                    payer: value.payer?,
51575                    success: value.success?,
51576                    transaction: value.transaction?,
51577                })
51578            }
51579        }
51580        impl ::std::convert::From<super::SettleX402PaymentResponse> for SettleX402PaymentResponse {
51581            fn from(value: super::SettleX402PaymentResponse) -> Self {
51582                Self {
51583                    error_reason: Ok(value.error_reason),
51584                    network: Ok(value.network),
51585                    payer: Ok(value.payer),
51586                    success: Ok(value.success),
51587                    transaction: Ok(value.transaction),
51588                }
51589            }
51590        }
51591        #[derive(Clone, Debug)]
51592        pub struct SignEvmHashBody {
51593            hash: ::std::result::Result<::std::string::String, ::std::string::String>,
51594        }
51595        impl ::std::default::Default for SignEvmHashBody {
51596            fn default() -> Self {
51597                Self {
51598                    hash: Err("no value supplied for hash".to_string()),
51599                }
51600            }
51601        }
51602        impl SignEvmHashBody {
51603            pub fn hash<T>(mut self, value: T) -> Self
51604            where
51605                T: ::std::convert::TryInto<::std::string::String>,
51606                T::Error: ::std::fmt::Display,
51607            {
51608                self.hash = value
51609                    .try_into()
51610                    .map_err(|e| format!("error converting supplied value for hash: {}", e));
51611                self
51612            }
51613        }
51614        impl ::std::convert::TryFrom<SignEvmHashBody> for super::SignEvmHashBody {
51615            type Error = super::error::ConversionError;
51616            fn try_from(
51617                value: SignEvmHashBody,
51618            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51619                Ok(Self { hash: value.hash? })
51620            }
51621        }
51622        impl ::std::convert::From<super::SignEvmHashBody> for SignEvmHashBody {
51623            fn from(value: super::SignEvmHashBody) -> Self {
51624                Self {
51625                    hash: Ok(value.hash),
51626                }
51627            }
51628        }
51629        #[derive(Clone, Debug)]
51630        pub struct SignEvmHashResponse {
51631            signature: ::std::result::Result<::std::string::String, ::std::string::String>,
51632        }
51633        impl ::std::default::Default for SignEvmHashResponse {
51634            fn default() -> Self {
51635                Self {
51636                    signature: Err("no value supplied for signature".to_string()),
51637                }
51638            }
51639        }
51640        impl SignEvmHashResponse {
51641            pub fn signature<T>(mut self, value: T) -> Self
51642            where
51643                T: ::std::convert::TryInto<::std::string::String>,
51644                T::Error: ::std::fmt::Display,
51645            {
51646                self.signature = value
51647                    .try_into()
51648                    .map_err(|e| format!("error converting supplied value for signature: {}", e));
51649                self
51650            }
51651        }
51652        impl ::std::convert::TryFrom<SignEvmHashResponse> for super::SignEvmHashResponse {
51653            type Error = super::error::ConversionError;
51654            fn try_from(
51655                value: SignEvmHashResponse,
51656            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51657                Ok(Self {
51658                    signature: value.signature?,
51659                })
51660            }
51661        }
51662        impl ::std::convert::From<super::SignEvmHashResponse> for SignEvmHashResponse {
51663            fn from(value: super::SignEvmHashResponse) -> Self {
51664                Self {
51665                    signature: Ok(value.signature),
51666                }
51667            }
51668        }
51669        #[derive(Clone, Debug)]
51670        pub struct SignEvmHashRule {
51671            action: ::std::result::Result<super::SignEvmHashRuleAction, ::std::string::String>,
51672            operation:
51673                ::std::result::Result<super::SignEvmHashRuleOperation, ::std::string::String>,
51674        }
51675        impl ::std::default::Default for SignEvmHashRule {
51676            fn default() -> Self {
51677                Self {
51678                    action: Err("no value supplied for action".to_string()),
51679                    operation: Err("no value supplied for operation".to_string()),
51680                }
51681            }
51682        }
51683        impl SignEvmHashRule {
51684            pub fn action<T>(mut self, value: T) -> Self
51685            where
51686                T: ::std::convert::TryInto<super::SignEvmHashRuleAction>,
51687                T::Error: ::std::fmt::Display,
51688            {
51689                self.action = value
51690                    .try_into()
51691                    .map_err(|e| format!("error converting supplied value for action: {}", e));
51692                self
51693            }
51694            pub fn operation<T>(mut self, value: T) -> Self
51695            where
51696                T: ::std::convert::TryInto<super::SignEvmHashRuleOperation>,
51697                T::Error: ::std::fmt::Display,
51698            {
51699                self.operation = value
51700                    .try_into()
51701                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
51702                self
51703            }
51704        }
51705        impl ::std::convert::TryFrom<SignEvmHashRule> for super::SignEvmHashRule {
51706            type Error = super::error::ConversionError;
51707            fn try_from(
51708                value: SignEvmHashRule,
51709            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51710                Ok(Self {
51711                    action: value.action?,
51712                    operation: value.operation?,
51713                })
51714            }
51715        }
51716        impl ::std::convert::From<super::SignEvmHashRule> for SignEvmHashRule {
51717            fn from(value: super::SignEvmHashRule) -> Self {
51718                Self {
51719                    action: Ok(value.action),
51720                    operation: Ok(value.operation),
51721                }
51722            }
51723        }
51724        #[derive(Clone, Debug)]
51725        pub struct SignEvmMessageBody {
51726            message: ::std::result::Result<::std::string::String, ::std::string::String>,
51727        }
51728        impl ::std::default::Default for SignEvmMessageBody {
51729            fn default() -> Self {
51730                Self {
51731                    message: Err("no value supplied for message".to_string()),
51732                }
51733            }
51734        }
51735        impl SignEvmMessageBody {
51736            pub fn message<T>(mut self, value: T) -> Self
51737            where
51738                T: ::std::convert::TryInto<::std::string::String>,
51739                T::Error: ::std::fmt::Display,
51740            {
51741                self.message = value
51742                    .try_into()
51743                    .map_err(|e| format!("error converting supplied value for message: {}", e));
51744                self
51745            }
51746        }
51747        impl ::std::convert::TryFrom<SignEvmMessageBody> for super::SignEvmMessageBody {
51748            type Error = super::error::ConversionError;
51749            fn try_from(
51750                value: SignEvmMessageBody,
51751            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51752                Ok(Self {
51753                    message: value.message?,
51754                })
51755            }
51756        }
51757        impl ::std::convert::From<super::SignEvmMessageBody> for SignEvmMessageBody {
51758            fn from(value: super::SignEvmMessageBody) -> Self {
51759                Self {
51760                    message: Ok(value.message),
51761                }
51762            }
51763        }
51764        #[derive(Clone, Debug)]
51765        pub struct SignEvmMessageResponse {
51766            signature: ::std::result::Result<::std::string::String, ::std::string::String>,
51767        }
51768        impl ::std::default::Default for SignEvmMessageResponse {
51769            fn default() -> Self {
51770                Self {
51771                    signature: Err("no value supplied for signature".to_string()),
51772                }
51773            }
51774        }
51775        impl SignEvmMessageResponse {
51776            pub fn signature<T>(mut self, value: T) -> Self
51777            where
51778                T: ::std::convert::TryInto<::std::string::String>,
51779                T::Error: ::std::fmt::Display,
51780            {
51781                self.signature = value
51782                    .try_into()
51783                    .map_err(|e| format!("error converting supplied value for signature: {}", e));
51784                self
51785            }
51786        }
51787        impl ::std::convert::TryFrom<SignEvmMessageResponse> for super::SignEvmMessageResponse {
51788            type Error = super::error::ConversionError;
51789            fn try_from(
51790                value: SignEvmMessageResponse,
51791            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51792                Ok(Self {
51793                    signature: value.signature?,
51794                })
51795            }
51796        }
51797        impl ::std::convert::From<super::SignEvmMessageResponse> for SignEvmMessageResponse {
51798            fn from(value: super::SignEvmMessageResponse) -> Self {
51799                Self {
51800                    signature: Ok(value.signature),
51801                }
51802            }
51803        }
51804        #[derive(Clone, Debug)]
51805        pub struct SignEvmMessageRule {
51806            action: ::std::result::Result<super::SignEvmMessageRuleAction, ::std::string::String>,
51807            criteria: ::std::result::Result<super::SignEvmMessageCriteria, ::std::string::String>,
51808            operation:
51809                ::std::result::Result<super::SignEvmMessageRuleOperation, ::std::string::String>,
51810        }
51811        impl ::std::default::Default for SignEvmMessageRule {
51812            fn default() -> Self {
51813                Self {
51814                    action: Err("no value supplied for action".to_string()),
51815                    criteria: Err("no value supplied for criteria".to_string()),
51816                    operation: Err("no value supplied for operation".to_string()),
51817                }
51818            }
51819        }
51820        impl SignEvmMessageRule {
51821            pub fn action<T>(mut self, value: T) -> Self
51822            where
51823                T: ::std::convert::TryInto<super::SignEvmMessageRuleAction>,
51824                T::Error: ::std::fmt::Display,
51825            {
51826                self.action = value
51827                    .try_into()
51828                    .map_err(|e| format!("error converting supplied value for action: {}", e));
51829                self
51830            }
51831            pub fn criteria<T>(mut self, value: T) -> Self
51832            where
51833                T: ::std::convert::TryInto<super::SignEvmMessageCriteria>,
51834                T::Error: ::std::fmt::Display,
51835            {
51836                self.criteria = value
51837                    .try_into()
51838                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
51839                self
51840            }
51841            pub fn operation<T>(mut self, value: T) -> Self
51842            where
51843                T: ::std::convert::TryInto<super::SignEvmMessageRuleOperation>,
51844                T::Error: ::std::fmt::Display,
51845            {
51846                self.operation = value
51847                    .try_into()
51848                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
51849                self
51850            }
51851        }
51852        impl ::std::convert::TryFrom<SignEvmMessageRule> for super::SignEvmMessageRule {
51853            type Error = super::error::ConversionError;
51854            fn try_from(
51855                value: SignEvmMessageRule,
51856            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51857                Ok(Self {
51858                    action: value.action?,
51859                    criteria: value.criteria?,
51860                    operation: value.operation?,
51861                })
51862            }
51863        }
51864        impl ::std::convert::From<super::SignEvmMessageRule> for SignEvmMessageRule {
51865            fn from(value: super::SignEvmMessageRule) -> Self {
51866                Self {
51867                    action: Ok(value.action),
51868                    criteria: Ok(value.criteria),
51869                    operation: Ok(value.operation),
51870                }
51871            }
51872        }
51873        #[derive(Clone, Debug)]
51874        pub struct SignEvmTransactionBody {
51875            transaction: ::std::result::Result<::std::string::String, ::std::string::String>,
51876        }
51877        impl ::std::default::Default for SignEvmTransactionBody {
51878            fn default() -> Self {
51879                Self {
51880                    transaction: Err("no value supplied for transaction".to_string()),
51881                }
51882            }
51883        }
51884        impl SignEvmTransactionBody {
51885            pub fn transaction<T>(mut self, value: T) -> Self
51886            where
51887                T: ::std::convert::TryInto<::std::string::String>,
51888                T::Error: ::std::fmt::Display,
51889            {
51890                self.transaction = value
51891                    .try_into()
51892                    .map_err(|e| format!("error converting supplied value for transaction: {}", e));
51893                self
51894            }
51895        }
51896        impl ::std::convert::TryFrom<SignEvmTransactionBody> for super::SignEvmTransactionBody {
51897            type Error = super::error::ConversionError;
51898            fn try_from(
51899                value: SignEvmTransactionBody,
51900            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51901                Ok(Self {
51902                    transaction: value.transaction?,
51903                })
51904            }
51905        }
51906        impl ::std::convert::From<super::SignEvmTransactionBody> for SignEvmTransactionBody {
51907            fn from(value: super::SignEvmTransactionBody) -> Self {
51908                Self {
51909                    transaction: Ok(value.transaction),
51910                }
51911            }
51912        }
51913        #[derive(Clone, Debug)]
51914        pub struct SignEvmTransactionResponse {
51915            signed_transaction: ::std::result::Result<::std::string::String, ::std::string::String>,
51916        }
51917        impl ::std::default::Default for SignEvmTransactionResponse {
51918            fn default() -> Self {
51919                Self {
51920                    signed_transaction: Err("no value supplied for signed_transaction".to_string()),
51921                }
51922            }
51923        }
51924        impl SignEvmTransactionResponse {
51925            pub fn signed_transaction<T>(mut self, value: T) -> Self
51926            where
51927                T: ::std::convert::TryInto<::std::string::String>,
51928                T::Error: ::std::fmt::Display,
51929            {
51930                self.signed_transaction = value.try_into().map_err(|e| {
51931                    format!(
51932                        "error converting supplied value for signed_transaction: {}",
51933                        e
51934                    )
51935                });
51936                self
51937            }
51938        }
51939        impl ::std::convert::TryFrom<SignEvmTransactionResponse> for super::SignEvmTransactionResponse {
51940            type Error = super::error::ConversionError;
51941            fn try_from(
51942                value: SignEvmTransactionResponse,
51943            ) -> ::std::result::Result<Self, super::error::ConversionError> {
51944                Ok(Self {
51945                    signed_transaction: value.signed_transaction?,
51946                })
51947            }
51948        }
51949        impl ::std::convert::From<super::SignEvmTransactionResponse> for SignEvmTransactionResponse {
51950            fn from(value: super::SignEvmTransactionResponse) -> Self {
51951                Self {
51952                    signed_transaction: Ok(value.signed_transaction),
51953                }
51954            }
51955        }
51956        #[derive(Clone, Debug)]
51957        pub struct SignEvmTransactionRule {
51958            action:
51959                ::std::result::Result<super::SignEvmTransactionRuleAction, ::std::string::String>,
51960            criteria:
51961                ::std::result::Result<super::SignEvmTransactionCriteria, ::std::string::String>,
51962            operation: ::std::result::Result<
51963                super::SignEvmTransactionRuleOperation,
51964                ::std::string::String,
51965            >,
51966        }
51967        impl ::std::default::Default for SignEvmTransactionRule {
51968            fn default() -> Self {
51969                Self {
51970                    action: Err("no value supplied for action".to_string()),
51971                    criteria: Err("no value supplied for criteria".to_string()),
51972                    operation: Err("no value supplied for operation".to_string()),
51973                }
51974            }
51975        }
51976        impl SignEvmTransactionRule {
51977            pub fn action<T>(mut self, value: T) -> Self
51978            where
51979                T: ::std::convert::TryInto<super::SignEvmTransactionRuleAction>,
51980                T::Error: ::std::fmt::Display,
51981            {
51982                self.action = value
51983                    .try_into()
51984                    .map_err(|e| format!("error converting supplied value for action: {}", e));
51985                self
51986            }
51987            pub fn criteria<T>(mut self, value: T) -> Self
51988            where
51989                T: ::std::convert::TryInto<super::SignEvmTransactionCriteria>,
51990                T::Error: ::std::fmt::Display,
51991            {
51992                self.criteria = value
51993                    .try_into()
51994                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
51995                self
51996            }
51997            pub fn operation<T>(mut self, value: T) -> Self
51998            where
51999                T: ::std::convert::TryInto<super::SignEvmTransactionRuleOperation>,
52000                T::Error: ::std::fmt::Display,
52001            {
52002                self.operation = value
52003                    .try_into()
52004                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
52005                self
52006            }
52007        }
52008        impl ::std::convert::TryFrom<SignEvmTransactionRule> for super::SignEvmTransactionRule {
52009            type Error = super::error::ConversionError;
52010            fn try_from(
52011                value: SignEvmTransactionRule,
52012            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52013                Ok(Self {
52014                    action: value.action?,
52015                    criteria: value.criteria?,
52016                    operation: value.operation?,
52017                })
52018            }
52019        }
52020        impl ::std::convert::From<super::SignEvmTransactionRule> for SignEvmTransactionRule {
52021            fn from(value: super::SignEvmTransactionRule) -> Self {
52022                Self {
52023                    action: Ok(value.action),
52024                    criteria: Ok(value.criteria),
52025                    operation: Ok(value.operation),
52026                }
52027            }
52028        }
52029        #[derive(Clone, Debug)]
52030        pub struct SignEvmTypedDataFieldCriterion {
52031            conditions: ::std::result::Result<
52032                ::std::vec::Vec<super::SignEvmTypedDataFieldCriterionConditionsItem>,
52033                ::std::string::String,
52034            >,
52035            type_: ::std::result::Result<
52036                super::SignEvmTypedDataFieldCriterionType,
52037                ::std::string::String,
52038            >,
52039            types: ::std::result::Result<
52040                super::SignEvmTypedDataFieldCriterionTypes,
52041                ::std::string::String,
52042            >,
52043        }
52044        impl ::std::default::Default for SignEvmTypedDataFieldCriterion {
52045            fn default() -> Self {
52046                Self {
52047                    conditions: Err("no value supplied for conditions".to_string()),
52048                    type_: Err("no value supplied for type_".to_string()),
52049                    types: Err("no value supplied for types".to_string()),
52050                }
52051            }
52052        }
52053        impl SignEvmTypedDataFieldCriterion {
52054            pub fn conditions<T>(mut self, value: T) -> Self
52055            where
52056                T: ::std::convert::TryInto<
52057                    ::std::vec::Vec<super::SignEvmTypedDataFieldCriterionConditionsItem>,
52058                >,
52059                T::Error: ::std::fmt::Display,
52060            {
52061                self.conditions = value
52062                    .try_into()
52063                    .map_err(|e| format!("error converting supplied value for conditions: {}", e));
52064                self
52065            }
52066            pub fn type_<T>(mut self, value: T) -> Self
52067            where
52068                T: ::std::convert::TryInto<super::SignEvmTypedDataFieldCriterionType>,
52069                T::Error: ::std::fmt::Display,
52070            {
52071                self.type_ = value
52072                    .try_into()
52073                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
52074                self
52075            }
52076            pub fn types<T>(mut self, value: T) -> Self
52077            where
52078                T: ::std::convert::TryInto<super::SignEvmTypedDataFieldCriterionTypes>,
52079                T::Error: ::std::fmt::Display,
52080            {
52081                self.types = value
52082                    .try_into()
52083                    .map_err(|e| format!("error converting supplied value for types: {}", e));
52084                self
52085            }
52086        }
52087        impl ::std::convert::TryFrom<SignEvmTypedDataFieldCriterion>
52088            for super::SignEvmTypedDataFieldCriterion
52089        {
52090            type Error = super::error::ConversionError;
52091            fn try_from(
52092                value: SignEvmTypedDataFieldCriterion,
52093            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52094                Ok(Self {
52095                    conditions: value.conditions?,
52096                    type_: value.type_?,
52097                    types: value.types?,
52098                })
52099            }
52100        }
52101        impl ::std::convert::From<super::SignEvmTypedDataFieldCriterion>
52102            for SignEvmTypedDataFieldCriterion
52103        {
52104            fn from(value: super::SignEvmTypedDataFieldCriterion) -> Self {
52105                Self {
52106                    conditions: Ok(value.conditions),
52107                    type_: Ok(value.type_),
52108                    types: Ok(value.types),
52109                }
52110            }
52111        }
52112        #[derive(Clone, Debug)]
52113        pub struct SignEvmTypedDataFieldCriterionTypes {
52114            primary_type: ::std::result::Result<::std::string::String, ::std::string::String>,
52115            types: ::std::result::Result<
52116                ::std::collections::HashMap<
52117                    ::std::string::String,
52118                    ::std::vec::Vec<super::SignEvmTypedDataFieldCriterionTypesTypesValueItem>,
52119                >,
52120                ::std::string::String,
52121            >,
52122        }
52123        impl ::std::default::Default for SignEvmTypedDataFieldCriterionTypes {
52124            fn default() -> Self {
52125                Self {
52126                    primary_type: Err("no value supplied for primary_type".to_string()),
52127                    types: Err("no value supplied for types".to_string()),
52128                }
52129            }
52130        }
52131        impl SignEvmTypedDataFieldCriterionTypes {
52132            pub fn primary_type<T>(mut self, value: T) -> Self
52133            where
52134                T: ::std::convert::TryInto<::std::string::String>,
52135                T::Error: ::std::fmt::Display,
52136            {
52137                self.primary_type = value.try_into().map_err(|e| {
52138                    format!("error converting supplied value for primary_type: {}", e)
52139                });
52140                self
52141            }
52142            pub fn types<T>(mut self, value: T) -> Self
52143            where
52144                T: ::std::convert::TryInto<
52145                    ::std::collections::HashMap<
52146                        ::std::string::String,
52147                        ::std::vec::Vec<super::SignEvmTypedDataFieldCriterionTypesTypesValueItem>,
52148                    >,
52149                >,
52150                T::Error: ::std::fmt::Display,
52151            {
52152                self.types = value
52153                    .try_into()
52154                    .map_err(|e| format!("error converting supplied value for types: {}", e));
52155                self
52156            }
52157        }
52158        impl ::std::convert::TryFrom<SignEvmTypedDataFieldCriterionTypes>
52159            for super::SignEvmTypedDataFieldCriterionTypes
52160        {
52161            type Error = super::error::ConversionError;
52162            fn try_from(
52163                value: SignEvmTypedDataFieldCriterionTypes,
52164            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52165                Ok(Self {
52166                    primary_type: value.primary_type?,
52167                    types: value.types?,
52168                })
52169            }
52170        }
52171        impl ::std::convert::From<super::SignEvmTypedDataFieldCriterionTypes>
52172            for SignEvmTypedDataFieldCriterionTypes
52173        {
52174            fn from(value: super::SignEvmTypedDataFieldCriterionTypes) -> Self {
52175                Self {
52176                    primary_type: Ok(value.primary_type),
52177                    types: Ok(value.types),
52178                }
52179            }
52180        }
52181        #[derive(Clone, Debug)]
52182        pub struct SignEvmTypedDataFieldCriterionTypesTypesValueItem {
52183            name: ::std::result::Result<
52184                ::std::option::Option<::std::string::String>,
52185                ::std::string::String,
52186            >,
52187            type_: ::std::result::Result<
52188                ::std::option::Option<::std::string::String>,
52189                ::std::string::String,
52190            >,
52191        }
52192        impl ::std::default::Default for SignEvmTypedDataFieldCriterionTypesTypesValueItem {
52193            fn default() -> Self {
52194                Self {
52195                    name: Ok(Default::default()),
52196                    type_: Ok(Default::default()),
52197                }
52198            }
52199        }
52200        impl SignEvmTypedDataFieldCriterionTypesTypesValueItem {
52201            pub fn name<T>(mut self, value: T) -> Self
52202            where
52203                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
52204                T::Error: ::std::fmt::Display,
52205            {
52206                self.name = value
52207                    .try_into()
52208                    .map_err(|e| format!("error converting supplied value for name: {}", e));
52209                self
52210            }
52211            pub fn type_<T>(mut self, value: T) -> Self
52212            where
52213                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
52214                T::Error: ::std::fmt::Display,
52215            {
52216                self.type_ = value
52217                    .try_into()
52218                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
52219                self
52220            }
52221        }
52222        impl ::std::convert::TryFrom<SignEvmTypedDataFieldCriterionTypesTypesValueItem>
52223            for super::SignEvmTypedDataFieldCriterionTypesTypesValueItem
52224        {
52225            type Error = super::error::ConversionError;
52226            fn try_from(
52227                value: SignEvmTypedDataFieldCriterionTypesTypesValueItem,
52228            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52229                Ok(Self {
52230                    name: value.name?,
52231                    type_: value.type_?,
52232                })
52233            }
52234        }
52235        impl ::std::convert::From<super::SignEvmTypedDataFieldCriterionTypesTypesValueItem>
52236            for SignEvmTypedDataFieldCriterionTypesTypesValueItem
52237        {
52238            fn from(value: super::SignEvmTypedDataFieldCriterionTypesTypesValueItem) -> Self {
52239                Self {
52240                    name: Ok(value.name),
52241                    type_: Ok(value.type_),
52242                }
52243            }
52244        }
52245        #[derive(Clone, Debug)]
52246        pub struct SignEvmTypedDataResponse {
52247            signature: ::std::result::Result<::std::string::String, ::std::string::String>,
52248        }
52249        impl ::std::default::Default for SignEvmTypedDataResponse {
52250            fn default() -> Self {
52251                Self {
52252                    signature: Err("no value supplied for signature".to_string()),
52253                }
52254            }
52255        }
52256        impl SignEvmTypedDataResponse {
52257            pub fn signature<T>(mut self, value: T) -> Self
52258            where
52259                T: ::std::convert::TryInto<::std::string::String>,
52260                T::Error: ::std::fmt::Display,
52261            {
52262                self.signature = value
52263                    .try_into()
52264                    .map_err(|e| format!("error converting supplied value for signature: {}", e));
52265                self
52266            }
52267        }
52268        impl ::std::convert::TryFrom<SignEvmTypedDataResponse> for super::SignEvmTypedDataResponse {
52269            type Error = super::error::ConversionError;
52270            fn try_from(
52271                value: SignEvmTypedDataResponse,
52272            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52273                Ok(Self {
52274                    signature: value.signature?,
52275                })
52276            }
52277        }
52278        impl ::std::convert::From<super::SignEvmTypedDataResponse> for SignEvmTypedDataResponse {
52279            fn from(value: super::SignEvmTypedDataResponse) -> Self {
52280                Self {
52281                    signature: Ok(value.signature),
52282                }
52283            }
52284        }
52285        #[derive(Clone, Debug)]
52286        pub struct SignEvmTypedDataRule {
52287            action: ::std::result::Result<super::SignEvmTypedDataRuleAction, ::std::string::String>,
52288            criteria: ::std::result::Result<super::SignEvmTypedDataCriteria, ::std::string::String>,
52289            operation:
52290                ::std::result::Result<super::SignEvmTypedDataRuleOperation, ::std::string::String>,
52291        }
52292        impl ::std::default::Default for SignEvmTypedDataRule {
52293            fn default() -> Self {
52294                Self {
52295                    action: Err("no value supplied for action".to_string()),
52296                    criteria: Err("no value supplied for criteria".to_string()),
52297                    operation: Err("no value supplied for operation".to_string()),
52298                }
52299            }
52300        }
52301        impl SignEvmTypedDataRule {
52302            pub fn action<T>(mut self, value: T) -> Self
52303            where
52304                T: ::std::convert::TryInto<super::SignEvmTypedDataRuleAction>,
52305                T::Error: ::std::fmt::Display,
52306            {
52307                self.action = value
52308                    .try_into()
52309                    .map_err(|e| format!("error converting supplied value for action: {}", e));
52310                self
52311            }
52312            pub fn criteria<T>(mut self, value: T) -> Self
52313            where
52314                T: ::std::convert::TryInto<super::SignEvmTypedDataCriteria>,
52315                T::Error: ::std::fmt::Display,
52316            {
52317                self.criteria = value
52318                    .try_into()
52319                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
52320                self
52321            }
52322            pub fn operation<T>(mut self, value: T) -> Self
52323            where
52324                T: ::std::convert::TryInto<super::SignEvmTypedDataRuleOperation>,
52325                T::Error: ::std::fmt::Display,
52326            {
52327                self.operation = value
52328                    .try_into()
52329                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
52330                self
52331            }
52332        }
52333        impl ::std::convert::TryFrom<SignEvmTypedDataRule> for super::SignEvmTypedDataRule {
52334            type Error = super::error::ConversionError;
52335            fn try_from(
52336                value: SignEvmTypedDataRule,
52337            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52338                Ok(Self {
52339                    action: value.action?,
52340                    criteria: value.criteria?,
52341                    operation: value.operation?,
52342                })
52343            }
52344        }
52345        impl ::std::convert::From<super::SignEvmTypedDataRule> for SignEvmTypedDataRule {
52346            fn from(value: super::SignEvmTypedDataRule) -> Self {
52347                Self {
52348                    action: Ok(value.action),
52349                    criteria: Ok(value.criteria),
52350                    operation: Ok(value.operation),
52351                }
52352            }
52353        }
52354        #[derive(Clone, Debug)]
52355        pub struct SignEvmTypedDataVerifyingContractCriterion {
52356            addresses: ::std::result::Result<
52357                ::std::vec::Vec<super::SignEvmTypedDataVerifyingContractCriterionAddressesItem>,
52358                ::std::string::String,
52359            >,
52360            operator: ::std::result::Result<
52361                super::SignEvmTypedDataVerifyingContractCriterionOperator,
52362                ::std::string::String,
52363            >,
52364            type_: ::std::result::Result<
52365                super::SignEvmTypedDataVerifyingContractCriterionType,
52366                ::std::string::String,
52367            >,
52368        }
52369        impl ::std::default::Default for SignEvmTypedDataVerifyingContractCriterion {
52370            fn default() -> Self {
52371                Self {
52372                    addresses: Err("no value supplied for addresses".to_string()),
52373                    operator: Err("no value supplied for operator".to_string()),
52374                    type_: Err("no value supplied for type_".to_string()),
52375                }
52376            }
52377        }
52378        impl SignEvmTypedDataVerifyingContractCriterion {
52379            pub fn addresses<T>(mut self, value: T) -> Self
52380            where
52381                T: ::std::convert::TryInto<
52382                    ::std::vec::Vec<super::SignEvmTypedDataVerifyingContractCriterionAddressesItem>,
52383                >,
52384                T::Error: ::std::fmt::Display,
52385            {
52386                self.addresses = value
52387                    .try_into()
52388                    .map_err(|e| format!("error converting supplied value for addresses: {}", e));
52389                self
52390            }
52391            pub fn operator<T>(mut self, value: T) -> Self
52392            where
52393                T: ::std::convert::TryInto<
52394                    super::SignEvmTypedDataVerifyingContractCriterionOperator,
52395                >,
52396                T::Error: ::std::fmt::Display,
52397            {
52398                self.operator = value
52399                    .try_into()
52400                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
52401                self
52402            }
52403            pub fn type_<T>(mut self, value: T) -> Self
52404            where
52405                T: ::std::convert::TryInto<super::SignEvmTypedDataVerifyingContractCriterionType>,
52406                T::Error: ::std::fmt::Display,
52407            {
52408                self.type_ = value
52409                    .try_into()
52410                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
52411                self
52412            }
52413        }
52414        impl ::std::convert::TryFrom<SignEvmTypedDataVerifyingContractCriterion>
52415            for super::SignEvmTypedDataVerifyingContractCriterion
52416        {
52417            type Error = super::error::ConversionError;
52418            fn try_from(
52419                value: SignEvmTypedDataVerifyingContractCriterion,
52420            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52421                Ok(Self {
52422                    addresses: value.addresses?,
52423                    operator: value.operator?,
52424                    type_: value.type_?,
52425                })
52426            }
52427        }
52428        impl ::std::convert::From<super::SignEvmTypedDataVerifyingContractCriterion>
52429            for SignEvmTypedDataVerifyingContractCriterion
52430        {
52431            fn from(value: super::SignEvmTypedDataVerifyingContractCriterion) -> Self {
52432                Self {
52433                    addresses: Ok(value.addresses),
52434                    operator: Ok(value.operator),
52435                    type_: Ok(value.type_),
52436                }
52437            }
52438        }
52439        #[derive(Clone, Debug)]
52440        pub struct SignSolMessageRule {
52441            action: ::std::result::Result<super::SignSolMessageRuleAction, ::std::string::String>,
52442            criteria: ::std::result::Result<super::SignSolMessageCriteria, ::std::string::String>,
52443            operation:
52444                ::std::result::Result<super::SignSolMessageRuleOperation, ::std::string::String>,
52445        }
52446        impl ::std::default::Default for SignSolMessageRule {
52447            fn default() -> Self {
52448                Self {
52449                    action: Err("no value supplied for action".to_string()),
52450                    criteria: Err("no value supplied for criteria".to_string()),
52451                    operation: Err("no value supplied for operation".to_string()),
52452                }
52453            }
52454        }
52455        impl SignSolMessageRule {
52456            pub fn action<T>(mut self, value: T) -> Self
52457            where
52458                T: ::std::convert::TryInto<super::SignSolMessageRuleAction>,
52459                T::Error: ::std::fmt::Display,
52460            {
52461                self.action = value
52462                    .try_into()
52463                    .map_err(|e| format!("error converting supplied value for action: {}", e));
52464                self
52465            }
52466            pub fn criteria<T>(mut self, value: T) -> Self
52467            where
52468                T: ::std::convert::TryInto<super::SignSolMessageCriteria>,
52469                T::Error: ::std::fmt::Display,
52470            {
52471                self.criteria = value
52472                    .try_into()
52473                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
52474                self
52475            }
52476            pub fn operation<T>(mut self, value: T) -> Self
52477            where
52478                T: ::std::convert::TryInto<super::SignSolMessageRuleOperation>,
52479                T::Error: ::std::fmt::Display,
52480            {
52481                self.operation = value
52482                    .try_into()
52483                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
52484                self
52485            }
52486        }
52487        impl ::std::convert::TryFrom<SignSolMessageRule> for super::SignSolMessageRule {
52488            type Error = super::error::ConversionError;
52489            fn try_from(
52490                value: SignSolMessageRule,
52491            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52492                Ok(Self {
52493                    action: value.action?,
52494                    criteria: value.criteria?,
52495                    operation: value.operation?,
52496                })
52497            }
52498        }
52499        impl ::std::convert::From<super::SignSolMessageRule> for SignSolMessageRule {
52500            fn from(value: super::SignSolMessageRule) -> Self {
52501                Self {
52502                    action: Ok(value.action),
52503                    criteria: Ok(value.criteria),
52504                    operation: Ok(value.operation),
52505                }
52506            }
52507        }
52508        #[derive(Clone, Debug)]
52509        pub struct SignSolTransactionRule {
52510            action:
52511                ::std::result::Result<super::SignSolTransactionRuleAction, ::std::string::String>,
52512            criteria:
52513                ::std::result::Result<super::SignSolTransactionCriteria, ::std::string::String>,
52514            operation: ::std::result::Result<
52515                super::SignSolTransactionRuleOperation,
52516                ::std::string::String,
52517            >,
52518        }
52519        impl ::std::default::Default for SignSolTransactionRule {
52520            fn default() -> Self {
52521                Self {
52522                    action: Err("no value supplied for action".to_string()),
52523                    criteria: Err("no value supplied for criteria".to_string()),
52524                    operation: Err("no value supplied for operation".to_string()),
52525                }
52526            }
52527        }
52528        impl SignSolTransactionRule {
52529            pub fn action<T>(mut self, value: T) -> Self
52530            where
52531                T: ::std::convert::TryInto<super::SignSolTransactionRuleAction>,
52532                T::Error: ::std::fmt::Display,
52533            {
52534                self.action = value
52535                    .try_into()
52536                    .map_err(|e| format!("error converting supplied value for action: {}", e));
52537                self
52538            }
52539            pub fn criteria<T>(mut self, value: T) -> Self
52540            where
52541                T: ::std::convert::TryInto<super::SignSolTransactionCriteria>,
52542                T::Error: ::std::fmt::Display,
52543            {
52544                self.criteria = value
52545                    .try_into()
52546                    .map_err(|e| format!("error converting supplied value for criteria: {}", e));
52547                self
52548            }
52549            pub fn operation<T>(mut self, value: T) -> Self
52550            where
52551                T: ::std::convert::TryInto<super::SignSolTransactionRuleOperation>,
52552                T::Error: ::std::fmt::Display,
52553            {
52554                self.operation = value
52555                    .try_into()
52556                    .map_err(|e| format!("error converting supplied value for operation: {}", e));
52557                self
52558            }
52559        }
52560        impl ::std::convert::TryFrom<SignSolTransactionRule> for super::SignSolTransactionRule {
52561            type Error = super::error::ConversionError;
52562            fn try_from(
52563                value: SignSolTransactionRule,
52564            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52565                Ok(Self {
52566                    action: value.action?,
52567                    criteria: value.criteria?,
52568                    operation: value.operation?,
52569                })
52570            }
52571        }
52572        impl ::std::convert::From<super::SignSolTransactionRule> for SignSolTransactionRule {
52573            fn from(value: super::SignSolTransactionRule) -> Self {
52574                Self {
52575                    action: Ok(value.action),
52576                    criteria: Ok(value.criteria),
52577                    operation: Ok(value.operation),
52578                }
52579            }
52580        }
52581        #[derive(Clone, Debug)]
52582        pub struct SignSolanaMessageBody {
52583            message: ::std::result::Result<::std::string::String, ::std::string::String>,
52584        }
52585        impl ::std::default::Default for SignSolanaMessageBody {
52586            fn default() -> Self {
52587                Self {
52588                    message: Err("no value supplied for message".to_string()),
52589                }
52590            }
52591        }
52592        impl SignSolanaMessageBody {
52593            pub fn message<T>(mut self, value: T) -> Self
52594            where
52595                T: ::std::convert::TryInto<::std::string::String>,
52596                T::Error: ::std::fmt::Display,
52597            {
52598                self.message = value
52599                    .try_into()
52600                    .map_err(|e| format!("error converting supplied value for message: {}", e));
52601                self
52602            }
52603        }
52604        impl ::std::convert::TryFrom<SignSolanaMessageBody> for super::SignSolanaMessageBody {
52605            type Error = super::error::ConversionError;
52606            fn try_from(
52607                value: SignSolanaMessageBody,
52608            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52609                Ok(Self {
52610                    message: value.message?,
52611                })
52612            }
52613        }
52614        impl ::std::convert::From<super::SignSolanaMessageBody> for SignSolanaMessageBody {
52615            fn from(value: super::SignSolanaMessageBody) -> Self {
52616                Self {
52617                    message: Ok(value.message),
52618                }
52619            }
52620        }
52621        #[derive(Clone, Debug)]
52622        pub struct SignSolanaMessageResponse {
52623            signature: ::std::result::Result<::std::string::String, ::std::string::String>,
52624        }
52625        impl ::std::default::Default for SignSolanaMessageResponse {
52626            fn default() -> Self {
52627                Self {
52628                    signature: Err("no value supplied for signature".to_string()),
52629                }
52630            }
52631        }
52632        impl SignSolanaMessageResponse {
52633            pub fn signature<T>(mut self, value: T) -> Self
52634            where
52635                T: ::std::convert::TryInto<::std::string::String>,
52636                T::Error: ::std::fmt::Display,
52637            {
52638                self.signature = value
52639                    .try_into()
52640                    .map_err(|e| format!("error converting supplied value for signature: {}", e));
52641                self
52642            }
52643        }
52644        impl ::std::convert::TryFrom<SignSolanaMessageResponse> for super::SignSolanaMessageResponse {
52645            type Error = super::error::ConversionError;
52646            fn try_from(
52647                value: SignSolanaMessageResponse,
52648            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52649                Ok(Self {
52650                    signature: value.signature?,
52651                })
52652            }
52653        }
52654        impl ::std::convert::From<super::SignSolanaMessageResponse> for SignSolanaMessageResponse {
52655            fn from(value: super::SignSolanaMessageResponse) -> Self {
52656                Self {
52657                    signature: Ok(value.signature),
52658                }
52659            }
52660        }
52661        #[derive(Clone, Debug)]
52662        pub struct SignSolanaTransactionBody {
52663            transaction: ::std::result::Result<::std::string::String, ::std::string::String>,
52664        }
52665        impl ::std::default::Default for SignSolanaTransactionBody {
52666            fn default() -> Self {
52667                Self {
52668                    transaction: Err("no value supplied for transaction".to_string()),
52669                }
52670            }
52671        }
52672        impl SignSolanaTransactionBody {
52673            pub fn transaction<T>(mut self, value: T) -> Self
52674            where
52675                T: ::std::convert::TryInto<::std::string::String>,
52676                T::Error: ::std::fmt::Display,
52677            {
52678                self.transaction = value
52679                    .try_into()
52680                    .map_err(|e| format!("error converting supplied value for transaction: {}", e));
52681                self
52682            }
52683        }
52684        impl ::std::convert::TryFrom<SignSolanaTransactionBody> for super::SignSolanaTransactionBody {
52685            type Error = super::error::ConversionError;
52686            fn try_from(
52687                value: SignSolanaTransactionBody,
52688            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52689                Ok(Self {
52690                    transaction: value.transaction?,
52691                })
52692            }
52693        }
52694        impl ::std::convert::From<super::SignSolanaTransactionBody> for SignSolanaTransactionBody {
52695            fn from(value: super::SignSolanaTransactionBody) -> Self {
52696                Self {
52697                    transaction: Ok(value.transaction),
52698                }
52699            }
52700        }
52701        #[derive(Clone, Debug)]
52702        pub struct SignSolanaTransactionResponse {
52703            signed_transaction: ::std::result::Result<::std::string::String, ::std::string::String>,
52704        }
52705        impl ::std::default::Default for SignSolanaTransactionResponse {
52706            fn default() -> Self {
52707                Self {
52708                    signed_transaction: Err("no value supplied for signed_transaction".to_string()),
52709                }
52710            }
52711        }
52712        impl SignSolanaTransactionResponse {
52713            pub fn signed_transaction<T>(mut self, value: T) -> Self
52714            where
52715                T: ::std::convert::TryInto<::std::string::String>,
52716                T::Error: ::std::fmt::Display,
52717            {
52718                self.signed_transaction = value.try_into().map_err(|e| {
52719                    format!(
52720                        "error converting supplied value for signed_transaction: {}",
52721                        e
52722                    )
52723                });
52724                self
52725            }
52726        }
52727        impl ::std::convert::TryFrom<SignSolanaTransactionResponse>
52728            for super::SignSolanaTransactionResponse
52729        {
52730            type Error = super::error::ConversionError;
52731            fn try_from(
52732                value: SignSolanaTransactionResponse,
52733            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52734                Ok(Self {
52735                    signed_transaction: value.signed_transaction?,
52736                })
52737            }
52738        }
52739        impl ::std::convert::From<super::SignSolanaTransactionResponse> for SignSolanaTransactionResponse {
52740            fn from(value: super::SignSolanaTransactionResponse) -> Self {
52741                Self {
52742                    signed_transaction: Ok(value.signed_transaction),
52743                }
52744            }
52745        }
52746        #[derive(Clone, Debug)]
52747        pub struct SmsAuthentication {
52748            phone_number:
52749                ::std::result::Result<super::SmsAuthenticationPhoneNumber, ::std::string::String>,
52750            type_: ::std::result::Result<super::SmsAuthenticationType, ::std::string::String>,
52751        }
52752        impl ::std::default::Default for SmsAuthentication {
52753            fn default() -> Self {
52754                Self {
52755                    phone_number: Err("no value supplied for phone_number".to_string()),
52756                    type_: Err("no value supplied for type_".to_string()),
52757                }
52758            }
52759        }
52760        impl SmsAuthentication {
52761            pub fn phone_number<T>(mut self, value: T) -> Self
52762            where
52763                T: ::std::convert::TryInto<super::SmsAuthenticationPhoneNumber>,
52764                T::Error: ::std::fmt::Display,
52765            {
52766                self.phone_number = value.try_into().map_err(|e| {
52767                    format!("error converting supplied value for phone_number: {}", e)
52768                });
52769                self
52770            }
52771            pub fn type_<T>(mut self, value: T) -> Self
52772            where
52773                T: ::std::convert::TryInto<super::SmsAuthenticationType>,
52774                T::Error: ::std::fmt::Display,
52775            {
52776                self.type_ = value
52777                    .try_into()
52778                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
52779                self
52780            }
52781        }
52782        impl ::std::convert::TryFrom<SmsAuthentication> for super::SmsAuthentication {
52783            type Error = super::error::ConversionError;
52784            fn try_from(
52785                value: SmsAuthentication,
52786            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52787                Ok(Self {
52788                    phone_number: value.phone_number?,
52789                    type_: value.type_?,
52790                })
52791            }
52792        }
52793        impl ::std::convert::From<super::SmsAuthentication> for SmsAuthentication {
52794            fn from(value: super::SmsAuthentication) -> Self {
52795                Self {
52796                    phone_number: Ok(value.phone_number),
52797                    type_: Ok(value.type_),
52798                }
52799            }
52800        }
52801        #[derive(Clone, Debug)]
52802        pub struct SolAddressCriterion {
52803            addresses: ::std::result::Result<
52804                ::std::vec::Vec<super::SolAddressCriterionAddressesItem>,
52805                ::std::string::String,
52806            >,
52807            operator:
52808                ::std::result::Result<super::SolAddressCriterionOperator, ::std::string::String>,
52809            type_: ::std::result::Result<super::SolAddressCriterionType, ::std::string::String>,
52810        }
52811        impl ::std::default::Default for SolAddressCriterion {
52812            fn default() -> Self {
52813                Self {
52814                    addresses: Err("no value supplied for addresses".to_string()),
52815                    operator: Err("no value supplied for operator".to_string()),
52816                    type_: Err("no value supplied for type_".to_string()),
52817                }
52818            }
52819        }
52820        impl SolAddressCriterion {
52821            pub fn addresses<T>(mut self, value: T) -> Self
52822            where
52823                T: ::std::convert::TryInto<
52824                    ::std::vec::Vec<super::SolAddressCriterionAddressesItem>,
52825                >,
52826                T::Error: ::std::fmt::Display,
52827            {
52828                self.addresses = value
52829                    .try_into()
52830                    .map_err(|e| format!("error converting supplied value for addresses: {}", e));
52831                self
52832            }
52833            pub fn operator<T>(mut self, value: T) -> Self
52834            where
52835                T: ::std::convert::TryInto<super::SolAddressCriterionOperator>,
52836                T::Error: ::std::fmt::Display,
52837            {
52838                self.operator = value
52839                    .try_into()
52840                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
52841                self
52842            }
52843            pub fn type_<T>(mut self, value: T) -> Self
52844            where
52845                T: ::std::convert::TryInto<super::SolAddressCriterionType>,
52846                T::Error: ::std::fmt::Display,
52847            {
52848                self.type_ = value
52849                    .try_into()
52850                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
52851                self
52852            }
52853        }
52854        impl ::std::convert::TryFrom<SolAddressCriterion> for super::SolAddressCriterion {
52855            type Error = super::error::ConversionError;
52856            fn try_from(
52857                value: SolAddressCriterion,
52858            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52859                Ok(Self {
52860                    addresses: value.addresses?,
52861                    operator: value.operator?,
52862                    type_: value.type_?,
52863                })
52864            }
52865        }
52866        impl ::std::convert::From<super::SolAddressCriterion> for SolAddressCriterion {
52867            fn from(value: super::SolAddressCriterion) -> Self {
52868                Self {
52869                    addresses: Ok(value.addresses),
52870                    operator: Ok(value.operator),
52871                    type_: Ok(value.type_),
52872                }
52873            }
52874        }
52875        #[derive(Clone, Debug)]
52876        pub struct SolDataCondition {
52877            instruction: ::std::result::Result<::std::string::String, ::std::string::String>,
52878            params: ::std::result::Result<
52879                ::std::vec::Vec<super::SolDataConditionParamsItem>,
52880                ::std::string::String,
52881            >,
52882        }
52883        impl ::std::default::Default for SolDataCondition {
52884            fn default() -> Self {
52885                Self {
52886                    instruction: Err("no value supplied for instruction".to_string()),
52887                    params: Ok(Default::default()),
52888                }
52889            }
52890        }
52891        impl SolDataCondition {
52892            pub fn instruction<T>(mut self, value: T) -> Self
52893            where
52894                T: ::std::convert::TryInto<::std::string::String>,
52895                T::Error: ::std::fmt::Display,
52896            {
52897                self.instruction = value
52898                    .try_into()
52899                    .map_err(|e| format!("error converting supplied value for instruction: {}", e));
52900                self
52901            }
52902            pub fn params<T>(mut self, value: T) -> Self
52903            where
52904                T: ::std::convert::TryInto<::std::vec::Vec<super::SolDataConditionParamsItem>>,
52905                T::Error: ::std::fmt::Display,
52906            {
52907                self.params = value
52908                    .try_into()
52909                    .map_err(|e| format!("error converting supplied value for params: {}", e));
52910                self
52911            }
52912        }
52913        impl ::std::convert::TryFrom<SolDataCondition> for super::SolDataCondition {
52914            type Error = super::error::ConversionError;
52915            fn try_from(
52916                value: SolDataCondition,
52917            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52918                Ok(Self {
52919                    instruction: value.instruction?,
52920                    params: value.params?,
52921                })
52922            }
52923        }
52924        impl ::std::convert::From<super::SolDataCondition> for SolDataCondition {
52925            fn from(value: super::SolDataCondition) -> Self {
52926                Self {
52927                    instruction: Ok(value.instruction),
52928                    params: Ok(value.params),
52929                }
52930            }
52931        }
52932        #[derive(Clone, Debug)]
52933        pub struct SolDataCriterion {
52934            conditions: ::std::result::Result<
52935                ::std::vec::Vec<super::SolDataCondition>,
52936                ::std::string::String,
52937            >,
52938            idls: ::std::result::Result<
52939                ::std::vec::Vec<super::SolDataCriterionIdlsItem>,
52940                ::std::string::String,
52941            >,
52942            type_: ::std::result::Result<super::SolDataCriterionType, ::std::string::String>,
52943        }
52944        impl ::std::default::Default for SolDataCriterion {
52945            fn default() -> Self {
52946                Self {
52947                    conditions: Err("no value supplied for conditions".to_string()),
52948                    idls: Err("no value supplied for idls".to_string()),
52949                    type_: Err("no value supplied for type_".to_string()),
52950                }
52951            }
52952        }
52953        impl SolDataCriterion {
52954            pub fn conditions<T>(mut self, value: T) -> Self
52955            where
52956                T: ::std::convert::TryInto<::std::vec::Vec<super::SolDataCondition>>,
52957                T::Error: ::std::fmt::Display,
52958            {
52959                self.conditions = value
52960                    .try_into()
52961                    .map_err(|e| format!("error converting supplied value for conditions: {}", e));
52962                self
52963            }
52964            pub fn idls<T>(mut self, value: T) -> Self
52965            where
52966                T: ::std::convert::TryInto<::std::vec::Vec<super::SolDataCriterionIdlsItem>>,
52967                T::Error: ::std::fmt::Display,
52968            {
52969                self.idls = value
52970                    .try_into()
52971                    .map_err(|e| format!("error converting supplied value for idls: {}", e));
52972                self
52973            }
52974            pub fn type_<T>(mut self, value: T) -> Self
52975            where
52976                T: ::std::convert::TryInto<super::SolDataCriterionType>,
52977                T::Error: ::std::fmt::Display,
52978            {
52979                self.type_ = value
52980                    .try_into()
52981                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
52982                self
52983            }
52984        }
52985        impl ::std::convert::TryFrom<SolDataCriterion> for super::SolDataCriterion {
52986            type Error = super::error::ConversionError;
52987            fn try_from(
52988                value: SolDataCriterion,
52989            ) -> ::std::result::Result<Self, super::error::ConversionError> {
52990                Ok(Self {
52991                    conditions: value.conditions?,
52992                    idls: value.idls?,
52993                    type_: value.type_?,
52994                })
52995            }
52996        }
52997        impl ::std::convert::From<super::SolDataCriterion> for SolDataCriterion {
52998            fn from(value: super::SolDataCriterion) -> Self {
52999                Self {
53000                    conditions: Ok(value.conditions),
53001                    idls: Ok(value.idls),
53002                    type_: Ok(value.type_),
53003                }
53004            }
53005        }
53006        #[derive(Clone, Debug)]
53007        pub struct SolDataParameterCondition {
53008            name: ::std::result::Result<::std::string::String, ::std::string::String>,
53009            operator: ::std::result::Result<
53010                super::SolDataParameterConditionOperator,
53011                ::std::string::String,
53012            >,
53013            value: ::std::result::Result<::std::string::String, ::std::string::String>,
53014        }
53015        impl ::std::default::Default for SolDataParameterCondition {
53016            fn default() -> Self {
53017                Self {
53018                    name: Err("no value supplied for name".to_string()),
53019                    operator: Err("no value supplied for operator".to_string()),
53020                    value: Err("no value supplied for value".to_string()),
53021                }
53022            }
53023        }
53024        impl SolDataParameterCondition {
53025            pub fn name<T>(mut self, value: T) -> Self
53026            where
53027                T: ::std::convert::TryInto<::std::string::String>,
53028                T::Error: ::std::fmt::Display,
53029            {
53030                self.name = value
53031                    .try_into()
53032                    .map_err(|e| format!("error converting supplied value for name: {}", e));
53033                self
53034            }
53035            pub fn operator<T>(mut self, value: T) -> Self
53036            where
53037                T: ::std::convert::TryInto<super::SolDataParameterConditionOperator>,
53038                T::Error: ::std::fmt::Display,
53039            {
53040                self.operator = value
53041                    .try_into()
53042                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
53043                self
53044            }
53045            pub fn value<T>(mut self, value: T) -> Self
53046            where
53047                T: ::std::convert::TryInto<::std::string::String>,
53048                T::Error: ::std::fmt::Display,
53049            {
53050                self.value = value
53051                    .try_into()
53052                    .map_err(|e| format!("error converting supplied value for value: {}", e));
53053                self
53054            }
53055        }
53056        impl ::std::convert::TryFrom<SolDataParameterCondition> for super::SolDataParameterCondition {
53057            type Error = super::error::ConversionError;
53058            fn try_from(
53059                value: SolDataParameterCondition,
53060            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53061                Ok(Self {
53062                    name: value.name?,
53063                    operator: value.operator?,
53064                    value: value.value?,
53065                })
53066            }
53067        }
53068        impl ::std::convert::From<super::SolDataParameterCondition> for SolDataParameterCondition {
53069            fn from(value: super::SolDataParameterCondition) -> Self {
53070                Self {
53071                    name: Ok(value.name),
53072                    operator: Ok(value.operator),
53073                    value: Ok(value.value),
53074                }
53075            }
53076        }
53077        #[derive(Clone, Debug)]
53078        pub struct SolDataParameterConditionList {
53079            name: ::std::result::Result<::std::string::String, ::std::string::String>,
53080            operator: ::std::result::Result<
53081                super::SolDataParameterConditionListOperator,
53082                ::std::string::String,
53083            >,
53084            values: ::std::result::Result<
53085                ::std::vec::Vec<::std::string::String>,
53086                ::std::string::String,
53087            >,
53088        }
53089        impl ::std::default::Default for SolDataParameterConditionList {
53090            fn default() -> Self {
53091                Self {
53092                    name: Err("no value supplied for name".to_string()),
53093                    operator: Err("no value supplied for operator".to_string()),
53094                    values: Err("no value supplied for values".to_string()),
53095                }
53096            }
53097        }
53098        impl SolDataParameterConditionList {
53099            pub fn name<T>(mut self, value: T) -> Self
53100            where
53101                T: ::std::convert::TryInto<::std::string::String>,
53102                T::Error: ::std::fmt::Display,
53103            {
53104                self.name = value
53105                    .try_into()
53106                    .map_err(|e| format!("error converting supplied value for name: {}", e));
53107                self
53108            }
53109            pub fn operator<T>(mut self, value: T) -> Self
53110            where
53111                T: ::std::convert::TryInto<super::SolDataParameterConditionListOperator>,
53112                T::Error: ::std::fmt::Display,
53113            {
53114                self.operator = value
53115                    .try_into()
53116                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
53117                self
53118            }
53119            pub fn values<T>(mut self, value: T) -> Self
53120            where
53121                T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
53122                T::Error: ::std::fmt::Display,
53123            {
53124                self.values = value
53125                    .try_into()
53126                    .map_err(|e| format!("error converting supplied value for values: {}", e));
53127                self
53128            }
53129        }
53130        impl ::std::convert::TryFrom<SolDataParameterConditionList>
53131            for super::SolDataParameterConditionList
53132        {
53133            type Error = super::error::ConversionError;
53134            fn try_from(
53135                value: SolDataParameterConditionList,
53136            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53137                Ok(Self {
53138                    name: value.name?,
53139                    operator: value.operator?,
53140                    values: value.values?,
53141                })
53142            }
53143        }
53144        impl ::std::convert::From<super::SolDataParameterConditionList> for SolDataParameterConditionList {
53145            fn from(value: super::SolDataParameterConditionList) -> Self {
53146                Self {
53147                    name: Ok(value.name),
53148                    operator: Ok(value.operator),
53149                    values: Ok(value.values),
53150                }
53151            }
53152        }
53153        #[derive(Clone, Debug)]
53154        pub struct SolMessageCriterion {
53155            match_: ::std::result::Result<::std::string::String, ::std::string::String>,
53156            type_: ::std::result::Result<super::SolMessageCriterionType, ::std::string::String>,
53157        }
53158        impl ::std::default::Default for SolMessageCriterion {
53159            fn default() -> Self {
53160                Self {
53161                    match_: Err("no value supplied for match_".to_string()),
53162                    type_: Err("no value supplied for type_".to_string()),
53163                }
53164            }
53165        }
53166        impl SolMessageCriterion {
53167            pub fn match_<T>(mut self, value: T) -> Self
53168            where
53169                T: ::std::convert::TryInto<::std::string::String>,
53170                T::Error: ::std::fmt::Display,
53171            {
53172                self.match_ = value
53173                    .try_into()
53174                    .map_err(|e| format!("error converting supplied value for match_: {}", e));
53175                self
53176            }
53177            pub fn type_<T>(mut self, value: T) -> Self
53178            where
53179                T: ::std::convert::TryInto<super::SolMessageCriterionType>,
53180                T::Error: ::std::fmt::Display,
53181            {
53182                self.type_ = value
53183                    .try_into()
53184                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
53185                self
53186            }
53187        }
53188        impl ::std::convert::TryFrom<SolMessageCriterion> for super::SolMessageCriterion {
53189            type Error = super::error::ConversionError;
53190            fn try_from(
53191                value: SolMessageCriterion,
53192            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53193                Ok(Self {
53194                    match_: value.match_?,
53195                    type_: value.type_?,
53196                })
53197            }
53198        }
53199        impl ::std::convert::From<super::SolMessageCriterion> for SolMessageCriterion {
53200            fn from(value: super::SolMessageCriterion) -> Self {
53201                Self {
53202                    match_: Ok(value.match_),
53203                    type_: Ok(value.type_),
53204                }
53205            }
53206        }
53207        #[derive(Clone, Debug)]
53208        pub struct SolNetworkCriterion {
53209            networks: ::std::result::Result<
53210                ::std::vec::Vec<super::SolNetworkCriterionNetworksItem>,
53211                ::std::string::String,
53212            >,
53213            operator:
53214                ::std::result::Result<super::SolNetworkCriterionOperator, ::std::string::String>,
53215            type_: ::std::result::Result<super::SolNetworkCriterionType, ::std::string::String>,
53216        }
53217        impl ::std::default::Default for SolNetworkCriterion {
53218            fn default() -> Self {
53219                Self {
53220                    networks: Err("no value supplied for networks".to_string()),
53221                    operator: Err("no value supplied for operator".to_string()),
53222                    type_: Err("no value supplied for type_".to_string()),
53223                }
53224            }
53225        }
53226        impl SolNetworkCriterion {
53227            pub fn networks<T>(mut self, value: T) -> Self
53228            where
53229                T: ::std::convert::TryInto<::std::vec::Vec<super::SolNetworkCriterionNetworksItem>>,
53230                T::Error: ::std::fmt::Display,
53231            {
53232                self.networks = value
53233                    .try_into()
53234                    .map_err(|e| format!("error converting supplied value for networks: {}", e));
53235                self
53236            }
53237            pub fn operator<T>(mut self, value: T) -> Self
53238            where
53239                T: ::std::convert::TryInto<super::SolNetworkCriterionOperator>,
53240                T::Error: ::std::fmt::Display,
53241            {
53242                self.operator = value
53243                    .try_into()
53244                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
53245                self
53246            }
53247            pub fn type_<T>(mut self, value: T) -> Self
53248            where
53249                T: ::std::convert::TryInto<super::SolNetworkCriterionType>,
53250                T::Error: ::std::fmt::Display,
53251            {
53252                self.type_ = value
53253                    .try_into()
53254                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
53255                self
53256            }
53257        }
53258        impl ::std::convert::TryFrom<SolNetworkCriterion> for super::SolNetworkCriterion {
53259            type Error = super::error::ConversionError;
53260            fn try_from(
53261                value: SolNetworkCriterion,
53262            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53263                Ok(Self {
53264                    networks: value.networks?,
53265                    operator: value.operator?,
53266                    type_: value.type_?,
53267                })
53268            }
53269        }
53270        impl ::std::convert::From<super::SolNetworkCriterion> for SolNetworkCriterion {
53271            fn from(value: super::SolNetworkCriterion) -> Self {
53272                Self {
53273                    networks: Ok(value.networks),
53274                    operator: Ok(value.operator),
53275                    type_: Ok(value.type_),
53276                }
53277            }
53278        }
53279        #[derive(Clone, Debug)]
53280        pub struct SolValueCriterion {
53281            operator:
53282                ::std::result::Result<super::SolValueCriterionOperator, ::std::string::String>,
53283            sol_value: ::std::result::Result<::std::string::String, ::std::string::String>,
53284            type_: ::std::result::Result<super::SolValueCriterionType, ::std::string::String>,
53285        }
53286        impl ::std::default::Default for SolValueCriterion {
53287            fn default() -> Self {
53288                Self {
53289                    operator: Err("no value supplied for operator".to_string()),
53290                    sol_value: Err("no value supplied for sol_value".to_string()),
53291                    type_: Err("no value supplied for type_".to_string()),
53292                }
53293            }
53294        }
53295        impl SolValueCriterion {
53296            pub fn operator<T>(mut self, value: T) -> Self
53297            where
53298                T: ::std::convert::TryInto<super::SolValueCriterionOperator>,
53299                T::Error: ::std::fmt::Display,
53300            {
53301                self.operator = value
53302                    .try_into()
53303                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
53304                self
53305            }
53306            pub fn sol_value<T>(mut self, value: T) -> Self
53307            where
53308                T: ::std::convert::TryInto<::std::string::String>,
53309                T::Error: ::std::fmt::Display,
53310            {
53311                self.sol_value = value
53312                    .try_into()
53313                    .map_err(|e| format!("error converting supplied value for sol_value: {}", e));
53314                self
53315            }
53316            pub fn type_<T>(mut self, value: T) -> Self
53317            where
53318                T: ::std::convert::TryInto<super::SolValueCriterionType>,
53319                T::Error: ::std::fmt::Display,
53320            {
53321                self.type_ = value
53322                    .try_into()
53323                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
53324                self
53325            }
53326        }
53327        impl ::std::convert::TryFrom<SolValueCriterion> for super::SolValueCriterion {
53328            type Error = super::error::ConversionError;
53329            fn try_from(
53330                value: SolValueCriterion,
53331            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53332                Ok(Self {
53333                    operator: value.operator?,
53334                    sol_value: value.sol_value?,
53335                    type_: value.type_?,
53336                })
53337            }
53338        }
53339        impl ::std::convert::From<super::SolValueCriterion> for SolValueCriterion {
53340            fn from(value: super::SolValueCriterion) -> Self {
53341                Self {
53342                    operator: Ok(value.operator),
53343                    sol_value: Ok(value.sol_value),
53344                    type_: Ok(value.type_),
53345                }
53346            }
53347        }
53348        #[derive(Clone, Debug)]
53349        pub struct SolanaAccount {
53350            address: ::std::result::Result<super::SolanaAccountAddress, ::std::string::String>,
53351            created_at: ::std::result::Result<
53352                ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
53353                ::std::string::String,
53354            >,
53355            name: ::std::result::Result<
53356                ::std::option::Option<super::SolanaAccountName>,
53357                ::std::string::String,
53358            >,
53359            policies: ::std::result::Result<
53360                ::std::vec::Vec<super::SolanaAccountPoliciesItem>,
53361                ::std::string::String,
53362            >,
53363            updated_at: ::std::result::Result<
53364                ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
53365                ::std::string::String,
53366            >,
53367        }
53368        impl ::std::default::Default for SolanaAccount {
53369            fn default() -> Self {
53370                Self {
53371                    address: Err("no value supplied for address".to_string()),
53372                    created_at: Ok(Default::default()),
53373                    name: Ok(Default::default()),
53374                    policies: Ok(Default::default()),
53375                    updated_at: Ok(Default::default()),
53376                }
53377            }
53378        }
53379        impl SolanaAccount {
53380            pub fn address<T>(mut self, value: T) -> Self
53381            where
53382                T: ::std::convert::TryInto<super::SolanaAccountAddress>,
53383                T::Error: ::std::fmt::Display,
53384            {
53385                self.address = value
53386                    .try_into()
53387                    .map_err(|e| format!("error converting supplied value for address: {}", e));
53388                self
53389            }
53390            pub fn created_at<T>(mut self, value: T) -> Self
53391            where
53392                T: ::std::convert::TryInto<
53393                    ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
53394                >,
53395                T::Error: ::std::fmt::Display,
53396            {
53397                self.created_at = value
53398                    .try_into()
53399                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
53400                self
53401            }
53402            pub fn name<T>(mut self, value: T) -> Self
53403            where
53404                T: ::std::convert::TryInto<::std::option::Option<super::SolanaAccountName>>,
53405                T::Error: ::std::fmt::Display,
53406            {
53407                self.name = value
53408                    .try_into()
53409                    .map_err(|e| format!("error converting supplied value for name: {}", e));
53410                self
53411            }
53412            pub fn policies<T>(mut self, value: T) -> Self
53413            where
53414                T: ::std::convert::TryInto<::std::vec::Vec<super::SolanaAccountPoliciesItem>>,
53415                T::Error: ::std::fmt::Display,
53416            {
53417                self.policies = value
53418                    .try_into()
53419                    .map_err(|e| format!("error converting supplied value for policies: {}", e));
53420                self
53421            }
53422            pub fn updated_at<T>(mut self, value: T) -> Self
53423            where
53424                T: ::std::convert::TryInto<
53425                    ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
53426                >,
53427                T::Error: ::std::fmt::Display,
53428            {
53429                self.updated_at = value
53430                    .try_into()
53431                    .map_err(|e| format!("error converting supplied value for updated_at: {}", e));
53432                self
53433            }
53434        }
53435        impl ::std::convert::TryFrom<SolanaAccount> for super::SolanaAccount {
53436            type Error = super::error::ConversionError;
53437            fn try_from(
53438                value: SolanaAccount,
53439            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53440                Ok(Self {
53441                    address: value.address?,
53442                    created_at: value.created_at?,
53443                    name: value.name?,
53444                    policies: value.policies?,
53445                    updated_at: value.updated_at?,
53446                })
53447            }
53448        }
53449        impl ::std::convert::From<super::SolanaAccount> for SolanaAccount {
53450            fn from(value: super::SolanaAccount) -> Self {
53451                Self {
53452                    address: Ok(value.address),
53453                    created_at: Ok(value.created_at),
53454                    name: Ok(value.name),
53455                    policies: Ok(value.policies),
53456                    updated_at: Ok(value.updated_at),
53457                }
53458            }
53459        }
53460        #[derive(Clone, Debug)]
53461        pub struct SolanaToken {
53462            mint_address:
53463                ::std::result::Result<super::SolanaTokenMintAddress, ::std::string::String>,
53464            name: ::std::result::Result<
53465                ::std::option::Option<::std::string::String>,
53466                ::std::string::String,
53467            >,
53468            symbol: ::std::result::Result<
53469                ::std::option::Option<::std::string::String>,
53470                ::std::string::String,
53471            >,
53472        }
53473        impl ::std::default::Default for SolanaToken {
53474            fn default() -> Self {
53475                Self {
53476                    mint_address: Err("no value supplied for mint_address".to_string()),
53477                    name: Ok(Default::default()),
53478                    symbol: Ok(Default::default()),
53479                }
53480            }
53481        }
53482        impl SolanaToken {
53483            pub fn mint_address<T>(mut self, value: T) -> Self
53484            where
53485                T: ::std::convert::TryInto<super::SolanaTokenMintAddress>,
53486                T::Error: ::std::fmt::Display,
53487            {
53488                self.mint_address = value.try_into().map_err(|e| {
53489                    format!("error converting supplied value for mint_address: {}", e)
53490                });
53491                self
53492            }
53493            pub fn name<T>(mut self, value: T) -> Self
53494            where
53495                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
53496                T::Error: ::std::fmt::Display,
53497            {
53498                self.name = value
53499                    .try_into()
53500                    .map_err(|e| format!("error converting supplied value for name: {}", e));
53501                self
53502            }
53503            pub fn symbol<T>(mut self, value: T) -> Self
53504            where
53505                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
53506                T::Error: ::std::fmt::Display,
53507            {
53508                self.symbol = value
53509                    .try_into()
53510                    .map_err(|e| format!("error converting supplied value for symbol: {}", e));
53511                self
53512            }
53513        }
53514        impl ::std::convert::TryFrom<SolanaToken> for super::SolanaToken {
53515            type Error = super::error::ConversionError;
53516            fn try_from(
53517                value: SolanaToken,
53518            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53519                Ok(Self {
53520                    mint_address: value.mint_address?,
53521                    name: value.name?,
53522                    symbol: value.symbol?,
53523                })
53524            }
53525        }
53526        impl ::std::convert::From<super::SolanaToken> for SolanaToken {
53527            fn from(value: super::SolanaToken) -> Self {
53528                Self {
53529                    mint_address: Ok(value.mint_address),
53530                    name: Ok(value.name),
53531                    symbol: Ok(value.symbol),
53532                }
53533            }
53534        }
53535        #[derive(Clone, Debug)]
53536        pub struct SolanaTokenAmount {
53537            amount: ::std::result::Result<super::SolanaTokenAmountAmount, ::std::string::String>,
53538            decimals: ::std::result::Result<i64, ::std::string::String>,
53539        }
53540        impl ::std::default::Default for SolanaTokenAmount {
53541            fn default() -> Self {
53542                Self {
53543                    amount: Err("no value supplied for amount".to_string()),
53544                    decimals: Err("no value supplied for decimals".to_string()),
53545                }
53546            }
53547        }
53548        impl SolanaTokenAmount {
53549            pub fn amount<T>(mut self, value: T) -> Self
53550            where
53551                T: ::std::convert::TryInto<super::SolanaTokenAmountAmount>,
53552                T::Error: ::std::fmt::Display,
53553            {
53554                self.amount = value
53555                    .try_into()
53556                    .map_err(|e| format!("error converting supplied value for amount: {}", e));
53557                self
53558            }
53559            pub fn decimals<T>(mut self, value: T) -> Self
53560            where
53561                T: ::std::convert::TryInto<i64>,
53562                T::Error: ::std::fmt::Display,
53563            {
53564                self.decimals = value
53565                    .try_into()
53566                    .map_err(|e| format!("error converting supplied value for decimals: {}", e));
53567                self
53568            }
53569        }
53570        impl ::std::convert::TryFrom<SolanaTokenAmount> for super::SolanaTokenAmount {
53571            type Error = super::error::ConversionError;
53572            fn try_from(
53573                value: SolanaTokenAmount,
53574            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53575                Ok(Self {
53576                    amount: value.amount?,
53577                    decimals: value.decimals?,
53578                })
53579            }
53580        }
53581        impl ::std::convert::From<super::SolanaTokenAmount> for SolanaTokenAmount {
53582            fn from(value: super::SolanaTokenAmount) -> Self {
53583                Self {
53584                    amount: Ok(value.amount),
53585                    decimals: Ok(value.decimals),
53586                }
53587            }
53588        }
53589        #[derive(Clone, Debug)]
53590        pub struct SolanaTokenBalance {
53591            amount: ::std::result::Result<super::SolanaTokenAmount, ::std::string::String>,
53592            token: ::std::result::Result<super::SolanaToken, ::std::string::String>,
53593        }
53594        impl ::std::default::Default for SolanaTokenBalance {
53595            fn default() -> Self {
53596                Self {
53597                    amount: Err("no value supplied for amount".to_string()),
53598                    token: Err("no value supplied for token".to_string()),
53599                }
53600            }
53601        }
53602        impl SolanaTokenBalance {
53603            pub fn amount<T>(mut self, value: T) -> Self
53604            where
53605                T: ::std::convert::TryInto<super::SolanaTokenAmount>,
53606                T::Error: ::std::fmt::Display,
53607            {
53608                self.amount = value
53609                    .try_into()
53610                    .map_err(|e| format!("error converting supplied value for amount: {}", e));
53611                self
53612            }
53613            pub fn token<T>(mut self, value: T) -> Self
53614            where
53615                T: ::std::convert::TryInto<super::SolanaToken>,
53616                T::Error: ::std::fmt::Display,
53617            {
53618                self.token = value
53619                    .try_into()
53620                    .map_err(|e| format!("error converting supplied value for token: {}", e));
53621                self
53622            }
53623        }
53624        impl ::std::convert::TryFrom<SolanaTokenBalance> for super::SolanaTokenBalance {
53625            type Error = super::error::ConversionError;
53626            fn try_from(
53627                value: SolanaTokenBalance,
53628            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53629                Ok(Self {
53630                    amount: value.amount?,
53631                    token: value.token?,
53632                })
53633            }
53634        }
53635        impl ::std::convert::From<super::SolanaTokenBalance> for SolanaTokenBalance {
53636            fn from(value: super::SolanaTokenBalance) -> Self {
53637                Self {
53638                    amount: Ok(value.amount),
53639                    token: Ok(value.token),
53640                }
53641            }
53642        }
53643        #[derive(Clone, Debug)]
53644        pub struct SpendPermission {
53645            account: ::std::result::Result<super::SpendPermissionAccount, ::std::string::String>,
53646            allowance: ::std::result::Result<::std::string::String, ::std::string::String>,
53647            end: ::std::result::Result<::std::string::String, ::std::string::String>,
53648            extra_data: ::std::result::Result<::std::string::String, ::std::string::String>,
53649            period: ::std::result::Result<::std::string::String, ::std::string::String>,
53650            salt: ::std::result::Result<::std::string::String, ::std::string::String>,
53651            spender: ::std::result::Result<super::SpendPermissionSpender, ::std::string::String>,
53652            start: ::std::result::Result<::std::string::String, ::std::string::String>,
53653            token: ::std::result::Result<super::SpendPermissionToken, ::std::string::String>,
53654        }
53655        impl ::std::default::Default for SpendPermission {
53656            fn default() -> Self {
53657                Self {
53658                    account: Err("no value supplied for account".to_string()),
53659                    allowance: Err("no value supplied for allowance".to_string()),
53660                    end: Err("no value supplied for end".to_string()),
53661                    extra_data: Err("no value supplied for extra_data".to_string()),
53662                    period: Err("no value supplied for period".to_string()),
53663                    salt: Err("no value supplied for salt".to_string()),
53664                    spender: Err("no value supplied for spender".to_string()),
53665                    start: Err("no value supplied for start".to_string()),
53666                    token: Err("no value supplied for token".to_string()),
53667                }
53668            }
53669        }
53670        impl SpendPermission {
53671            pub fn account<T>(mut self, value: T) -> Self
53672            where
53673                T: ::std::convert::TryInto<super::SpendPermissionAccount>,
53674                T::Error: ::std::fmt::Display,
53675            {
53676                self.account = value
53677                    .try_into()
53678                    .map_err(|e| format!("error converting supplied value for account: {}", e));
53679                self
53680            }
53681            pub fn allowance<T>(mut self, value: T) -> Self
53682            where
53683                T: ::std::convert::TryInto<::std::string::String>,
53684                T::Error: ::std::fmt::Display,
53685            {
53686                self.allowance = value
53687                    .try_into()
53688                    .map_err(|e| format!("error converting supplied value for allowance: {}", e));
53689                self
53690            }
53691            pub fn end<T>(mut self, value: T) -> Self
53692            where
53693                T: ::std::convert::TryInto<::std::string::String>,
53694                T::Error: ::std::fmt::Display,
53695            {
53696                self.end = value
53697                    .try_into()
53698                    .map_err(|e| format!("error converting supplied value for end: {}", e));
53699                self
53700            }
53701            pub fn extra_data<T>(mut self, value: T) -> Self
53702            where
53703                T: ::std::convert::TryInto<::std::string::String>,
53704                T::Error: ::std::fmt::Display,
53705            {
53706                self.extra_data = value
53707                    .try_into()
53708                    .map_err(|e| format!("error converting supplied value for extra_data: {}", e));
53709                self
53710            }
53711            pub fn period<T>(mut self, value: T) -> Self
53712            where
53713                T: ::std::convert::TryInto<::std::string::String>,
53714                T::Error: ::std::fmt::Display,
53715            {
53716                self.period = value
53717                    .try_into()
53718                    .map_err(|e| format!("error converting supplied value for period: {}", e));
53719                self
53720            }
53721            pub fn salt<T>(mut self, value: T) -> Self
53722            where
53723                T: ::std::convert::TryInto<::std::string::String>,
53724                T::Error: ::std::fmt::Display,
53725            {
53726                self.salt = value
53727                    .try_into()
53728                    .map_err(|e| format!("error converting supplied value for salt: {}", e));
53729                self
53730            }
53731            pub fn spender<T>(mut self, value: T) -> Self
53732            where
53733                T: ::std::convert::TryInto<super::SpendPermissionSpender>,
53734                T::Error: ::std::fmt::Display,
53735            {
53736                self.spender = value
53737                    .try_into()
53738                    .map_err(|e| format!("error converting supplied value for spender: {}", e));
53739                self
53740            }
53741            pub fn start<T>(mut self, value: T) -> Self
53742            where
53743                T: ::std::convert::TryInto<::std::string::String>,
53744                T::Error: ::std::fmt::Display,
53745            {
53746                self.start = value
53747                    .try_into()
53748                    .map_err(|e| format!("error converting supplied value for start: {}", e));
53749                self
53750            }
53751            pub fn token<T>(mut self, value: T) -> Self
53752            where
53753                T: ::std::convert::TryInto<super::SpendPermissionToken>,
53754                T::Error: ::std::fmt::Display,
53755            {
53756                self.token = value
53757                    .try_into()
53758                    .map_err(|e| format!("error converting supplied value for token: {}", e));
53759                self
53760            }
53761        }
53762        impl ::std::convert::TryFrom<SpendPermission> for super::SpendPermission {
53763            type Error = super::error::ConversionError;
53764            fn try_from(
53765                value: SpendPermission,
53766            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53767                Ok(Self {
53768                    account: value.account?,
53769                    allowance: value.allowance?,
53770                    end: value.end?,
53771                    extra_data: value.extra_data?,
53772                    period: value.period?,
53773                    salt: value.salt?,
53774                    spender: value.spender?,
53775                    start: value.start?,
53776                    token: value.token?,
53777                })
53778            }
53779        }
53780        impl ::std::convert::From<super::SpendPermission> for SpendPermission {
53781            fn from(value: super::SpendPermission) -> Self {
53782                Self {
53783                    account: Ok(value.account),
53784                    allowance: Ok(value.allowance),
53785                    end: Ok(value.end),
53786                    extra_data: Ok(value.extra_data),
53787                    period: Ok(value.period),
53788                    salt: Ok(value.salt),
53789                    spender: Ok(value.spender),
53790                    start: Ok(value.start),
53791                    token: Ok(value.token),
53792                }
53793            }
53794        }
53795        #[derive(Clone, Debug)]
53796        pub struct SpendPermissionResponseObject {
53797            created_at: ::std::result::Result<
53798                ::chrono::DateTime<::chrono::offset::Utc>,
53799                ::std::string::String,
53800            >,
53801            network: ::std::result::Result<super::SpendPermissionNetwork, ::std::string::String>,
53802            permission: ::std::result::Result<super::SpendPermission, ::std::string::String>,
53803            permission_hash: ::std::result::Result<::std::string::String, ::std::string::String>,
53804            revoked: ::std::result::Result<bool, ::std::string::String>,
53805            revoked_at: ::std::result::Result<
53806                ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
53807                ::std::string::String,
53808            >,
53809        }
53810        impl ::std::default::Default for SpendPermissionResponseObject {
53811            fn default() -> Self {
53812                Self {
53813                    created_at: Err("no value supplied for created_at".to_string()),
53814                    network: Err("no value supplied for network".to_string()),
53815                    permission: Err("no value supplied for permission".to_string()),
53816                    permission_hash: Err("no value supplied for permission_hash".to_string()),
53817                    revoked: Err("no value supplied for revoked".to_string()),
53818                    revoked_at: Ok(Default::default()),
53819                }
53820            }
53821        }
53822        impl SpendPermissionResponseObject {
53823            pub fn created_at<T>(mut self, value: T) -> Self
53824            where
53825                T: ::std::convert::TryInto<::chrono::DateTime<::chrono::offset::Utc>>,
53826                T::Error: ::std::fmt::Display,
53827            {
53828                self.created_at = value
53829                    .try_into()
53830                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
53831                self
53832            }
53833            pub fn network<T>(mut self, value: T) -> Self
53834            where
53835                T: ::std::convert::TryInto<super::SpendPermissionNetwork>,
53836                T::Error: ::std::fmt::Display,
53837            {
53838                self.network = value
53839                    .try_into()
53840                    .map_err(|e| format!("error converting supplied value for network: {}", e));
53841                self
53842            }
53843            pub fn permission<T>(mut self, value: T) -> Self
53844            where
53845                T: ::std::convert::TryInto<super::SpendPermission>,
53846                T::Error: ::std::fmt::Display,
53847            {
53848                self.permission = value
53849                    .try_into()
53850                    .map_err(|e| format!("error converting supplied value for permission: {}", e));
53851                self
53852            }
53853            pub fn permission_hash<T>(mut self, value: T) -> Self
53854            where
53855                T: ::std::convert::TryInto<::std::string::String>,
53856                T::Error: ::std::fmt::Display,
53857            {
53858                self.permission_hash = value.try_into().map_err(|e| {
53859                    format!("error converting supplied value for permission_hash: {}", e)
53860                });
53861                self
53862            }
53863            pub fn revoked<T>(mut self, value: T) -> Self
53864            where
53865                T: ::std::convert::TryInto<bool>,
53866                T::Error: ::std::fmt::Display,
53867            {
53868                self.revoked = value
53869                    .try_into()
53870                    .map_err(|e| format!("error converting supplied value for revoked: {}", e));
53871                self
53872            }
53873            pub fn revoked_at<T>(mut self, value: T) -> Self
53874            where
53875                T: ::std::convert::TryInto<
53876                    ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
53877                >,
53878                T::Error: ::std::fmt::Display,
53879            {
53880                self.revoked_at = value
53881                    .try_into()
53882                    .map_err(|e| format!("error converting supplied value for revoked_at: {}", e));
53883                self
53884            }
53885        }
53886        impl ::std::convert::TryFrom<SpendPermissionResponseObject>
53887            for super::SpendPermissionResponseObject
53888        {
53889            type Error = super::error::ConversionError;
53890            fn try_from(
53891                value: SpendPermissionResponseObject,
53892            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53893                Ok(Self {
53894                    created_at: value.created_at?,
53895                    network: value.network?,
53896                    permission: value.permission?,
53897                    permission_hash: value.permission_hash?,
53898                    revoked: value.revoked?,
53899                    revoked_at: value.revoked_at?,
53900                })
53901            }
53902        }
53903        impl ::std::convert::From<super::SpendPermissionResponseObject> for SpendPermissionResponseObject {
53904            fn from(value: super::SpendPermissionResponseObject) -> Self {
53905                Self {
53906                    created_at: Ok(value.created_at),
53907                    network: Ok(value.network),
53908                    permission: Ok(value.permission),
53909                    permission_hash: Ok(value.permission_hash),
53910                    revoked: Ok(value.revoked),
53911                    revoked_at: Ok(value.revoked_at),
53912                }
53913            }
53914        }
53915        #[derive(Clone, Debug)]
53916        pub struct SplAddressCriterion {
53917            addresses: ::std::result::Result<
53918                ::std::vec::Vec<super::SplAddressCriterionAddressesItem>,
53919                ::std::string::String,
53920            >,
53921            operator:
53922                ::std::result::Result<super::SplAddressCriterionOperator, ::std::string::String>,
53923            type_: ::std::result::Result<super::SplAddressCriterionType, ::std::string::String>,
53924        }
53925        impl ::std::default::Default for SplAddressCriterion {
53926            fn default() -> Self {
53927                Self {
53928                    addresses: Err("no value supplied for addresses".to_string()),
53929                    operator: Err("no value supplied for operator".to_string()),
53930                    type_: Err("no value supplied for type_".to_string()),
53931                }
53932            }
53933        }
53934        impl SplAddressCriterion {
53935            pub fn addresses<T>(mut self, value: T) -> Self
53936            where
53937                T: ::std::convert::TryInto<
53938                    ::std::vec::Vec<super::SplAddressCriterionAddressesItem>,
53939                >,
53940                T::Error: ::std::fmt::Display,
53941            {
53942                self.addresses = value
53943                    .try_into()
53944                    .map_err(|e| format!("error converting supplied value for addresses: {}", e));
53945                self
53946            }
53947            pub fn operator<T>(mut self, value: T) -> Self
53948            where
53949                T: ::std::convert::TryInto<super::SplAddressCriterionOperator>,
53950                T::Error: ::std::fmt::Display,
53951            {
53952                self.operator = value
53953                    .try_into()
53954                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
53955                self
53956            }
53957            pub fn type_<T>(mut self, value: T) -> Self
53958            where
53959                T: ::std::convert::TryInto<super::SplAddressCriterionType>,
53960                T::Error: ::std::fmt::Display,
53961            {
53962                self.type_ = value
53963                    .try_into()
53964                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
53965                self
53966            }
53967        }
53968        impl ::std::convert::TryFrom<SplAddressCriterion> for super::SplAddressCriterion {
53969            type Error = super::error::ConversionError;
53970            fn try_from(
53971                value: SplAddressCriterion,
53972            ) -> ::std::result::Result<Self, super::error::ConversionError> {
53973                Ok(Self {
53974                    addresses: value.addresses?,
53975                    operator: value.operator?,
53976                    type_: value.type_?,
53977                })
53978            }
53979        }
53980        impl ::std::convert::From<super::SplAddressCriterion> for SplAddressCriterion {
53981            fn from(value: super::SplAddressCriterion) -> Self {
53982                Self {
53983                    addresses: Ok(value.addresses),
53984                    operator: Ok(value.operator),
53985                    type_: Ok(value.type_),
53986                }
53987            }
53988        }
53989        #[derive(Clone, Debug)]
53990        pub struct SplValueCriterion {
53991            operator:
53992                ::std::result::Result<super::SplValueCriterionOperator, ::std::string::String>,
53993            spl_value: ::std::result::Result<::std::string::String, ::std::string::String>,
53994            type_: ::std::result::Result<super::SplValueCriterionType, ::std::string::String>,
53995        }
53996        impl ::std::default::Default for SplValueCriterion {
53997            fn default() -> Self {
53998                Self {
53999                    operator: Err("no value supplied for operator".to_string()),
54000                    spl_value: Err("no value supplied for spl_value".to_string()),
54001                    type_: Err("no value supplied for type_".to_string()),
54002                }
54003            }
54004        }
54005        impl SplValueCriterion {
54006            pub fn operator<T>(mut self, value: T) -> Self
54007            where
54008                T: ::std::convert::TryInto<super::SplValueCriterionOperator>,
54009                T::Error: ::std::fmt::Display,
54010            {
54011                self.operator = value
54012                    .try_into()
54013                    .map_err(|e| format!("error converting supplied value for operator: {}", e));
54014                self
54015            }
54016            pub fn spl_value<T>(mut self, value: T) -> Self
54017            where
54018                T: ::std::convert::TryInto<::std::string::String>,
54019                T::Error: ::std::fmt::Display,
54020            {
54021                self.spl_value = value
54022                    .try_into()
54023                    .map_err(|e| format!("error converting supplied value for spl_value: {}", e));
54024                self
54025            }
54026            pub fn type_<T>(mut self, value: T) -> Self
54027            where
54028                T: ::std::convert::TryInto<super::SplValueCriterionType>,
54029                T::Error: ::std::fmt::Display,
54030            {
54031                self.type_ = value
54032                    .try_into()
54033                    .map_err(|e| format!("error converting supplied value for type_: {}", e));
54034                self
54035            }
54036        }
54037        impl ::std::convert::TryFrom<SplValueCriterion> for super::SplValueCriterion {
54038            type Error = super::error::ConversionError;
54039            fn try_from(
54040                value: SplValueCriterion,
54041            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54042                Ok(Self {
54043                    operator: value.operator?,
54044                    spl_value: value.spl_value?,
54045                    type_: value.type_?,
54046                })
54047            }
54048        }
54049        impl ::std::convert::From<super::SplValueCriterion> for SplValueCriterion {
54050            fn from(value: super::SplValueCriterion) -> Self {
54051                Self {
54052                    operator: Ok(value.operator),
54053                    spl_value: Ok(value.spl_value),
54054                    type_: Ok(value.type_),
54055                }
54056            }
54057        }
54058        #[derive(Clone, Debug)]
54059        pub struct SupportedX402PaymentKindsResponse {
54060            extensions: ::std::result::Result<
54061                ::std::vec::Vec<::std::string::String>,
54062                ::std::string::String,
54063            >,
54064            kinds: ::std::result::Result<
54065                ::std::vec::Vec<super::X402SupportedPaymentKind>,
54066                ::std::string::String,
54067            >,
54068            signers: ::std::result::Result<
54069                ::std::collections::HashMap<
54070                    ::std::string::String,
54071                    ::std::vec::Vec<::std::string::String>,
54072                >,
54073                ::std::string::String,
54074            >,
54075        }
54076        impl ::std::default::Default for SupportedX402PaymentKindsResponse {
54077            fn default() -> Self {
54078                Self {
54079                    extensions: Err("no value supplied for extensions".to_string()),
54080                    kinds: Err("no value supplied for kinds".to_string()),
54081                    signers: Err("no value supplied for signers".to_string()),
54082                }
54083            }
54084        }
54085        impl SupportedX402PaymentKindsResponse {
54086            pub fn extensions<T>(mut self, value: T) -> Self
54087            where
54088                T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
54089                T::Error: ::std::fmt::Display,
54090            {
54091                self.extensions = value
54092                    .try_into()
54093                    .map_err(|e| format!("error converting supplied value for extensions: {}", e));
54094                self
54095            }
54096            pub fn kinds<T>(mut self, value: T) -> Self
54097            where
54098                T: ::std::convert::TryInto<::std::vec::Vec<super::X402SupportedPaymentKind>>,
54099                T::Error: ::std::fmt::Display,
54100            {
54101                self.kinds = value
54102                    .try_into()
54103                    .map_err(|e| format!("error converting supplied value for kinds: {}", e));
54104                self
54105            }
54106            pub fn signers<T>(mut self, value: T) -> Self
54107            where
54108                T: ::std::convert::TryInto<
54109                    ::std::collections::HashMap<
54110                        ::std::string::String,
54111                        ::std::vec::Vec<::std::string::String>,
54112                    >,
54113                >,
54114                T::Error: ::std::fmt::Display,
54115            {
54116                self.signers = value
54117                    .try_into()
54118                    .map_err(|e| format!("error converting supplied value for signers: {}", e));
54119                self
54120            }
54121        }
54122        impl ::std::convert::TryFrom<SupportedX402PaymentKindsResponse>
54123            for super::SupportedX402PaymentKindsResponse
54124        {
54125            type Error = super::error::ConversionError;
54126            fn try_from(
54127                value: SupportedX402PaymentKindsResponse,
54128            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54129                Ok(Self {
54130                    extensions: value.extensions?,
54131                    kinds: value.kinds?,
54132                    signers: value.signers?,
54133                })
54134            }
54135        }
54136        impl ::std::convert::From<super::SupportedX402PaymentKindsResponse>
54137            for SupportedX402PaymentKindsResponse
54138        {
54139            fn from(value: super::SupportedX402PaymentKindsResponse) -> Self {
54140                Self {
54141                    extensions: Ok(value.extensions),
54142                    kinds: Ok(value.kinds),
54143                    signers: Ok(value.signers),
54144                }
54145            }
54146        }
54147        #[derive(Clone, Debug)]
54148        pub struct SwapUnavailableResponse {
54149            liquidity_available: ::std::result::Result<bool, ::std::string::String>,
54150        }
54151        impl ::std::default::Default for SwapUnavailableResponse {
54152            fn default() -> Self {
54153                Self {
54154                    liquidity_available: Err(
54155                        "no value supplied for liquidity_available".to_string()
54156                    ),
54157                }
54158            }
54159        }
54160        impl SwapUnavailableResponse {
54161            pub fn liquidity_available<T>(mut self, value: T) -> Self
54162            where
54163                T: ::std::convert::TryInto<bool>,
54164                T::Error: ::std::fmt::Display,
54165            {
54166                self.liquidity_available = value.try_into().map_err(|e| {
54167                    format!(
54168                        "error converting supplied value for liquidity_available: {}",
54169                        e
54170                    )
54171                });
54172                self
54173            }
54174        }
54175        impl ::std::convert::TryFrom<SwapUnavailableResponse> for super::SwapUnavailableResponse {
54176            type Error = super::error::ConversionError;
54177            fn try_from(
54178                value: SwapUnavailableResponse,
54179            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54180                Ok(Self {
54181                    liquidity_available: value.liquidity_available?,
54182                })
54183            }
54184        }
54185        impl ::std::convert::From<super::SwapUnavailableResponse> for SwapUnavailableResponse {
54186            fn from(value: super::SwapUnavailableResponse) -> Self {
54187                Self {
54188                    liquidity_available: Ok(value.liquidity_available),
54189                }
54190            }
54191        }
54192        #[derive(Clone, Debug)]
54193        pub struct Token {
54194            contract_address:
54195                ::std::result::Result<super::TokenContractAddress, ::std::string::String>,
54196            name: ::std::result::Result<
54197                ::std::option::Option<::std::string::String>,
54198                ::std::string::String,
54199            >,
54200            network:
54201                ::std::result::Result<super::ListEvmTokenBalancesNetwork, ::std::string::String>,
54202            symbol: ::std::result::Result<
54203                ::std::option::Option<::std::string::String>,
54204                ::std::string::String,
54205            >,
54206        }
54207        impl ::std::default::Default for Token {
54208            fn default() -> Self {
54209                Self {
54210                    contract_address: Err("no value supplied for contract_address".to_string()),
54211                    name: Ok(Default::default()),
54212                    network: Err("no value supplied for network".to_string()),
54213                    symbol: Ok(Default::default()),
54214                }
54215            }
54216        }
54217        impl Token {
54218            pub fn contract_address<T>(mut self, value: T) -> Self
54219            where
54220                T: ::std::convert::TryInto<super::TokenContractAddress>,
54221                T::Error: ::std::fmt::Display,
54222            {
54223                self.contract_address = value.try_into().map_err(|e| {
54224                    format!(
54225                        "error converting supplied value for contract_address: {}",
54226                        e
54227                    )
54228                });
54229                self
54230            }
54231            pub fn name<T>(mut self, value: T) -> Self
54232            where
54233                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
54234                T::Error: ::std::fmt::Display,
54235            {
54236                self.name = value
54237                    .try_into()
54238                    .map_err(|e| format!("error converting supplied value for name: {}", e));
54239                self
54240            }
54241            pub fn network<T>(mut self, value: T) -> Self
54242            where
54243                T: ::std::convert::TryInto<super::ListEvmTokenBalancesNetwork>,
54244                T::Error: ::std::fmt::Display,
54245            {
54246                self.network = value
54247                    .try_into()
54248                    .map_err(|e| format!("error converting supplied value for network: {}", e));
54249                self
54250            }
54251            pub fn symbol<T>(mut self, value: T) -> Self
54252            where
54253                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
54254                T::Error: ::std::fmt::Display,
54255            {
54256                self.symbol = value
54257                    .try_into()
54258                    .map_err(|e| format!("error converting supplied value for symbol: {}", e));
54259                self
54260            }
54261        }
54262        impl ::std::convert::TryFrom<Token> for super::Token {
54263            type Error = super::error::ConversionError;
54264            fn try_from(
54265                value: Token,
54266            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54267                Ok(Self {
54268                    contract_address: value.contract_address?,
54269                    name: value.name?,
54270                    network: value.network?,
54271                    symbol: value.symbol?,
54272                })
54273            }
54274        }
54275        impl ::std::convert::From<super::Token> for Token {
54276            fn from(value: super::Token) -> Self {
54277                Self {
54278                    contract_address: Ok(value.contract_address),
54279                    name: Ok(value.name),
54280                    network: Ok(value.network),
54281                    symbol: Ok(value.symbol),
54282                }
54283            }
54284        }
54285        #[derive(Clone, Debug)]
54286        pub struct TokenAmount {
54287            amount: ::std::result::Result<super::TokenAmountAmount, ::std::string::String>,
54288            decimals: ::std::result::Result<i64, ::std::string::String>,
54289        }
54290        impl ::std::default::Default for TokenAmount {
54291            fn default() -> Self {
54292                Self {
54293                    amount: Err("no value supplied for amount".to_string()),
54294                    decimals: Err("no value supplied for decimals".to_string()),
54295                }
54296            }
54297        }
54298        impl TokenAmount {
54299            pub fn amount<T>(mut self, value: T) -> Self
54300            where
54301                T: ::std::convert::TryInto<super::TokenAmountAmount>,
54302                T::Error: ::std::fmt::Display,
54303            {
54304                self.amount = value
54305                    .try_into()
54306                    .map_err(|e| format!("error converting supplied value for amount: {}", e));
54307                self
54308            }
54309            pub fn decimals<T>(mut self, value: T) -> Self
54310            where
54311                T: ::std::convert::TryInto<i64>,
54312                T::Error: ::std::fmt::Display,
54313            {
54314                self.decimals = value
54315                    .try_into()
54316                    .map_err(|e| format!("error converting supplied value for decimals: {}", e));
54317                self
54318            }
54319        }
54320        impl ::std::convert::TryFrom<TokenAmount> for super::TokenAmount {
54321            type Error = super::error::ConversionError;
54322            fn try_from(
54323                value: TokenAmount,
54324            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54325                Ok(Self {
54326                    amount: value.amount?,
54327                    decimals: value.decimals?,
54328                })
54329            }
54330        }
54331        impl ::std::convert::From<super::TokenAmount> for TokenAmount {
54332            fn from(value: super::TokenAmount) -> Self {
54333                Self {
54334                    amount: Ok(value.amount),
54335                    decimals: Ok(value.decimals),
54336                }
54337            }
54338        }
54339        #[derive(Clone, Debug)]
54340        pub struct TokenBalance {
54341            amount: ::std::result::Result<super::TokenAmount, ::std::string::String>,
54342            token: ::std::result::Result<super::Token, ::std::string::String>,
54343        }
54344        impl ::std::default::Default for TokenBalance {
54345            fn default() -> Self {
54346                Self {
54347                    amount: Err("no value supplied for amount".to_string()),
54348                    token: Err("no value supplied for token".to_string()),
54349                }
54350            }
54351        }
54352        impl TokenBalance {
54353            pub fn amount<T>(mut self, value: T) -> Self
54354            where
54355                T: ::std::convert::TryInto<super::TokenAmount>,
54356                T::Error: ::std::fmt::Display,
54357            {
54358                self.amount = value
54359                    .try_into()
54360                    .map_err(|e| format!("error converting supplied value for amount: {}", e));
54361                self
54362            }
54363            pub fn token<T>(mut self, value: T) -> Self
54364            where
54365                T: ::std::convert::TryInto<super::Token>,
54366                T::Error: ::std::fmt::Display,
54367            {
54368                self.token = value
54369                    .try_into()
54370                    .map_err(|e| format!("error converting supplied value for token: {}", e));
54371                self
54372            }
54373        }
54374        impl ::std::convert::TryFrom<TokenBalance> for super::TokenBalance {
54375            type Error = super::error::ConversionError;
54376            fn try_from(
54377                value: TokenBalance,
54378            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54379                Ok(Self {
54380                    amount: value.amount?,
54381                    token: value.token?,
54382                })
54383            }
54384        }
54385        impl ::std::convert::From<super::TokenBalance> for TokenBalance {
54386            fn from(value: super::TokenBalance) -> Self {
54387                Self {
54388                    amount: Ok(value.amount),
54389                    token: Ok(value.token),
54390                }
54391            }
54392        }
54393        #[derive(Clone, Debug)]
54394        pub struct TokenFee {
54395            amount: ::std::result::Result<super::TokenFeeAmount, ::std::string::String>,
54396            token: ::std::result::Result<super::TokenFeeToken, ::std::string::String>,
54397        }
54398        impl ::std::default::Default for TokenFee {
54399            fn default() -> Self {
54400                Self {
54401                    amount: Err("no value supplied for amount".to_string()),
54402                    token: Err("no value supplied for token".to_string()),
54403                }
54404            }
54405        }
54406        impl TokenFee {
54407            pub fn amount<T>(mut self, value: T) -> Self
54408            where
54409                T: ::std::convert::TryInto<super::TokenFeeAmount>,
54410                T::Error: ::std::fmt::Display,
54411            {
54412                self.amount = value
54413                    .try_into()
54414                    .map_err(|e| format!("error converting supplied value for amount: {}", e));
54415                self
54416            }
54417            pub fn token<T>(mut self, value: T) -> Self
54418            where
54419                T: ::std::convert::TryInto<super::TokenFeeToken>,
54420                T::Error: ::std::fmt::Display,
54421            {
54422                self.token = value
54423                    .try_into()
54424                    .map_err(|e| format!("error converting supplied value for token: {}", e));
54425                self
54426            }
54427        }
54428        impl ::std::convert::TryFrom<TokenFee> for super::TokenFee {
54429            type Error = super::error::ConversionError;
54430            fn try_from(
54431                value: TokenFee,
54432            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54433                Ok(Self {
54434                    amount: value.amount?,
54435                    token: value.token?,
54436                })
54437            }
54438        }
54439        impl ::std::convert::From<super::TokenFee> for TokenFee {
54440            fn from(value: super::TokenFee) -> Self {
54441                Self {
54442                    amount: Ok(value.amount),
54443                    token: Ok(value.token),
54444                }
54445            }
54446        }
54447        #[derive(Clone, Debug)]
54448        pub struct UpdateEvmAccountBody {
54449            account_policy: ::std::result::Result<
54450                ::std::option::Option<super::UpdateEvmAccountBodyAccountPolicy>,
54451                ::std::string::String,
54452            >,
54453            name: ::std::result::Result<
54454                ::std::option::Option<super::UpdateEvmAccountBodyName>,
54455                ::std::string::String,
54456            >,
54457        }
54458        impl ::std::default::Default for UpdateEvmAccountBody {
54459            fn default() -> Self {
54460                Self {
54461                    account_policy: Ok(Default::default()),
54462                    name: Ok(Default::default()),
54463                }
54464            }
54465        }
54466        impl UpdateEvmAccountBody {
54467            pub fn account_policy<T>(mut self, value: T) -> Self
54468            where
54469                T: ::std::convert::TryInto<
54470                    ::std::option::Option<super::UpdateEvmAccountBodyAccountPolicy>,
54471                >,
54472                T::Error: ::std::fmt::Display,
54473            {
54474                self.account_policy = value.try_into().map_err(|e| {
54475                    format!("error converting supplied value for account_policy: {}", e)
54476                });
54477                self
54478            }
54479            pub fn name<T>(mut self, value: T) -> Self
54480            where
54481                T: ::std::convert::TryInto<::std::option::Option<super::UpdateEvmAccountBodyName>>,
54482                T::Error: ::std::fmt::Display,
54483            {
54484                self.name = value
54485                    .try_into()
54486                    .map_err(|e| format!("error converting supplied value for name: {}", e));
54487                self
54488            }
54489        }
54490        impl ::std::convert::TryFrom<UpdateEvmAccountBody> for super::UpdateEvmAccountBody {
54491            type Error = super::error::ConversionError;
54492            fn try_from(
54493                value: UpdateEvmAccountBody,
54494            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54495                Ok(Self {
54496                    account_policy: value.account_policy?,
54497                    name: value.name?,
54498                })
54499            }
54500        }
54501        impl ::std::convert::From<super::UpdateEvmAccountBody> for UpdateEvmAccountBody {
54502            fn from(value: super::UpdateEvmAccountBody) -> Self {
54503                Self {
54504                    account_policy: Ok(value.account_policy),
54505                    name: Ok(value.name),
54506                }
54507            }
54508        }
54509        #[derive(Clone, Debug)]
54510        pub struct UpdateEvmSmartAccountBody {
54511            name: ::std::result::Result<
54512                ::std::option::Option<super::UpdateEvmSmartAccountBodyName>,
54513                ::std::string::String,
54514            >,
54515        }
54516        impl ::std::default::Default for UpdateEvmSmartAccountBody {
54517            fn default() -> Self {
54518                Self {
54519                    name: Ok(Default::default()),
54520                }
54521            }
54522        }
54523        impl UpdateEvmSmartAccountBody {
54524            pub fn name<T>(mut self, value: T) -> Self
54525            where
54526                T: ::std::convert::TryInto<
54527                    ::std::option::Option<super::UpdateEvmSmartAccountBodyName>,
54528                >,
54529                T::Error: ::std::fmt::Display,
54530            {
54531                self.name = value
54532                    .try_into()
54533                    .map_err(|e| format!("error converting supplied value for name: {}", e));
54534                self
54535            }
54536        }
54537        impl ::std::convert::TryFrom<UpdateEvmSmartAccountBody> for super::UpdateEvmSmartAccountBody {
54538            type Error = super::error::ConversionError;
54539            fn try_from(
54540                value: UpdateEvmSmartAccountBody,
54541            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54542                Ok(Self { name: value.name? })
54543            }
54544        }
54545        impl ::std::convert::From<super::UpdateEvmSmartAccountBody> for UpdateEvmSmartAccountBody {
54546            fn from(value: super::UpdateEvmSmartAccountBody) -> Self {
54547                Self {
54548                    name: Ok(value.name),
54549                }
54550            }
54551        }
54552        #[derive(Clone, Debug)]
54553        pub struct UpdatePolicyBody {
54554            description: ::std::result::Result<
54555                ::std::option::Option<super::UpdatePolicyBodyDescription>,
54556                ::std::string::String,
54557            >,
54558            rules: ::std::result::Result<::std::vec::Vec<super::Rule>, ::std::string::String>,
54559        }
54560        impl ::std::default::Default for UpdatePolicyBody {
54561            fn default() -> Self {
54562                Self {
54563                    description: Ok(Default::default()),
54564                    rules: Err("no value supplied for rules".to_string()),
54565                }
54566            }
54567        }
54568        impl UpdatePolicyBody {
54569            pub fn description<T>(mut self, value: T) -> Self
54570            where
54571                T: ::std::convert::TryInto<
54572                    ::std::option::Option<super::UpdatePolicyBodyDescription>,
54573                >,
54574                T::Error: ::std::fmt::Display,
54575            {
54576                self.description = value
54577                    .try_into()
54578                    .map_err(|e| format!("error converting supplied value for description: {}", e));
54579                self
54580            }
54581            pub fn rules<T>(mut self, value: T) -> Self
54582            where
54583                T: ::std::convert::TryInto<::std::vec::Vec<super::Rule>>,
54584                T::Error: ::std::fmt::Display,
54585            {
54586                self.rules = value
54587                    .try_into()
54588                    .map_err(|e| format!("error converting supplied value for rules: {}", e));
54589                self
54590            }
54591        }
54592        impl ::std::convert::TryFrom<UpdatePolicyBody> for super::UpdatePolicyBody {
54593            type Error = super::error::ConversionError;
54594            fn try_from(
54595                value: UpdatePolicyBody,
54596            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54597                Ok(Self {
54598                    description: value.description?,
54599                    rules: value.rules?,
54600                })
54601            }
54602        }
54603        impl ::std::convert::From<super::UpdatePolicyBody> for UpdatePolicyBody {
54604            fn from(value: super::UpdatePolicyBody) -> Self {
54605                Self {
54606                    description: Ok(value.description),
54607                    rules: Ok(value.rules),
54608                }
54609            }
54610        }
54611        #[derive(Clone, Debug)]
54612        pub struct UpdateSolanaAccountBody {
54613            account_policy: ::std::result::Result<
54614                ::std::option::Option<super::UpdateSolanaAccountBodyAccountPolicy>,
54615                ::std::string::String,
54616            >,
54617            name: ::std::result::Result<
54618                ::std::option::Option<super::UpdateSolanaAccountBodyName>,
54619                ::std::string::String,
54620            >,
54621        }
54622        impl ::std::default::Default for UpdateSolanaAccountBody {
54623            fn default() -> Self {
54624                Self {
54625                    account_policy: Ok(Default::default()),
54626                    name: Ok(Default::default()),
54627                }
54628            }
54629        }
54630        impl UpdateSolanaAccountBody {
54631            pub fn account_policy<T>(mut self, value: T) -> Self
54632            where
54633                T: ::std::convert::TryInto<
54634                    ::std::option::Option<super::UpdateSolanaAccountBodyAccountPolicy>,
54635                >,
54636                T::Error: ::std::fmt::Display,
54637            {
54638                self.account_policy = value.try_into().map_err(|e| {
54639                    format!("error converting supplied value for account_policy: {}", e)
54640                });
54641                self
54642            }
54643            pub fn name<T>(mut self, value: T) -> Self
54644            where
54645                T: ::std::convert::TryInto<
54646                    ::std::option::Option<super::UpdateSolanaAccountBodyName>,
54647                >,
54648                T::Error: ::std::fmt::Display,
54649            {
54650                self.name = value
54651                    .try_into()
54652                    .map_err(|e| format!("error converting supplied value for name: {}", e));
54653                self
54654            }
54655        }
54656        impl ::std::convert::TryFrom<UpdateSolanaAccountBody> for super::UpdateSolanaAccountBody {
54657            type Error = super::error::ConversionError;
54658            fn try_from(
54659                value: UpdateSolanaAccountBody,
54660            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54661                Ok(Self {
54662                    account_policy: value.account_policy?,
54663                    name: value.name?,
54664                })
54665            }
54666        }
54667        impl ::std::convert::From<super::UpdateSolanaAccountBody> for UpdateSolanaAccountBody {
54668            fn from(value: super::UpdateSolanaAccountBody) -> Self {
54669                Self {
54670                    account_policy: Ok(value.account_policy),
54671                    name: Ok(value.name),
54672                }
54673            }
54674        }
54675        #[derive(Clone, Debug)]
54676        pub struct UserOperationReceipt {
54677            block_hash: ::std::result::Result<
54678                ::std::option::Option<super::UserOperationReceiptBlockHash>,
54679                ::std::string::String,
54680            >,
54681            block_number: ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
54682            gas_used: ::std::result::Result<
54683                ::std::option::Option<::std::string::String>,
54684                ::std::string::String,
54685            >,
54686            revert: ::std::result::Result<
54687                ::std::option::Option<super::UserOperationReceiptRevert>,
54688                ::std::string::String,
54689            >,
54690            transaction_hash: ::std::result::Result<
54691                ::std::option::Option<super::UserOperationReceiptTransactionHash>,
54692                ::std::string::String,
54693            >,
54694        }
54695        impl ::std::default::Default for UserOperationReceipt {
54696            fn default() -> Self {
54697                Self {
54698                    block_hash: Ok(Default::default()),
54699                    block_number: Ok(Default::default()),
54700                    gas_used: Ok(Default::default()),
54701                    revert: Ok(Default::default()),
54702                    transaction_hash: Ok(Default::default()),
54703                }
54704            }
54705        }
54706        impl UserOperationReceipt {
54707            pub fn block_hash<T>(mut self, value: T) -> Self
54708            where
54709                T: ::std::convert::TryInto<
54710                    ::std::option::Option<super::UserOperationReceiptBlockHash>,
54711                >,
54712                T::Error: ::std::fmt::Display,
54713            {
54714                self.block_hash = value
54715                    .try_into()
54716                    .map_err(|e| format!("error converting supplied value for block_hash: {}", e));
54717                self
54718            }
54719            pub fn block_number<T>(mut self, value: T) -> Self
54720            where
54721                T: ::std::convert::TryInto<::std::option::Option<i64>>,
54722                T::Error: ::std::fmt::Display,
54723            {
54724                self.block_number = value.try_into().map_err(|e| {
54725                    format!("error converting supplied value for block_number: {}", e)
54726                });
54727                self
54728            }
54729            pub fn gas_used<T>(mut self, value: T) -> Self
54730            where
54731                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
54732                T::Error: ::std::fmt::Display,
54733            {
54734                self.gas_used = value
54735                    .try_into()
54736                    .map_err(|e| format!("error converting supplied value for gas_used: {}", e));
54737                self
54738            }
54739            pub fn revert<T>(mut self, value: T) -> Self
54740            where
54741                T: ::std::convert::TryInto<
54742                    ::std::option::Option<super::UserOperationReceiptRevert>,
54743                >,
54744                T::Error: ::std::fmt::Display,
54745            {
54746                self.revert = value
54747                    .try_into()
54748                    .map_err(|e| format!("error converting supplied value for revert: {}", e));
54749                self
54750            }
54751            pub fn transaction_hash<T>(mut self, value: T) -> Self
54752            where
54753                T: ::std::convert::TryInto<
54754                    ::std::option::Option<super::UserOperationReceiptTransactionHash>,
54755                >,
54756                T::Error: ::std::fmt::Display,
54757            {
54758                self.transaction_hash = value.try_into().map_err(|e| {
54759                    format!(
54760                        "error converting supplied value for transaction_hash: {}",
54761                        e
54762                    )
54763                });
54764                self
54765            }
54766        }
54767        impl ::std::convert::TryFrom<UserOperationReceipt> for super::UserOperationReceipt {
54768            type Error = super::error::ConversionError;
54769            fn try_from(
54770                value: UserOperationReceipt,
54771            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54772                Ok(Self {
54773                    block_hash: value.block_hash?,
54774                    block_number: value.block_number?,
54775                    gas_used: value.gas_used?,
54776                    revert: value.revert?,
54777                    transaction_hash: value.transaction_hash?,
54778                })
54779            }
54780        }
54781        impl ::std::convert::From<super::UserOperationReceipt> for UserOperationReceipt {
54782            fn from(value: super::UserOperationReceipt) -> Self {
54783                Self {
54784                    block_hash: Ok(value.block_hash),
54785                    block_number: Ok(value.block_number),
54786                    gas_used: Ok(value.gas_used),
54787                    revert: Ok(value.revert),
54788                    transaction_hash: Ok(value.transaction_hash),
54789                }
54790            }
54791        }
54792        #[derive(Clone, Debug)]
54793        pub struct UserOperationReceiptRevert {
54794            data:
54795                ::std::result::Result<super::UserOperationReceiptRevertData, ::std::string::String>,
54796            message: ::std::result::Result<::std::string::String, ::std::string::String>,
54797        }
54798        impl ::std::default::Default for UserOperationReceiptRevert {
54799            fn default() -> Self {
54800                Self {
54801                    data: Err("no value supplied for data".to_string()),
54802                    message: Err("no value supplied for message".to_string()),
54803                }
54804            }
54805        }
54806        impl UserOperationReceiptRevert {
54807            pub fn data<T>(mut self, value: T) -> Self
54808            where
54809                T: ::std::convert::TryInto<super::UserOperationReceiptRevertData>,
54810                T::Error: ::std::fmt::Display,
54811            {
54812                self.data = value
54813                    .try_into()
54814                    .map_err(|e| format!("error converting supplied value for data: {}", e));
54815                self
54816            }
54817            pub fn message<T>(mut self, value: T) -> Self
54818            where
54819                T: ::std::convert::TryInto<::std::string::String>,
54820                T::Error: ::std::fmt::Display,
54821            {
54822                self.message = value
54823                    .try_into()
54824                    .map_err(|e| format!("error converting supplied value for message: {}", e));
54825                self
54826            }
54827        }
54828        impl ::std::convert::TryFrom<UserOperationReceiptRevert> for super::UserOperationReceiptRevert {
54829            type Error = super::error::ConversionError;
54830            fn try_from(
54831                value: UserOperationReceiptRevert,
54832            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54833                Ok(Self {
54834                    data: value.data?,
54835                    message: value.message?,
54836                })
54837            }
54838        }
54839        impl ::std::convert::From<super::UserOperationReceiptRevert> for UserOperationReceiptRevert {
54840            fn from(value: super::UserOperationReceiptRevert) -> Self {
54841                Self {
54842                    data: Ok(value.data),
54843                    message: Ok(value.message),
54844                }
54845            }
54846        }
54847        #[derive(Clone, Debug)]
54848        pub struct ValidateEndUserAccessTokenBody {
54849            access_token: ::std::result::Result<::std::string::String, ::std::string::String>,
54850        }
54851        impl ::std::default::Default for ValidateEndUserAccessTokenBody {
54852            fn default() -> Self {
54853                Self {
54854                    access_token: Err("no value supplied for access_token".to_string()),
54855                }
54856            }
54857        }
54858        impl ValidateEndUserAccessTokenBody {
54859            pub fn access_token<T>(mut self, value: T) -> Self
54860            where
54861                T: ::std::convert::TryInto<::std::string::String>,
54862                T::Error: ::std::fmt::Display,
54863            {
54864                self.access_token = value.try_into().map_err(|e| {
54865                    format!("error converting supplied value for access_token: {}", e)
54866                });
54867                self
54868            }
54869        }
54870        impl ::std::convert::TryFrom<ValidateEndUserAccessTokenBody>
54871            for super::ValidateEndUserAccessTokenBody
54872        {
54873            type Error = super::error::ConversionError;
54874            fn try_from(
54875                value: ValidateEndUserAccessTokenBody,
54876            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54877                Ok(Self {
54878                    access_token: value.access_token?,
54879                })
54880            }
54881        }
54882        impl ::std::convert::From<super::ValidateEndUserAccessTokenBody>
54883            for ValidateEndUserAccessTokenBody
54884        {
54885            fn from(value: super::ValidateEndUserAccessTokenBody) -> Self {
54886                Self {
54887                    access_token: Ok(value.access_token),
54888                }
54889            }
54890        }
54891        #[derive(Clone, Debug)]
54892        pub struct VerifyX402PaymentBody {
54893            payment_payload:
54894                ::std::result::Result<super::X402PaymentPayload, ::std::string::String>,
54895            payment_requirements:
54896                ::std::result::Result<super::X402PaymentRequirements, ::std::string::String>,
54897            x402_version: ::std::result::Result<super::X402Version, ::std::string::String>,
54898        }
54899        impl ::std::default::Default for VerifyX402PaymentBody {
54900            fn default() -> Self {
54901                Self {
54902                    payment_payload: Err("no value supplied for payment_payload".to_string()),
54903                    payment_requirements: Err(
54904                        "no value supplied for payment_requirements".to_string()
54905                    ),
54906                    x402_version: Err("no value supplied for x402_version".to_string()),
54907                }
54908            }
54909        }
54910        impl VerifyX402PaymentBody {
54911            pub fn payment_payload<T>(mut self, value: T) -> Self
54912            where
54913                T: ::std::convert::TryInto<super::X402PaymentPayload>,
54914                T::Error: ::std::fmt::Display,
54915            {
54916                self.payment_payload = value.try_into().map_err(|e| {
54917                    format!("error converting supplied value for payment_payload: {}", e)
54918                });
54919                self
54920            }
54921            pub fn payment_requirements<T>(mut self, value: T) -> Self
54922            where
54923                T: ::std::convert::TryInto<super::X402PaymentRequirements>,
54924                T::Error: ::std::fmt::Display,
54925            {
54926                self.payment_requirements = value.try_into().map_err(|e| {
54927                    format!(
54928                        "error converting supplied value for payment_requirements: {}",
54929                        e
54930                    )
54931                });
54932                self
54933            }
54934            pub fn x402_version<T>(mut self, value: T) -> Self
54935            where
54936                T: ::std::convert::TryInto<super::X402Version>,
54937                T::Error: ::std::fmt::Display,
54938            {
54939                self.x402_version = value.try_into().map_err(|e| {
54940                    format!("error converting supplied value for x402_version: {}", e)
54941                });
54942                self
54943            }
54944        }
54945        impl ::std::convert::TryFrom<VerifyX402PaymentBody> for super::VerifyX402PaymentBody {
54946            type Error = super::error::ConversionError;
54947            fn try_from(
54948                value: VerifyX402PaymentBody,
54949            ) -> ::std::result::Result<Self, super::error::ConversionError> {
54950                Ok(Self {
54951                    payment_payload: value.payment_payload?,
54952                    payment_requirements: value.payment_requirements?,
54953                    x402_version: value.x402_version?,
54954                })
54955            }
54956        }
54957        impl ::std::convert::From<super::VerifyX402PaymentBody> for VerifyX402PaymentBody {
54958            fn from(value: super::VerifyX402PaymentBody) -> Self {
54959                Self {
54960                    payment_payload: Ok(value.payment_payload),
54961                    payment_requirements: Ok(value.payment_requirements),
54962                    x402_version: Ok(value.x402_version),
54963                }
54964            }
54965        }
54966        #[derive(Clone, Debug)]
54967        pub struct VerifyX402PaymentResponse {
54968            invalid_reason: ::std::result::Result<
54969                ::std::option::Option<super::X402VerifyInvalidReason>,
54970                ::std::string::String,
54971            >,
54972            is_valid: ::std::result::Result<bool, ::std::string::String>,
54973            payer:
54974                ::std::result::Result<super::VerifyX402PaymentResponsePayer, ::std::string::String>,
54975        }
54976        impl ::std::default::Default for VerifyX402PaymentResponse {
54977            fn default() -> Self {
54978                Self {
54979                    invalid_reason: Ok(Default::default()),
54980                    is_valid: Err("no value supplied for is_valid".to_string()),
54981                    payer: Err("no value supplied for payer".to_string()),
54982                }
54983            }
54984        }
54985        impl VerifyX402PaymentResponse {
54986            pub fn invalid_reason<T>(mut self, value: T) -> Self
54987            where
54988                T: ::std::convert::TryInto<::std::option::Option<super::X402VerifyInvalidReason>>,
54989                T::Error: ::std::fmt::Display,
54990            {
54991                self.invalid_reason = value.try_into().map_err(|e| {
54992                    format!("error converting supplied value for invalid_reason: {}", e)
54993                });
54994                self
54995            }
54996            pub fn is_valid<T>(mut self, value: T) -> Self
54997            where
54998                T: ::std::convert::TryInto<bool>,
54999                T::Error: ::std::fmt::Display,
55000            {
55001                self.is_valid = value
55002                    .try_into()
55003                    .map_err(|e| format!("error converting supplied value for is_valid: {}", e));
55004                self
55005            }
55006            pub fn payer<T>(mut self, value: T) -> Self
55007            where
55008                T: ::std::convert::TryInto<super::VerifyX402PaymentResponsePayer>,
55009                T::Error: ::std::fmt::Display,
55010            {
55011                self.payer = value
55012                    .try_into()
55013                    .map_err(|e| format!("error converting supplied value for payer: {}", e));
55014                self
55015            }
55016        }
55017        impl ::std::convert::TryFrom<VerifyX402PaymentResponse> for super::VerifyX402PaymentResponse {
55018            type Error = super::error::ConversionError;
55019            fn try_from(
55020                value: VerifyX402PaymentResponse,
55021            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55022                Ok(Self {
55023                    invalid_reason: value.invalid_reason?,
55024                    is_valid: value.is_valid?,
55025                    payer: value.payer?,
55026                })
55027            }
55028        }
55029        impl ::std::convert::From<super::VerifyX402PaymentResponse> for VerifyX402PaymentResponse {
55030            fn from(value: super::VerifyX402PaymentResponse) -> Self {
55031                Self {
55032                    invalid_reason: Ok(value.invalid_reason),
55033                    is_valid: Ok(value.is_valid),
55034                    payer: Ok(value.payer),
55035                }
55036            }
55037        }
55038        #[derive(Clone, Debug)]
55039        pub struct WebhookSubscriptionListResponse {
55040            next_page_token: ::std::result::Result<
55041                ::std::option::Option<::std::string::String>,
55042                ::std::string::String,
55043            >,
55044            subscriptions: ::std::result::Result<
55045                ::std::vec::Vec<super::WebhookSubscriptionResponse>,
55046                ::std::string::String,
55047            >,
55048        }
55049        impl ::std::default::Default for WebhookSubscriptionListResponse {
55050            fn default() -> Self {
55051                Self {
55052                    next_page_token: Ok(Default::default()),
55053                    subscriptions: Err("no value supplied for subscriptions".to_string()),
55054                }
55055            }
55056        }
55057        impl WebhookSubscriptionListResponse {
55058            pub fn next_page_token<T>(mut self, value: T) -> Self
55059            where
55060                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
55061                T::Error: ::std::fmt::Display,
55062            {
55063                self.next_page_token = value.try_into().map_err(|e| {
55064                    format!("error converting supplied value for next_page_token: {}", e)
55065                });
55066                self
55067            }
55068            pub fn subscriptions<T>(mut self, value: T) -> Self
55069            where
55070                T: ::std::convert::TryInto<::std::vec::Vec<super::WebhookSubscriptionResponse>>,
55071                T::Error: ::std::fmt::Display,
55072            {
55073                self.subscriptions = value.try_into().map_err(|e| {
55074                    format!("error converting supplied value for subscriptions: {}", e)
55075                });
55076                self
55077            }
55078        }
55079        impl ::std::convert::TryFrom<WebhookSubscriptionListResponse>
55080            for super::WebhookSubscriptionListResponse
55081        {
55082            type Error = super::error::ConversionError;
55083            fn try_from(
55084                value: WebhookSubscriptionListResponse,
55085            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55086                Ok(Self {
55087                    next_page_token: value.next_page_token?,
55088                    subscriptions: value.subscriptions?,
55089                })
55090            }
55091        }
55092        impl ::std::convert::From<super::WebhookSubscriptionListResponse>
55093            for WebhookSubscriptionListResponse
55094        {
55095            fn from(value: super::WebhookSubscriptionListResponse) -> Self {
55096                Self {
55097                    next_page_token: Ok(value.next_page_token),
55098                    subscriptions: Ok(value.subscriptions),
55099                }
55100            }
55101        }
55102        #[derive(Clone, Debug)]
55103        pub struct WebhookSubscriptionResponse {
55104            created_at: ::std::result::Result<
55105                ::chrono::DateTime<::chrono::offset::Utc>,
55106                ::std::string::String,
55107            >,
55108            description: ::std::result::Result<
55109                ::std::option::Option<::std::string::String>,
55110                ::std::string::String,
55111            >,
55112            event_types: ::std::result::Result<
55113                ::std::vec::Vec<::std::string::String>,
55114                ::std::string::String,
55115            >,
55116            is_enabled: ::std::result::Result<bool, ::std::string::String>,
55117            label_key: ::std::result::Result<
55118                ::std::option::Option<::std::string::String>,
55119                ::std::string::String,
55120            >,
55121            label_value: ::std::result::Result<
55122                ::std::option::Option<::std::string::String>,
55123                ::std::string::String,
55124            >,
55125            labels: ::std::result::Result<
55126                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
55127                ::std::string::String,
55128            >,
55129            metadata: ::std::result::Result<
55130                ::std::option::Option<super::WebhookSubscriptionResponseMetadata>,
55131                ::std::string::String,
55132            >,
55133            secret: ::std::result::Result<::uuid::Uuid, ::std::string::String>,
55134            subscription_id: ::std::result::Result<::uuid::Uuid, ::std::string::String>,
55135            target: ::std::result::Result<super::WebhookTarget, ::std::string::String>,
55136        }
55137        impl ::std::default::Default for WebhookSubscriptionResponse {
55138            fn default() -> Self {
55139                Self {
55140                    created_at: Err("no value supplied for created_at".to_string()),
55141                    description: Ok(Default::default()),
55142                    event_types: Err("no value supplied for event_types".to_string()),
55143                    is_enabled: Err("no value supplied for is_enabled".to_string()),
55144                    label_key: Ok(Default::default()),
55145                    label_value: Ok(Default::default()),
55146                    labels: Ok(Default::default()),
55147                    metadata: Ok(Default::default()),
55148                    secret: Err("no value supplied for secret".to_string()),
55149                    subscription_id: Err("no value supplied for subscription_id".to_string()),
55150                    target: Err("no value supplied for target".to_string()),
55151                }
55152            }
55153        }
55154        impl WebhookSubscriptionResponse {
55155            pub fn created_at<T>(mut self, value: T) -> Self
55156            where
55157                T: ::std::convert::TryInto<::chrono::DateTime<::chrono::offset::Utc>>,
55158                T::Error: ::std::fmt::Display,
55159            {
55160                self.created_at = value
55161                    .try_into()
55162                    .map_err(|e| format!("error converting supplied value for created_at: {}", e));
55163                self
55164            }
55165            pub fn description<T>(mut self, value: T) -> Self
55166            where
55167                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
55168                T::Error: ::std::fmt::Display,
55169            {
55170                self.description = value
55171                    .try_into()
55172                    .map_err(|e| format!("error converting supplied value for description: {}", e));
55173                self
55174            }
55175            pub fn event_types<T>(mut self, value: T) -> Self
55176            where
55177                T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
55178                T::Error: ::std::fmt::Display,
55179            {
55180                self.event_types = value
55181                    .try_into()
55182                    .map_err(|e| format!("error converting supplied value for event_types: {}", e));
55183                self
55184            }
55185            pub fn is_enabled<T>(mut self, value: T) -> Self
55186            where
55187                T: ::std::convert::TryInto<bool>,
55188                T::Error: ::std::fmt::Display,
55189            {
55190                self.is_enabled = value
55191                    .try_into()
55192                    .map_err(|e| format!("error converting supplied value for is_enabled: {}", e));
55193                self
55194            }
55195            pub fn label_key<T>(mut self, value: T) -> Self
55196            where
55197                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
55198                T::Error: ::std::fmt::Display,
55199            {
55200                self.label_key = value
55201                    .try_into()
55202                    .map_err(|e| format!("error converting supplied value for label_key: {}", e));
55203                self
55204            }
55205            pub fn label_value<T>(mut self, value: T) -> Self
55206            where
55207                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
55208                T::Error: ::std::fmt::Display,
55209            {
55210                self.label_value = value
55211                    .try_into()
55212                    .map_err(|e| format!("error converting supplied value for label_value: {}", e));
55213                self
55214            }
55215            pub fn labels<T>(mut self, value: T) -> Self
55216            where
55217                T: ::std::convert::TryInto<
55218                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
55219                >,
55220                T::Error: ::std::fmt::Display,
55221            {
55222                self.labels = value
55223                    .try_into()
55224                    .map_err(|e| format!("error converting supplied value for labels: {}", e));
55225                self
55226            }
55227            pub fn metadata<T>(mut self, value: T) -> Self
55228            where
55229                T: ::std::convert::TryInto<
55230                    ::std::option::Option<super::WebhookSubscriptionResponseMetadata>,
55231                >,
55232                T::Error: ::std::fmt::Display,
55233            {
55234                self.metadata = value
55235                    .try_into()
55236                    .map_err(|e| format!("error converting supplied value for metadata: {}", e));
55237                self
55238            }
55239            pub fn secret<T>(mut self, value: T) -> Self
55240            where
55241                T: ::std::convert::TryInto<::uuid::Uuid>,
55242                T::Error: ::std::fmt::Display,
55243            {
55244                self.secret = value
55245                    .try_into()
55246                    .map_err(|e| format!("error converting supplied value for secret: {}", e));
55247                self
55248            }
55249            pub fn subscription_id<T>(mut self, value: T) -> Self
55250            where
55251                T: ::std::convert::TryInto<::uuid::Uuid>,
55252                T::Error: ::std::fmt::Display,
55253            {
55254                self.subscription_id = value.try_into().map_err(|e| {
55255                    format!("error converting supplied value for subscription_id: {}", e)
55256                });
55257                self
55258            }
55259            pub fn target<T>(mut self, value: T) -> Self
55260            where
55261                T: ::std::convert::TryInto<super::WebhookTarget>,
55262                T::Error: ::std::fmt::Display,
55263            {
55264                self.target = value
55265                    .try_into()
55266                    .map_err(|e| format!("error converting supplied value for target: {}", e));
55267                self
55268            }
55269        }
55270        impl ::std::convert::TryFrom<WebhookSubscriptionResponse> for super::WebhookSubscriptionResponse {
55271            type Error = super::error::ConversionError;
55272            fn try_from(
55273                value: WebhookSubscriptionResponse,
55274            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55275                Ok(Self {
55276                    created_at: value.created_at?,
55277                    description: value.description?,
55278                    event_types: value.event_types?,
55279                    is_enabled: value.is_enabled?,
55280                    label_key: value.label_key?,
55281                    label_value: value.label_value?,
55282                    labels: value.labels?,
55283                    metadata: value.metadata?,
55284                    secret: value.secret?,
55285                    subscription_id: value.subscription_id?,
55286                    target: value.target?,
55287                })
55288            }
55289        }
55290        impl ::std::convert::From<super::WebhookSubscriptionResponse> for WebhookSubscriptionResponse {
55291            fn from(value: super::WebhookSubscriptionResponse) -> Self {
55292                Self {
55293                    created_at: Ok(value.created_at),
55294                    description: Ok(value.description),
55295                    event_types: Ok(value.event_types),
55296                    is_enabled: Ok(value.is_enabled),
55297                    label_key: Ok(value.label_key),
55298                    label_value: Ok(value.label_value),
55299                    labels: Ok(value.labels),
55300                    metadata: Ok(value.metadata),
55301                    secret: Ok(value.secret),
55302                    subscription_id: Ok(value.subscription_id),
55303                    target: Ok(value.target),
55304                }
55305            }
55306        }
55307        #[derive(Clone, Debug)]
55308        pub struct WebhookSubscriptionResponseMetadata {
55309            secret:
55310                ::std::result::Result<::std::option::Option<::uuid::Uuid>, ::std::string::String>,
55311        }
55312        impl ::std::default::Default for WebhookSubscriptionResponseMetadata {
55313            fn default() -> Self {
55314                Self {
55315                    secret: Ok(Default::default()),
55316                }
55317            }
55318        }
55319        impl WebhookSubscriptionResponseMetadata {
55320            pub fn secret<T>(mut self, value: T) -> Self
55321            where
55322                T: ::std::convert::TryInto<::std::option::Option<::uuid::Uuid>>,
55323                T::Error: ::std::fmt::Display,
55324            {
55325                self.secret = value
55326                    .try_into()
55327                    .map_err(|e| format!("error converting supplied value for secret: {}", e));
55328                self
55329            }
55330        }
55331        impl ::std::convert::TryFrom<WebhookSubscriptionResponseMetadata>
55332            for super::WebhookSubscriptionResponseMetadata
55333        {
55334            type Error = super::error::ConversionError;
55335            fn try_from(
55336                value: WebhookSubscriptionResponseMetadata,
55337            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55338                Ok(Self {
55339                    secret: value.secret?,
55340                })
55341            }
55342        }
55343        impl ::std::convert::From<super::WebhookSubscriptionResponseMetadata>
55344            for WebhookSubscriptionResponseMetadata
55345        {
55346            fn from(value: super::WebhookSubscriptionResponseMetadata) -> Self {
55347                Self {
55348                    secret: Ok(value.secret),
55349                }
55350            }
55351        }
55352        #[derive(Clone, Debug)]
55353        pub struct WebhookTarget {
55354            headers: ::std::result::Result<
55355                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
55356                ::std::string::String,
55357            >,
55358            url: ::std::result::Result<super::Url, ::std::string::String>,
55359        }
55360        impl ::std::default::Default for WebhookTarget {
55361            fn default() -> Self {
55362                Self {
55363                    headers: Ok(Default::default()),
55364                    url: Err("no value supplied for url".to_string()),
55365                }
55366            }
55367        }
55368        impl WebhookTarget {
55369            pub fn headers<T>(mut self, value: T) -> Self
55370            where
55371                T: ::std::convert::TryInto<
55372                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
55373                >,
55374                T::Error: ::std::fmt::Display,
55375            {
55376                self.headers = value
55377                    .try_into()
55378                    .map_err(|e| format!("error converting supplied value for headers: {}", e));
55379                self
55380            }
55381            pub fn url<T>(mut self, value: T) -> Self
55382            where
55383                T: ::std::convert::TryInto<super::Url>,
55384                T::Error: ::std::fmt::Display,
55385            {
55386                self.url = value
55387                    .try_into()
55388                    .map_err(|e| format!("error converting supplied value for url: {}", e));
55389                self
55390            }
55391        }
55392        impl ::std::convert::TryFrom<WebhookTarget> for super::WebhookTarget {
55393            type Error = super::error::ConversionError;
55394            fn try_from(
55395                value: WebhookTarget,
55396            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55397                Ok(Self {
55398                    headers: value.headers?,
55399                    url: value.url?,
55400                })
55401            }
55402        }
55403        impl ::std::convert::From<super::WebhookTarget> for WebhookTarget {
55404            fn from(value: super::WebhookTarget) -> Self {
55405                Self {
55406                    headers: Ok(value.headers),
55407                    url: Ok(value.url),
55408                }
55409            }
55410        }
55411        #[derive(Clone, Debug)]
55412        pub struct X402ExactEvmPayload {
55413            authorization: ::std::result::Result<
55414                super::X402ExactEvmPayloadAuthorization,
55415                ::std::string::String,
55416            >,
55417            signature: ::std::result::Result<::std::string::String, ::std::string::String>,
55418        }
55419        impl ::std::default::Default for X402ExactEvmPayload {
55420            fn default() -> Self {
55421                Self {
55422                    authorization: Err("no value supplied for authorization".to_string()),
55423                    signature: Err("no value supplied for signature".to_string()),
55424                }
55425            }
55426        }
55427        impl X402ExactEvmPayload {
55428            pub fn authorization<T>(mut self, value: T) -> Self
55429            where
55430                T: ::std::convert::TryInto<super::X402ExactEvmPayloadAuthorization>,
55431                T::Error: ::std::fmt::Display,
55432            {
55433                self.authorization = value.try_into().map_err(|e| {
55434                    format!("error converting supplied value for authorization: {}", e)
55435                });
55436                self
55437            }
55438            pub fn signature<T>(mut self, value: T) -> Self
55439            where
55440                T: ::std::convert::TryInto<::std::string::String>,
55441                T::Error: ::std::fmt::Display,
55442            {
55443                self.signature = value
55444                    .try_into()
55445                    .map_err(|e| format!("error converting supplied value for signature: {}", e));
55446                self
55447            }
55448        }
55449        impl ::std::convert::TryFrom<X402ExactEvmPayload> for super::X402ExactEvmPayload {
55450            type Error = super::error::ConversionError;
55451            fn try_from(
55452                value: X402ExactEvmPayload,
55453            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55454                Ok(Self {
55455                    authorization: value.authorization?,
55456                    signature: value.signature?,
55457                })
55458            }
55459        }
55460        impl ::std::convert::From<super::X402ExactEvmPayload> for X402ExactEvmPayload {
55461            fn from(value: super::X402ExactEvmPayload) -> Self {
55462                Self {
55463                    authorization: Ok(value.authorization),
55464                    signature: Ok(value.signature),
55465                }
55466            }
55467        }
55468        #[derive(Clone, Debug)]
55469        pub struct X402ExactEvmPayloadAuthorization {
55470            from: ::std::result::Result<
55471                super::X402ExactEvmPayloadAuthorizationFrom,
55472                ::std::string::String,
55473            >,
55474            nonce: ::std::result::Result<::std::string::String, ::std::string::String>,
55475            to: ::std::result::Result<
55476                super::X402ExactEvmPayloadAuthorizationTo,
55477                ::std::string::String,
55478            >,
55479            valid_after: ::std::result::Result<::std::string::String, ::std::string::String>,
55480            valid_before: ::std::result::Result<::std::string::String, ::std::string::String>,
55481            value: ::std::result::Result<::std::string::String, ::std::string::String>,
55482        }
55483        impl ::std::default::Default for X402ExactEvmPayloadAuthorization {
55484            fn default() -> Self {
55485                Self {
55486                    from: Err("no value supplied for from".to_string()),
55487                    nonce: Err("no value supplied for nonce".to_string()),
55488                    to: Err("no value supplied for to".to_string()),
55489                    valid_after: Err("no value supplied for valid_after".to_string()),
55490                    valid_before: Err("no value supplied for valid_before".to_string()),
55491                    value: Err("no value supplied for value".to_string()),
55492                }
55493            }
55494        }
55495        impl X402ExactEvmPayloadAuthorization {
55496            pub fn from<T>(mut self, value: T) -> Self
55497            where
55498                T: ::std::convert::TryInto<super::X402ExactEvmPayloadAuthorizationFrom>,
55499                T::Error: ::std::fmt::Display,
55500            {
55501                self.from = value
55502                    .try_into()
55503                    .map_err(|e| format!("error converting supplied value for from: {}", e));
55504                self
55505            }
55506            pub fn nonce<T>(mut self, value: T) -> Self
55507            where
55508                T: ::std::convert::TryInto<::std::string::String>,
55509                T::Error: ::std::fmt::Display,
55510            {
55511                self.nonce = value
55512                    .try_into()
55513                    .map_err(|e| format!("error converting supplied value for nonce: {}", e));
55514                self
55515            }
55516            pub fn to<T>(mut self, value: T) -> Self
55517            where
55518                T: ::std::convert::TryInto<super::X402ExactEvmPayloadAuthorizationTo>,
55519                T::Error: ::std::fmt::Display,
55520            {
55521                self.to = value
55522                    .try_into()
55523                    .map_err(|e| format!("error converting supplied value for to: {}", e));
55524                self
55525            }
55526            pub fn valid_after<T>(mut self, value: T) -> Self
55527            where
55528                T: ::std::convert::TryInto<::std::string::String>,
55529                T::Error: ::std::fmt::Display,
55530            {
55531                self.valid_after = value
55532                    .try_into()
55533                    .map_err(|e| format!("error converting supplied value for valid_after: {}", e));
55534                self
55535            }
55536            pub fn valid_before<T>(mut self, value: T) -> Self
55537            where
55538                T: ::std::convert::TryInto<::std::string::String>,
55539                T::Error: ::std::fmt::Display,
55540            {
55541                self.valid_before = value.try_into().map_err(|e| {
55542                    format!("error converting supplied value for valid_before: {}", e)
55543                });
55544                self
55545            }
55546            pub fn value<T>(mut self, value: T) -> Self
55547            where
55548                T: ::std::convert::TryInto<::std::string::String>,
55549                T::Error: ::std::fmt::Display,
55550            {
55551                self.value = value
55552                    .try_into()
55553                    .map_err(|e| format!("error converting supplied value for value: {}", e));
55554                self
55555            }
55556        }
55557        impl ::std::convert::TryFrom<X402ExactEvmPayloadAuthorization>
55558            for super::X402ExactEvmPayloadAuthorization
55559        {
55560            type Error = super::error::ConversionError;
55561            fn try_from(
55562                value: X402ExactEvmPayloadAuthorization,
55563            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55564                Ok(Self {
55565                    from: value.from?,
55566                    nonce: value.nonce?,
55567                    to: value.to?,
55568                    valid_after: value.valid_after?,
55569                    valid_before: value.valid_before?,
55570                    value: value.value?,
55571                })
55572            }
55573        }
55574        impl ::std::convert::From<super::X402ExactEvmPayloadAuthorization>
55575            for X402ExactEvmPayloadAuthorization
55576        {
55577            fn from(value: super::X402ExactEvmPayloadAuthorization) -> Self {
55578                Self {
55579                    from: Ok(value.from),
55580                    nonce: Ok(value.nonce),
55581                    to: Ok(value.to),
55582                    valid_after: Ok(value.valid_after),
55583                    valid_before: Ok(value.valid_before),
55584                    value: Ok(value.value),
55585                }
55586            }
55587        }
55588        #[derive(Clone, Debug)]
55589        pub struct X402ExactSolanaPayload {
55590            transaction: ::std::result::Result<::std::string::String, ::std::string::String>,
55591        }
55592        impl ::std::default::Default for X402ExactSolanaPayload {
55593            fn default() -> Self {
55594                Self {
55595                    transaction: Err("no value supplied for transaction".to_string()),
55596                }
55597            }
55598        }
55599        impl X402ExactSolanaPayload {
55600            pub fn transaction<T>(mut self, value: T) -> Self
55601            where
55602                T: ::std::convert::TryInto<::std::string::String>,
55603                T::Error: ::std::fmt::Display,
55604            {
55605                self.transaction = value
55606                    .try_into()
55607                    .map_err(|e| format!("error converting supplied value for transaction: {}", e));
55608                self
55609            }
55610        }
55611        impl ::std::convert::TryFrom<X402ExactSolanaPayload> for super::X402ExactSolanaPayload {
55612            type Error = super::error::ConversionError;
55613            fn try_from(
55614                value: X402ExactSolanaPayload,
55615            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55616                Ok(Self {
55617                    transaction: value.transaction?,
55618                })
55619            }
55620        }
55621        impl ::std::convert::From<super::X402ExactSolanaPayload> for X402ExactSolanaPayload {
55622            fn from(value: super::X402ExactSolanaPayload) -> Self {
55623                Self {
55624                    transaction: Ok(value.transaction),
55625                }
55626            }
55627        }
55628        #[derive(Clone, Debug)]
55629        pub struct X402ResourceInfo {
55630            description: ::std::result::Result<
55631                ::std::option::Option<::std::string::String>,
55632                ::std::string::String,
55633            >,
55634            mime_type: ::std::result::Result<
55635                ::std::option::Option<::std::string::String>,
55636                ::std::string::String,
55637            >,
55638            url: ::std::result::Result<
55639                ::std::option::Option<::std::string::String>,
55640                ::std::string::String,
55641            >,
55642        }
55643        impl ::std::default::Default for X402ResourceInfo {
55644            fn default() -> Self {
55645                Self {
55646                    description: Ok(Default::default()),
55647                    mime_type: Ok(Default::default()),
55648                    url: Ok(Default::default()),
55649                }
55650            }
55651        }
55652        impl X402ResourceInfo {
55653            pub fn description<T>(mut self, value: T) -> Self
55654            where
55655                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
55656                T::Error: ::std::fmt::Display,
55657            {
55658                self.description = value
55659                    .try_into()
55660                    .map_err(|e| format!("error converting supplied value for description: {}", e));
55661                self
55662            }
55663            pub fn mime_type<T>(mut self, value: T) -> Self
55664            where
55665                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
55666                T::Error: ::std::fmt::Display,
55667            {
55668                self.mime_type = value
55669                    .try_into()
55670                    .map_err(|e| format!("error converting supplied value for mime_type: {}", e));
55671                self
55672            }
55673            pub fn url<T>(mut self, value: T) -> Self
55674            where
55675                T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
55676                T::Error: ::std::fmt::Display,
55677            {
55678                self.url = value
55679                    .try_into()
55680                    .map_err(|e| format!("error converting supplied value for url: {}", e));
55681                self
55682            }
55683        }
55684        impl ::std::convert::TryFrom<X402ResourceInfo> for super::X402ResourceInfo {
55685            type Error = super::error::ConversionError;
55686            fn try_from(
55687                value: X402ResourceInfo,
55688            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55689                Ok(Self {
55690                    description: value.description?,
55691                    mime_type: value.mime_type?,
55692                    url: value.url?,
55693                })
55694            }
55695        }
55696        impl ::std::convert::From<super::X402ResourceInfo> for X402ResourceInfo {
55697            fn from(value: super::X402ResourceInfo) -> Self {
55698                Self {
55699                    description: Ok(value.description),
55700                    mime_type: Ok(value.mime_type),
55701                    url: Ok(value.url),
55702                }
55703            }
55704        }
55705        #[derive(Clone, Debug)]
55706        pub struct X402SupportedPaymentKind {
55707            extra: ::std::result::Result<
55708                ::serde_json::Map<::std::string::String, ::serde_json::Value>,
55709                ::std::string::String,
55710            >,
55711            network: ::std::result::Result<::std::string::String, ::std::string::String>,
55712            scheme:
55713                ::std::result::Result<super::X402SupportedPaymentKindScheme, ::std::string::String>,
55714            x402_version: ::std::result::Result<super::X402Version, ::std::string::String>,
55715        }
55716        impl ::std::default::Default for X402SupportedPaymentKind {
55717            fn default() -> Self {
55718                Self {
55719                    extra: Ok(Default::default()),
55720                    network: Err("no value supplied for network".to_string()),
55721                    scheme: Err("no value supplied for scheme".to_string()),
55722                    x402_version: Err("no value supplied for x402_version".to_string()),
55723                }
55724            }
55725        }
55726        impl X402SupportedPaymentKind {
55727            pub fn extra<T>(mut self, value: T) -> Self
55728            where
55729                T: ::std::convert::TryInto<
55730                    ::serde_json::Map<::std::string::String, ::serde_json::Value>,
55731                >,
55732                T::Error: ::std::fmt::Display,
55733            {
55734                self.extra = value
55735                    .try_into()
55736                    .map_err(|e| format!("error converting supplied value for extra: {}", e));
55737                self
55738            }
55739            pub fn network<T>(mut self, value: T) -> Self
55740            where
55741                T: ::std::convert::TryInto<::std::string::String>,
55742                T::Error: ::std::fmt::Display,
55743            {
55744                self.network = value
55745                    .try_into()
55746                    .map_err(|e| format!("error converting supplied value for network: {}", e));
55747                self
55748            }
55749            pub fn scheme<T>(mut self, value: T) -> Self
55750            where
55751                T: ::std::convert::TryInto<super::X402SupportedPaymentKindScheme>,
55752                T::Error: ::std::fmt::Display,
55753            {
55754                self.scheme = value
55755                    .try_into()
55756                    .map_err(|e| format!("error converting supplied value for scheme: {}", e));
55757                self
55758            }
55759            pub fn x402_version<T>(mut self, value: T) -> Self
55760            where
55761                T: ::std::convert::TryInto<super::X402Version>,
55762                T::Error: ::std::fmt::Display,
55763            {
55764                self.x402_version = value.try_into().map_err(|e| {
55765                    format!("error converting supplied value for x402_version: {}", e)
55766                });
55767                self
55768            }
55769        }
55770        impl ::std::convert::TryFrom<X402SupportedPaymentKind> for super::X402SupportedPaymentKind {
55771            type Error = super::error::ConversionError;
55772            fn try_from(
55773                value: X402SupportedPaymentKind,
55774            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55775                Ok(Self {
55776                    extra: value.extra?,
55777                    network: value.network?,
55778                    scheme: value.scheme?,
55779                    x402_version: value.x402_version?,
55780                })
55781            }
55782        }
55783        impl ::std::convert::From<super::X402SupportedPaymentKind> for X402SupportedPaymentKind {
55784            fn from(value: super::X402SupportedPaymentKind) -> Self {
55785                Self {
55786                    extra: Ok(value.extra),
55787                    network: Ok(value.network),
55788                    scheme: Ok(value.scheme),
55789                    x402_version: Ok(value.x402_version),
55790                }
55791            }
55792        }
55793        #[derive(Clone, Debug)]
55794        pub struct X402V1PaymentPayload {
55795            network:
55796                ::std::result::Result<super::X402v1PaymentPayloadNetwork, ::std::string::String>,
55797            payload:
55798                ::std::result::Result<super::X402v1PaymentPayloadPayload, ::std::string::String>,
55799            scheme: ::std::result::Result<super::X402v1PaymentPayloadScheme, ::std::string::String>,
55800            x402_version: ::std::result::Result<super::X402Version, ::std::string::String>,
55801        }
55802        impl ::std::default::Default for X402V1PaymentPayload {
55803            fn default() -> Self {
55804                Self {
55805                    network: Err("no value supplied for network".to_string()),
55806                    payload: Err("no value supplied for payload".to_string()),
55807                    scheme: Err("no value supplied for scheme".to_string()),
55808                    x402_version: Err("no value supplied for x402_version".to_string()),
55809                }
55810            }
55811        }
55812        impl X402V1PaymentPayload {
55813            pub fn network<T>(mut self, value: T) -> Self
55814            where
55815                T: ::std::convert::TryInto<super::X402v1PaymentPayloadNetwork>,
55816                T::Error: ::std::fmt::Display,
55817            {
55818                self.network = value
55819                    .try_into()
55820                    .map_err(|e| format!("error converting supplied value for network: {}", e));
55821                self
55822            }
55823            pub fn payload<T>(mut self, value: T) -> Self
55824            where
55825                T: ::std::convert::TryInto<super::X402v1PaymentPayloadPayload>,
55826                T::Error: ::std::fmt::Display,
55827            {
55828                self.payload = value
55829                    .try_into()
55830                    .map_err(|e| format!("error converting supplied value for payload: {}", e));
55831                self
55832            }
55833            pub fn scheme<T>(mut self, value: T) -> Self
55834            where
55835                T: ::std::convert::TryInto<super::X402v1PaymentPayloadScheme>,
55836                T::Error: ::std::fmt::Display,
55837            {
55838                self.scheme = value
55839                    .try_into()
55840                    .map_err(|e| format!("error converting supplied value for scheme: {}", e));
55841                self
55842            }
55843            pub fn x402_version<T>(mut self, value: T) -> Self
55844            where
55845                T: ::std::convert::TryInto<super::X402Version>,
55846                T::Error: ::std::fmt::Display,
55847            {
55848                self.x402_version = value.try_into().map_err(|e| {
55849                    format!("error converting supplied value for x402_version: {}", e)
55850                });
55851                self
55852            }
55853        }
55854        impl ::std::convert::TryFrom<X402V1PaymentPayload> for super::X402V1PaymentPayload {
55855            type Error = super::error::ConversionError;
55856            fn try_from(
55857                value: X402V1PaymentPayload,
55858            ) -> ::std::result::Result<Self, super::error::ConversionError> {
55859                Ok(Self {
55860                    network: value.network?,
55861                    payload: value.payload?,
55862                    scheme: value.scheme?,
55863                    x402_version: value.x402_version?,
55864                })
55865            }
55866        }
55867        impl ::std::convert::From<super::X402V1PaymentPayload> for X402V1PaymentPayload {
55868            fn from(value: super::X402V1PaymentPayload) -> Self {
55869                Self {
55870                    network: Ok(value.network),
55871                    payload: Ok(value.payload),
55872                    scheme: Ok(value.scheme),
55873                    x402_version: Ok(value.x402_version),
55874                }
55875            }
55876        }
55877        #[derive(Clone, Debug)]
55878        pub struct X402V1PaymentRequirements {
55879            asset:
55880                ::std::result::Result<super::X402v1PaymentRequirementsAsset, ::std::string::String>,
55881            description: ::std::result::Result<::std::string::String, ::std::string::String>,
55882            extra: ::std::result::Result<
55883                ::serde_json::Map<::std::string::String, ::serde_json::Value>,
55884                ::std::string::String,
55885            >,
55886            max_amount_required:
55887                ::std::result::Result<::std::string::String, ::std::string::String>,
55888            max_timeout_seconds: ::std::result::Result<i64, ::std::string::String>,
55889            mime_type: ::std::result::Result<::std::string::String, ::std::string::String>,
55890            network: ::std::result::Result<
55891                super::X402v1PaymentRequirementsNetwork,
55892                ::std::string::String,
55893            >,
55894            output_schema: ::std::result::Result<
55895                ::serde_json::Map<::std::string::String, ::serde_json::Value>,
55896                ::std::string::String,
55897            >,
55898            pay_to:
55899                ::std::result::Result<super::X402v1PaymentRequirementsPayTo, ::std::string::String>,
55900            resource: ::std::result::Result<::std::string::String, ::std::string::String>,
55901            scheme: ::std::result::Result<
55902                super::X402v1PaymentRequirementsScheme,
55903                ::std::string::String,
55904            >,
55905        }
55906        impl ::std::default::Default for X402V1PaymentRequirements {
55907            fn default() -> Self {
55908                Self {
55909                    asset: Err("no value supplied for asset".to_string()),
55910                    description: Err("no value supplied for description".to_string()),
55911                    extra: Ok(Default::default()),
55912                    max_amount_required: Err(
55913                        "no value supplied for max_amount_required".to_string()
55914                    ),
55915                    max_timeout_seconds: Err(
55916                        "no value supplied for max_timeout_seconds".to_string()
55917                    ),
55918                    mime_type: Err("no value supplied for mime_type".to_string()),
55919                    network: Err("no value supplied for network".to_string()),
55920                    output_schema: Ok(Default::default()),
55921                    pay_to: Err("no value supplied for pay_to".to_string()),
55922                    resource: Err("no value supplied for resource".to_string()),
55923                    scheme: Err("no value supplied for scheme".to_string()),
55924                }
55925            }
55926        }
55927        impl X402V1PaymentRequirements {
55928            pub fn asset<T>(mut self, value: T) -> Self
55929            where
55930                T: ::std::convert::TryInto<super::X402v1PaymentRequirementsAsset>,
55931                T::Error: ::std::fmt::Display,
55932            {
55933                self.asset = value
55934                    .try_into()
55935                    .map_err(|e| format!("error converting supplied value for asset: {}", e));
55936                self
55937            }
55938            pub fn description<T>(mut self, value: T) -> Self
55939            where
55940                T: ::std::convert::TryInto<::std::string::String>,
55941                T::Error: ::std::fmt::Display,
55942            {
55943                self.description = value
55944                    .try_into()
55945                    .map_err(|e| format!("error converting supplied value for description: {}", e));
55946                self
55947            }
55948            pub fn extra<T>(mut self, value: T) -> Self
55949            where
55950                T: ::std::convert::TryInto<
55951                    ::serde_json::Map<::std::string::String, ::serde_json::Value>,
55952                >,
55953                T::Error: ::std::fmt::Display,
55954            {
55955                self.extra = value
55956                    .try_into()
55957                    .map_err(|e| format!("error converting supplied value for extra: {}", e));
55958                self
55959            }
55960            pub fn max_amount_required<T>(mut self, value: T) -> Self
55961            where
55962                T: ::std::convert::TryInto<::std::string::String>,
55963                T::Error: ::std::fmt::Display,
55964            {
55965                self.max_amount_required = value.try_into().map_err(|e| {
55966                    format!(
55967                        "error converting supplied value for max_amount_required: {}",
55968                        e
55969                    )
55970                });
55971                self
55972            }
55973            pub fn max_timeout_seconds<T>(mut self, value: T) -> Self
55974            where
55975                T: ::std::convert::TryInto<i64>,
55976                T::Error: ::std::fmt::Display,
55977            {
55978                self.max_timeout_seconds = value.try_into().map_err(|e| {
55979                    format!(
55980                        "error converting supplied value for max_timeout_seconds: {}",
55981                        e
55982                    )
55983                });
55984                self
55985            }
55986            pub fn mime_type<T>(mut self, value: T) -> Self
55987            where
55988                T: ::std::convert::TryInto<::std::string::String>,
55989                T::Error: ::std::fmt::Display,
55990            {
55991                self.mime_type = value
55992                    .try_into()
55993                    .map_err(|e| format!("error converting supplied value for mime_type: {}", e));
55994                self
55995            }
55996            pub fn network<T>(mut self, value: T) -> Self
55997            where
55998                T: ::std::convert::TryInto<super::X402v1PaymentRequirementsNetwork>,
55999                T::Error: ::std::fmt::Display,
56000            {
56001                self.network = value
56002                    .try_into()
56003                    .map_err(|e| format!("error converting supplied value for network: {}", e));
56004                self
56005            }
56006            pub fn output_schema<T>(mut self, value: T) -> Self
56007            where
56008                T: ::std::convert::TryInto<
56009                    ::serde_json::Map<::std::string::String, ::serde_json::Value>,
56010                >,
56011                T::Error: ::std::fmt::Display,
56012            {
56013                self.output_schema = value.try_into().map_err(|e| {
56014                    format!("error converting supplied value for output_schema: {}", e)
56015                });
56016                self
56017            }
56018            pub fn pay_to<T>(mut self, value: T) -> Self
56019            where
56020                T: ::std::convert::TryInto<super::X402v1PaymentRequirementsPayTo>,
56021                T::Error: ::std::fmt::Display,
56022            {
56023                self.pay_to = value
56024                    .try_into()
56025                    .map_err(|e| format!("error converting supplied value for pay_to: {}", e));
56026                self
56027            }
56028            pub fn resource<T>(mut self, value: T) -> Self
56029            where
56030                T: ::std::convert::TryInto<::std::string::String>,
56031                T::Error: ::std::fmt::Display,
56032            {
56033                self.resource = value
56034                    .try_into()
56035                    .map_err(|e| format!("error converting supplied value for resource: {}", e));
56036                self
56037            }
56038            pub fn scheme<T>(mut self, value: T) -> Self
56039            where
56040                T: ::std::convert::TryInto<super::X402v1PaymentRequirementsScheme>,
56041                T::Error: ::std::fmt::Display,
56042            {
56043                self.scheme = value
56044                    .try_into()
56045                    .map_err(|e| format!("error converting supplied value for scheme: {}", e));
56046                self
56047            }
56048        }
56049        impl ::std::convert::TryFrom<X402V1PaymentRequirements> for super::X402V1PaymentRequirements {
56050            type Error = super::error::ConversionError;
56051            fn try_from(
56052                value: X402V1PaymentRequirements,
56053            ) -> ::std::result::Result<Self, super::error::ConversionError> {
56054                Ok(Self {
56055                    asset: value.asset?,
56056                    description: value.description?,
56057                    extra: value.extra?,
56058                    max_amount_required: value.max_amount_required?,
56059                    max_timeout_seconds: value.max_timeout_seconds?,
56060                    mime_type: value.mime_type?,
56061                    network: value.network?,
56062                    output_schema: value.output_schema?,
56063                    pay_to: value.pay_to?,
56064                    resource: value.resource?,
56065                    scheme: value.scheme?,
56066                })
56067            }
56068        }
56069        impl ::std::convert::From<super::X402V1PaymentRequirements> for X402V1PaymentRequirements {
56070            fn from(value: super::X402V1PaymentRequirements) -> Self {
56071                Self {
56072                    asset: Ok(value.asset),
56073                    description: Ok(value.description),
56074                    extra: Ok(value.extra),
56075                    max_amount_required: Ok(value.max_amount_required),
56076                    max_timeout_seconds: Ok(value.max_timeout_seconds),
56077                    mime_type: Ok(value.mime_type),
56078                    network: Ok(value.network),
56079                    output_schema: Ok(value.output_schema),
56080                    pay_to: Ok(value.pay_to),
56081                    resource: Ok(value.resource),
56082                    scheme: Ok(value.scheme),
56083                }
56084            }
56085        }
56086        #[derive(Clone, Debug)]
56087        pub struct X402V2PaymentPayload {
56088            accepted:
56089                ::std::result::Result<super::X402V2PaymentRequirements, ::std::string::String>,
56090            extensions: ::std::result::Result<
56091                ::serde_json::Map<::std::string::String, ::serde_json::Value>,
56092                ::std::string::String,
56093            >,
56094            payload:
56095                ::std::result::Result<super::X402v2PaymentPayloadPayload, ::std::string::String>,
56096            resource: ::std::result::Result<
56097                ::std::option::Option<super::X402ResourceInfo>,
56098                ::std::string::String,
56099            >,
56100            x402_version: ::std::result::Result<super::X402Version, ::std::string::String>,
56101        }
56102        impl ::std::default::Default for X402V2PaymentPayload {
56103            fn default() -> Self {
56104                Self {
56105                    accepted: Err("no value supplied for accepted".to_string()),
56106                    extensions: Ok(Default::default()),
56107                    payload: Err("no value supplied for payload".to_string()),
56108                    resource: Ok(Default::default()),
56109                    x402_version: Err("no value supplied for x402_version".to_string()),
56110                }
56111            }
56112        }
56113        impl X402V2PaymentPayload {
56114            pub fn accepted<T>(mut self, value: T) -> Self
56115            where
56116                T: ::std::convert::TryInto<super::X402V2PaymentRequirements>,
56117                T::Error: ::std::fmt::Display,
56118            {
56119                self.accepted = value
56120                    .try_into()
56121                    .map_err(|e| format!("error converting supplied value for accepted: {}", e));
56122                self
56123            }
56124            pub fn extensions<T>(mut self, value: T) -> Self
56125            where
56126                T: ::std::convert::TryInto<
56127                    ::serde_json::Map<::std::string::String, ::serde_json::Value>,
56128                >,
56129                T::Error: ::std::fmt::Display,
56130            {
56131                self.extensions = value
56132                    .try_into()
56133                    .map_err(|e| format!("error converting supplied value for extensions: {}", e));
56134                self
56135            }
56136            pub fn payload<T>(mut self, value: T) -> Self
56137            where
56138                T: ::std::convert::TryInto<super::X402v2PaymentPayloadPayload>,
56139                T::Error: ::std::fmt::Display,
56140            {
56141                self.payload = value
56142                    .try_into()
56143                    .map_err(|e| format!("error converting supplied value for payload: {}", e));
56144                self
56145            }
56146            pub fn resource<T>(mut self, value: T) -> Self
56147            where
56148                T: ::std::convert::TryInto<::std::option::Option<super::X402ResourceInfo>>,
56149                T::Error: ::std::fmt::Display,
56150            {
56151                self.resource = value
56152                    .try_into()
56153                    .map_err(|e| format!("error converting supplied value for resource: {}", e));
56154                self
56155            }
56156            pub fn x402_version<T>(mut self, value: T) -> Self
56157            where
56158                T: ::std::convert::TryInto<super::X402Version>,
56159                T::Error: ::std::fmt::Display,
56160            {
56161                self.x402_version = value.try_into().map_err(|e| {
56162                    format!("error converting supplied value for x402_version: {}", e)
56163                });
56164                self
56165            }
56166        }
56167        impl ::std::convert::TryFrom<X402V2PaymentPayload> for super::X402V2PaymentPayload {
56168            type Error = super::error::ConversionError;
56169            fn try_from(
56170                value: X402V2PaymentPayload,
56171            ) -> ::std::result::Result<Self, super::error::ConversionError> {
56172                Ok(Self {
56173                    accepted: value.accepted?,
56174                    extensions: value.extensions?,
56175                    payload: value.payload?,
56176                    resource: value.resource?,
56177                    x402_version: value.x402_version?,
56178                })
56179            }
56180        }
56181        impl ::std::convert::From<super::X402V2PaymentPayload> for X402V2PaymentPayload {
56182            fn from(value: super::X402V2PaymentPayload) -> Self {
56183                Self {
56184                    accepted: Ok(value.accepted),
56185                    extensions: Ok(value.extensions),
56186                    payload: Ok(value.payload),
56187                    resource: Ok(value.resource),
56188                    x402_version: Ok(value.x402_version),
56189                }
56190            }
56191        }
56192        #[derive(Clone, Debug)]
56193        pub struct X402V2PaymentRequirements {
56194            amount: ::std::result::Result<::std::string::String, ::std::string::String>,
56195            asset:
56196                ::std::result::Result<super::X402v2PaymentRequirementsAsset, ::std::string::String>,
56197            extra: ::std::result::Result<
56198                ::serde_json::Map<::std::string::String, ::serde_json::Value>,
56199                ::std::string::String,
56200            >,
56201            max_timeout_seconds: ::std::result::Result<i64, ::std::string::String>,
56202            network: ::std::result::Result<::std::string::String, ::std::string::String>,
56203            pay_to:
56204                ::std::result::Result<super::X402v2PaymentRequirementsPayTo, ::std::string::String>,
56205            scheme: ::std::result::Result<
56206                super::X402v2PaymentRequirementsScheme,
56207                ::std::string::String,
56208            >,
56209        }
56210        impl ::std::default::Default for X402V2PaymentRequirements {
56211            fn default() -> Self {
56212                Self {
56213                    amount: Err("no value supplied for amount".to_string()),
56214                    asset: Err("no value supplied for asset".to_string()),
56215                    extra: Ok(Default::default()),
56216                    max_timeout_seconds: Err(
56217                        "no value supplied for max_timeout_seconds".to_string()
56218                    ),
56219                    network: Err("no value supplied for network".to_string()),
56220                    pay_to: Err("no value supplied for pay_to".to_string()),
56221                    scheme: Err("no value supplied for scheme".to_string()),
56222                }
56223            }
56224        }
56225        impl X402V2PaymentRequirements {
56226            pub fn amount<T>(mut self, value: T) -> Self
56227            where
56228                T: ::std::convert::TryInto<::std::string::String>,
56229                T::Error: ::std::fmt::Display,
56230            {
56231                self.amount = value
56232                    .try_into()
56233                    .map_err(|e| format!("error converting supplied value for amount: {}", e));
56234                self
56235            }
56236            pub fn asset<T>(mut self, value: T) -> Self
56237            where
56238                T: ::std::convert::TryInto<super::X402v2PaymentRequirementsAsset>,
56239                T::Error: ::std::fmt::Display,
56240            {
56241                self.asset = value
56242                    .try_into()
56243                    .map_err(|e| format!("error converting supplied value for asset: {}", e));
56244                self
56245            }
56246            pub fn extra<T>(mut self, value: T) -> Self
56247            where
56248                T: ::std::convert::TryInto<
56249                    ::serde_json::Map<::std::string::String, ::serde_json::Value>,
56250                >,
56251                T::Error: ::std::fmt::Display,
56252            {
56253                self.extra = value
56254                    .try_into()
56255                    .map_err(|e| format!("error converting supplied value for extra: {}", e));
56256                self
56257            }
56258            pub fn max_timeout_seconds<T>(mut self, value: T) -> Self
56259            where
56260                T: ::std::convert::TryInto<i64>,
56261                T::Error: ::std::fmt::Display,
56262            {
56263                self.max_timeout_seconds = value.try_into().map_err(|e| {
56264                    format!(
56265                        "error converting supplied value for max_timeout_seconds: {}",
56266                        e
56267                    )
56268                });
56269                self
56270            }
56271            pub fn network<T>(mut self, value: T) -> Self
56272            where
56273                T: ::std::convert::TryInto<::std::string::String>,
56274                T::Error: ::std::fmt::Display,
56275            {
56276                self.network = value
56277                    .try_into()
56278                    .map_err(|e| format!("error converting supplied value for network: {}", e));
56279                self
56280            }
56281            pub fn pay_to<T>(mut self, value: T) -> Self
56282            where
56283                T: ::std::convert::TryInto<super::X402v2PaymentRequirementsPayTo>,
56284                T::Error: ::std::fmt::Display,
56285            {
56286                self.pay_to = value
56287                    .try_into()
56288                    .map_err(|e| format!("error converting supplied value for pay_to: {}", e));
56289                self
56290            }
56291            pub fn scheme<T>(mut self, value: T) -> Self
56292            where
56293                T: ::std::convert::TryInto<super::X402v2PaymentRequirementsScheme>,
56294                T::Error: ::std::fmt::Display,
56295            {
56296                self.scheme = value
56297                    .try_into()
56298                    .map_err(|e| format!("error converting supplied value for scheme: {}", e));
56299                self
56300            }
56301        }
56302        impl ::std::convert::TryFrom<X402V2PaymentRequirements> for super::X402V2PaymentRequirements {
56303            type Error = super::error::ConversionError;
56304            fn try_from(
56305                value: X402V2PaymentRequirements,
56306            ) -> ::std::result::Result<Self, super::error::ConversionError> {
56307                Ok(Self {
56308                    amount: value.amount?,
56309                    asset: value.asset?,
56310                    extra: value.extra?,
56311                    max_timeout_seconds: value.max_timeout_seconds?,
56312                    network: value.network?,
56313                    pay_to: value.pay_to?,
56314                    scheme: value.scheme?,
56315                })
56316            }
56317        }
56318        impl ::std::convert::From<super::X402V2PaymentRequirements> for X402V2PaymentRequirements {
56319            fn from(value: super::X402V2PaymentRequirements) -> Self {
56320                Self {
56321                    amount: Ok(value.amount),
56322                    asset: Ok(value.asset),
56323                    extra: Ok(value.extra),
56324                    max_timeout_seconds: Ok(value.max_timeout_seconds),
56325                    network: Ok(value.network),
56326                    pay_to: Ok(value.pay_to),
56327                    scheme: Ok(value.scheme),
56328                }
56329            }
56330        }
56331    }
56332    /// Generation of default values for serde.
56333    pub mod defaults {
56334        pub(super) fn default_u64<T, const V: u64>() -> T
56335        where
56336            T: ::std::convert::TryFrom<u64>,
56337            <T as ::std::convert::TryFrom<u64>>::Error: ::std::fmt::Debug,
56338        {
56339            T::try_from(V).unwrap()
56340        }
56341    }
56342}
56343#[derive(Clone, Debug)]
56344/**Client for Coinbase Developer Platform APIs
56345
56346The Coinbase Developer Platform APIs - leading the world's transition onchain.
56347
56348Version: 2.0.0*/
56349pub struct Client {
56350    pub(crate) baseurl: String,
56351    pub(crate) client: reqwest_middleware::ClientWithMiddleware,
56352}
56353impl Client {
56354    /// Create a new client.
56355    ///
56356    /// `baseurl` is the base URL provided to the internal
56357    /// `reqwest::Client`, and should include a scheme and hostname,
56358    /// as well as port and a path stem if applicable.
56359    pub fn new(baseurl: &str) -> Self {
56360        #[cfg(not(target_arch = "wasm32"))]
56361        let client = {
56362            let dur = std::time::Duration::from_secs(15);
56363            let reqwest_client = reqwest::ClientBuilder::new()
56364                .connect_timeout(dur)
56365                .timeout(dur)
56366                .build()
56367                .unwrap();
56368            reqwest_middleware::ClientBuilder::new(reqwest_client).build()
56369        };
56370        #[cfg(target_arch = "wasm32")]
56371        let client = {
56372            let reqwest_client = reqwest::ClientBuilder::new().build().unwrap();
56373            reqwest_middleware::ClientBuilder::new(reqwest_client).build()
56374        };
56375        Self::new_with_client(baseurl, client)
56376    }
56377    /// Construct a new client with an existing `reqwest_middleware::ClientWithMiddleware`,
56378    /// allowing more control over its configuration.
56379    ///
56380    /// `baseurl` is the base URL provided to the internal
56381    /// `reqwest_middleware::ClientWithMiddleware`, and should include a scheme and hostname,
56382    /// as well as port and a path stem if applicable.
56383    pub fn new_with_client(
56384        baseurl: &str,
56385        client: reqwest_middleware::ClientWithMiddleware,
56386    ) -> Self {
56387        Self {
56388            baseurl: baseurl.to_string(),
56389            client,
56390        }
56391    }
56392}
56393impl ClientInfo<()> for Client {
56394    fn api_version() -> &'static str {
56395        "2.0.0"
56396    }
56397    fn baseurl(&self) -> &str {
56398        self.baseurl.as_str()
56399    }
56400    fn client(&self) -> &reqwest_middleware::ClientWithMiddleware {
56401        &self.client
56402    }
56403    fn inner(&self) -> &() {
56404        &()
56405    }
56406}
56407impl ClientHooks<()> for &Client {}
56408impl Client {
56409    /**List EVM token balances
56410
56411    Lists the token balances of an EVM address on a given network. The balances include ERC-20 tokens and the native gas token (usually ETH). The response is paginated, and by default, returns 20 balances per page.
56412
56413    **Note:** This endpoint provides <1 second freshness from chain tip, <500ms response latency for wallets with reasonable token history, and 99.9% uptime for production use.
56414
56415    Sends a `GET` request to `/v2/data/evm/token-balances/{network}/{address}`
56416
56417    Arguments:
56418    - `network`: The human-readable network name to get the balances for.
56419    - `address`: The 0x-prefixed EVM address to get balances for. The address does not need to be checksummed.
56420    - `page_size`: The number of resources to return per page.
56421    - `page_token`: The token for the next page of resources, if any.
56422    ```ignore
56423    let response = client.list_data_token_balances()
56424        .network(network)
56425        .address(address)
56426        .page_size(page_size)
56427        .page_token(page_token)
56428        .send()
56429        .await;
56430    ```*/
56431    pub fn list_data_token_balances(&self) -> builder::ListDataTokenBalances<'_> {
56432        builder::ListDataTokenBalances::new(self)
56433    }
56434    /**List token addresses for account
56435
56436    Retrieve all ERC-20 token contract addresses that an account has ever received tokens from.
56437    Analyzes transaction history to discover token interactions.
56438
56439
56440    Sends a `GET` request to `/v2/data/evm/token-ownership/{network}/{address}`
56441
56442    Arguments:
56443    - `network`: The blockchain network to query.
56444    - `address`: The account address to analyze for token interactions.
56445    ```ignore
56446    let response = client.list_tokens_for_account()
56447        .network(network)
56448        .address(address)
56449        .send()
56450        .await;
56451    ```*/
56452    pub fn list_tokens_for_account(&self) -> builder::ListTokensForAccount<'_> {
56453        builder::ListTokensForAccount::new(self)
56454    }
56455    /**Get SQL grammar
56456
56457    Retrieve the SQL grammar for the SQL API.
56458
56459    The SQL queries that are supported by the SQL API are defined via an ANTLR4 grammar which is evaluated by server before executing the query. This ensures the safety and soundness of the SQL API.
56460
56461    This endpoint returns the ANTLR4 grammar that is used to evaluate the SQL queries so that developers can understand the SQL API and build SQL queries with high confidence and correctness. LLMs interact well with ANTLR4 grammar as well.
56462
56463
56464    Sends a `GET` request to `/v2/data/query/grammar`
56465
56466    ```ignore
56467    let response = client.get_sql_grammar()
56468        .send()
56469        .await;
56470    ```*/
56471    pub fn get_sql_grammar(&self) -> builder::GetSqlGrammar<'_> {
56472        builder::GetSqlGrammar::new(self)
56473    }
56474    /**Run SQL Query
56475
56476    Run a read-only SQL query against indexed blockchain data including transactions, events, and decoded logs.
56477
56478    This endpoint provides direct SQL access to comprehensive blockchain data across supported networks.
56479    Queries are executed against optimized data structures for high-performance analytics.
56480
56481    ### Allowed Queries
56482
56483      - Standard SQL syntax (ClickHouse dialect)
56484      - Read-only queries (SELECT statements)
56485      - No DDL or DML operations
56486      - No cartesian products
56487
56488    ### Supported Tables
56489
56490      - `base.events` - Base mainnet decoded event logs with parameters, event signature, topics, and more.
56491      - `base.transactions` - Base mainnet transaction data including hash, block number, gas usage.
56492      - `base.blocks` - Base mainnet block information.
56493      - `base.encoded_logs` - Encoded log data of event logs that aren't able to be decoded by our event decoder (ex: log0 opcode).
56494      - `base.transfers` - All event logs with event signature `Transfer(address,address,uint256)`. ERC-20, ERC-721, and ERC-1155 transfers are all included.
56495
56496    ### Query Limits
56497
56498      - Maximum result set: 100,000 rows
56499      - Query timeout: 30 seconds
56500
56501
56502    Sends a `POST` request to `/v2/data/query/run`
56503
56504    ```ignore
56505    let response = client.run_sql_query()
56506        .body(body)
56507        .send()
56508        .await;
56509    ```*/
56510    pub fn run_sql_query(&self) -> builder::RunSqlQuery<'_> {
56511        builder::RunSqlQuery::new(self)
56512    }
56513    /**List webhook subscriptions
56514
56515    Retrieve a paginated list of webhook subscriptions for the authenticated project.
56516    Returns subscriptions for all CDP product events (onchain, onramp/offramp, wallet, etc.)
56517    in descending order by creation time.
56518
56519    ### Use Cases
56520    - Monitor all active webhook subscriptions across CDP products
56521    - Audit webhook configurations
56522    - Manage subscription lifecycle
56523
56524
56525    Sends a `GET` request to `/v2/data/webhooks/subscriptions`
56526
56527    Arguments:
56528    - `page_size`: The number of subscriptions to return per page.
56529    - `page_token`: The token for the next page of subscriptions, if any.
56530    ```ignore
56531    let response = client.list_webhook_subscriptions()
56532        .page_size(page_size)
56533        .page_token(page_token)
56534        .send()
56535        .await;
56536    ```*/
56537    pub fn list_webhook_subscriptions(&self) -> builder::ListWebhookSubscriptions<'_> {
56538        builder::ListWebhookSubscriptions::new(self)
56539    }
56540    /**Create webhook subscription
56541
56542    Subscribe to real-time events across CDP products using flexible filtering.
56543
56544    ### Event Types
56545
56546    **Onchain Events** - Monitor Base mainnet with microsecond precision:
56547    - `onchain.activity.detected` - Smart contract events, transfers, swaps, NFT activity
56548    - **Requires** `labels` for filtering (e.g., `contract_address`, `event_name`)
56549
56550    **Onramp/Offramp Events** - Transaction lifecycle notifications:
56551    - `onramp.transaction.created`, `onramp.transaction.updated`
56552    - `onramp.transaction.success`, `onramp.transaction.failed`
56553    - `offramp.transaction.created`, `offramp.transaction.updated`
56554    - `offramp.transaction.success`, `offramp.transaction.failed`
56555    - **No labels required** - maximum simplicity for transaction monitoring
56556
56557    **Wallet Events** - Wallet activity notifications:
56558    - `wallet.activity.detected`
56559
56560    ### Webhook Signature Verification
56561    All webhooks include cryptographic signatures for security.
56562    The signature secret is returned in `metadata.secret` when creating a subscription.
56563
56564    **Note:** Webhooks are in beta and this interface is subject to change.
56565
56566    See the [verification guide](https://docs.cdp.coinbase.com/onramp-&-offramp/webhooks#webhook-signature-verification) for implementation details.
56567
56568    ### Onchain Label Filtering
56569
56570    For `onchain.activity.detected` events, use `labels` for precise filtering with AND logic (max 20 labels per webhook).
56571
56572    **Allowed labels** (all in snake_case format):
56573    - `network` (required) - Blockchain network
56574    - `contract_address` - Smart contract address
56575    - `event_name` - Event name (e.g., "Transfer", "Burn")
56576    - `event_signature` - Event signature hash
56577    - `transaction_from` - Transaction sender address
56578    - `transaction_to` - Transaction recipient address
56579    - `params.*` - Any event parameter (e.g., `params.from`, `params.to`, `params.sender`, `params.tokenId`)
56580
56581    **Examples**:
56582    - **Liquidity Pool Monitor**: `{"network": "base-mainnet", "contract_address": "0xcd1f9777571493aeacb7eae45cd30a226d3e612d", "event_name": "Burn"}`
56583    - **Price Oracle Tracker**: `{"network": "base-mainnet", "contract_address": "0xbac4a9428ea707c51f171ed9890c3c2fa810305d", "event_name": "PriceUpdated"}`
56584    - **DeFi Protocol Activity**: `{"network": "base-mainnet", "contract_address": "0x45c6e6a47a711b14d8357d5243f46704904578e3", "event_name": "Deposit"}`
56585
56586
56587    Sends a `POST` request to `/v2/data/webhooks/subscriptions`
56588
56589    ```ignore
56590    let response = client.create_webhook_subscription()
56591        .body(body)
56592        .send()
56593        .await;
56594    ```*/
56595    pub fn create_webhook_subscription(&self) -> builder::CreateWebhookSubscription<'_> {
56596        builder::CreateWebhookSubscription::new(self)
56597    }
56598    /**Get webhook subscription details
56599
56600    Retrieve detailed information about a specific webhook subscription including
56601    configuration, status, creation timestamp, and webhook signature secret.
56602
56603    ### Response Includes
56604    - Subscription configuration and filters
56605    - Target URL and custom headers
56606    - Webhook signature secret for verification
56607    - Creation timestamp and status
56608
56609
56610    Sends a `GET` request to `/v2/data/webhooks/subscriptions/{subscriptionId}`
56611
56612    Arguments:
56613    - `subscription_id`: Unique identifier for the webhook subscription.
56614    ```ignore
56615    let response = client.get_webhook_subscription()
56616        .subscription_id(subscription_id)
56617        .send()
56618        .await;
56619    ```*/
56620    pub fn get_webhook_subscription(&self) -> builder::GetWebhookSubscription<'_> {
56621        builder::GetWebhookSubscription::new(self)
56622    }
56623    /**Update webhook subscription
56624
56625    Update an existing webhook subscription's configuration including
56626    event types, target URL, filtering criteria, and enabled status.
56627    All required fields must be provided, even if they are not being changed.
56628
56629    ### Common Updates
56630    - Change target URL or headers
56631    - Add/remove event type filters
56632    - Update multi-label filtering criteria
56633    - Enable/disable subscription
56634
56635
56636    Sends a `PUT` request to `/v2/data/webhooks/subscriptions/{subscriptionId}`
56637
56638    Arguments:
56639    - `subscription_id`: Unique identifier for the webhook subscription.
56640    - `body`
56641    ```ignore
56642    let response = client.update_webhook_subscription()
56643        .subscription_id(subscription_id)
56644        .body(body)
56645        .send()
56646        .await;
56647    ```*/
56648    pub fn update_webhook_subscription(&self) -> builder::UpdateWebhookSubscription<'_> {
56649        builder::UpdateWebhookSubscription::new(self)
56650    }
56651    /**Delete webhook subscription
56652
56653    Permanently delete a webhook subscription and stop all event deliveries.
56654    This action cannot be undone.
56655
56656    ### Important Notes
56657    - All webhook deliveries will cease immediately
56658    - Subscription cannot be recovered after deletion
56659    - Consider disabling instead of deleting for temporary pauses
56660
56661
56662    Sends a `DELETE` request to `/v2/data/webhooks/subscriptions/{subscriptionId}`
56663
56664    Arguments:
56665    - `subscription_id`: Unique identifier for the webhook subscription.
56666    ```ignore
56667    let response = client.delete_webhook_subscription()
56668        .subscription_id(subscription_id)
56669        .send()
56670        .await;
56671    ```*/
56672    pub fn delete_webhook_subscription(&self) -> builder::DeleteWebhookSubscription<'_> {
56673        builder::DeleteWebhookSubscription::new(self)
56674    }
56675    /**List end users
56676
56677    Lists the end users belonging to the developer's CDP Project.
56678    By default, the response is sorted by creation date in ascending order and paginated to 20 users per page.
56679
56680    Sends a `GET` request to `/v2/end-users`
56681
56682    Arguments:
56683    - `page_size`: The number of end users to return per page.
56684    - `page_token`: The token for the desired page of end users. Will be empty if there are no more end users to fetch.
56685    - `sort`: Sort end users. Defaults to ascending order (oldest first).
56686    ```ignore
56687    let response = client.list_end_users()
56688        .page_size(page_size)
56689        .page_token(page_token)
56690        .sort(sort)
56691        .send()
56692        .await;
56693    ```*/
56694    pub fn list_end_users(&self) -> builder::ListEndUsers<'_> {
56695        builder::ListEndUsers::new(self)
56696    }
56697    /**Create an end user
56698
56699    Creates an end user. An end user is an entity that can own CDP EVM accounts, EVM smart accounts, and/or Solana accounts. 1 or more authentication methods must be associated with an end user. By default, no accounts are created unless the optional `evmAccount` and/or `solanaAccount` fields are provided.
56700    This API is intended to be used by the developer's own backend, and is authenticated using the developer's CDP API key.
56701
56702    Sends a `POST` request to `/v2/end-users`
56703
56704    Arguments:
56705    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
56706    When included, duplicate requests with the same key will return identical responses.
56707    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
56708
56709    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
56710    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
56711    section of our Authentication docs for more details on how to generate your Wallet Token.
56712
56713    - `body`
56714    ```ignore
56715    let response = client.create_end_user()
56716        .x_idempotency_key(x_idempotency_key)
56717        .x_wallet_auth(x_wallet_auth)
56718        .body(body)
56719        .send()
56720        .await;
56721    ```*/
56722    pub fn create_end_user(&self) -> builder::CreateEndUser<'_> {
56723        builder::CreateEndUser::new(self)
56724    }
56725    /**Validate end user access token
56726
56727    Validates the end user's access token and returns the end user's information. Returns an error if the access token is invalid or expired.
56728
56729    This API is intended to be used by the developer's own backend, and is authenticated using the developer's CDP API key.
56730
56731    Sends a `POST` request to `/v2/end-users/auth/validate-token`
56732
56733    ```ignore
56734    let response = client.validate_end_user_access_token()
56735        .body(body)
56736        .send()
56737        .await;
56738    ```*/
56739    pub fn validate_end_user_access_token(&self) -> builder::ValidateEndUserAccessToken<'_> {
56740        builder::ValidateEndUserAccessToken::new(self)
56741    }
56742    /**Get an end user
56743
56744    Gets an end user by ID.
56745
56746    This API is intended to be used by the developer's own backend, and is authenticated using the developer's CDP API key.
56747
56748    Sends a `GET` request to `/v2/end-users/{userId}`
56749
56750    Arguments:
56751    - `user_id`: The ID of the end user to get.
56752    ```ignore
56753    let response = client.get_end_user()
56754        .user_id(user_id)
56755        .send()
56756        .await;
56757    ```*/
56758    pub fn get_end_user(&self) -> builder::GetEndUser<'_> {
56759        builder::GetEndUser::new(self)
56760    }
56761    /**List EVM accounts
56762
56763    Lists the EVM accounts belonging to the developer's CDP Project.
56764    The response is paginated, and by default, returns 20 accounts per page.
56765
56766    Sends a `GET` request to `/v2/evm/accounts`
56767
56768    Arguments:
56769    - `page_size`: The number of resources to return per page.
56770    - `page_token`: The token for the next page of resources, if any.
56771    ```ignore
56772    let response = client.list_evm_accounts()
56773        .page_size(page_size)
56774        .page_token(page_token)
56775        .send()
56776        .await;
56777    ```*/
56778    pub fn list_evm_accounts(&self) -> builder::ListEvmAccounts<'_> {
56779        builder::ListEvmAccounts::new(self)
56780    }
56781    /**Create an EVM account
56782
56783    Creates a new EVM account.
56784
56785    Sends a `POST` request to `/v2/evm/accounts`
56786
56787    Arguments:
56788    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
56789    When included, duplicate requests with the same key will return identical responses.
56790    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
56791
56792    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
56793    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
56794    section of our Authentication docs for more details on how to generate your Wallet Token.
56795
56796    - `body`
56797    ```ignore
56798    let response = client.create_evm_account()
56799        .x_idempotency_key(x_idempotency_key)
56800        .x_wallet_auth(x_wallet_auth)
56801        .body(body)
56802        .send()
56803        .await;
56804    ```*/
56805    pub fn create_evm_account(&self) -> builder::CreateEvmAccount<'_> {
56806        builder::CreateEvmAccount::new(self)
56807    }
56808    /**Get an EVM account by name
56809
56810    Gets an EVM account by its name.
56811
56812    Sends a `GET` request to `/v2/evm/accounts/by-name/{name}`
56813
56814    Arguments:
56815    - `name`: The name of the EVM account.
56816    ```ignore
56817    let response = client.get_evm_account_by_name()
56818        .name(name)
56819        .send()
56820        .await;
56821    ```*/
56822    pub fn get_evm_account_by_name(&self) -> builder::GetEvmAccountByName<'_> {
56823        builder::GetEvmAccountByName::new(self)
56824    }
56825    /**Export an EVM account by name
56826
56827    Export an existing EVM account's private key by its name. It is important to store the private key in a secure place after it's exported.
56828
56829    Sends a `POST` request to `/v2/evm/accounts/export/by-name/{name}`
56830
56831    Arguments:
56832    - `name`: The name of the EVM account.
56833    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
56834    When included, duplicate requests with the same key will return identical responses.
56835    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
56836
56837    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
56838    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
56839    section of our Authentication docs for more details on how to generate your Wallet Token.
56840
56841    - `body`
56842    ```ignore
56843    let response = client.export_evm_account_by_name()
56844        .name(name)
56845        .x_idempotency_key(x_idempotency_key)
56846        .x_wallet_auth(x_wallet_auth)
56847        .body(body)
56848        .send()
56849        .await;
56850    ```*/
56851    pub fn export_evm_account_by_name(&self) -> builder::ExportEvmAccountByName<'_> {
56852        builder::ExportEvmAccountByName::new(self)
56853    }
56854    /**Import an EVM account
56855
56856    Import an existing EVM account into the developer's CDP Project. This API should be called from the [CDP SDK](https://github.com/coinbase/cdp-sdk) to ensure that the associated private key is properly encrypted.
56857
56858    Sends a `POST` request to `/v2/evm/accounts/import`
56859
56860    Arguments:
56861    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
56862    When included, duplicate requests with the same key will return identical responses.
56863    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
56864
56865    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
56866    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
56867    section of our Authentication docs for more details on how to generate your Wallet Token.
56868
56869    - `body`
56870    ```ignore
56871    let response = client.import_evm_account()
56872        .x_idempotency_key(x_idempotency_key)
56873        .x_wallet_auth(x_wallet_auth)
56874        .body(body)
56875        .send()
56876        .await;
56877    ```*/
56878    pub fn import_evm_account(&self) -> builder::ImportEvmAccount<'_> {
56879        builder::ImportEvmAccount::new(self)
56880    }
56881    /**Get an EVM account by address
56882
56883    Gets an EVM account by its address.
56884
56885    Sends a `GET` request to `/v2/evm/accounts/{address}`
56886
56887    Arguments:
56888    - `address`: The 0x-prefixed address of the EVM account. The address does not need to be checksummed.
56889    ```ignore
56890    let response = client.get_evm_account()
56891        .address(address)
56892        .send()
56893        .await;
56894    ```*/
56895    pub fn get_evm_account(&self) -> builder::GetEvmAccount<'_> {
56896        builder::GetEvmAccount::new(self)
56897    }
56898    /**Update an EVM account
56899
56900    Updates an existing EVM account. Use this to update the account's name or account-level policy.
56901
56902    Sends a `PUT` request to `/v2/evm/accounts/{address}`
56903
56904    Arguments:
56905    - `address`: The 0x-prefixed address of the EVM account. The address does not need to be checksummed.
56906    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
56907    When included, duplicate requests with the same key will return identical responses.
56908    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
56909
56910    - `body`
56911    ```ignore
56912    let response = client.update_evm_account()
56913        .address(address)
56914        .x_idempotency_key(x_idempotency_key)
56915        .body(body)
56916        .send()
56917        .await;
56918    ```*/
56919    pub fn update_evm_account(&self) -> builder::UpdateEvmAccount<'_> {
56920        builder::UpdateEvmAccount::new(self)
56921    }
56922    /**Export an EVM account
56923
56924    Export an existing EVM account's private key. It is important to store the private key in a secure place after it's exported.
56925
56926    Sends a `POST` request to `/v2/evm/accounts/{address}/export`
56927
56928    Arguments:
56929    - `address`: The 0x-prefixed address of the EVM account. The address does not need to be checksummed.
56930    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
56931    When included, duplicate requests with the same key will return identical responses.
56932    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
56933
56934    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
56935    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
56936    section of our Authentication docs for more details on how to generate your Wallet Token.
56937
56938    - `body`
56939    ```ignore
56940    let response = client.export_evm_account()
56941        .address(address)
56942        .x_idempotency_key(x_idempotency_key)
56943        .x_wallet_auth(x_wallet_auth)
56944        .body(body)
56945        .send()
56946        .await;
56947    ```*/
56948    pub fn export_evm_account(&self) -> builder::ExportEvmAccount<'_> {
56949        builder::ExportEvmAccount::new(self)
56950    }
56951    /**Send a transaction
56952
56953    Signs a transaction with the given EVM account and sends it to the indicated supported network. This API handles nonce management and gas estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/).
56954
56955    The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md).
56956
56957
56958    **Transaction fields and API behavior**
56959
56960    - `to` *(Required)*: The address of the contract or account to send the transaction to.
56961    - `chainId` *(Ignored)*: The value of the `chainId` field in the transaction is ignored.
56962      The transaction will be sent to the network indicated by the `network` field in the request body.
56963
56964    - `nonce` *(Optional)*: The nonce to use for the transaction. If not provided, the API will assign
56965       a nonce to the transaction based on the current state of the account.
56966
56967    - `maxPriorityFeePerGas` *(Optional)*: The maximum priority fee per gas to use for the transaction.
56968       If not provided, the API will estimate a value based on current network conditions.
56969
56970    - `maxFeePerGas` *(Optional)*: The maximum fee per gas to use for the transaction.
56971       If not provided, the API will estimate a value based on current network conditions.
56972
56973    - `gasLimit` *(Optional)*: The gas limit to use for the transaction. If not provided, the API will estimate a value
56974      based on the `to` and `data` fields of the transaction.
56975
56976    - `value` *(Optional)*: The amount of ETH, in wei, to send with the transaction.
56977    - `data` *(Optional)*: The data to send with the transaction; only used for contract calls.
56978    - `accessList` *(Optional)*: The access list to use for the transaction.
56979
56980    Sends a `POST` request to `/v2/evm/accounts/{address}/send/transaction`
56981
56982    Arguments:
56983    - `address`: The 0x-prefixed address of the Ethereum account.
56984    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
56985    When included, duplicate requests with the same key will return identical responses.
56986    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
56987
56988    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
56989    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
56990    section of our Authentication docs for more details on how to generate your Wallet Token.
56991
56992    - `body`
56993    ```ignore
56994    let response = client.send_evm_transaction()
56995        .address(address)
56996        .x_idempotency_key(x_idempotency_key)
56997        .x_wallet_auth(x_wallet_auth)
56998        .body(body)
56999        .send()
57000        .await;
57001    ```*/
57002    pub fn send_evm_transaction(&self) -> builder::SendEvmTransaction<'_> {
57003        builder::SendEvmTransaction::new(self)
57004    }
57005    /**Sign a hash
57006
57007    Signs an arbitrary 32 byte hash with the given EVM account.
57008
57009    Sends a `POST` request to `/v2/evm/accounts/{address}/sign`
57010
57011    Arguments:
57012    - `address`: The 0x-prefixed address of the EVM account.
57013    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57014    When included, duplicate requests with the same key will return identical responses.
57015    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57016
57017    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57018    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57019    section of our Authentication docs for more details on how to generate your Wallet Token.
57020
57021    - `body`
57022    ```ignore
57023    let response = client.sign_evm_hash()
57024        .address(address)
57025        .x_idempotency_key(x_idempotency_key)
57026        .x_wallet_auth(x_wallet_auth)
57027        .body(body)
57028        .send()
57029        .await;
57030    ```*/
57031    pub fn sign_evm_hash(&self) -> builder::SignEvmHash<'_> {
57032        builder::SignEvmHash::new(self)
57033    }
57034    /**Sign an EIP-191 message
57035
57036    Signs an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message with the given EVM account.
57037
57038    Per the specification, the message in the request body is prepended with `0x19 <0x45 (E)> <thereum Signed Message:\n" + len(message)>` before being signed.
57039
57040    Sends a `POST` request to `/v2/evm/accounts/{address}/sign/message`
57041
57042    Arguments:
57043    - `address`: The 0x-prefixed address of the EVM account.
57044    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57045    When included, duplicate requests with the same key will return identical responses.
57046    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57047
57048    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57049    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57050    section of our Authentication docs for more details on how to generate your Wallet Token.
57051
57052    - `body`
57053    ```ignore
57054    let response = client.sign_evm_message()
57055        .address(address)
57056        .x_idempotency_key(x_idempotency_key)
57057        .x_wallet_auth(x_wallet_auth)
57058        .body(body)
57059        .send()
57060        .await;
57061    ```*/
57062    pub fn sign_evm_message(&self) -> builder::SignEvmMessage<'_> {
57063        builder::SignEvmMessage::new(self)
57064    }
57065    /**Sign a transaction
57066
57067    Signs a transaction with the given EVM account.
57068    The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/).
57069
57070    The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md). The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
57071
57072    Sends a `POST` request to `/v2/evm/accounts/{address}/sign/transaction`
57073
57074    Arguments:
57075    - `address`: The 0x-prefixed address of the EVM account.
57076    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57077    When included, duplicate requests with the same key will return identical responses.
57078    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57079
57080    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57081    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57082    section of our Authentication docs for more details on how to generate your Wallet Token.
57083
57084    - `body`
57085    ```ignore
57086    let response = client.sign_evm_transaction()
57087        .address(address)
57088        .x_idempotency_key(x_idempotency_key)
57089        .x_wallet_auth(x_wallet_auth)
57090        .body(body)
57091        .send()
57092        .await;
57093    ```*/
57094    pub fn sign_evm_transaction(&self) -> builder::SignEvmTransaction<'_> {
57095        builder::SignEvmTransaction::new(self)
57096    }
57097    /**Sign EIP-712 typed data
57098
57099    Signs [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data with the given EVM account.
57100
57101    Sends a `POST` request to `/v2/evm/accounts/{address}/sign/typed-data`
57102
57103    Arguments:
57104    - `address`: The 0x-prefixed address of the EVM account.
57105    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57106    When included, duplicate requests with the same key will return identical responses.
57107    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57108
57109    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57110    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57111    section of our Authentication docs for more details on how to generate your Wallet Token.
57112
57113    - `body`
57114    ```ignore
57115    let response = client.sign_evm_typed_data()
57116        .address(address)
57117        .x_idempotency_key(x_idempotency_key)
57118        .x_wallet_auth(x_wallet_auth)
57119        .body(body)
57120        .send()
57121        .await;
57122    ```*/
57123    pub fn sign_evm_typed_data(&self) -> builder::SignEvmTypedData<'_> {
57124        builder::SignEvmTypedData::new(self)
57125    }
57126    /**Request funds on EVM test networks
57127
57128    Request funds from the CDP Faucet on supported EVM test networks.
57129
57130    Faucets are available for ETH, USDC, EURC, and cbBTC on Base Sepolia and Ethereum Sepolia, and for ETH only on Ethereum Hoodi.
57131
57132    To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
57133    These limits are applied at both the CDP User level and the blockchain address level.
57134    A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
57135
57136    | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
57137    |:-----:|:-------------------------:|:--------------------------------:|
57138    | ETH   | 0.0001 ETH                | 0.1 ETH                          |
57139    | USDC  | 1 USDC                    | 10 USDC                          |
57140    | EURC  | 1 EURC                    | 10 EURC                          |
57141    | cbBTC | 0.0001 cbBTC              | 0.001 cbBTC                      |
57142
57143
57144    Sends a `POST` request to `/v2/evm/faucet`
57145
57146    ```ignore
57147    let response = client.request_evm_faucet()
57148        .body(body)
57149        .send()
57150        .await;
57151    ```*/
57152    pub fn request_evm_faucet(&self) -> builder::RequestEvmFaucet<'_> {
57153        builder::RequestEvmFaucet::new(self)
57154    }
57155    /**List Smart Accounts
57156
57157    Lists the Smart Accounts belonging to the developer's CDP Project.
57158    The response is paginated, and by default, returns 20 accounts per page.
57159
57160    Sends a `GET` request to `/v2/evm/smart-accounts`
57161
57162    Arguments:
57163    - `page_size`: The number of resources to return per page.
57164    - `page_token`: The token for the next page of resources, if any.
57165    ```ignore
57166    let response = client.list_evm_smart_accounts()
57167        .page_size(page_size)
57168        .page_token(page_token)
57169        .send()
57170        .await;
57171    ```*/
57172    pub fn list_evm_smart_accounts(&self) -> builder::ListEvmSmartAccounts<'_> {
57173        builder::ListEvmSmartAccounts::new(self)
57174    }
57175    /**Create a Smart Account
57176
57177    Creates a new Smart Account.
57178
57179    Sends a `POST` request to `/v2/evm/smart-accounts`
57180
57181    Arguments:
57182    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57183    When included, duplicate requests with the same key will return identical responses.
57184    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57185
57186    - `body`
57187    ```ignore
57188    let response = client.create_evm_smart_account()
57189        .x_idempotency_key(x_idempotency_key)
57190        .body(body)
57191        .send()
57192        .await;
57193    ```*/
57194    pub fn create_evm_smart_account(&self) -> builder::CreateEvmSmartAccount<'_> {
57195        builder::CreateEvmSmartAccount::new(self)
57196    }
57197    /**Get a Smart Account by name
57198
57199    Gets a Smart Account by its name.
57200
57201    Sends a `GET` request to `/v2/evm/smart-accounts/by-name/{name}`
57202
57203    Arguments:
57204    - `name`: The name of the Smart Account.
57205    ```ignore
57206    let response = client.get_evm_smart_account_by_name()
57207        .name(name)
57208        .send()
57209        .await;
57210    ```*/
57211    pub fn get_evm_smart_account_by_name(&self) -> builder::GetEvmSmartAccountByName<'_> {
57212        builder::GetEvmSmartAccountByName::new(self)
57213    }
57214    /**Get a Smart Account by address
57215
57216    Gets a Smart Account by its address.
57217
57218    Sends a `GET` request to `/v2/evm/smart-accounts/{address}`
57219
57220    Arguments:
57221    - `address`: The 0x-prefixed address of the Smart Account.
57222    ```ignore
57223    let response = client.get_evm_smart_account()
57224        .address(address)
57225        .send()
57226        .await;
57227    ```*/
57228    pub fn get_evm_smart_account(&self) -> builder::GetEvmSmartAccount<'_> {
57229        builder::GetEvmSmartAccount::new(self)
57230    }
57231    /**Update an EVM Smart Account
57232
57233    Updates an existing EVM smart account. Use this to update the smart account's name.
57234
57235    Sends a `PUT` request to `/v2/evm/smart-accounts/{address}`
57236
57237    Arguments:
57238    - `address`: The 0x-prefixed address of the EVM smart account. The address does not need to be checksummed.
57239    - `body`
57240    ```ignore
57241    let response = client.update_evm_smart_account()
57242        .address(address)
57243        .body(body)
57244        .send()
57245        .await;
57246    ```*/
57247    pub fn update_evm_smart_account(&self) -> builder::UpdateEvmSmartAccount<'_> {
57248        builder::UpdateEvmSmartAccount::new(self)
57249    }
57250    /**Create a spend permission
57251
57252    Creates a spend permission for the given smart account address.
57253
57254    Sends a `POST` request to `/v2/evm/smart-accounts/{address}/spend-permissions`
57255
57256    Arguments:
57257    - `address`: The address of the Smart Account to create the spend permission for.
57258    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57259    When included, duplicate requests with the same key will return identical responses.
57260    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57261
57262    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57263    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57264    section of our Authentication docs for more details on how to generate your Wallet Token.
57265
57266    - `body`
57267    ```ignore
57268    let response = client.create_spend_permission()
57269        .address(address)
57270        .x_idempotency_key(x_idempotency_key)
57271        .x_wallet_auth(x_wallet_auth)
57272        .body(body)
57273        .send()
57274        .await;
57275    ```*/
57276    pub fn create_spend_permission(&self) -> builder::CreateSpendPermission<'_> {
57277        builder::CreateSpendPermission::new(self)
57278    }
57279    /**List spend permissions
57280
57281    Lists spend permission for the given smart account address.
57282
57283    Sends a `GET` request to `/v2/evm/smart-accounts/{address}/spend-permissions/list`
57284
57285    Arguments:
57286    - `address`: The address of the Smart account to list spend permissions for.
57287    - `page_size`: The number of spend permissions to return per page.
57288    - `page_token`: The token for the next page of spend permissions. Will be empty if there are no more spend permissions to fetch.
57289    ```ignore
57290    let response = client.list_spend_permissions()
57291        .address(address)
57292        .page_size(page_size)
57293        .page_token(page_token)
57294        .send()
57295        .await;
57296    ```*/
57297    pub fn list_spend_permissions(&self) -> builder::ListSpendPermissions<'_> {
57298        builder::ListSpendPermissions::new(self)
57299    }
57300    /**Revoke a spend permission
57301
57302    Revokes an existing spend permission.
57303
57304    Sends a `POST` request to `/v2/evm/smart-accounts/{address}/spend-permissions/revoke`
57305
57306    Arguments:
57307    - `address`: The address of the Smart account this spend permission is valid for.
57308    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57309    When included, duplicate requests with the same key will return identical responses.
57310    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57311
57312    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57313    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57314    section of our Authentication docs for more details on how to generate your Wallet Token.
57315
57316    - `body`
57317    ```ignore
57318    let response = client.revoke_spend_permission()
57319        .address(address)
57320        .x_idempotency_key(x_idempotency_key)
57321        .x_wallet_auth(x_wallet_auth)
57322        .body(body)
57323        .send()
57324        .await;
57325    ```*/
57326    pub fn revoke_spend_permission(&self) -> builder::RevokeSpendPermission<'_> {
57327        builder::RevokeSpendPermission::new(self)
57328    }
57329    /**Prepare a user operation
57330
57331    Prepares a new user operation on a Smart Account for a specific network.
57332
57333    Sends a `POST` request to `/v2/evm/smart-accounts/{address}/user-operations`
57334
57335    Arguments:
57336    - `address`: The address of the Smart Account to create the user operation on.
57337    - `body`
57338    ```ignore
57339    let response = client.prepare_user_operation()
57340        .address(address)
57341        .body(body)
57342        .send()
57343        .await;
57344    ```*/
57345    pub fn prepare_user_operation(&self) -> builder::PrepareUserOperation<'_> {
57346        builder::PrepareUserOperation::new(self)
57347    }
57348    /**Prepare and send a user operation for EVM Smart Account
57349
57350    Prepares, signs, and sends a user operation for an EVM Smart Account. This API can be used only if the owner on Smart Account is a CDP EVM Account.
57351
57352    Sends a `POST` request to `/v2/evm/smart-accounts/{address}/user-operations/prepare-and-send`
57353
57354    Arguments:
57355    - `address`: The address of the EVM Smart Account to execute the user operation from.
57356    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57357    When included, duplicate requests with the same key will return identical responses.
57358    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57359
57360    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57361    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57362    section of our Authentication docs for more details on how to generate your Wallet Token.
57363
57364    - `body`
57365    ```ignore
57366    let response = client.prepare_and_send_user_operation()
57367        .address(address)
57368        .x_idempotency_key(x_idempotency_key)
57369        .x_wallet_auth(x_wallet_auth)
57370        .body(body)
57371        .send()
57372        .await;
57373    ```*/
57374    pub fn prepare_and_send_user_operation(&self) -> builder::PrepareAndSendUserOperation<'_> {
57375        builder::PrepareAndSendUserOperation::new(self)
57376    }
57377    /**Get a user operation
57378
57379    Gets a user operation by its hash.
57380
57381    Sends a `GET` request to `/v2/evm/smart-accounts/{address}/user-operations/{userOpHash}`
57382
57383    Arguments:
57384    - `address`: The address of the Smart Account the user operation belongs to.
57385    - `user_op_hash`: The hash of the user operation to fetch.
57386    ```ignore
57387    let response = client.get_user_operation()
57388        .address(address)
57389        .user_op_hash(user_op_hash)
57390        .send()
57391        .await;
57392    ```*/
57393    pub fn get_user_operation(&self) -> builder::GetUserOperation<'_> {
57394        builder::GetUserOperation::new(self)
57395    }
57396    /**Send a user operation
57397
57398    Sends a user operation with a signature.
57399    The payload to sign must be the `userOpHash` field of the user operation. This hash should be signed directly (not using `personal_sign` or EIP-191 message hashing).
57400    The signature must be 65 bytes in length, consisting of: - 32 bytes for the `r` value - 32 bytes for the `s` value - 1 byte for the `v` value (must be 27 or 28)
57401    If using the CDP Paymaster, the user operation must be signed and sent within 2 minutes of being prepared.
57402
57403    Sends a `POST` request to `/v2/evm/smart-accounts/{address}/user-operations/{userOpHash}/send`
57404
57405    Arguments:
57406    - `address`: The address of the Smart Account to send the user operation from.
57407    - `user_op_hash`: The hash of the user operation to send.
57408    - `body`
57409    ```ignore
57410    let response = client.send_user_operation()
57411        .address(address)
57412        .user_op_hash(user_op_hash)
57413        .body(body)
57414        .send()
57415        .await;
57416    ```*/
57417    pub fn send_user_operation(&self) -> builder::SendUserOperation<'_> {
57418        builder::SendUserOperation::new(self)
57419    }
57420    /**Create a swap quote
57421
57422    Create a swap quote, which includes the payload to sign as well as the transaction data needed to execute the swap. The developer is responsible for signing the payload and submitting the transaction to the network in order to execute the swap.
57423
57424    Sends a `POST` request to `/v2/evm/swaps`
57425
57426    Arguments:
57427    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57428    When included, duplicate requests with the same key will return identical responses.
57429    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57430
57431    - `body`
57432    ```ignore
57433    let response = client.create_evm_swap_quote()
57434        .x_idempotency_key(x_idempotency_key)
57435        .body(body)
57436        .send()
57437        .await;
57438    ```*/
57439    pub fn create_evm_swap_quote(&self) -> builder::CreateEvmSwapQuote<'_> {
57440        builder::CreateEvmSwapQuote::new(self)
57441    }
57442    /**Get a price estimate for a swap
57443
57444    Get a price estimate for a swap between two tokens on an EVM network.
57445
57446    Sends a `GET` request to `/v2/evm/swaps/quote`
57447
57448    ```ignore
57449    let response = client.get_evm_swap_price()
57450        .from_amount(from_amount)
57451        .from_token(from_token)
57452        .gas_price(gas_price)
57453        .network(network)
57454        .signer_address(signer_address)
57455        .slippage_bps(slippage_bps)
57456        .taker(taker)
57457        .to_token(to_token)
57458        .send()
57459        .await;
57460    ```*/
57461    pub fn get_evm_swap_price(&self) -> builder::GetEvmSwapPrice<'_> {
57462        builder::GetEvmSwapPrice::new(self)
57463    }
57464    /**List EVM token balances
57465
57466    Lists the token balances of an EVM address on a given network. The balances include ERC-20 tokens and the native gas token (usually ETH). The response is paginated, and by default, returns 20 balances per page.
57467    **Note:** This endpoint is still under development and does not yet provide strong freshness guarantees. Specifically, balances of new tokens can, on occasion, take up to ~30 seconds to appear, while balances of tokens already belonging to an address will generally be close to chain tip. Freshness of new token balances will improve over the coming weeks.
57468
57469    Sends a `GET` request to `/v2/evm/token-balances/{network}/{address}`
57470
57471    Arguments:
57472    - `network`: The human-readable network name to get the balances for.
57473    - `address`: The 0x-prefixed EVM address to get balances for. The address does not need to be checksummed.
57474    - `page_size`: The number of resources to return per page.
57475    - `page_token`: The token for the next page of resources, if any.
57476    ```ignore
57477    let response = client.list_evm_token_balances()
57478        .network(network)
57479        .address(address)
57480        .page_size(page_size)
57481        .page_token(page_token)
57482        .send()
57483        .await;
57484    ```*/
57485    pub fn list_evm_token_balances(&self) -> builder::ListEvmTokenBalances<'_> {
57486        builder::ListEvmTokenBalances::new(self)
57487    }
57488    /**Create an onramp order
57489
57490    Create a new Onramp order or get a quote for an Onramp order. Either `paymentAmount` or `purchaseAmount` must be provided.
57491
57492    This API currently only supports the payment method `GUEST_CHECKOUT_APPLE_PAY`.
57493
57494    For detailed integration instructions and to get access to this API, refer to the  [Apple Pay Onramp API docs](https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/apple-pay-onramp-api).
57495
57496    Sends a `POST` request to `/v2/onramp/orders`
57497
57498    ```ignore
57499    let response = client.create_onramp_order()
57500        .body(body)
57501        .send()
57502        .await;
57503    ```*/
57504    pub fn create_onramp_order(&self) -> builder::CreateOnrampOrder<'_> {
57505        builder::CreateOnrampOrder::new(self)
57506    }
57507    /**Get an onramp order by ID
57508
57509    Get an onramp order by ID.
57510
57511    Sends a `GET` request to `/v2/onramp/orders/{orderId}`
57512
57513    Arguments:
57514    - `order_id`: The ID of the onramp order to retrieve.
57515    ```ignore
57516    let response = client.get_onramp_order_by_id()
57517        .order_id(order_id)
57518        .send()
57519        .await;
57520    ```*/
57521    pub fn get_onramp_order_by_id(&self) -> builder::GetOnrampOrderById<'_> {
57522        builder::GetOnrampOrderById::new(self)
57523    }
57524    /**Create an onramp session
57525
57526    Returns a single-use URL for an Onramp session. This API provides flexible  functionality based on the parameters provided, supporting three cases:
57527
57528    **Important**: The returned URL is single-use only. Once a user visits the URL,  no one else can access it.
57529    ## Use Cases
57530    ### 1. Basic Session (Minimum Parameters)
57531    **Required**: `destinationAddress`, `purchaseCurrency`, `destinationNetwork`
57532
57533    **Returns**: Basic single-use onramp URL. The `quote` object will not be included in the response.
57534    ### 2. One-Click Onramp URL
57535    **Required**: Basic parameters + `paymentAmount`, `paymentCurrency`
57536
57537    **Returns**: One-click onramp URL for streamlined checkout. The `quote` object will not be included in the response.
57538    ### 3. One-Click Onramp URL with Quote
57539    **Required**: One-Click Onramp parameters + `paymentMethod`, `country`, `subdivision`
57540
57541    **Returns**: Complete pricing quote and one-click onramp URL. Both `session` and `quote` objects will be included in the response.
57542
57543    Sends a `POST` request to `/v2/onramp/sessions`
57544
57545    ```ignore
57546    let response = client.create_onramp_session()
57547        .body(body)
57548        .send()
57549        .await;
57550    ```*/
57551    pub fn create_onramp_session(&self) -> builder::CreateOnrampSession<'_> {
57552        builder::CreateOnrampSession::new(self)
57553    }
57554    /**List policies
57555
57556    Lists the policies belonging to the developer's CDP Project. Use the `scope` parameter to filter the policies by scope.
57557    The response is paginated, and by default, returns 20 policies per page.
57558
57559    Sends a `GET` request to `/v2/policy-engine/policies`
57560
57561    Arguments:
57562    - `page_size`: The number of resources to return per page.
57563    - `page_token`: The token for the next page of resources, if any.
57564    - `scope`: The scope of the policies to return. If `project`, the response will include exactly one policy, which is the project-level policy. If `account`, the response will include all account-level policies for the developer's CDP Project.
57565    ```ignore
57566    let response = client.list_policies()
57567        .page_size(page_size)
57568        .page_token(page_token)
57569        .scope(scope)
57570        .send()
57571        .await;
57572    ```*/
57573    pub fn list_policies(&self) -> builder::ListPolicies<'_> {
57574        builder::ListPolicies::new(self)
57575    }
57576    /**Create a policy
57577
57578    Create a policy that can be used to govern the behavior of accounts.
57579
57580    Sends a `POST` request to `/v2/policy-engine/policies`
57581
57582    Arguments:
57583    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57584    When included, duplicate requests with the same key will return identical responses.
57585    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57586
57587    - `body`
57588    ```ignore
57589    let response = client.create_policy()
57590        .x_idempotency_key(x_idempotency_key)
57591        .body(body)
57592        .send()
57593        .await;
57594    ```*/
57595    pub fn create_policy(&self) -> builder::CreatePolicy<'_> {
57596        builder::CreatePolicy::new(self)
57597    }
57598    /**Get a policy by ID
57599
57600    Get a policy by its ID.
57601
57602    Sends a `GET` request to `/v2/policy-engine/policies/{policyId}`
57603
57604    Arguments:
57605    - `policy_id`: The ID of the policy to get.
57606    ```ignore
57607    let response = client.get_policy_by_id()
57608        .policy_id(policy_id)
57609        .send()
57610        .await;
57611    ```*/
57612    pub fn get_policy_by_id(&self) -> builder::GetPolicyById<'_> {
57613        builder::GetPolicyById::new(self)
57614    }
57615    /**Update a policy
57616
57617    Updates a policy by its ID. This will have the effect of applying the updated policy to all accounts that are currently using it.
57618
57619    Sends a `PUT` request to `/v2/policy-engine/policies/{policyId}`
57620
57621    Arguments:
57622    - `policy_id`: The ID of the policy to update.
57623    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57624    When included, duplicate requests with the same key will return identical responses.
57625    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57626
57627    - `body`
57628    ```ignore
57629    let response = client.update_policy()
57630        .policy_id(policy_id)
57631        .x_idempotency_key(x_idempotency_key)
57632        .body(body)
57633        .send()
57634        .await;
57635    ```*/
57636    pub fn update_policy(&self) -> builder::UpdatePolicy<'_> {
57637        builder::UpdatePolicy::new(self)
57638    }
57639    /**Delete a policy
57640
57641    Delete a policy by its ID. This will have the effect of removing the policy from all accounts that are currently using it.
57642
57643    Sends a `DELETE` request to `/v2/policy-engine/policies/{policyId}`
57644
57645    Arguments:
57646    - `policy_id`: The ID of the policy to delete.
57647    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57648    When included, duplicate requests with the same key will return identical responses.
57649    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57650
57651    ```ignore
57652    let response = client.delete_policy()
57653        .policy_id(policy_id)
57654        .x_idempotency_key(x_idempotency_key)
57655        .send()
57656        .await;
57657    ```*/
57658    pub fn delete_policy(&self) -> builder::DeletePolicy<'_> {
57659        builder::DeletePolicy::new(self)
57660    }
57661    /**List Solana accounts or get account by name
57662
57663    Lists the Solana accounts belonging to the developer.
57664    The response is paginated, and by default, returns 20 accounts per page.
57665
57666    If a name is provided, the response will contain only the account with that name.
57667
57668    Sends a `GET` request to `/v2/solana/accounts`
57669
57670    Arguments:
57671    - `page_size`: The number of resources to return per page.
57672    - `page_token`: The token for the next page of resources, if any.
57673    ```ignore
57674    let response = client.list_solana_accounts()
57675        .page_size(page_size)
57676        .page_token(page_token)
57677        .send()
57678        .await;
57679    ```*/
57680    pub fn list_solana_accounts(&self) -> builder::ListSolanaAccounts<'_> {
57681        builder::ListSolanaAccounts::new(self)
57682    }
57683    /**Create a Solana account
57684
57685    Creates a new Solana account.
57686
57687    Sends a `POST` request to `/v2/solana/accounts`
57688
57689    Arguments:
57690    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57691    When included, duplicate requests with the same key will return identical responses.
57692    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57693
57694    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57695    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57696    section of our Authentication docs for more details on how to generate your Wallet Token.
57697
57698    - `body`
57699    ```ignore
57700    let response = client.create_solana_account()
57701        .x_idempotency_key(x_idempotency_key)
57702        .x_wallet_auth(x_wallet_auth)
57703        .body(body)
57704        .send()
57705        .await;
57706    ```*/
57707    pub fn create_solana_account(&self) -> builder::CreateSolanaAccount<'_> {
57708        builder::CreateSolanaAccount::new(self)
57709    }
57710    /**Get a Solana account by name
57711
57712    Gets a Solana account by its name.
57713
57714    Sends a `GET` request to `/v2/solana/accounts/by-name/{name}`
57715
57716    Arguments:
57717    - `name`: The name of the Solana account.
57718    ```ignore
57719    let response = client.get_solana_account_by_name()
57720        .name(name)
57721        .send()
57722        .await;
57723    ```*/
57724    pub fn get_solana_account_by_name(&self) -> builder::GetSolanaAccountByName<'_> {
57725        builder::GetSolanaAccountByName::new(self)
57726    }
57727    /**Export a Solana account by name
57728
57729    Export an existing Solana account's private key by its name. It is important to store the private key in a secure place after it's exported.
57730
57731    Sends a `POST` request to `/v2/solana/accounts/export/by-name/{name}`
57732
57733    Arguments:
57734    - `name`: The name of the Solana account.
57735    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57736    When included, duplicate requests with the same key will return identical responses.
57737    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57738
57739    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57740    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57741    section of our Authentication docs for more details on how to generate your Wallet Token.
57742
57743    - `body`
57744    ```ignore
57745    let response = client.export_solana_account_by_name()
57746        .name(name)
57747        .x_idempotency_key(x_idempotency_key)
57748        .x_wallet_auth(x_wallet_auth)
57749        .body(body)
57750        .send()
57751        .await;
57752    ```*/
57753    pub fn export_solana_account_by_name(&self) -> builder::ExportSolanaAccountByName<'_> {
57754        builder::ExportSolanaAccountByName::new(self)
57755    }
57756    /**Import a Solana account
57757
57758    Import an existing Solana account into the developer's CDP Project. This API should be called from the [CDP SDK](https://github.com/coinbase/cdp-sdk) to ensure that the associated private key is properly encrypted.
57759
57760    Sends a `POST` request to `/v2/solana/accounts/import`
57761
57762    Arguments:
57763    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57764    When included, duplicate requests with the same key will return identical responses.
57765    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57766
57767    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57768    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57769    section of our Authentication docs for more details on how to generate your Wallet Token.
57770
57771    - `body`
57772    ```ignore
57773    let response = client.import_solana_account()
57774        .x_idempotency_key(x_idempotency_key)
57775        .x_wallet_auth(x_wallet_auth)
57776        .body(body)
57777        .send()
57778        .await;
57779    ```*/
57780    pub fn import_solana_account(&self) -> builder::ImportSolanaAccount<'_> {
57781        builder::ImportSolanaAccount::new(self)
57782    }
57783    /**Send a Solana transaction
57784
57785    Signs and sends a single Solana transaction using multiple Solana accounts. The transaction may contain contain several instructions, each of which may require signatures from different account keys.
57786
57787    The transaction should be serialized into a byte array and base64 encoded. The API handles recent blockhash management and fee estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction.
57788
57789    **Transaction types**
57790
57791    The following transaction types are supported:
57792    * [Legacy transactions](https://solana.com/developers/guides/advanced/versions#current-transaction-versions)
57793    * [Versioned transactions](https://solana.com/developers/guides/advanced/versions)
57794
57795    **Instruction Batching**
57796
57797    To batch multiple operations, include multiple instructions within a single transaction. All instructions within a transaction are executed atomically - if any instruction fails, the entire transaction fails and is rolled back.
57798
57799    **Network Support**
57800
57801    The following Solana networks are supported:
57802    * `solana` - Solana Mainnet
57803    * `solana-devnet` - Solana Devnet
57804
57805    The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
57806
57807    Sends a `POST` request to `/v2/solana/accounts/send/transaction`
57808
57809    Arguments:
57810    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57811    When included, duplicate requests with the same key will return identical responses.
57812    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57813
57814    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57815    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57816    section of our Authentication docs for more details on how to generate your Wallet Token.
57817
57818    - `body`
57819    ```ignore
57820    let response = client.send_solana_transaction()
57821        .x_idempotency_key(x_idempotency_key)
57822        .x_wallet_auth(x_wallet_auth)
57823        .body(body)
57824        .send()
57825        .await;
57826    ```*/
57827    pub fn send_solana_transaction(&self) -> builder::SendSolanaTransaction<'_> {
57828        builder::SendSolanaTransaction::new(self)
57829    }
57830    /**Get a Solana account by address
57831
57832    Gets a Solana account by its address.
57833
57834    Sends a `GET` request to `/v2/solana/accounts/{address}`
57835
57836    Arguments:
57837    - `address`: The base58 encoded address of the Solana account.
57838    ```ignore
57839    let response = client.get_solana_account()
57840        .address(address)
57841        .send()
57842        .await;
57843    ```*/
57844    pub fn get_solana_account(&self) -> builder::GetSolanaAccount<'_> {
57845        builder::GetSolanaAccount::new(self)
57846    }
57847    /**Update a Solana account
57848
57849    Updates an existing Solana account. Use this to update the account's name or account-level policy.
57850
57851    Sends a `PUT` request to `/v2/solana/accounts/{address}`
57852
57853    Arguments:
57854    - `address`: The base58 encoded address of the Solana account.
57855    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57856    When included, duplicate requests with the same key will return identical responses.
57857    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57858
57859    - `body`
57860    ```ignore
57861    let response = client.update_solana_account()
57862        .address(address)
57863        .x_idempotency_key(x_idempotency_key)
57864        .body(body)
57865        .send()
57866        .await;
57867    ```*/
57868    pub fn update_solana_account(&self) -> builder::UpdateSolanaAccount<'_> {
57869        builder::UpdateSolanaAccount::new(self)
57870    }
57871    /**Export an Solana account
57872
57873    Export an existing Solana account's private key. It is important to store the private key in a secure place after it's exported.
57874
57875    Sends a `POST` request to `/v2/solana/accounts/{address}/export`
57876
57877    Arguments:
57878    - `address`: The base58 encoded address of the Solana account.
57879    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57880    When included, duplicate requests with the same key will return identical responses.
57881    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57882
57883    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57884    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57885    section of our Authentication docs for more details on how to generate your Wallet Token.
57886
57887    - `body`
57888    ```ignore
57889    let response = client.export_solana_account()
57890        .address(address)
57891        .x_idempotency_key(x_idempotency_key)
57892        .x_wallet_auth(x_wallet_auth)
57893        .body(body)
57894        .send()
57895        .await;
57896    ```*/
57897    pub fn export_solana_account(&self) -> builder::ExportSolanaAccount<'_> {
57898        builder::ExportSolanaAccount::new(self)
57899    }
57900    /**Sign a message
57901
57902    Signs an arbitrary message with the given Solana account.
57903
57904    **WARNING:** Never sign a message that you didn't generate, as it can be an arbitrary transaction. For example, it might send all of your funds to an attacker.
57905
57906    Sends a `POST` request to `/v2/solana/accounts/{address}/sign/message`
57907
57908    Arguments:
57909    - `address`: The base58 encoded address of the Solana account.
57910    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57911    When included, duplicate requests with the same key will return identical responses.
57912    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57913
57914    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57915    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57916    section of our Authentication docs for more details on how to generate your Wallet Token.
57917
57918    - `body`
57919    ```ignore
57920    let response = client.sign_solana_message()
57921        .address(address)
57922        .x_idempotency_key(x_idempotency_key)
57923        .x_wallet_auth(x_wallet_auth)
57924        .body(body)
57925        .send()
57926        .await;
57927    ```*/
57928    pub fn sign_solana_message(&self) -> builder::SignSolanaMessage<'_> {
57929        builder::SignSolanaMessage::new(self)
57930    }
57931    /**Sign a transaction
57932
57933    Signs a transaction with the given Solana account.
57934    The unsigned transaction should be serialized into a byte array and then encoded as base64.
57935
57936    **Transaction types**
57937
57938    The following transaction types are supported:
57939    * [Legacy transactions](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html)
57940    * [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html)
57941
57942    The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
57943
57944    Sends a `POST` request to `/v2/solana/accounts/{address}/sign/transaction`
57945
57946    Arguments:
57947    - `address`: The base58 encoded address of the Solana account.
57948    - `x_idempotency_key`: An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
57949    When included, duplicate requests with the same key will return identical responses.
57950    Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
57951
57952    - `x_wallet_auth`: A JWT signed using your Wallet Secret, encoded in base64. Refer to the
57953    [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)
57954    section of our Authentication docs for more details on how to generate your Wallet Token.
57955
57956    - `body`
57957    ```ignore
57958    let response = client.sign_solana_transaction()
57959        .address(address)
57960        .x_idempotency_key(x_idempotency_key)
57961        .x_wallet_auth(x_wallet_auth)
57962        .body(body)
57963        .send()
57964        .await;
57965    ```*/
57966    pub fn sign_solana_transaction(&self) -> builder::SignSolanaTransaction<'_> {
57967        builder::SignSolanaTransaction::new(self)
57968    }
57969    /**Request funds on Solana devnet
57970
57971    Request funds from the CDP Faucet on Solana devnet.
57972
57973    Faucets are available for SOL.
57974
57975    To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
57976    These limits are applied at both the CDP Project level and the blockchain address level.
57977    A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
57978
57979    | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
57980    |:-----:|:-------------------------:|:--------------------------------:|
57981    | SOL   | 0.00125 SOL               | 0.0125 SOL                       |
57982    | USDC  | 1 USDC                    | 10 USDC                          |
57983
57984
57985    Sends a `POST` request to `/v2/solana/faucet`
57986
57987    ```ignore
57988    let response = client.request_solana_faucet()
57989        .body(body)
57990        .send()
57991        .await;
57992    ```*/
57993    pub fn request_solana_faucet(&self) -> builder::RequestSolanaFaucet<'_> {
57994        builder::RequestSolanaFaucet::new(self)
57995    }
57996    /**List Solana token balances
57997
57998    Lists the token balances of a Solana address on a given network. The balances include SPL tokens and the native SOL token. The response is paginated, and by default, returns 20 balances per page.
57999
58000    **Note:** This endpoint is still under development and does not yet provide strong availability or freshness guarantees. Freshness and availability of new token balances will improve over the coming weeks.
58001
58002    Sends a `GET` request to `/v2/solana/token-balances/{network}/{address}`
58003
58004    Arguments:
58005    - `network`: The human-readable network name to get the balances for.
58006    - `address`: The base58 encoded Solana address to get balances for.
58007    - `page_size`: The number of balances to return per page.
58008    - `page_token`: The token for the next page of balances. Will be empty if there are no more balances to fetch.
58009    ```ignore
58010    let response = client.list_solana_token_balances()
58011        .network(network)
58012        .address(address)
58013        .page_size(page_size)
58014        .page_token(page_token)
58015        .send()
58016        .await;
58017    ```*/
58018    pub fn list_solana_token_balances(&self) -> builder::ListSolanaTokenBalances<'_> {
58019        builder::ListSolanaTokenBalances::new(self)
58020    }
58021    /**Settle a payment
58022
58023    Settle an x402 protocol payment with a specific scheme and network.
58024
58025    Sends a `POST` request to `/v2/x402/settle`
58026
58027    ```ignore
58028    let response = client.settle_x402_payment()
58029        .body(body)
58030        .send()
58031        .await;
58032    ```*/
58033    pub fn settle_x402_payment(&self) -> builder::SettleX402Payment<'_> {
58034        builder::SettleX402Payment::new(self)
58035    }
58036    /**Get supported payment schemes and networks
58037
58038    Get the supported x402 protocol payment schemes and networks that the facilitator is able to verify and settle payments for.
58039
58040    Sends a `GET` request to `/v2/x402/supported`
58041
58042    ```ignore
58043    let response = client.supported_x402_payment_kinds()
58044        .send()
58045        .await;
58046    ```*/
58047    pub fn supported_x402_payment_kinds(&self) -> builder::SupportedX402PaymentKinds<'_> {
58048        builder::SupportedX402PaymentKinds::new(self)
58049    }
58050    /**Verify a payment
58051
58052    Verify an x402 protocol payment with a specific scheme and network.
58053
58054    Sends a `POST` request to `/v2/x402/verify`
58055
58056    ```ignore
58057    let response = client.verify_x402_payment()
58058        .body(body)
58059        .send()
58060        .await;
58061    ```*/
58062    pub fn verify_x402_payment(&self) -> builder::VerifyX402Payment<'_> {
58063        builder::VerifyX402Payment::new(self)
58064    }
58065}
58066/// Types for composing operation parameters.
58067#[allow(clippy::all)]
58068pub mod builder {
58069    use super::types;
58070    #[allow(unused_imports)]
58071    use super::{
58072        encode_path, ByteStream, ClientHooks, ClientInfo, Error, OperationInfo, RequestBuilderExt,
58073        ResponseValue,
58074    };
58075    /**Builder for [`Client::list_data_token_balances`]
58076
58077    [`Client::list_data_token_balances`]: super::Client::list_data_token_balances*/
58078    #[derive(Debug, Clone)]
58079    pub struct ListDataTokenBalances<'a> {
58080        client: &'a super::Client,
58081        network: Result<types::ListEvmTokenBalancesNetwork, String>,
58082        address: Result<types::ListDataTokenBalancesAddress, String>,
58083        page_size: Result<Option<i64>, String>,
58084        page_token: Result<Option<::std::string::String>, String>,
58085    }
58086    impl<'a> ListDataTokenBalances<'a> {
58087        pub fn new(client: &'a super::Client) -> Self {
58088            Self {
58089                client: client,
58090                network: Err("network was not initialized".to_string()),
58091                address: Err("address was not initialized".to_string()),
58092                page_size: Ok(None),
58093                page_token: Ok(None),
58094            }
58095        }
58096        pub fn network<V>(mut self, value: V) -> Self
58097        where
58098            V: std::convert::TryInto<types::ListEvmTokenBalancesNetwork>,
58099        {
58100            self.network = value.try_into().map_err(|_| {
58101                "conversion to `ListEvmTokenBalancesNetwork` for network failed".to_string()
58102            });
58103            self
58104        }
58105        pub fn address<V>(mut self, value: V) -> Self
58106        where
58107            V: std::convert::TryInto<types::ListDataTokenBalancesAddress>,
58108        {
58109            self.address = value.try_into().map_err(|_| {
58110                "conversion to `ListDataTokenBalancesAddress` for address failed".to_string()
58111            });
58112            self
58113        }
58114        pub fn page_size<V>(mut self, value: V) -> Self
58115        where
58116            V: std::convert::TryInto<i64>,
58117        {
58118            self.page_size = value
58119                .try_into()
58120                .map(Some)
58121                .map_err(|_| "conversion to `i64` for page_size failed".to_string());
58122            self
58123        }
58124        pub fn page_token<V>(mut self, value: V) -> Self
58125        where
58126            V: std::convert::TryInto<::std::string::String>,
58127        {
58128            self.page_token = value.try_into().map(Some).map_err(|_| {
58129                "conversion to `:: std :: string :: String` for page_token failed".to_string()
58130            });
58131            self
58132        }
58133        ///Sends a `GET` request to `/v2/data/evm/token-balances/{network}/{address}`
58134        pub async fn send(
58135            self,
58136        ) -> Result<ResponseValue<types::ListDataTokenBalancesResponse>, Error<types::Error>>
58137        {
58138            let Self {
58139                client,
58140                network,
58141                address,
58142                page_size,
58143                page_token,
58144            } = self;
58145            let network = network.map_err(Error::InvalidRequest)?;
58146            let address = address.map_err(Error::InvalidRequest)?;
58147            let page_size = page_size.map_err(Error::InvalidRequest)?;
58148            let page_token = page_token.map_err(Error::InvalidRequest)?;
58149            let url = format!(
58150                "{}/v2/data/evm/token-balances/{}/{}",
58151                client.baseurl,
58152                encode_path(&network.to_string()),
58153                encode_path(&address.to_string()),
58154            );
58155            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58156            header_map.append(
58157                ::reqwest::header::HeaderName::from_static("api-version"),
58158                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58159            );
58160            #[allow(unused_mut)]
58161            let mut request = client
58162                .client
58163                .get(url)
58164                .header(
58165                    ::reqwest::header::ACCEPT,
58166                    ::reqwest::header::HeaderValue::from_static("application/json"),
58167                )
58168                .query(&progenitor_middleware_client::QueryParam::new(
58169                    "pageSize", &page_size,
58170                ))
58171                .query(&progenitor_middleware_client::QueryParam::new(
58172                    "pageToken",
58173                    &page_token,
58174                ))
58175                .headers(header_map)
58176                .build()?;
58177            let info = OperationInfo {
58178                operation_id: "list_data_token_balances",
58179            };
58180            client.pre(&mut request, &info).await?;
58181            let result = client.exec(request, &info).await;
58182            client.post(&result, &info).await?;
58183            let response = result?;
58184            match response.status().as_u16() {
58185                200u16 => ResponseValue::from_response(response).await,
58186                400u16 => Err(Error::ErrorResponse(
58187                    ResponseValue::from_response(response).await?,
58188                )),
58189                404u16 => Err(Error::ErrorResponse(
58190                    ResponseValue::from_response(response).await?,
58191                )),
58192                500u16 => Err(Error::ErrorResponse(
58193                    ResponseValue::from_response(response).await?,
58194                )),
58195                502u16 => Err(Error::ErrorResponse(
58196                    ResponseValue::from_response(response).await?,
58197                )),
58198                503u16 => Err(Error::ErrorResponse(
58199                    ResponseValue::from_response(response).await?,
58200                )),
58201                _ => Err(Error::UnexpectedResponse(response)),
58202            }
58203        }
58204    }
58205    /**Builder for [`Client::list_tokens_for_account`]
58206
58207    [`Client::list_tokens_for_account`]: super::Client::list_tokens_for_account*/
58208    #[derive(Debug, Clone)]
58209    pub struct ListTokensForAccount<'a> {
58210        client: &'a super::Client,
58211        network: Result<types::ListTokensForAccountNetwork, String>,
58212        address: Result<types::ListTokensForAccountAddress, String>,
58213    }
58214    impl<'a> ListTokensForAccount<'a> {
58215        pub fn new(client: &'a super::Client) -> Self {
58216            Self {
58217                client: client,
58218                network: Err("network was not initialized".to_string()),
58219                address: Err("address was not initialized".to_string()),
58220            }
58221        }
58222        pub fn network<V>(mut self, value: V) -> Self
58223        where
58224            V: std::convert::TryInto<types::ListTokensForAccountNetwork>,
58225        {
58226            self.network = value.try_into().map_err(|_| {
58227                "conversion to `ListTokensForAccountNetwork` for network failed".to_string()
58228            });
58229            self
58230        }
58231        pub fn address<V>(mut self, value: V) -> Self
58232        where
58233            V: std::convert::TryInto<types::ListTokensForAccountAddress>,
58234        {
58235            self.address = value.try_into().map_err(|_| {
58236                "conversion to `ListTokensForAccountAddress` for address failed".to_string()
58237            });
58238            self
58239        }
58240        ///Sends a `GET` request to `/v2/data/evm/token-ownership/{network}/{address}`
58241        pub async fn send(
58242            self,
58243        ) -> Result<ResponseValue<types::AccountTokenAddressesResponse>, Error<types::Error>>
58244        {
58245            let Self {
58246                client,
58247                network,
58248                address,
58249            } = self;
58250            let network = network.map_err(Error::InvalidRequest)?;
58251            let address = address.map_err(Error::InvalidRequest)?;
58252            let url = format!(
58253                "{}/v2/data/evm/token-ownership/{}/{}",
58254                client.baseurl,
58255                encode_path(&network.to_string()),
58256                encode_path(&address.to_string()),
58257            );
58258            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58259            header_map.append(
58260                ::reqwest::header::HeaderName::from_static("api-version"),
58261                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58262            );
58263            #[allow(unused_mut)]
58264            let mut request = client
58265                .client
58266                .get(url)
58267                .header(
58268                    ::reqwest::header::ACCEPT,
58269                    ::reqwest::header::HeaderValue::from_static("application/json"),
58270                )
58271                .headers(header_map)
58272                .build()?;
58273            let info = OperationInfo {
58274                operation_id: "list_tokens_for_account",
58275            };
58276            client.pre(&mut request, &info).await?;
58277            let result = client.exec(request, &info).await;
58278            client.post(&result, &info).await?;
58279            let response = result?;
58280            match response.status().as_u16() {
58281                200u16 => ResponseValue::from_response(response).await,
58282                400u16 => Err(Error::ErrorResponse(
58283                    ResponseValue::from_response(response).await?,
58284                )),
58285                401u16 => Err(Error::ErrorResponse(
58286                    ResponseValue::from_response(response).await?,
58287                )),
58288                429u16 => Err(Error::ErrorResponse(
58289                    ResponseValue::from_response(response).await?,
58290                )),
58291                500u16 => Err(Error::ErrorResponse(
58292                    ResponseValue::from_response(response).await?,
58293                )),
58294                _ => Err(Error::UnexpectedResponse(response)),
58295            }
58296        }
58297    }
58298    /**Builder for [`Client::get_sql_grammar`]
58299
58300    [`Client::get_sql_grammar`]: super::Client::get_sql_grammar*/
58301    #[derive(Debug, Clone)]
58302    pub struct GetSqlGrammar<'a> {
58303        client: &'a super::Client,
58304    }
58305    impl<'a> GetSqlGrammar<'a> {
58306        pub fn new(client: &'a super::Client) -> Self {
58307            Self { client: client }
58308        }
58309        ///Sends a `GET` request to `/v2/data/query/grammar`
58310        pub async fn send(
58311            self,
58312        ) -> Result<ResponseValue<::std::string::String>, Error<types::Error>> {
58313            let Self { client } = self;
58314            let url = format!("{}/v2/data/query/grammar", client.baseurl,);
58315            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58316            header_map.append(
58317                ::reqwest::header::HeaderName::from_static("api-version"),
58318                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58319            );
58320            #[allow(unused_mut)]
58321            let mut request = client
58322                .client
58323                .get(url)
58324                .header(
58325                    ::reqwest::header::ACCEPT,
58326                    ::reqwest::header::HeaderValue::from_static("application/json"),
58327                )
58328                .headers(header_map)
58329                .build()?;
58330            let info = OperationInfo {
58331                operation_id: "get_sql_grammar",
58332            };
58333            client.pre(&mut request, &info).await?;
58334            let result = client.exec(request, &info).await;
58335            client.post(&result, &info).await?;
58336            let response = result?;
58337            match response.status().as_u16() {
58338                200u16 => ResponseValue::from_response(response).await,
58339                401u16 => Err(Error::ErrorResponse(
58340                    ResponseValue::from_response(response).await?,
58341                )),
58342                429u16 => Err(Error::ErrorResponse(
58343                    ResponseValue::from_response(response).await?,
58344                )),
58345                500u16 => Err(Error::ErrorResponse(
58346                    ResponseValue::from_response(response).await?,
58347                )),
58348                504u16 => Err(Error::ErrorResponse(
58349                    ResponseValue::from_response(response).await?,
58350                )),
58351                _ => Err(Error::UnexpectedResponse(response)),
58352            }
58353        }
58354    }
58355    /**Builder for [`Client::run_sql_query`]
58356
58357    [`Client::run_sql_query`]: super::Client::run_sql_query*/
58358    #[derive(Debug, Clone)]
58359    pub struct RunSqlQuery<'a> {
58360        client: &'a super::Client,
58361        body: Result<types::builder::OnchainDataQuery, String>,
58362    }
58363    impl<'a> RunSqlQuery<'a> {
58364        pub fn new(client: &'a super::Client) -> Self {
58365            Self {
58366                client: client,
58367                body: Ok(::std::default::Default::default()),
58368            }
58369        }
58370        pub fn body<V>(mut self, value: V) -> Self
58371        where
58372            V: std::convert::TryInto<types::OnchainDataQuery>,
58373            <V as std::convert::TryInto<types::OnchainDataQuery>>::Error: std::fmt::Display,
58374        {
58375            self.body = value
58376                .try_into()
58377                .map(From::from)
58378                .map_err(|s| format!("conversion to `OnchainDataQuery` for body failed: {}", s));
58379            self
58380        }
58381        pub fn body_map<F>(mut self, f: F) -> Self
58382        where
58383            F: std::ops::FnOnce(
58384                types::builder::OnchainDataQuery,
58385            ) -> types::builder::OnchainDataQuery,
58386        {
58387            self.body = self.body.map(f);
58388            self
58389        }
58390        ///Sends a `POST` request to `/v2/data/query/run`
58391        pub async fn send(
58392            self,
58393        ) -> Result<ResponseValue<types::OnchainDataResult>, Error<types::Error>> {
58394            let Self { client, body } = self;
58395            let body = body
58396                .and_then(|v| types::OnchainDataQuery::try_from(v).map_err(|e| e.to_string()))
58397                .map_err(Error::InvalidRequest)?;
58398            let url = format!("{}/v2/data/query/run", client.baseurl,);
58399            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58400            header_map.append(
58401                ::reqwest::header::HeaderName::from_static("api-version"),
58402                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58403            );
58404            #[allow(unused_mut)]
58405            let mut request = client
58406                .client
58407                .post(url)
58408                .header(
58409                    ::reqwest::header::ACCEPT,
58410                    ::reqwest::header::HeaderValue::from_static("application/json"),
58411                )
58412                .json(&body)
58413                .headers(header_map)
58414                .build()?;
58415            let info = OperationInfo {
58416                operation_id: "run_sql_query",
58417            };
58418            client.pre(&mut request, &info).await?;
58419            let result = client.exec(request, &info).await;
58420            client.post(&result, &info).await?;
58421            let response = result?;
58422            match response.status().as_u16() {
58423                200u16 => ResponseValue::from_response(response).await,
58424                400u16 => Err(Error::ErrorResponse(
58425                    ResponseValue::from_response(response).await?,
58426                )),
58427                401u16 => Err(Error::ErrorResponse(
58428                    ResponseValue::from_response(response).await?,
58429                )),
58430                408u16 => Err(Error::ErrorResponse(
58431                    ResponseValue::from_response(response).await?,
58432                )),
58433                429u16 => Err(Error::ErrorResponse(
58434                    ResponseValue::from_response(response).await?,
58435                )),
58436                500u16 => Err(Error::ErrorResponse(
58437                    ResponseValue::from_response(response).await?,
58438                )),
58439                504u16 => Err(Error::ErrorResponse(
58440                    ResponseValue::from_response(response).await?,
58441                )),
58442                _ => Err(Error::UnexpectedResponse(response)),
58443            }
58444        }
58445    }
58446    /**Builder for [`Client::list_webhook_subscriptions`]
58447
58448    [`Client::list_webhook_subscriptions`]: super::Client::list_webhook_subscriptions*/
58449    #[derive(Debug, Clone)]
58450    pub struct ListWebhookSubscriptions<'a> {
58451        client: &'a super::Client,
58452        page_size: Result<Option<::std::num::NonZeroU64>, String>,
58453        page_token: Result<Option<::std::string::String>, String>,
58454    }
58455    impl<'a> ListWebhookSubscriptions<'a> {
58456        pub fn new(client: &'a super::Client) -> Self {
58457            Self {
58458                client: client,
58459                page_size: Ok(None),
58460                page_token: Ok(None),
58461            }
58462        }
58463        pub fn page_size<V>(mut self, value: V) -> Self
58464        where
58465            V: std::convert::TryInto<::std::num::NonZeroU64>,
58466        {
58467            self.page_size = value.try_into().map(Some).map_err(|_| {
58468                "conversion to `:: std :: num :: NonZeroU64` for page_size failed".to_string()
58469            });
58470            self
58471        }
58472        pub fn page_token<V>(mut self, value: V) -> Self
58473        where
58474            V: std::convert::TryInto<::std::string::String>,
58475        {
58476            self.page_token = value.try_into().map(Some).map_err(|_| {
58477                "conversion to `:: std :: string :: String` for page_token failed".to_string()
58478            });
58479            self
58480        }
58481        ///Sends a `GET` request to `/v2/data/webhooks/subscriptions`
58482        pub async fn send(
58483            self,
58484        ) -> Result<ResponseValue<types::WebhookSubscriptionListResponse>, Error<types::Error>>
58485        {
58486            let Self {
58487                client,
58488                page_size,
58489                page_token,
58490            } = self;
58491            let page_size = page_size.map_err(Error::InvalidRequest)?;
58492            let page_token = page_token.map_err(Error::InvalidRequest)?;
58493            let url = format!("{}/v2/data/webhooks/subscriptions", client.baseurl,);
58494            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58495            header_map.append(
58496                ::reqwest::header::HeaderName::from_static("api-version"),
58497                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58498            );
58499            #[allow(unused_mut)]
58500            let mut request = client
58501                .client
58502                .get(url)
58503                .header(
58504                    ::reqwest::header::ACCEPT,
58505                    ::reqwest::header::HeaderValue::from_static("application/json"),
58506                )
58507                .query(&progenitor_middleware_client::QueryParam::new(
58508                    "pageSize", &page_size,
58509                ))
58510                .query(&progenitor_middleware_client::QueryParam::new(
58511                    "pageToken",
58512                    &page_token,
58513                ))
58514                .headers(header_map)
58515                .build()?;
58516            let info = OperationInfo {
58517                operation_id: "list_webhook_subscriptions",
58518            };
58519            client.pre(&mut request, &info).await?;
58520            let result = client.exec(request, &info).await;
58521            client.post(&result, &info).await?;
58522            let response = result?;
58523            match response.status().as_u16() {
58524                200u16 => ResponseValue::from_response(response).await,
58525                400u16 => Err(Error::ErrorResponse(
58526                    ResponseValue::from_response(response).await?,
58527                )),
58528                401u16 => Err(Error::ErrorResponse(
58529                    ResponseValue::from_response(response).await?,
58530                )),
58531                429u16 => Err(Error::ErrorResponse(
58532                    ResponseValue::from_response(response).await?,
58533                )),
58534                500u16 => Err(Error::ErrorResponse(
58535                    ResponseValue::from_response(response).await?,
58536                )),
58537                _ => Err(Error::UnexpectedResponse(response)),
58538            }
58539        }
58540    }
58541    /**Builder for [`Client::create_webhook_subscription`]
58542
58543    [`Client::create_webhook_subscription`]: super::Client::create_webhook_subscription*/
58544    #[derive(Debug, Clone)]
58545    pub struct CreateWebhookSubscription<'a> {
58546        client: &'a super::Client,
58547        body: Result<types::WebhookSubscriptionRequest, String>,
58548    }
58549    impl<'a> CreateWebhookSubscription<'a> {
58550        pub fn new(client: &'a super::Client) -> Self {
58551            Self {
58552                client: client,
58553                body: Err("body was not initialized".to_string()),
58554            }
58555        }
58556        pub fn body<V>(mut self, value: V) -> Self
58557        where
58558            V: std::convert::TryInto<types::WebhookSubscriptionRequest>,
58559        {
58560            self.body = value.try_into().map_err(|_| {
58561                "conversion to `WebhookSubscriptionRequest` for body failed".to_string()
58562            });
58563            self
58564        }
58565        ///Sends a `POST` request to `/v2/data/webhooks/subscriptions`
58566        pub async fn send(
58567            self,
58568        ) -> Result<ResponseValue<types::WebhookSubscriptionResponse>, Error<types::Error>>
58569        {
58570            let Self { client, body } = self;
58571            let body = body.map_err(Error::InvalidRequest)?;
58572            let url = format!("{}/v2/data/webhooks/subscriptions", client.baseurl,);
58573            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58574            header_map.append(
58575                ::reqwest::header::HeaderName::from_static("api-version"),
58576                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58577            );
58578            #[allow(unused_mut)]
58579            let mut request = client
58580                .client
58581                .post(url)
58582                .header(
58583                    ::reqwest::header::ACCEPT,
58584                    ::reqwest::header::HeaderValue::from_static("application/json"),
58585                )
58586                .json(&body)
58587                .headers(header_map)
58588                .build()?;
58589            let info = OperationInfo {
58590                operation_id: "create_webhook_subscription",
58591            };
58592            client.pre(&mut request, &info).await?;
58593            let result = client.exec(request, &info).await;
58594            client.post(&result, &info).await?;
58595            let response = result?;
58596            match response.status().as_u16() {
58597                201u16 => ResponseValue::from_response(response).await,
58598                400u16 => Err(Error::ErrorResponse(
58599                    ResponseValue::from_response(response).await?,
58600                )),
58601                401u16 => Err(Error::ErrorResponse(
58602                    ResponseValue::from_response(response).await?,
58603                )),
58604                429u16 => Err(Error::ErrorResponse(
58605                    ResponseValue::from_response(response).await?,
58606                )),
58607                500u16 => Err(Error::ErrorResponse(
58608                    ResponseValue::from_response(response).await?,
58609                )),
58610                _ => Err(Error::UnexpectedResponse(response)),
58611            }
58612        }
58613    }
58614    /**Builder for [`Client::get_webhook_subscription`]
58615
58616    [`Client::get_webhook_subscription`]: super::Client::get_webhook_subscription*/
58617    #[derive(Debug, Clone)]
58618    pub struct GetWebhookSubscription<'a> {
58619        client: &'a super::Client,
58620        subscription_id: Result<::uuid::Uuid, String>,
58621    }
58622    impl<'a> GetWebhookSubscription<'a> {
58623        pub fn new(client: &'a super::Client) -> Self {
58624            Self {
58625                client: client,
58626                subscription_id: Err("subscription_id was not initialized".to_string()),
58627            }
58628        }
58629        pub fn subscription_id<V>(mut self, value: V) -> Self
58630        where
58631            V: std::convert::TryInto<::uuid::Uuid>,
58632        {
58633            self.subscription_id = value.try_into().map_err(|_| {
58634                "conversion to `:: uuid :: Uuid` for subscription_id failed".to_string()
58635            });
58636            self
58637        }
58638        ///Sends a `GET` request to `/v2/data/webhooks/subscriptions/{subscriptionId}`
58639        pub async fn send(
58640            self,
58641        ) -> Result<ResponseValue<types::WebhookSubscriptionResponse>, Error<types::Error>>
58642        {
58643            let Self {
58644                client,
58645                subscription_id,
58646            } = self;
58647            let subscription_id = subscription_id.map_err(Error::InvalidRequest)?;
58648            let url = format!(
58649                "{}/v2/data/webhooks/subscriptions/{}",
58650                client.baseurl,
58651                encode_path(&subscription_id.to_string()),
58652            );
58653            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58654            header_map.append(
58655                ::reqwest::header::HeaderName::from_static("api-version"),
58656                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58657            );
58658            #[allow(unused_mut)]
58659            let mut request = client
58660                .client
58661                .get(url)
58662                .header(
58663                    ::reqwest::header::ACCEPT,
58664                    ::reqwest::header::HeaderValue::from_static("application/json"),
58665                )
58666                .headers(header_map)
58667                .build()?;
58668            let info = OperationInfo {
58669                operation_id: "get_webhook_subscription",
58670            };
58671            client.pre(&mut request, &info).await?;
58672            let result = client.exec(request, &info).await;
58673            client.post(&result, &info).await?;
58674            let response = result?;
58675            match response.status().as_u16() {
58676                200u16 => ResponseValue::from_response(response).await,
58677                401u16 => Err(Error::ErrorResponse(
58678                    ResponseValue::from_response(response).await?,
58679                )),
58680                404u16 => Err(Error::ErrorResponse(
58681                    ResponseValue::from_response(response).await?,
58682                )),
58683                429u16 => Err(Error::ErrorResponse(
58684                    ResponseValue::from_response(response).await?,
58685                )),
58686                500u16 => Err(Error::ErrorResponse(
58687                    ResponseValue::from_response(response).await?,
58688                )),
58689                _ => Err(Error::UnexpectedResponse(response)),
58690            }
58691        }
58692    }
58693    /**Builder for [`Client::update_webhook_subscription`]
58694
58695    [`Client::update_webhook_subscription`]: super::Client::update_webhook_subscription*/
58696    #[derive(Debug, Clone)]
58697    pub struct UpdateWebhookSubscription<'a> {
58698        client: &'a super::Client,
58699        subscription_id: Result<::uuid::Uuid, String>,
58700        body: Result<types::WebhookSubscriptionUpdateRequest, String>,
58701    }
58702    impl<'a> UpdateWebhookSubscription<'a> {
58703        pub fn new(client: &'a super::Client) -> Self {
58704            Self {
58705                client: client,
58706                subscription_id: Err("subscription_id was not initialized".to_string()),
58707                body: Err("body was not initialized".to_string()),
58708            }
58709        }
58710        pub fn subscription_id<V>(mut self, value: V) -> Self
58711        where
58712            V: std::convert::TryInto<::uuid::Uuid>,
58713        {
58714            self.subscription_id = value.try_into().map_err(|_| {
58715                "conversion to `:: uuid :: Uuid` for subscription_id failed".to_string()
58716            });
58717            self
58718        }
58719        pub fn body<V>(mut self, value: V) -> Self
58720        where
58721            V: std::convert::TryInto<types::WebhookSubscriptionUpdateRequest>,
58722        {
58723            self.body = value.try_into().map_err(|_| {
58724                "conversion to `WebhookSubscriptionUpdateRequest` for body failed".to_string()
58725            });
58726            self
58727        }
58728        ///Sends a `PUT` request to `/v2/data/webhooks/subscriptions/{subscriptionId}`
58729        pub async fn send(
58730            self,
58731        ) -> Result<ResponseValue<types::WebhookSubscriptionResponse>, Error<types::Error>>
58732        {
58733            let Self {
58734                client,
58735                subscription_id,
58736                body,
58737            } = self;
58738            let subscription_id = subscription_id.map_err(Error::InvalidRequest)?;
58739            let body = body.map_err(Error::InvalidRequest)?;
58740            let url = format!(
58741                "{}/v2/data/webhooks/subscriptions/{}",
58742                client.baseurl,
58743                encode_path(&subscription_id.to_string()),
58744            );
58745            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58746            header_map.append(
58747                ::reqwest::header::HeaderName::from_static("api-version"),
58748                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58749            );
58750            #[allow(unused_mut)]
58751            let mut request = client
58752                .client
58753                .put(url)
58754                .header(
58755                    ::reqwest::header::ACCEPT,
58756                    ::reqwest::header::HeaderValue::from_static("application/json"),
58757                )
58758                .json(&body)
58759                .headers(header_map)
58760                .build()?;
58761            let info = OperationInfo {
58762                operation_id: "update_webhook_subscription",
58763            };
58764            client.pre(&mut request, &info).await?;
58765            let result = client.exec(request, &info).await;
58766            client.post(&result, &info).await?;
58767            let response = result?;
58768            match response.status().as_u16() {
58769                200u16 => ResponseValue::from_response(response).await,
58770                400u16 => Err(Error::ErrorResponse(
58771                    ResponseValue::from_response(response).await?,
58772                )),
58773                401u16 => Err(Error::ErrorResponse(
58774                    ResponseValue::from_response(response).await?,
58775                )),
58776                404u16 => Err(Error::ErrorResponse(
58777                    ResponseValue::from_response(response).await?,
58778                )),
58779                429u16 => Err(Error::ErrorResponse(
58780                    ResponseValue::from_response(response).await?,
58781                )),
58782                500u16 => Err(Error::ErrorResponse(
58783                    ResponseValue::from_response(response).await?,
58784                )),
58785                _ => Err(Error::UnexpectedResponse(response)),
58786            }
58787        }
58788    }
58789    /**Builder for [`Client::delete_webhook_subscription`]
58790
58791    [`Client::delete_webhook_subscription`]: super::Client::delete_webhook_subscription*/
58792    #[derive(Debug, Clone)]
58793    pub struct DeleteWebhookSubscription<'a> {
58794        client: &'a super::Client,
58795        subscription_id: Result<::uuid::Uuid, String>,
58796    }
58797    impl<'a> DeleteWebhookSubscription<'a> {
58798        pub fn new(client: &'a super::Client) -> Self {
58799            Self {
58800                client: client,
58801                subscription_id: Err("subscription_id was not initialized".to_string()),
58802            }
58803        }
58804        pub fn subscription_id<V>(mut self, value: V) -> Self
58805        where
58806            V: std::convert::TryInto<::uuid::Uuid>,
58807        {
58808            self.subscription_id = value.try_into().map_err(|_| {
58809                "conversion to `:: uuid :: Uuid` for subscription_id failed".to_string()
58810            });
58811            self
58812        }
58813        ///Sends a `DELETE` request to `/v2/data/webhooks/subscriptions/{subscriptionId}`
58814        pub async fn send(self) -> Result<ResponseValue<()>, Error<types::Error>> {
58815            let Self {
58816                client,
58817                subscription_id,
58818            } = self;
58819            let subscription_id = subscription_id.map_err(Error::InvalidRequest)?;
58820            let url = format!(
58821                "{}/v2/data/webhooks/subscriptions/{}",
58822                client.baseurl,
58823                encode_path(&subscription_id.to_string()),
58824            );
58825            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58826            header_map.append(
58827                ::reqwest::header::HeaderName::from_static("api-version"),
58828                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58829            );
58830            #[allow(unused_mut)]
58831            let mut request = client
58832                .client
58833                .delete(url)
58834                .header(
58835                    ::reqwest::header::ACCEPT,
58836                    ::reqwest::header::HeaderValue::from_static("application/json"),
58837                )
58838                .headers(header_map)
58839                .build()?;
58840            let info = OperationInfo {
58841                operation_id: "delete_webhook_subscription",
58842            };
58843            client.pre(&mut request, &info).await?;
58844            let result = client.exec(request, &info).await;
58845            client.post(&result, &info).await?;
58846            let response = result?;
58847            match response.status().as_u16() {
58848                204u16 => Ok(ResponseValue::empty(response)),
58849                401u16 => Err(Error::ErrorResponse(
58850                    ResponseValue::from_response(response).await?,
58851                )),
58852                404u16 => Err(Error::ErrorResponse(
58853                    ResponseValue::from_response(response).await?,
58854                )),
58855                429u16 => Err(Error::ErrorResponse(
58856                    ResponseValue::from_response(response).await?,
58857                )),
58858                500u16 => Err(Error::ErrorResponse(
58859                    ResponseValue::from_response(response).await?,
58860                )),
58861                _ => Err(Error::UnexpectedResponse(response)),
58862            }
58863        }
58864    }
58865    /**Builder for [`Client::list_end_users`]
58866
58867    [`Client::list_end_users`]: super::Client::list_end_users*/
58868    #[derive(Debug, Clone)]
58869    pub struct ListEndUsers<'a> {
58870        client: &'a super::Client,
58871        page_size: Result<Option<::std::num::NonZeroU64>, String>,
58872        page_token: Result<Option<::std::string::String>, String>,
58873        sort: Result<Option<::std::vec::Vec<types::ListEndUsersSortItem>>, String>,
58874    }
58875    impl<'a> ListEndUsers<'a> {
58876        pub fn new(client: &'a super::Client) -> Self {
58877            Self {
58878                client: client,
58879                page_size: Ok(None),
58880                page_token: Ok(None),
58881                sort: Ok(None),
58882            }
58883        }
58884        pub fn page_size<V>(mut self, value: V) -> Self
58885        where
58886            V: std::convert::TryInto<::std::num::NonZeroU64>,
58887        {
58888            self.page_size = value.try_into().map(Some).map_err(|_| {
58889                "conversion to `:: std :: num :: NonZeroU64` for page_size failed".to_string()
58890            });
58891            self
58892        }
58893        pub fn page_token<V>(mut self, value: V) -> Self
58894        where
58895            V: std::convert::TryInto<::std::string::String>,
58896        {
58897            self.page_token = value.try_into().map(Some).map_err(|_| {
58898                "conversion to `:: std :: string :: String` for page_token failed".to_string()
58899            });
58900            self
58901        }
58902        pub fn sort<V>(mut self, value: V) -> Self
58903        where
58904            V: std::convert::TryInto<::std::vec::Vec<types::ListEndUsersSortItem>>,
58905        {
58906            self.sort = value.try_into().map(Some).map_err(|_| {
58907                "conversion to `:: std :: vec :: Vec < ListEndUsersSortItem >` for sort failed"
58908                    .to_string()
58909            });
58910            self
58911        }
58912        ///Sends a `GET` request to `/v2/end-users`
58913        pub async fn send(
58914            self,
58915        ) -> Result<ResponseValue<types::ListEndUsersResponse>, Error<types::Error>> {
58916            let Self {
58917                client,
58918                page_size,
58919                page_token,
58920                sort,
58921            } = self;
58922            let page_size = page_size.map_err(Error::InvalidRequest)?;
58923            let page_token = page_token.map_err(Error::InvalidRequest)?;
58924            let sort = sort.map_err(Error::InvalidRequest)?;
58925            let url = format!("{}/v2/end-users", client.baseurl,);
58926            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
58927            header_map.append(
58928                ::reqwest::header::HeaderName::from_static("api-version"),
58929                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
58930            );
58931            #[allow(unused_mut)]
58932            let mut request = client
58933                .client
58934                .get(url)
58935                .header(
58936                    ::reqwest::header::ACCEPT,
58937                    ::reqwest::header::HeaderValue::from_static("application/json"),
58938                )
58939                .query(&progenitor_middleware_client::QueryParam::new(
58940                    "pageSize", &page_size,
58941                ))
58942                .query(&progenitor_middleware_client::QueryParam::new(
58943                    "pageToken",
58944                    &page_token,
58945                ))
58946                .query(&progenitor_middleware_client::QueryParam::new(
58947                    "sort", &sort,
58948                ))
58949                .headers(header_map)
58950                .build()?;
58951            let info = OperationInfo {
58952                operation_id: "list_end_users",
58953            };
58954            client.pre(&mut request, &info).await?;
58955            let result = client.exec(request, &info).await;
58956            client.post(&result, &info).await?;
58957            let response = result?;
58958            match response.status().as_u16() {
58959                200u16 => ResponseValue::from_response(response).await,
58960                400u16 => Err(Error::ErrorResponse(
58961                    ResponseValue::from_response(response).await?,
58962                )),
58963                401u16 => Err(Error::ErrorResponse(
58964                    ResponseValue::from_response(response).await?,
58965                )),
58966                500u16 => Err(Error::ErrorResponse(
58967                    ResponseValue::from_response(response).await?,
58968                )),
58969                502u16 => Err(Error::ErrorResponse(
58970                    ResponseValue::from_response(response).await?,
58971                )),
58972                503u16 => Err(Error::ErrorResponse(
58973                    ResponseValue::from_response(response).await?,
58974                )),
58975                _ => Err(Error::UnexpectedResponse(response)),
58976            }
58977        }
58978    }
58979    /**Builder for [`Client::create_end_user`]
58980
58981    [`Client::create_end_user`]: super::Client::create_end_user*/
58982    #[derive(Debug, Clone)]
58983    pub struct CreateEndUser<'a> {
58984        client: &'a super::Client,
58985        x_idempotency_key: Result<Option<types::CreateEndUserXIdempotencyKey>, String>,
58986        x_wallet_auth: Result<::std::string::String, String>,
58987        body: Result<types::builder::CreateEndUserBody, String>,
58988    }
58989    impl<'a> CreateEndUser<'a> {
58990        pub fn new(client: &'a super::Client) -> Self {
58991            Self {
58992                client: client,
58993                x_idempotency_key: Ok(None),
58994                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
58995                body: Ok(::std::default::Default::default()),
58996            }
58997        }
58998        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
58999        where
59000            V: std::convert::TryInto<types::CreateEndUserXIdempotencyKey>,
59001        {
59002            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
59003                "conversion to `CreateEndUserXIdempotencyKey` for x_idempotency_key failed"
59004                    .to_string()
59005            });
59006            self
59007        }
59008        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
59009        where
59010            V: std::convert::TryInto<::std::string::String>,
59011        {
59012            self.x_wallet_auth = value.try_into().map_err(|_| {
59013                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
59014            });
59015            self
59016        }
59017        pub fn body<V>(mut self, value: V) -> Self
59018        where
59019            V: std::convert::TryInto<types::CreateEndUserBody>,
59020            <V as std::convert::TryInto<types::CreateEndUserBody>>::Error: std::fmt::Display,
59021        {
59022            self.body = value
59023                .try_into()
59024                .map(From::from)
59025                .map_err(|s| format!("conversion to `CreateEndUserBody` for body failed: {}", s));
59026            self
59027        }
59028        pub fn body_map<F>(mut self, f: F) -> Self
59029        where
59030            F: std::ops::FnOnce(
59031                types::builder::CreateEndUserBody,
59032            ) -> types::builder::CreateEndUserBody,
59033        {
59034            self.body = self.body.map(f);
59035            self
59036        }
59037        ///Sends a `POST` request to `/v2/end-users`
59038        pub async fn send(self) -> Result<ResponseValue<types::EndUser>, Error<types::Error>> {
59039            let Self {
59040                client,
59041                x_idempotency_key,
59042                x_wallet_auth,
59043                body,
59044            } = self;
59045            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
59046            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
59047            let body = body
59048                .and_then(|v| types::CreateEndUserBody::try_from(v).map_err(|e| e.to_string()))
59049                .map_err(Error::InvalidRequest)?;
59050            let url = format!("{}/v2/end-users", client.baseurl,);
59051            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
59052            header_map.append(
59053                ::reqwest::header::HeaderName::from_static("api-version"),
59054                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59055            );
59056            if let Some(value) = x_idempotency_key {
59057                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
59058            }
59059            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
59060            #[allow(unused_mut)]
59061            let mut request = client
59062                .client
59063                .post(url)
59064                .header(
59065                    ::reqwest::header::ACCEPT,
59066                    ::reqwest::header::HeaderValue::from_static("application/json"),
59067                )
59068                .json(&body)
59069                .headers(header_map)
59070                .build()?;
59071            let info = OperationInfo {
59072                operation_id: "create_end_user",
59073            };
59074            client.pre(&mut request, &info).await?;
59075            let result = client.exec(request, &info).await;
59076            client.post(&result, &info).await?;
59077            let response = result?;
59078            match response.status().as_u16() {
59079                201u16 => ResponseValue::from_response(response).await,
59080                400u16 => Err(Error::ErrorResponse(
59081                    ResponseValue::from_response(response).await?,
59082                )),
59083                401u16 => Err(Error::ErrorResponse(
59084                    ResponseValue::from_response(response).await?,
59085                )),
59086                402u16 => Err(Error::ErrorResponse(
59087                    ResponseValue::from_response(response).await?,
59088                )),
59089                422u16 => Err(Error::ErrorResponse(
59090                    ResponseValue::from_response(response).await?,
59091                )),
59092                500u16 => Err(Error::ErrorResponse(
59093                    ResponseValue::from_response(response).await?,
59094                )),
59095                _ => Err(Error::UnexpectedResponse(response)),
59096            }
59097        }
59098    }
59099    /**Builder for [`Client::validate_end_user_access_token`]
59100
59101    [`Client::validate_end_user_access_token`]: super::Client::validate_end_user_access_token*/
59102    #[derive(Debug, Clone)]
59103    pub struct ValidateEndUserAccessToken<'a> {
59104        client: &'a super::Client,
59105        body: Result<types::builder::ValidateEndUserAccessTokenBody, String>,
59106    }
59107    impl<'a> ValidateEndUserAccessToken<'a> {
59108        pub fn new(client: &'a super::Client) -> Self {
59109            Self {
59110                client: client,
59111                body: Ok(::std::default::Default::default()),
59112            }
59113        }
59114        pub fn body<V>(mut self, value: V) -> Self
59115        where
59116            V: std::convert::TryInto<types::ValidateEndUserAccessTokenBody>,
59117            <V as std::convert::TryInto<types::ValidateEndUserAccessTokenBody>>::Error:
59118                std::fmt::Display,
59119        {
59120            self.body = value.try_into().map(From::from).map_err(|s| {
59121                format!(
59122                    "conversion to `ValidateEndUserAccessTokenBody` for body failed: {}",
59123                    s
59124                )
59125            });
59126            self
59127        }
59128        pub fn body_map<F>(mut self, f: F) -> Self
59129        where
59130            F: std::ops::FnOnce(
59131                types::builder::ValidateEndUserAccessTokenBody,
59132            ) -> types::builder::ValidateEndUserAccessTokenBody,
59133        {
59134            self.body = self.body.map(f);
59135            self
59136        }
59137        ///Sends a `POST` request to `/v2/end-users/auth/validate-token`
59138        pub async fn send(self) -> Result<ResponseValue<types::EndUser>, Error<types::Error>> {
59139            let Self { client, body } = self;
59140            let body = body
59141                .and_then(|v| {
59142                    types::ValidateEndUserAccessTokenBody::try_from(v).map_err(|e| e.to_string())
59143                })
59144                .map_err(Error::InvalidRequest)?;
59145            let url = format!("{}/v2/end-users/auth/validate-token", client.baseurl,);
59146            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
59147            header_map.append(
59148                ::reqwest::header::HeaderName::from_static("api-version"),
59149                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59150            );
59151            #[allow(unused_mut)]
59152            let mut request = client
59153                .client
59154                .post(url)
59155                .header(
59156                    ::reqwest::header::ACCEPT,
59157                    ::reqwest::header::HeaderValue::from_static("application/json"),
59158                )
59159                .json(&body)
59160                .headers(header_map)
59161                .build()?;
59162            let info = OperationInfo {
59163                operation_id: "validate_end_user_access_token",
59164            };
59165            client.pre(&mut request, &info).await?;
59166            let result = client.exec(request, &info).await;
59167            client.post(&result, &info).await?;
59168            let response = result?;
59169            match response.status().as_u16() {
59170                200u16 => ResponseValue::from_response(response).await,
59171                400u16 => Err(Error::ErrorResponse(
59172                    ResponseValue::from_response(response).await?,
59173                )),
59174                401u16 => Err(Error::ErrorResponse(
59175                    ResponseValue::from_response(response).await?,
59176                )),
59177                404u16 => Err(Error::ErrorResponse(
59178                    ResponseValue::from_response(response).await?,
59179                )),
59180                500u16 => Err(Error::ErrorResponse(
59181                    ResponseValue::from_response(response).await?,
59182                )),
59183                _ => Err(Error::UnexpectedResponse(response)),
59184            }
59185        }
59186    }
59187    /**Builder for [`Client::get_end_user`]
59188
59189    [`Client::get_end_user`]: super::Client::get_end_user*/
59190    #[derive(Debug, Clone)]
59191    pub struct GetEndUser<'a> {
59192        client: &'a super::Client,
59193        user_id: Result<types::GetEndUserUserId, String>,
59194    }
59195    impl<'a> GetEndUser<'a> {
59196        pub fn new(client: &'a super::Client) -> Self {
59197            Self {
59198                client: client,
59199                user_id: Err("user_id was not initialized".to_string()),
59200            }
59201        }
59202        pub fn user_id<V>(mut self, value: V) -> Self
59203        where
59204            V: std::convert::TryInto<types::GetEndUserUserId>,
59205        {
59206            self.user_id = value
59207                .try_into()
59208                .map_err(|_| "conversion to `GetEndUserUserId` for user_id failed".to_string());
59209            self
59210        }
59211        ///Sends a `GET` request to `/v2/end-users/{userId}`
59212        pub async fn send(self) -> Result<ResponseValue<types::EndUser>, Error<types::Error>> {
59213            let Self { client, user_id } = self;
59214            let user_id = user_id.map_err(Error::InvalidRequest)?;
59215            let url = format!(
59216                "{}/v2/end-users/{}",
59217                client.baseurl,
59218                encode_path(&user_id.to_string()),
59219            );
59220            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
59221            header_map.append(
59222                ::reqwest::header::HeaderName::from_static("api-version"),
59223                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59224            );
59225            #[allow(unused_mut)]
59226            let mut request = client
59227                .client
59228                .get(url)
59229                .header(
59230                    ::reqwest::header::ACCEPT,
59231                    ::reqwest::header::HeaderValue::from_static("application/json"),
59232                )
59233                .headers(header_map)
59234                .build()?;
59235            let info = OperationInfo {
59236                operation_id: "get_end_user",
59237            };
59238            client.pre(&mut request, &info).await?;
59239            let result = client.exec(request, &info).await;
59240            client.post(&result, &info).await?;
59241            let response = result?;
59242            match response.status().as_u16() {
59243                200u16 => ResponseValue::from_response(response).await,
59244                404u16 => Err(Error::ErrorResponse(
59245                    ResponseValue::from_response(response).await?,
59246                )),
59247                500u16 => Err(Error::ErrorResponse(
59248                    ResponseValue::from_response(response).await?,
59249                )),
59250                _ => Err(Error::UnexpectedResponse(response)),
59251            }
59252        }
59253    }
59254    /**Builder for [`Client::list_evm_accounts`]
59255
59256    [`Client::list_evm_accounts`]: super::Client::list_evm_accounts*/
59257    #[derive(Debug, Clone)]
59258    pub struct ListEvmAccounts<'a> {
59259        client: &'a super::Client,
59260        page_size: Result<Option<i64>, String>,
59261        page_token: Result<Option<::std::string::String>, String>,
59262    }
59263    impl<'a> ListEvmAccounts<'a> {
59264        pub fn new(client: &'a super::Client) -> Self {
59265            Self {
59266                client: client,
59267                page_size: Ok(None),
59268                page_token: Ok(None),
59269            }
59270        }
59271        pub fn page_size<V>(mut self, value: V) -> Self
59272        where
59273            V: std::convert::TryInto<i64>,
59274        {
59275            self.page_size = value
59276                .try_into()
59277                .map(Some)
59278                .map_err(|_| "conversion to `i64` for page_size failed".to_string());
59279            self
59280        }
59281        pub fn page_token<V>(mut self, value: V) -> Self
59282        where
59283            V: std::convert::TryInto<::std::string::String>,
59284        {
59285            self.page_token = value.try_into().map(Some).map_err(|_| {
59286                "conversion to `:: std :: string :: String` for page_token failed".to_string()
59287            });
59288            self
59289        }
59290        ///Sends a `GET` request to `/v2/evm/accounts`
59291        pub async fn send(
59292            self,
59293        ) -> Result<ResponseValue<types::ListEvmAccountsResponse>, Error<types::Error>> {
59294            let Self {
59295                client,
59296                page_size,
59297                page_token,
59298            } = self;
59299            let page_size = page_size.map_err(Error::InvalidRequest)?;
59300            let page_token = page_token.map_err(Error::InvalidRequest)?;
59301            let url = format!("{}/v2/evm/accounts", client.baseurl,);
59302            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
59303            header_map.append(
59304                ::reqwest::header::HeaderName::from_static("api-version"),
59305                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59306            );
59307            #[allow(unused_mut)]
59308            let mut request = client
59309                .client
59310                .get(url)
59311                .header(
59312                    ::reqwest::header::ACCEPT,
59313                    ::reqwest::header::HeaderValue::from_static("application/json"),
59314                )
59315                .query(&progenitor_middleware_client::QueryParam::new(
59316                    "pageSize", &page_size,
59317                ))
59318                .query(&progenitor_middleware_client::QueryParam::new(
59319                    "pageToken",
59320                    &page_token,
59321                ))
59322                .headers(header_map)
59323                .build()?;
59324            let info = OperationInfo {
59325                operation_id: "list_evm_accounts",
59326            };
59327            client.pre(&mut request, &info).await?;
59328            let result = client.exec(request, &info).await;
59329            client.post(&result, &info).await?;
59330            let response = result?;
59331            match response.status().as_u16() {
59332                200u16 => ResponseValue::from_response(response).await,
59333                500u16 => Err(Error::ErrorResponse(
59334                    ResponseValue::from_response(response).await?,
59335                )),
59336                502u16 => Err(Error::ErrorResponse(
59337                    ResponseValue::from_response(response).await?,
59338                )),
59339                503u16 => Err(Error::ErrorResponse(
59340                    ResponseValue::from_response(response).await?,
59341                )),
59342                _ => Err(Error::UnexpectedResponse(response)),
59343            }
59344        }
59345    }
59346    /**Builder for [`Client::create_evm_account`]
59347
59348    [`Client::create_evm_account`]: super::Client::create_evm_account*/
59349    #[derive(Debug, Clone)]
59350    pub struct CreateEvmAccount<'a> {
59351        client: &'a super::Client,
59352        x_idempotency_key: Result<Option<types::CreateEvmAccountXIdempotencyKey>, String>,
59353        x_wallet_auth: Result<::std::string::String, String>,
59354        body: Result<types::builder::CreateEvmAccountBody, String>,
59355    }
59356    impl<'a> CreateEvmAccount<'a> {
59357        pub fn new(client: &'a super::Client) -> Self {
59358            Self {
59359                client: client,
59360                x_idempotency_key: Ok(None),
59361                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
59362                body: Ok(::std::default::Default::default()),
59363            }
59364        }
59365        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
59366        where
59367            V: std::convert::TryInto<types::CreateEvmAccountXIdempotencyKey>,
59368        {
59369            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
59370                "conversion to `CreateEvmAccountXIdempotencyKey` for x_idempotency_key failed"
59371                    .to_string()
59372            });
59373            self
59374        }
59375        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
59376        where
59377            V: std::convert::TryInto<::std::string::String>,
59378        {
59379            self.x_wallet_auth = value.try_into().map_err(|_| {
59380                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
59381            });
59382            self
59383        }
59384        pub fn body<V>(mut self, value: V) -> Self
59385        where
59386            V: std::convert::TryInto<types::CreateEvmAccountBody>,
59387            <V as std::convert::TryInto<types::CreateEvmAccountBody>>::Error: std::fmt::Display,
59388        {
59389            self.body = value.try_into().map(From::from).map_err(|s| {
59390                format!(
59391                    "conversion to `CreateEvmAccountBody` for body failed: {}",
59392                    s
59393                )
59394            });
59395            self
59396        }
59397        pub fn body_map<F>(mut self, f: F) -> Self
59398        where
59399            F: std::ops::FnOnce(
59400                types::builder::CreateEvmAccountBody,
59401            ) -> types::builder::CreateEvmAccountBody,
59402        {
59403            self.body = self.body.map(f);
59404            self
59405        }
59406        ///Sends a `POST` request to `/v2/evm/accounts`
59407        pub async fn send(self) -> Result<ResponseValue<types::EvmAccount>, Error<types::Error>> {
59408            let Self {
59409                client,
59410                x_idempotency_key,
59411                x_wallet_auth,
59412                body,
59413            } = self;
59414            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
59415            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
59416            let body = body
59417                .and_then(|v| types::CreateEvmAccountBody::try_from(v).map_err(|e| e.to_string()))
59418                .map_err(Error::InvalidRequest)?;
59419            let url = format!("{}/v2/evm/accounts", client.baseurl,);
59420            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
59421            header_map.append(
59422                ::reqwest::header::HeaderName::from_static("api-version"),
59423                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59424            );
59425            if let Some(value) = x_idempotency_key {
59426                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
59427            }
59428            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
59429            #[allow(unused_mut)]
59430            let mut request = client
59431                .client
59432                .post(url)
59433                .header(
59434                    ::reqwest::header::ACCEPT,
59435                    ::reqwest::header::HeaderValue::from_static("application/json"),
59436                )
59437                .json(&body)
59438                .headers(header_map)
59439                .build()?;
59440            let info = OperationInfo {
59441                operation_id: "create_evm_account",
59442            };
59443            client.pre(&mut request, &info).await?;
59444            let result = client.exec(request, &info).await;
59445            client.post(&result, &info).await?;
59446            let response = result?;
59447            match response.status().as_u16() {
59448                201u16 => ResponseValue::from_response(response).await,
59449                400u16 => Err(Error::ErrorResponse(
59450                    ResponseValue::from_response(response).await?,
59451                )),
59452                401u16 => Err(Error::ErrorResponse(
59453                    ResponseValue::from_response(response).await?,
59454                )),
59455                402u16 => Err(Error::ErrorResponse(
59456                    ResponseValue::from_response(response).await?,
59457                )),
59458                409u16 => Err(Error::ErrorResponse(
59459                    ResponseValue::from_response(response).await?,
59460                )),
59461                422u16 => Err(Error::ErrorResponse(
59462                    ResponseValue::from_response(response).await?,
59463                )),
59464                500u16 => Err(Error::ErrorResponse(
59465                    ResponseValue::from_response(response).await?,
59466                )),
59467                502u16 => Err(Error::ErrorResponse(
59468                    ResponseValue::from_response(response).await?,
59469                )),
59470                503u16 => Err(Error::ErrorResponse(
59471                    ResponseValue::from_response(response).await?,
59472                )),
59473                _ => Err(Error::UnexpectedResponse(response)),
59474            }
59475        }
59476    }
59477    /**Builder for [`Client::get_evm_account_by_name`]
59478
59479    [`Client::get_evm_account_by_name`]: super::Client::get_evm_account_by_name*/
59480    #[derive(Debug, Clone)]
59481    pub struct GetEvmAccountByName<'a> {
59482        client: &'a super::Client,
59483        name: Result<::std::string::String, String>,
59484    }
59485    impl<'a> GetEvmAccountByName<'a> {
59486        pub fn new(client: &'a super::Client) -> Self {
59487            Self {
59488                client: client,
59489                name: Err("name was not initialized".to_string()),
59490            }
59491        }
59492        pub fn name<V>(mut self, value: V) -> Self
59493        where
59494            V: std::convert::TryInto<::std::string::String>,
59495        {
59496            self.name = value.try_into().map_err(|_| {
59497                "conversion to `:: std :: string :: String` for name failed".to_string()
59498            });
59499            self
59500        }
59501        ///Sends a `GET` request to `/v2/evm/accounts/by-name/{name}`
59502        pub async fn send(self) -> Result<ResponseValue<types::EvmAccount>, Error<types::Error>> {
59503            let Self { client, name } = self;
59504            let name = name.map_err(Error::InvalidRequest)?;
59505            let url = format!(
59506                "{}/v2/evm/accounts/by-name/{}",
59507                client.baseurl,
59508                encode_path(&name.to_string()),
59509            );
59510            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
59511            header_map.append(
59512                ::reqwest::header::HeaderName::from_static("api-version"),
59513                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59514            );
59515            #[allow(unused_mut)]
59516            let mut request = client
59517                .client
59518                .get(url)
59519                .header(
59520                    ::reqwest::header::ACCEPT,
59521                    ::reqwest::header::HeaderValue::from_static("application/json"),
59522                )
59523                .headers(header_map)
59524                .build()?;
59525            let info = OperationInfo {
59526                operation_id: "get_evm_account_by_name",
59527            };
59528            client.pre(&mut request, &info).await?;
59529            let result = client.exec(request, &info).await;
59530            client.post(&result, &info).await?;
59531            let response = result?;
59532            match response.status().as_u16() {
59533                200u16 => ResponseValue::from_response(response).await,
59534                400u16 => Err(Error::ErrorResponse(
59535                    ResponseValue::from_response(response).await?,
59536                )),
59537                404u16 => Err(Error::ErrorResponse(
59538                    ResponseValue::from_response(response).await?,
59539                )),
59540                500u16 => Err(Error::ErrorResponse(
59541                    ResponseValue::from_response(response).await?,
59542                )),
59543                502u16 => Err(Error::ErrorResponse(
59544                    ResponseValue::from_response(response).await?,
59545                )),
59546                503u16 => Err(Error::ErrorResponse(
59547                    ResponseValue::from_response(response).await?,
59548                )),
59549                _ => Err(Error::UnexpectedResponse(response)),
59550            }
59551        }
59552    }
59553    /**Builder for [`Client::export_evm_account_by_name`]
59554
59555    [`Client::export_evm_account_by_name`]: super::Client::export_evm_account_by_name*/
59556    #[derive(Debug, Clone)]
59557    pub struct ExportEvmAccountByName<'a> {
59558        client: &'a super::Client,
59559        name: Result<::std::string::String, String>,
59560        x_idempotency_key: Result<Option<types::ExportEvmAccountByNameXIdempotencyKey>, String>,
59561        x_wallet_auth: Result<::std::string::String, String>,
59562        body: Result<types::builder::ExportEvmAccountByNameBody, String>,
59563    }
59564    impl<'a> ExportEvmAccountByName<'a> {
59565        pub fn new(client: &'a super::Client) -> Self {
59566            Self {
59567                client: client,
59568                name: Err("name was not initialized".to_string()),
59569                x_idempotency_key: Ok(None),
59570                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
59571                body: Ok(::std::default::Default::default()),
59572            }
59573        }
59574        pub fn name<V>(mut self, value: V) -> Self
59575        where
59576            V: std::convert::TryInto<::std::string::String>,
59577        {
59578            self.name = value.try_into().map_err(|_| {
59579                "conversion to `:: std :: string :: String` for name failed".to_string()
59580            });
59581            self
59582        }
59583        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
59584        where
59585            V: std::convert::TryInto<types::ExportEvmAccountByNameXIdempotencyKey>,
59586        {
59587            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
59588                "conversion to `ExportEvmAccountByNameXIdempotencyKey` for x_idempotency_key failed"
59589                    .to_string()
59590            });
59591            self
59592        }
59593        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
59594        where
59595            V: std::convert::TryInto<::std::string::String>,
59596        {
59597            self.x_wallet_auth = value.try_into().map_err(|_| {
59598                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
59599            });
59600            self
59601        }
59602        pub fn body<V>(mut self, value: V) -> Self
59603        where
59604            V: std::convert::TryInto<types::ExportEvmAccountByNameBody>,
59605            <V as std::convert::TryInto<types::ExportEvmAccountByNameBody>>::Error:
59606                std::fmt::Display,
59607        {
59608            self.body = value.try_into().map(From::from).map_err(|s| {
59609                format!(
59610                    "conversion to `ExportEvmAccountByNameBody` for body failed: {}",
59611                    s
59612                )
59613            });
59614            self
59615        }
59616        pub fn body_map<F>(mut self, f: F) -> Self
59617        where
59618            F: std::ops::FnOnce(
59619                types::builder::ExportEvmAccountByNameBody,
59620            ) -> types::builder::ExportEvmAccountByNameBody,
59621        {
59622            self.body = self.body.map(f);
59623            self
59624        }
59625        ///Sends a `POST` request to `/v2/evm/accounts/export/by-name/{name}`
59626        pub async fn send(
59627            self,
59628        ) -> Result<ResponseValue<types::ExportEvmAccountByNameResponse>, Error<types::Error>>
59629        {
59630            let Self {
59631                client,
59632                name,
59633                x_idempotency_key,
59634                x_wallet_auth,
59635                body,
59636            } = self;
59637            let name = name.map_err(Error::InvalidRequest)?;
59638            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
59639            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
59640            let body = body
59641                .and_then(|v| {
59642                    types::ExportEvmAccountByNameBody::try_from(v).map_err(|e| e.to_string())
59643                })
59644                .map_err(Error::InvalidRequest)?;
59645            let url = format!(
59646                "{}/v2/evm/accounts/export/by-name/{}",
59647                client.baseurl,
59648                encode_path(&name.to_string()),
59649            );
59650            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
59651            header_map.append(
59652                ::reqwest::header::HeaderName::from_static("api-version"),
59653                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59654            );
59655            if let Some(value) = x_idempotency_key {
59656                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
59657            }
59658            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
59659            #[allow(unused_mut)]
59660            let mut request = client
59661                .client
59662                .post(url)
59663                .header(
59664                    ::reqwest::header::ACCEPT,
59665                    ::reqwest::header::HeaderValue::from_static("application/json"),
59666                )
59667                .json(&body)
59668                .headers(header_map)
59669                .build()?;
59670            let info = OperationInfo {
59671                operation_id: "export_evm_account_by_name",
59672            };
59673            client.pre(&mut request, &info).await?;
59674            let result = client.exec(request, &info).await;
59675            client.post(&result, &info).await?;
59676            let response = result?;
59677            match response.status().as_u16() {
59678                200u16 => ResponseValue::from_response(response).await,
59679                400u16 => Err(Error::ErrorResponse(
59680                    ResponseValue::from_response(response).await?,
59681                )),
59682                401u16 => Err(Error::ErrorResponse(
59683                    ResponseValue::from_response(response).await?,
59684                )),
59685                402u16 => Err(Error::ErrorResponse(
59686                    ResponseValue::from_response(response).await?,
59687                )),
59688                404u16 => Err(Error::ErrorResponse(
59689                    ResponseValue::from_response(response).await?,
59690                )),
59691                422u16 => Err(Error::ErrorResponse(
59692                    ResponseValue::from_response(response).await?,
59693                )),
59694                500u16 => Err(Error::ErrorResponse(
59695                    ResponseValue::from_response(response).await?,
59696                )),
59697                502u16 => Err(Error::ErrorResponse(
59698                    ResponseValue::from_response(response).await?,
59699                )),
59700                503u16 => Err(Error::ErrorResponse(
59701                    ResponseValue::from_response(response).await?,
59702                )),
59703                _ => Err(Error::UnexpectedResponse(response)),
59704            }
59705        }
59706    }
59707    /**Builder for [`Client::import_evm_account`]
59708
59709    [`Client::import_evm_account`]: super::Client::import_evm_account*/
59710    #[derive(Debug, Clone)]
59711    pub struct ImportEvmAccount<'a> {
59712        client: &'a super::Client,
59713        x_idempotency_key: Result<Option<types::ImportEvmAccountXIdempotencyKey>, String>,
59714        x_wallet_auth: Result<::std::string::String, String>,
59715        body: Result<types::builder::ImportEvmAccountBody, String>,
59716    }
59717    impl<'a> ImportEvmAccount<'a> {
59718        pub fn new(client: &'a super::Client) -> Self {
59719            Self {
59720                client: client,
59721                x_idempotency_key: Ok(None),
59722                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
59723                body: Ok(::std::default::Default::default()),
59724            }
59725        }
59726        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
59727        where
59728            V: std::convert::TryInto<types::ImportEvmAccountXIdempotencyKey>,
59729        {
59730            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
59731                "conversion to `ImportEvmAccountXIdempotencyKey` for x_idempotency_key failed"
59732                    .to_string()
59733            });
59734            self
59735        }
59736        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
59737        where
59738            V: std::convert::TryInto<::std::string::String>,
59739        {
59740            self.x_wallet_auth = value.try_into().map_err(|_| {
59741                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
59742            });
59743            self
59744        }
59745        pub fn body<V>(mut self, value: V) -> Self
59746        where
59747            V: std::convert::TryInto<types::ImportEvmAccountBody>,
59748            <V as std::convert::TryInto<types::ImportEvmAccountBody>>::Error: std::fmt::Display,
59749        {
59750            self.body = value.try_into().map(From::from).map_err(|s| {
59751                format!(
59752                    "conversion to `ImportEvmAccountBody` for body failed: {}",
59753                    s
59754                )
59755            });
59756            self
59757        }
59758        pub fn body_map<F>(mut self, f: F) -> Self
59759        where
59760            F: std::ops::FnOnce(
59761                types::builder::ImportEvmAccountBody,
59762            ) -> types::builder::ImportEvmAccountBody,
59763        {
59764            self.body = self.body.map(f);
59765            self
59766        }
59767        ///Sends a `POST` request to `/v2/evm/accounts/import`
59768        pub async fn send(self) -> Result<ResponseValue<types::EvmAccount>, Error<types::Error>> {
59769            let Self {
59770                client,
59771                x_idempotency_key,
59772                x_wallet_auth,
59773                body,
59774            } = self;
59775            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
59776            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
59777            let body = body
59778                .and_then(|v| types::ImportEvmAccountBody::try_from(v).map_err(|e| e.to_string()))
59779                .map_err(Error::InvalidRequest)?;
59780            let url = format!("{}/v2/evm/accounts/import", client.baseurl,);
59781            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
59782            header_map.append(
59783                ::reqwest::header::HeaderName::from_static("api-version"),
59784                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59785            );
59786            if let Some(value) = x_idempotency_key {
59787                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
59788            }
59789            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
59790            #[allow(unused_mut)]
59791            let mut request = client
59792                .client
59793                .post(url)
59794                .header(
59795                    ::reqwest::header::ACCEPT,
59796                    ::reqwest::header::HeaderValue::from_static("application/json"),
59797                )
59798                .json(&body)
59799                .headers(header_map)
59800                .build()?;
59801            let info = OperationInfo {
59802                operation_id: "import_evm_account",
59803            };
59804            client.pre(&mut request, &info).await?;
59805            let result = client.exec(request, &info).await;
59806            client.post(&result, &info).await?;
59807            let response = result?;
59808            match response.status().as_u16() {
59809                201u16 => ResponseValue::from_response(response).await,
59810                400u16 => Err(Error::ErrorResponse(
59811                    ResponseValue::from_response(response).await?,
59812                )),
59813                401u16 => Err(Error::ErrorResponse(
59814                    ResponseValue::from_response(response).await?,
59815                )),
59816                402u16 => Err(Error::ErrorResponse(
59817                    ResponseValue::from_response(response).await?,
59818                )),
59819                409u16 => Err(Error::ErrorResponse(
59820                    ResponseValue::from_response(response).await?,
59821                )),
59822                422u16 => Err(Error::ErrorResponse(
59823                    ResponseValue::from_response(response).await?,
59824                )),
59825                500u16 => Err(Error::ErrorResponse(
59826                    ResponseValue::from_response(response).await?,
59827                )),
59828                502u16 => Err(Error::ErrorResponse(
59829                    ResponseValue::from_response(response).await?,
59830                )),
59831                503u16 => Err(Error::ErrorResponse(
59832                    ResponseValue::from_response(response).await?,
59833                )),
59834                _ => Err(Error::UnexpectedResponse(response)),
59835            }
59836        }
59837    }
59838    /**Builder for [`Client::get_evm_account`]
59839
59840    [`Client::get_evm_account`]: super::Client::get_evm_account*/
59841    #[derive(Debug, Clone)]
59842    pub struct GetEvmAccount<'a> {
59843        client: &'a super::Client,
59844        address: Result<types::GetEvmAccountAddress, String>,
59845    }
59846    impl<'a> GetEvmAccount<'a> {
59847        pub fn new(client: &'a super::Client) -> Self {
59848            Self {
59849                client: client,
59850                address: Err("address was not initialized".to_string()),
59851            }
59852        }
59853        pub fn address<V>(mut self, value: V) -> Self
59854        where
59855            V: std::convert::TryInto<types::GetEvmAccountAddress>,
59856        {
59857            self.address = value
59858                .try_into()
59859                .map_err(|_| "conversion to `GetEvmAccountAddress` for address failed".to_string());
59860            self
59861        }
59862        ///Sends a `GET` request to `/v2/evm/accounts/{address}`
59863        pub async fn send(self) -> Result<ResponseValue<types::EvmAccount>, Error<types::Error>> {
59864            let Self { client, address } = self;
59865            let address = address.map_err(Error::InvalidRequest)?;
59866            let url = format!(
59867                "{}/v2/evm/accounts/{}",
59868                client.baseurl,
59869                encode_path(&address.to_string()),
59870            );
59871            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
59872            header_map.append(
59873                ::reqwest::header::HeaderName::from_static("api-version"),
59874                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59875            );
59876            #[allow(unused_mut)]
59877            let mut request = client
59878                .client
59879                .get(url)
59880                .header(
59881                    ::reqwest::header::ACCEPT,
59882                    ::reqwest::header::HeaderValue::from_static("application/json"),
59883                )
59884                .headers(header_map)
59885                .build()?;
59886            let info = OperationInfo {
59887                operation_id: "get_evm_account",
59888            };
59889            client.pre(&mut request, &info).await?;
59890            let result = client.exec(request, &info).await;
59891            client.post(&result, &info).await?;
59892            let response = result?;
59893            match response.status().as_u16() {
59894                200u16 => ResponseValue::from_response(response).await,
59895                400u16 => Err(Error::ErrorResponse(
59896                    ResponseValue::from_response(response).await?,
59897                )),
59898                404u16 => Err(Error::ErrorResponse(
59899                    ResponseValue::from_response(response).await?,
59900                )),
59901                500u16 => Err(Error::ErrorResponse(
59902                    ResponseValue::from_response(response).await?,
59903                )),
59904                502u16 => Err(Error::ErrorResponse(
59905                    ResponseValue::from_response(response).await?,
59906                )),
59907                503u16 => Err(Error::ErrorResponse(
59908                    ResponseValue::from_response(response).await?,
59909                )),
59910                _ => Err(Error::UnexpectedResponse(response)),
59911            }
59912        }
59913    }
59914    /**Builder for [`Client::update_evm_account`]
59915
59916    [`Client::update_evm_account`]: super::Client::update_evm_account*/
59917    #[derive(Debug, Clone)]
59918    pub struct UpdateEvmAccount<'a> {
59919        client: &'a super::Client,
59920        address: Result<types::UpdateEvmAccountAddress, String>,
59921        x_idempotency_key: Result<Option<types::UpdateEvmAccountXIdempotencyKey>, String>,
59922        body: Result<types::builder::UpdateEvmAccountBody, String>,
59923    }
59924    impl<'a> UpdateEvmAccount<'a> {
59925        pub fn new(client: &'a super::Client) -> Self {
59926            Self {
59927                client: client,
59928                address: Err("address was not initialized".to_string()),
59929                x_idempotency_key: Ok(None),
59930                body: Ok(::std::default::Default::default()),
59931            }
59932        }
59933        pub fn address<V>(mut self, value: V) -> Self
59934        where
59935            V: std::convert::TryInto<types::UpdateEvmAccountAddress>,
59936        {
59937            self.address = value.try_into().map_err(|_| {
59938                "conversion to `UpdateEvmAccountAddress` for address failed".to_string()
59939            });
59940            self
59941        }
59942        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
59943        where
59944            V: std::convert::TryInto<types::UpdateEvmAccountXIdempotencyKey>,
59945        {
59946            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
59947                "conversion to `UpdateEvmAccountXIdempotencyKey` for x_idempotency_key failed"
59948                    .to_string()
59949            });
59950            self
59951        }
59952        pub fn body<V>(mut self, value: V) -> Self
59953        where
59954            V: std::convert::TryInto<types::UpdateEvmAccountBody>,
59955            <V as std::convert::TryInto<types::UpdateEvmAccountBody>>::Error: std::fmt::Display,
59956        {
59957            self.body = value.try_into().map(From::from).map_err(|s| {
59958                format!(
59959                    "conversion to `UpdateEvmAccountBody` for body failed: {}",
59960                    s
59961                )
59962            });
59963            self
59964        }
59965        pub fn body_map<F>(mut self, f: F) -> Self
59966        where
59967            F: std::ops::FnOnce(
59968                types::builder::UpdateEvmAccountBody,
59969            ) -> types::builder::UpdateEvmAccountBody,
59970        {
59971            self.body = self.body.map(f);
59972            self
59973        }
59974        ///Sends a `PUT` request to `/v2/evm/accounts/{address}`
59975        pub async fn send(self) -> Result<ResponseValue<types::EvmAccount>, Error<types::Error>> {
59976            let Self {
59977                client,
59978                address,
59979                x_idempotency_key,
59980                body,
59981            } = self;
59982            let address = address.map_err(Error::InvalidRequest)?;
59983            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
59984            let body = body
59985                .and_then(|v| types::UpdateEvmAccountBody::try_from(v).map_err(|e| e.to_string()))
59986                .map_err(Error::InvalidRequest)?;
59987            let url = format!(
59988                "{}/v2/evm/accounts/{}",
59989                client.baseurl,
59990                encode_path(&address.to_string()),
59991            );
59992            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
59993            header_map.append(
59994                ::reqwest::header::HeaderName::from_static("api-version"),
59995                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
59996            );
59997            if let Some(value) = x_idempotency_key {
59998                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
59999            }
60000            #[allow(unused_mut)]
60001            let mut request = client
60002                .client
60003                .put(url)
60004                .header(
60005                    ::reqwest::header::ACCEPT,
60006                    ::reqwest::header::HeaderValue::from_static("application/json"),
60007                )
60008                .json(&body)
60009                .headers(header_map)
60010                .build()?;
60011            let info = OperationInfo {
60012                operation_id: "update_evm_account",
60013            };
60014            client.pre(&mut request, &info).await?;
60015            let result = client.exec(request, &info).await;
60016            client.post(&result, &info).await?;
60017            let response = result?;
60018            match response.status().as_u16() {
60019                200u16 => ResponseValue::from_response(response).await,
60020                400u16 => Err(Error::ErrorResponse(
60021                    ResponseValue::from_response(response).await?,
60022                )),
60023                404u16 => Err(Error::ErrorResponse(
60024                    ResponseValue::from_response(response).await?,
60025                )),
60026                409u16 => Err(Error::ErrorResponse(
60027                    ResponseValue::from_response(response).await?,
60028                )),
60029                422u16 => Err(Error::ErrorResponse(
60030                    ResponseValue::from_response(response).await?,
60031                )),
60032                500u16 => Err(Error::ErrorResponse(
60033                    ResponseValue::from_response(response).await?,
60034                )),
60035                502u16 => Err(Error::ErrorResponse(
60036                    ResponseValue::from_response(response).await?,
60037                )),
60038                503u16 => Err(Error::ErrorResponse(
60039                    ResponseValue::from_response(response).await?,
60040                )),
60041                _ => Err(Error::UnexpectedResponse(response)),
60042            }
60043        }
60044    }
60045    /**Builder for [`Client::export_evm_account`]
60046
60047    [`Client::export_evm_account`]: super::Client::export_evm_account*/
60048    #[derive(Debug, Clone)]
60049    pub struct ExportEvmAccount<'a> {
60050        client: &'a super::Client,
60051        address: Result<types::ExportEvmAccountAddress, String>,
60052        x_idempotency_key: Result<Option<types::ExportEvmAccountXIdempotencyKey>, String>,
60053        x_wallet_auth: Result<::std::string::String, String>,
60054        body: Result<types::builder::ExportEvmAccountBody, String>,
60055    }
60056    impl<'a> ExportEvmAccount<'a> {
60057        pub fn new(client: &'a super::Client) -> Self {
60058            Self {
60059                client: client,
60060                address: Err("address was not initialized".to_string()),
60061                x_idempotency_key: Ok(None),
60062                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
60063                body: Ok(::std::default::Default::default()),
60064            }
60065        }
60066        pub fn address<V>(mut self, value: V) -> Self
60067        where
60068            V: std::convert::TryInto<types::ExportEvmAccountAddress>,
60069        {
60070            self.address = value.try_into().map_err(|_| {
60071                "conversion to `ExportEvmAccountAddress` for address failed".to_string()
60072            });
60073            self
60074        }
60075        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
60076        where
60077            V: std::convert::TryInto<types::ExportEvmAccountXIdempotencyKey>,
60078        {
60079            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
60080                "conversion to `ExportEvmAccountXIdempotencyKey` for x_idempotency_key failed"
60081                    .to_string()
60082            });
60083            self
60084        }
60085        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
60086        where
60087            V: std::convert::TryInto<::std::string::String>,
60088        {
60089            self.x_wallet_auth = value.try_into().map_err(|_| {
60090                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
60091            });
60092            self
60093        }
60094        pub fn body<V>(mut self, value: V) -> Self
60095        where
60096            V: std::convert::TryInto<types::ExportEvmAccountBody>,
60097            <V as std::convert::TryInto<types::ExportEvmAccountBody>>::Error: std::fmt::Display,
60098        {
60099            self.body = value.try_into().map(From::from).map_err(|s| {
60100                format!(
60101                    "conversion to `ExportEvmAccountBody` for body failed: {}",
60102                    s
60103                )
60104            });
60105            self
60106        }
60107        pub fn body_map<F>(mut self, f: F) -> Self
60108        where
60109            F: std::ops::FnOnce(
60110                types::builder::ExportEvmAccountBody,
60111            ) -> types::builder::ExportEvmAccountBody,
60112        {
60113            self.body = self.body.map(f);
60114            self
60115        }
60116        ///Sends a `POST` request to `/v2/evm/accounts/{address}/export`
60117        pub async fn send(
60118            self,
60119        ) -> Result<ResponseValue<types::ExportEvmAccountResponse>, Error<types::Error>> {
60120            let Self {
60121                client,
60122                address,
60123                x_idempotency_key,
60124                x_wallet_auth,
60125                body,
60126            } = self;
60127            let address = address.map_err(Error::InvalidRequest)?;
60128            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
60129            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
60130            let body = body
60131                .and_then(|v| types::ExportEvmAccountBody::try_from(v).map_err(|e| e.to_string()))
60132                .map_err(Error::InvalidRequest)?;
60133            let url = format!(
60134                "{}/v2/evm/accounts/{}/export",
60135                client.baseurl,
60136                encode_path(&address.to_string()),
60137            );
60138            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
60139            header_map.append(
60140                ::reqwest::header::HeaderName::from_static("api-version"),
60141                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
60142            );
60143            if let Some(value) = x_idempotency_key {
60144                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
60145            }
60146            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
60147            #[allow(unused_mut)]
60148            let mut request = client
60149                .client
60150                .post(url)
60151                .header(
60152                    ::reqwest::header::ACCEPT,
60153                    ::reqwest::header::HeaderValue::from_static("application/json"),
60154                )
60155                .json(&body)
60156                .headers(header_map)
60157                .build()?;
60158            let info = OperationInfo {
60159                operation_id: "export_evm_account",
60160            };
60161            client.pre(&mut request, &info).await?;
60162            let result = client.exec(request, &info).await;
60163            client.post(&result, &info).await?;
60164            let response = result?;
60165            match response.status().as_u16() {
60166                200u16 => ResponseValue::from_response(response).await,
60167                400u16 => Err(Error::ErrorResponse(
60168                    ResponseValue::from_response(response).await?,
60169                )),
60170                401u16 => Err(Error::ErrorResponse(
60171                    ResponseValue::from_response(response).await?,
60172                )),
60173                402u16 => Err(Error::ErrorResponse(
60174                    ResponseValue::from_response(response).await?,
60175                )),
60176                404u16 => Err(Error::ErrorResponse(
60177                    ResponseValue::from_response(response).await?,
60178                )),
60179                422u16 => Err(Error::ErrorResponse(
60180                    ResponseValue::from_response(response).await?,
60181                )),
60182                500u16 => Err(Error::ErrorResponse(
60183                    ResponseValue::from_response(response).await?,
60184                )),
60185                502u16 => Err(Error::ErrorResponse(
60186                    ResponseValue::from_response(response).await?,
60187                )),
60188                503u16 => Err(Error::ErrorResponse(
60189                    ResponseValue::from_response(response).await?,
60190                )),
60191                _ => Err(Error::UnexpectedResponse(response)),
60192            }
60193        }
60194    }
60195    /**Builder for [`Client::send_evm_transaction`]
60196
60197    [`Client::send_evm_transaction`]: super::Client::send_evm_transaction*/
60198    #[derive(Debug, Clone)]
60199    pub struct SendEvmTransaction<'a> {
60200        client: &'a super::Client,
60201        address: Result<types::SendEvmTransactionAddress, String>,
60202        x_idempotency_key: Result<Option<types::SendEvmTransactionXIdempotencyKey>, String>,
60203        x_wallet_auth: Result<::std::string::String, String>,
60204        body: Result<types::builder::SendEvmTransactionBody, String>,
60205    }
60206    impl<'a> SendEvmTransaction<'a> {
60207        pub fn new(client: &'a super::Client) -> Self {
60208            Self {
60209                client: client,
60210                address: Err("address was not initialized".to_string()),
60211                x_idempotency_key: Ok(None),
60212                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
60213                body: Ok(::std::default::Default::default()),
60214            }
60215        }
60216        pub fn address<V>(mut self, value: V) -> Self
60217        where
60218            V: std::convert::TryInto<types::SendEvmTransactionAddress>,
60219        {
60220            self.address = value.try_into().map_err(|_| {
60221                "conversion to `SendEvmTransactionAddress` for address failed".to_string()
60222            });
60223            self
60224        }
60225        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
60226        where
60227            V: std::convert::TryInto<types::SendEvmTransactionXIdempotencyKey>,
60228        {
60229            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
60230                "conversion to `SendEvmTransactionXIdempotencyKey` for x_idempotency_key failed"
60231                    .to_string()
60232            });
60233            self
60234        }
60235        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
60236        where
60237            V: std::convert::TryInto<::std::string::String>,
60238        {
60239            self.x_wallet_auth = value.try_into().map_err(|_| {
60240                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
60241            });
60242            self
60243        }
60244        pub fn body<V>(mut self, value: V) -> Self
60245        where
60246            V: std::convert::TryInto<types::SendEvmTransactionBody>,
60247            <V as std::convert::TryInto<types::SendEvmTransactionBody>>::Error: std::fmt::Display,
60248        {
60249            self.body = value.try_into().map(From::from).map_err(|s| {
60250                format!(
60251                    "conversion to `SendEvmTransactionBody` for body failed: {}",
60252                    s
60253                )
60254            });
60255            self
60256        }
60257        pub fn body_map<F>(mut self, f: F) -> Self
60258        where
60259            F: std::ops::FnOnce(
60260                types::builder::SendEvmTransactionBody,
60261            ) -> types::builder::SendEvmTransactionBody,
60262        {
60263            self.body = self.body.map(f);
60264            self
60265        }
60266        ///Sends a `POST` request to `/v2/evm/accounts/{address}/send/transaction`
60267        pub async fn send(
60268            self,
60269        ) -> Result<ResponseValue<types::SendEvmTransactionResponse>, Error<types::Error>> {
60270            let Self {
60271                client,
60272                address,
60273                x_idempotency_key,
60274                x_wallet_auth,
60275                body,
60276            } = self;
60277            let address = address.map_err(Error::InvalidRequest)?;
60278            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
60279            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
60280            let body = body
60281                .and_then(|v| types::SendEvmTransactionBody::try_from(v).map_err(|e| e.to_string()))
60282                .map_err(Error::InvalidRequest)?;
60283            let url = format!(
60284                "{}/v2/evm/accounts/{}/send/transaction",
60285                client.baseurl,
60286                encode_path(&address.to_string()),
60287            );
60288            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
60289            header_map.append(
60290                ::reqwest::header::HeaderName::from_static("api-version"),
60291                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
60292            );
60293            if let Some(value) = x_idempotency_key {
60294                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
60295            }
60296            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
60297            #[allow(unused_mut)]
60298            let mut request = client
60299                .client
60300                .post(url)
60301                .header(
60302                    ::reqwest::header::ACCEPT,
60303                    ::reqwest::header::HeaderValue::from_static("application/json"),
60304                )
60305                .json(&body)
60306                .headers(header_map)
60307                .build()?;
60308            let info = OperationInfo {
60309                operation_id: "send_evm_transaction",
60310            };
60311            client.pre(&mut request, &info).await?;
60312            let result = client.exec(request, &info).await;
60313            client.post(&result, &info).await?;
60314            let response = result?;
60315            match response.status().as_u16() {
60316                200u16 => ResponseValue::from_response(response).await,
60317                400u16 => Err(Error::ErrorResponse(
60318                    ResponseValue::from_response(response).await?,
60319                )),
60320                401u16 => Err(Error::ErrorResponse(
60321                    ResponseValue::from_response(response).await?,
60322                )),
60323                402u16 => Err(Error::ErrorResponse(
60324                    ResponseValue::from_response(response).await?,
60325                )),
60326                403u16 => Err(Error::ErrorResponse(
60327                    ResponseValue::from_response(response).await?,
60328                )),
60329                404u16 => Err(Error::ErrorResponse(
60330                    ResponseValue::from_response(response).await?,
60331                )),
60332                409u16 => Err(Error::ErrorResponse(
60333                    ResponseValue::from_response(response).await?,
60334                )),
60335                422u16 => Err(Error::ErrorResponse(
60336                    ResponseValue::from_response(response).await?,
60337                )),
60338                500u16 => Err(Error::ErrorResponse(
60339                    ResponseValue::from_response(response).await?,
60340                )),
60341                502u16 => Err(Error::ErrorResponse(
60342                    ResponseValue::from_response(response).await?,
60343                )),
60344                503u16 => Err(Error::ErrorResponse(
60345                    ResponseValue::from_response(response).await?,
60346                )),
60347                _ => Err(Error::UnexpectedResponse(response)),
60348            }
60349        }
60350    }
60351    /**Builder for [`Client::sign_evm_hash`]
60352
60353    [`Client::sign_evm_hash`]: super::Client::sign_evm_hash*/
60354    #[derive(Debug, Clone)]
60355    pub struct SignEvmHash<'a> {
60356        client: &'a super::Client,
60357        address: Result<types::SignEvmHashAddress, String>,
60358        x_idempotency_key: Result<Option<types::SignEvmHashXIdempotencyKey>, String>,
60359        x_wallet_auth: Result<::std::string::String, String>,
60360        body: Result<types::builder::SignEvmHashBody, String>,
60361    }
60362    impl<'a> SignEvmHash<'a> {
60363        pub fn new(client: &'a super::Client) -> Self {
60364            Self {
60365                client: client,
60366                address: Err("address was not initialized".to_string()),
60367                x_idempotency_key: Ok(None),
60368                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
60369                body: Ok(::std::default::Default::default()),
60370            }
60371        }
60372        pub fn address<V>(mut self, value: V) -> Self
60373        where
60374            V: std::convert::TryInto<types::SignEvmHashAddress>,
60375        {
60376            self.address = value
60377                .try_into()
60378                .map_err(|_| "conversion to `SignEvmHashAddress` for address failed".to_string());
60379            self
60380        }
60381        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
60382        where
60383            V: std::convert::TryInto<types::SignEvmHashXIdempotencyKey>,
60384        {
60385            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
60386                "conversion to `SignEvmHashXIdempotencyKey` for x_idempotency_key failed"
60387                    .to_string()
60388            });
60389            self
60390        }
60391        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
60392        where
60393            V: std::convert::TryInto<::std::string::String>,
60394        {
60395            self.x_wallet_auth = value.try_into().map_err(|_| {
60396                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
60397            });
60398            self
60399        }
60400        pub fn body<V>(mut self, value: V) -> Self
60401        where
60402            V: std::convert::TryInto<types::SignEvmHashBody>,
60403            <V as std::convert::TryInto<types::SignEvmHashBody>>::Error: std::fmt::Display,
60404        {
60405            self.body = value
60406                .try_into()
60407                .map(From::from)
60408                .map_err(|s| format!("conversion to `SignEvmHashBody` for body failed: {}", s));
60409            self
60410        }
60411        pub fn body_map<F>(mut self, f: F) -> Self
60412        where
60413            F: std::ops::FnOnce(types::builder::SignEvmHashBody) -> types::builder::SignEvmHashBody,
60414        {
60415            self.body = self.body.map(f);
60416            self
60417        }
60418        ///Sends a `POST` request to `/v2/evm/accounts/{address}/sign`
60419        pub async fn send(
60420            self,
60421        ) -> Result<ResponseValue<types::SignEvmHashResponse>, Error<types::Error>> {
60422            let Self {
60423                client,
60424                address,
60425                x_idempotency_key,
60426                x_wallet_auth,
60427                body,
60428            } = self;
60429            let address = address.map_err(Error::InvalidRequest)?;
60430            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
60431            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
60432            let body = body
60433                .and_then(|v| types::SignEvmHashBody::try_from(v).map_err(|e| e.to_string()))
60434                .map_err(Error::InvalidRequest)?;
60435            let url = format!(
60436                "{}/v2/evm/accounts/{}/sign",
60437                client.baseurl,
60438                encode_path(&address.to_string()),
60439            );
60440            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
60441            header_map.append(
60442                ::reqwest::header::HeaderName::from_static("api-version"),
60443                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
60444            );
60445            if let Some(value) = x_idempotency_key {
60446                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
60447            }
60448            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
60449            #[allow(unused_mut)]
60450            let mut request = client
60451                .client
60452                .post(url)
60453                .header(
60454                    ::reqwest::header::ACCEPT,
60455                    ::reqwest::header::HeaderValue::from_static("application/json"),
60456                )
60457                .json(&body)
60458                .headers(header_map)
60459                .build()?;
60460            let info = OperationInfo {
60461                operation_id: "sign_evm_hash",
60462            };
60463            client.pre(&mut request, &info).await?;
60464            let result = client.exec(request, &info).await;
60465            client.post(&result, &info).await?;
60466            let response = result?;
60467            match response.status().as_u16() {
60468                200u16 => ResponseValue::from_response(response).await,
60469                400u16 => Err(Error::ErrorResponse(
60470                    ResponseValue::from_response(response).await?,
60471                )),
60472                402u16 => Err(Error::ErrorResponse(
60473                    ResponseValue::from_response(response).await?,
60474                )),
60475                404u16 => Err(Error::ErrorResponse(
60476                    ResponseValue::from_response(response).await?,
60477                )),
60478                409u16 => Err(Error::ErrorResponse(
60479                    ResponseValue::from_response(response).await?,
60480                )),
60481                422u16 => Err(Error::ErrorResponse(
60482                    ResponseValue::from_response(response).await?,
60483                )),
60484                500u16 => Err(Error::ErrorResponse(
60485                    ResponseValue::from_response(response).await?,
60486                )),
60487                502u16 => Err(Error::ErrorResponse(
60488                    ResponseValue::from_response(response).await?,
60489                )),
60490                503u16 => Err(Error::ErrorResponse(
60491                    ResponseValue::from_response(response).await?,
60492                )),
60493                _ => Err(Error::UnexpectedResponse(response)),
60494            }
60495        }
60496    }
60497    /**Builder for [`Client::sign_evm_message`]
60498
60499    [`Client::sign_evm_message`]: super::Client::sign_evm_message*/
60500    #[derive(Debug, Clone)]
60501    pub struct SignEvmMessage<'a> {
60502        client: &'a super::Client,
60503        address: Result<types::SignEvmMessageAddress, String>,
60504        x_idempotency_key: Result<Option<types::SignEvmMessageXIdempotencyKey>, String>,
60505        x_wallet_auth: Result<::std::string::String, String>,
60506        body: Result<types::builder::SignEvmMessageBody, String>,
60507    }
60508    impl<'a> SignEvmMessage<'a> {
60509        pub fn new(client: &'a super::Client) -> Self {
60510            Self {
60511                client: client,
60512                address: Err("address was not initialized".to_string()),
60513                x_idempotency_key: Ok(None),
60514                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
60515                body: Ok(::std::default::Default::default()),
60516            }
60517        }
60518        pub fn address<V>(mut self, value: V) -> Self
60519        where
60520            V: std::convert::TryInto<types::SignEvmMessageAddress>,
60521        {
60522            self.address = value.try_into().map_err(|_| {
60523                "conversion to `SignEvmMessageAddress` for address failed".to_string()
60524            });
60525            self
60526        }
60527        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
60528        where
60529            V: std::convert::TryInto<types::SignEvmMessageXIdempotencyKey>,
60530        {
60531            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
60532                "conversion to `SignEvmMessageXIdempotencyKey` for x_idempotency_key failed"
60533                    .to_string()
60534            });
60535            self
60536        }
60537        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
60538        where
60539            V: std::convert::TryInto<::std::string::String>,
60540        {
60541            self.x_wallet_auth = value.try_into().map_err(|_| {
60542                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
60543            });
60544            self
60545        }
60546        pub fn body<V>(mut self, value: V) -> Self
60547        where
60548            V: std::convert::TryInto<types::SignEvmMessageBody>,
60549            <V as std::convert::TryInto<types::SignEvmMessageBody>>::Error: std::fmt::Display,
60550        {
60551            self.body = value
60552                .try_into()
60553                .map(From::from)
60554                .map_err(|s| format!("conversion to `SignEvmMessageBody` for body failed: {}", s));
60555            self
60556        }
60557        pub fn body_map<F>(mut self, f: F) -> Self
60558        where
60559            F: std::ops::FnOnce(
60560                types::builder::SignEvmMessageBody,
60561            ) -> types::builder::SignEvmMessageBody,
60562        {
60563            self.body = self.body.map(f);
60564            self
60565        }
60566        ///Sends a `POST` request to `/v2/evm/accounts/{address}/sign/message`
60567        pub async fn send(
60568            self,
60569        ) -> Result<ResponseValue<types::SignEvmMessageResponse>, Error<types::Error>> {
60570            let Self {
60571                client,
60572                address,
60573                x_idempotency_key,
60574                x_wallet_auth,
60575                body,
60576            } = self;
60577            let address = address.map_err(Error::InvalidRequest)?;
60578            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
60579            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
60580            let body = body
60581                .and_then(|v| types::SignEvmMessageBody::try_from(v).map_err(|e| e.to_string()))
60582                .map_err(Error::InvalidRequest)?;
60583            let url = format!(
60584                "{}/v2/evm/accounts/{}/sign/message",
60585                client.baseurl,
60586                encode_path(&address.to_string()),
60587            );
60588            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
60589            header_map.append(
60590                ::reqwest::header::HeaderName::from_static("api-version"),
60591                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
60592            );
60593            if let Some(value) = x_idempotency_key {
60594                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
60595            }
60596            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
60597            #[allow(unused_mut)]
60598            let mut request = client
60599                .client
60600                .post(url)
60601                .header(
60602                    ::reqwest::header::ACCEPT,
60603                    ::reqwest::header::HeaderValue::from_static("application/json"),
60604                )
60605                .json(&body)
60606                .headers(header_map)
60607                .build()?;
60608            let info = OperationInfo {
60609                operation_id: "sign_evm_message",
60610            };
60611            client.pre(&mut request, &info).await?;
60612            let result = client.exec(request, &info).await;
60613            client.post(&result, &info).await?;
60614            let response = result?;
60615            match response.status().as_u16() {
60616                200u16 => ResponseValue::from_response(response).await,
60617                401u16 => Err(Error::ErrorResponse(
60618                    ResponseValue::from_response(response).await?,
60619                )),
60620                402u16 => Err(Error::ErrorResponse(
60621                    ResponseValue::from_response(response).await?,
60622                )),
60623                404u16 => Err(Error::ErrorResponse(
60624                    ResponseValue::from_response(response).await?,
60625                )),
60626                409u16 => Err(Error::ErrorResponse(
60627                    ResponseValue::from_response(response).await?,
60628                )),
60629                422u16 => Err(Error::ErrorResponse(
60630                    ResponseValue::from_response(response).await?,
60631                )),
60632                500u16 => Err(Error::ErrorResponse(
60633                    ResponseValue::from_response(response).await?,
60634                )),
60635                502u16 => Err(Error::ErrorResponse(
60636                    ResponseValue::from_response(response).await?,
60637                )),
60638                503u16 => Err(Error::ErrorResponse(
60639                    ResponseValue::from_response(response).await?,
60640                )),
60641                _ => Err(Error::UnexpectedResponse(response)),
60642            }
60643        }
60644    }
60645    /**Builder for [`Client::sign_evm_transaction`]
60646
60647    [`Client::sign_evm_transaction`]: super::Client::sign_evm_transaction*/
60648    #[derive(Debug, Clone)]
60649    pub struct SignEvmTransaction<'a> {
60650        client: &'a super::Client,
60651        address: Result<types::SignEvmTransactionAddress, String>,
60652        x_idempotency_key: Result<Option<types::SignEvmTransactionXIdempotencyKey>, String>,
60653        x_wallet_auth: Result<::std::string::String, String>,
60654        body: Result<types::builder::SignEvmTransactionBody, String>,
60655    }
60656    impl<'a> SignEvmTransaction<'a> {
60657        pub fn new(client: &'a super::Client) -> Self {
60658            Self {
60659                client: client,
60660                address: Err("address was not initialized".to_string()),
60661                x_idempotency_key: Ok(None),
60662                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
60663                body: Ok(::std::default::Default::default()),
60664            }
60665        }
60666        pub fn address<V>(mut self, value: V) -> Self
60667        where
60668            V: std::convert::TryInto<types::SignEvmTransactionAddress>,
60669        {
60670            self.address = value.try_into().map_err(|_| {
60671                "conversion to `SignEvmTransactionAddress` for address failed".to_string()
60672            });
60673            self
60674        }
60675        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
60676        where
60677            V: std::convert::TryInto<types::SignEvmTransactionXIdempotencyKey>,
60678        {
60679            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
60680                "conversion to `SignEvmTransactionXIdempotencyKey` for x_idempotency_key failed"
60681                    .to_string()
60682            });
60683            self
60684        }
60685        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
60686        where
60687            V: std::convert::TryInto<::std::string::String>,
60688        {
60689            self.x_wallet_auth = value.try_into().map_err(|_| {
60690                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
60691            });
60692            self
60693        }
60694        pub fn body<V>(mut self, value: V) -> Self
60695        where
60696            V: std::convert::TryInto<types::SignEvmTransactionBody>,
60697            <V as std::convert::TryInto<types::SignEvmTransactionBody>>::Error: std::fmt::Display,
60698        {
60699            self.body = value.try_into().map(From::from).map_err(|s| {
60700                format!(
60701                    "conversion to `SignEvmTransactionBody` for body failed: {}",
60702                    s
60703                )
60704            });
60705            self
60706        }
60707        pub fn body_map<F>(mut self, f: F) -> Self
60708        where
60709            F: std::ops::FnOnce(
60710                types::builder::SignEvmTransactionBody,
60711            ) -> types::builder::SignEvmTransactionBody,
60712        {
60713            self.body = self.body.map(f);
60714            self
60715        }
60716        ///Sends a `POST` request to `/v2/evm/accounts/{address}/sign/transaction`
60717        pub async fn send(
60718            self,
60719        ) -> Result<ResponseValue<types::SignEvmTransactionResponse>, Error<types::Error>> {
60720            let Self {
60721                client,
60722                address,
60723                x_idempotency_key,
60724                x_wallet_auth,
60725                body,
60726            } = self;
60727            let address = address.map_err(Error::InvalidRequest)?;
60728            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
60729            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
60730            let body = body
60731                .and_then(|v| types::SignEvmTransactionBody::try_from(v).map_err(|e| e.to_string()))
60732                .map_err(Error::InvalidRequest)?;
60733            let url = format!(
60734                "{}/v2/evm/accounts/{}/sign/transaction",
60735                client.baseurl,
60736                encode_path(&address.to_string()),
60737            );
60738            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
60739            header_map.append(
60740                ::reqwest::header::HeaderName::from_static("api-version"),
60741                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
60742            );
60743            if let Some(value) = x_idempotency_key {
60744                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
60745            }
60746            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
60747            #[allow(unused_mut)]
60748            let mut request = client
60749                .client
60750                .post(url)
60751                .header(
60752                    ::reqwest::header::ACCEPT,
60753                    ::reqwest::header::HeaderValue::from_static("application/json"),
60754                )
60755                .json(&body)
60756                .headers(header_map)
60757                .build()?;
60758            let info = OperationInfo {
60759                operation_id: "sign_evm_transaction",
60760            };
60761            client.pre(&mut request, &info).await?;
60762            let result = client.exec(request, &info).await;
60763            client.post(&result, &info).await?;
60764            let response = result?;
60765            match response.status().as_u16() {
60766                200u16 => ResponseValue::from_response(response).await,
60767                400u16 => Err(Error::ErrorResponse(
60768                    ResponseValue::from_response(response).await?,
60769                )),
60770                401u16 => Err(Error::ErrorResponse(
60771                    ResponseValue::from_response(response).await?,
60772                )),
60773                402u16 => Err(Error::ErrorResponse(
60774                    ResponseValue::from_response(response).await?,
60775                )),
60776                403u16 => Err(Error::ErrorResponse(
60777                    ResponseValue::from_response(response).await?,
60778                )),
60779                404u16 => Err(Error::ErrorResponse(
60780                    ResponseValue::from_response(response).await?,
60781                )),
60782                409u16 => Err(Error::ErrorResponse(
60783                    ResponseValue::from_response(response).await?,
60784                )),
60785                422u16 => Err(Error::ErrorResponse(
60786                    ResponseValue::from_response(response).await?,
60787                )),
60788                500u16 => Err(Error::ErrorResponse(
60789                    ResponseValue::from_response(response).await?,
60790                )),
60791                502u16 => Err(Error::ErrorResponse(
60792                    ResponseValue::from_response(response).await?,
60793                )),
60794                503u16 => Err(Error::ErrorResponse(
60795                    ResponseValue::from_response(response).await?,
60796                )),
60797                _ => Err(Error::UnexpectedResponse(response)),
60798            }
60799        }
60800    }
60801    /**Builder for [`Client::sign_evm_typed_data`]
60802
60803    [`Client::sign_evm_typed_data`]: super::Client::sign_evm_typed_data*/
60804    #[derive(Debug, Clone)]
60805    pub struct SignEvmTypedData<'a> {
60806        client: &'a super::Client,
60807        address: Result<types::SignEvmTypedDataAddress, String>,
60808        x_idempotency_key: Result<Option<types::SignEvmTypedDataXIdempotencyKey>, String>,
60809        x_wallet_auth: Result<::std::string::String, String>,
60810        body: Result<types::builder::Eip712Message, String>,
60811    }
60812    impl<'a> SignEvmTypedData<'a> {
60813        pub fn new(client: &'a super::Client) -> Self {
60814            Self {
60815                client: client,
60816                address: Err("address was not initialized".to_string()),
60817                x_idempotency_key: Ok(None),
60818                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
60819                body: Ok(::std::default::Default::default()),
60820            }
60821        }
60822        pub fn address<V>(mut self, value: V) -> Self
60823        where
60824            V: std::convert::TryInto<types::SignEvmTypedDataAddress>,
60825        {
60826            self.address = value.try_into().map_err(|_| {
60827                "conversion to `SignEvmTypedDataAddress` for address failed".to_string()
60828            });
60829            self
60830        }
60831        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
60832        where
60833            V: std::convert::TryInto<types::SignEvmTypedDataXIdempotencyKey>,
60834        {
60835            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
60836                "conversion to `SignEvmTypedDataXIdempotencyKey` for x_idempotency_key failed"
60837                    .to_string()
60838            });
60839            self
60840        }
60841        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
60842        where
60843            V: std::convert::TryInto<::std::string::String>,
60844        {
60845            self.x_wallet_auth = value.try_into().map_err(|_| {
60846                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
60847            });
60848            self
60849        }
60850        pub fn body<V>(mut self, value: V) -> Self
60851        where
60852            V: std::convert::TryInto<types::Eip712Message>,
60853            <V as std::convert::TryInto<types::Eip712Message>>::Error: std::fmt::Display,
60854        {
60855            self.body = value
60856                .try_into()
60857                .map(From::from)
60858                .map_err(|s| format!("conversion to `Eip712Message` for body failed: {}", s));
60859            self
60860        }
60861        pub fn body_map<F>(mut self, f: F) -> Self
60862        where
60863            F: std::ops::FnOnce(types::builder::Eip712Message) -> types::builder::Eip712Message,
60864        {
60865            self.body = self.body.map(f);
60866            self
60867        }
60868        ///Sends a `POST` request to `/v2/evm/accounts/{address}/sign/typed-data`
60869        pub async fn send(
60870            self,
60871        ) -> Result<ResponseValue<types::SignEvmTypedDataResponse>, Error<types::Error>> {
60872            let Self {
60873                client,
60874                address,
60875                x_idempotency_key,
60876                x_wallet_auth,
60877                body,
60878            } = self;
60879            let address = address.map_err(Error::InvalidRequest)?;
60880            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
60881            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
60882            let body = body
60883                .and_then(|v| types::Eip712Message::try_from(v).map_err(|e| e.to_string()))
60884                .map_err(Error::InvalidRequest)?;
60885            let url = format!(
60886                "{}/v2/evm/accounts/{}/sign/typed-data",
60887                client.baseurl,
60888                encode_path(&address.to_string()),
60889            );
60890            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
60891            header_map.append(
60892                ::reqwest::header::HeaderName::from_static("api-version"),
60893                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
60894            );
60895            if let Some(value) = x_idempotency_key {
60896                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
60897            }
60898            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
60899            #[allow(unused_mut)]
60900            let mut request = client
60901                .client
60902                .post(url)
60903                .header(
60904                    ::reqwest::header::ACCEPT,
60905                    ::reqwest::header::HeaderValue::from_static("application/json"),
60906                )
60907                .json(&body)
60908                .headers(header_map)
60909                .build()?;
60910            let info = OperationInfo {
60911                operation_id: "sign_evm_typed_data",
60912            };
60913            client.pre(&mut request, &info).await?;
60914            let result = client.exec(request, &info).await;
60915            client.post(&result, &info).await?;
60916            let response = result?;
60917            match response.status().as_u16() {
60918                200u16 => ResponseValue::from_response(response).await,
60919                400u16 => Err(Error::ErrorResponse(
60920                    ResponseValue::from_response(response).await?,
60921                )),
60922                401u16 => Err(Error::ErrorResponse(
60923                    ResponseValue::from_response(response).await?,
60924                )),
60925                402u16 => Err(Error::ErrorResponse(
60926                    ResponseValue::from_response(response).await?,
60927                )),
60928                404u16 => Err(Error::ErrorResponse(
60929                    ResponseValue::from_response(response).await?,
60930                )),
60931                422u16 => Err(Error::ErrorResponse(
60932                    ResponseValue::from_response(response).await?,
60933                )),
60934                500u16 => Err(Error::ErrorResponse(
60935                    ResponseValue::from_response(response).await?,
60936                )),
60937                502u16 => Err(Error::ErrorResponse(
60938                    ResponseValue::from_response(response).await?,
60939                )),
60940                503u16 => Err(Error::ErrorResponse(
60941                    ResponseValue::from_response(response).await?,
60942                )),
60943                _ => Err(Error::UnexpectedResponse(response)),
60944            }
60945        }
60946    }
60947    /**Builder for [`Client::request_evm_faucet`]
60948
60949    [`Client::request_evm_faucet`]: super::Client::request_evm_faucet*/
60950    #[derive(Debug, Clone)]
60951    pub struct RequestEvmFaucet<'a> {
60952        client: &'a super::Client,
60953        body: Result<types::builder::RequestEvmFaucetBody, String>,
60954    }
60955    impl<'a> RequestEvmFaucet<'a> {
60956        pub fn new(client: &'a super::Client) -> Self {
60957            Self {
60958                client: client,
60959                body: Ok(::std::default::Default::default()),
60960            }
60961        }
60962        pub fn body<V>(mut self, value: V) -> Self
60963        where
60964            V: std::convert::TryInto<types::RequestEvmFaucetBody>,
60965            <V as std::convert::TryInto<types::RequestEvmFaucetBody>>::Error: std::fmt::Display,
60966        {
60967            self.body = value.try_into().map(From::from).map_err(|s| {
60968                format!(
60969                    "conversion to `RequestEvmFaucetBody` for body failed: {}",
60970                    s
60971                )
60972            });
60973            self
60974        }
60975        pub fn body_map<F>(mut self, f: F) -> Self
60976        where
60977            F: std::ops::FnOnce(
60978                types::builder::RequestEvmFaucetBody,
60979            ) -> types::builder::RequestEvmFaucetBody,
60980        {
60981            self.body = self.body.map(f);
60982            self
60983        }
60984        ///Sends a `POST` request to `/v2/evm/faucet`
60985        pub async fn send(
60986            self,
60987        ) -> Result<ResponseValue<types::RequestEvmFaucetResponse>, Error<types::Error>> {
60988            let Self { client, body } = self;
60989            let body = body
60990                .and_then(|v| types::RequestEvmFaucetBody::try_from(v).map_err(|e| e.to_string()))
60991                .map_err(Error::InvalidRequest)?;
60992            let url = format!("{}/v2/evm/faucet", client.baseurl,);
60993            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
60994            header_map.append(
60995                ::reqwest::header::HeaderName::from_static("api-version"),
60996                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
60997            );
60998            #[allow(unused_mut)]
60999            let mut request = client
61000                .client
61001                .post(url)
61002                .header(
61003                    ::reqwest::header::ACCEPT,
61004                    ::reqwest::header::HeaderValue::from_static("application/json"),
61005                )
61006                .json(&body)
61007                .headers(header_map)
61008                .build()?;
61009            let info = OperationInfo {
61010                operation_id: "request_evm_faucet",
61011            };
61012            client.pre(&mut request, &info).await?;
61013            let result = client.exec(request, &info).await;
61014            client.post(&result, &info).await?;
61015            let response = result?;
61016            match response.status().as_u16() {
61017                200u16 => ResponseValue::from_response(response).await,
61018                400u16 => Err(Error::ErrorResponse(
61019                    ResponseValue::from_response(response).await?,
61020                )),
61021                403u16 => Err(Error::ErrorResponse(
61022                    ResponseValue::from_response(response).await?,
61023                )),
61024                429u16 => Err(Error::ErrorResponse(
61025                    ResponseValue::from_response(response).await?,
61026                )),
61027                500u16 => Err(Error::ErrorResponse(
61028                    ResponseValue::from_response(response).await?,
61029                )),
61030                502u16 => Err(Error::ErrorResponse(
61031                    ResponseValue::from_response(response).await?,
61032                )),
61033                503u16 => Err(Error::ErrorResponse(
61034                    ResponseValue::from_response(response).await?,
61035                )),
61036                _ => Err(Error::UnexpectedResponse(response)),
61037            }
61038        }
61039    }
61040    /**Builder for [`Client::list_evm_smart_accounts`]
61041
61042    [`Client::list_evm_smart_accounts`]: super::Client::list_evm_smart_accounts*/
61043    #[derive(Debug, Clone)]
61044    pub struct ListEvmSmartAccounts<'a> {
61045        client: &'a super::Client,
61046        page_size: Result<Option<i64>, String>,
61047        page_token: Result<Option<::std::string::String>, String>,
61048    }
61049    impl<'a> ListEvmSmartAccounts<'a> {
61050        pub fn new(client: &'a super::Client) -> Self {
61051            Self {
61052                client: client,
61053                page_size: Ok(None),
61054                page_token: Ok(None),
61055            }
61056        }
61057        pub fn page_size<V>(mut self, value: V) -> Self
61058        where
61059            V: std::convert::TryInto<i64>,
61060        {
61061            self.page_size = value
61062                .try_into()
61063                .map(Some)
61064                .map_err(|_| "conversion to `i64` for page_size failed".to_string());
61065            self
61066        }
61067        pub fn page_token<V>(mut self, value: V) -> Self
61068        where
61069            V: std::convert::TryInto<::std::string::String>,
61070        {
61071            self.page_token = value.try_into().map(Some).map_err(|_| {
61072                "conversion to `:: std :: string :: String` for page_token failed".to_string()
61073            });
61074            self
61075        }
61076        ///Sends a `GET` request to `/v2/evm/smart-accounts`
61077        pub async fn send(
61078            self,
61079        ) -> Result<ResponseValue<types::ListEvmSmartAccountsResponse>, Error<types::Error>>
61080        {
61081            let Self {
61082                client,
61083                page_size,
61084                page_token,
61085            } = self;
61086            let page_size = page_size.map_err(Error::InvalidRequest)?;
61087            let page_token = page_token.map_err(Error::InvalidRequest)?;
61088            let url = format!("{}/v2/evm/smart-accounts", client.baseurl,);
61089            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
61090            header_map.append(
61091                ::reqwest::header::HeaderName::from_static("api-version"),
61092                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
61093            );
61094            #[allow(unused_mut)]
61095            let mut request = client
61096                .client
61097                .get(url)
61098                .header(
61099                    ::reqwest::header::ACCEPT,
61100                    ::reqwest::header::HeaderValue::from_static("application/json"),
61101                )
61102                .query(&progenitor_middleware_client::QueryParam::new(
61103                    "pageSize", &page_size,
61104                ))
61105                .query(&progenitor_middleware_client::QueryParam::new(
61106                    "pageToken",
61107                    &page_token,
61108                ))
61109                .headers(header_map)
61110                .build()?;
61111            let info = OperationInfo {
61112                operation_id: "list_evm_smart_accounts",
61113            };
61114            client.pre(&mut request, &info).await?;
61115            let result = client.exec(request, &info).await;
61116            client.post(&result, &info).await?;
61117            let response = result?;
61118            match response.status().as_u16() {
61119                200u16 => ResponseValue::from_response(response).await,
61120                400u16 => Err(Error::ErrorResponse(
61121                    ResponseValue::from_response(response).await?,
61122                )),
61123                500u16 => Err(Error::ErrorResponse(
61124                    ResponseValue::from_response(response).await?,
61125                )),
61126                502u16 => Err(Error::ErrorResponse(
61127                    ResponseValue::from_response(response).await?,
61128                )),
61129                503u16 => Err(Error::ErrorResponse(
61130                    ResponseValue::from_response(response).await?,
61131                )),
61132                _ => Err(Error::UnexpectedResponse(response)),
61133            }
61134        }
61135    }
61136    /**Builder for [`Client::create_evm_smart_account`]
61137
61138    [`Client::create_evm_smart_account`]: super::Client::create_evm_smart_account*/
61139    #[derive(Debug, Clone)]
61140    pub struct CreateEvmSmartAccount<'a> {
61141        client: &'a super::Client,
61142        x_idempotency_key: Result<Option<types::CreateEvmSmartAccountXIdempotencyKey>, String>,
61143        body: Result<types::builder::CreateEvmSmartAccountBody, String>,
61144    }
61145    impl<'a> CreateEvmSmartAccount<'a> {
61146        pub fn new(client: &'a super::Client) -> Self {
61147            Self {
61148                client: client,
61149                x_idempotency_key: Ok(None),
61150                body: Ok(::std::default::Default::default()),
61151            }
61152        }
61153        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
61154        where
61155            V: std::convert::TryInto<types::CreateEvmSmartAccountXIdempotencyKey>,
61156        {
61157            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
61158                "conversion to `CreateEvmSmartAccountXIdempotencyKey` for x_idempotency_key failed"
61159                    .to_string()
61160            });
61161            self
61162        }
61163        pub fn body<V>(mut self, value: V) -> Self
61164        where
61165            V: std::convert::TryInto<types::CreateEvmSmartAccountBody>,
61166            <V as std::convert::TryInto<types::CreateEvmSmartAccountBody>>::Error:
61167                std::fmt::Display,
61168        {
61169            self.body = value.try_into().map(From::from).map_err(|s| {
61170                format!(
61171                    "conversion to `CreateEvmSmartAccountBody` for body failed: {}",
61172                    s
61173                )
61174            });
61175            self
61176        }
61177        pub fn body_map<F>(mut self, f: F) -> Self
61178        where
61179            F: std::ops::FnOnce(
61180                types::builder::CreateEvmSmartAccountBody,
61181            ) -> types::builder::CreateEvmSmartAccountBody,
61182        {
61183            self.body = self.body.map(f);
61184            self
61185        }
61186        ///Sends a `POST` request to `/v2/evm/smart-accounts`
61187        pub async fn send(
61188            self,
61189        ) -> Result<ResponseValue<types::EvmSmartAccount>, Error<types::Error>> {
61190            let Self {
61191                client,
61192                x_idempotency_key,
61193                body,
61194            } = self;
61195            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
61196            let body = body
61197                .and_then(|v| {
61198                    types::CreateEvmSmartAccountBody::try_from(v).map_err(|e| e.to_string())
61199                })
61200                .map_err(Error::InvalidRequest)?;
61201            let url = format!("{}/v2/evm/smart-accounts", client.baseurl,);
61202            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
61203            header_map.append(
61204                ::reqwest::header::HeaderName::from_static("api-version"),
61205                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
61206            );
61207            if let Some(value) = x_idempotency_key {
61208                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
61209            }
61210            #[allow(unused_mut)]
61211            let mut request = client
61212                .client
61213                .post(url)
61214                .header(
61215                    ::reqwest::header::ACCEPT,
61216                    ::reqwest::header::HeaderValue::from_static("application/json"),
61217                )
61218                .json(&body)
61219                .headers(header_map)
61220                .build()?;
61221            let info = OperationInfo {
61222                operation_id: "create_evm_smart_account",
61223            };
61224            client.pre(&mut request, &info).await?;
61225            let result = client.exec(request, &info).await;
61226            client.post(&result, &info).await?;
61227            let response = result?;
61228            match response.status().as_u16() {
61229                201u16 => ResponseValue::from_response(response).await,
61230                400u16 => Err(Error::ErrorResponse(
61231                    ResponseValue::from_response(response).await?,
61232                )),
61233                402u16 => Err(Error::ErrorResponse(
61234                    ResponseValue::from_response(response).await?,
61235                )),
61236                500u16 => Err(Error::ErrorResponse(
61237                    ResponseValue::from_response(response).await?,
61238                )),
61239                502u16 => Err(Error::ErrorResponse(
61240                    ResponseValue::from_response(response).await?,
61241                )),
61242                503u16 => Err(Error::ErrorResponse(
61243                    ResponseValue::from_response(response).await?,
61244                )),
61245                _ => Err(Error::UnexpectedResponse(response)),
61246            }
61247        }
61248    }
61249    /**Builder for [`Client::get_evm_smart_account_by_name`]
61250
61251    [`Client::get_evm_smart_account_by_name`]: super::Client::get_evm_smart_account_by_name*/
61252    #[derive(Debug, Clone)]
61253    pub struct GetEvmSmartAccountByName<'a> {
61254        client: &'a super::Client,
61255        name: Result<::std::string::String, String>,
61256    }
61257    impl<'a> GetEvmSmartAccountByName<'a> {
61258        pub fn new(client: &'a super::Client) -> Self {
61259            Self {
61260                client: client,
61261                name: Err("name was not initialized".to_string()),
61262            }
61263        }
61264        pub fn name<V>(mut self, value: V) -> Self
61265        where
61266            V: std::convert::TryInto<::std::string::String>,
61267        {
61268            self.name = value.try_into().map_err(|_| {
61269                "conversion to `:: std :: string :: String` for name failed".to_string()
61270            });
61271            self
61272        }
61273        ///Sends a `GET` request to `/v2/evm/smart-accounts/by-name/{name}`
61274        pub async fn send(
61275            self,
61276        ) -> Result<ResponseValue<types::EvmSmartAccount>, Error<types::Error>> {
61277            let Self { client, name } = self;
61278            let name = name.map_err(Error::InvalidRequest)?;
61279            let url = format!(
61280                "{}/v2/evm/smart-accounts/by-name/{}",
61281                client.baseurl,
61282                encode_path(&name.to_string()),
61283            );
61284            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
61285            header_map.append(
61286                ::reqwest::header::HeaderName::from_static("api-version"),
61287                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
61288            );
61289            #[allow(unused_mut)]
61290            let mut request = client
61291                .client
61292                .get(url)
61293                .header(
61294                    ::reqwest::header::ACCEPT,
61295                    ::reqwest::header::HeaderValue::from_static("application/json"),
61296                )
61297                .headers(header_map)
61298                .build()?;
61299            let info = OperationInfo {
61300                operation_id: "get_evm_smart_account_by_name",
61301            };
61302            client.pre(&mut request, &info).await?;
61303            let result = client.exec(request, &info).await;
61304            client.post(&result, &info).await?;
61305            let response = result?;
61306            match response.status().as_u16() {
61307                200u16 => ResponseValue::from_response(response).await,
61308                400u16 => Err(Error::ErrorResponse(
61309                    ResponseValue::from_response(response).await?,
61310                )),
61311                404u16 => Err(Error::ErrorResponse(
61312                    ResponseValue::from_response(response).await?,
61313                )),
61314                500u16 => Err(Error::ErrorResponse(
61315                    ResponseValue::from_response(response).await?,
61316                )),
61317                502u16 => Err(Error::ErrorResponse(
61318                    ResponseValue::from_response(response).await?,
61319                )),
61320                503u16 => Err(Error::ErrorResponse(
61321                    ResponseValue::from_response(response).await?,
61322                )),
61323                _ => Err(Error::UnexpectedResponse(response)),
61324            }
61325        }
61326    }
61327    /**Builder for [`Client::get_evm_smart_account`]
61328
61329    [`Client::get_evm_smart_account`]: super::Client::get_evm_smart_account*/
61330    #[derive(Debug, Clone)]
61331    pub struct GetEvmSmartAccount<'a> {
61332        client: &'a super::Client,
61333        address: Result<types::GetEvmSmartAccountAddress, String>,
61334    }
61335    impl<'a> GetEvmSmartAccount<'a> {
61336        pub fn new(client: &'a super::Client) -> Self {
61337            Self {
61338                client: client,
61339                address: Err("address was not initialized".to_string()),
61340            }
61341        }
61342        pub fn address<V>(mut self, value: V) -> Self
61343        where
61344            V: std::convert::TryInto<types::GetEvmSmartAccountAddress>,
61345        {
61346            self.address = value.try_into().map_err(|_| {
61347                "conversion to `GetEvmSmartAccountAddress` for address failed".to_string()
61348            });
61349            self
61350        }
61351        ///Sends a `GET` request to `/v2/evm/smart-accounts/{address}`
61352        pub async fn send(
61353            self,
61354        ) -> Result<ResponseValue<types::EvmSmartAccount>, Error<types::Error>> {
61355            let Self { client, address } = self;
61356            let address = address.map_err(Error::InvalidRequest)?;
61357            let url = format!(
61358                "{}/v2/evm/smart-accounts/{}",
61359                client.baseurl,
61360                encode_path(&address.to_string()),
61361            );
61362            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
61363            header_map.append(
61364                ::reqwest::header::HeaderName::from_static("api-version"),
61365                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
61366            );
61367            #[allow(unused_mut)]
61368            let mut request = client
61369                .client
61370                .get(url)
61371                .header(
61372                    ::reqwest::header::ACCEPT,
61373                    ::reqwest::header::HeaderValue::from_static("application/json"),
61374                )
61375                .headers(header_map)
61376                .build()?;
61377            let info = OperationInfo {
61378                operation_id: "get_evm_smart_account",
61379            };
61380            client.pre(&mut request, &info).await?;
61381            let result = client.exec(request, &info).await;
61382            client.post(&result, &info).await?;
61383            let response = result?;
61384            match response.status().as_u16() {
61385                200u16 => ResponseValue::from_response(response).await,
61386                400u16 => Err(Error::ErrorResponse(
61387                    ResponseValue::from_response(response).await?,
61388                )),
61389                404u16 => Err(Error::ErrorResponse(
61390                    ResponseValue::from_response(response).await?,
61391                )),
61392                500u16 => Err(Error::ErrorResponse(
61393                    ResponseValue::from_response(response).await?,
61394                )),
61395                502u16 => Err(Error::ErrorResponse(
61396                    ResponseValue::from_response(response).await?,
61397                )),
61398                503u16 => Err(Error::ErrorResponse(
61399                    ResponseValue::from_response(response).await?,
61400                )),
61401                _ => Err(Error::UnexpectedResponse(response)),
61402            }
61403        }
61404    }
61405    /**Builder for [`Client::update_evm_smart_account`]
61406
61407    [`Client::update_evm_smart_account`]: super::Client::update_evm_smart_account*/
61408    #[derive(Debug, Clone)]
61409    pub struct UpdateEvmSmartAccount<'a> {
61410        client: &'a super::Client,
61411        address: Result<types::UpdateEvmSmartAccountAddress, String>,
61412        body: Result<types::builder::UpdateEvmSmartAccountBody, String>,
61413    }
61414    impl<'a> UpdateEvmSmartAccount<'a> {
61415        pub fn new(client: &'a super::Client) -> Self {
61416            Self {
61417                client: client,
61418                address: Err("address was not initialized".to_string()),
61419                body: Ok(::std::default::Default::default()),
61420            }
61421        }
61422        pub fn address<V>(mut self, value: V) -> Self
61423        where
61424            V: std::convert::TryInto<types::UpdateEvmSmartAccountAddress>,
61425        {
61426            self.address = value.try_into().map_err(|_| {
61427                "conversion to `UpdateEvmSmartAccountAddress` for address failed".to_string()
61428            });
61429            self
61430        }
61431        pub fn body<V>(mut self, value: V) -> Self
61432        where
61433            V: std::convert::TryInto<types::UpdateEvmSmartAccountBody>,
61434            <V as std::convert::TryInto<types::UpdateEvmSmartAccountBody>>::Error:
61435                std::fmt::Display,
61436        {
61437            self.body = value.try_into().map(From::from).map_err(|s| {
61438                format!(
61439                    "conversion to `UpdateEvmSmartAccountBody` for body failed: {}",
61440                    s
61441                )
61442            });
61443            self
61444        }
61445        pub fn body_map<F>(mut self, f: F) -> Self
61446        where
61447            F: std::ops::FnOnce(
61448                types::builder::UpdateEvmSmartAccountBody,
61449            ) -> types::builder::UpdateEvmSmartAccountBody,
61450        {
61451            self.body = self.body.map(f);
61452            self
61453        }
61454        ///Sends a `PUT` request to `/v2/evm/smart-accounts/{address}`
61455        pub async fn send(
61456            self,
61457        ) -> Result<ResponseValue<types::EvmSmartAccount>, Error<types::Error>> {
61458            let Self {
61459                client,
61460                address,
61461                body,
61462            } = self;
61463            let address = address.map_err(Error::InvalidRequest)?;
61464            let body = body
61465                .and_then(|v| {
61466                    types::UpdateEvmSmartAccountBody::try_from(v).map_err(|e| e.to_string())
61467                })
61468                .map_err(Error::InvalidRequest)?;
61469            let url = format!(
61470                "{}/v2/evm/smart-accounts/{}",
61471                client.baseurl,
61472                encode_path(&address.to_string()),
61473            );
61474            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
61475            header_map.append(
61476                ::reqwest::header::HeaderName::from_static("api-version"),
61477                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
61478            );
61479            #[allow(unused_mut)]
61480            let mut request = client
61481                .client
61482                .put(url)
61483                .header(
61484                    ::reqwest::header::ACCEPT,
61485                    ::reqwest::header::HeaderValue::from_static("application/json"),
61486                )
61487                .json(&body)
61488                .headers(header_map)
61489                .build()?;
61490            let info = OperationInfo {
61491                operation_id: "update_evm_smart_account",
61492            };
61493            client.pre(&mut request, &info).await?;
61494            let result = client.exec(request, &info).await;
61495            client.post(&result, &info).await?;
61496            let response = result?;
61497            match response.status().as_u16() {
61498                200u16 => ResponseValue::from_response(response).await,
61499                400u16 => Err(Error::ErrorResponse(
61500                    ResponseValue::from_response(response).await?,
61501                )),
61502                404u16 => Err(Error::ErrorResponse(
61503                    ResponseValue::from_response(response).await?,
61504                )),
61505                409u16 => Err(Error::ErrorResponse(
61506                    ResponseValue::from_response(response).await?,
61507                )),
61508                422u16 => Err(Error::ErrorResponse(
61509                    ResponseValue::from_response(response).await?,
61510                )),
61511                500u16 => Err(Error::ErrorResponse(
61512                    ResponseValue::from_response(response).await?,
61513                )),
61514                502u16 => Err(Error::ErrorResponse(
61515                    ResponseValue::from_response(response).await?,
61516                )),
61517                503u16 => Err(Error::ErrorResponse(
61518                    ResponseValue::from_response(response).await?,
61519                )),
61520                _ => Err(Error::UnexpectedResponse(response)),
61521            }
61522        }
61523    }
61524    /**Builder for [`Client::create_spend_permission`]
61525
61526    [`Client::create_spend_permission`]: super::Client::create_spend_permission*/
61527    #[derive(Debug, Clone)]
61528    pub struct CreateSpendPermission<'a> {
61529        client: &'a super::Client,
61530        address: Result<types::CreateSpendPermissionAddress, String>,
61531        x_idempotency_key: Result<Option<types::CreateSpendPermissionXIdempotencyKey>, String>,
61532        x_wallet_auth: Result<::std::string::String, String>,
61533        body: Result<types::builder::CreateSpendPermissionRequest, String>,
61534    }
61535    impl<'a> CreateSpendPermission<'a> {
61536        pub fn new(client: &'a super::Client) -> Self {
61537            Self {
61538                client: client,
61539                address: Err("address was not initialized".to_string()),
61540                x_idempotency_key: Ok(None),
61541                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
61542                body: Ok(::std::default::Default::default()),
61543            }
61544        }
61545        pub fn address<V>(mut self, value: V) -> Self
61546        where
61547            V: std::convert::TryInto<types::CreateSpendPermissionAddress>,
61548        {
61549            self.address = value.try_into().map_err(|_| {
61550                "conversion to `CreateSpendPermissionAddress` for address failed".to_string()
61551            });
61552            self
61553        }
61554        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
61555        where
61556            V: std::convert::TryInto<types::CreateSpendPermissionXIdempotencyKey>,
61557        {
61558            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
61559                "conversion to `CreateSpendPermissionXIdempotencyKey` for x_idempotency_key failed"
61560                    .to_string()
61561            });
61562            self
61563        }
61564        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
61565        where
61566            V: std::convert::TryInto<::std::string::String>,
61567        {
61568            self.x_wallet_auth = value.try_into().map_err(|_| {
61569                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
61570            });
61571            self
61572        }
61573        pub fn body<V>(mut self, value: V) -> Self
61574        where
61575            V: std::convert::TryInto<types::CreateSpendPermissionRequest>,
61576            <V as std::convert::TryInto<types::CreateSpendPermissionRequest>>::Error:
61577                std::fmt::Display,
61578        {
61579            self.body = value.try_into().map(From::from).map_err(|s| {
61580                format!(
61581                    "conversion to `CreateSpendPermissionRequest` for body failed: {}",
61582                    s
61583                )
61584            });
61585            self
61586        }
61587        pub fn body_map<F>(mut self, f: F) -> Self
61588        where
61589            F: std::ops::FnOnce(
61590                types::builder::CreateSpendPermissionRequest,
61591            ) -> types::builder::CreateSpendPermissionRequest,
61592        {
61593            self.body = self.body.map(f);
61594            self
61595        }
61596        ///Sends a `POST` request to `/v2/evm/smart-accounts/{address}/spend-permissions`
61597        pub async fn send(
61598            self,
61599        ) -> Result<ResponseValue<types::EvmUserOperation>, Error<types::Error>> {
61600            let Self {
61601                client,
61602                address,
61603                x_idempotency_key,
61604                x_wallet_auth,
61605                body,
61606            } = self;
61607            let address = address.map_err(Error::InvalidRequest)?;
61608            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
61609            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
61610            let body = body
61611                .and_then(|v| {
61612                    types::CreateSpendPermissionRequest::try_from(v).map_err(|e| e.to_string())
61613                })
61614                .map_err(Error::InvalidRequest)?;
61615            let url = format!(
61616                "{}/v2/evm/smart-accounts/{}/spend-permissions",
61617                client.baseurl,
61618                encode_path(&address.to_string()),
61619            );
61620            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
61621            header_map.append(
61622                ::reqwest::header::HeaderName::from_static("api-version"),
61623                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
61624            );
61625            if let Some(value) = x_idempotency_key {
61626                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
61627            }
61628            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
61629            #[allow(unused_mut)]
61630            let mut request = client
61631                .client
61632                .post(url)
61633                .header(
61634                    ::reqwest::header::ACCEPT,
61635                    ::reqwest::header::HeaderValue::from_static("application/json"),
61636                )
61637                .json(&body)
61638                .headers(header_map)
61639                .build()?;
61640            let info = OperationInfo {
61641                operation_id: "create_spend_permission",
61642            };
61643            client.pre(&mut request, &info).await?;
61644            let result = client.exec(request, &info).await;
61645            client.post(&result, &info).await?;
61646            let response = result?;
61647            match response.status().as_u16() {
61648                200u16 => ResponseValue::from_response(response).await,
61649                400u16 => Err(Error::ErrorResponse(
61650                    ResponseValue::from_response(response).await?,
61651                )),
61652                404u16 => Err(Error::ErrorResponse(
61653                    ResponseValue::from_response(response).await?,
61654                )),
61655                500u16 => Err(Error::ErrorResponse(
61656                    ResponseValue::from_response(response).await?,
61657                )),
61658                502u16 => Err(Error::ErrorResponse(
61659                    ResponseValue::from_response(response).await?,
61660                )),
61661                503u16 => Err(Error::ErrorResponse(
61662                    ResponseValue::from_response(response).await?,
61663                )),
61664                _ => Err(Error::UnexpectedResponse(response)),
61665            }
61666        }
61667    }
61668    /**Builder for [`Client::list_spend_permissions`]
61669
61670    [`Client::list_spend_permissions`]: super::Client::list_spend_permissions*/
61671    #[derive(Debug, Clone)]
61672    pub struct ListSpendPermissions<'a> {
61673        client: &'a super::Client,
61674        address: Result<types::ListSpendPermissionsAddress, String>,
61675        page_size: Result<Option<i64>, String>,
61676        page_token: Result<Option<::std::string::String>, String>,
61677    }
61678    impl<'a> ListSpendPermissions<'a> {
61679        pub fn new(client: &'a super::Client) -> Self {
61680            Self {
61681                client: client,
61682                address: Err("address was not initialized".to_string()),
61683                page_size: Ok(None),
61684                page_token: Ok(None),
61685            }
61686        }
61687        pub fn address<V>(mut self, value: V) -> Self
61688        where
61689            V: std::convert::TryInto<types::ListSpendPermissionsAddress>,
61690        {
61691            self.address = value.try_into().map_err(|_| {
61692                "conversion to `ListSpendPermissionsAddress` for address failed".to_string()
61693            });
61694            self
61695        }
61696        pub fn page_size<V>(mut self, value: V) -> Self
61697        where
61698            V: std::convert::TryInto<i64>,
61699        {
61700            self.page_size = value
61701                .try_into()
61702                .map(Some)
61703                .map_err(|_| "conversion to `i64` for page_size failed".to_string());
61704            self
61705        }
61706        pub fn page_token<V>(mut self, value: V) -> Self
61707        where
61708            V: std::convert::TryInto<::std::string::String>,
61709        {
61710            self.page_token = value.try_into().map(Some).map_err(|_| {
61711                "conversion to `:: std :: string :: String` for page_token failed".to_string()
61712            });
61713            self
61714        }
61715        ///Sends a `GET` request to `/v2/evm/smart-accounts/{address}/spend-permissions/list`
61716        pub async fn send(
61717            self,
61718        ) -> Result<ResponseValue<types::ListSpendPermissionsResponse>, Error<types::Error>>
61719        {
61720            let Self {
61721                client,
61722                address,
61723                page_size,
61724                page_token,
61725            } = self;
61726            let address = address.map_err(Error::InvalidRequest)?;
61727            let page_size = page_size.map_err(Error::InvalidRequest)?;
61728            let page_token = page_token.map_err(Error::InvalidRequest)?;
61729            let url = format!(
61730                "{}/v2/evm/smart-accounts/{}/spend-permissions/list",
61731                client.baseurl,
61732                encode_path(&address.to_string()),
61733            );
61734            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
61735            header_map.append(
61736                ::reqwest::header::HeaderName::from_static("api-version"),
61737                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
61738            );
61739            #[allow(unused_mut)]
61740            let mut request = client
61741                .client
61742                .get(url)
61743                .header(
61744                    ::reqwest::header::ACCEPT,
61745                    ::reqwest::header::HeaderValue::from_static("application/json"),
61746                )
61747                .query(&progenitor_middleware_client::QueryParam::new(
61748                    "pageSize", &page_size,
61749                ))
61750                .query(&progenitor_middleware_client::QueryParam::new(
61751                    "pageToken",
61752                    &page_token,
61753                ))
61754                .headers(header_map)
61755                .build()?;
61756            let info = OperationInfo {
61757                operation_id: "list_spend_permissions",
61758            };
61759            client.pre(&mut request, &info).await?;
61760            let result = client.exec(request, &info).await;
61761            client.post(&result, &info).await?;
61762            let response = result?;
61763            match response.status().as_u16() {
61764                200u16 => ResponseValue::from_response(response).await,
61765                400u16 => Err(Error::ErrorResponse(
61766                    ResponseValue::from_response(response).await?,
61767                )),
61768                404u16 => Err(Error::ErrorResponse(
61769                    ResponseValue::from_response(response).await?,
61770                )),
61771                500u16 => Err(Error::ErrorResponse(
61772                    ResponseValue::from_response(response).await?,
61773                )),
61774                502u16 => Err(Error::ErrorResponse(
61775                    ResponseValue::from_response(response).await?,
61776                )),
61777                503u16 => Err(Error::ErrorResponse(
61778                    ResponseValue::from_response(response).await?,
61779                )),
61780                _ => Err(Error::UnexpectedResponse(response)),
61781            }
61782        }
61783    }
61784    /**Builder for [`Client::revoke_spend_permission`]
61785
61786    [`Client::revoke_spend_permission`]: super::Client::revoke_spend_permission*/
61787    #[derive(Debug, Clone)]
61788    pub struct RevokeSpendPermission<'a> {
61789        client: &'a super::Client,
61790        address: Result<types::RevokeSpendPermissionAddress, String>,
61791        x_idempotency_key: Result<Option<types::RevokeSpendPermissionXIdempotencyKey>, String>,
61792        x_wallet_auth: Result<::std::string::String, String>,
61793        body: Result<types::builder::RevokeSpendPermissionRequest, String>,
61794    }
61795    impl<'a> RevokeSpendPermission<'a> {
61796        pub fn new(client: &'a super::Client) -> Self {
61797            Self {
61798                client: client,
61799                address: Err("address was not initialized".to_string()),
61800                x_idempotency_key: Ok(None),
61801                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
61802                body: Ok(::std::default::Default::default()),
61803            }
61804        }
61805        pub fn address<V>(mut self, value: V) -> Self
61806        where
61807            V: std::convert::TryInto<types::RevokeSpendPermissionAddress>,
61808        {
61809            self.address = value.try_into().map_err(|_| {
61810                "conversion to `RevokeSpendPermissionAddress` for address failed".to_string()
61811            });
61812            self
61813        }
61814        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
61815        where
61816            V: std::convert::TryInto<types::RevokeSpendPermissionXIdempotencyKey>,
61817        {
61818            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
61819                "conversion to `RevokeSpendPermissionXIdempotencyKey` for x_idempotency_key failed"
61820                    .to_string()
61821            });
61822            self
61823        }
61824        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
61825        where
61826            V: std::convert::TryInto<::std::string::String>,
61827        {
61828            self.x_wallet_auth = value.try_into().map_err(|_| {
61829                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
61830            });
61831            self
61832        }
61833        pub fn body<V>(mut self, value: V) -> Self
61834        where
61835            V: std::convert::TryInto<types::RevokeSpendPermissionRequest>,
61836            <V as std::convert::TryInto<types::RevokeSpendPermissionRequest>>::Error:
61837                std::fmt::Display,
61838        {
61839            self.body = value.try_into().map(From::from).map_err(|s| {
61840                format!(
61841                    "conversion to `RevokeSpendPermissionRequest` for body failed: {}",
61842                    s
61843                )
61844            });
61845            self
61846        }
61847        pub fn body_map<F>(mut self, f: F) -> Self
61848        where
61849            F: std::ops::FnOnce(
61850                types::builder::RevokeSpendPermissionRequest,
61851            ) -> types::builder::RevokeSpendPermissionRequest,
61852        {
61853            self.body = self.body.map(f);
61854            self
61855        }
61856        ///Sends a `POST` request to `/v2/evm/smart-accounts/{address}/spend-permissions/revoke`
61857        pub async fn send(
61858            self,
61859        ) -> Result<ResponseValue<types::EvmUserOperation>, Error<types::Error>> {
61860            let Self {
61861                client,
61862                address,
61863                x_idempotency_key,
61864                x_wallet_auth,
61865                body,
61866            } = self;
61867            let address = address.map_err(Error::InvalidRequest)?;
61868            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
61869            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
61870            let body = body
61871                .and_then(|v| {
61872                    types::RevokeSpendPermissionRequest::try_from(v).map_err(|e| e.to_string())
61873                })
61874                .map_err(Error::InvalidRequest)?;
61875            let url = format!(
61876                "{}/v2/evm/smart-accounts/{}/spend-permissions/revoke",
61877                client.baseurl,
61878                encode_path(&address.to_string()),
61879            );
61880            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
61881            header_map.append(
61882                ::reqwest::header::HeaderName::from_static("api-version"),
61883                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
61884            );
61885            if let Some(value) = x_idempotency_key {
61886                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
61887            }
61888            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
61889            #[allow(unused_mut)]
61890            let mut request = client
61891                .client
61892                .post(url)
61893                .header(
61894                    ::reqwest::header::ACCEPT,
61895                    ::reqwest::header::HeaderValue::from_static("application/json"),
61896                )
61897                .json(&body)
61898                .headers(header_map)
61899                .build()?;
61900            let info = OperationInfo {
61901                operation_id: "revoke_spend_permission",
61902            };
61903            client.pre(&mut request, &info).await?;
61904            let result = client.exec(request, &info).await;
61905            client.post(&result, &info).await?;
61906            let response = result?;
61907            match response.status().as_u16() {
61908                200u16 => ResponseValue::from_response(response).await,
61909                400u16 => Err(Error::ErrorResponse(
61910                    ResponseValue::from_response(response).await?,
61911                )),
61912                404u16 => Err(Error::ErrorResponse(
61913                    ResponseValue::from_response(response).await?,
61914                )),
61915                500u16 => Err(Error::ErrorResponse(
61916                    ResponseValue::from_response(response).await?,
61917                )),
61918                502u16 => Err(Error::ErrorResponse(
61919                    ResponseValue::from_response(response).await?,
61920                )),
61921                503u16 => Err(Error::ErrorResponse(
61922                    ResponseValue::from_response(response).await?,
61923                )),
61924                _ => Err(Error::UnexpectedResponse(response)),
61925            }
61926        }
61927    }
61928    /**Builder for [`Client::prepare_user_operation`]
61929
61930    [`Client::prepare_user_operation`]: super::Client::prepare_user_operation*/
61931    #[derive(Debug, Clone)]
61932    pub struct PrepareUserOperation<'a> {
61933        client: &'a super::Client,
61934        address: Result<types::PrepareUserOperationAddress, String>,
61935        body: Result<types::builder::PrepareUserOperationBody, String>,
61936    }
61937    impl<'a> PrepareUserOperation<'a> {
61938        pub fn new(client: &'a super::Client) -> Self {
61939            Self {
61940                client: client,
61941                address: Err("address was not initialized".to_string()),
61942                body: Ok(::std::default::Default::default()),
61943            }
61944        }
61945        pub fn address<V>(mut self, value: V) -> Self
61946        where
61947            V: std::convert::TryInto<types::PrepareUserOperationAddress>,
61948        {
61949            self.address = value.try_into().map_err(|_| {
61950                "conversion to `PrepareUserOperationAddress` for address failed".to_string()
61951            });
61952            self
61953        }
61954        pub fn body<V>(mut self, value: V) -> Self
61955        where
61956            V: std::convert::TryInto<types::PrepareUserOperationBody>,
61957            <V as std::convert::TryInto<types::PrepareUserOperationBody>>::Error: std::fmt::Display,
61958        {
61959            self.body = value.try_into().map(From::from).map_err(|s| {
61960                format!(
61961                    "conversion to `PrepareUserOperationBody` for body failed: {}",
61962                    s
61963                )
61964            });
61965            self
61966        }
61967        pub fn body_map<F>(mut self, f: F) -> Self
61968        where
61969            F: std::ops::FnOnce(
61970                types::builder::PrepareUserOperationBody,
61971            ) -> types::builder::PrepareUserOperationBody,
61972        {
61973            self.body = self.body.map(f);
61974            self
61975        }
61976        ///Sends a `POST` request to `/v2/evm/smart-accounts/{address}/user-operations`
61977        pub async fn send(
61978            self,
61979        ) -> Result<ResponseValue<types::EvmUserOperation>, Error<types::Error>> {
61980            let Self {
61981                client,
61982                address,
61983                body,
61984            } = self;
61985            let address = address.map_err(Error::InvalidRequest)?;
61986            let body = body
61987                .and_then(|v| {
61988                    types::PrepareUserOperationBody::try_from(v).map_err(|e| e.to_string())
61989                })
61990                .map_err(Error::InvalidRequest)?;
61991            let url = format!(
61992                "{}/v2/evm/smart-accounts/{}/user-operations",
61993                client.baseurl,
61994                encode_path(&address.to_string()),
61995            );
61996            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
61997            header_map.append(
61998                ::reqwest::header::HeaderName::from_static("api-version"),
61999                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62000            );
62001            #[allow(unused_mut)]
62002            let mut request = client
62003                .client
62004                .post(url)
62005                .header(
62006                    ::reqwest::header::ACCEPT,
62007                    ::reqwest::header::HeaderValue::from_static("application/json"),
62008                )
62009                .json(&body)
62010                .headers(header_map)
62011                .build()?;
62012            let info = OperationInfo {
62013                operation_id: "prepare_user_operation",
62014            };
62015            client.pre(&mut request, &info).await?;
62016            let result = client.exec(request, &info).await;
62017            client.post(&result, &info).await?;
62018            let response = result?;
62019            match response.status().as_u16() {
62020                201u16 => ResponseValue::from_response(response).await,
62021                400u16 => Err(Error::ErrorResponse(
62022                    ResponseValue::from_response(response).await?,
62023                )),
62024                403u16 => Err(Error::ErrorResponse(
62025                    ResponseValue::from_response(response).await?,
62026                )),
62027                404u16 => Err(Error::ErrorResponse(
62028                    ResponseValue::from_response(response).await?,
62029                )),
62030                500u16 => Err(Error::ErrorResponse(
62031                    ResponseValue::from_response(response).await?,
62032                )),
62033                502u16 => Err(Error::ErrorResponse(
62034                    ResponseValue::from_response(response).await?,
62035                )),
62036                503u16 => Err(Error::ErrorResponse(
62037                    ResponseValue::from_response(response).await?,
62038                )),
62039                _ => Err(Error::UnexpectedResponse(response)),
62040            }
62041        }
62042    }
62043    /**Builder for [`Client::prepare_and_send_user_operation`]
62044
62045    [`Client::prepare_and_send_user_operation`]: super::Client::prepare_and_send_user_operation*/
62046    #[derive(Debug, Clone)]
62047    pub struct PrepareAndSendUserOperation<'a> {
62048        client: &'a super::Client,
62049        address: Result<types::PrepareAndSendUserOperationAddress, String>,
62050        x_idempotency_key:
62051            Result<Option<types::PrepareAndSendUserOperationXIdempotencyKey>, String>,
62052        x_wallet_auth: Result<::std::string::String, String>,
62053        body: Result<types::builder::PrepareAndSendUserOperationBody, String>,
62054    }
62055    impl<'a> PrepareAndSendUserOperation<'a> {
62056        pub fn new(client: &'a super::Client) -> Self {
62057            Self {
62058                client: client,
62059                address: Err("address was not initialized".to_string()),
62060                x_idempotency_key: Ok(None),
62061                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
62062                body: Ok(::std::default::Default::default()),
62063            }
62064        }
62065        pub fn address<V>(mut self, value: V) -> Self
62066        where
62067            V: std::convert::TryInto<types::PrepareAndSendUserOperationAddress>,
62068        {
62069            self.address = value.try_into().map_err(|_| {
62070                "conversion to `PrepareAndSendUserOperationAddress` for address failed".to_string()
62071            });
62072            self
62073        }
62074        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
62075        where
62076            V: std::convert::TryInto<types::PrepareAndSendUserOperationXIdempotencyKey>,
62077        {
62078            self.x_idempotency_key = value
62079                .try_into()
62080                .map(Some)
62081                .map_err(|_| {
62082                    "conversion to `PrepareAndSendUserOperationXIdempotencyKey` for x_idempotency_key failed"
62083                        .to_string()
62084                });
62085            self
62086        }
62087        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
62088        where
62089            V: std::convert::TryInto<::std::string::String>,
62090        {
62091            self.x_wallet_auth = value.try_into().map_err(|_| {
62092                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
62093            });
62094            self
62095        }
62096        pub fn body<V>(mut self, value: V) -> Self
62097        where
62098            V: std::convert::TryInto<types::PrepareAndSendUserOperationBody>,
62099            <V as std::convert::TryInto<types::PrepareAndSendUserOperationBody>>::Error:
62100                std::fmt::Display,
62101        {
62102            self.body = value.try_into().map(From::from).map_err(|s| {
62103                format!(
62104                    "conversion to `PrepareAndSendUserOperationBody` for body failed: {}",
62105                    s
62106                )
62107            });
62108            self
62109        }
62110        pub fn body_map<F>(mut self, f: F) -> Self
62111        where
62112            F: std::ops::FnOnce(
62113                types::builder::PrepareAndSendUserOperationBody,
62114            ) -> types::builder::PrepareAndSendUserOperationBody,
62115        {
62116            self.body = self.body.map(f);
62117            self
62118        }
62119        ///Sends a `POST` request to `/v2/evm/smart-accounts/{address}/user-operations/prepare-and-send`
62120        pub async fn send(
62121            self,
62122        ) -> Result<ResponseValue<types::EvmUserOperation>, Error<types::Error>> {
62123            let Self {
62124                client,
62125                address,
62126                x_idempotency_key,
62127                x_wallet_auth,
62128                body,
62129            } = self;
62130            let address = address.map_err(Error::InvalidRequest)?;
62131            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
62132            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
62133            let body = body
62134                .and_then(|v| {
62135                    types::PrepareAndSendUserOperationBody::try_from(v).map_err(|e| e.to_string())
62136                })
62137                .map_err(Error::InvalidRequest)?;
62138            let url = format!(
62139                "{}/v2/evm/smart-accounts/{}/user-operations/prepare-and-send",
62140                client.baseurl,
62141                encode_path(&address.to_string()),
62142            );
62143            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
62144            header_map.append(
62145                ::reqwest::header::HeaderName::from_static("api-version"),
62146                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62147            );
62148            if let Some(value) = x_idempotency_key {
62149                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
62150            }
62151            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
62152            #[allow(unused_mut)]
62153            let mut request = client
62154                .client
62155                .post(url)
62156                .header(
62157                    ::reqwest::header::ACCEPT,
62158                    ::reqwest::header::HeaderValue::from_static("application/json"),
62159                )
62160                .json(&body)
62161                .headers(header_map)
62162                .build()?;
62163            let info = OperationInfo {
62164                operation_id: "prepare_and_send_user_operation",
62165            };
62166            client.pre(&mut request, &info).await?;
62167            let result = client.exec(request, &info).await;
62168            client.post(&result, &info).await?;
62169            let response = result?;
62170            match response.status().as_u16() {
62171                200u16 => ResponseValue::from_response(response).await,
62172                400u16 => Err(Error::ErrorResponse(
62173                    ResponseValue::from_response(response).await?,
62174                )),
62175                401u16 => Err(Error::ErrorResponse(
62176                    ResponseValue::from_response(response).await?,
62177                )),
62178                402u16 => Err(Error::ErrorResponse(
62179                    ResponseValue::from_response(response).await?,
62180                )),
62181                403u16 => Err(Error::ErrorResponse(
62182                    ResponseValue::from_response(response).await?,
62183                )),
62184                404u16 => Err(Error::ErrorResponse(
62185                    ResponseValue::from_response(response).await?,
62186                )),
62187                429u16 => Err(Error::ErrorResponse(
62188                    ResponseValue::from_response(response).await?,
62189                )),
62190                500u16 => Err(Error::ErrorResponse(
62191                    ResponseValue::from_response(response).await?,
62192                )),
62193                502u16 => Err(Error::ErrorResponse(
62194                    ResponseValue::from_response(response).await?,
62195                )),
62196                503u16 => Err(Error::ErrorResponse(
62197                    ResponseValue::from_response(response).await?,
62198                )),
62199                _ => Err(Error::UnexpectedResponse(response)),
62200            }
62201        }
62202    }
62203    /**Builder for [`Client::get_user_operation`]
62204
62205    [`Client::get_user_operation`]: super::Client::get_user_operation*/
62206    #[derive(Debug, Clone)]
62207    pub struct GetUserOperation<'a> {
62208        client: &'a super::Client,
62209        address: Result<types::GetUserOperationAddress, String>,
62210        user_op_hash: Result<types::GetUserOperationUserOpHash, String>,
62211    }
62212    impl<'a> GetUserOperation<'a> {
62213        pub fn new(client: &'a super::Client) -> Self {
62214            Self {
62215                client: client,
62216                address: Err("address was not initialized".to_string()),
62217                user_op_hash: Err("user_op_hash was not initialized".to_string()),
62218            }
62219        }
62220        pub fn address<V>(mut self, value: V) -> Self
62221        where
62222            V: std::convert::TryInto<types::GetUserOperationAddress>,
62223        {
62224            self.address = value.try_into().map_err(|_| {
62225                "conversion to `GetUserOperationAddress` for address failed".to_string()
62226            });
62227            self
62228        }
62229        pub fn user_op_hash<V>(mut self, value: V) -> Self
62230        where
62231            V: std::convert::TryInto<types::GetUserOperationUserOpHash>,
62232        {
62233            self.user_op_hash = value.try_into().map_err(|_| {
62234                "conversion to `GetUserOperationUserOpHash` for user_op_hash failed".to_string()
62235            });
62236            self
62237        }
62238        ///Sends a `GET` request to `/v2/evm/smart-accounts/{address}/user-operations/{userOpHash}`
62239        pub async fn send(
62240            self,
62241        ) -> Result<ResponseValue<types::EvmUserOperation>, Error<types::Error>> {
62242            let Self {
62243                client,
62244                address,
62245                user_op_hash,
62246            } = self;
62247            let address = address.map_err(Error::InvalidRequest)?;
62248            let user_op_hash = user_op_hash.map_err(Error::InvalidRequest)?;
62249            let url = format!(
62250                "{}/v2/evm/smart-accounts/{}/user-operations/{}",
62251                client.baseurl,
62252                encode_path(&address.to_string()),
62253                encode_path(&user_op_hash.to_string()),
62254            );
62255            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
62256            header_map.append(
62257                ::reqwest::header::HeaderName::from_static("api-version"),
62258                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62259            );
62260            #[allow(unused_mut)]
62261            let mut request = client
62262                .client
62263                .get(url)
62264                .header(
62265                    ::reqwest::header::ACCEPT,
62266                    ::reqwest::header::HeaderValue::from_static("application/json"),
62267                )
62268                .headers(header_map)
62269                .build()?;
62270            let info = OperationInfo {
62271                operation_id: "get_user_operation",
62272            };
62273            client.pre(&mut request, &info).await?;
62274            let result = client.exec(request, &info).await;
62275            client.post(&result, &info).await?;
62276            let response = result?;
62277            match response.status().as_u16() {
62278                200u16 => ResponseValue::from_response(response).await,
62279                400u16 => Err(Error::ErrorResponse(
62280                    ResponseValue::from_response(response).await?,
62281                )),
62282                404u16 => Err(Error::ErrorResponse(
62283                    ResponseValue::from_response(response).await?,
62284                )),
62285                500u16 => Err(Error::ErrorResponse(
62286                    ResponseValue::from_response(response).await?,
62287                )),
62288                502u16 => Err(Error::ErrorResponse(
62289                    ResponseValue::from_response(response).await?,
62290                )),
62291                503u16 => Err(Error::ErrorResponse(
62292                    ResponseValue::from_response(response).await?,
62293                )),
62294                _ => Err(Error::UnexpectedResponse(response)),
62295            }
62296        }
62297    }
62298    /**Builder for [`Client::send_user_operation`]
62299
62300    [`Client::send_user_operation`]: super::Client::send_user_operation*/
62301    #[derive(Debug, Clone)]
62302    pub struct SendUserOperation<'a> {
62303        client: &'a super::Client,
62304        address: Result<types::SendUserOperationAddress, String>,
62305        user_op_hash: Result<types::SendUserOperationUserOpHash, String>,
62306        body: Result<types::builder::SendUserOperationBody, String>,
62307    }
62308    impl<'a> SendUserOperation<'a> {
62309        pub fn new(client: &'a super::Client) -> Self {
62310            Self {
62311                client: client,
62312                address: Err("address was not initialized".to_string()),
62313                user_op_hash: Err("user_op_hash was not initialized".to_string()),
62314                body: Ok(::std::default::Default::default()),
62315            }
62316        }
62317        pub fn address<V>(mut self, value: V) -> Self
62318        where
62319            V: std::convert::TryInto<types::SendUserOperationAddress>,
62320        {
62321            self.address = value.try_into().map_err(|_| {
62322                "conversion to `SendUserOperationAddress` for address failed".to_string()
62323            });
62324            self
62325        }
62326        pub fn user_op_hash<V>(mut self, value: V) -> Self
62327        where
62328            V: std::convert::TryInto<types::SendUserOperationUserOpHash>,
62329        {
62330            self.user_op_hash = value.try_into().map_err(|_| {
62331                "conversion to `SendUserOperationUserOpHash` for user_op_hash failed".to_string()
62332            });
62333            self
62334        }
62335        pub fn body<V>(mut self, value: V) -> Self
62336        where
62337            V: std::convert::TryInto<types::SendUserOperationBody>,
62338            <V as std::convert::TryInto<types::SendUserOperationBody>>::Error: std::fmt::Display,
62339        {
62340            self.body = value.try_into().map(From::from).map_err(|s| {
62341                format!(
62342                    "conversion to `SendUserOperationBody` for body failed: {}",
62343                    s
62344                )
62345            });
62346            self
62347        }
62348        pub fn body_map<F>(mut self, f: F) -> Self
62349        where
62350            F: std::ops::FnOnce(
62351                types::builder::SendUserOperationBody,
62352            ) -> types::builder::SendUserOperationBody,
62353        {
62354            self.body = self.body.map(f);
62355            self
62356        }
62357        ///Sends a `POST` request to `/v2/evm/smart-accounts/{address}/user-operations/{userOpHash}/send`
62358        pub async fn send(
62359            self,
62360        ) -> Result<ResponseValue<types::EvmUserOperation>, Error<types::Error>> {
62361            let Self {
62362                client,
62363                address,
62364                user_op_hash,
62365                body,
62366            } = self;
62367            let address = address.map_err(Error::InvalidRequest)?;
62368            let user_op_hash = user_op_hash.map_err(Error::InvalidRequest)?;
62369            let body = body
62370                .and_then(|v| types::SendUserOperationBody::try_from(v).map_err(|e| e.to_string()))
62371                .map_err(Error::InvalidRequest)?;
62372            let url = format!(
62373                "{}/v2/evm/smart-accounts/{}/user-operations/{}/send",
62374                client.baseurl,
62375                encode_path(&address.to_string()),
62376                encode_path(&user_op_hash.to_string()),
62377            );
62378            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
62379            header_map.append(
62380                ::reqwest::header::HeaderName::from_static("api-version"),
62381                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62382            );
62383            #[allow(unused_mut)]
62384            let mut request = client
62385                .client
62386                .post(url)
62387                .header(
62388                    ::reqwest::header::ACCEPT,
62389                    ::reqwest::header::HeaderValue::from_static("application/json"),
62390                )
62391                .json(&body)
62392                .headers(header_map)
62393                .build()?;
62394            let info = OperationInfo {
62395                operation_id: "send_user_operation",
62396            };
62397            client.pre(&mut request, &info).await?;
62398            let result = client.exec(request, &info).await;
62399            client.post(&result, &info).await?;
62400            let response = result?;
62401            match response.status().as_u16() {
62402                200u16 => ResponseValue::from_response(response).await,
62403                400u16 => Err(Error::ErrorResponse(
62404                    ResponseValue::from_response(response).await?,
62405                )),
62406                402u16 => Err(Error::ErrorResponse(
62407                    ResponseValue::from_response(response).await?,
62408                )),
62409                403u16 => Err(Error::ErrorResponse(
62410                    ResponseValue::from_response(response).await?,
62411                )),
62412                404u16 => Err(Error::ErrorResponse(
62413                    ResponseValue::from_response(response).await?,
62414                )),
62415                429u16 => Err(Error::ErrorResponse(
62416                    ResponseValue::from_response(response).await?,
62417                )),
62418                500u16 => Err(Error::ErrorResponse(
62419                    ResponseValue::from_response(response).await?,
62420                )),
62421                502u16 => Err(Error::ErrorResponse(
62422                    ResponseValue::from_response(response).await?,
62423                )),
62424                503u16 => Err(Error::ErrorResponse(
62425                    ResponseValue::from_response(response).await?,
62426                )),
62427                _ => Err(Error::UnexpectedResponse(response)),
62428            }
62429        }
62430    }
62431    /**Builder for [`Client::create_evm_swap_quote`]
62432
62433    [`Client::create_evm_swap_quote`]: super::Client::create_evm_swap_quote*/
62434    #[derive(Debug, Clone)]
62435    pub struct CreateEvmSwapQuote<'a> {
62436        client: &'a super::Client,
62437        x_idempotency_key: Result<Option<types::CreateEvmSwapQuoteXIdempotencyKey>, String>,
62438        body: Result<types::builder::CreateEvmSwapQuoteBody, String>,
62439    }
62440    impl<'a> CreateEvmSwapQuote<'a> {
62441        pub fn new(client: &'a super::Client) -> Self {
62442            Self {
62443                client: client,
62444                x_idempotency_key: Ok(None),
62445                body: Ok(::std::default::Default::default()),
62446            }
62447        }
62448        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
62449        where
62450            V: std::convert::TryInto<types::CreateEvmSwapQuoteXIdempotencyKey>,
62451        {
62452            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
62453                "conversion to `CreateEvmSwapQuoteXIdempotencyKey` for x_idempotency_key failed"
62454                    .to_string()
62455            });
62456            self
62457        }
62458        pub fn body<V>(mut self, value: V) -> Self
62459        where
62460            V: std::convert::TryInto<types::CreateEvmSwapQuoteBody>,
62461            <V as std::convert::TryInto<types::CreateEvmSwapQuoteBody>>::Error: std::fmt::Display,
62462        {
62463            self.body = value.try_into().map(From::from).map_err(|s| {
62464                format!(
62465                    "conversion to `CreateEvmSwapQuoteBody` for body failed: {}",
62466                    s
62467                )
62468            });
62469            self
62470        }
62471        pub fn body_map<F>(mut self, f: F) -> Self
62472        where
62473            F: std::ops::FnOnce(
62474                types::builder::CreateEvmSwapQuoteBody,
62475            ) -> types::builder::CreateEvmSwapQuoteBody,
62476        {
62477            self.body = self.body.map(f);
62478            self
62479        }
62480        ///Sends a `POST` request to `/v2/evm/swaps`
62481        pub async fn send(
62482            self,
62483        ) -> Result<ResponseValue<types::CreateSwapQuoteResponseWrapper>, Error<types::Error>>
62484        {
62485            let Self {
62486                client,
62487                x_idempotency_key,
62488                body,
62489            } = self;
62490            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
62491            let body = body
62492                .and_then(|v| types::CreateEvmSwapQuoteBody::try_from(v).map_err(|e| e.to_string()))
62493                .map_err(Error::InvalidRequest)?;
62494            let url = format!("{}/v2/evm/swaps", client.baseurl,);
62495            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
62496            header_map.append(
62497                ::reqwest::header::HeaderName::from_static("api-version"),
62498                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62499            );
62500            if let Some(value) = x_idempotency_key {
62501                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
62502            }
62503            #[allow(unused_mut)]
62504            let mut request = client
62505                .client
62506                .post(url)
62507                .header(
62508                    ::reqwest::header::ACCEPT,
62509                    ::reqwest::header::HeaderValue::from_static("application/json"),
62510                )
62511                .json(&body)
62512                .headers(header_map)
62513                .build()?;
62514            let info = OperationInfo {
62515                operation_id: "create_evm_swap_quote",
62516            };
62517            client.pre(&mut request, &info).await?;
62518            let result = client.exec(request, &info).await;
62519            client.post(&result, &info).await?;
62520            let response = result?;
62521            match response.status().as_u16() {
62522                201u16 => ResponseValue::from_response(response).await,
62523                400u16 => Err(Error::ErrorResponse(
62524                    ResponseValue::from_response(response).await?,
62525                )),
62526                403u16 => Err(Error::ErrorResponse(
62527                    ResponseValue::from_response(response).await?,
62528                )),
62529                500u16 => Err(Error::ErrorResponse(
62530                    ResponseValue::from_response(response).await?,
62531                )),
62532                502u16 => Err(Error::ErrorResponse(
62533                    ResponseValue::from_response(response).await?,
62534                )),
62535                503u16 => Err(Error::ErrorResponse(
62536                    ResponseValue::from_response(response).await?,
62537                )),
62538                _ => Err(Error::UnexpectedResponse(response)),
62539            }
62540        }
62541    }
62542    /**Builder for [`Client::get_evm_swap_price`]
62543
62544    [`Client::get_evm_swap_price`]: super::Client::get_evm_swap_price*/
62545    #[derive(Debug, Clone)]
62546    pub struct GetEvmSwapPrice<'a> {
62547        client: &'a super::Client,
62548        from_amount: Result<types::FromAmount, String>,
62549        from_token: Result<types::FromToken, String>,
62550        gas_price: Result<Option<types::GasPrice>, String>,
62551        network: Result<types::EvmSwapsNetwork, String>,
62552        signer_address: Result<Option<types::SignerAddress>, String>,
62553        slippage_bps: Result<Option<types::SlippageBps>, String>,
62554        taker: Result<types::Taker, String>,
62555        to_token: Result<types::ToToken, String>,
62556    }
62557    impl<'a> GetEvmSwapPrice<'a> {
62558        pub fn new(client: &'a super::Client) -> Self {
62559            Self {
62560                client: client,
62561                from_amount: Err("from_amount was not initialized".to_string()),
62562                from_token: Err("from_token was not initialized".to_string()),
62563                gas_price: Ok(None),
62564                network: Err("network was not initialized".to_string()),
62565                signer_address: Ok(None),
62566                slippage_bps: Ok(None),
62567                taker: Err("taker was not initialized".to_string()),
62568                to_token: Err("to_token was not initialized".to_string()),
62569            }
62570        }
62571        pub fn from_amount<V>(mut self, value: V) -> Self
62572        where
62573            V: std::convert::TryInto<types::FromAmount>,
62574        {
62575            self.from_amount = value
62576                .try_into()
62577                .map_err(|_| "conversion to `FromAmount` for from_amount failed".to_string());
62578            self
62579        }
62580        pub fn from_token<V>(mut self, value: V) -> Self
62581        where
62582            V: std::convert::TryInto<types::FromToken>,
62583        {
62584            self.from_token = value
62585                .try_into()
62586                .map_err(|_| "conversion to `FromToken` for from_token failed".to_string());
62587            self
62588        }
62589        pub fn gas_price<V>(mut self, value: V) -> Self
62590        where
62591            V: std::convert::TryInto<types::GasPrice>,
62592        {
62593            self.gas_price = value
62594                .try_into()
62595                .map(Some)
62596                .map_err(|_| "conversion to `GasPrice` for gas_price failed".to_string());
62597            self
62598        }
62599        pub fn network<V>(mut self, value: V) -> Self
62600        where
62601            V: std::convert::TryInto<types::EvmSwapsNetwork>,
62602        {
62603            self.network = value
62604                .try_into()
62605                .map_err(|_| "conversion to `EvmSwapsNetwork` for network failed".to_string());
62606            self
62607        }
62608        pub fn signer_address<V>(mut self, value: V) -> Self
62609        where
62610            V: std::convert::TryInto<types::SignerAddress>,
62611        {
62612            self.signer_address = value
62613                .try_into()
62614                .map(Some)
62615                .map_err(|_| "conversion to `SignerAddress` for signer_address failed".to_string());
62616            self
62617        }
62618        pub fn slippage_bps<V>(mut self, value: V) -> Self
62619        where
62620            V: std::convert::TryInto<types::SlippageBps>,
62621        {
62622            self.slippage_bps = value
62623                .try_into()
62624                .map(Some)
62625                .map_err(|_| "conversion to `SlippageBps` for slippage_bps failed".to_string());
62626            self
62627        }
62628        pub fn taker<V>(mut self, value: V) -> Self
62629        where
62630            V: std::convert::TryInto<types::Taker>,
62631        {
62632            self.taker = value
62633                .try_into()
62634                .map_err(|_| "conversion to `Taker` for taker failed".to_string());
62635            self
62636        }
62637        pub fn to_token<V>(mut self, value: V) -> Self
62638        where
62639            V: std::convert::TryInto<types::ToToken>,
62640        {
62641            self.to_token = value
62642                .try_into()
62643                .map_err(|_| "conversion to `ToToken` for to_token failed".to_string());
62644            self
62645        }
62646        ///Sends a `GET` request to `/v2/evm/swaps/quote`
62647        pub async fn send(
62648            self,
62649        ) -> Result<ResponseValue<types::GetSwapPriceResponseWrapper>, Error<types::Error>>
62650        {
62651            let Self {
62652                client,
62653                from_amount,
62654                from_token,
62655                gas_price,
62656                network,
62657                signer_address,
62658                slippage_bps,
62659                taker,
62660                to_token,
62661            } = self;
62662            let from_amount = from_amount.map_err(Error::InvalidRequest)?;
62663            let from_token = from_token.map_err(Error::InvalidRequest)?;
62664            let gas_price = gas_price.map_err(Error::InvalidRequest)?;
62665            let network = network.map_err(Error::InvalidRequest)?;
62666            let signer_address = signer_address.map_err(Error::InvalidRequest)?;
62667            let slippage_bps = slippage_bps.map_err(Error::InvalidRequest)?;
62668            let taker = taker.map_err(Error::InvalidRequest)?;
62669            let to_token = to_token.map_err(Error::InvalidRequest)?;
62670            let url = format!("{}/v2/evm/swaps/quote", client.baseurl,);
62671            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
62672            header_map.append(
62673                ::reqwest::header::HeaderName::from_static("api-version"),
62674                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62675            );
62676            #[allow(unused_mut)]
62677            let mut request = client
62678                .client
62679                .get(url)
62680                .header(
62681                    ::reqwest::header::ACCEPT,
62682                    ::reqwest::header::HeaderValue::from_static("application/json"),
62683                )
62684                .query(&progenitor_middleware_client::QueryParam::new(
62685                    "fromAmount",
62686                    &from_amount,
62687                ))
62688                .query(&progenitor_middleware_client::QueryParam::new(
62689                    "fromToken",
62690                    &from_token,
62691                ))
62692                .query(&progenitor_middleware_client::QueryParam::new(
62693                    "gasPrice", &gas_price,
62694                ))
62695                .query(&progenitor_middleware_client::QueryParam::new(
62696                    "network", &network,
62697                ))
62698                .query(&progenitor_middleware_client::QueryParam::new(
62699                    "signerAddress",
62700                    &signer_address,
62701                ))
62702                .query(&progenitor_middleware_client::QueryParam::new(
62703                    "slippageBps",
62704                    &slippage_bps,
62705                ))
62706                .query(&progenitor_middleware_client::QueryParam::new(
62707                    "taker", &taker,
62708                ))
62709                .query(&progenitor_middleware_client::QueryParam::new(
62710                    "toToken", &to_token,
62711                ))
62712                .headers(header_map)
62713                .build()?;
62714            let info = OperationInfo {
62715                operation_id: "get_evm_swap_price",
62716            };
62717            client.pre(&mut request, &info).await?;
62718            let result = client.exec(request, &info).await;
62719            client.post(&result, &info).await?;
62720            let response = result?;
62721            match response.status().as_u16() {
62722                200u16 => ResponseValue::from_response(response).await,
62723                400u16 => Err(Error::ErrorResponse(
62724                    ResponseValue::from_response(response).await?,
62725                )),
62726                403u16 => Err(Error::ErrorResponse(
62727                    ResponseValue::from_response(response).await?,
62728                )),
62729                500u16 => Err(Error::ErrorResponse(
62730                    ResponseValue::from_response(response).await?,
62731                )),
62732                502u16 => Err(Error::ErrorResponse(
62733                    ResponseValue::from_response(response).await?,
62734                )),
62735                503u16 => Err(Error::ErrorResponse(
62736                    ResponseValue::from_response(response).await?,
62737                )),
62738                _ => Err(Error::UnexpectedResponse(response)),
62739            }
62740        }
62741    }
62742    /**Builder for [`Client::list_evm_token_balances`]
62743
62744    [`Client::list_evm_token_balances`]: super::Client::list_evm_token_balances*/
62745    #[derive(Debug, Clone)]
62746    pub struct ListEvmTokenBalances<'a> {
62747        client: &'a super::Client,
62748        network: Result<types::ListEvmTokenBalancesNetwork, String>,
62749        address: Result<types::ListEvmTokenBalancesAddress, String>,
62750        page_size: Result<Option<i64>, String>,
62751        page_token: Result<Option<::std::string::String>, String>,
62752    }
62753    impl<'a> ListEvmTokenBalances<'a> {
62754        pub fn new(client: &'a super::Client) -> Self {
62755            Self {
62756                client: client,
62757                network: Err("network was not initialized".to_string()),
62758                address: Err("address was not initialized".to_string()),
62759                page_size: Ok(None),
62760                page_token: Ok(None),
62761            }
62762        }
62763        pub fn network<V>(mut self, value: V) -> Self
62764        where
62765            V: std::convert::TryInto<types::ListEvmTokenBalancesNetwork>,
62766        {
62767            self.network = value.try_into().map_err(|_| {
62768                "conversion to `ListEvmTokenBalancesNetwork` for network failed".to_string()
62769            });
62770            self
62771        }
62772        pub fn address<V>(mut self, value: V) -> Self
62773        where
62774            V: std::convert::TryInto<types::ListEvmTokenBalancesAddress>,
62775        {
62776            self.address = value.try_into().map_err(|_| {
62777                "conversion to `ListEvmTokenBalancesAddress` for address failed".to_string()
62778            });
62779            self
62780        }
62781        pub fn page_size<V>(mut self, value: V) -> Self
62782        where
62783            V: std::convert::TryInto<i64>,
62784        {
62785            self.page_size = value
62786                .try_into()
62787                .map(Some)
62788                .map_err(|_| "conversion to `i64` for page_size failed".to_string());
62789            self
62790        }
62791        pub fn page_token<V>(mut self, value: V) -> Self
62792        where
62793            V: std::convert::TryInto<::std::string::String>,
62794        {
62795            self.page_token = value.try_into().map(Some).map_err(|_| {
62796                "conversion to `:: std :: string :: String` for page_token failed".to_string()
62797            });
62798            self
62799        }
62800        ///Sends a `GET` request to `/v2/evm/token-balances/{network}/{address}`
62801        pub async fn send(
62802            self,
62803        ) -> Result<ResponseValue<types::ListEvmTokenBalancesResponse>, Error<types::Error>>
62804        {
62805            let Self {
62806                client,
62807                network,
62808                address,
62809                page_size,
62810                page_token,
62811            } = self;
62812            let network = network.map_err(Error::InvalidRequest)?;
62813            let address = address.map_err(Error::InvalidRequest)?;
62814            let page_size = page_size.map_err(Error::InvalidRequest)?;
62815            let page_token = page_token.map_err(Error::InvalidRequest)?;
62816            let url = format!(
62817                "{}/v2/evm/token-balances/{}/{}",
62818                client.baseurl,
62819                encode_path(&network.to_string()),
62820                encode_path(&address.to_string()),
62821            );
62822            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
62823            header_map.append(
62824                ::reqwest::header::HeaderName::from_static("api-version"),
62825                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62826            );
62827            #[allow(unused_mut)]
62828            let mut request = client
62829                .client
62830                .get(url)
62831                .header(
62832                    ::reqwest::header::ACCEPT,
62833                    ::reqwest::header::HeaderValue::from_static("application/json"),
62834                )
62835                .query(&progenitor_middleware_client::QueryParam::new(
62836                    "pageSize", &page_size,
62837                ))
62838                .query(&progenitor_middleware_client::QueryParam::new(
62839                    "pageToken",
62840                    &page_token,
62841                ))
62842                .headers(header_map)
62843                .build()?;
62844            let info = OperationInfo {
62845                operation_id: "list_evm_token_balances",
62846            };
62847            client.pre(&mut request, &info).await?;
62848            let result = client.exec(request, &info).await;
62849            client.post(&result, &info).await?;
62850            let response = result?;
62851            match response.status().as_u16() {
62852                200u16 => ResponseValue::from_response(response).await,
62853                400u16 => Err(Error::ErrorResponse(
62854                    ResponseValue::from_response(response).await?,
62855                )),
62856                404u16 => Err(Error::ErrorResponse(
62857                    ResponseValue::from_response(response).await?,
62858                )),
62859                500u16 => Err(Error::ErrorResponse(
62860                    ResponseValue::from_response(response).await?,
62861                )),
62862                502u16 => Err(Error::ErrorResponse(
62863                    ResponseValue::from_response(response).await?,
62864                )),
62865                503u16 => Err(Error::ErrorResponse(
62866                    ResponseValue::from_response(response).await?,
62867                )),
62868                _ => Err(Error::UnexpectedResponse(response)),
62869            }
62870        }
62871    }
62872    /**Builder for [`Client::create_onramp_order`]
62873
62874    [`Client::create_onramp_order`]: super::Client::create_onramp_order*/
62875    #[derive(Debug, Clone)]
62876    pub struct CreateOnrampOrder<'a> {
62877        client: &'a super::Client,
62878        body: Result<types::builder::CreateOnrampOrderBody, String>,
62879    }
62880    impl<'a> CreateOnrampOrder<'a> {
62881        pub fn new(client: &'a super::Client) -> Self {
62882            Self {
62883                client: client,
62884                body: Ok(::std::default::Default::default()),
62885            }
62886        }
62887        pub fn body<V>(mut self, value: V) -> Self
62888        where
62889            V: std::convert::TryInto<types::CreateOnrampOrderBody>,
62890            <V as std::convert::TryInto<types::CreateOnrampOrderBody>>::Error: std::fmt::Display,
62891        {
62892            self.body = value.try_into().map(From::from).map_err(|s| {
62893                format!(
62894                    "conversion to `CreateOnrampOrderBody` for body failed: {}",
62895                    s
62896                )
62897            });
62898            self
62899        }
62900        pub fn body_map<F>(mut self, f: F) -> Self
62901        where
62902            F: std::ops::FnOnce(
62903                types::builder::CreateOnrampOrderBody,
62904            ) -> types::builder::CreateOnrampOrderBody,
62905        {
62906            self.body = self.body.map(f);
62907            self
62908        }
62909        ///Sends a `POST` request to `/v2/onramp/orders`
62910        pub async fn send(
62911            self,
62912        ) -> Result<ResponseValue<types::CreateOnrampOrderResponse>, Error<types::Error>> {
62913            let Self { client, body } = self;
62914            let body = body
62915                .and_then(|v| types::CreateOnrampOrderBody::try_from(v).map_err(|e| e.to_string()))
62916                .map_err(Error::InvalidRequest)?;
62917            let url = format!("{}/v2/onramp/orders", client.baseurl,);
62918            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
62919            header_map.append(
62920                ::reqwest::header::HeaderName::from_static("api-version"),
62921                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62922            );
62923            #[allow(unused_mut)]
62924            let mut request = client
62925                .client
62926                .post(url)
62927                .header(
62928                    ::reqwest::header::ACCEPT,
62929                    ::reqwest::header::HeaderValue::from_static("application/json"),
62930                )
62931                .json(&body)
62932                .headers(header_map)
62933                .build()?;
62934            let info = OperationInfo {
62935                operation_id: "create_onramp_order",
62936            };
62937            client.pre(&mut request, &info).await?;
62938            let result = client.exec(request, &info).await;
62939            client.post(&result, &info).await?;
62940            let response = result?;
62941            match response.status().as_u16() {
62942                201u16 => ResponseValue::from_response(response).await,
62943                400u16 => Err(Error::ErrorResponse(
62944                    ResponseValue::from_response(response).await?,
62945                )),
62946                401u16 => Err(Error::ErrorResponse(
62947                    ResponseValue::from_response(response).await?,
62948                )),
62949                429u16 => Err(Error::ErrorResponse(
62950                    ResponseValue::from_response(response).await?,
62951                )),
62952                500u16 => Err(Error::ErrorResponse(
62953                    ResponseValue::from_response(response).await?,
62954                )),
62955                _ => Err(Error::UnexpectedResponse(response)),
62956            }
62957        }
62958    }
62959    /**Builder for [`Client::get_onramp_order_by_id`]
62960
62961    [`Client::get_onramp_order_by_id`]: super::Client::get_onramp_order_by_id*/
62962    #[derive(Debug, Clone)]
62963    pub struct GetOnrampOrderById<'a> {
62964        client: &'a super::Client,
62965        order_id: Result<::std::string::String, String>,
62966    }
62967    impl<'a> GetOnrampOrderById<'a> {
62968        pub fn new(client: &'a super::Client) -> Self {
62969            Self {
62970                client: client,
62971                order_id: Err("order_id was not initialized".to_string()),
62972            }
62973        }
62974        pub fn order_id<V>(mut self, value: V) -> Self
62975        where
62976            V: std::convert::TryInto<::std::string::String>,
62977        {
62978            self.order_id = value.try_into().map_err(|_| {
62979                "conversion to `:: std :: string :: String` for order_id failed".to_string()
62980            });
62981            self
62982        }
62983        ///Sends a `GET` request to `/v2/onramp/orders/{orderId}`
62984        pub async fn send(
62985            self,
62986        ) -> Result<ResponseValue<types::GetOnrampOrderByIdResponse>, Error<types::Error>> {
62987            let Self { client, order_id } = self;
62988            let order_id = order_id.map_err(Error::InvalidRequest)?;
62989            let url = format!(
62990                "{}/v2/onramp/orders/{}",
62991                client.baseurl,
62992                encode_path(&order_id.to_string()),
62993            );
62994            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
62995            header_map.append(
62996                ::reqwest::header::HeaderName::from_static("api-version"),
62997                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
62998            );
62999            #[allow(unused_mut)]
63000            let mut request = client
63001                .client
63002                .get(url)
63003                .header(
63004                    ::reqwest::header::ACCEPT,
63005                    ::reqwest::header::HeaderValue::from_static("application/json"),
63006                )
63007                .headers(header_map)
63008                .build()?;
63009            let info = OperationInfo {
63010                operation_id: "get_onramp_order_by_id",
63011            };
63012            client.pre(&mut request, &info).await?;
63013            let result = client.exec(request, &info).await;
63014            client.post(&result, &info).await?;
63015            let response = result?;
63016            match response.status().as_u16() {
63017                200u16 => ResponseValue::from_response(response).await,
63018                401u16 => Err(Error::ErrorResponse(
63019                    ResponseValue::from_response(response).await?,
63020                )),
63021                404u16 => Err(Error::ErrorResponse(
63022                    ResponseValue::from_response(response).await?,
63023                )),
63024                429u16 => Err(Error::ErrorResponse(
63025                    ResponseValue::from_response(response).await?,
63026                )),
63027                _ => Err(Error::UnexpectedResponse(response)),
63028            }
63029        }
63030    }
63031    /**Builder for [`Client::create_onramp_session`]
63032
63033    [`Client::create_onramp_session`]: super::Client::create_onramp_session*/
63034    #[derive(Debug, Clone)]
63035    pub struct CreateOnrampSession<'a> {
63036        client: &'a super::Client,
63037        body: Result<types::builder::CreateOnrampSessionBody, String>,
63038    }
63039    impl<'a> CreateOnrampSession<'a> {
63040        pub fn new(client: &'a super::Client) -> Self {
63041            Self {
63042                client: client,
63043                body: Ok(::std::default::Default::default()),
63044            }
63045        }
63046        pub fn body<V>(mut self, value: V) -> Self
63047        where
63048            V: std::convert::TryInto<types::CreateOnrampSessionBody>,
63049            <V as std::convert::TryInto<types::CreateOnrampSessionBody>>::Error: std::fmt::Display,
63050        {
63051            self.body = value.try_into().map(From::from).map_err(|s| {
63052                format!(
63053                    "conversion to `CreateOnrampSessionBody` for body failed: {}",
63054                    s
63055                )
63056            });
63057            self
63058        }
63059        pub fn body_map<F>(mut self, f: F) -> Self
63060        where
63061            F: std::ops::FnOnce(
63062                types::builder::CreateOnrampSessionBody,
63063            ) -> types::builder::CreateOnrampSessionBody,
63064        {
63065            self.body = self.body.map(f);
63066            self
63067        }
63068        ///Sends a `POST` request to `/v2/onramp/sessions`
63069        pub async fn send(
63070            self,
63071        ) -> Result<ResponseValue<types::CreateOnrampSessionResponse>, Error<types::Error>>
63072        {
63073            let Self { client, body } = self;
63074            let body = body
63075                .and_then(|v| {
63076                    types::CreateOnrampSessionBody::try_from(v).map_err(|e| e.to_string())
63077                })
63078                .map_err(Error::InvalidRequest)?;
63079            let url = format!("{}/v2/onramp/sessions", client.baseurl,);
63080            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
63081            header_map.append(
63082                ::reqwest::header::HeaderName::from_static("api-version"),
63083                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63084            );
63085            #[allow(unused_mut)]
63086            let mut request = client
63087                .client
63088                .post(url)
63089                .header(
63090                    ::reqwest::header::ACCEPT,
63091                    ::reqwest::header::HeaderValue::from_static("application/json"),
63092                )
63093                .json(&body)
63094                .headers(header_map)
63095                .build()?;
63096            let info = OperationInfo {
63097                operation_id: "create_onramp_session",
63098            };
63099            client.pre(&mut request, &info).await?;
63100            let result = client.exec(request, &info).await;
63101            client.post(&result, &info).await?;
63102            let response = result?;
63103            match response.status().as_u16() {
63104                201u16 => ResponseValue::from_response(response).await,
63105                400u16 => Err(Error::ErrorResponse(
63106                    ResponseValue::from_response(response).await?,
63107                )),
63108                401u16 => Err(Error::ErrorResponse(
63109                    ResponseValue::from_response(response).await?,
63110                )),
63111                429u16 => Err(Error::ErrorResponse(
63112                    ResponseValue::from_response(response).await?,
63113                )),
63114                500u16 => Err(Error::ErrorResponse(
63115                    ResponseValue::from_response(response).await?,
63116                )),
63117                _ => Err(Error::UnexpectedResponse(response)),
63118            }
63119        }
63120    }
63121    /**Builder for [`Client::list_policies`]
63122
63123    [`Client::list_policies`]: super::Client::list_policies*/
63124    #[derive(Debug, Clone)]
63125    pub struct ListPolicies<'a> {
63126        client: &'a super::Client,
63127        page_size: Result<Option<i64>, String>,
63128        page_token: Result<Option<::std::string::String>, String>,
63129        scope: Result<Option<types::ListPoliciesScope>, String>,
63130    }
63131    impl<'a> ListPolicies<'a> {
63132        pub fn new(client: &'a super::Client) -> Self {
63133            Self {
63134                client: client,
63135                page_size: Ok(None),
63136                page_token: Ok(None),
63137                scope: Ok(None),
63138            }
63139        }
63140        pub fn page_size<V>(mut self, value: V) -> Self
63141        where
63142            V: std::convert::TryInto<i64>,
63143        {
63144            self.page_size = value
63145                .try_into()
63146                .map(Some)
63147                .map_err(|_| "conversion to `i64` for page_size failed".to_string());
63148            self
63149        }
63150        pub fn page_token<V>(mut self, value: V) -> Self
63151        where
63152            V: std::convert::TryInto<::std::string::String>,
63153        {
63154            self.page_token = value.try_into().map(Some).map_err(|_| {
63155                "conversion to `:: std :: string :: String` for page_token failed".to_string()
63156            });
63157            self
63158        }
63159        pub fn scope<V>(mut self, value: V) -> Self
63160        where
63161            V: std::convert::TryInto<types::ListPoliciesScope>,
63162        {
63163            self.scope = value
63164                .try_into()
63165                .map(Some)
63166                .map_err(|_| "conversion to `ListPoliciesScope` for scope failed".to_string());
63167            self
63168        }
63169        ///Sends a `GET` request to `/v2/policy-engine/policies`
63170        pub async fn send(
63171            self,
63172        ) -> Result<ResponseValue<types::ListPoliciesResponse>, Error<types::Error>> {
63173            let Self {
63174                client,
63175                page_size,
63176                page_token,
63177                scope,
63178            } = self;
63179            let page_size = page_size.map_err(Error::InvalidRequest)?;
63180            let page_token = page_token.map_err(Error::InvalidRequest)?;
63181            let scope = scope.map_err(Error::InvalidRequest)?;
63182            let url = format!("{}/v2/policy-engine/policies", client.baseurl,);
63183            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
63184            header_map.append(
63185                ::reqwest::header::HeaderName::from_static("api-version"),
63186                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63187            );
63188            #[allow(unused_mut)]
63189            let mut request = client
63190                .client
63191                .get(url)
63192                .header(
63193                    ::reqwest::header::ACCEPT,
63194                    ::reqwest::header::HeaderValue::from_static("application/json"),
63195                )
63196                .query(&progenitor_middleware_client::QueryParam::new(
63197                    "pageSize", &page_size,
63198                ))
63199                .query(&progenitor_middleware_client::QueryParam::new(
63200                    "pageToken",
63201                    &page_token,
63202                ))
63203                .query(&progenitor_middleware_client::QueryParam::new(
63204                    "scope", &scope,
63205                ))
63206                .headers(header_map)
63207                .build()?;
63208            let info = OperationInfo {
63209                operation_id: "list_policies",
63210            };
63211            client.pre(&mut request, &info).await?;
63212            let result = client.exec(request, &info).await;
63213            client.post(&result, &info).await?;
63214            let response = result?;
63215            match response.status().as_u16() {
63216                200u16 => ResponseValue::from_response(response).await,
63217                500u16 => Err(Error::ErrorResponse(
63218                    ResponseValue::from_response(response).await?,
63219                )),
63220                502u16 => Err(Error::ErrorResponse(
63221                    ResponseValue::from_response(response).await?,
63222                )),
63223                503u16 => Err(Error::ErrorResponse(
63224                    ResponseValue::from_response(response).await?,
63225                )),
63226                _ => Err(Error::UnexpectedResponse(response)),
63227            }
63228        }
63229    }
63230    /**Builder for [`Client::create_policy`]
63231
63232    [`Client::create_policy`]: super::Client::create_policy*/
63233    #[derive(Debug, Clone)]
63234    pub struct CreatePolicy<'a> {
63235        client: &'a super::Client,
63236        x_idempotency_key: Result<Option<types::CreatePolicyXIdempotencyKey>, String>,
63237        body: Result<types::builder::CreatePolicyBody, String>,
63238    }
63239    impl<'a> CreatePolicy<'a> {
63240        pub fn new(client: &'a super::Client) -> Self {
63241            Self {
63242                client: client,
63243                x_idempotency_key: Ok(None),
63244                body: Ok(::std::default::Default::default()),
63245            }
63246        }
63247        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
63248        where
63249            V: std::convert::TryInto<types::CreatePolicyXIdempotencyKey>,
63250        {
63251            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
63252                "conversion to `CreatePolicyXIdempotencyKey` for x_idempotency_key failed"
63253                    .to_string()
63254            });
63255            self
63256        }
63257        pub fn body<V>(mut self, value: V) -> Self
63258        where
63259            V: std::convert::TryInto<types::CreatePolicyBody>,
63260            <V as std::convert::TryInto<types::CreatePolicyBody>>::Error: std::fmt::Display,
63261        {
63262            self.body = value
63263                .try_into()
63264                .map(From::from)
63265                .map_err(|s| format!("conversion to `CreatePolicyBody` for body failed: {}", s));
63266            self
63267        }
63268        pub fn body_map<F>(mut self, f: F) -> Self
63269        where
63270            F: std::ops::FnOnce(
63271                types::builder::CreatePolicyBody,
63272            ) -> types::builder::CreatePolicyBody,
63273        {
63274            self.body = self.body.map(f);
63275            self
63276        }
63277        ///Sends a `POST` request to `/v2/policy-engine/policies`
63278        pub async fn send(self) -> Result<ResponseValue<types::Policy>, Error<types::Error>> {
63279            let Self {
63280                client,
63281                x_idempotency_key,
63282                body,
63283            } = self;
63284            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
63285            let body = body
63286                .and_then(|v| types::CreatePolicyBody::try_from(v).map_err(|e| e.to_string()))
63287                .map_err(Error::InvalidRequest)?;
63288            let url = format!("{}/v2/policy-engine/policies", client.baseurl,);
63289            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
63290            header_map.append(
63291                ::reqwest::header::HeaderName::from_static("api-version"),
63292                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63293            );
63294            if let Some(value) = x_idempotency_key {
63295                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
63296            }
63297            #[allow(unused_mut)]
63298            let mut request = client
63299                .client
63300                .post(url)
63301                .header(
63302                    ::reqwest::header::ACCEPT,
63303                    ::reqwest::header::HeaderValue::from_static("application/json"),
63304                )
63305                .json(&body)
63306                .headers(header_map)
63307                .build()?;
63308            let info = OperationInfo {
63309                operation_id: "create_policy",
63310            };
63311            client.pre(&mut request, &info).await?;
63312            let result = client.exec(request, &info).await;
63313            client.post(&result, &info).await?;
63314            let response = result?;
63315            match response.status().as_u16() {
63316                201u16 => ResponseValue::from_response(response).await,
63317                400u16 => Err(Error::ErrorResponse(
63318                    ResponseValue::from_response(response).await?,
63319                )),
63320                409u16 => Err(Error::ErrorResponse(
63321                    ResponseValue::from_response(response).await?,
63322                )),
63323                422u16 => Err(Error::ErrorResponse(
63324                    ResponseValue::from_response(response).await?,
63325                )),
63326                500u16 => Err(Error::ErrorResponse(
63327                    ResponseValue::from_response(response).await?,
63328                )),
63329                502u16 => Err(Error::ErrorResponse(
63330                    ResponseValue::from_response(response).await?,
63331                )),
63332                503u16 => Err(Error::ErrorResponse(
63333                    ResponseValue::from_response(response).await?,
63334                )),
63335                _ => Err(Error::UnexpectedResponse(response)),
63336            }
63337        }
63338    }
63339    /**Builder for [`Client::get_policy_by_id`]
63340
63341    [`Client::get_policy_by_id`]: super::Client::get_policy_by_id*/
63342    #[derive(Debug, Clone)]
63343    pub struct GetPolicyById<'a> {
63344        client: &'a super::Client,
63345        policy_id: Result<types::GetPolicyByIdPolicyId, String>,
63346    }
63347    impl<'a> GetPolicyById<'a> {
63348        pub fn new(client: &'a super::Client) -> Self {
63349            Self {
63350                client: client,
63351                policy_id: Err("policy_id was not initialized".to_string()),
63352            }
63353        }
63354        pub fn policy_id<V>(mut self, value: V) -> Self
63355        where
63356            V: std::convert::TryInto<types::GetPolicyByIdPolicyId>,
63357        {
63358            self.policy_id = value.try_into().map_err(|_| {
63359                "conversion to `GetPolicyByIdPolicyId` for policy_id failed".to_string()
63360            });
63361            self
63362        }
63363        ///Sends a `GET` request to `/v2/policy-engine/policies/{policyId}`
63364        pub async fn send(self) -> Result<ResponseValue<types::Policy>, Error<types::Error>> {
63365            let Self { client, policy_id } = self;
63366            let policy_id = policy_id.map_err(Error::InvalidRequest)?;
63367            let url = format!(
63368                "{}/v2/policy-engine/policies/{}",
63369                client.baseurl,
63370                encode_path(&policy_id.to_string()),
63371            );
63372            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
63373            header_map.append(
63374                ::reqwest::header::HeaderName::from_static("api-version"),
63375                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63376            );
63377            #[allow(unused_mut)]
63378            let mut request = client
63379                .client
63380                .get(url)
63381                .header(
63382                    ::reqwest::header::ACCEPT,
63383                    ::reqwest::header::HeaderValue::from_static("application/json"),
63384                )
63385                .headers(header_map)
63386                .build()?;
63387            let info = OperationInfo {
63388                operation_id: "get_policy_by_id",
63389            };
63390            client.pre(&mut request, &info).await?;
63391            let result = client.exec(request, &info).await;
63392            client.post(&result, &info).await?;
63393            let response = result?;
63394            match response.status().as_u16() {
63395                200u16 => ResponseValue::from_response(response).await,
63396                404u16 => Err(Error::ErrorResponse(
63397                    ResponseValue::from_response(response).await?,
63398                )),
63399                500u16 => Err(Error::ErrorResponse(
63400                    ResponseValue::from_response(response).await?,
63401                )),
63402                502u16 => Err(Error::ErrorResponse(
63403                    ResponseValue::from_response(response).await?,
63404                )),
63405                503u16 => Err(Error::ErrorResponse(
63406                    ResponseValue::from_response(response).await?,
63407                )),
63408                _ => Err(Error::UnexpectedResponse(response)),
63409            }
63410        }
63411    }
63412    /**Builder for [`Client::update_policy`]
63413
63414    [`Client::update_policy`]: super::Client::update_policy*/
63415    #[derive(Debug, Clone)]
63416    pub struct UpdatePolicy<'a> {
63417        client: &'a super::Client,
63418        policy_id: Result<types::UpdatePolicyPolicyId, String>,
63419        x_idempotency_key: Result<Option<types::UpdatePolicyXIdempotencyKey>, String>,
63420        body: Result<types::builder::UpdatePolicyBody, String>,
63421    }
63422    impl<'a> UpdatePolicy<'a> {
63423        pub fn new(client: &'a super::Client) -> Self {
63424            Self {
63425                client: client,
63426                policy_id: Err("policy_id was not initialized".to_string()),
63427                x_idempotency_key: Ok(None),
63428                body: Ok(::std::default::Default::default()),
63429            }
63430        }
63431        pub fn policy_id<V>(mut self, value: V) -> Self
63432        where
63433            V: std::convert::TryInto<types::UpdatePolicyPolicyId>,
63434        {
63435            self.policy_id = value.try_into().map_err(|_| {
63436                "conversion to `UpdatePolicyPolicyId` for policy_id failed".to_string()
63437            });
63438            self
63439        }
63440        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
63441        where
63442            V: std::convert::TryInto<types::UpdatePolicyXIdempotencyKey>,
63443        {
63444            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
63445                "conversion to `UpdatePolicyXIdempotencyKey` for x_idempotency_key failed"
63446                    .to_string()
63447            });
63448            self
63449        }
63450        pub fn body<V>(mut self, value: V) -> Self
63451        where
63452            V: std::convert::TryInto<types::UpdatePolicyBody>,
63453            <V as std::convert::TryInto<types::UpdatePolicyBody>>::Error: std::fmt::Display,
63454        {
63455            self.body = value
63456                .try_into()
63457                .map(From::from)
63458                .map_err(|s| format!("conversion to `UpdatePolicyBody` for body failed: {}", s));
63459            self
63460        }
63461        pub fn body_map<F>(mut self, f: F) -> Self
63462        where
63463            F: std::ops::FnOnce(
63464                types::builder::UpdatePolicyBody,
63465            ) -> types::builder::UpdatePolicyBody,
63466        {
63467            self.body = self.body.map(f);
63468            self
63469        }
63470        ///Sends a `PUT` request to `/v2/policy-engine/policies/{policyId}`
63471        pub async fn send(self) -> Result<ResponseValue<types::Policy>, Error<types::Error>> {
63472            let Self {
63473                client,
63474                policy_id,
63475                x_idempotency_key,
63476                body,
63477            } = self;
63478            let policy_id = policy_id.map_err(Error::InvalidRequest)?;
63479            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
63480            let body = body
63481                .and_then(|v| types::UpdatePolicyBody::try_from(v).map_err(|e| e.to_string()))
63482                .map_err(Error::InvalidRequest)?;
63483            let url = format!(
63484                "{}/v2/policy-engine/policies/{}",
63485                client.baseurl,
63486                encode_path(&policy_id.to_string()),
63487            );
63488            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
63489            header_map.append(
63490                ::reqwest::header::HeaderName::from_static("api-version"),
63491                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63492            );
63493            if let Some(value) = x_idempotency_key {
63494                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
63495            }
63496            #[allow(unused_mut)]
63497            let mut request = client
63498                .client
63499                .put(url)
63500                .header(
63501                    ::reqwest::header::ACCEPT,
63502                    ::reqwest::header::HeaderValue::from_static("application/json"),
63503                )
63504                .json(&body)
63505                .headers(header_map)
63506                .build()?;
63507            let info = OperationInfo {
63508                operation_id: "update_policy",
63509            };
63510            client.pre(&mut request, &info).await?;
63511            let result = client.exec(request, &info).await;
63512            client.post(&result, &info).await?;
63513            let response = result?;
63514            match response.status().as_u16() {
63515                200u16 => ResponseValue::from_response(response).await,
63516                400u16 => Err(Error::ErrorResponse(
63517                    ResponseValue::from_response(response).await?,
63518                )),
63519                404u16 => Err(Error::ErrorResponse(
63520                    ResponseValue::from_response(response).await?,
63521                )),
63522                409u16 => Err(Error::ErrorResponse(
63523                    ResponseValue::from_response(response).await?,
63524                )),
63525                422u16 => Err(Error::ErrorResponse(
63526                    ResponseValue::from_response(response).await?,
63527                )),
63528                500u16 => Err(Error::ErrorResponse(
63529                    ResponseValue::from_response(response).await?,
63530                )),
63531                502u16 => Err(Error::ErrorResponse(
63532                    ResponseValue::from_response(response).await?,
63533                )),
63534                503u16 => Err(Error::ErrorResponse(
63535                    ResponseValue::from_response(response).await?,
63536                )),
63537                _ => Err(Error::UnexpectedResponse(response)),
63538            }
63539        }
63540    }
63541    /**Builder for [`Client::delete_policy`]
63542
63543    [`Client::delete_policy`]: super::Client::delete_policy*/
63544    #[derive(Debug, Clone)]
63545    pub struct DeletePolicy<'a> {
63546        client: &'a super::Client,
63547        policy_id: Result<types::DeletePolicyPolicyId, String>,
63548        x_idempotency_key: Result<Option<types::DeletePolicyXIdempotencyKey>, String>,
63549    }
63550    impl<'a> DeletePolicy<'a> {
63551        pub fn new(client: &'a super::Client) -> Self {
63552            Self {
63553                client: client,
63554                policy_id: Err("policy_id was not initialized".to_string()),
63555                x_idempotency_key: Ok(None),
63556            }
63557        }
63558        pub fn policy_id<V>(mut self, value: V) -> Self
63559        where
63560            V: std::convert::TryInto<types::DeletePolicyPolicyId>,
63561        {
63562            self.policy_id = value.try_into().map_err(|_| {
63563                "conversion to `DeletePolicyPolicyId` for policy_id failed".to_string()
63564            });
63565            self
63566        }
63567        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
63568        where
63569            V: std::convert::TryInto<types::DeletePolicyXIdempotencyKey>,
63570        {
63571            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
63572                "conversion to `DeletePolicyXIdempotencyKey` for x_idempotency_key failed"
63573                    .to_string()
63574            });
63575            self
63576        }
63577        ///Sends a `DELETE` request to `/v2/policy-engine/policies/{policyId}`
63578        pub async fn send(self) -> Result<ResponseValue<()>, Error<types::Error>> {
63579            let Self {
63580                client,
63581                policy_id,
63582                x_idempotency_key,
63583            } = self;
63584            let policy_id = policy_id.map_err(Error::InvalidRequest)?;
63585            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
63586            let url = format!(
63587                "{}/v2/policy-engine/policies/{}",
63588                client.baseurl,
63589                encode_path(&policy_id.to_string()),
63590            );
63591            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
63592            header_map.append(
63593                ::reqwest::header::HeaderName::from_static("api-version"),
63594                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63595            );
63596            if let Some(value) = x_idempotency_key {
63597                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
63598            }
63599            #[allow(unused_mut)]
63600            let mut request = client
63601                .client
63602                .delete(url)
63603                .header(
63604                    ::reqwest::header::ACCEPT,
63605                    ::reqwest::header::HeaderValue::from_static("application/json"),
63606                )
63607                .headers(header_map)
63608                .build()?;
63609            let info = OperationInfo {
63610                operation_id: "delete_policy",
63611            };
63612            client.pre(&mut request, &info).await?;
63613            let result = client.exec(request, &info).await;
63614            client.post(&result, &info).await?;
63615            let response = result?;
63616            match response.status().as_u16() {
63617                204u16 => Ok(ResponseValue::empty(response)),
63618                400u16 => Err(Error::ErrorResponse(
63619                    ResponseValue::from_response(response).await?,
63620                )),
63621                404u16 => Err(Error::ErrorResponse(
63622                    ResponseValue::from_response(response).await?,
63623                )),
63624                409u16 => Err(Error::ErrorResponse(
63625                    ResponseValue::from_response(response).await?,
63626                )),
63627                422u16 => Err(Error::ErrorResponse(
63628                    ResponseValue::from_response(response).await?,
63629                )),
63630                500u16 => Err(Error::ErrorResponse(
63631                    ResponseValue::from_response(response).await?,
63632                )),
63633                502u16 => Err(Error::ErrorResponse(
63634                    ResponseValue::from_response(response).await?,
63635                )),
63636                503u16 => Err(Error::ErrorResponse(
63637                    ResponseValue::from_response(response).await?,
63638                )),
63639                _ => Err(Error::UnexpectedResponse(response)),
63640            }
63641        }
63642    }
63643    /**Builder for [`Client::list_solana_accounts`]
63644
63645    [`Client::list_solana_accounts`]: super::Client::list_solana_accounts*/
63646    #[derive(Debug, Clone)]
63647    pub struct ListSolanaAccounts<'a> {
63648        client: &'a super::Client,
63649        page_size: Result<Option<i64>, String>,
63650        page_token: Result<Option<::std::string::String>, String>,
63651    }
63652    impl<'a> ListSolanaAccounts<'a> {
63653        pub fn new(client: &'a super::Client) -> Self {
63654            Self {
63655                client: client,
63656                page_size: Ok(None),
63657                page_token: Ok(None),
63658            }
63659        }
63660        pub fn page_size<V>(mut self, value: V) -> Self
63661        where
63662            V: std::convert::TryInto<i64>,
63663        {
63664            self.page_size = value
63665                .try_into()
63666                .map(Some)
63667                .map_err(|_| "conversion to `i64` for page_size failed".to_string());
63668            self
63669        }
63670        pub fn page_token<V>(mut self, value: V) -> Self
63671        where
63672            V: std::convert::TryInto<::std::string::String>,
63673        {
63674            self.page_token = value.try_into().map(Some).map_err(|_| {
63675                "conversion to `:: std :: string :: String` for page_token failed".to_string()
63676            });
63677            self
63678        }
63679        ///Sends a `GET` request to `/v2/solana/accounts`
63680        pub async fn send(
63681            self,
63682        ) -> Result<ResponseValue<types::ListSolanaAccountsResponse>, Error<types::Error>> {
63683            let Self {
63684                client,
63685                page_size,
63686                page_token,
63687            } = self;
63688            let page_size = page_size.map_err(Error::InvalidRequest)?;
63689            let page_token = page_token.map_err(Error::InvalidRequest)?;
63690            let url = format!("{}/v2/solana/accounts", client.baseurl,);
63691            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
63692            header_map.append(
63693                ::reqwest::header::HeaderName::from_static("api-version"),
63694                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63695            );
63696            #[allow(unused_mut)]
63697            let mut request = client
63698                .client
63699                .get(url)
63700                .header(
63701                    ::reqwest::header::ACCEPT,
63702                    ::reqwest::header::HeaderValue::from_static("application/json"),
63703                )
63704                .query(&progenitor_middleware_client::QueryParam::new(
63705                    "pageSize", &page_size,
63706                ))
63707                .query(&progenitor_middleware_client::QueryParam::new(
63708                    "pageToken",
63709                    &page_token,
63710                ))
63711                .headers(header_map)
63712                .build()?;
63713            let info = OperationInfo {
63714                operation_id: "list_solana_accounts",
63715            };
63716            client.pre(&mut request, &info).await?;
63717            let result = client.exec(request, &info).await;
63718            client.post(&result, &info).await?;
63719            let response = result?;
63720            match response.status().as_u16() {
63721                200u16 => ResponseValue::from_response(response).await,
63722                500u16 => Err(Error::ErrorResponse(
63723                    ResponseValue::from_response(response).await?,
63724                )),
63725                502u16 => Err(Error::ErrorResponse(
63726                    ResponseValue::from_response(response).await?,
63727                )),
63728                503u16 => Err(Error::ErrorResponse(
63729                    ResponseValue::from_response(response).await?,
63730                )),
63731                _ => Err(Error::UnexpectedResponse(response)),
63732            }
63733        }
63734    }
63735    /**Builder for [`Client::create_solana_account`]
63736
63737    [`Client::create_solana_account`]: super::Client::create_solana_account*/
63738    #[derive(Debug, Clone)]
63739    pub struct CreateSolanaAccount<'a> {
63740        client: &'a super::Client,
63741        x_idempotency_key: Result<Option<types::CreateSolanaAccountXIdempotencyKey>, String>,
63742        x_wallet_auth: Result<::std::string::String, String>,
63743        body: Result<types::builder::CreateSolanaAccountBody, String>,
63744    }
63745    impl<'a> CreateSolanaAccount<'a> {
63746        pub fn new(client: &'a super::Client) -> Self {
63747            Self {
63748                client: client,
63749                x_idempotency_key: Ok(None),
63750                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
63751                body: Ok(::std::default::Default::default()),
63752            }
63753        }
63754        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
63755        where
63756            V: std::convert::TryInto<types::CreateSolanaAccountXIdempotencyKey>,
63757        {
63758            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
63759                "conversion to `CreateSolanaAccountXIdempotencyKey` for x_idempotency_key failed"
63760                    .to_string()
63761            });
63762            self
63763        }
63764        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
63765        where
63766            V: std::convert::TryInto<::std::string::String>,
63767        {
63768            self.x_wallet_auth = value.try_into().map_err(|_| {
63769                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
63770            });
63771            self
63772        }
63773        pub fn body<V>(mut self, value: V) -> Self
63774        where
63775            V: std::convert::TryInto<types::CreateSolanaAccountBody>,
63776            <V as std::convert::TryInto<types::CreateSolanaAccountBody>>::Error: std::fmt::Display,
63777        {
63778            self.body = value.try_into().map(From::from).map_err(|s| {
63779                format!(
63780                    "conversion to `CreateSolanaAccountBody` for body failed: {}",
63781                    s
63782                )
63783            });
63784            self
63785        }
63786        pub fn body_map<F>(mut self, f: F) -> Self
63787        where
63788            F: std::ops::FnOnce(
63789                types::builder::CreateSolanaAccountBody,
63790            ) -> types::builder::CreateSolanaAccountBody,
63791        {
63792            self.body = self.body.map(f);
63793            self
63794        }
63795        ///Sends a `POST` request to `/v2/solana/accounts`
63796        pub async fn send(
63797            self,
63798        ) -> Result<ResponseValue<types::SolanaAccount>, Error<types::Error>> {
63799            let Self {
63800                client,
63801                x_idempotency_key,
63802                x_wallet_auth,
63803                body,
63804            } = self;
63805            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
63806            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
63807            let body = body
63808                .and_then(|v| {
63809                    types::CreateSolanaAccountBody::try_from(v).map_err(|e| e.to_string())
63810                })
63811                .map_err(Error::InvalidRequest)?;
63812            let url = format!("{}/v2/solana/accounts", client.baseurl,);
63813            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
63814            header_map.append(
63815                ::reqwest::header::HeaderName::from_static("api-version"),
63816                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63817            );
63818            if let Some(value) = x_idempotency_key {
63819                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
63820            }
63821            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
63822            #[allow(unused_mut)]
63823            let mut request = client
63824                .client
63825                .post(url)
63826                .header(
63827                    ::reqwest::header::ACCEPT,
63828                    ::reqwest::header::HeaderValue::from_static("application/json"),
63829                )
63830                .json(&body)
63831                .headers(header_map)
63832                .build()?;
63833            let info = OperationInfo {
63834                operation_id: "create_solana_account",
63835            };
63836            client.pre(&mut request, &info).await?;
63837            let result = client.exec(request, &info).await;
63838            client.post(&result, &info).await?;
63839            let response = result?;
63840            match response.status().as_u16() {
63841                201u16 => ResponseValue::from_response(response).await,
63842                400u16 => Err(Error::ErrorResponse(
63843                    ResponseValue::from_response(response).await?,
63844                )),
63845                401u16 => Err(Error::ErrorResponse(
63846                    ResponseValue::from_response(response).await?,
63847                )),
63848                402u16 => Err(Error::ErrorResponse(
63849                    ResponseValue::from_response(response).await?,
63850                )),
63851                409u16 => Err(Error::ErrorResponse(
63852                    ResponseValue::from_response(response).await?,
63853                )),
63854                422u16 => Err(Error::ErrorResponse(
63855                    ResponseValue::from_response(response).await?,
63856                )),
63857                500u16 => Err(Error::ErrorResponse(
63858                    ResponseValue::from_response(response).await?,
63859                )),
63860                502u16 => Err(Error::ErrorResponse(
63861                    ResponseValue::from_response(response).await?,
63862                )),
63863                503u16 => Err(Error::ErrorResponse(
63864                    ResponseValue::from_response(response).await?,
63865                )),
63866                _ => Err(Error::UnexpectedResponse(response)),
63867            }
63868        }
63869    }
63870    /**Builder for [`Client::get_solana_account_by_name`]
63871
63872    [`Client::get_solana_account_by_name`]: super::Client::get_solana_account_by_name*/
63873    #[derive(Debug, Clone)]
63874    pub struct GetSolanaAccountByName<'a> {
63875        client: &'a super::Client,
63876        name: Result<::std::string::String, String>,
63877    }
63878    impl<'a> GetSolanaAccountByName<'a> {
63879        pub fn new(client: &'a super::Client) -> Self {
63880            Self {
63881                client: client,
63882                name: Err("name was not initialized".to_string()),
63883            }
63884        }
63885        pub fn name<V>(mut self, value: V) -> Self
63886        where
63887            V: std::convert::TryInto<::std::string::String>,
63888        {
63889            self.name = value.try_into().map_err(|_| {
63890                "conversion to `:: std :: string :: String` for name failed".to_string()
63891            });
63892            self
63893        }
63894        ///Sends a `GET` request to `/v2/solana/accounts/by-name/{name}`
63895        pub async fn send(
63896            self,
63897        ) -> Result<ResponseValue<types::SolanaAccount>, Error<types::Error>> {
63898            let Self { client, name } = self;
63899            let name = name.map_err(Error::InvalidRequest)?;
63900            let url = format!(
63901                "{}/v2/solana/accounts/by-name/{}",
63902                client.baseurl,
63903                encode_path(&name.to_string()),
63904            );
63905            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
63906            header_map.append(
63907                ::reqwest::header::HeaderName::from_static("api-version"),
63908                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
63909            );
63910            #[allow(unused_mut)]
63911            let mut request = client
63912                .client
63913                .get(url)
63914                .header(
63915                    ::reqwest::header::ACCEPT,
63916                    ::reqwest::header::HeaderValue::from_static("application/json"),
63917                )
63918                .headers(header_map)
63919                .build()?;
63920            let info = OperationInfo {
63921                operation_id: "get_solana_account_by_name",
63922            };
63923            client.pre(&mut request, &info).await?;
63924            let result = client.exec(request, &info).await;
63925            client.post(&result, &info).await?;
63926            let response = result?;
63927            match response.status().as_u16() {
63928                200u16 => ResponseValue::from_response(response).await,
63929                400u16 => Err(Error::ErrorResponse(
63930                    ResponseValue::from_response(response).await?,
63931                )),
63932                404u16 => Err(Error::ErrorResponse(
63933                    ResponseValue::from_response(response).await?,
63934                )),
63935                500u16 => Err(Error::ErrorResponse(
63936                    ResponseValue::from_response(response).await?,
63937                )),
63938                502u16 => Err(Error::ErrorResponse(
63939                    ResponseValue::from_response(response).await?,
63940                )),
63941                503u16 => Err(Error::ErrorResponse(
63942                    ResponseValue::from_response(response).await?,
63943                )),
63944                _ => Err(Error::UnexpectedResponse(response)),
63945            }
63946        }
63947    }
63948    /**Builder for [`Client::export_solana_account_by_name`]
63949
63950    [`Client::export_solana_account_by_name`]: super::Client::export_solana_account_by_name*/
63951    #[derive(Debug, Clone)]
63952    pub struct ExportSolanaAccountByName<'a> {
63953        client: &'a super::Client,
63954        name: Result<::std::string::String, String>,
63955        x_idempotency_key: Result<Option<types::ExportSolanaAccountByNameXIdempotencyKey>, String>,
63956        x_wallet_auth: Result<::std::string::String, String>,
63957        body: Result<types::builder::ExportSolanaAccountByNameBody, String>,
63958    }
63959    impl<'a> ExportSolanaAccountByName<'a> {
63960        pub fn new(client: &'a super::Client) -> Self {
63961            Self {
63962                client: client,
63963                name: Err("name was not initialized".to_string()),
63964                x_idempotency_key: Ok(None),
63965                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
63966                body: Ok(::std::default::Default::default()),
63967            }
63968        }
63969        pub fn name<V>(mut self, value: V) -> Self
63970        where
63971            V: std::convert::TryInto<::std::string::String>,
63972        {
63973            self.name = value.try_into().map_err(|_| {
63974                "conversion to `:: std :: string :: String` for name failed".to_string()
63975            });
63976            self
63977        }
63978        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
63979        where
63980            V: std::convert::TryInto<types::ExportSolanaAccountByNameXIdempotencyKey>,
63981        {
63982            self.x_idempotency_key = value
63983                .try_into()
63984                .map(Some)
63985                .map_err(|_| {
63986                    "conversion to `ExportSolanaAccountByNameXIdempotencyKey` for x_idempotency_key failed"
63987                        .to_string()
63988                });
63989            self
63990        }
63991        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
63992        where
63993            V: std::convert::TryInto<::std::string::String>,
63994        {
63995            self.x_wallet_auth = value.try_into().map_err(|_| {
63996                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
63997            });
63998            self
63999        }
64000        pub fn body<V>(mut self, value: V) -> Self
64001        where
64002            V: std::convert::TryInto<types::ExportSolanaAccountByNameBody>,
64003            <V as std::convert::TryInto<types::ExportSolanaAccountByNameBody>>::Error:
64004                std::fmt::Display,
64005        {
64006            self.body = value.try_into().map(From::from).map_err(|s| {
64007                format!(
64008                    "conversion to `ExportSolanaAccountByNameBody` for body failed: {}",
64009                    s
64010                )
64011            });
64012            self
64013        }
64014        pub fn body_map<F>(mut self, f: F) -> Self
64015        where
64016            F: std::ops::FnOnce(
64017                types::builder::ExportSolanaAccountByNameBody,
64018            ) -> types::builder::ExportSolanaAccountByNameBody,
64019        {
64020            self.body = self.body.map(f);
64021            self
64022        }
64023        ///Sends a `POST` request to `/v2/solana/accounts/export/by-name/{name}`
64024        pub async fn send(
64025            self,
64026        ) -> Result<ResponseValue<types::ExportSolanaAccountByNameResponse>, Error<types::Error>>
64027        {
64028            let Self {
64029                client,
64030                name,
64031                x_idempotency_key,
64032                x_wallet_auth,
64033                body,
64034            } = self;
64035            let name = name.map_err(Error::InvalidRequest)?;
64036            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
64037            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
64038            let body = body
64039                .and_then(|v| {
64040                    types::ExportSolanaAccountByNameBody::try_from(v).map_err(|e| e.to_string())
64041                })
64042                .map_err(Error::InvalidRequest)?;
64043            let url = format!(
64044                "{}/v2/solana/accounts/export/by-name/{}",
64045                client.baseurl,
64046                encode_path(&name.to_string()),
64047            );
64048            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
64049            header_map.append(
64050                ::reqwest::header::HeaderName::from_static("api-version"),
64051                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
64052            );
64053            if let Some(value) = x_idempotency_key {
64054                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
64055            }
64056            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
64057            #[allow(unused_mut)]
64058            let mut request = client
64059                .client
64060                .post(url)
64061                .header(
64062                    ::reqwest::header::ACCEPT,
64063                    ::reqwest::header::HeaderValue::from_static("application/json"),
64064                )
64065                .json(&body)
64066                .headers(header_map)
64067                .build()?;
64068            let info = OperationInfo {
64069                operation_id: "export_solana_account_by_name",
64070            };
64071            client.pre(&mut request, &info).await?;
64072            let result = client.exec(request, &info).await;
64073            client.post(&result, &info).await?;
64074            let response = result?;
64075            match response.status().as_u16() {
64076                200u16 => ResponseValue::from_response(response).await,
64077                400u16 => Err(Error::ErrorResponse(
64078                    ResponseValue::from_response(response).await?,
64079                )),
64080                401u16 => Err(Error::ErrorResponse(
64081                    ResponseValue::from_response(response).await?,
64082                )),
64083                402u16 => Err(Error::ErrorResponse(
64084                    ResponseValue::from_response(response).await?,
64085                )),
64086                404u16 => Err(Error::ErrorResponse(
64087                    ResponseValue::from_response(response).await?,
64088                )),
64089                422u16 => Err(Error::ErrorResponse(
64090                    ResponseValue::from_response(response).await?,
64091                )),
64092                500u16 => Err(Error::ErrorResponse(
64093                    ResponseValue::from_response(response).await?,
64094                )),
64095                502u16 => Err(Error::ErrorResponse(
64096                    ResponseValue::from_response(response).await?,
64097                )),
64098                503u16 => Err(Error::ErrorResponse(
64099                    ResponseValue::from_response(response).await?,
64100                )),
64101                _ => Err(Error::UnexpectedResponse(response)),
64102            }
64103        }
64104    }
64105    /**Builder for [`Client::import_solana_account`]
64106
64107    [`Client::import_solana_account`]: super::Client::import_solana_account*/
64108    #[derive(Debug, Clone)]
64109    pub struct ImportSolanaAccount<'a> {
64110        client: &'a super::Client,
64111        x_idempotency_key: Result<Option<types::ImportSolanaAccountXIdempotencyKey>, String>,
64112        x_wallet_auth: Result<::std::string::String, String>,
64113        body: Result<types::builder::ImportSolanaAccountBody, String>,
64114    }
64115    impl<'a> ImportSolanaAccount<'a> {
64116        pub fn new(client: &'a super::Client) -> Self {
64117            Self {
64118                client: client,
64119                x_idempotency_key: Ok(None),
64120                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
64121                body: Ok(::std::default::Default::default()),
64122            }
64123        }
64124        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
64125        where
64126            V: std::convert::TryInto<types::ImportSolanaAccountXIdempotencyKey>,
64127        {
64128            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
64129                "conversion to `ImportSolanaAccountXIdempotencyKey` for x_idempotency_key failed"
64130                    .to_string()
64131            });
64132            self
64133        }
64134        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
64135        where
64136            V: std::convert::TryInto<::std::string::String>,
64137        {
64138            self.x_wallet_auth = value.try_into().map_err(|_| {
64139                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
64140            });
64141            self
64142        }
64143        pub fn body<V>(mut self, value: V) -> Self
64144        where
64145            V: std::convert::TryInto<types::ImportSolanaAccountBody>,
64146            <V as std::convert::TryInto<types::ImportSolanaAccountBody>>::Error: std::fmt::Display,
64147        {
64148            self.body = value.try_into().map(From::from).map_err(|s| {
64149                format!(
64150                    "conversion to `ImportSolanaAccountBody` for body failed: {}",
64151                    s
64152                )
64153            });
64154            self
64155        }
64156        pub fn body_map<F>(mut self, f: F) -> Self
64157        where
64158            F: std::ops::FnOnce(
64159                types::builder::ImportSolanaAccountBody,
64160            ) -> types::builder::ImportSolanaAccountBody,
64161        {
64162            self.body = self.body.map(f);
64163            self
64164        }
64165        ///Sends a `POST` request to `/v2/solana/accounts/import`
64166        pub async fn send(
64167            self,
64168        ) -> Result<ResponseValue<types::SolanaAccount>, Error<types::Error>> {
64169            let Self {
64170                client,
64171                x_idempotency_key,
64172                x_wallet_auth,
64173                body,
64174            } = self;
64175            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
64176            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
64177            let body = body
64178                .and_then(|v| {
64179                    types::ImportSolanaAccountBody::try_from(v).map_err(|e| e.to_string())
64180                })
64181                .map_err(Error::InvalidRequest)?;
64182            let url = format!("{}/v2/solana/accounts/import", client.baseurl,);
64183            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
64184            header_map.append(
64185                ::reqwest::header::HeaderName::from_static("api-version"),
64186                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
64187            );
64188            if let Some(value) = x_idempotency_key {
64189                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
64190            }
64191            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
64192            #[allow(unused_mut)]
64193            let mut request = client
64194                .client
64195                .post(url)
64196                .header(
64197                    ::reqwest::header::ACCEPT,
64198                    ::reqwest::header::HeaderValue::from_static("application/json"),
64199                )
64200                .json(&body)
64201                .headers(header_map)
64202                .build()?;
64203            let info = OperationInfo {
64204                operation_id: "import_solana_account",
64205            };
64206            client.pre(&mut request, &info).await?;
64207            let result = client.exec(request, &info).await;
64208            client.post(&result, &info).await?;
64209            let response = result?;
64210            match response.status().as_u16() {
64211                201u16 => ResponseValue::from_response(response).await,
64212                400u16 => Err(Error::ErrorResponse(
64213                    ResponseValue::from_response(response).await?,
64214                )),
64215                401u16 => Err(Error::ErrorResponse(
64216                    ResponseValue::from_response(response).await?,
64217                )),
64218                402u16 => Err(Error::ErrorResponse(
64219                    ResponseValue::from_response(response).await?,
64220                )),
64221                409u16 => Err(Error::ErrorResponse(
64222                    ResponseValue::from_response(response).await?,
64223                )),
64224                422u16 => Err(Error::ErrorResponse(
64225                    ResponseValue::from_response(response).await?,
64226                )),
64227                500u16 => Err(Error::ErrorResponse(
64228                    ResponseValue::from_response(response).await?,
64229                )),
64230                502u16 => Err(Error::ErrorResponse(
64231                    ResponseValue::from_response(response).await?,
64232                )),
64233                503u16 => Err(Error::ErrorResponse(
64234                    ResponseValue::from_response(response).await?,
64235                )),
64236                _ => Err(Error::UnexpectedResponse(response)),
64237            }
64238        }
64239    }
64240    /**Builder for [`Client::send_solana_transaction`]
64241
64242    [`Client::send_solana_transaction`]: super::Client::send_solana_transaction*/
64243    #[derive(Debug, Clone)]
64244    pub struct SendSolanaTransaction<'a> {
64245        client: &'a super::Client,
64246        x_idempotency_key: Result<Option<types::SendSolanaTransactionXIdempotencyKey>, String>,
64247        x_wallet_auth: Result<::std::string::String, String>,
64248        body: Result<types::builder::SendSolanaTransactionBody, String>,
64249    }
64250    impl<'a> SendSolanaTransaction<'a> {
64251        pub fn new(client: &'a super::Client) -> Self {
64252            Self {
64253                client: client,
64254                x_idempotency_key: Ok(None),
64255                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
64256                body: Ok(::std::default::Default::default()),
64257            }
64258        }
64259        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
64260        where
64261            V: std::convert::TryInto<types::SendSolanaTransactionXIdempotencyKey>,
64262        {
64263            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
64264                "conversion to `SendSolanaTransactionXIdempotencyKey` for x_idempotency_key failed"
64265                    .to_string()
64266            });
64267            self
64268        }
64269        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
64270        where
64271            V: std::convert::TryInto<::std::string::String>,
64272        {
64273            self.x_wallet_auth = value.try_into().map_err(|_| {
64274                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
64275            });
64276            self
64277        }
64278        pub fn body<V>(mut self, value: V) -> Self
64279        where
64280            V: std::convert::TryInto<types::SendSolanaTransactionBody>,
64281            <V as std::convert::TryInto<types::SendSolanaTransactionBody>>::Error:
64282                std::fmt::Display,
64283        {
64284            self.body = value.try_into().map(From::from).map_err(|s| {
64285                format!(
64286                    "conversion to `SendSolanaTransactionBody` for body failed: {}",
64287                    s
64288                )
64289            });
64290            self
64291        }
64292        pub fn body_map<F>(mut self, f: F) -> Self
64293        where
64294            F: std::ops::FnOnce(
64295                types::builder::SendSolanaTransactionBody,
64296            ) -> types::builder::SendSolanaTransactionBody,
64297        {
64298            self.body = self.body.map(f);
64299            self
64300        }
64301        ///Sends a `POST` request to `/v2/solana/accounts/send/transaction`
64302        pub async fn send(
64303            self,
64304        ) -> Result<ResponseValue<types::SendSolanaTransactionResponse>, Error<types::Error>>
64305        {
64306            let Self {
64307                client,
64308                x_idempotency_key,
64309                x_wallet_auth,
64310                body,
64311            } = self;
64312            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
64313            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
64314            let body = body
64315                .and_then(|v| {
64316                    types::SendSolanaTransactionBody::try_from(v).map_err(|e| e.to_string())
64317                })
64318                .map_err(Error::InvalidRequest)?;
64319            let url = format!("{}/v2/solana/accounts/send/transaction", client.baseurl,);
64320            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
64321            header_map.append(
64322                ::reqwest::header::HeaderName::from_static("api-version"),
64323                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
64324            );
64325            if let Some(value) = x_idempotency_key {
64326                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
64327            }
64328            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
64329            #[allow(unused_mut)]
64330            let mut request = client
64331                .client
64332                .post(url)
64333                .header(
64334                    ::reqwest::header::ACCEPT,
64335                    ::reqwest::header::HeaderValue::from_static("application/json"),
64336                )
64337                .json(&body)
64338                .headers(header_map)
64339                .build()?;
64340            let info = OperationInfo {
64341                operation_id: "send_solana_transaction",
64342            };
64343            client.pre(&mut request, &info).await?;
64344            let result = client.exec(request, &info).await;
64345            client.post(&result, &info).await?;
64346            let response = result?;
64347            match response.status().as_u16() {
64348                200u16 => ResponseValue::from_response(response).await,
64349                400u16 => Err(Error::ErrorResponse(
64350                    ResponseValue::from_response(response).await?,
64351                )),
64352                401u16 => Err(Error::ErrorResponse(
64353                    ResponseValue::from_response(response).await?,
64354                )),
64355                402u16 => Err(Error::ErrorResponse(
64356                    ResponseValue::from_response(response).await?,
64357                )),
64358                403u16 => Err(Error::ErrorResponse(
64359                    ResponseValue::from_response(response).await?,
64360                )),
64361                404u16 => Err(Error::ErrorResponse(
64362                    ResponseValue::from_response(response).await?,
64363                )),
64364                422u16 => Err(Error::ErrorResponse(
64365                    ResponseValue::from_response(response).await?,
64366                )),
64367                500u16 => Err(Error::ErrorResponse(
64368                    ResponseValue::from_response(response).await?,
64369                )),
64370                502u16 => Err(Error::ErrorResponse(
64371                    ResponseValue::from_response(response).await?,
64372                )),
64373                503u16 => Err(Error::ErrorResponse(
64374                    ResponseValue::from_response(response).await?,
64375                )),
64376                _ => Err(Error::UnexpectedResponse(response)),
64377            }
64378        }
64379    }
64380    /**Builder for [`Client::get_solana_account`]
64381
64382    [`Client::get_solana_account`]: super::Client::get_solana_account*/
64383    #[derive(Debug, Clone)]
64384    pub struct GetSolanaAccount<'a> {
64385        client: &'a super::Client,
64386        address: Result<types::GetSolanaAccountAddress, String>,
64387    }
64388    impl<'a> GetSolanaAccount<'a> {
64389        pub fn new(client: &'a super::Client) -> Self {
64390            Self {
64391                client: client,
64392                address: Err("address was not initialized".to_string()),
64393            }
64394        }
64395        pub fn address<V>(mut self, value: V) -> Self
64396        where
64397            V: std::convert::TryInto<types::GetSolanaAccountAddress>,
64398        {
64399            self.address = value.try_into().map_err(|_| {
64400                "conversion to `GetSolanaAccountAddress` for address failed".to_string()
64401            });
64402            self
64403        }
64404        ///Sends a `GET` request to `/v2/solana/accounts/{address}`
64405        pub async fn send(
64406            self,
64407        ) -> Result<ResponseValue<types::SolanaAccount>, Error<types::Error>> {
64408            let Self { client, address } = self;
64409            let address = address.map_err(Error::InvalidRequest)?;
64410            let url = format!(
64411                "{}/v2/solana/accounts/{}",
64412                client.baseurl,
64413                encode_path(&address.to_string()),
64414            );
64415            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
64416            header_map.append(
64417                ::reqwest::header::HeaderName::from_static("api-version"),
64418                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
64419            );
64420            #[allow(unused_mut)]
64421            let mut request = client
64422                .client
64423                .get(url)
64424                .header(
64425                    ::reqwest::header::ACCEPT,
64426                    ::reqwest::header::HeaderValue::from_static("application/json"),
64427                )
64428                .headers(header_map)
64429                .build()?;
64430            let info = OperationInfo {
64431                operation_id: "get_solana_account",
64432            };
64433            client.pre(&mut request, &info).await?;
64434            let result = client.exec(request, &info).await;
64435            client.post(&result, &info).await?;
64436            let response = result?;
64437            match response.status().as_u16() {
64438                200u16 => ResponseValue::from_response(response).await,
64439                400u16 => Err(Error::ErrorResponse(
64440                    ResponseValue::from_response(response).await?,
64441                )),
64442                404u16 => Err(Error::ErrorResponse(
64443                    ResponseValue::from_response(response).await?,
64444                )),
64445                500u16 => Err(Error::ErrorResponse(
64446                    ResponseValue::from_response(response).await?,
64447                )),
64448                502u16 => Err(Error::ErrorResponse(
64449                    ResponseValue::from_response(response).await?,
64450                )),
64451                503u16 => Err(Error::ErrorResponse(
64452                    ResponseValue::from_response(response).await?,
64453                )),
64454                _ => Err(Error::UnexpectedResponse(response)),
64455            }
64456        }
64457    }
64458    /**Builder for [`Client::update_solana_account`]
64459
64460    [`Client::update_solana_account`]: super::Client::update_solana_account*/
64461    #[derive(Debug, Clone)]
64462    pub struct UpdateSolanaAccount<'a> {
64463        client: &'a super::Client,
64464        address: Result<types::UpdateSolanaAccountAddress, String>,
64465        x_idempotency_key: Result<Option<types::UpdateSolanaAccountXIdempotencyKey>, String>,
64466        body: Result<types::builder::UpdateSolanaAccountBody, String>,
64467    }
64468    impl<'a> UpdateSolanaAccount<'a> {
64469        pub fn new(client: &'a super::Client) -> Self {
64470            Self {
64471                client: client,
64472                address: Err("address was not initialized".to_string()),
64473                x_idempotency_key: Ok(None),
64474                body: Ok(::std::default::Default::default()),
64475            }
64476        }
64477        pub fn address<V>(mut self, value: V) -> Self
64478        where
64479            V: std::convert::TryInto<types::UpdateSolanaAccountAddress>,
64480        {
64481            self.address = value.try_into().map_err(|_| {
64482                "conversion to `UpdateSolanaAccountAddress` for address failed".to_string()
64483            });
64484            self
64485        }
64486        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
64487        where
64488            V: std::convert::TryInto<types::UpdateSolanaAccountXIdempotencyKey>,
64489        {
64490            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
64491                "conversion to `UpdateSolanaAccountXIdempotencyKey` for x_idempotency_key failed"
64492                    .to_string()
64493            });
64494            self
64495        }
64496        pub fn body<V>(mut self, value: V) -> Self
64497        where
64498            V: std::convert::TryInto<types::UpdateSolanaAccountBody>,
64499            <V as std::convert::TryInto<types::UpdateSolanaAccountBody>>::Error: std::fmt::Display,
64500        {
64501            self.body = value.try_into().map(From::from).map_err(|s| {
64502                format!(
64503                    "conversion to `UpdateSolanaAccountBody` for body failed: {}",
64504                    s
64505                )
64506            });
64507            self
64508        }
64509        pub fn body_map<F>(mut self, f: F) -> Self
64510        where
64511            F: std::ops::FnOnce(
64512                types::builder::UpdateSolanaAccountBody,
64513            ) -> types::builder::UpdateSolanaAccountBody,
64514        {
64515            self.body = self.body.map(f);
64516            self
64517        }
64518        ///Sends a `PUT` request to `/v2/solana/accounts/{address}`
64519        pub async fn send(
64520            self,
64521        ) -> Result<ResponseValue<types::SolanaAccount>, Error<types::Error>> {
64522            let Self {
64523                client,
64524                address,
64525                x_idempotency_key,
64526                body,
64527            } = self;
64528            let address = address.map_err(Error::InvalidRequest)?;
64529            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
64530            let body = body
64531                .and_then(|v| {
64532                    types::UpdateSolanaAccountBody::try_from(v).map_err(|e| e.to_string())
64533                })
64534                .map_err(Error::InvalidRequest)?;
64535            let url = format!(
64536                "{}/v2/solana/accounts/{}",
64537                client.baseurl,
64538                encode_path(&address.to_string()),
64539            );
64540            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
64541            header_map.append(
64542                ::reqwest::header::HeaderName::from_static("api-version"),
64543                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
64544            );
64545            if let Some(value) = x_idempotency_key {
64546                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
64547            }
64548            #[allow(unused_mut)]
64549            let mut request = client
64550                .client
64551                .put(url)
64552                .header(
64553                    ::reqwest::header::ACCEPT,
64554                    ::reqwest::header::HeaderValue::from_static("application/json"),
64555                )
64556                .json(&body)
64557                .headers(header_map)
64558                .build()?;
64559            let info = OperationInfo {
64560                operation_id: "update_solana_account",
64561            };
64562            client.pre(&mut request, &info).await?;
64563            let result = client.exec(request, &info).await;
64564            client.post(&result, &info).await?;
64565            let response = result?;
64566            match response.status().as_u16() {
64567                200u16 => ResponseValue::from_response(response).await,
64568                400u16 => Err(Error::ErrorResponse(
64569                    ResponseValue::from_response(response).await?,
64570                )),
64571                404u16 => Err(Error::ErrorResponse(
64572                    ResponseValue::from_response(response).await?,
64573                )),
64574                409u16 => Err(Error::ErrorResponse(
64575                    ResponseValue::from_response(response).await?,
64576                )),
64577                422u16 => Err(Error::ErrorResponse(
64578                    ResponseValue::from_response(response).await?,
64579                )),
64580                500u16 => Err(Error::ErrorResponse(
64581                    ResponseValue::from_response(response).await?,
64582                )),
64583                502u16 => Err(Error::ErrorResponse(
64584                    ResponseValue::from_response(response).await?,
64585                )),
64586                503u16 => Err(Error::ErrorResponse(
64587                    ResponseValue::from_response(response).await?,
64588                )),
64589                _ => Err(Error::UnexpectedResponse(response)),
64590            }
64591        }
64592    }
64593    /**Builder for [`Client::export_solana_account`]
64594
64595    [`Client::export_solana_account`]: super::Client::export_solana_account*/
64596    #[derive(Debug, Clone)]
64597    pub struct ExportSolanaAccount<'a> {
64598        client: &'a super::Client,
64599        address: Result<types::ExportSolanaAccountAddress, String>,
64600        x_idempotency_key: Result<Option<types::ExportSolanaAccountXIdempotencyKey>, String>,
64601        x_wallet_auth: Result<::std::string::String, String>,
64602        body: Result<types::builder::ExportSolanaAccountBody, String>,
64603    }
64604    impl<'a> ExportSolanaAccount<'a> {
64605        pub fn new(client: &'a super::Client) -> Self {
64606            Self {
64607                client: client,
64608                address: Err("address was not initialized".to_string()),
64609                x_idempotency_key: Ok(None),
64610                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
64611                body: Ok(::std::default::Default::default()),
64612            }
64613        }
64614        pub fn address<V>(mut self, value: V) -> Self
64615        where
64616            V: std::convert::TryInto<types::ExportSolanaAccountAddress>,
64617        {
64618            self.address = value.try_into().map_err(|_| {
64619                "conversion to `ExportSolanaAccountAddress` for address failed".to_string()
64620            });
64621            self
64622        }
64623        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
64624        where
64625            V: std::convert::TryInto<types::ExportSolanaAccountXIdempotencyKey>,
64626        {
64627            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
64628                "conversion to `ExportSolanaAccountXIdempotencyKey` for x_idempotency_key failed"
64629                    .to_string()
64630            });
64631            self
64632        }
64633        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
64634        where
64635            V: std::convert::TryInto<::std::string::String>,
64636        {
64637            self.x_wallet_auth = value.try_into().map_err(|_| {
64638                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
64639            });
64640            self
64641        }
64642        pub fn body<V>(mut self, value: V) -> Self
64643        where
64644            V: std::convert::TryInto<types::ExportSolanaAccountBody>,
64645            <V as std::convert::TryInto<types::ExportSolanaAccountBody>>::Error: std::fmt::Display,
64646        {
64647            self.body = value.try_into().map(From::from).map_err(|s| {
64648                format!(
64649                    "conversion to `ExportSolanaAccountBody` for body failed: {}",
64650                    s
64651                )
64652            });
64653            self
64654        }
64655        pub fn body_map<F>(mut self, f: F) -> Self
64656        where
64657            F: std::ops::FnOnce(
64658                types::builder::ExportSolanaAccountBody,
64659            ) -> types::builder::ExportSolanaAccountBody,
64660        {
64661            self.body = self.body.map(f);
64662            self
64663        }
64664        ///Sends a `POST` request to `/v2/solana/accounts/{address}/export`
64665        pub async fn send(
64666            self,
64667        ) -> Result<ResponseValue<types::ExportSolanaAccountResponse>, Error<types::Error>>
64668        {
64669            let Self {
64670                client,
64671                address,
64672                x_idempotency_key,
64673                x_wallet_auth,
64674                body,
64675            } = self;
64676            let address = address.map_err(Error::InvalidRequest)?;
64677            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
64678            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
64679            let body = body
64680                .and_then(|v| {
64681                    types::ExportSolanaAccountBody::try_from(v).map_err(|e| e.to_string())
64682                })
64683                .map_err(Error::InvalidRequest)?;
64684            let url = format!(
64685                "{}/v2/solana/accounts/{}/export",
64686                client.baseurl,
64687                encode_path(&address.to_string()),
64688            );
64689            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
64690            header_map.append(
64691                ::reqwest::header::HeaderName::from_static("api-version"),
64692                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
64693            );
64694            if let Some(value) = x_idempotency_key {
64695                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
64696            }
64697            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
64698            #[allow(unused_mut)]
64699            let mut request = client
64700                .client
64701                .post(url)
64702                .header(
64703                    ::reqwest::header::ACCEPT,
64704                    ::reqwest::header::HeaderValue::from_static("application/json"),
64705                )
64706                .json(&body)
64707                .headers(header_map)
64708                .build()?;
64709            let info = OperationInfo {
64710                operation_id: "export_solana_account",
64711            };
64712            client.pre(&mut request, &info).await?;
64713            let result = client.exec(request, &info).await;
64714            client.post(&result, &info).await?;
64715            let response = result?;
64716            match response.status().as_u16() {
64717                200u16 => ResponseValue::from_response(response).await,
64718                400u16 => Err(Error::ErrorResponse(
64719                    ResponseValue::from_response(response).await?,
64720                )),
64721                401u16 => Err(Error::ErrorResponse(
64722                    ResponseValue::from_response(response).await?,
64723                )),
64724                402u16 => Err(Error::ErrorResponse(
64725                    ResponseValue::from_response(response).await?,
64726                )),
64727                404u16 => Err(Error::ErrorResponse(
64728                    ResponseValue::from_response(response).await?,
64729                )),
64730                422u16 => Err(Error::ErrorResponse(
64731                    ResponseValue::from_response(response).await?,
64732                )),
64733                500u16 => Err(Error::ErrorResponse(
64734                    ResponseValue::from_response(response).await?,
64735                )),
64736                502u16 => Err(Error::ErrorResponse(
64737                    ResponseValue::from_response(response).await?,
64738                )),
64739                503u16 => Err(Error::ErrorResponse(
64740                    ResponseValue::from_response(response).await?,
64741                )),
64742                _ => Err(Error::UnexpectedResponse(response)),
64743            }
64744        }
64745    }
64746    /**Builder for [`Client::sign_solana_message`]
64747
64748    [`Client::sign_solana_message`]: super::Client::sign_solana_message*/
64749    #[derive(Debug, Clone)]
64750    pub struct SignSolanaMessage<'a> {
64751        client: &'a super::Client,
64752        address: Result<types::SignSolanaMessageAddress, String>,
64753        x_idempotency_key: Result<Option<types::SignSolanaMessageXIdempotencyKey>, String>,
64754        x_wallet_auth: Result<::std::string::String, String>,
64755        body: Result<types::builder::SignSolanaMessageBody, String>,
64756    }
64757    impl<'a> SignSolanaMessage<'a> {
64758        pub fn new(client: &'a super::Client) -> Self {
64759            Self {
64760                client: client,
64761                address: Err("address was not initialized".to_string()),
64762                x_idempotency_key: Ok(None),
64763                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
64764                body: Ok(::std::default::Default::default()),
64765            }
64766        }
64767        pub fn address<V>(mut self, value: V) -> Self
64768        where
64769            V: std::convert::TryInto<types::SignSolanaMessageAddress>,
64770        {
64771            self.address = value.try_into().map_err(|_| {
64772                "conversion to `SignSolanaMessageAddress` for address failed".to_string()
64773            });
64774            self
64775        }
64776        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
64777        where
64778            V: std::convert::TryInto<types::SignSolanaMessageXIdempotencyKey>,
64779        {
64780            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
64781                "conversion to `SignSolanaMessageXIdempotencyKey` for x_idempotency_key failed"
64782                    .to_string()
64783            });
64784            self
64785        }
64786        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
64787        where
64788            V: std::convert::TryInto<::std::string::String>,
64789        {
64790            self.x_wallet_auth = value.try_into().map_err(|_| {
64791                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
64792            });
64793            self
64794        }
64795        pub fn body<V>(mut self, value: V) -> Self
64796        where
64797            V: std::convert::TryInto<types::SignSolanaMessageBody>,
64798            <V as std::convert::TryInto<types::SignSolanaMessageBody>>::Error: std::fmt::Display,
64799        {
64800            self.body = value.try_into().map(From::from).map_err(|s| {
64801                format!(
64802                    "conversion to `SignSolanaMessageBody` for body failed: {}",
64803                    s
64804                )
64805            });
64806            self
64807        }
64808        pub fn body_map<F>(mut self, f: F) -> Self
64809        where
64810            F: std::ops::FnOnce(
64811                types::builder::SignSolanaMessageBody,
64812            ) -> types::builder::SignSolanaMessageBody,
64813        {
64814            self.body = self.body.map(f);
64815            self
64816        }
64817        ///Sends a `POST` request to `/v2/solana/accounts/{address}/sign/message`
64818        pub async fn send(
64819            self,
64820        ) -> Result<ResponseValue<types::SignSolanaMessageResponse>, Error<types::Error>> {
64821            let Self {
64822                client,
64823                address,
64824                x_idempotency_key,
64825                x_wallet_auth,
64826                body,
64827            } = self;
64828            let address = address.map_err(Error::InvalidRequest)?;
64829            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
64830            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
64831            let body = body
64832                .and_then(|v| types::SignSolanaMessageBody::try_from(v).map_err(|e| e.to_string()))
64833                .map_err(Error::InvalidRequest)?;
64834            let url = format!(
64835                "{}/v2/solana/accounts/{}/sign/message",
64836                client.baseurl,
64837                encode_path(&address.to_string()),
64838            );
64839            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
64840            header_map.append(
64841                ::reqwest::header::HeaderName::from_static("api-version"),
64842                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
64843            );
64844            if let Some(value) = x_idempotency_key {
64845                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
64846            }
64847            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
64848            #[allow(unused_mut)]
64849            let mut request = client
64850                .client
64851                .post(url)
64852                .header(
64853                    ::reqwest::header::ACCEPT,
64854                    ::reqwest::header::HeaderValue::from_static("application/json"),
64855                )
64856                .json(&body)
64857                .headers(header_map)
64858                .build()?;
64859            let info = OperationInfo {
64860                operation_id: "sign_solana_message",
64861            };
64862            client.pre(&mut request, &info).await?;
64863            let result = client.exec(request, &info).await;
64864            client.post(&result, &info).await?;
64865            let response = result?;
64866            match response.status().as_u16() {
64867                200u16 => ResponseValue::from_response(response).await,
64868                400u16 => Err(Error::ErrorResponse(
64869                    ResponseValue::from_response(response).await?,
64870                )),
64871                401u16 => Err(Error::ErrorResponse(
64872                    ResponseValue::from_response(response).await?,
64873                )),
64874                402u16 => Err(Error::ErrorResponse(
64875                    ResponseValue::from_response(response).await?,
64876                )),
64877                404u16 => Err(Error::ErrorResponse(
64878                    ResponseValue::from_response(response).await?,
64879                )),
64880                409u16 => Err(Error::ErrorResponse(
64881                    ResponseValue::from_response(response).await?,
64882                )),
64883                422u16 => Err(Error::ErrorResponse(
64884                    ResponseValue::from_response(response).await?,
64885                )),
64886                500u16 => Err(Error::ErrorResponse(
64887                    ResponseValue::from_response(response).await?,
64888                )),
64889                502u16 => Err(Error::ErrorResponse(
64890                    ResponseValue::from_response(response).await?,
64891                )),
64892                503u16 => Err(Error::ErrorResponse(
64893                    ResponseValue::from_response(response).await?,
64894                )),
64895                _ => Err(Error::UnexpectedResponse(response)),
64896            }
64897        }
64898    }
64899    /**Builder for [`Client::sign_solana_transaction`]
64900
64901    [`Client::sign_solana_transaction`]: super::Client::sign_solana_transaction*/
64902    #[derive(Debug, Clone)]
64903    pub struct SignSolanaTransaction<'a> {
64904        client: &'a super::Client,
64905        address: Result<types::SignSolanaTransactionAddress, String>,
64906        x_idempotency_key: Result<Option<types::SignSolanaTransactionXIdempotencyKey>, String>,
64907        x_wallet_auth: Result<::std::string::String, String>,
64908        body: Result<types::builder::SignSolanaTransactionBody, String>,
64909    }
64910    impl<'a> SignSolanaTransaction<'a> {
64911        pub fn new(client: &'a super::Client) -> Self {
64912            Self {
64913                client: client,
64914                address: Err("address was not initialized".to_string()),
64915                x_idempotency_key: Ok(None),
64916                x_wallet_auth: Err("x_wallet_auth was not initialized".to_string()),
64917                body: Ok(::std::default::Default::default()),
64918            }
64919        }
64920        pub fn address<V>(mut self, value: V) -> Self
64921        where
64922            V: std::convert::TryInto<types::SignSolanaTransactionAddress>,
64923        {
64924            self.address = value.try_into().map_err(|_| {
64925                "conversion to `SignSolanaTransactionAddress` for address failed".to_string()
64926            });
64927            self
64928        }
64929        pub fn x_idempotency_key<V>(mut self, value: V) -> Self
64930        where
64931            V: std::convert::TryInto<types::SignSolanaTransactionXIdempotencyKey>,
64932        {
64933            self.x_idempotency_key = value.try_into().map(Some).map_err(|_| {
64934                "conversion to `SignSolanaTransactionXIdempotencyKey` for x_idempotency_key failed"
64935                    .to_string()
64936            });
64937            self
64938        }
64939        pub fn x_wallet_auth<V>(mut self, value: V) -> Self
64940        where
64941            V: std::convert::TryInto<::std::string::String>,
64942        {
64943            self.x_wallet_auth = value.try_into().map_err(|_| {
64944                "conversion to `:: std :: string :: String` for x_wallet_auth failed".to_string()
64945            });
64946            self
64947        }
64948        pub fn body<V>(mut self, value: V) -> Self
64949        where
64950            V: std::convert::TryInto<types::SignSolanaTransactionBody>,
64951            <V as std::convert::TryInto<types::SignSolanaTransactionBody>>::Error:
64952                std::fmt::Display,
64953        {
64954            self.body = value.try_into().map(From::from).map_err(|s| {
64955                format!(
64956                    "conversion to `SignSolanaTransactionBody` for body failed: {}",
64957                    s
64958                )
64959            });
64960            self
64961        }
64962        pub fn body_map<F>(mut self, f: F) -> Self
64963        where
64964            F: std::ops::FnOnce(
64965                types::builder::SignSolanaTransactionBody,
64966            ) -> types::builder::SignSolanaTransactionBody,
64967        {
64968            self.body = self.body.map(f);
64969            self
64970        }
64971        ///Sends a `POST` request to `/v2/solana/accounts/{address}/sign/transaction`
64972        pub async fn send(
64973            self,
64974        ) -> Result<ResponseValue<types::SignSolanaTransactionResponse>, Error<types::Error>>
64975        {
64976            let Self {
64977                client,
64978                address,
64979                x_idempotency_key,
64980                x_wallet_auth,
64981                body,
64982            } = self;
64983            let address = address.map_err(Error::InvalidRequest)?;
64984            let x_idempotency_key = x_idempotency_key.map_err(Error::InvalidRequest)?;
64985            let x_wallet_auth = x_wallet_auth.map_err(Error::InvalidRequest)?;
64986            let body = body
64987                .and_then(|v| {
64988                    types::SignSolanaTransactionBody::try_from(v).map_err(|e| e.to_string())
64989                })
64990                .map_err(Error::InvalidRequest)?;
64991            let url = format!(
64992                "{}/v2/solana/accounts/{}/sign/transaction",
64993                client.baseurl,
64994                encode_path(&address.to_string()),
64995            );
64996            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(3usize);
64997            header_map.append(
64998                ::reqwest::header::HeaderName::from_static("api-version"),
64999                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
65000            );
65001            if let Some(value) = x_idempotency_key {
65002                header_map.append("X-Idempotency-Key", value.to_string().try_into()?);
65003            }
65004            header_map.append("X-Wallet-Auth", x_wallet_auth.to_string().try_into()?);
65005            #[allow(unused_mut)]
65006            let mut request = client
65007                .client
65008                .post(url)
65009                .header(
65010                    ::reqwest::header::ACCEPT,
65011                    ::reqwest::header::HeaderValue::from_static("application/json"),
65012                )
65013                .json(&body)
65014                .headers(header_map)
65015                .build()?;
65016            let info = OperationInfo {
65017                operation_id: "sign_solana_transaction",
65018            };
65019            client.pre(&mut request, &info).await?;
65020            let result = client.exec(request, &info).await;
65021            client.post(&result, &info).await?;
65022            let response = result?;
65023            match response.status().as_u16() {
65024                200u16 => ResponseValue::from_response(response).await,
65025                400u16 => Err(Error::ErrorResponse(
65026                    ResponseValue::from_response(response).await?,
65027                )),
65028                401u16 => Err(Error::ErrorResponse(
65029                    ResponseValue::from_response(response).await?,
65030                )),
65031                402u16 => Err(Error::ErrorResponse(
65032                    ResponseValue::from_response(response).await?,
65033                )),
65034                403u16 => Err(Error::ErrorResponse(
65035                    ResponseValue::from_response(response).await?,
65036                )),
65037                404u16 => Err(Error::ErrorResponse(
65038                    ResponseValue::from_response(response).await?,
65039                )),
65040                409u16 => Err(Error::ErrorResponse(
65041                    ResponseValue::from_response(response).await?,
65042                )),
65043                422u16 => Err(Error::ErrorResponse(
65044                    ResponseValue::from_response(response).await?,
65045                )),
65046                500u16 => Err(Error::ErrorResponse(
65047                    ResponseValue::from_response(response).await?,
65048                )),
65049                502u16 => Err(Error::ErrorResponse(
65050                    ResponseValue::from_response(response).await?,
65051                )),
65052                503u16 => Err(Error::ErrorResponse(
65053                    ResponseValue::from_response(response).await?,
65054                )),
65055                _ => Err(Error::UnexpectedResponse(response)),
65056            }
65057        }
65058    }
65059    /**Builder for [`Client::request_solana_faucet`]
65060
65061    [`Client::request_solana_faucet`]: super::Client::request_solana_faucet*/
65062    #[derive(Debug, Clone)]
65063    pub struct RequestSolanaFaucet<'a> {
65064        client: &'a super::Client,
65065        body: Result<types::builder::RequestSolanaFaucetBody, String>,
65066    }
65067    impl<'a> RequestSolanaFaucet<'a> {
65068        pub fn new(client: &'a super::Client) -> Self {
65069            Self {
65070                client: client,
65071                body: Ok(::std::default::Default::default()),
65072            }
65073        }
65074        pub fn body<V>(mut self, value: V) -> Self
65075        where
65076            V: std::convert::TryInto<types::RequestSolanaFaucetBody>,
65077            <V as std::convert::TryInto<types::RequestSolanaFaucetBody>>::Error: std::fmt::Display,
65078        {
65079            self.body = value.try_into().map(From::from).map_err(|s| {
65080                format!(
65081                    "conversion to `RequestSolanaFaucetBody` for body failed: {}",
65082                    s
65083                )
65084            });
65085            self
65086        }
65087        pub fn body_map<F>(mut self, f: F) -> Self
65088        where
65089            F: std::ops::FnOnce(
65090                types::builder::RequestSolanaFaucetBody,
65091            ) -> types::builder::RequestSolanaFaucetBody,
65092        {
65093            self.body = self.body.map(f);
65094            self
65095        }
65096        ///Sends a `POST` request to `/v2/solana/faucet`
65097        pub async fn send(
65098            self,
65099        ) -> Result<ResponseValue<types::RequestSolanaFaucetResponse>, Error<types::Error>>
65100        {
65101            let Self { client, body } = self;
65102            let body = body
65103                .and_then(|v| {
65104                    types::RequestSolanaFaucetBody::try_from(v).map_err(|e| e.to_string())
65105                })
65106                .map_err(Error::InvalidRequest)?;
65107            let url = format!("{}/v2/solana/faucet", client.baseurl,);
65108            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
65109            header_map.append(
65110                ::reqwest::header::HeaderName::from_static("api-version"),
65111                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
65112            );
65113            #[allow(unused_mut)]
65114            let mut request = client
65115                .client
65116                .post(url)
65117                .header(
65118                    ::reqwest::header::ACCEPT,
65119                    ::reqwest::header::HeaderValue::from_static("application/json"),
65120                )
65121                .json(&body)
65122                .headers(header_map)
65123                .build()?;
65124            let info = OperationInfo {
65125                operation_id: "request_solana_faucet",
65126            };
65127            client.pre(&mut request, &info).await?;
65128            let result = client.exec(request, &info).await;
65129            client.post(&result, &info).await?;
65130            let response = result?;
65131            match response.status().as_u16() {
65132                200u16 => ResponseValue::from_response(response).await,
65133                400u16 => Err(Error::ErrorResponse(
65134                    ResponseValue::from_response(response).await?,
65135                )),
65136                403u16 => Err(Error::ErrorResponse(
65137                    ResponseValue::from_response(response).await?,
65138                )),
65139                429u16 => Err(Error::ErrorResponse(
65140                    ResponseValue::from_response(response).await?,
65141                )),
65142                500u16 => Err(Error::ErrorResponse(
65143                    ResponseValue::from_response(response).await?,
65144                )),
65145                502u16 => Err(Error::ErrorResponse(
65146                    ResponseValue::from_response(response).await?,
65147                )),
65148                503u16 => Err(Error::ErrorResponse(
65149                    ResponseValue::from_response(response).await?,
65150                )),
65151                _ => Err(Error::UnexpectedResponse(response)),
65152            }
65153        }
65154    }
65155    /**Builder for [`Client::list_solana_token_balances`]
65156
65157    [`Client::list_solana_token_balances`]: super::Client::list_solana_token_balances*/
65158    #[derive(Debug, Clone)]
65159    pub struct ListSolanaTokenBalances<'a> {
65160        client: &'a super::Client,
65161        network: Result<types::ListSolanaTokenBalancesNetwork, String>,
65162        address: Result<types::ListSolanaTokenBalancesAddress, String>,
65163        page_size: Result<Option<i64>, String>,
65164        page_token: Result<Option<::std::string::String>, String>,
65165    }
65166    impl<'a> ListSolanaTokenBalances<'a> {
65167        pub fn new(client: &'a super::Client) -> Self {
65168            Self {
65169                client: client,
65170                network: Err("network was not initialized".to_string()),
65171                address: Err("address was not initialized".to_string()),
65172                page_size: Ok(None),
65173                page_token: Ok(None),
65174            }
65175        }
65176        pub fn network<V>(mut self, value: V) -> Self
65177        where
65178            V: std::convert::TryInto<types::ListSolanaTokenBalancesNetwork>,
65179        {
65180            self.network = value.try_into().map_err(|_| {
65181                "conversion to `ListSolanaTokenBalancesNetwork` for network failed".to_string()
65182            });
65183            self
65184        }
65185        pub fn address<V>(mut self, value: V) -> Self
65186        where
65187            V: std::convert::TryInto<types::ListSolanaTokenBalancesAddress>,
65188        {
65189            self.address = value.try_into().map_err(|_| {
65190                "conversion to `ListSolanaTokenBalancesAddress` for address failed".to_string()
65191            });
65192            self
65193        }
65194        pub fn page_size<V>(mut self, value: V) -> Self
65195        where
65196            V: std::convert::TryInto<i64>,
65197        {
65198            self.page_size = value
65199                .try_into()
65200                .map(Some)
65201                .map_err(|_| "conversion to `i64` for page_size failed".to_string());
65202            self
65203        }
65204        pub fn page_token<V>(mut self, value: V) -> Self
65205        where
65206            V: std::convert::TryInto<::std::string::String>,
65207        {
65208            self.page_token = value.try_into().map(Some).map_err(|_| {
65209                "conversion to `:: std :: string :: String` for page_token failed".to_string()
65210            });
65211            self
65212        }
65213        ///Sends a `GET` request to `/v2/solana/token-balances/{network}/{address}`
65214        pub async fn send(
65215            self,
65216        ) -> Result<ResponseValue<types::ListSolanaTokenBalancesResponse>, Error<types::Error>>
65217        {
65218            let Self {
65219                client,
65220                network,
65221                address,
65222                page_size,
65223                page_token,
65224            } = self;
65225            let network = network.map_err(Error::InvalidRequest)?;
65226            let address = address.map_err(Error::InvalidRequest)?;
65227            let page_size = page_size.map_err(Error::InvalidRequest)?;
65228            let page_token = page_token.map_err(Error::InvalidRequest)?;
65229            let url = format!(
65230                "{}/v2/solana/token-balances/{}/{}",
65231                client.baseurl,
65232                encode_path(&network.to_string()),
65233                encode_path(&address.to_string()),
65234            );
65235            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
65236            header_map.append(
65237                ::reqwest::header::HeaderName::from_static("api-version"),
65238                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
65239            );
65240            #[allow(unused_mut)]
65241            let mut request = client
65242                .client
65243                .get(url)
65244                .header(
65245                    ::reqwest::header::ACCEPT,
65246                    ::reqwest::header::HeaderValue::from_static("application/json"),
65247                )
65248                .query(&progenitor_middleware_client::QueryParam::new(
65249                    "pageSize", &page_size,
65250                ))
65251                .query(&progenitor_middleware_client::QueryParam::new(
65252                    "pageToken",
65253                    &page_token,
65254                ))
65255                .headers(header_map)
65256                .build()?;
65257            let info = OperationInfo {
65258                operation_id: "list_solana_token_balances",
65259            };
65260            client.pre(&mut request, &info).await?;
65261            let result = client.exec(request, &info).await;
65262            client.post(&result, &info).await?;
65263            let response = result?;
65264            match response.status().as_u16() {
65265                200u16 => ResponseValue::from_response(response).await,
65266                400u16 => Err(Error::ErrorResponse(
65267                    ResponseValue::from_response(response).await?,
65268                )),
65269                404u16 => Err(Error::ErrorResponse(
65270                    ResponseValue::from_response(response).await?,
65271                )),
65272                500u16 => Err(Error::ErrorResponse(
65273                    ResponseValue::from_response(response).await?,
65274                )),
65275                502u16 => Err(Error::ErrorResponse(
65276                    ResponseValue::from_response(response).await?,
65277                )),
65278                503u16 => Err(Error::ErrorResponse(
65279                    ResponseValue::from_response(response).await?,
65280                )),
65281                _ => Err(Error::UnexpectedResponse(response)),
65282            }
65283        }
65284    }
65285    /**Builder for [`Client::settle_x402_payment`]
65286
65287    [`Client::settle_x402_payment`]: super::Client::settle_x402_payment*/
65288    #[derive(Debug, Clone)]
65289    pub struct SettleX402Payment<'a> {
65290        client: &'a super::Client,
65291        body: Result<types::builder::SettleX402PaymentBody, String>,
65292    }
65293    impl<'a> SettleX402Payment<'a> {
65294        pub fn new(client: &'a super::Client) -> Self {
65295            Self {
65296                client: client,
65297                body: Ok(::std::default::Default::default()),
65298            }
65299        }
65300        pub fn body<V>(mut self, value: V) -> Self
65301        where
65302            V: std::convert::TryInto<types::SettleX402PaymentBody>,
65303            <V as std::convert::TryInto<types::SettleX402PaymentBody>>::Error: std::fmt::Display,
65304        {
65305            self.body = value.try_into().map(From::from).map_err(|s| {
65306                format!(
65307                    "conversion to `SettleX402PaymentBody` for body failed: {}",
65308                    s
65309                )
65310            });
65311            self
65312        }
65313        pub fn body_map<F>(mut self, f: F) -> Self
65314        where
65315            F: std::ops::FnOnce(
65316                types::builder::SettleX402PaymentBody,
65317            ) -> types::builder::SettleX402PaymentBody,
65318        {
65319            self.body = self.body.map(f);
65320            self
65321        }
65322        ///Sends a `POST` request to `/v2/x402/settle`
65323        pub async fn send(
65324            self,
65325        ) -> Result<ResponseValue<types::SettleX402PaymentResponse>, Error<types::Error>> {
65326            let Self { client, body } = self;
65327            let body = body
65328                .and_then(|v| types::SettleX402PaymentBody::try_from(v).map_err(|e| e.to_string()))
65329                .map_err(Error::InvalidRequest)?;
65330            let url = format!("{}/v2/x402/settle", client.baseurl,);
65331            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
65332            header_map.append(
65333                ::reqwest::header::HeaderName::from_static("api-version"),
65334                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
65335            );
65336            #[allow(unused_mut)]
65337            let mut request = client
65338                .client
65339                .post(url)
65340                .header(
65341                    ::reqwest::header::ACCEPT,
65342                    ::reqwest::header::HeaderValue::from_static("application/json"),
65343                )
65344                .json(&body)
65345                .headers(header_map)
65346                .build()?;
65347            let info = OperationInfo {
65348                operation_id: "settle_x402_payment",
65349            };
65350            client.pre(&mut request, &info).await?;
65351            let result = client.exec(request, &info).await;
65352            client.post(&result, &info).await?;
65353            let response = result?;
65354            match response.status().as_u16() {
65355                200u16 => ResponseValue::from_response(response).await,
65356                400u16 => Err(Error::ErrorResponse(
65357                    ResponseValue::from_response(response).await?,
65358                )),
65359                500u16 => Err(Error::ErrorResponse(
65360                    ResponseValue::from_response(response).await?,
65361                )),
65362                502u16 => Err(Error::ErrorResponse(
65363                    ResponseValue::from_response(response).await?,
65364                )),
65365                503u16 => Err(Error::ErrorResponse(
65366                    ResponseValue::from_response(response).await?,
65367                )),
65368                _ => Err(Error::UnexpectedResponse(response)),
65369            }
65370        }
65371    }
65372    /**Builder for [`Client::supported_x402_payment_kinds`]
65373
65374    [`Client::supported_x402_payment_kinds`]: super::Client::supported_x402_payment_kinds*/
65375    #[derive(Debug, Clone)]
65376    pub struct SupportedX402PaymentKinds<'a> {
65377        client: &'a super::Client,
65378    }
65379    impl<'a> SupportedX402PaymentKinds<'a> {
65380        pub fn new(client: &'a super::Client) -> Self {
65381            Self { client: client }
65382        }
65383        ///Sends a `GET` request to `/v2/x402/supported`
65384        pub async fn send(
65385            self,
65386        ) -> Result<ResponseValue<types::SupportedX402PaymentKindsResponse>, Error<types::Error>>
65387        {
65388            let Self { client } = self;
65389            let url = format!("{}/v2/x402/supported", client.baseurl,);
65390            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
65391            header_map.append(
65392                ::reqwest::header::HeaderName::from_static("api-version"),
65393                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
65394            );
65395            #[allow(unused_mut)]
65396            let mut request = client
65397                .client
65398                .get(url)
65399                .header(
65400                    ::reqwest::header::ACCEPT,
65401                    ::reqwest::header::HeaderValue::from_static("application/json"),
65402                )
65403                .headers(header_map)
65404                .build()?;
65405            let info = OperationInfo {
65406                operation_id: "supported_x402_payment_kinds",
65407            };
65408            client.pre(&mut request, &info).await?;
65409            let result = client.exec(request, &info).await;
65410            client.post(&result, &info).await?;
65411            let response = result?;
65412            match response.status().as_u16() {
65413                200u16 => ResponseValue::from_response(response).await,
65414                500u16 => Err(Error::ErrorResponse(
65415                    ResponseValue::from_response(response).await?,
65416                )),
65417                502u16 => Err(Error::ErrorResponse(
65418                    ResponseValue::from_response(response).await?,
65419                )),
65420                503u16 => Err(Error::ErrorResponse(
65421                    ResponseValue::from_response(response).await?,
65422                )),
65423                _ => Err(Error::UnexpectedResponse(response)),
65424            }
65425        }
65426    }
65427    /**Builder for [`Client::verify_x402_payment`]
65428
65429    [`Client::verify_x402_payment`]: super::Client::verify_x402_payment*/
65430    #[derive(Debug, Clone)]
65431    pub struct VerifyX402Payment<'a> {
65432        client: &'a super::Client,
65433        body: Result<types::builder::VerifyX402PaymentBody, String>,
65434    }
65435    impl<'a> VerifyX402Payment<'a> {
65436        pub fn new(client: &'a super::Client) -> Self {
65437            Self {
65438                client: client,
65439                body: Ok(::std::default::Default::default()),
65440            }
65441        }
65442        pub fn body<V>(mut self, value: V) -> Self
65443        where
65444            V: std::convert::TryInto<types::VerifyX402PaymentBody>,
65445            <V as std::convert::TryInto<types::VerifyX402PaymentBody>>::Error: std::fmt::Display,
65446        {
65447            self.body = value.try_into().map(From::from).map_err(|s| {
65448                format!(
65449                    "conversion to `VerifyX402PaymentBody` for body failed: {}",
65450                    s
65451                )
65452            });
65453            self
65454        }
65455        pub fn body_map<F>(mut self, f: F) -> Self
65456        where
65457            F: std::ops::FnOnce(
65458                types::builder::VerifyX402PaymentBody,
65459            ) -> types::builder::VerifyX402PaymentBody,
65460        {
65461            self.body = self.body.map(f);
65462            self
65463        }
65464        ///Sends a `POST` request to `/v2/x402/verify`
65465        pub async fn send(
65466            self,
65467        ) -> Result<ResponseValue<types::VerifyX402PaymentResponse>, Error<types::Error>> {
65468            let Self { client, body } = self;
65469            let body = body
65470                .and_then(|v| types::VerifyX402PaymentBody::try_from(v).map_err(|e| e.to_string()))
65471                .map_err(Error::InvalidRequest)?;
65472            let url = format!("{}/v2/x402/verify", client.baseurl,);
65473            let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
65474            header_map.append(
65475                ::reqwest::header::HeaderName::from_static("api-version"),
65476                ::reqwest::header::HeaderValue::from_static(super::Client::api_version()),
65477            );
65478            #[allow(unused_mut)]
65479            let mut request = client
65480                .client
65481                .post(url)
65482                .header(
65483                    ::reqwest::header::ACCEPT,
65484                    ::reqwest::header::HeaderValue::from_static("application/json"),
65485                )
65486                .json(&body)
65487                .headers(header_map)
65488                .build()?;
65489            let info = OperationInfo {
65490                operation_id: "verify_x402_payment",
65491            };
65492            client.pre(&mut request, &info).await?;
65493            let result = client.exec(request, &info).await;
65494            client.post(&result, &info).await?;
65495            let response = result?;
65496            match response.status().as_u16() {
65497                200u16 => ResponseValue::from_response(response).await,
65498                400u16 => Err(Error::ErrorResponse(
65499                    ResponseValue::from_response(response).await?,
65500                )),
65501                500u16 => Err(Error::ErrorResponse(
65502                    ResponseValue::from_response(response).await?,
65503                )),
65504                502u16 => Err(Error::ErrorResponse(
65505                    ResponseValue::from_response(response).await?,
65506                )),
65507                503u16 => Err(Error::ErrorResponse(
65508                    ResponseValue::from_response(response).await?,
65509                )),
65510                _ => Err(Error::UnexpectedResponse(response)),
65511            }
65512        }
65513    }
65514}
65515/// Items consumers will typically use such as the Client.
65516pub mod prelude {
65517    pub use self::super::Client;
65518}