Skip to content

Commit 2c03865

Browse files
author
github-actions
committed
Generated v4.3.1
1 parent ac14ed0 commit 2c03865

14 files changed

+100
-12
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [v4.3.1](https://github.com/fastly/fastly-rust/releases/tag/release/v4.3.1) (2024-02-19)
4+
5+
**Bug fixes:**
6+
7+
- fix(response_object): strongly type response_object create_update requests
8+
- fix(tls_configurations): fix `tls_protocols` field to be a string array type
9+
310
## [v4.3.0](https://github.com/fastly/fastly-rust/releases/tag/release/v4.3.0) (2023-11-29)
411

512
**Enhancements:**

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fastly-api"
3-
version = "4.3.0"
3+
version = "4.3.1"
44
authors = ["Fastly <[email protected]>"]
55
edition = "2021"
66
description = "Fastly API client"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Rust 2021 Edition
1414
Add the following to `Cargo.toml` under `[dependencies]`:
1515

1616
```toml
17-
fastly-api = "4.3.0"
17+
fastly-api = "4.3.1"
1818
```
1919

2020
## Usage

docs/CreateResponseObjectRequest.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CreateResponseObjectRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | Option<**String**> | The name of the response object to create. |
8+
**status** | Option<**String**> | The status code the response will have. Defaults to 200. |
9+
**response** | Option<**String**> | The status text the response will have. Defaults to 'OK'. |
10+
**content** | Option<**String**> | The content the response will deliver. |
11+
**content_type** | Option<**String**> | The MIME type of your response content. |
12+
**request_condition** | Option<**String**> | Condition which, if met, will select this configuration during a request. Optional. |
13+
**cache_condition** | Option<**String**> | Name of the cache condition controlling when this configuration applies. |
14+
15+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16+
17+

docs/ResponseObjectApi.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Name | Type | Description | Required | Notes
3131
------------- | ------------- | ------------- | ------------- | -------------
3232
**service_id** | **String** | Alphanumeric string identifying the service. | [required] |
3333
**version_id** | **i32** | Integer identifying a service version. | [required] |
34+
**create_response_object_request** | Option\<[**CreateResponseObjectRequest**](CreateResponseObjectRequest.md)> | | |
3435

3536
### Return type
3637

@@ -42,7 +43,7 @@ Name | Type | Description | Required | Notes
4243

4344
### HTTP request headers
4445

45-
- **Content-Type**: application/x-www-form-urlencoded
46+
- **Content-Type**: application/json
4647
- **Accept**: application/json
4748

4849
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -178,6 +179,7 @@ Name | Type | Description | Required | Notes
178179
**service_id** | **String** | Alphanumeric string identifying the service. | [required] |
179180
**version_id** | **i32** | Integer identifying a service version. | [required] |
180181
**response_object_name** | **String** | Name for the request settings. | [required] |
182+
**create_response_object_request** | Option\<[**CreateResponseObjectRequest**](CreateResponseObjectRequest.md)> | | |
181183

182184
### Return type
183185

@@ -189,7 +191,7 @@ Name | Type | Description | Required | Notes
189191

190192
### HTTP request headers
191193

192-
- **Content-Type**: application/x-www-form-urlencoded
194+
- **Content-Type**: application/json
193195
- **Accept**: application/json
194196

195197
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/TlsConfigurationResponseAttributes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
99
**updated_at** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
1010
**default** | Option<**bool**> | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). | [readonly]
1111
**http_protocols** | Option<**Vec<String>**> | HTTP protocols available on your configuration. | [readonly]
12-
**tls_protocols** | Option<**Vec<f32>**> | TLS protocols available on your configuration. | [readonly]
12+
**tls_protocols** | Option<**Vec<String>**> | TLS protocols available on your configuration. | [readonly]
1313
**bulk** | Option<**bool**> | Signifies whether the configuration is used for Platform TLS or not. | [readonly]
1414

1515
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/TlsConfigurationResponseAttributesAllOf.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**default** | Option<**bool**> | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). | [readonly]
88
**http_protocols** | Option<**Vec<String>**> | HTTP protocols available on your configuration. | [readonly]
9-
**tls_protocols** | Option<**Vec<f32>**> | TLS protocols available on your configuration. | [readonly]
9+
**tls_protocols** | Option<**Vec<String>**> | TLS protocols available on your configuration. | [readonly]
1010
**bulk** | Option<**bool**> | Signifies whether the configuration is used for Platform TLS or not. | [readonly]
1111

1212
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

sig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"G": "4ae2b660", "D": "2452c3f1"}
1+
{"G": "40613202", "D": "01d08f3f"}

