1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PagesDeploymentConfig {
/// CompatibilityDate pins which Workers runtime behaviour the functions run under, as a date (\"2024-01-01\"). It is a pin, not a version: the runtime keeps that date's semantics for code deployed against it.
#[serde(rename = "compatibility_date", skip_serializing_if = "Option::is_none")]
pub compatibility_date: Option<String>,
/// CompatibilityFlags turn individual runtime behaviours on or off ahead of, or behind, the date above (\"nodejs_compat\").
#[serde(rename = "compatibility_flags", skip_serializing_if = "Option::is_none")]
pub compatibility_flags: Option<Vec<String>>,
/// D1Databases binds D1 databases in, keyed by binding name.
#[serde(rename = "d1_databases", skip_serializing_if = "Option::is_none")]
pub d1_databases: Option<std::collections::HashMap<String, models::PagesD1Binding>>,
/// EnvVars are the environment variables the functions see, KEYED BY VARIABLE NAME. The key is the name; the value carries the value and whether it is a secret.
#[serde(rename = "env_vars", skip_serializing_if = "Option::is_none")]
pub env_vars: Option<std::collections::HashMap<String, models::PagesEnvVar>>,
/// KVNamespaces binds KV namespaces into the functions, KEYED BY THE BINDING NAME the code reads (`env.SESSIONS`). Same shape for the two below.
#[serde(rename = "kv_namespaces", skip_serializing_if = "Option::is_none")]
pub kv_namespaces: Option<std::collections::HashMap<String, models::PagesKvBinding>>,
/// R2Buckets binds R2 buckets in, keyed by binding name.
#[serde(rename = "r2_buckets", skip_serializing_if = "Option::is_none")]
pub r2_buckets: Option<std::collections::HashMap<String, models::PagesR2Binding>>,
}
impl PagesDeploymentConfig {
pub fn new() -> PagesDeploymentConfig {
PagesDeploymentConfig {
compatibility_date: None,
compatibility_flags: None,
d1_databases: None,
env_vars: None,
kv_namespaces: None,
r2_buckets: None,
}
}
}