From a1e5b43bb00fb0a176d1a60c7e659685d7be03b9 Mon Sep 17 00:00:00 2001 From: Rajat Bajaj Date: Fri, 17 Jan 2025 11:16:10 +0530 Subject: [PATCH] updated created_at/updated_at type --- management/management.gen.go | 8 ++++---- management/management.gen_test.go | 4 ++-- management/token_exchange_profiles.go | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/management/management.gen.go b/management/management.gen.go index e287fd14..dbea47b1 100644 --- a/management/management.gen.go +++ b/management/management.gen.go @@ -11353,9 +11353,9 @@ func (t *TokenExchangeProfile) GetActionID() string { } // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (t *TokenExchangeProfile) GetCreatedAt() string { +func (t *TokenExchangeProfile) GetCreatedAt() time.Time { if t == nil || t.CreatedAt == nil { - return "" + return time.Time{} } return *t.CreatedAt } @@ -11393,9 +11393,9 @@ func (t *TokenExchangeProfile) GetType() string { } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (t *TokenExchangeProfile) GetUpdatedAt() string { +func (t *TokenExchangeProfile) GetUpdatedAt() time.Time { if t == nil || t.UpdatedAt == nil { - return "" + return time.Time{} } return *t.UpdatedAt } diff --git a/management/management.gen_test.go b/management/management.gen_test.go index fbe8ac75..aef5b5cb 100644 --- a/management/management.gen_test.go +++ b/management/management.gen_test.go @@ -14259,7 +14259,7 @@ func TestTokenExchangeProfile_GetActionID(tt *testing.T) { } func TestTokenExchangeProfile_GetCreatedAt(tt *testing.T) { - var zeroValue string + var zeroValue time.Time t := &TokenExchangeProfile{CreatedAt: &zeroValue} t.GetCreatedAt() t = &TokenExchangeProfile{} @@ -14309,7 +14309,7 @@ func TestTokenExchangeProfile_GetType(tt *testing.T) { } func TestTokenExchangeProfile_GetUpdatedAt(tt *testing.T) { - var zeroValue string + var zeroValue time.Time t := &TokenExchangeProfile{UpdatedAt: &zeroValue} t.GetUpdatedAt() t = &TokenExchangeProfile{} diff --git a/management/token_exchange_profiles.go b/management/token_exchange_profiles.go index 158c251d..6d2ea88f 100644 --- a/management/token_exchange_profiles.go +++ b/management/token_exchange_profiles.go @@ -3,6 +3,7 @@ package management import ( "context" "encoding/json" + "time" ) // TokenExchangeProfile represents a token exchange profile. @@ -18,9 +19,9 @@ type TokenExchangeProfile struct { // Type is the type of the token exchange profile. Type *string `json:"type,omitempty"` // CreatedAt is the date and time when the token exchange profile was created. - CreatedAt *string `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt is the date and time when the token exchange profile was last updated. - UpdatedAt *string `json:"updated_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` } // TokenExchangeProfileList is a list of TokenExchangeProfiles.