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
/*
* 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 CreateServerReq {
/// AuthHeader is the request header the credential is injected into, e.g. \"Authorization\". Empty means the server needs no credential.
#[serde(rename = "authHeader", skip_serializing_if = "Option::is_none")]
pub auth_header: Option<String>,
/// Listing enables a CATALOG entry instead — the id from GET /v1/tools/catalog. The endpoint is the listing's own streamable-http remote, so a listing that only ships a stdio package is refused: there is nothing to reach yet.
#[serde(rename = "listing", skip_serializing_if = "Option::is_none")]
pub listing: Option<String>,
/// Name labels the server for the org. Required with URL; with Listing it defaults to the listing's own title.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Secret is the credential VALUE. It is sealed into KMS under a per-org ref and never stored in SQLite, never listed, and never returned.
#[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
pub secret: Option<String>,
/// URL is the server's JSON-RPC endpoint. It must be an http(s) URL naming a PUBLIC host: loopback, link-local, private and cloud-metadata addresses are refused here and again when the dialer connects.
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl CreateServerReq {
pub fn new() -> CreateServerReq {
CreateServerReq {
auth_header: None,
listing: None,
name: None,
secret: None,
url: None,
}
}
}