Skip to main content

windmill_api/models/
partitions_in_range.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.746.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PartitionsInRange {
16    /// the pipeline script that materializes the asset (managed `// materialize` target, or a partitioned writer using the SDK helpers) — the runnable a backfill launches
17    #[serde(rename = "producer_path")]
18    pub producer_path: String,
19    #[serde(rename = "partition_kind")]
20    pub partition_kind: PartitionKind,
21    #[serde(rename = "partitions")]
22    pub partitions: Vec<models::PartitionsInRangePartitionsInner>,
23}
24
25impl PartitionsInRange {
26    pub fn new(producer_path: String, partition_kind: PartitionKind, partitions: Vec<models::PartitionsInRangePartitionsInner>) -> PartitionsInRange {
27        PartitionsInRange {
28            producer_path,
29            partition_kind,
30            partitions,
31        }
32    }
33}
34/// 
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum PartitionKind {
37    #[serde(rename = "daily")]
38    Daily,
39    #[serde(rename = "hourly")]
40    Hourly,
41    #[serde(rename = "weekly")]
42    Weekly,
43    #[serde(rename = "monthly")]
44    Monthly,
45    #[serde(rename = "dynamic")]
46    Dynamic,
47}
48
49impl Default for PartitionKind {
50    fn default() -> PartitionKind {
51        Self::Daily
52    }
53}
54