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
/*
* 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 WorkerScriptPut {
#[serde(rename = "bindings", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub bindings: Option<Option<serde_json::Value>>,
/// CompatibilityDate pins which Workers runtime behaviour the script runs under, as a plain calendar date (\"2024-01-01\"). Absent leaves the account's own default in force.
#[serde(rename = "compatibilityDate", skip_serializing_if = "Option::is_none")]
pub compatibility_date: Option<String>,
/// CompatibilityFlags turn individual runtime behaviours on or off around that date (\"nodejs_compat\"), in Cloudflare's own flag vocabulary. Absent means the date alone decides.
#[serde(rename = "compatibilityFlags", skip_serializing_if = "Option::is_none")]
pub compatibility_flags: Option<Vec<String>>,
/// MainModule is the module file the runtime starts at. Absent means \"worker.js\".
#[serde(rename = "mainModule", skip_serializing_if = "Option::is_none")]
pub main_module: Option<String>,
/// Script means two things on this route, and the document says so in both places it appears: the PATH segment names the Worker to publish, and the BODY field carries that Worker's ES-module source — the code itself, never a name or a URL. A blank or absent source is refused; there is no empty Worker.
#[serde(rename = "script", skip_serializing_if = "Option::is_none")]
pub script: Option<String>,
}
impl WorkerScriptPut {
pub fn new() -> WorkerScriptPut {
WorkerScriptPut {
bindings: None,
compatibility_date: None,
compatibility_flags: None,
main_module: None,
script: None,
}
}
}