fastly_api/models/batch_errors.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
9
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct BatchErrors {
13 /// The key that the error corresponds to. This field will be empty if the object or one of its fields was unable to be parsed.
14 #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
15 pub key: Option<String>,
16 /// The line number of the payload on which the error occurred (starting from 0 for the first line).
17 #[serde(rename = "index", skip_serializing_if = "Option::is_none")]
18 pub index: Option<i32>,
19 /// The HTTP response code for the request, or a 400 if the request was not able to be completed.
20 #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
21 pub code: Option<String>,
22 /// A descriptor of this particular item's error.
23 #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
24 pub reason: Option<String>,
25}
26
27impl BatchErrors {
28 pub fn new() -> BatchErrors {
29 BatchErrors {
30 key: None,
31 index: None,
32 code: None,
33 reason: None,
34 }
35 }
36}
37
38