Skip to main content

hanzo_client/models/
route_create_in.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
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 RouteCreateIn {
16    /// Pattern is the URL pattern to bind, e.g. \"acme.com/api/_*\".
17    #[serde(rename = "pattern", skip_serializing_if = "Option::is_none")]
18    pub pattern: Option<String>,
19    /// Script is the Worker script to dispatch to. Omit it to leave the pattern bound to no script, which is how Cloudflare expresses \"bypass the Worker here\".
20    #[serde(rename = "script", skip_serializing_if = "Option::is_none")]
21    pub script: Option<String>,
22    /// Zone is the 32-hex Cloudflare zone id, from the path.
23    #[serde(rename = "zone", skip_serializing_if = "Option::is_none")]
24    pub zone: Option<String>,
25}
26
27impl RouteCreateIn {
28    pub fn new() -> RouteCreateIn {
29        RouteCreateIn {
30            pattern: None,
31            script: None,
32            zone: None,
33        }
34    }
35}
36