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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* 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 ProvisionResult {
/// ConnectionString is the ready-to-use DSN, credential included. RETURNED HERE ONCE: no read beside this one carries it, so a caller that does not keep it must provision again.
#[serde(rename = "connectionString", skip_serializing_if = "Option::is_none")]
pub connection_string: Option<String>,
/// Database is the logical database, collection, index or bucket this resource resolves to on its backend. It is derived from Name under an org-namespacing hash, so it is not Name and two orgs cannot land on one.
#[serde(rename = "database", skip_serializing_if = "Option::is_none")]
pub database: Option<String>,
/// Host is the address that routes to this resource — a dedicated instance's own in-cluster Service, or the public gateway for a shared one. Never the internal admin address of a shared backend.
#[serde(rename = "host", skip_serializing_if = "Option::is_none")]
pub host: Option<String>,
/// ID is the resource's server-minted handle, \"rs_\"-prefixed. The caller does not choose it, and it is what every read and the delete address.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Kind is the product provisioned: sql, vector, datastore, kv, search, s3 or docdb. It is the route that was called, not a body field.
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Name is the org-unique slug the caller asked for, lower-cased. Every physical name on the backend derives from it.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Password is the minted credential, in plaintext, for the kinds that have one. RETURNED HERE ONCE — where KMS is configured it is sealed there and only a reference is persisted; where it is not, it is stored nowhere at all. It is never held in plaintext on either side.
#[serde(rename = "password", skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
/// Port is the port a client connects to on Host.
#[serde(rename = "port", skip_serializing_if = "Option::is_none")]
pub port: Option<i32>,
/// Status is \"ready\", or \"provisioning\" while a dedicated instance is still being materialized by the operator. A shared-backend create is \"ready\" here; a dedicated one answers 201 still launching, and reaches ready only when a later read reconciles it against the operator's live CR — never fabricated.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// Username is the credential's user, for the kinds that mint one per resource. Absent for a kind whose backend authenticates with a shared, out-of-band key.
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
impl ProvisionResult {
pub fn new() -> ProvisionResult {
ProvisionResult {
connection_string: None,
database: None,
host: None,
id: None,
kind: None,
name: None,
password: None,
port: None,
status: None,
username: None,
}
}
}