fastly_api/apis/
logging_bigquery_api.rs

1/*
2 * Fastly API
3 *
4 * Via the Fastly API you can perform any of the operations that are possible within the management console,  including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) 
5 *
6 */
7
8
9use reqwest;
10
11use crate::apis::ResponseContent;
12use super::{Error, configuration};
13
14/// struct for passing parameters to the method [`create_log_bigquery`]
15#[derive(Clone, Debug, Default)]
16pub struct CreateLogBigqueryParams {
17    /// Alphanumeric string identifying the service.
18    pub service_id: String,
19    /// Integer identifying a service version.
20    pub version_id: i32,
21    /// The name of the BigQuery logging object. Used as a primary key for API access.
22    pub name: Option<String>,
23    /// Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. 
24    pub placement: Option<String>,
25    /// The name of an existing condition in the configured endpoint, or leave blank to always execute.
26    pub response_condition: Option<String>,
27    /// A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table.
28    pub format: Option<String>,
29    /// The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. 
30    pub format_version: Option<i32>,
31    /// Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified.
32    pub user: Option<String>,
33    /// Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.
34    pub secret_key: Option<String>,
35    /// The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided.
36    pub account_name: Option<String>,
37    /// Your BigQuery dataset.
38    pub dataset: Option<String>,
39    /// Your BigQuery table.
40    pub table: Option<String>,
41    /// BigQuery table name suffix template. Optional.
42    pub template_suffix: Option<String>,
43    /// Your Google Cloud Platform project ID. Required
44    pub project_id: Option<String>
45}
46
47/// struct for passing parameters to the method [`delete_log_bigquery`]
48#[derive(Clone, Debug, Default)]
49pub struct DeleteLogBigqueryParams {
50    /// Alphanumeric string identifying the service.
51    pub service_id: String,
52    /// Integer identifying a service version.
53    pub version_id: i32,
54    /// The name for the real-time logging configuration.
55    pub logging_bigquery_name: String
56}
57
58/// struct for passing parameters to the method [`get_log_bigquery`]
59#[derive(Clone, Debug, Default)]
60pub struct GetLogBigqueryParams {
61    /// Alphanumeric string identifying the service.
62    pub service_id: String,
63    /// Integer identifying a service version.
64    pub version_id: i32,
65    /// The name for the real-time logging configuration.
66    pub logging_bigquery_name: String
67}
68
69/// struct for passing parameters to the method [`list_log_bigquery`]
70#[derive(Clone, Debug, Default)]
71pub struct ListLogBigqueryParams {
72    /// Alphanumeric string identifying the service.
73    pub service_id: String,
74    /// Integer identifying a service version.
75    pub version_id: i32
76}
77
78/// struct for passing parameters to the method [`update_log_bigquery`]
79#[derive(Clone, Debug, Default)]
80pub struct UpdateLogBigqueryParams {
81    /// Alphanumeric string identifying the service.
82    pub service_id: String,
83    /// Integer identifying a service version.
84    pub version_id: i32,
85    /// The name for the real-time logging configuration.
86    pub logging_bigquery_name: String,
87    /// The name of the BigQuery logging object. Used as a primary key for API access.
88    pub name: Option<String>,
89    /// Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. 
90    pub placement: Option<String>,
91    /// The name of an existing condition in the configured endpoint, or leave blank to always execute.
92    pub response_condition: Option<String>,
93    /// A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table.
94    pub format: Option<String>,
95    /// The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. 
96    pub format_version: Option<i32>,
97    /// Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified.
98    pub user: Option<String>,
99    /// Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.
100    pub secret_key: Option<String>,
101    /// The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided.
102    pub account_name: Option<String>,
103    /// Your BigQuery dataset.
104    pub dataset: Option<String>,
105    /// Your BigQuery table.
106    pub table: Option<String>,
107    /// BigQuery table name suffix template. Optional.
108    pub template_suffix: Option<String>,
109    /// Your Google Cloud Platform project ID. Required
110    pub project_id: Option<String>
111}
112
113
114/// struct for typed errors of method [`create_log_bigquery`]
115#[derive(Debug, Clone, Serialize, Deserialize)]
116#[serde(untagged)]
117pub enum CreateLogBigqueryError {
118    UnknownValue(serde_json::Value),
119}
120
121/// struct for typed errors of method [`delete_log_bigquery`]
122#[derive(Debug, Clone, Serialize, Deserialize)]
123#[serde(untagged)]
124pub enum DeleteLogBigqueryError {
125    UnknownValue(serde_json::Value),
126}
127
128/// struct for typed errors of method [`get_log_bigquery`]
129#[derive(Debug, Clone, Serialize, Deserialize)]
130#[serde(untagged)]
131pub enum GetLogBigqueryError {
132    UnknownValue(serde_json::Value),
133}
134
135/// struct for typed errors of method [`list_log_bigquery`]
136#[derive(Debug, Clone, Serialize, Deserialize)]
137#[serde(untagged)]
138pub enum ListLogBigqueryError {
139    UnknownValue(serde_json::Value),
140}
141
142/// struct for typed errors of method [`update_log_bigquery`]
143#[derive(Debug, Clone, Serialize, Deserialize)]
144#[serde(untagged)]
145pub enum UpdateLogBigqueryError {
146    UnknownValue(serde_json::Value),
147}
148
149
150/// Create a BigQuery logging object for a particular service and version.
151pub async fn create_log_bigquery(configuration: &mut configuration::Configuration, params: CreateLogBigqueryParams) -> Result<crate::models::LoggingBigqueryResponse, Error<CreateLogBigqueryError>> {
152    let local_var_configuration = configuration;
153
154    // unbox the parameters
155    let service_id = params.service_id;
156    let version_id = params.version_id;
157    let name = params.name;
158    let placement = params.placement;
159    let response_condition = params.response_condition;
160    let format = params.format;
161    let format_version = params.format_version;
162    let user = params.user;
163    let secret_key = params.secret_key;
164    let account_name = params.account_name;
165    let dataset = params.dataset;
166    let table = params.table;
167    let template_suffix = params.template_suffix;
168    let project_id = params.project_id;
169
170
171    let local_var_client = &local_var_configuration.client;
172
173    let local_var_uri_str = format!("{}/service/{service_id}/version/{version_id}/logging/bigquery", local_var_configuration.base_path, service_id=crate::apis::urlencode(service_id), version_id=version_id);
174    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
175
176    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
177        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
178    }
179    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
180        let local_var_key = local_var_apikey.key.clone();
181        let local_var_value = match local_var_apikey.prefix {
182            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
183            None => local_var_key,
184        };
185        local_var_req_builder = local_var_req_builder.header("Fastly-Key", local_var_value);
186    };
187    let mut local_var_form_params = std::collections::HashMap::new();
188    if let Some(local_var_param_value) = name {
189        local_var_form_params.insert("name", local_var_param_value.to_string());
190    }
191    if let Some(local_var_param_value) = placement {
192        local_var_form_params.insert("placement", local_var_param_value.to_string());
193    }
194    if let Some(local_var_param_value) = response_condition {
195        local_var_form_params.insert("response_condition", local_var_param_value.to_string());
196    }
197    if let Some(local_var_param_value) = format {
198        local_var_form_params.insert("format", local_var_param_value.to_string());
199    }
200    if let Some(local_var_param_value) = format_version {
201        local_var_form_params.insert("format_version", local_var_param_value.to_string());
202    }
203    if let Some(local_var_param_value) = user {
204        local_var_form_params.insert("user", local_var_param_value.to_string());
205    }
206    if let Some(local_var_param_value) = secret_key {
207        local_var_form_params.insert("secret_key", local_var_param_value.to_string());
208    }
209    if let Some(local_var_param_value) = account_name {
210        local_var_form_params.insert("account_name", local_var_param_value.to_string());
211    }
212    if let Some(local_var_param_value) = dataset {
213        local_var_form_params.insert("dataset", local_var_param_value.to_string());
214    }
215    if let Some(local_var_param_value) = table {
216        local_var_form_params.insert("table", local_var_param_value.to_string());
217    }
218    if let Some(local_var_param_value) = template_suffix {
219        local_var_form_params.insert("template_suffix", local_var_param_value.to_string());
220    }
221    if let Some(local_var_param_value) = project_id {
222        local_var_form_params.insert("project_id", local_var_param_value.to_string());
223    }
224    local_var_req_builder = local_var_req_builder.form(&local_var_form_params);
225
226    let local_var_req = local_var_req_builder.build()?;
227    let local_var_resp = local_var_client.execute(local_var_req).await?;
228
229    if "POST" != "GET" && "POST" != "HEAD" {
230      let headers = local_var_resp.headers();
231      local_var_configuration.rate_limit_remaining = match headers.get("Fastly-RateLimit-Remaining") {
232          Some(v) => v.to_str().unwrap().parse().unwrap(),
233          None => configuration::DEFAULT_RATELIMIT,
234      };
235      local_var_configuration.rate_limit_reset = match headers.get("Fastly-RateLimit-Reset") {
236          Some(v) => v.to_str().unwrap().parse().unwrap(),
237          None => 0,
238      };
239    }
240
241    let local_var_status = local_var_resp.status();
242    let local_var_content = local_var_resp.text().await?;
243
244    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
245        serde_json::from_str(&local_var_content).map_err(Error::from)
246    } else {
247        let local_var_entity: Option<CreateLogBigqueryError> = serde_json::from_str(&local_var_content).ok();
248        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
249        Err(Error::ResponseError(local_var_error))
250    }
251}
252
253/// Delete a BigQuery logging object for a particular service and version.
254pub async fn delete_log_bigquery(configuration: &mut configuration::Configuration, params: DeleteLogBigqueryParams) -> Result<crate::models::InlineResponse200, Error<DeleteLogBigqueryError>> {
255    let local_var_configuration = configuration;
256
257    // unbox the parameters
258    let service_id = params.service_id;
259    let version_id = params.version_id;
260    let logging_bigquery_name = params.logging_bigquery_name;
261
262
263    let local_var_client = &local_var_configuration.client;
264
265    let local_var_uri_str = format!("{}/service/{service_id}/version/{version_id}/logging/bigquery/{logging_bigquery_name}", local_var_configuration.base_path, service_id=crate::apis::urlencode(service_id), version_id=version_id, logging_bigquery_name=crate::apis::urlencode(logging_bigquery_name));
266    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
267
268    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
269        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
270    }
271    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
272        let local_var_key = local_var_apikey.key.clone();
273        let local_var_value = match local_var_apikey.prefix {
274            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
275            None => local_var_key,
276        };
277        local_var_req_builder = local_var_req_builder.header("Fastly-Key", local_var_value);
278    };
279
280    let local_var_req = local_var_req_builder.build()?;
281    let local_var_resp = local_var_client.execute(local_var_req).await?;
282
283    if "DELETE" != "GET" && "DELETE" != "HEAD" {
284      let headers = local_var_resp.headers();
285      local_var_configuration.rate_limit_remaining = match headers.get("Fastly-RateLimit-Remaining") {
286          Some(v) => v.to_str().unwrap().parse().unwrap(),
287          None => configuration::DEFAULT_RATELIMIT,
288      };
289      local_var_configuration.rate_limit_reset = match headers.get("Fastly-RateLimit-Reset") {
290          Some(v) => v.to_str().unwrap().parse().unwrap(),
291          None => 0,
292      };
293    }
294
295    let local_var_status = local_var_resp.status();
296    let local_var_content = local_var_resp.text().await?;
297
298    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
299        serde_json::from_str(&local_var_content).map_err(Error::from)
300    } else {
301        let local_var_entity: Option<DeleteLogBigqueryError> = serde_json::from_str(&local_var_content).ok();
302        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
303        Err(Error::ResponseError(local_var_error))
304    }
305}
306
307/// Get the details for a BigQuery logging object for a particular service and version.
308pub async fn get_log_bigquery(configuration: &mut configuration::Configuration, params: GetLogBigqueryParams) -> Result<crate::models::LoggingBigqueryResponse, Error<GetLogBigqueryError>> {
309    let local_var_configuration = configuration;
310
311    // unbox the parameters
312    let service_id = params.service_id;
313    let version_id = params.version_id;
314    let logging_bigquery_name = params.logging_bigquery_name;
315
316
317    let local_var_client = &local_var_configuration.client;
318
319    let local_var_uri_str = format!("{}/service/{service_id}/version/{version_id}/logging/bigquery/{logging_bigquery_name}", local_var_configuration.base_path, service_id=crate::apis::urlencode(service_id), version_id=version_id, logging_bigquery_name=crate::apis::urlencode(logging_bigquery_name));
320    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
321
322    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
323        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
324    }
325    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
326        let local_var_key = local_var_apikey.key.clone();
327        let local_var_value = match local_var_apikey.prefix {
328            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
329            None => local_var_key,
330        };
331        local_var_req_builder = local_var_req_builder.header("Fastly-Key", local_var_value);
332    };
333
334    let local_var_req = local_var_req_builder.build()?;
335    let local_var_resp = local_var_client.execute(local_var_req).await?;
336
337    if "GET" != "GET" && "GET" != "HEAD" {
338      let headers = local_var_resp.headers();
339      local_var_configuration.rate_limit_remaining = match headers.get("Fastly-RateLimit-Remaining") {
340          Some(v) => v.to_str().unwrap().parse().unwrap(),
341          None => configuration::DEFAULT_RATELIMIT,
342      };
343      local_var_configuration.rate_limit_reset = match headers.get("Fastly-RateLimit-Reset") {
344          Some(v) => v.to_str().unwrap().parse().unwrap(),
345          None => 0,
346      };
347    }
348
349    let local_var_status = local_var_resp.status();
350    let local_var_content = local_var_resp.text().await?;
351
352    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
353        serde_json::from_str(&local_var_content).map_err(Error::from)
354    } else {
355        let local_var_entity: Option<GetLogBigqueryError> = serde_json::from_str(&local_var_content).ok();
356        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
357        Err(Error::ResponseError(local_var_error))
358    }
359}
360
361/// List all of the BigQuery logging objects for a particular service and version.
362pub async fn list_log_bigquery(configuration: &mut configuration::Configuration, params: ListLogBigqueryParams) -> Result<Vec<crate::models::LoggingBigqueryResponse>, Error<ListLogBigqueryError>> {
363    let local_var_configuration = configuration;
364
365    // unbox the parameters
366    let service_id = params.service_id;
367    let version_id = params.version_id;
368
369
370    let local_var_client = &local_var_configuration.client;
371
372    let local_var_uri_str = format!("{}/service/{service_id}/version/{version_id}/logging/bigquery", local_var_configuration.base_path, service_id=crate::apis::urlencode(service_id), version_id=version_id);
373    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
374
375    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
376        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
377    }
378    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
379        let local_var_key = local_var_apikey.key.clone();
380        let local_var_value = match local_var_apikey.prefix {
381            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
382            None => local_var_key,
383        };
384        local_var_req_builder = local_var_req_builder.header("Fastly-Key", local_var_value);
385    };
386
387    let local_var_req = local_var_req_builder.build()?;
388    let local_var_resp = local_var_client.execute(local_var_req).await?;
389
390    if "GET" != "GET" && "GET" != "HEAD" {
391      let headers = local_var_resp.headers();
392      local_var_configuration.rate_limit_remaining = match headers.get("Fastly-RateLimit-Remaining") {
393          Some(v) => v.to_str().unwrap().parse().unwrap(),
394          None => configuration::DEFAULT_RATELIMIT,
395      };
396      local_var_configuration.rate_limit_reset = match headers.get("Fastly-RateLimit-Reset") {
397          Some(v) => v.to_str().unwrap().parse().unwrap(),
398          None => 0,
399      };
400    }
401
402    let local_var_status = local_var_resp.status();
403    let local_var_content = local_var_resp.text().await?;
404
405    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
406        serde_json::from_str(&local_var_content).map_err(Error::from)
407    } else {
408        let local_var_entity: Option<ListLogBigqueryError> = serde_json::from_str(&local_var_content).ok();
409        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
410        Err(Error::ResponseError(local_var_error))
411    }
412}
413
414/// Update a BigQuery logging object for a particular service and version.
415pub async fn update_log_bigquery(configuration: &mut configuration::Configuration, params: UpdateLogBigqueryParams) -> Result<crate::models::LoggingBigqueryResponse, Error<UpdateLogBigqueryError>> {
416    let local_var_configuration = configuration;
417
418    // unbox the parameters
419    let service_id = params.service_id;
420    let version_id = params.version_id;
421    let logging_bigquery_name = params.logging_bigquery_name;
422    let name = params.name;
423    let placement = params.placement;
424    let response_condition = params.response_condition;
425    let format = params.format;
426    let format_version = params.format_version;
427    let user = params.user;
428    let secret_key = params.secret_key;
429    let account_name = params.account_name;
430    let dataset = params.dataset;
431    let table = params.table;
432    let template_suffix = params.template_suffix;
433    let project_id = params.project_id;
434
435
436    let local_var_client = &local_var_configuration.client;
437
438    let local_var_uri_str = format!("{}/service/{service_id}/version/{version_id}/logging/bigquery/{logging_bigquery_name}", local_var_configuration.base_path, service_id=crate::apis::urlencode(service_id), version_id=version_id, logging_bigquery_name=crate::apis::urlencode(logging_bigquery_name));
439    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
440
441    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
442        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
443    }
444    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
445        let local_var_key = local_var_apikey.key.clone();
446        let local_var_value = match local_var_apikey.prefix {
447            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
448            None => local_var_key,
449        };
450        local_var_req_builder = local_var_req_builder.header("Fastly-Key", local_var_value);
451    };
452    let mut local_var_form_params = std::collections::HashMap::new();
453    if let Some(local_var_param_value) = name {
454        local_var_form_params.insert("name", local_var_param_value.to_string());
455    }
456    if let Some(local_var_param_value) = placement {
457        local_var_form_params.insert("placement", local_var_param_value.to_string());
458    }
459    if let Some(local_var_param_value) = response_condition {
460        local_var_form_params.insert("response_condition", local_var_param_value.to_string());
461    }
462    if let Some(local_var_param_value) = format {
463        local_var_form_params.insert("format", local_var_param_value.to_string());
464    }
465    if let Some(local_var_param_value) = format_version {
466        local_var_form_params.insert("format_version", local_var_param_value.to_string());
467    }
468    if let Some(local_var_param_value) = user {
469        local_var_form_params.insert("user", local_var_param_value.to_string());
470    }
471    if let Some(local_var_param_value) = secret_key {
472        local_var_form_params.insert("secret_key", local_var_param_value.to_string());
473    }
474    if let Some(local_var_param_value) = account_name {
475        local_var_form_params.insert("account_name", local_var_param_value.to_string());
476    }
477    if let Some(local_var_param_value) = dataset {
478        local_var_form_params.insert("dataset", local_var_param_value.to_string());
479    }
480    if let Some(local_var_param_value) = table {
481        local_var_form_params.insert("table", local_var_param_value.to_string());
482    }
483    if let Some(local_var_param_value) = template_suffix {
484        local_var_form_params.insert("template_suffix", local_var_param_value.to_string());
485    }
486    if let Some(local_var_param_value) = project_id {
487        local_var_form_params.insert("project_id", local_var_param_value.to_string());
488    }
489    local_var_req_builder = local_var_req_builder.form(&local_var_form_params);
490
491    let local_var_req = local_var_req_builder.build()?;
492    let local_var_resp = local_var_client.execute(local_var_req).await?;
493
494    if "PUT" != "GET" && "PUT" != "HEAD" {
495      let headers = local_var_resp.headers();
496      local_var_configuration.rate_limit_remaining = match headers.get("Fastly-RateLimit-Remaining") {
497          Some(v) => v.to_str().unwrap().parse().unwrap(),
498          None => configuration::DEFAULT_RATELIMIT,
499      };
500      local_var_configuration.rate_limit_reset = match headers.get("Fastly-RateLimit-Reset") {
501          Some(v) => v.to_str().unwrap().parse().unwrap(),
502          None => 0,
503      };
504    }
505
506    let local_var_status = local_var_resp.status();
507    let local_var_content = local_var_resp.text().await?;
508
509    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
510        serde_json::from_str(&local_var_content).map_err(Error::from)
511    } else {
512        let local_var_entity: Option<UpdateLogBigqueryError> = serde_json::from_str(&local_var_content).ok();
513        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
514        Err(Error::ResponseError(local_var_error))
515    }
516}
517