fastly_api/models/response_object.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 ResponseObject {
13 /// Name of the cache condition controlling when this configuration applies.
14 #[serde(rename = "cache_condition", skip_serializing_if = "Option::is_none")]
15 pub cache_condition: Option<String>,
16 /// The content to deliver for the response object, can be empty.
17 #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
18 pub content: Option<String>,
19 /// The MIME type of the content, can be empty.
20 #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")]
21 pub content_type: Option<String>,
22 /// Name for the request settings.
23 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24 pub name: Option<String>,
25 /// The HTTP status code.
26 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
27 pub status: Option<String>,
28 /// The HTTP response.
29 #[serde(rename = "response", skip_serializing_if = "Option::is_none")]
30 pub response: Option<String>,
31 /// Condition which, if met, will select this configuration during a request. Optional.
32 #[serde(rename = "request_condition", skip_serializing_if = "Option::is_none")]
33 pub request_condition: Option<String>,
34}
35
36impl ResponseObject {
37 pub fn new() -> ResponseObject {
38 ResponseObject {
39 cache_condition: None,
40 content: None,
41 content_type: None,
42 name: None,
43 status: None,
44 response: None,
45 request_condition: None,
46 }
47 }
48}
49
50