hanzo_client/models/create_endpoint_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 CreateEndpointIn {
16 /// Description is a free-text label for the console. Optional, clipped to 1024 bytes.
17 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
18 pub description: Option<String>,
19 /// Events are NATS subject patterns to subscribe to (e.g. \"commerce.order.>\"). An empty or omitted list means EVERY event on the platform bus. Max 64 patterns, each max 256 bytes.
20 #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
21 pub events: Option<Vec<String>>,
22 /// Status is \"active\" or \"disabled\". Empty defaults to active. A disabled endpoint receives no bus deliveries, but can still be exercised with POST /v1/webhook/{id}/test.
23 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
24 pub status: Option<String>,
25 /// URL is the https:// address each matching event is POSTed to. Required, max 2048 bytes; http:// and every other scheme is refused, because a webhook carries signed event data and must not travel in the clear.
26 #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
27 pub url: Option<String>,
28}
29
30impl CreateEndpointIn {
31 pub fn new() -> CreateEndpointIn {
32 CreateEndpointIn {
33 description: None,
34 events: None,
35 status: None,
36 url: None,
37 }
38 }
39}
40