diff --git a/contributing.md b/contributing.md
index 9b5371b..2a65355 100644
--- a/contributing.md
+++ b/contributing.md
@@ -56,4 +56,4 @@ podman stop $CID && podman rm $CID
* [ ] Validate all enums are enums and can be null when they should be.
* [ ] Remove LocalHost from the docs
* [ ] Tests
-* [ ] If-unmodified-since should called `expectedLastModifiedTime`, accept string or dateTime and convert this to an ISO String
\ No newline at end of file
+* [x] If-unmodified-since should called `expectedLastModifiedTime`, accept string or dateTime and convert this to an ISO String
\ No newline at end of file
diff --git a/docs/AccessRecord.md b/docs/AccessRecord.md
index 32b2578..54ba4fd 100644
--- a/docs/AccessRecord.md
+++ b/docs/AccessRecord.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**name** | **String** | A helpful name for this record |
**description** | Option<**String**> | More details about this record | [optional]
**capacity** | Option<**f32**> | Percentage capacity of record that is filled. | [optional][readonly]
-**last_updated** | Option<**String**> | The expected last time the record was updated | [optional][readonly]
+**last_updated** | Option<**DateTime**> | The expected last time the record was updated | [optional][readonly]
**status** | Option<**String**> | Current status of the access record. | [optional][readonly]
**users** | Option> | The list of users this record applies to | [optional]
**admins** | Option> | The list of admin that can edit this record even if they do not have global record edit permissions. | [optional]
diff --git a/docs/AccessRecordsApi.md b/docs/AccessRecordsApi.md
index 70ade2b..1d0384a 100644
--- a/docs/AccessRecordsApi.md
+++ b/docs/AccessRecordsApi.md
@@ -307,7 +307,7 @@ Name | Type | Description | Required | Notes
## update_record
-> update_record(record_id, access_record, expected_last_modified_time)
+> update_record(record_id, access_record, { expected_last_modified_time })
Update access record
Updates an access record adding or removing user permissions to resources. (Records have a maximum size of ~100KB)
@@ -319,7 +319,7 @@ Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**record_id** | **String** | The identifier of the access record. | [required] |
**access_record** | [**AccessRecord**](AccessRecord.md) | | [required] |
-**expected_last_modified_time** | Option<**String**> | The expected last time the record was modified. | |
+**expected_last_modified_time** | Option<**DateTime**> | The expected last time the record was modified. | |
### Return type
diff --git a/docs/AccessRequest.md b/docs/AccessRequest.md
index b62c75c..1832d31 100644
--- a/docs/AccessRequest.md
+++ b/docs/AccessRequest.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**request_id** | **String** | Unique identifier for the request. | [readonly]
-**last_updated** | Option<**String**> | The expected last time the request was updated | [optional][readonly]
+**last_updated** | Option<**DateTime**> | The expected last time the request was updated | [optional][readonly]
**status** | Option<**String**> | Current status of the access request. | [optional][readonly]
**access** | [**crate::models::AccessTemplate**](AccessTemplate.md) | |
**links** | Option<[**crate::models::Links**](Links.md)> | |
diff --git a/docs/Account.md b/docs/Account.md
index 9598a98..2f2609d 100644
--- a/docs/Account.md
+++ b/docs/Account.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_id** | **String** | |
-**created_time** | **String** | | [readonly]
+**created_time** | **DateTime** | | [readonly]
**name** | Option<**String**> | | [optional]
**company** | **serde_json::Value** | |
**links** | Option<[**crate::models::Links**](Links.md)> | |
diff --git a/docs/Client.md b/docs/Client.md
index b77d416..b452ed5 100644
--- a/docs/Client.md
+++ b/docs/Client.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client_id** | **String** | The unique ID of the client. | [readonly]
-**created_time** | **String** | | [readonly]
+**created_time** | **DateTime** | | [readonly]
**name** | Option<**String**> | The name of the client | [optional]
**options** | Option<[**crate::models::ClientOptions**](Client_options.md)> | | [optional]
**verification_keys** | Option> | A list of the service client access keys. | [optional][readonly]
diff --git a/docs/Connection.md b/docs/Connection.md
index ea55eda..2cd2643 100644
--- a/docs/Connection.md
+++ b/docs/Connection.md
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
**client_secret** | Option<**String**> | | [optional]
**data** | Option<[**crate::models::ConnectionData**](Connection_data.md)> | | [optional]
**default_connection_properties** | Option<[**crate::models::ConnectionDefaultConnectionProperties**](ConnectionDefaultConnectionProperties.md)> | | [optional]
-**created_time** | Option<**String**> | | [optional][readonly]
+**created_time** | Option<**DateTime**> | | [optional][readonly]
**tags** | Option<**::std::collections::HashMap**> | The tags associated with this resource, this property is an map. { key1: value1, key2: value2 } | [optional]
[[API Models]](./README.md#documentation-for-models) ☆ [[API Endpoints]](./README.md#documentation-for-api-endpoints) ☆ [[Back to Repo]](../README.md)
diff --git a/docs/Extension.md b/docs/Extension.md
index 39fd8aa..3a08874 100644
--- a/docs/Extension.md
+++ b/docs/Extension.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**extension_id** | **String** | | [readonly]
**name** | Option<**String**> | The name of the extension. This name is visible in the Authress management portal | [optional]
-**created_time** | **String** | | [readonly]
+**created_time** | **DateTime** | | [readonly]
**application** | Option<[**crate::models::ExtensionApplication**](ExtensionApplication.md)> | | [optional]
**client** | [**crate::models::ExtensionClient**](ExtensionClient.md) | |
**tags** | Option<**::std::collections::HashMap**> | The tags associated with this resource, this property is an map. { key1: value1, key2: value2 } | [optional]
diff --git a/docs/Group.md b/docs/Group.md
index 6b5fce4..2ca8260 100644
--- a/docs/Group.md
+++ b/docs/Group.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**group_id** | Option<**String**> | Unique identifier for the groupId, can be specified on record creation. | [optional]
**name** | **String** | A helpful name for this record |
-**last_updated** | Option<**String**> | The expected last time the group was updated | [optional][readonly]
+**last_updated** | Option<**DateTime**> | The expected last time the group was updated | [optional][readonly]
**users** | Vec<**[crate::models::User](User.md)**> | The list of users in this group |
**admins** | Vec<**[crate::models::User](User.md)**> | The list of admins that can edit this record even if they do not have global record edit permissions. |
**links** | Option<[**crate::models::Links**](Links.md)> | |
diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md
index d119e9b..fd7e6c8 100644
--- a/docs/GroupsApi.md
+++ b/docs/GroupsApi.md
@@ -100,7 +100,7 @@ Name | Type | Description | Required | Notes
## update_group
-> crate::models::Group update_group(group_id, group)
+> crate::models::Group update_group(group_id, group, { expected_last_modified_time })
Update a group
Updates a group adding or removing user. Change a group updates the permissions and roles the users have access to. (Groups have a maximum size of ~100KB)
@@ -112,6 +112,7 @@ Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | The identifier of the group. | [required] |
**group** | [**Group**](Group.md) | | [required] |
+**expected_last_modified_time** | Option<**DateTime**> | The expected last time the group was modified. | |
### Return type
diff --git a/docs/Tenant.md b/docs/Tenant.md
index d191836..9b81b38 100644
--- a/docs/Tenant.md
+++ b/docs/Tenant.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**tenant_lookup_identifier** | Option<**String**> | | [optional]
**data** | Option<[**crate::models::TenantData**](Tenant_data.md)> | | [optional]
**connection** | Option<[**crate::models::TenantConnection**](Tenant_connection.md)> | | [optional]
-**created_time** | Option<**String**> | | [optional][readonly]
+**created_time** | Option<**DateTime**> | | [optional][readonly]
[[API Models]](./README.md#documentation-for-models) ☆ [[API Endpoints]](./README.md#documentation-for-api-endpoints) ☆ [[Back to Repo]](../README.md)
diff --git a/src/apis/access_records_api.rs b/src/apis/access_records_api.rs
index 5f6cb14..c6d1675 100644
--- a/src/apis/access_records_api.rs
+++ b/src/apis/access_records_api.rs
@@ -1,4 +1,5 @@
+use chrono::{DateTime, Utc};
use reqwest;
use crate::{apis::ResponseContent, AuthressSettings};
@@ -37,7 +38,7 @@ pub struct RespondToInviteParams {
#[derive(Default, Clone, Debug)]
pub struct UpdateRecordParams {
/// The expected last time the record was modified.
- pub expected_last_modified_time: Option
+ pub expected_last_modified_time: Option>
}
@@ -531,17 +532,13 @@ impl AccessRecordApi {
pub async fn update_record(&self, record_id: String, access_record: crate::models::AccessRecord, params: UpdateRecordParams) -> Result<(), Error> {
let local_var_configuration = &self.configuration;
- // unbox the parameters
- let expected_last_modified_time = params.expected_last_modified_time;
-
-
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/v1/records/{recordId}", "", recordId=crate::apis::urlencode(record_id));
let mut local_var_req_builder = local_var_configuration.get_request_builder(reqwest::Method::PUT, local_var_uri_str);
- if let Some(local_var_param_value) = expected_last_modified_time {
- local_var_req_builder = local_var_req_builder.header("If-Unmodified-Since", local_var_param_value.to_string());
+ if let Some(local_var_param_value) = params.expected_last_modified_time {
+ local_var_req_builder = local_var_req_builder.header("If-Unmodified-Since", local_var_param_value.to_rfc3339_opts(chrono::SecondsFormat::Millis, true));
}
local_var_req_builder = local_var_req_builder.json(&access_record);
diff --git a/src/apis/groups_api.rs b/src/apis/groups_api.rs
index b6c0700..515cd7b 100644
--- a/src/apis/groups_api.rs
+++ b/src/apis/groups_api.rs
@@ -15,6 +15,13 @@ pub struct GetGroupsParams {
pub filter: Option
}
+/// struct for passing parameters to the method [`update_group`]
+#[derive(Default, Clone, Debug)]
+pub struct UpdateGroupParams {
+ /// The expected last time the group was modified.
+ pub expected_last_modified_time: Option>
+}
+
/// struct for typed errors of method [`create_group`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
@@ -178,13 +185,18 @@ impl GroupsApi {
}
/// Updates a group adding or removing user. Change a group updates the permissions and roles the users have access to. (Groups have a maximum size of ~100KB)
- pub async fn update_group(&self, group_id: String, group: crate::models::Group) -> Result> {
+ pub async fn update_group(&self, group_id: String, group: crate::models::Group, params: UpdateGroupParams) -> Result> {
let local_var_configuration = &self.configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/v1/groups/{groupId}", "", groupId=crate::apis::urlencode(group_id));
let mut local_var_req_builder = local_var_configuration.get_request_builder(reqwest::Method::PUT, local_var_uri_str);
+
+ if let Some(local_var_param_value) = params.expected_last_modified_time {
+ local_var_req_builder = local_var_req_builder.header("If-Unmodified-Since", local_var_param_value.to_rfc3339_opts(chrono::SecondsFormat::Millis, true));
+ }
+
local_var_req_builder = local_var_req_builder.json(&group);
let local_var_req = local_var_req_builder.build()?;
diff --git a/src/models/access_record.rs b/src/models/access_record.rs
index a096195..9c817da 100644
--- a/src/models/access_record.rs
+++ b/src/models/access_record.rs
@@ -18,7 +18,7 @@ pub struct AccessRecord {
pub capacity: Option,
/// The expected last time the record was updated
#[serde(rename = "lastUpdated", skip_serializing_if = "Option::is_none")]
- pub last_updated: Option,
+ pub last_updated: Option>,
/// Current status of the access record.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option,
diff --git a/src/models/access_request.rs b/src/models/access_request.rs
index b2b8656..c9a3e72 100644
--- a/src/models/access_request.rs
+++ b/src/models/access_request.rs
@@ -9,7 +9,7 @@ pub struct AccessRequest {
pub request_id: String,
/// The expected last time the request was updated
#[serde(rename = "lastUpdated", skip_serializing_if = "Option::is_none")]
- pub last_updated: Option,
+ pub last_updated: Option>,
/// Current status of the access request.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option,
diff --git a/src/models/account.rs b/src/models/account.rs
index e3266f1..7bd7929 100644
--- a/src/models/account.rs
+++ b/src/models/account.rs
@@ -6,7 +6,7 @@ pub struct Account {
#[serde(rename = "accountId")]
pub account_id: String,
#[serde(rename = "createdTime")]
- pub created_time: String,
+ pub created_time: Option>,
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub name: Option