Skip to content

Commit

Permalink
Correct string name for last modified.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Jan 9, 2024
1 parent 941b516 commit 38ff60b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 accept string or dateTime and convert this to an ISO String
* [ ] If-unmodified-since should called `expectedLastModifiedTime`, accept string or dateTime and convert this to an ISO String
4 changes: 2 additions & 2 deletions docs/AccessRecordsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ Name | Type | Description | Required | Notes

## update_record

> update_record(record_id, access_record, if_unmodified_since)
> 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)
Expand All @@ -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] |
**if_unmodified_since** | Option<**String**> | The expected last time the record was modified. (<a href=\"https://tools.ietf.org/html/rfc7231#section-7.1.1.1\" target=\"_blank\">format</a>) | |
**expected_last_modified_time** | Option<**String**> | The expected last time the record was modified. | |

### Return type

Expand Down
8 changes: 4 additions & 4 deletions src/apis/access_records_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ pub struct RespondToInviteParams {
/// struct for passing parameters to the method [`update_record`]
#[derive(Default, Clone, Debug)]
pub struct UpdateRecordParams {
/// The expected last time the record was modified. (<a href=\"https://tools.ietf.org/html/rfc7231#section-7.1.1.1\" target=\"_blank\">format</a>)
pub if_unmodified_since: Option<String>
/// The expected last time the record was modified.
pub expected_last_modified_time: Option<String>
}


Expand Down Expand Up @@ -532,15 +532,15 @@ impl AccessRecordApi {
let local_var_configuration = &self.configuration;

// unbox the parameters
let if_unmodified_since = params.if_unmodified_since;
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) = if_unmodified_since {
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());
}
local_var_req_builder = local_var_req_builder.json(&access_record);
Expand Down
1 change: 1 addition & 0 deletions src/apis/groups_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pub enum UpdateGroupError {
Status401(),
Status403(),
Status404(),
Status412(),
UnknownValue(serde_json::Value),
}

Expand Down

0 comments on commit 38ff60b

Please sign in to comment.