From 573474176fd7a60b35b443f9422853127084fbfc Mon Sep 17 00:00:00 2001 From: Tien Nguyen Date: Fri, 6 Sep 2024 14:36:42 -0400 Subject: [PATCH] fix group owner Signed-off-by: Tien Nguyen --- ...a-management-APIs-oasv3-noEnums-inheritance.yaml | 2 +- CHANGELOG.md | 5 ++++- okta/api/openapi.yaml | 4 ++-- okta/docs/GroupOwner.md | 8 ++++---- okta/model_group_owner.go | 13 ++++++------- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml b/.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml index f3e2465a..01a06d08 100644 --- a/.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml +++ b/.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml @@ -38068,7 +38068,7 @@ components: lastUpdated: description: Timestamp when the group owner was last updated type: string - format: date-time + pattern: ^\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} \w{3} \d{4}$ readOnly: true originId: description: The ID of the app instance if the `originType` is `APPLICATION`. This value is `NULL` if `originType` is `OKTA_DIRECTORY`. diff --git a/CHANGELOG.md b/CHANGELOG.md index 75253f29..3120fc2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ # Changelog Running changelog of releases since `2.0.0-rc.4` +## v5.0.2 + - Fix unmarshalling error for Group owner object lastUpdated (#484) Thanks [@duytiennguyen-okta] + ## v5.0.1 - - Fix object that does not have additional properties (#466) Thanks [@duytiennguyen-okta] + - Fix unmarshalling error for Log object that does not have additional properties (#484) Thanks [@duytiennguyen-okta] ## v5.0.0 - Update newest spec (#463) Thanks [@duytiennguyen-okta] diff --git a/okta/api/openapi.yaml b/okta/api/openapi.yaml index 6519d6d1..e61acc87 100644 --- a/okta/api/openapi.yaml +++ b/okta/api/openapi.yaml @@ -58621,7 +58621,7 @@ components: type: object GroupOwner: example: - lastUpdated: 2000-01-23T04:56:07.000+00:00 + lastUpdated: lastUpdated originType: originType originId: originId displayName: displayName @@ -58638,7 +58638,7 @@ components: type: string lastUpdated: description: Timestamp when the group owner was last updated - format: date-time + pattern: "^\\w{3} \\w{3} \\d{2} \\d{2}:\\d{2}:\\d{2} \\w{3} \\d{4}$" readOnly: true type: string originId: diff --git a/okta/docs/GroupOwner.md b/okta/docs/GroupOwner.md index 59ff23ae..9baa0e1b 100644 --- a/okta/docs/GroupOwner.md +++ b/okta/docs/GroupOwner.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **DisplayName** | Pointer to **string** | The display name of the group owner | [optional] [readonly] **Id** | Pointer to **string** | The `id` of the group owner | [optional] -**LastUpdated** | Pointer to **time.Time** | Timestamp when the group owner was last updated | [optional] [readonly] +**LastUpdated** | Pointer to **string** | Timestamp when the group owner was last updated | [optional] [readonly] **OriginId** | Pointer to **string** | The ID of the app instance if the `originType` is `APPLICATION`. This value is `NULL` if `originType` is `OKTA_DIRECTORY`. | [optional] **OriginType** | Pointer to **string** | The source where group ownership is managed | [optional] **Resolved** | Pointer to **bool** | If `originType`is APPLICATION, this parameter is set to `FALSE` until the owner’s `originId` is reconciled with an associated Okta ID. | [optional] @@ -83,20 +83,20 @@ HasId returns a boolean if a field has been set. ### GetLastUpdated -`func (o *GroupOwner) GetLastUpdated() time.Time` +`func (o *GroupOwner) GetLastUpdated() string` GetLastUpdated returns the LastUpdated field if non-nil, zero value otherwise. ### GetLastUpdatedOk -`func (o *GroupOwner) GetLastUpdatedOk() (*time.Time, bool)` +`func (o *GroupOwner) GetLastUpdatedOk() (*string, bool)` GetLastUpdatedOk returns a tuple with the LastUpdated field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastUpdated -`func (o *GroupOwner) SetLastUpdated(v time.Time)` +`func (o *GroupOwner) SetLastUpdated(v string)` SetLastUpdated sets LastUpdated field to given value. diff --git a/okta/model_group_owner.go b/okta/model_group_owner.go index c272a5cb..449b8017 100644 --- a/okta/model_group_owner.go +++ b/okta/model_group_owner.go @@ -26,7 +26,6 @@ package okta import ( "encoding/json" - "time" ) // GroupOwner struct for GroupOwner @@ -36,7 +35,7 @@ type GroupOwner struct { // The `id` of the group owner Id *string `json:"id,omitempty"` // Timestamp when the group owner was last updated - LastUpdated *time.Time `json:"lastUpdated,omitempty"` + LastUpdated *string `json:"lastUpdated,omitempty"` // The ID of the app instance if the `originType` is `APPLICATION`. This value is `NULL` if `originType` is `OKTA_DIRECTORY`. OriginId *string `json:"originId,omitempty"` // The source where group ownership is managed @@ -132,9 +131,9 @@ func (o *GroupOwner) SetId(v string) { } // GetLastUpdated returns the LastUpdated field value if set, zero value otherwise. -func (o *GroupOwner) GetLastUpdated() time.Time { +func (o *GroupOwner) GetLastUpdated() string { if o == nil || o.LastUpdated == nil { - var ret time.Time + var ret string return ret } return *o.LastUpdated @@ -142,7 +141,7 @@ func (o *GroupOwner) GetLastUpdated() time.Time { // GetLastUpdatedOk returns a tuple with the LastUpdated field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GroupOwner) GetLastUpdatedOk() (*time.Time, bool) { +func (o *GroupOwner) GetLastUpdatedOk() (*string, bool) { if o == nil || o.LastUpdated == nil { return nil, false } @@ -158,8 +157,8 @@ func (o *GroupOwner) HasLastUpdated() bool { return false } -// SetLastUpdated gets a reference to the given time.Time and assigns it to the LastUpdated field. -func (o *GroupOwner) SetLastUpdated(v time.Time) { +// SetLastUpdated gets a reference to the given string and assigns it to the LastUpdated field. +func (o *GroupOwner) SetLastUpdated(v string) { o.LastUpdated = &v }