[][src]Struct nakadi_types::event_type::EventTypeInputBuilder

pub struct EventTypeInputBuilder {
    pub name: Option<EventTypeName>,
    pub owning_application: Option<OwningApplication>,
    pub category: Option<Category>,
    pub enrichment_strategies: Option<Vec<EnrichmentStrategy>>,
    pub partition_strategy: Option<PartitionStrategy>,
    pub partition_key_fields: Option<PartitionKeyFields>,
    pub compatibility_mode: Option<CompatibilityMode>,
    pub schema: Option<EventTypeSchemaInput>,
    pub cleanup_policy: Option<CleanupPolicy>,
    pub default_statistic: Option<EventTypeStatistics>,
    pub options: Option<EventTypeOptions>,
    pub authorization: Option<EventTypeAuthorization>,
    pub audience: Option<EventTypeAudience>,
}

Fields

name: Option<EventTypeName>

Name of this EventType. The name is constrained by a regular expression.

Note: the name can encode the owner/responsible for this EventType and ideally should follow a common pattern that makes it easy to read and understand, but this level of structure is not enforced. For example a team name and data type can be used such as ‘acme-team.price-change’.

owning_application: Option<OwningApplication>

Indicator of the application owning this EventType.

category: Option<Category>

Defines the category of this EventType.

The value set will influence, if not set otherwise, the default set of validations, enrichment-strategies, and the effective schema for validation.

enrichment_strategies: Option<Vec<EnrichmentStrategy>>

Determines the enrichment to be performed on an Event upon reception. Enrichment is performed once upon reception (and after validation) of an Event and is only possible on fields that are not defined on the incoming Event.

For event types in categories ‘business’ or ‘data’ it’s mandatory to use metadata_enrichment strategy. For ‘undefined’ event types it’s not possible to use this strategy, since metadata field is not required.

See documentation for the write operation for details on behaviour in case of unsuccessful enrichment.

partition_strategy: Option<PartitionStrategy>

Determines how the assignment of the event to a partition should be handled.

partition_key_fields: Option<PartitionKeyFields>

Required when ‘partition_resolution_strategy’ is set to ‘hash’. Must be absent otherwise. Indicates the fields used for evaluation the partition of Events of this type.

If this is set it MUST be a valid required field as defined in the schema.

compatibility_mode: Option<CompatibilityMode>

Compatibility mode provides a mean for event owners to evolve their schema, given changes respect the semantics defined by this field.

It’s designed to be flexible enough so that producers can evolve their schemas while not inadvertently breaking existent consumers.

Once defined, the compatibility mode is fixed, since otherwise it would break a predefined contract, declared by the producer.

schema: Option<EventTypeSchemaInput>cleanup_policy: Option<CleanupPolicy>

Event type cleanup policy. There are two possible values:

default_statistic: Option<EventTypeStatistics>options: Option<EventTypeOptions>authorization: Option<EventTypeAuthorization>audience: Option<EventTypeAudience>

Implementations

impl EventTypeInputBuilder[src]

pub fn name<T: Into<EventTypeName>>(self, v: T) -> Self[src]

Name of this EventType. The name is constrained by a regular expression.

Note: the name can encode the owner/responsible for this EventType and ideally should follow a common pattern that makes it easy to read and understand, but this level of structure is not enforced. For example a team name and data type can be used such as ‘acme-team.price-change’.

pub fn owning_application<T: Into<OwningApplication>>(self, v: T) -> Self[src]

Indicator of the application owning this EventType.

pub fn category<T: Into<Category>>(self, v: T) -> Self[src]

Defines the category of this EventType.

The value set will influence, if not set otherwise, the default set of validations, enrichment-strategies, and the effective schema for validation.

pub fn enrichment_strategy<T: Into<EnrichmentStrategy>>(self, v: T) -> Self[src]

Determines the enrichment to be performed on an Event upon reception. Enrichment is performed once upon reception (and after validation) of an Event and is only possible on fields that are not defined on the incoming Event.

For event types in categories ‘business’ or ‘data’ it’s mandatory to use metadata_enrichment strategy. For ‘undefined’ event types it’s not possible to use this strategy, since metadata field is not required.

See documentation for the write operation for details on behaviour in case of unsuccessful enrichment.

pub fn partition_strategy<T: Into<PartitionStrategy>>(self, v: T) -> Self[src]

Determines how the assignment of the event to a partition should be handled.

pub fn partition_key_fields<T: Into<PartitionKeyFields>>(self, v: T) -> Self[src]

Required when ‘partition_resolution_strategy’ is set to ‘hash’. Must be absent otherwise. Indicates the fields used for evaluation the partition of Events of this type.

If this is set it MUST be a valid required field as defined in the schema.

pub fn compatibility_mode<T: Into<CompatibilityMode>>(self, v: T) -> Self[src]

Compatibility mode provides a mean for event owners to evolve their schema, given changes respect the semantics defined by this field.

It’s designed to be flexible enough so that producers can evolve their schemas while not inadvertently breaking existent consumers.

Once defined, the compatibility mode is fixed, since otherwise it would break a predefined contract, declared by the producer.

pub fn schema<T: Into<EventTypeSchemaInput>>(self, v: T) -> Self[src]

pub fn cleanup_policy<T: Into<CleanupPolicy>>(self, v: T) -> Self[src]

Event type cleanup policy. There are two possible values:

pub fn default_statistic<T: Into<EventTypeStatistics>>(self, v: T) -> Self[src]

pub fn options<T: Into<EventTypeOptions>>(self, v: T) -> Self[src]

pub fn authorization<T: Into<EventTypeAuthorization>>(self, v: T) -> Self[src]

pub fn audience<T: Into<EventTypeAudience>>(self, v: T) -> Self[src]

pub fn build(self) -> Result<EventTypeInput, Error>[src]

Validates the data and returns an EventTypeInput if valid.

Trait Implementations

impl Clone for EventTypeInputBuilder[src]

impl Debug for EventTypeInputBuilder[src]

impl Default for EventTypeInputBuilder[src]

impl<'de> Deserialize<'de> for EventTypeInputBuilder[src]

impl Serialize for EventTypeInputBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,