> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TypePropertiesBuilder

> TypePropertiesBuilder — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[avro\_schema\_builder](https://docs.kinetica.com/content/api/rust/avro_schema_builder/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L670-L672)&#x20;

<pre>`pub struct TypePropertiesBuilder { /* private fields */ }`</pre>

Builder for Kinetica type properties map

## Example

```rust theme={null}
use gpudb_api::avro_schema_builder::{TypePropertiesBuilder, KineticaColumnProperties};

let props = TypePropertiesBuilder::new()
    .column("id", KineticaColumnProperties::new().primary_key())
    .column("timestamp", KineticaColumnProperties::new().timestamp())
    .column("name", KineticaColumnProperties::new().char_n(64))
    .column("data", KineticaColumnProperties::new().data())
    .build();
```

## Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L674-L740)
impl [TypePropertiesBuilder](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L675-L677)
pub fn [new](#method.new)() -> Self

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L687-L693)
pub fn [column](#method.column)( self, name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, props: [KineticaColumnProperties](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.KineticaColumnProperties.md), ) -> Self

Adds column properties for the given column nameProperties accumulate: calling this (or [`column_property`](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder#method.column_property) or any shorthand such as [`primary_key`](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder#method.primary_key)) again for the same column appends to that column’s list rather than replacing it, so `.primary_key("id").shard_key("id")` yields `["primary_key", "shard_key"]`. A property already present on the column is not added a second time; the first-seen order is kept.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L699-L707)
pub fn [column\_property](#method.column_property)( self, name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, property: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, ) -> Self

Adds a single property for a columnAppends to the column’s existing properties (see [`column`](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder#method.column)); a property already present is not repeated.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L717-L719)
pub fn [primary\_key](#method.primary_key)(self, name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) -> Self

Shorthand: marks a column as primary key

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L722-L724)
pub fn [timestamp](#method.timestamp)(self, name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) -> Self

Shorthand: marks a column as timestamp

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L727-L729)
pub fn [data](#method.data)(self, name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) -> Self

Shorthand: marks a column as data

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L732-L734)
pub fn [shard\_key](#method.shard_key)(self, name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) -> Self

Shorthand: marks a column as shard key

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L737-L739)
pub fn [build](#method.build)(self) -> [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>>

Builds the HashMap expected by Kinetica APIs

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L669)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [TypePropertiesBuilder](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L669)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [TypePropertiesBuilder](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder.md)

Returns a duplicate of the value. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/142757)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/clone.rs.html#245-247)
fn [clone\_from](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)(\&mut self, source: \&Self)

Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L669)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [TypePropertiesBuilder](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L669)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L669)
impl [Default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html) for [TypePropertiesBuilder](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/avro_schema_builder.rs#L669)
fn [default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)() -> [TypePropertiesBuilder](https://docs.kinetica.com/content/api/rust/avro_schema_builder/struct.TypePropertiesBuilder.md)

Returns the “default value” for a type. [Read more](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.