src/apis/configuration.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Default for Configuration {
4949

5050
Configuration {
5151
base_path: "https://api.fastly.com".to_owned(),
52-
user_agent: Some("fastly-rust/4.3.0/rust".to_owned()),
52+
user_agent: Some("fastly-rust/4.3.1/rust".to_owned()),
5353
client: reqwest::Client::new(),
5454
basic_auth: None,
5555
oauth_access_token: None,

src/apis/response_object_api.rs

+12-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ pub struct CreateResponseObjectParams {
1717
/// Alphanumeric string identifying the service.
1818
pub service_id: String,
1919
/// Integer identifying a service version.
20-
pub version_id: i32
20+
pub version_id: i32,
21+
pub create_response_object_request: Option<crate::models::CreateResponseObjectRequest>
2122
}
2223

2324
/// struct for passing parameters to the method [`delete_response_object`]
@@ -59,14 +60,17 @@ pub struct UpdateResponseObjectParams {
5960
/// Integer identifying a service version.
6061
pub version_id: i32,
6162
/// Name for the request settings.
62-
pub response_object_name: String
63+
pub response_object_name: String,
64+
pub create_response_object_request: Option<crate::models::CreateResponseObjectRequest>
6365
}
6466

6567

6668
/// struct for typed errors of method [`create_response_object`]
6769
#[derive(Debug, Clone, Serialize, Deserialize)]
6870
#[serde(untagged)]
6971
pub enum CreateResponseObjectError {
72+
Status400(),
73+
Status404(),
7074
UnknownValue(serde_json::Value),
7175
}
7276

@@ -95,6 +99,8 @@ pub enum ListResponseObjectsError {
9599
#[derive(Debug, Clone, Serialize, Deserialize)]
96100
#[serde(untagged)]
97101
pub enum UpdateResponseObjectError {
102+
Status400(),
103+
Status404(),
98104
UnknownValue(serde_json::Value),
99105
}
100106

@@ -106,6 +112,7 @@ pub async fn create_response_object(configuration: &mut configuration::Configura
106112
// unbox the parameters
107113
let service_id = params.service_id;
108114
let version_id = params.version_id;
115+
let create_response_object_request = params.create_response_object_request;
109116

110117

111118
let local_var_client = &local_var_configuration.client;
@@ -124,6 +131,7 @@ pub async fn create_response_object(configuration: &mut configuration::Configura
124131
};
125132
local_var_req_builder = local_var_req_builder.header("Fastly-Key", local_var_value);
126133
};
134+
local_var_req_builder = local_var_req_builder.json(&create_response_object_request);
127135

128136
let local_var_req = local_var_req_builder.build()?;
129137
let local_var_resp = local_var_client.execute(local_var_req).await?;
@@ -321,6 +329,7 @@ pub async fn update_response_object(configuration: &mut configuration::Configura
321329
let service_id = params.service_id;
322330
let version_id = params.version_id;
323331
let response_object_name = params.response_object_name;
332+
let create_response_object_request = params.create_response_object_request;
324333

325334

326335
let local_var_client = &local_var_configuration.client;
@@ -339,6 +348,7 @@ pub async fn update_response_object(configuration: &mut configuration::Configura
339348
};
340349
local_var_req_builder = local_var_req_builder.header("Fastly-Key", local_var_value);
341350
};
351+
local_var_req_builder = local_var_req_builder.json(&create_response_object_request);
342352

343353
let local_var_req = local_var_req_builder.build()?;
344354
let local_var_resp = local_var_client.execute(local_var_req).await?;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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://developer.fastly.com/reference/api/)
5+
*
6+
*/
7+
8+
9+
10+
11+
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12+
pub struct CreateResponseObjectRequest {
13+
/// The name of the response object to create.
14+
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
15+
pub name: Option<String>,
16+
/// The status code the response will have. Defaults to 200.
17+
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
18+
pub status: Option<String>,
19+
/// The status text the response will have. Defaults to 'OK'.
20+
#[serde(rename = "response", skip_serializing_if = "Option::is_none")]
21+
pub response: Option<String>,
22+
/// The content the response will deliver.
23+
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
24+
pub content: Option<String>,
25+
/// The MIME type of your response content.
26+
#[serde(rename = "content_type", skip_serializing_if = "Option::is_none")]
27+
pub content_type: Option<String>,
28+
/// Condition which, if met, will select this configuration during a request. Optional.
29+
#[serde(rename = "request_condition", skip_serializing_if = "Option::is_none")]
30+
pub request_condition: Option<String>,
31+
/// Name of the cache condition controlling when this configuration applies.
32+
#[serde(rename = "cache_condition", skip_serializing_if = "Option::is_none")]
33+
pub cache_condition: Option<String>,
34+
}
35+
36+
impl CreateResponseObjectRequest {
37+
pub fn new() -> CreateResponseObjectRequest {
38+
CreateResponseObjectRequest {
39+
name: None,
40+
status: None,
41+
response: None,
42+
content: None,
43+
content_type: None,
44+
request_condition: None,
45+
cache_condition: None,
46+
}
47+
}
48+
}
49+
50+

src/models/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ pub mod contact_response_all_of;
124124
pub use self::contact_response_all_of::ContactResponseAllOf;
125125
pub mod content;
126126
pub use self::content::Content;
127+
pub mod create_response_object_request;
128+
pub use self::create_response_object_request::CreateResponseObjectRequest;
127129
pub mod customer;
128130
pub use self::customer::Customer;
129131
pub mod customer_response;

src/models/tls_configuration_response_attributes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub struct TlsConfigurationResponseAttributes {
2727
pub http_protocols: Option<Vec<String>>,
2828
/// TLS protocols available on your configuration.
2929
#[serde(rename = "tls_protocols", skip_serializing_if = "Option::is_none")]
30-
pub tls_protocols: Option<Vec<f32>>,
30+
pub tls_protocols: Option<Vec<String>>,
3131
/// Signifies whether the configuration is used for Platform TLS or not.
3232
#[serde(rename = "bulk", skip_serializing_if = "Option::is_none")]
3333
pub bulk: Option<bool>,

src/models/tls_configuration_response_attributes_all_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct TlsConfigurationResponseAttributesAllOf {
1818
pub http_protocols: Option<Vec<String>>,
1919
/// TLS protocols available on your configuration.
2020
#[serde(rename = "tls_protocols", skip_serializing_if = "Option::is_none")]
21-
pub tls_protocols: Option<Vec<f32>>,
21+
pub tls_protocols: Option<Vec<String>>,
2222
/// Signifies whether the configuration is used for Platform TLS or not.
2323
#[serde(rename = "bulk", skip_serializing_if = "Option::is_none")]
2424
pub bulk: Option<bool>,

0 commit comments

Comments
 (0)