turnkey_client 0.6.1

A Rust client to interact with the Turnkey API.
Documentation
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Swagger {
    #[prost(string, tag = "1")]
    pub swagger: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub info: ::core::option::Option<Info>,
    #[prost(string, tag = "3")]
    pub host: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub base_path: ::prost::alloc::string::String,
    #[prost(enumeration = "Scheme", repeated, tag = "5")]
    pub schemes: ::prost::alloc::vec::Vec<i32>,
    #[prost(string, repeated, tag = "6")]
    pub consumes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "7")]
    pub produces: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(map = "string, message", tag = "10")]
    pub responses: ::std::collections::HashMap<::prost::alloc::string::String, Response>,
    #[prost(message, optional, tag = "11")]
    pub security_definitions: ::core::option::Option<SecurityDefinitions>,
    #[prost(message, repeated, tag = "12")]
    pub security: ::prost::alloc::vec::Vec<SecurityRequirement>,
    #[prost(message, repeated, tag = "13")]
    pub tags: ::prost::alloc::vec::Vec<Tag>,
    #[prost(message, optional, tag = "14")]
    pub external_docs: ::core::option::Option<ExternalDocumentation>,
    #[prost(map = "string, message", tag = "15")]
    pub extensions: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost_types::Value,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
    #[prost(string, repeated, tag = "1")]
    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "2")]
    pub summary: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub external_docs: ::core::option::Option<ExternalDocumentation>,
    #[prost(string, tag = "5")]
    pub operation_id: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "6")]
    pub consumes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "7")]
    pub produces: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(map = "string, message", tag = "9")]
    pub responses: ::std::collections::HashMap<::prost::alloc::string::String, Response>,
    #[prost(enumeration = "Scheme", repeated, tag = "10")]
    pub schemes: ::prost::alloc::vec::Vec<i32>,
    #[prost(bool, tag = "11")]
    pub deprecated: bool,
    #[prost(message, repeated, tag = "12")]
    pub security: ::prost::alloc::vec::Vec<SecurityRequirement>,
    #[prost(map = "string, message", tag = "13")]
    pub extensions: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost_types::Value,
    >,
    #[prost(message, optional, tag = "14")]
    pub parameters: ::core::option::Option<Parameters>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Parameters {
    #[prost(message, repeated, tag = "1")]
    pub headers: ::prost::alloc::vec::Vec<HeaderParameter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeaderParameter {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    #[prost(enumeration = "header_parameter::Type", tag = "3")]
    pub r#type: i32,
    #[prost(string, tag = "4")]
    pub format: ::prost::alloc::string::String,
    #[prost(bool, tag = "5")]
    pub required: bool,
}
pub mod header_parameter {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        Unknown = 0,
        String = 1,
        Number = 2,
        Integer = 3,
        Boolean = 4,
    }
    impl Type {
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unknown => "UNKNOWN",
                Self::String => "STRING",
                Self::Number => "NUMBER",
                Self::Integer => "INTEGER",
                Self::Boolean => "BOOLEAN",
            }
        }
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "STRING" => Some(Self::String),
                "NUMBER" => Some(Self::Number),
                "INTEGER" => Some(Self::Integer),
                "BOOLEAN" => Some(Self::Boolean),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Header {
    #[prost(string, tag = "1")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub format: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub default: ::prost::alloc::string::String,
    #[prost(string, tag = "13")]
    pub pattern: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Response {
    #[prost(string, tag = "1")]
    pub description: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub schema: ::core::option::Option<Schema>,
    #[prost(map = "string, message", tag = "3")]
    pub headers: ::std::collections::HashMap<::prost::alloc::string::String, Header>,
    #[prost(map = "string, string", tag = "4")]
    pub examples: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(map = "string, message", tag = "5")]
    pub extensions: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost_types::Value,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Info {
    #[prost(string, tag = "1")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub terms_of_service: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub contact: ::core::option::Option<Contact>,
    #[prost(message, optional, tag = "5")]
    pub license: ::core::option::Option<License>,
    #[prost(string, tag = "6")]
    pub version: ::prost::alloc::string::String,
    #[prost(map = "string, message", tag = "7")]
    pub extensions: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost_types::Value,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Contact {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub email: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct License {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub url: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalDocumentation {
    #[prost(string, tag = "1")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub url: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schema {
    #[prost(message, optional, tag = "1")]
    pub json_schema: ::core::option::Option<JsonSchema>,
    #[prost(string, tag = "2")]
    pub discriminator: ::prost::alloc::string::String,
    #[prost(bool, tag = "3")]
    pub read_only: bool,
    #[prost(message, optional, tag = "5")]
    pub external_docs: ::core::option::Option<ExternalDocumentation>,
    #[prost(string, tag = "6")]
    pub example: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JsonSchema {
    #[prost(string, tag = "3")]
    pub r#ref: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub default: ::prost::alloc::string::String,
    #[prost(bool, tag = "8")]
    pub read_only: bool,
    #[prost(string, tag = "9")]
    pub example: ::prost::alloc::string::String,
    #[prost(double, tag = "10")]
    pub multiple_of: f64,
    #[prost(double, tag = "11")]
    pub maximum: f64,
    #[prost(bool, tag = "12")]
    pub exclusive_maximum: bool,
    #[prost(double, tag = "13")]
    pub minimum: f64,
    #[prost(bool, tag = "14")]
    pub exclusive_minimum: bool,
    #[prost(uint64, tag = "15")]
    pub max_length: u64,
    #[prost(uint64, tag = "16")]
    pub min_length: u64,
    #[prost(string, tag = "17")]
    pub pattern: ::prost::alloc::string::String,
    #[prost(uint64, tag = "20")]
    pub max_items: u64,
    #[prost(uint64, tag = "21")]
    pub min_items: u64,
    #[prost(bool, tag = "22")]
    pub unique_items: bool,
    #[prost(uint64, tag = "24")]
    pub max_properties: u64,
    #[prost(uint64, tag = "25")]
    pub min_properties: u64,
    #[prost(string, repeated, tag = "26")]
    pub required: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "34")]
    pub array: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration = "json_schema::JsonSchemaSimpleTypes", repeated, tag = "35")]
    pub r#type: ::prost::alloc::vec::Vec<i32>,
    #[prost(string, tag = "36")]
    pub format: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "46")]
    pub r#enum: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "1001")]
    pub field_configuration: ::core::option::Option<json_schema::FieldConfiguration>,
    #[prost(map = "string, message", tag = "48")]
    pub extensions: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost_types::Value,
    >,
}
pub mod json_schema {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FieldConfiguration {
        #[prost(string, tag = "47")]
        pub path_param_name: ::prost::alloc::string::String,
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum JsonSchemaSimpleTypes {
        Unknown = 0,
        Array = 1,
        Boolean = 2,
        Integer = 3,
        Null = 4,
        Number = 5,
        Object = 6,
        String = 7,
    }
    impl JsonSchemaSimpleTypes {
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unknown => "UNKNOWN",
                Self::Array => "ARRAY",
                Self::Boolean => "BOOLEAN",
                Self::Integer => "INTEGER",
                Self::Null => "NULL",
                Self::Number => "NUMBER",
                Self::Object => "OBJECT",
                Self::String => "STRING",
            }
        }
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "ARRAY" => Some(Self::Array),
                "BOOLEAN" => Some(Self::Boolean),
                "INTEGER" => Some(Self::Integer),
                "NULL" => Some(Self::Null),
                "NUMBER" => Some(Self::Number),
                "OBJECT" => Some(Self::Object),
                "STRING" => Some(Self::String),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tag {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub external_docs: ::core::option::Option<ExternalDocumentation>,
    #[prost(map = "string, message", tag = "4")]
    pub extensions: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost_types::Value,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecurityDefinitions {
    #[prost(map = "string, message", tag = "1")]
    pub security: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        SecurityScheme,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecurityScheme {
    #[prost(enumeration = "security_scheme::Type", tag = "1")]
    pub r#type: i32,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    #[prost(enumeration = "security_scheme::In", tag = "4")]
    pub r#in: i32,
    #[prost(enumeration = "security_scheme::Flow", tag = "5")]
    pub flow: i32,
    #[prost(string, tag = "6")]
    pub authorization_url: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub token_url: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "8")]
    pub scopes: ::core::option::Option<Scopes>,
    #[prost(map = "string, message", tag = "9")]
    pub extensions: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost_types::Value,
    >,
}
pub mod security_scheme {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        Invalid = 0,
        Basic = 1,
        ApiKey = 2,
        Oauth2 = 3,
    }
    impl Type {
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Invalid => "TYPE_INVALID",
                Self::Basic => "TYPE_BASIC",
                Self::ApiKey => "TYPE_API_KEY",
                Self::Oauth2 => "TYPE_OAUTH2",
            }
        }
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_INVALID" => Some(Self::Invalid),
                "TYPE_BASIC" => Some(Self::Basic),
                "TYPE_API_KEY" => Some(Self::ApiKey),
                "TYPE_OAUTH2" => Some(Self::Oauth2),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum In {
        Invalid = 0,
        Query = 1,
        Header = 2,
    }
    impl In {
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Invalid => "IN_INVALID",
                Self::Query => "IN_QUERY",
                Self::Header => "IN_HEADER",
            }
        }
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "IN_INVALID" => Some(Self::Invalid),
                "IN_QUERY" => Some(Self::Query),
                "IN_HEADER" => Some(Self::Header),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Flow {
        Invalid = 0,
        Implicit = 1,
        Password = 2,
        Application = 3,
        AccessCode = 4,
    }
    impl Flow {
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Invalid => "FLOW_INVALID",
                Self::Implicit => "FLOW_IMPLICIT",
                Self::Password => "FLOW_PASSWORD",
                Self::Application => "FLOW_APPLICATION",
                Self::AccessCode => "FLOW_ACCESS_CODE",
            }
        }
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "FLOW_INVALID" => Some(Self::Invalid),
                "FLOW_IMPLICIT" => Some(Self::Implicit),
                "FLOW_PASSWORD" => Some(Self::Password),
                "FLOW_APPLICATION" => Some(Self::Application),
                "FLOW_ACCESS_CODE" => Some(Self::AccessCode),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecurityRequirement {
    #[prost(map = "string, message", tag = "1")]
    pub security_requirement: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        security_requirement::SecurityRequirementValue,
    >,
}
pub mod security_requirement {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SecurityRequirementValue {
        #[prost(string, repeated, tag = "1")]
        pub scope: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Scopes {
    #[prost(map = "string, string", tag = "1")]
    pub scope: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Scheme {
    Unknown = 0,
    Http = 1,
    Https = 2,
    Ws = 3,
    Wss = 4,
}
impl Scheme {
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unknown => "UNKNOWN",
            Self::Http => "HTTP",
            Self::Https => "HTTPS",
            Self::Ws => "WS",
            Self::Wss => "WSS",
        }
    }
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN" => Some(Self::Unknown),
            "HTTP" => Some(Self::Http),
            "HTTPS" => Some(Self::Https),
            "WS" => Some(Self::Ws),
            "WSS" => Some(Self::Wss),
            _ => None,
        }
    }
}