# OData Complex Types In the event an Entity Type definition uses a complex type, then the complex type is first created as a Rust `struct`. The naming convention for a complex type is the Schema namespace followed by a dot `.` then the complex type name to which the prefix `CT_` has been added. E.G. In the `BusinessPartner` entity type, the `Address` property is the complex type `GWSAMPLE_BASIC.CT_Address`. ```xml ``` This refers to the `` definition: ```xml ``` So the above XML complex type definition is transformed into the following Rust `struct`: ```rust #[derive(Clone, Debug, Default)] pub struct CtAddress { pub address_type: Option, pub building: Option, pub city: Option, pub country: Option, pub postal_code: Option, pub street: Option, } ``` Then the `` for `BusinessPartner` is translated into the following Rust `struct` ```rust pub struct BusinessPartner { pub address: CtAddress, pub business_partner_id: String, //SNIP } ``` --- ## OData "Simple" Complex Types The metadata for the `GWSAMPLE_BASIC` OData service also contains the following complex type: ```xml ``` This particular type turns out not to be complex at all because it contains a single field of type `Edm.String`. Since this is directly equivalent to a standard Rust `String`, it would be redundant to wrap a single Rust `String` inside a `struct`. Therefore, these "simple" complex types are ignored, and the corresponding `` field is declared simply as the equivalent Rust type.