Skip to content

Commit

Permalink
Generated v4.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 19, 2024
1 parent ac14ed0 commit 2c03865
Show file tree
Hide file tree
Showing 14 changed files with 100 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [v4.3.1](https://github.com/fastly/fastly-rust/releases/tag/release/v4.3.1) (2024-02-19)

**Bug fixes:**

- fix(response_object): strongly type response_object create_update requests
- fix(tls_configurations): fix `tls_protocols` field to be a string array type

## [v4.3.0](https://github.com/fastly/fastly-rust/releases/tag/release/v4.3.0) (2023-11-29)

**Enhancements:**
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fastly-api"
version = "4.3.0"
version = "4.3.1"
authors = ["Fastly <[email protected]>"]
edition = "2021"
description = "Fastly API client"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Rust 2021 Edition
Add the following to `Cargo.toml` under `[dependencies]`:

```toml
fastly-api = "4.3.0"
fastly-api = "4.3.1"
```

## Usage
Expand Down
17 changes: 17 additions & 0 deletions docs/CreateResponseObjectRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CreateResponseObjectRequest

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | Option<**String**> | The name of the response object to create. |
**status** | Option<**String**> | The status code the response will have. Defaults to 200. |
**response** | Option<**String**> | The status text the response will have. Defaults to 'OK'. |
**content** | Option<**String**> | The content the response will deliver. |
**content_type** | Option<**String**> | The MIME type of your response content. |
**request_condition** | Option<**String**> | Condition which, if met, will select this configuration during a request. Optional. |
**cache_condition** | Option<**String**> | Name of the cache condition controlling when this configuration applies. |

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


6 changes: 4 additions & 2 deletions docs/ResponseObjectApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**service_id** | **String** | Alphanumeric string identifying the service. | [required] |
**version_id** | **i32** | Integer identifying a service version. | [required] |
**create_response_object_request** | Option\<[**CreateResponseObjectRequest**](CreateResponseObjectRequest.md)> | | |

### Return type

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

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: application/json
- **Accept**: application/json

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

### Return type

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

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/TlsConfigurationResponseAttributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**updated_at** | Option<**String**> | Date and time in ISO 8601 format. | [readonly]
**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]
**http_protocols** | Option<**Vec<String>**> | HTTP protocols available on your configuration. | [readonly]
**tls_protocols** | Option<**Vec<f32>**> | TLS protocols available on your configuration. | [readonly]
**tls_protocols** | Option<**Vec<String>**> | TLS protocols available on your configuration. | [readonly]
**bulk** | Option<**bool**> | Signifies whether the configuration is used for Platform TLS or not. | [readonly]

[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/TlsConfigurationResponseAttributesAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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]
**http_protocols** | Option<**Vec<String>**> | HTTP protocols available on your configuration. | [readonly]
**tls_protocols** | Option<**Vec<f32>**> | TLS protocols available on your configuration. | [readonly]
**tls_protocols** | Option<**Vec<String>**> | TLS protocols available on your configuration. | [readonly]
**bulk** | Option<**bool**> | Signifies whether the configuration is used for Platform TLS or not. | [readonly]

