Skip to content

Commit 56c59b8

Browse files
committed
style: rustfmt the regenerated client
1 parent 7ad5089 commit 56c59b8

156 files changed

Lines changed: 2196 additions & 799 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/apis/configuration.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* Generated by: https://openapi-generator.tech
99
*/
1010

11-
1211
use std::collections::HashMap;
1312

1413
#[derive(Debug, Clone)]
@@ -31,7 +30,6 @@ pub struct ApiKey {
3130
pub key: String,
3231
}
3332

34-
3533
impl Configuration {
3634
pub fn new() -> Configuration {
3735
Configuration::default()

src/apis/connection_types_api.rs

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
* Generated by: https://openapi-generator.tech
99
*/
1010

11-
12-
use reqwest;
13-
use serde::{Deserialize, Serialize, de::Error as _};
11+
use super::{configuration, ContentType, Error};
1412
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration, ContentType};
16-
13+
use reqwest;
14+
use serde::{de::Error as _, Deserialize, Serialize};
1715

1816
/// struct for typed errors of method [`get_connection_type`]
1917
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -30,13 +28,19 @@ pub enum ListConnectionTypesError {
3028
UnknownValue(serde_json::Value),
3129
}
3230

33-
3431
/// Get configuration schema and authentication requirements for a specific connection type.
35-
pub async fn get_connection_type(configuration: &configuration::Configuration, name: &str) -> Result<models::ConnectionTypeDetail, Error<GetConnectionTypeError>> {
32+
pub async fn get_connection_type(
33+
configuration: &configuration::Configuration,
34+
name: &str,
35+
) -> Result<models::ConnectionTypeDetail, Error<GetConnectionTypeError>> {
3636
// add a prefix to parameters to efficiently prevent name collisions
3737
let p_path_name = name;
3838

39-
let uri_str = format!("{}/v1/connection-types/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name));
39+
let uri_str = format!(
40+
"{}/v1/connection-types/{name}",
41+
configuration.base_path,
42+
name = crate::apis::urlencode(p_path_name)
43+
);
4044
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4145

4246
if let Some(ref user_agent) = configuration.user_agent {
@@ -79,13 +83,18 @@ pub async fn get_connection_type(configuration: &configuration::Configuration, n
7983
let content = resp.text().await?;
8084
crate::http_log::log_response_body(&content);
8185
let entity: Option<GetConnectionTypeError> = serde_json::from_str(&content).ok();
82-
Err(Error::ResponseError(ResponseContent { status, content, entity }))
86+
Err(Error::ResponseError(ResponseContent {
87+
status,
88+
content,
89+
entity,
90+
}))
8391
}
8492
}
8593

8694
/// List all available connection types, including native sources and FlightDLT services.
87-
pub async fn list_connection_types(configuration: &configuration::Configuration, ) -> Result<models::ListConnectionTypesResponse, Error<ListConnectionTypesError>> {
88-
95+
pub async fn list_connection_types(
96+
configuration: &configuration::Configuration,
97+
) -> Result<models::ListConnectionTypesResponse, Error<ListConnectionTypesError>> {
8998
let uri_str = format!("{}/v1/connection-types", configuration.base_path);
9099
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
91100

@@ -129,7 +138,10 @@ pub async fn list_connection_types(configuration: &configuration::Configuration,
129138
let content = resp.text().await?;
130139
crate::http_log::log_response_body(&content);
131140
let entity: Option<ListConnectionTypesError> = serde_json::from_str(&content).ok();
132-
Err(Error::ResponseError(ResponseContent { status, content, entity }))
141+
Err(Error::ResponseError(ResponseContent {
142+
status,
143+
content,
144+
entity,
145+
}))
133146
}
134147
}
135-

src/apis/connections_api.rs

Lines changed: 205 additions & 50 deletions
Large diffs are not rendered by default.

src/apis/database_context_api.rs

Lines changed: 70 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
* Generated by: https://openapi-generator.tech
99
*/
1010

11-
12-
use reqwest;
13-
use serde::{Deserialize, Serialize, de::Error as _};
11+
use super::{configuration, ContentType, Error};
1412
use crate::{apis::ResponseContent, models};
15-
use super::{Error, configuration, ContentType};
16-
13+
use reqwest;
14+
use serde::{de::Error as _, Deserialize, Serialize};
1715

1816
/// struct for typed errors of method [`delete_database_context`]
1917
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -50,15 +48,25 @@ pub enum UpsertDatabaseContextError {
5048
UnknownValue(serde_json::Value),
5149
}
5250

53-
5451
/// Removes a named context document from a database.
55-
pub async fn delete_database_context(configuration: &configuration::Configuration, database_id: &str, name: &str) -> Result<(), Error<DeleteDatabaseContextError>> {
52+
pub async fn delete_database_context(
53+
configuration: &configuration::Configuration,
54+
database_id: &str,
55+
name: &str,
56+
) -> Result<(), Error<DeleteDatabaseContextError>> {
5657
// add a prefix to parameters to efficiently prevent name collisions
5758
let p_path_database_id = database_id;
5859
let p_path_name = name;
5960

60-
let uri_str = format!("{}/v1/databases/{database_id}/context/{name}", configuration.base_path, database_id=crate::apis::urlencode(p_path_database_id), name=crate::apis::urlencode(p_path_name));
61-
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
61+
let uri_str = format!(
62+
"{}/v1/databases/{database_id}/context/{name}",
63+
configuration.base_path,
64+
database_id = crate::apis::urlencode(p_path_database_id),
65+
name = crate::apis::urlencode(p_path_name)
66+
);
67+
let mut req_builder = configuration
68+
.client
69+
.request(reqwest::Method::DELETE, &uri_str);
6270

6371
if let Some(ref user_agent) = configuration.user_agent {
6472
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
@@ -88,16 +96,29 @@ pub async fn delete_database_context(configuration: &configuration::Configuratio
8896
let content = resp.text().await?;
8997
crate::http_log::log_response_body(&content);
9098
let entity: Option<DeleteDatabaseContextError> = serde_json::from_str(&content).ok();
91-
Err(Error::ResponseError(ResponseContent { status, content, entity }))
99+
Err(Error::ResponseError(ResponseContent {
100+
status,
101+
content,
102+
entity,
103+
}))
92104
}
93105
}
94106

95-
pub async fn get_database_context(configuration: &configuration::Configuration, database_id: &str, name: &str) -> Result<models::GetDatabaseContextResponse, Error<GetDatabaseContextError>> {
107+
pub async fn get_database_context(
108+
configuration: &configuration::Configuration,
109+
database_id: &str,
110+
name: &str,
111+
) -> Result<models::GetDatabaseContextResponse, Error<GetDatabaseContextError>> {
96112
// add a prefix to parameters to efficiently prevent name collisions
97113
let p_path_database_id = database_id;
98114
let p_path_name = name;
99115

100-
let uri_str = format!("{}/v1/databases/{database_id}/context/{name}", configuration.base_path, database_id=crate::apis::urlencode(p_path_database_id), name=crate::apis::urlencode(p_path_name));
116+
let uri_str = format!(
117+
"{}/v1/databases/{database_id}/context/{name}",
118+
configuration.base_path,
119+
database_id = crate::apis::urlencode(p_path_database_id),
120+
name = crate::apis::urlencode(p_path_name)
121+
);
101122
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
102123

103124
if let Some(ref user_agent) = configuration.user_agent {
@@ -140,15 +161,26 @@ pub async fn get_database_context(configuration: &configuration::Configuration,
140161
let content = resp.text().await?;
141162
crate::http_log::log_response_body(&content);
142163
let entity: Option<GetDatabaseContextError> = serde_json::from_str(&content).ok();
143-
Err(Error::ResponseError(ResponseContent { status, content, entity }))
164+
Err(Error::ResponseError(ResponseContent {
165+
status,
166+
content,
167+
entity,
168+
}))
144169
}
145170
}
146171

147-
pub async fn list_database_contexts(configuration: &configuration::Configuration, database_id: &str) -> Result<models::ListDatabaseContextsResponse, Error<ListDatabaseContextsError>> {
172+
pub async fn list_database_contexts(
173+
configuration: &configuration::Configuration,
174+
database_id: &str,
175+
) -> Result<models::ListDatabaseContextsResponse, Error<ListDatabaseContextsError>> {
148176
// add a prefix to parameters to efficiently prevent name collisions
149177
let p_path_database_id = database_id;
150178

151-
let uri_str = format!("{}/v1/databases/{database_id}/context", configuration.base_path, database_id=crate::apis::urlencode(p_path_database_id));
179+
let uri_str = format!(
180+
"{}/v1/databases/{database_id}/context",
181+
configuration.base_path,
182+
database_id = crate::apis::urlencode(p_path_database_id)
183+
);
152184
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
153185

154186
if let Some(ref user_agent) = configuration.user_agent {
@@ -191,18 +223,32 @@ pub async fn list_database_contexts(configuration: &configuration::Configuration
191223
let content = resp.text().await?;
192224
crate::http_log::log_response_body(&content);
193225
let entity: Option<ListDatabaseContextsError> = serde_json::from_str(&content).ok();
194-
Err(Error::ResponseError(ResponseContent { status, content, entity }))
226+
Err(Error::ResponseError(ResponseContent {
227+
status,
228+
content,
229+
entity,
230+
}))
195231
}
196232
}
197233

198234
/// Stores a named document (for example Markdown) scoped to a database. Reuses the same name to replace content.
199-
pub async fn upsert_database_context(configuration: &configuration::Configuration, database_id: &str, upsert_database_context_request: models::UpsertDatabaseContextRequest) -> Result<models::UpsertDatabaseContextResponse, Error<UpsertDatabaseContextError>> {
235+
pub async fn upsert_database_context(
236+
configuration: &configuration::Configuration,
237+
database_id: &str,
238+
upsert_database_context_request: models::UpsertDatabaseContextRequest,
239+
) -> Result<models::UpsertDatabaseContextResponse, Error<UpsertDatabaseContextError>> {
200240
// add a prefix to parameters to efficiently prevent name collisions
201241
let p_path_database_id = database_id;
202242
let p_body_upsert_database_context_request = upsert_database_context_request;
203243

204-
let uri_str = format!("{}/v1/databases/{database_id}/context", configuration.base_path, database_id=crate::apis::urlencode(p_path_database_id));
205-
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
244+
let uri_str = format!(
245+
"{}/v1/databases/{database_id}/context",
246+
configuration.base_path,
247+
database_id = crate::apis::urlencode(p_path_database_id)
248+
);
249+
let mut req_builder = configuration
250+
.client
251+
.request(reqwest::Method::POST, &uri_str);
206252

207253
if let Some(ref user_agent) = configuration.user_agent {
208254
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
@@ -245,7 +291,10 @@ pub async fn upsert_database_context(configuration: &configuration::Configuratio
245291
let content = resp.text().await?;
246292
crate::http_log::log_response_body(&content);
247293
let entity: Option<UpsertDatabaseContextError> = serde_json::from_str(&content).ok();
248-
Err(Error::ResponseError(ResponseContent { status, content, entity }))
294+
Err(Error::ResponseError(ResponseContent {
295+
status,
296+
content,
297+
entity,
298+
}))
249299
}
250300
}
251-

0 commit comments

Comments
 (0)