[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion sig.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"G": "4ae2b660", "D": "2452c3f1"}
{"G": "40613202", "D": "01d08f3f"}
2 changes: 1 addition & 1 deletion src/apis/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Default for Configuration {

Configuration {
base_path: "https://api.fastly.com".to_owned(),
user_agent: Some("fastly-rust/4.3.0/rust".to_owned()),
user_agent: Some("fastly-rust/4.3.1/rust".to_owned()),
client: reqwest::Client::new(),
basic_auth: None,
oauth_access_token: None,
Expand Down
14 changes: 12 additions & 2 deletions src/apis/response_object_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ pub struct CreateResponseObjectParams {
/// Alphanumeric string identifying the service.
pub service_id: String,
/// Integer identifying a service version.
pub version_id: i32
pub version_id: i32,
pub create_response_object_request: Option<crate::models::CreateResponseObjectRequest>
}

/// struct for passing parameters to the method [`delete_response_object`]
Expand Down Expand Up @@ -59,14 +60,17 @@ pub struct UpdateResponseObjectParams {
/// Integer identifying a service version.
pub version_id: i32,
/// Name for the request settings.
pub response_object_name: String
pub response_object_name: String,
pub create_response_object_request: Option<crate::models::CreateResponseObjectRequest>
}


/// struct for typed errors of method [`create_response_object`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateResponseObjectError {
Status400(),
Status404(),
UnknownValue(serde_json::Value),
}

Expand Down Expand Up @@ -95,6 +99,8 @@ pub enum ListResponseObjectsError {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateResponseObjectError {
Status400(),
Status404(),
UnknownValue(serde_json::Value),
}

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


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

let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
Expand Down Expand Up @@ -321,6 +329,7 @@ pub async fn update_response_object(configuration: &mut configuration::Configura
let service_id = params.service_id;
let version_id = params.version_id;
let response_object_name = params.response_object_name;
let create_response_object_request = params.create_response_object_request;


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

let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
Expand Down
50 changes: 50 additions & 0 deletions src/models/create_response_object_request.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Fastly API
*
* 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/)
*
*/




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateResponseObjectRequest {
/// The name of the response object to create.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// The status code the response will have. Defaults to 200.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// The status text the response will have. Defaults to 'OK'.
#[serde(rename = "response", skip_serializing_if = "Option::is_none")]
pub response: Option<String>,
/// The content the response will deliver.
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
/// The MIME type of your response content.
#[serde(rename = "content_type", skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
/// Condition which, if met, will select this configuration during a request. Optional.
#[serde(rename = "request_condition", skip_serializing_if = "Option::is_none")]
pub request_condition: Option<String>,
/// Name of the cache condition controlling when this configuration applies.
#[serde(rename = "cache_condition", skip_serializing_if = "Option::is_none")]
pub cache_condition: Option<String>,
}

impl CreateResponseObjectRequest {
pub fn new() -> CreateResponseObjectRequest {
CreateResponseObjectRequest {
name: None,
status: None,
response: None,
content: None,
content_type: None,
request_condition: None,
cache_condition: None,
}
}
}


2 changes: 2 additions & 0 deletions src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ pub mod contact_response_all_of;
pub use self::contact_response_all_of::ContactResponseAllOf;
pub mod content;
pub use self::content::Content;
pub mod create_response_object_request;
pub use self::create_response_object_request::CreateResponseObjectRequest;
pub mod customer;
pub use self::customer::Customer;
pub mod customer_response;
Expand Down
2 changes: 1 addition & 1 deletion src/models/tls_configuration_response_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct TlsConfigurationResponseAttributes {
pub http_protocols: Option<Vec<String>>,
/// TLS protocols available on your configuration.
#[serde(rename = "tls_protocols", skip_serializing_if = "Option::is_none")]
pub tls_protocols: Option<Vec<f32>>,
pub tls_protocols: Option<Vec<String>>,
/// Signifies whether the configuration is used for Platform TLS or not.
#[serde(rename = "bulk", skip_serializing_if = "Option::is_none")]
pub bulk: Option<bool>,
Expand Down
2 changes: 1 addition & 1 deletion src/models/tls_configuration_response_attributes_all_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct TlsConfigurationResponseAttributesAllOf {
pub http_protocols: Option<Vec<String>>,
/// TLS protocols available on your configuration.
#[serde(rename = "tls_protocols", skip_serializing_if = "Option::is_none")]
pub tls_protocols: Option<Vec<f32>>,
pub tls_protocols: Option<Vec<String>>,
/// Signifies whether the configuration is used for Platform TLS or not.
#[serde(rename = "bulk", skip_serializing_if = "Option::is_none")]
pub bulk: Option<bool>,
Expand Down

0 comments on commit 2c03865

Please sign in to comment.