From dfa1d8727496d51ab59771fa3a3038a5aeebe33d Mon Sep 17 00:00:00 2001 From: Murad Biashimov Date: Thu, 8 Feb 2024 16:16:15 +0100 Subject: [PATCH] refactor: format time as string --- generator/models.go | 14 +- handler/account/account.go | 57 ++++--- .../accountauthentication.go | 35 +++-- handler/accountteam/accountteam.go | 45 +++--- .../accountteammember/accountteammember.go | 15 +- handler/billinggroup/billinggroup.go | 65 ++++---- handler/domain/domain.go | 57 ++++--- handler/flinkapplication/flinkapplication.go | 53 ++++--- .../flinkapplicationdeployment.go | 133 ++++++++-------- .../flinkapplicationversion.go | 7 +- handler/kafkatopic/kafkatopic.go | 1 + handler/opensearch/opensearch.go | 3 +- handler/organization/organization.go | 51 +++---- handler/organizationuser/organizationuser.go | 77 +++++----- handler/project/project.go | 59 ++++---- handler/projectbilling/projectbilling.go | 49 +++--- handler/service/service.go | 93 ++++++------ handler/serviceuser/serviceuser.go | 43 +++--- handler/user/user.go | 143 +++++++++--------- handler/usergroup/usergroup.go | 67 ++++---- handler/vpc/vpc.go | 49 +++--- 21 files changed, 548 insertions(+), 568 deletions(-) diff --git a/generator/models.go b/generator/models.go index 18c68f3..5cec0e4 100644 --- a/generator/models.go +++ b/generator/models.go @@ -121,8 +121,6 @@ const ( SchemaTypeNumber = "number" // SchemaTypeBoolean represents a boolean schema type. SchemaTypeBoolean = "boolean" - // SchemaTypeTime represents a time schema type. - SchemaTypeTime = "time" ) // Schema represents a parsed OpenAPI schema. @@ -202,14 +200,6 @@ func (s *Schema) init(doc *Doc, scope map[string]*Schema, name string) { s.CamelName = strcase.ToCamel(s.parent.CamelName) } - if s.Type == SchemaTypeString { - parts := strings.Split(s.name, "_") - switch parts[len(parts)-1] { - case "at", "time": - s.Type = SchemaTypeTime - } - } - if s.isArray() { s.Items.parent = s s.Items.required = true // a workaround to not have slices with pointers @@ -283,7 +273,7 @@ func (s *Schema) isArray() bool { func (s *Schema) isScalar() bool { switch s.Type { - case SchemaTypeString, SchemaTypeInteger, SchemaTypeNumber, SchemaTypeBoolean, SchemaTypeTime: + case SchemaTypeString, SchemaTypeInteger, SchemaTypeNumber, SchemaTypeBoolean: return true } @@ -325,8 +315,6 @@ func getScalarType(s *Schema) *jen.Statement { return jen.Float64() case SchemaTypeBoolean: return jen.Bool() - case SchemaTypeTime: - return jen.Qual("time", "Time") default: panic(fmt.Errorf("unknown type %q", s.Type)) } diff --git a/handler/account/account.go b/handler/account/account.go index 026555f..6a677ea 100644 --- a/handler/account/account.go +++ b/handler/account/account.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -307,7 +306,7 @@ type AccountCreateOut struct { AccountId string `json:"account_id"` AccountName string `json:"account_name"` AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Features map[string]any `json:"features,omitempty"` IsAccountMember *bool `json:"is_account_member,omitempty"` IsAccountOwner bool `json:"is_account_owner"` @@ -316,14 +315,14 @@ type AccountCreateOut struct { PrimaryBillingGroupId string `json:"primary_billing_group_id"` RootAccountId string `json:"root_account_id"` TenantId string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AccountGetOut struct { AccessSource string `json:"access_source,omitempty"` AccountId string `json:"account_id"` AccountName string `json:"account_name"` AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Features map[string]any `json:"features,omitempty"` IsAccountMember *bool `json:"is_account_member,omitempty"` IsAccountOwner bool `json:"is_account_owner"` @@ -332,7 +331,7 @@ type AccountGetOut struct { PrimaryBillingGroupId string `json:"primary_billing_group_id"` RootAccountId string `json:"root_account_id"` TenantId string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AccountMoveIn struct { ParentAccountId string `json:"parent_account_id"` @@ -342,7 +341,7 @@ type AccountMoveOut struct { AccountId string `json:"account_id"` AccountName string `json:"account_name"` AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Features map[string]any `json:"features,omitempty"` IsAccountMember *bool `json:"is_account_member,omitempty"` IsAccountOwner bool `json:"is_account_owner"` @@ -351,14 +350,14 @@ type AccountMoveOut struct { PrimaryBillingGroupId string `json:"primary_billing_group_id"` RootAccountId string `json:"root_account_id"` TenantId string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AccountOut struct { AccessSource string `json:"access_source,omitempty"` AccountId string `json:"account_id"` AccountName string `json:"account_name"` AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Features map[string]any `json:"features,omitempty"` IsAccountMember *bool `json:"is_account_member,omitempty"` IsAccountOwner bool `json:"is_account_owner"` @@ -367,7 +366,7 @@ type AccountOut struct { PrimaryBillingGroupId string `json:"primary_billing_group_id"` RootAccountId string `json:"root_account_id"` TenantId string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AccountProjectsListOut struct { Projects []ProjectOut `json:"projects"` @@ -382,7 +381,7 @@ type AccountUpdateOut struct { AccountId string `json:"account_id"` AccountName string `json:"account_name"` AccountOwnerTeamId string `json:"account_owner_team_id"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Features map[string]any `json:"features,omitempty"` IsAccountMember *bool `json:"is_account_member,omitempty"` IsAccountOwner bool `json:"is_account_owner"` @@ -391,7 +390,7 @@ type AccountUpdateOut struct { PrimaryBillingGroupId string `json:"primary_billing_group_id"` RootAccountId string `json:"root_account_id"` TenantId string `json:"tenant_id,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AccountUsersSearchIn struct { Limit *int `json:"limit,omitempty"` @@ -430,14 +429,14 @@ type EndOfLifeExtensionOut struct { Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` } type EventOut struct { - AccountId string `json:"account_id"` - ActionDescription string `json:"action_description"` - ActionType string `json:"action_type"` - Actor string `json:"actor"` - ActorUserId string `json:"actor_user_id"` - CreateTime time.Time `json:"create_time"` - LogEntryId int `json:"log_entry_id"` - TeamId string `json:"team_id"` + AccountId string `json:"account_id"` + ActionDescription string `json:"action_description"` + ActionType string `json:"action_type"` + Actor string `json:"actor"` + ActorUserId string `json:"actor_user_id"` + CreateTime string `json:"create_time"` + LogEntryId int `json:"log_entry_id"` + TeamId string `json:"team_id"` } type OrderByType string @@ -482,7 +481,7 @@ type ProjectOut struct { Tags map[string]string `json:"tags,omitempty"` TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TenantId string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` + TrialExpirationTime string `json:"trial_expiration_time,omitempty"` VatId string `json:"vat_id"` ZipCode string `json:"zip_code,omitempty"` } @@ -495,15 +494,15 @@ type UserOut struct { UserId string `json:"user_id"` } type UserProjectOut struct { - AccessType string `json:"access_type,omitempty"` - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - MemberType string `json:"member_type"` - ProjectName string `json:"project_name"` - RealName string `json:"real_name"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UserEmail string `json:"user_email"` + AccessType string `json:"access_type,omitempty"` + AccountId string `json:"account_id"` + CreateTime string `json:"create_time"` + MemberType string `json:"member_type"` + ProjectName string `json:"project_name"` + RealName string `json:"real_name"` + TeamId string `json:"team_id"` + TeamName string `json:"team_name"` + UserEmail string `json:"user_email"` } type accountAttachPaymentMethodOut struct { Card AccountAttachPaymentMethodOut `json:"card"` diff --git a/handler/accountauthentication/accountauthentication.go b/handler/accountauthentication/accountauthentication.go index af250ea..a0a9670 100644 --- a/handler/accountauthentication/accountauthentication.go +++ b/handler/accountauthentication/accountauthentication.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -125,6 +124,7 @@ type AccountAuthenticationMethodCreateIn struct { SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` SamlVariant SamlVariantType `json:"saml_variant,omitempty"` + ScimEnabled *bool `json:"scim_enabled,omitempty"` } type AccountAuthenticationMethodCreateOut struct { AccountId string `json:"account_id"` @@ -136,8 +136,8 @@ type AccountAuthenticationMethodCreateOut struct { AuthenticationMethodType string `json:"authentication_method_type"` AutoJoinTeamId string `json:"auto_join_team_id"` AutoJoinUserGroupId string `json:"auto_join_user_group_id"` - CreateTime time.Time `json:"create_time"` - DeleteTime time.Time `json:"delete_time"` + CreateTime string `json:"create_time"` + DeleteTime string `json:"delete_time"` OrganizationId string `json:"organization_id,omitempty"` SamlAcsUrl string `json:"saml_acs_url,omitempty"` SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` @@ -158,8 +158,10 @@ type AccountAuthenticationMethodCreateOut struct { SamlSignatureAlgorithm string `json:"saml_signature_algorithm,omitempty"` SamlSpCertificate string `json:"saml_sp_certificate,omitempty"` SamlVariant string `json:"saml_variant,omitempty"` + ScimEnabled *bool `json:"scim_enabled,omitempty"` + ScimUrl string `json:"scim_url,omitempty"` State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AccountAuthenticationMethodGetOut struct { AccountId string `json:"account_id"` @@ -171,8 +173,8 @@ type AccountAuthenticationMethodGetOut struct { AuthenticationMethodType string `json:"authentication_method_type"` AutoJoinTeamId string `json:"auto_join_team_id"` AutoJoinUserGroupId string `json:"auto_join_user_group_id"` - CreateTime time.Time `json:"create_time"` - DeleteTime time.Time `json:"delete_time"` + CreateTime string `json:"create_time"` + DeleteTime string `json:"delete_time"` OrganizationId string `json:"organization_id,omitempty"` SamlAcsUrl string `json:"saml_acs_url,omitempty"` SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` @@ -193,8 +195,10 @@ type AccountAuthenticationMethodGetOut struct { SamlSignatureAlgorithm string `json:"saml_signature_algorithm,omitempty"` SamlSpCertificate string `json:"saml_sp_certificate,omitempty"` SamlVariant string `json:"saml_variant,omitempty"` + ScimEnabled *bool `json:"scim_enabled,omitempty"` + ScimUrl string `json:"scim_url,omitempty"` State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AccountAuthenticationMethodUpdateIn struct { AuthTokenExtendWhenUsed *bool `json:"auth_token_extend_when_used,omitempty"` @@ -214,6 +218,7 @@ type AccountAuthenticationMethodUpdateIn struct { SamlRequestedAuthnContextEnabled *bool `json:"saml_requested_authn_context_enabled,omitempty"` SamlSignatureAlgorithm SamlSignatureAlgorithmType `json:"saml_signature_algorithm,omitempty"` SamlVariant SamlVariantType `json:"saml_variant,omitempty"` + ScimEnabled *bool `json:"scim_enabled,omitempty"` } type AccountAuthenticationMethodUpdateOut struct { AccountId string `json:"account_id"` @@ -225,8 +230,8 @@ type AccountAuthenticationMethodUpdateOut struct { AuthenticationMethodType string `json:"authentication_method_type"` AutoJoinTeamId string `json:"auto_join_team_id"` AutoJoinUserGroupId string `json:"auto_join_user_group_id"` - CreateTime time.Time `json:"create_time"` - DeleteTime time.Time `json:"delete_time"` + CreateTime string `json:"create_time"` + DeleteTime string `json:"delete_time"` OrganizationId string `json:"organization_id,omitempty"` SamlAcsUrl string `json:"saml_acs_url,omitempty"` SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` @@ -247,8 +252,10 @@ type AccountAuthenticationMethodUpdateOut struct { SamlSignatureAlgorithm string `json:"saml_signature_algorithm,omitempty"` SamlSpCertificate string `json:"saml_sp_certificate,omitempty"` SamlVariant string `json:"saml_variant,omitempty"` + ScimEnabled *bool `json:"scim_enabled,omitempty"` + ScimUrl string `json:"scim_url,omitempty"` State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AuthenticationMethodOut struct { AccountId string `json:"account_id"` @@ -260,8 +267,8 @@ type AuthenticationMethodOut struct { AuthenticationMethodType string `json:"authentication_method_type"` AutoJoinTeamId string `json:"auto_join_team_id"` AutoJoinUserGroupId string `json:"auto_join_user_group_id"` - CreateTime time.Time `json:"create_time"` - DeleteTime time.Time `json:"delete_time"` + CreateTime string `json:"create_time"` + DeleteTime string `json:"delete_time"` OrganizationId string `json:"organization_id,omitempty"` SamlAcsUrl string `json:"saml_acs_url,omitempty"` SamlAssertionSignedEnabled *bool `json:"saml_assertion_signed_enabled,omitempty"` @@ -282,8 +289,10 @@ type AuthenticationMethodOut struct { SamlSignatureAlgorithm string `json:"saml_signature_algorithm,omitempty"` SamlSpCertificate string `json:"saml_sp_certificate,omitempty"` SamlVariant string `json:"saml_variant,omitempty"` + ScimEnabled *bool `json:"scim_enabled,omitempty"` + ScimUrl string `json:"scim_url,omitempty"` State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type AuthenticationMethodType string diff --git a/handler/accountteam/accountteam.go b/handler/accountteam/accountteam.go index 100efa2..eb1eb73 100644 --- a/handler/accountteam/accountteam.go +++ b/handler/accountteam/accountteam.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -127,20 +126,20 @@ func (h *AccountTeamHandler) AccountTeamUpdate(ctx context.Context, accountId st } type AccountInviteOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - CreateTime time.Time `json:"create_time"` - InvitedByUserEmail string `json:"invited_by_user_email"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UserEmail string `json:"user_email"` + AccountId string `json:"account_id"` + AccountName string `json:"account_name"` + CreateTime string `json:"create_time"` + InvitedByUserEmail string `json:"invited_by_user_email"` + TeamId string `json:"team_id"` + TeamName string `json:"team_name"` + UserEmail string `json:"user_email"` } type AccountTeamGetOut struct { - AccountId string `json:"account_id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UpdateTime *time.Time `json:"update_time,omitempty"` + AccountId string `json:"account_id,omitempty"` + CreateTime string `json:"create_time,omitempty"` + TeamId string `json:"team_id"` + TeamName string `json:"team_name"` + UpdateTime string `json:"update_time,omitempty"` } type AccountTeamProjectAssociateIn struct { TeamType TeamType `json:"team_type"` @@ -149,18 +148,18 @@ type AccountTeamUpdateIn struct { TeamName string `json:"team_name"` } type AccountTeamUpdateOut struct { - AccountId string `json:"account_id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UpdateTime *time.Time `json:"update_time,omitempty"` + AccountId string `json:"account_id,omitempty"` + CreateTime string `json:"create_time,omitempty"` + TeamId string `json:"team_id"` + TeamName string `json:"team_name"` + UpdateTime string `json:"update_time,omitempty"` } type TeamOut struct { - AccountId string `json:"account_id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UpdateTime *time.Time `json:"update_time,omitempty"` + AccountId string `json:"account_id,omitempty"` + CreateTime string `json:"create_time,omitempty"` + TeamId string `json:"team_id"` + TeamName string `json:"team_name"` + UpdateTime string `json:"update_time,omitempty"` } type TeamType string diff --git a/handler/accountteammember/accountteammember.go b/handler/accountteammember/accountteammember.go index ee8adeb..f261f37 100644 --- a/handler/accountteammember/accountteammember.go +++ b/handler/accountteammember/accountteammember.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -87,13 +86,13 @@ type AccountTeamMembersInviteIn struct { Email string `json:"email"` } type MemberOut struct { - CreateTime time.Time `json:"create_time"` - RealName string `json:"real_name"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UpdateTime time.Time `json:"update_time"` - UserEmail string `json:"user_email"` - UserId string `json:"user_id"` + CreateTime string `json:"create_time"` + RealName string `json:"real_name"` + TeamId string `json:"team_id"` + TeamName string `json:"team_name"` + UpdateTime string `json:"update_time"` + UserEmail string `json:"user_email"` + UserId string `json:"user_id"` } type accountTeamMemberVerifyInviteOut struct { InviteDetails AccountTeamMemberVerifyInviteOut `json:"invite_details"` diff --git a/handler/billinggroup/billinggroup.go b/handler/billinggroup/billinggroup.go index e01eed0..137aa0b 100644 --- a/handler/billinggroup/billinggroup.go +++ b/handler/billinggroup/billinggroup.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -303,12 +302,12 @@ type BillingGroupCreditsClaimIn struct { Code string `json:"code"` } type BillingGroupCreditsClaimOut struct { - Code string `json:"code,omitempty"` - ExpireTime *time.Time `json:"expire_time,omitempty"` - RemainingValue string `json:"remaining_value,omitempty"` - StartTime *time.Time `json:"start_time,omitempty"` - Type string `json:"type,omitempty"` - Value string `json:"value,omitempty"` + Code string `json:"code,omitempty"` + ExpireTime string `json:"expire_time,omitempty"` + RemainingValue string `json:"remaining_value,omitempty"` + StartTime string `json:"start_time,omitempty"` + Type string `json:"type,omitempty"` + Value string `json:"value,omitempty"` } type BillingGroupGetOut struct { AccountId string `json:"account_id"` @@ -406,36 +405,36 @@ type CardInfoOut struct { UserEmail string `json:"user_email"` } type CreditOut struct { - Code string `json:"code,omitempty"` - ExpireTime *time.Time `json:"expire_time,omitempty"` - RemainingValue string `json:"remaining_value,omitempty"` - StartTime *time.Time `json:"start_time,omitempty"` - Type string `json:"type,omitempty"` - Value string `json:"value,omitempty"` + Code string `json:"code,omitempty"` + ExpireTime string `json:"expire_time,omitempty"` + RemainingValue string `json:"remaining_value,omitempty"` + StartTime string `json:"start_time,omitempty"` + Type string `json:"type,omitempty"` + Value string `json:"value,omitempty"` } type EventOut struct { - Actor string `json:"actor,omitempty"` - BillingGroupId string `json:"billing_group_id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - EventDesc string `json:"event_desc,omitempty"` - EventType string `json:"event_type,omitempty"` - LogEntryId *int `json:"log_entry_id,omitempty"` - ProjectId string `json:"project_id,omitempty"` - ProjectName string `json:"project_name,omitempty"` + Actor string `json:"actor,omitempty"` + BillingGroupId string `json:"billing_group_id,omitempty"` + CreateTime string `json:"create_time,omitempty"` + EventDesc string `json:"event_desc,omitempty"` + EventType string `json:"event_type,omitempty"` + LogEntryId *int `json:"log_entry_id,omitempty"` + ProjectId string `json:"project_id,omitempty"` + ProjectName string `json:"project_name,omitempty"` } type InvoiceOut struct { - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - BillingGroupState string `json:"billing_group_state"` - Currency string `json:"currency"` - DownloadCookie string `json:"download_cookie"` - GeneratedAt *time.Time `json:"generated_at,omitempty"` - InvoiceNumber string `json:"invoice_number"` - PeriodBegin string `json:"period_begin"` - PeriodEnd string `json:"period_end"` - State string `json:"state"` - TotalIncVat string `json:"total_inc_vat"` - TotalVatZero string `json:"total_vat_zero"` + BillingGroupId string `json:"billing_group_id"` + BillingGroupName string `json:"billing_group_name"` + BillingGroupState string `json:"billing_group_state"` + Currency string `json:"currency"` + DownloadCookie string `json:"download_cookie"` + GeneratedAt string `json:"generated_at,omitempty"` + InvoiceNumber string `json:"invoice_number"` + PeriodBegin string `json:"period_begin"` + PeriodEnd string `json:"period_end"` + State string `json:"state"` + TotalIncVat string `json:"total_inc_vat"` + TotalVatZero string `json:"total_vat_zero"` } type LineOut struct { CloudName string `json:"cloud_name,omitempty"` diff --git a/handler/domain/domain.go b/handler/domain/domain.go index 386bb25..97efbad 100644 --- a/handler/domain/domain.go +++ b/handler/domain/domain.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -107,47 +106,47 @@ func (h *DomainHandler) OrganizationDomainsRemove(ctx context.Context, organizat } type DomainOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - OrganizationId string `json:"organization_id"` - State string `json:"state"` - VerificationType string `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` + CreateTime string `json:"create_time"` + DomainId string `json:"domain_id"` + DomainName string `json:"domain_name"` + OrganizationId string `json:"organization_id"` + State string `json:"state"` + VerificationType string `json:"verification_type"` } type OrganizationDomainAddIn struct { DomainName string `json:"domain_name"` VerificationType VerificationType `json:"verification_type"` } type OrganizationDomainAddOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - OrganizationId string `json:"organization_id"` - State string `json:"state"` - VerificationType string `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` + CreateTime string `json:"create_time"` + DomainId string `json:"domain_id"` + DomainName string `json:"domain_name"` + OrganizationId string `json:"organization_id"` + State string `json:"state"` + VerificationType string `json:"verification_type"` } type OrganizationDomainUpdateIn struct { VerificationType VerificationType `json:"verification_type,omitempty"` } type OrganizationDomainUpdateOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - OrganizationId string `json:"organization_id"` - State string `json:"state"` - VerificationType string `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` + CreateTime string `json:"create_time"` + DomainId string `json:"domain_id"` + DomainName string `json:"domain_name"` + OrganizationId string `json:"organization_id"` + State string `json:"state"` + VerificationType string `json:"verification_type"` } type OrganizationDomainVerifyOut struct { - ChallengeToken string `json:"challenge_token"` - CreateTime time.Time `json:"create_time"` - DomainId string `json:"domain_id"` - DomainName string `json:"domain_name"` - OrganizationId string `json:"organization_id"` - State string `json:"state"` - VerificationType string `json:"verification_type"` + ChallengeToken string `json:"challenge_token"` + CreateTime string `json:"create_time"` + DomainId string `json:"domain_id"` + DomainName string `json:"domain_name"` + OrganizationId string `json:"organization_id"` + State string `json:"state"` + VerificationType string `json:"verification_type"` } type VerificationType string diff --git a/handler/flinkapplication/flinkapplication.go b/handler/flinkapplication/flinkapplication.go index 8f7b2cb..d82a0cd 100644 --- a/handler/flinkapplication/flinkapplication.go +++ b/handler/flinkapplication/flinkapplication.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -115,12 +114,12 @@ func (h *FlinkApplicationHandler) ServiceFlinkUpdateApplication(ctx context.Cont } type ApplicationOut struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - CreatedBy string `json:"created_by,omitempty"` - Id string `json:"id"` - Name string `json:"name"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - UpdatedBy string `json:"updated_by,omitempty"` + CreatedAt string `json:"created_at,omitempty"` + CreatedBy string `json:"created_by,omitempty"` + Id string `json:"id"` + Name string `json:"name"` + UpdatedAt string `json:"updated_at,omitempty"` + UpdatedBy string `json:"updated_by,omitempty"` } type ApplicationVersionIn struct { Sinks []SinkIn `json:"sinks"` @@ -128,7 +127,7 @@ type ApplicationVersionIn struct { Statement string `json:"statement"` } type ApplicationVersionOut struct { - CreatedAt time.Time `json:"created_at"` + CreatedAt string `json:"created_at"` CreatedBy string `json:"created_by"` Id string `json:"id"` Sinks []SinkOut `json:"sinks"` @@ -145,17 +144,17 @@ type ColumnOut struct { Watermark string `json:"watermark,omitempty"` } type CurrentDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId string `json:"job_id,omitempty"` - LastSavepoint string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint string `json:"starting_savepoint,omitempty"` - Status string `json:"status"` - VersionId string `json:"version_id"` + CreatedAt string `json:"created_at"` + CreatedBy string `json:"created_by"` + ErrorMsg string `json:"error_msg,omitempty"` + Id string `json:"id"` + JobId string `json:"job_id,omitempty"` + LastSavepoint string `json:"last_savepoint,omitempty"` + Parallelism int `json:"parallelism"` + RestartEnabled bool `json:"restart_enabled"` + StartingSavepoint string `json:"starting_savepoint,omitempty"` + Status string `json:"status"` + VersionId string `json:"version_id"` } type ServiceFlinkCreateApplicationIn struct { ApplicationVersion *ApplicationVersionIn `json:"application_version,omitempty"` @@ -163,32 +162,32 @@ type ServiceFlinkCreateApplicationIn struct { } type ServiceFlinkCreateApplicationOut struct { ApplicationVersions []ApplicationVersionOut `json:"application_versions"` - CreatedAt time.Time `json:"created_at"` + CreatedAt string `json:"created_at"` CreatedBy string `json:"created_by"` CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` Id string `json:"id"` Name string `json:"name"` - UpdatedAt time.Time `json:"updated_at"` + UpdatedAt string `json:"updated_at"` UpdatedBy string `json:"updated_by"` } type ServiceFlinkDeleteApplicationOut struct { ApplicationVersions []ApplicationVersionOut `json:"application_versions"` - CreatedAt time.Time `json:"created_at"` + CreatedAt string `json:"created_at"` CreatedBy string `json:"created_by"` CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` Id string `json:"id"` Name string `json:"name"` - UpdatedAt time.Time `json:"updated_at"` + UpdatedAt string `json:"updated_at"` UpdatedBy string `json:"updated_by"` } type ServiceFlinkGetApplicationOut struct { ApplicationVersions []ApplicationVersionOut `json:"application_versions"` - CreatedAt time.Time `json:"created_at"` + CreatedAt string `json:"created_at"` CreatedBy string `json:"created_by"` CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` Id string `json:"id"` Name string `json:"name"` - UpdatedAt time.Time `json:"updated_at"` + UpdatedAt string `json:"updated_at"` UpdatedBy string `json:"updated_by"` } type ServiceFlinkUpdateApplicationIn struct { @@ -196,12 +195,12 @@ type ServiceFlinkUpdateApplicationIn struct { } type ServiceFlinkUpdateApplicationOut struct { ApplicationVersions []ApplicationVersionOut `json:"application_versions"` - CreatedAt time.Time `json:"created_at"` + CreatedAt string `json:"created_at"` CreatedBy string `json:"created_by"` CurrentDeployment *CurrentDeploymentOut `json:"current_deployment,omitempty"` Id string `json:"id"` Name string `json:"name"` - UpdatedAt time.Time `json:"updated_at"` + UpdatedAt string `json:"updated_at"` UpdatedBy string `json:"updated_by"` } type SinkIn struct { diff --git a/handler/flinkapplicationdeployment/flinkapplicationdeployment.go b/handler/flinkapplicationdeployment/flinkapplicationdeployment.go index 518cff1..a8d1b9c 100644 --- a/handler/flinkapplicationdeployment/flinkapplicationdeployment.go +++ b/handler/flinkapplicationdeployment/flinkapplicationdeployment.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -133,30 +132,30 @@ func (h *FlinkApplicationDeploymentHandler) ServiceFlinkStopApplicationDeploymen } type DeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId string `json:"job_id,omitempty"` - LastSavepoint string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint string `json:"starting_savepoint,omitempty"` - Status string `json:"status"` - VersionId string `json:"version_id"` + CreatedAt string `json:"created_at"` + CreatedBy string `json:"created_by"` + ErrorMsg string `json:"error_msg,omitempty"` + Id string `json:"id"` + JobId string `json:"job_id,omitempty"` + LastSavepoint string `json:"last_savepoint,omitempty"` + Parallelism int `json:"parallelism"` + RestartEnabled bool `json:"restart_enabled"` + StartingSavepoint string `json:"starting_savepoint,omitempty"` + Status string `json:"status"` + VersionId string `json:"version_id"` } type ServiceFlinkCancelApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId string `json:"job_id,omitempty"` - LastSavepoint string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint string `json:"starting_savepoint,omitempty"` - Status string `json:"status"` - VersionId string `json:"version_id"` + CreatedAt string `json:"created_at"` + CreatedBy string `json:"created_by"` + ErrorMsg string `json:"error_msg,omitempty"` + Id string `json:"id"` + JobId string `json:"job_id,omitempty"` + LastSavepoint string `json:"last_savepoint,omitempty"` + Parallelism int `json:"parallelism"` + RestartEnabled bool `json:"restart_enabled"` + StartingSavepoint string `json:"starting_savepoint,omitempty"` + Status string `json:"status"` + VersionId string `json:"version_id"` } type ServiceFlinkCreateApplicationDeploymentIn struct { Parallelism *int `json:"parallelism,omitempty"` @@ -165,56 +164,56 @@ type ServiceFlinkCreateApplicationDeploymentIn struct { VersionId string `json:"version_id"` } type ServiceFlinkCreateApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId string `json:"job_id,omitempty"` - LastSavepoint string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint string `json:"starting_savepoint,omitempty"` - Status string `json:"status"` - VersionId string `json:"version_id"` + CreatedAt string `json:"created_at"` + CreatedBy string `json:"created_by"` + ErrorMsg string `json:"error_msg,omitempty"` + Id string `json:"id"` + JobId string `json:"job_id,omitempty"` + LastSavepoint string `json:"last_savepoint,omitempty"` + Parallelism int `json:"parallelism"` + RestartEnabled bool `json:"restart_enabled"` + StartingSavepoint string `json:"starting_savepoint,omitempty"` + Status string `json:"status"` + VersionId string `json:"version_id"` } type ServiceFlinkDeleteApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId string `json:"job_id,omitempty"` - LastSavepoint string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint string `json:"starting_savepoint,omitempty"` - Status string `json:"status"` - VersionId string `json:"version_id"` + CreatedAt string `json:"created_at"` + CreatedBy string `json:"created_by"` + ErrorMsg string `json:"error_msg,omitempty"` + Id string `json:"id"` + JobId string `json:"job_id,omitempty"` + LastSavepoint string `json:"last_savepoint,omitempty"` + Parallelism int `json:"parallelism"` + RestartEnabled bool `json:"restart_enabled"` + StartingSavepoint string `json:"starting_savepoint,omitempty"` + Status string `json:"status"` + VersionId string `json:"version_id"` } type ServiceFlinkGetApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId string `json:"job_id,omitempty"` - LastSavepoint string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint string `json:"starting_savepoint,omitempty"` - Status string `json:"status"` - VersionId string `json:"version_id"` + CreatedAt string `json:"created_at"` + CreatedBy string `json:"created_by"` + ErrorMsg string `json:"error_msg,omitempty"` + Id string `json:"id"` + JobId string `json:"job_id,omitempty"` + LastSavepoint string `json:"last_savepoint,omitempty"` + Parallelism int `json:"parallelism"` + RestartEnabled bool `json:"restart_enabled"` + StartingSavepoint string `json:"starting_savepoint,omitempty"` + Status string `json:"status"` + VersionId string `json:"version_id"` } type ServiceFlinkStopApplicationDeploymentOut struct { - CreatedAt time.Time `json:"created_at"` - CreatedBy string `json:"created_by"` - ErrorMsg string `json:"error_msg,omitempty"` - Id string `json:"id"` - JobId string `json:"job_id,omitempty"` - LastSavepoint string `json:"last_savepoint,omitempty"` - Parallelism int `json:"parallelism"` - RestartEnabled bool `json:"restart_enabled"` - StartingSavepoint string `json:"starting_savepoint,omitempty"` - Status string `json:"status"` - VersionId string `json:"version_id"` + CreatedAt string `json:"created_at"` + CreatedBy string `json:"created_by"` + ErrorMsg string `json:"error_msg,omitempty"` + Id string `json:"id"` + JobId string `json:"job_id,omitempty"` + LastSavepoint string `json:"last_savepoint,omitempty"` + Parallelism int `json:"parallelism"` + RestartEnabled bool `json:"restart_enabled"` + StartingSavepoint string `json:"starting_savepoint,omitempty"` + Status string `json:"status"` + VersionId string `json:"version_id"` } type serviceFlinkListApplicationDeploymentsOut struct { Deployments []DeploymentOut `json:"deployments"` diff --git a/handler/flinkapplicationversion/flinkapplicationversion.go b/handler/flinkapplicationversion/flinkapplicationversion.go index f4a52dc..e9c093b 100644 --- a/handler/flinkapplicationversion/flinkapplicationversion.go +++ b/handler/flinkapplicationversion/flinkapplicationversion.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -116,7 +115,7 @@ type ServiceFlinkCreateApplicationVersionIn struct { Statement string `json:"statement"` } type ServiceFlinkCreateApplicationVersionOut struct { - CreatedAt time.Time `json:"created_at"` + CreatedAt string `json:"created_at"` CreatedBy string `json:"created_by"` Id string `json:"id"` Sinks []SinkOut `json:"sinks"` @@ -125,7 +124,7 @@ type ServiceFlinkCreateApplicationVersionOut struct { Version int `json:"version"` } type ServiceFlinkDeleteApplicationVersionOut struct { - CreatedAt time.Time `json:"created_at"` + CreatedAt string `json:"created_at"` CreatedBy string `json:"created_by"` Id string `json:"id"` Sinks []SinkOut `json:"sinks"` @@ -134,7 +133,7 @@ type ServiceFlinkDeleteApplicationVersionOut struct { Version int `json:"version"` } type ServiceFlinkGetApplicationVersionOut struct { - CreatedAt time.Time `json:"created_at"` + CreatedAt string `json:"created_at"` CreatedBy string `json:"created_by"` Id string `json:"id"` Sinks []SinkOut `json:"sinks"` diff --git a/handler/kafkatopic/kafkatopic.go b/handler/kafkatopic/kafkatopic.go index 4181702..040771d 100644 --- a/handler/kafkatopic/kafkatopic.go +++ b/handler/kafkatopic/kafkatopic.go @@ -427,6 +427,7 @@ type PartitionOut struct { Isr int `json:"isr"` LatestOffset int `json:"latest_offset"` Partition int `json:"partition"` + RemoteSize *int `json:"remote_size,omitempty"` Size int `json:"size"` } type PreallocateOut struct { diff --git a/handler/opensearch/opensearch.go b/handler/opensearch/opensearch.go index 755c050..b6929c3 100644 --- a/handler/opensearch/opensearch.go +++ b/handler/opensearch/opensearch.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -169,7 +168,7 @@ type AclOut struct { Username string `json:"username"` } type IndexeOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Docs *int `json:"docs,omitempty"` Health string `json:"health,omitempty"` IndexName string `json:"index_name"` diff --git a/handler/organization/organization.go b/handler/organization/organization.go index 5b89998..bd7e57d 100644 --- a/handler/organization/organization.go +++ b/handler/organization/organization.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -190,20 +189,20 @@ type OrganizationAuthenticationConfigUpdateOut struct { TwoFactorRequired *bool `json:"two_factor_required,omitempty"` } type OrganizationGetOut struct { - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - OrganizationId string `json:"organization_id"` - OrganizationName string `json:"organization_name"` - Tier string `json:"tier"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` + CreateTime string `json:"create_time"` + OrganizationId string `json:"organization_id"` + OrganizationName string `json:"organization_name"` + Tier string `json:"tier"` + UpdateTime string `json:"update_time"` } type OrganizationOut struct { - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - OrganizationId string `json:"organization_id"` - OrganizationName string `json:"organization_name"` - Tier string `json:"tier"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` + CreateTime string `json:"create_time"` + OrganizationId string `json:"organization_id"` + OrganizationName string `json:"organization_name"` + Tier string `json:"tier"` + UpdateTime string `json:"update_time"` } type OrganizationProjectsListOut struct { Projects []ProjectOut `json:"projects"` @@ -214,12 +213,12 @@ type OrganizationUpdateIn struct { Tier TierType `json:"tier,omitempty"` } type OrganizationUpdateOut struct { - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - OrganizationId string `json:"organization_id"` - OrganizationName string `json:"organization_name"` - Tier string `json:"tier"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` + CreateTime string `json:"create_time"` + OrganizationId string `json:"organization_id"` + OrganizationName string `json:"organization_name"` + Tier string `json:"tier"` + UpdateTime string `json:"update_time"` } type ProjectOut struct { AccountId string `json:"account_id"` @@ -249,7 +248,7 @@ type ProjectOut struct { Tags map[string]string `json:"tags,omitempty"` TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TenantId string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` + TrialExpirationTime string `json:"trial_expiration_time,omitempty"` VatId string `json:"vat_id"` ZipCode string `json:"zip_code,omitempty"` } @@ -273,12 +272,12 @@ type UserOrganizationCreateIn struct { Tier TierType `json:"tier"` } type UserOrganizationCreateOut struct { - AccountId string `json:"account_id"` - CreateTime time.Time `json:"create_time"` - OrganizationId string `json:"organization_id"` - OrganizationName string `json:"organization_name"` - Tier string `json:"tier"` - UpdateTime time.Time `json:"update_time"` + AccountId string `json:"account_id"` + CreateTime string `json:"create_time"` + OrganizationId string `json:"organization_id"` + OrganizationName string `json:"organization_name"` + Tier string `json:"tier"` + UpdateTime string `json:"update_time"` } type userOrganizationsListOut struct { Organizations []OrganizationOut `json:"organizations"` diff --git a/handler/organizationuser/organizationuser.go b/handler/organizationuser/organizationuser.go index 6aab601..886479a 100644 --- a/handler/organizationuser/organizationuser.go +++ b/handler/organizationuser/organizationuser.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -221,27 +220,27 @@ func ActionTypeChoices() []string { } type AuthenticationMethodOut struct { - IsEnabled2Fa *bool `json:"is_enabled_2fa,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LocalProviderId string `json:"local_provider_id,omitempty"` - MethodId string `json:"method_id,omitempty"` - Name string `json:"name,omitempty"` - OrganizationId string `json:"organization_id,omitempty"` - RemoteProviderId string `json:"remote_provider_id"` - Type string `json:"type,omitempty"` - UserEmail string `json:"user_email,omitempty"` - UserId string `json:"user_id,omitempty"` + IsEnabled2Fa *bool `json:"is_enabled_2fa,omitempty"` + LastUsedTime string `json:"last_used_time,omitempty"` + LocalProviderId string `json:"local_provider_id,omitempty"` + MethodId string `json:"method_id,omitempty"` + Name string `json:"name,omitempty"` + OrganizationId string `json:"organization_id,omitempty"` + RemoteProviderId string `json:"remote_provider_id"` + Type string `json:"type,omitempty"` + UserEmail string `json:"user_email,omitempty"` + UserId string `json:"user_id,omitempty"` } type InvitationOut struct { - CreateTime time.Time `json:"create_time"` - ExpiryTime time.Time `json:"expiry_time"` - InvitedBy string `json:"invited_by"` - UserEmail string `json:"user_email"` + CreateTime string `json:"create_time"` + ExpiryTime string `json:"expiry_time"` + InvitedBy string `json:"invited_by"` + UserEmail string `json:"user_email"` } type OrganizationUserGetOut struct { IsSuperAdmin bool `json:"is_super_admin"` - JoinTime time.Time `json:"join_time"` - LastActivityTime time.Time `json:"last_activity_time"` + JoinTime string `json:"join_time"` + LastActivityTime string `json:"last_activity_time"` UserId string `json:"user_id"` UserInfo UserInfoOut `json:"user_info"` } @@ -253,8 +252,8 @@ type OrganizationUserInviteIn struct { } type OrganizationUserSetOut struct { IsSuperAdmin bool `json:"is_super_admin"` - JoinTime time.Time `json:"join_time"` - LastActivityTime time.Time `json:"last_activity_time"` + JoinTime string `json:"join_time"` + LastActivityTime string `json:"last_activity_time"` UserId string `json:"user_id"` UserInfo UserInfoOut `json:"user_info"` } @@ -269,8 +268,8 @@ type OrganizationUserUpdateIn struct { } type OrganizationUserUpdateOut struct { IsSuperAdmin bool `json:"is_super_admin"` - JoinTime time.Time `json:"join_time"` - LastActivityTime time.Time `json:"last_activity_time"` + JoinTime string `json:"join_time"` + LastActivityTime string `json:"last_activity_time"` UserId string `json:"user_id"` UserInfo UserInfoOut `json:"user_info"` } @@ -287,29 +286,29 @@ func StateTypeChoices() []string { } type TokenOut struct { - Description string `json:"description"` - LastIp string `json:"last_ip"` - LastUsedTime time.Time `json:"last_used_time"` - LastUserAgent string `json:"last_user_agent"` - TokenPrefix string `json:"token_prefix"` + Description string `json:"description"` + LastIp string `json:"last_ip"` + LastUsedTime string `json:"last_used_time"` + LastUserAgent string `json:"last_user_agent"` + TokenPrefix string `json:"token_prefix"` } type UserInfoOut struct { - City string `json:"city,omitempty"` - Country string `json:"country,omitempty"` - CreateTime time.Time `json:"create_time"` - Department string `json:"department,omitempty"` - IsApplicationUser bool `json:"is_application_user"` - JobTitle string `json:"job_title,omitempty"` - ManagedByScim bool `json:"managed_by_scim"` - ManagingOrganizationId string `json:"managing_organization_id,omitempty"` - RealName string `json:"real_name"` - State string `json:"state"` - UserEmail string `json:"user_email"` + City string `json:"city,omitempty"` + Country string `json:"country,omitempty"` + CreateTime string `json:"create_time"` + Department string `json:"department,omitempty"` + IsApplicationUser bool `json:"is_application_user"` + JobTitle string `json:"job_title,omitempty"` + ManagedByScim bool `json:"managed_by_scim"` + ManagingOrganizationId string `json:"managing_organization_id,omitempty"` + RealName string `json:"real_name"` + State string `json:"state"` + UserEmail string `json:"user_email"` } type UserOut struct { IsSuperAdmin bool `json:"is_super_admin"` - JoinTime time.Time `json:"join_time"` - LastActivityTime time.Time `json:"last_activity_time"` + JoinTime string `json:"join_time"` + LastActivityTime string `json:"last_activity_time"` UserId string `json:"user_id"` UserInfo UserInfoOut `json:"user_info"` } diff --git a/handler/project/project.go b/handler/project/project.go index 3096360..8576aaf 100644 --- a/handler/project/project.go +++ b/handler/project/project.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -311,13 +310,13 @@ func (h *ProjectHandler) ProjectUserUpdate(ctx context.Context, project string, } type AlertOut struct { - CreateTime time.Time `json:"create_time"` - Event string `json:"event"` - NodeName string `json:"node_name,omitempty"` - ProjectName string `json:"project_name"` - ServiceName string `json:"service_name,omitempty"` - ServiceType string `json:"service_type,omitempty"` - Severity string `json:"severity"` + CreateTime string `json:"create_time"` + Event string `json:"event"` + NodeName string `json:"node_name,omitempty"` + ProjectName string `json:"project_name"` + ServiceName string `json:"service_name,omitempty"` + ServiceType string `json:"service_type,omitempty"` + Severity string `json:"severity"` } type BillingCurrencyType string @@ -365,12 +364,12 @@ type EndOfLifeExtensionOut struct { Elasticsearch *ElasticsearchOut `json:"elasticsearch,omitempty"` } type EventOut struct { - Actor string `json:"actor"` - EventDesc string `json:"event_desc"` - EventType string `json:"event_type"` - Id string `json:"id"` - ServiceName string `json:"service_name"` - Time time.Time `json:"time"` + Actor string `json:"actor"` + EventDesc string `json:"event_desc"` + EventType string `json:"event_type"` + Id string `json:"id"` + ServiceName string `json:"service_name"` + Time string `json:"time"` } type GroupUserOut struct { MemberType string `json:"member_type"` @@ -379,10 +378,10 @@ type GroupUserOut struct { UserGroupId string `json:"user_group_id"` } type InvitationOut struct { - InviteTime time.Time `json:"invite_time"` - InvitedUserEmail string `json:"invited_user_email"` - InvitingUserEmail string `json:"inviting_user_email"` - MemberType string `json:"member_type"` + InviteTime string `json:"invite_time"` + InvitedUserEmail string `json:"invited_user_email"` + InvitingUserEmail string `json:"inviting_user_email"` + MemberType string `json:"member_type"` } type MemberType string @@ -453,7 +452,7 @@ type ProjectCreateOut struct { Tags map[string]string `json:"tags,omitempty"` TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TenantId string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` + TrialExpirationTime string `json:"trial_expiration_time,omitempty"` VatId string `json:"vat_id"` ZipCode string `json:"zip_code,omitempty"` } @@ -485,7 +484,7 @@ type ProjectGetOut struct { Tags map[string]string `json:"tags,omitempty"` TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TenantId string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` + TrialExpirationTime string `json:"trial_expiration_time,omitempty"` VatId string `json:"vat_id"` ZipCode string `json:"zip_code,omitempty"` } @@ -535,7 +534,7 @@ type ProjectOut struct { Tags map[string]string `json:"tags,omitempty"` TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TenantId string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` + TrialExpirationTime string `json:"trial_expiration_time,omitempty"` VatId string `json:"vat_id"` ZipCode string `json:"zip_code,omitempty"` } @@ -594,7 +593,7 @@ type ProjectUpdateOut struct { Tags map[string]string `json:"tags,omitempty"` TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TenantId string `json:"tenant_id,omitempty"` - TrialExpirationTime *time.Time `json:"trial_expiration_time,omitempty"` + TrialExpirationTime string `json:"trial_expiration_time,omitempty"` VatId string `json:"vat_id"` ZipCode string `json:"zip_code,omitempty"` } @@ -613,14 +612,14 @@ type TechEmailOut struct { Email string `json:"email"` } type UserOut struct { - Auth []string `json:"auth"` - BillingContact bool `json:"billing_contact"` - CreateTime time.Time `json:"create_time"` - MemberType string `json:"member_type"` - RealName string `json:"real_name,omitempty"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UserEmail string `json:"user_email"` + Auth []string `json:"auth"` + BillingContact bool `json:"billing_contact"` + CreateTime string `json:"create_time"` + MemberType string `json:"member_type"` + RealName string `json:"real_name,omitempty"` + TeamId string `json:"team_id"` + TeamName string `json:"team_name"` + UserEmail string `json:"user_email"` } type VpcPeeringConnectionTypeOut struct { CloudName string `json:"cloud_name"` diff --git a/handler/projectbilling/projectbilling.go b/handler/projectbilling/projectbilling.go index cdfaf29..5ee8249 100644 --- a/handler/projectbilling/projectbilling.go +++ b/handler/projectbilling/projectbilling.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -79,37 +78,37 @@ func (h *ProjectBillingHandler) ProjectInvoiceList(ctx context.Context, project } type CreditOut struct { - Code string `json:"code,omitempty"` - ExpireTime *time.Time `json:"expire_time,omitempty"` - RemainingValue string `json:"remaining_value,omitempty"` - StartTime *time.Time `json:"start_time,omitempty"` - Type string `json:"type,omitempty"` - Value string `json:"value,omitempty"` + Code string `json:"code,omitempty"` + ExpireTime string `json:"expire_time,omitempty"` + RemainingValue string `json:"remaining_value,omitempty"` + StartTime string `json:"start_time,omitempty"` + Type string `json:"type,omitempty"` + Value string `json:"value,omitempty"` } type InvoiceOut struct { - BillingGroupId string `json:"billing_group_id"` - BillingGroupName string `json:"billing_group_name"` - BillingGroupState string `json:"billing_group_state"` - Currency string `json:"currency"` - DownloadCookie string `json:"download_cookie"` - GeneratedAt *time.Time `json:"generated_at,omitempty"` - InvoiceNumber string `json:"invoice_number"` - PeriodBegin string `json:"period_begin"` - PeriodEnd string `json:"period_end"` - State string `json:"state"` - TotalIncVat string `json:"total_inc_vat"` - TotalVatZero string `json:"total_vat_zero"` + BillingGroupId string `json:"billing_group_id"` + BillingGroupName string `json:"billing_group_name"` + BillingGroupState string `json:"billing_group_state"` + Currency string `json:"currency"` + DownloadCookie string `json:"download_cookie"` + GeneratedAt string `json:"generated_at,omitempty"` + InvoiceNumber string `json:"invoice_number"` + PeriodBegin string `json:"period_begin"` + PeriodEnd string `json:"period_end"` + State string `json:"state"` + TotalIncVat string `json:"total_inc_vat"` + TotalVatZero string `json:"total_vat_zero"` } type ProjectCreditsClaimIn struct { Code string `json:"code"` } type ProjectCreditsClaimOut struct { - Code string `json:"code,omitempty"` - ExpireTime *time.Time `json:"expire_time,omitempty"` - RemainingValue string `json:"remaining_value,omitempty"` - StartTime *time.Time `json:"start_time,omitempty"` - Type string `json:"type,omitempty"` - Value string `json:"value,omitempty"` + Code string `json:"code,omitempty"` + ExpireTime string `json:"expire_time,omitempty"` + RemainingValue string `json:"remaining_value,omitempty"` + StartTime string `json:"start_time,omitempty"` + Type string `json:"type,omitempty"` + Value string `json:"value,omitempty"` } type projectCreditsClaimOut struct { Credit ProjectCreditsClaimOut `json:"credit"` diff --git a/handler/service/service.go b/handler/service/service.go index 4a9ea37..4fa0a36 100644 --- a/handler/service/service.go +++ b/handler/service/service.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -537,13 +536,13 @@ type AdditionalRegionOut struct { Region string `json:"region,omitempty"` } type AlertOut struct { - CreateTime time.Time `json:"create_time"` - Event string `json:"event"` - NodeName string `json:"node_name,omitempty"` - ProjectName string `json:"project_name"` - ServiceName string `json:"service_name,omitempty"` - ServiceType string `json:"service_type,omitempty"` - Severity string `json:"severity"` + CreateTime string `json:"create_time"` + Event string `json:"event"` + NodeName string `json:"node_name,omitempty"` + ProjectName string `json:"project_name"` + ServiceName string `json:"service_name,omitempty"` + ServiceType string `json:"service_type,omitempty"` + Severity string `json:"severity"` } type AnyOut struct { DefaultVersion string `json:"default_version,omitempty"` @@ -564,7 +563,7 @@ type BackupConfigOut struct { type BackupOut struct { AdditionalRegions []AdditionalRegionOut `json:"additional_regions,omitempty"` BackupName string `json:"backup_name"` - BackupTime time.Time `json:"backup_time"` + BackupTime string `json:"backup_time"` DataSize int `json:"data_size"` StorageLocation string `json:"storage_location,omitempty"` } @@ -678,25 +677,25 @@ type ListPublicServiceTypesOut struct { Any *AnyOut `json:"ANY,omitempty"` } type LogOut struct { - Msg string `json:"msg"` - Time *time.Time `json:"time,omitempty"` - Unit string `json:"unit,omitempty"` + Msg string `json:"msg"` + Time string `json:"time,omitempty"` + Unit string `json:"unit,omitempty"` } type MaintenanceIn struct { - Dow DowType `json:"dow,omitempty"` - Time *time.Time `json:"time,omitempty"` + Dow DowType `json:"dow,omitempty"` + Time string `json:"time,omitempty"` } type MaintenanceOut struct { Dow string `json:"dow"` - Time time.Time `json:"time"` + Time string `json:"time"` Updates []UpdateOut `json:"updates"` } type MetadataOut struct { - EndOfLifeHelpArticleUrl string `json:"end_of_life_help_article_url,omitempty"` - EndOfLifePolicyUrl string `json:"end_of_life_policy_url,omitempty"` - ServiceEndOfLifeTime *time.Time `json:"service_end_of_life_time,omitempty"` - UpgradeToServiceType string `json:"upgrade_to_service_type,omitempty"` - UpgradeToVersion string `json:"upgrade_to_version,omitempty"` + EndOfLifeHelpArticleUrl string `json:"end_of_life_help_article_url,omitempty"` + EndOfLifePolicyUrl string `json:"end_of_life_policy_url,omitempty"` + ServiceEndOfLifeTime string `json:"service_end_of_life_time,omitempty"` + UpgradeToServiceType string `json:"upgrade_to_service_type,omitempty"` + UpgradeToVersion string `json:"upgrade_to_version,omitempty"` } type MethodType string @@ -857,7 +856,7 @@ type ServiceCreateOut struct { Components []ComponentOut `json:"components,omitempty"` ConnectionInfo map[string]any `json:"connection_info,omitempty"` ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Databases []string `json:"databases,omitempty"` DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` Features map[string]any `json:"features,omitempty"` @@ -883,7 +882,7 @@ type ServiceCreateOut struct { TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TerminationProtection bool `json:"termination_protection"` Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserConfig map[string]any `json:"user_config"` Users []UserOut `json:"users,omitempty"` } @@ -904,7 +903,7 @@ type ServiceGetOut struct { Components []ComponentOut `json:"components,omitempty"` ConnectionInfo map[string]any `json:"connection_info,omitempty"` ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Databases []string `json:"databases,omitempty"` DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` Features map[string]any `json:"features,omitempty"` @@ -930,7 +929,7 @@ type ServiceGetOut struct { TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TerminationProtection bool `json:"termination_protection"` Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserConfig map[string]any `json:"user_config"` Users []UserOut `json:"users,omitempty"` } @@ -984,7 +983,7 @@ type ServiceOut struct { Components []ComponentOut `json:"components,omitempty"` ConnectionInfo map[string]any `json:"connection_info,omitempty"` ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Databases []string `json:"databases,omitempty"` DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` Features map[string]any `json:"features,omitempty"` @@ -1010,7 +1009,7 @@ type ServiceOut struct { TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TerminationProtection bool `json:"termination_protection"` Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserConfig map[string]any `json:"user_config"` Users []UserOut `json:"users,omitempty"` } @@ -1035,7 +1034,7 @@ type ServiceTaskCreateIn struct { TaskType TaskType `json:"task_type"` } type ServiceTaskCreateOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Result string `json:"result"` ResultCodes []ResultCodeOut `json:"result_codes,omitempty"` Success bool `json:"success"` @@ -1043,7 +1042,7 @@ type ServiceTaskCreateOut struct { TaskType string `json:"task_type"` } type ServiceTaskGetOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Result string `json:"result"` ResultCodes []ResultCodeOut `json:"result_codes,omitempty"` Success bool `json:"success"` @@ -1072,7 +1071,7 @@ type ServiceUpdateOut struct { Components []ComponentOut `json:"components,omitempty"` ConnectionInfo map[string]any `json:"connection_info,omitempty"` ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Databases []string `json:"databases,omitempty"` DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` Features map[string]any `json:"features,omitempty"` @@ -1098,22 +1097,22 @@ type ServiceUpdateOut struct { TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TerminationProtection bool `json:"termination_protection"` Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserConfig map[string]any `json:"user_config"` Users []UserOut `json:"users,omitempty"` } type ServiceVersionOut struct { - AivenEndOfLifeTime *time.Time `json:"aiven_end_of_life_time,omitempty"` - AvailabilityEndTime *time.Time `json:"availability_end_time,omitempty"` - AvailabilityStartTime *time.Time `json:"availability_start_time,omitempty"` - EndOfLifeHelpArticleUrl string `json:"end_of_life_help_article_url,omitempty"` - MajorVersion string `json:"major_version,omitempty"` - ServiceType string `json:"service_type,omitempty"` - State string `json:"state,omitempty"` - TerminationTime *time.Time `json:"termination_time,omitempty"` - UpgradeToServiceType string `json:"upgrade_to_service_type,omitempty"` - UpgradeToVersion string `json:"upgrade_to_version,omitempty"` - UpstreamEndOfLifeTime *time.Time `json:"upstream_end_of_life_time,omitempty"` + AivenEndOfLifeTime string `json:"aiven_end_of_life_time,omitempty"` + AvailabilityEndTime string `json:"availability_end_time,omitempty"` + AvailabilityStartTime string `json:"availability_start_time,omitempty"` + EndOfLifeHelpArticleUrl string `json:"end_of_life_help_article_url,omitempty"` + MajorVersion string `json:"major_version,omitempty"` + ServiceType string `json:"service_type,omitempty"` + State string `json:"state,omitempty"` + TerminationTime string `json:"termination_time,omitempty"` + UpgradeToServiceType string `json:"upgrade_to_service_type,omitempty"` + UpgradeToVersion string `json:"upgrade_to_version,omitempty"` + UpstreamEndOfLifeTime string `json:"upstream_end_of_life_time,omitempty"` } type ShardOut struct { Name string `json:"name,omitempty"` @@ -1179,18 +1178,18 @@ type TopicOut struct { TopicName string `json:"topic_name"` } type UpdateOut struct { - Deadline string `json:"deadline,omitempty"` - Description string `json:"description,omitempty"` - StartAfter string `json:"start_after,omitempty"` - StartAt *time.Time `json:"start_at,omitempty"` + Deadline string `json:"deadline,omitempty"` + Description string `json:"description,omitempty"` + StartAfter string `json:"start_after,omitempty"` + StartAt string `json:"start_at,omitempty"` } type UserOut struct { AccessCert string `json:"access_cert,omitempty"` - AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` + AccessCertNotValidAfterTime string `json:"access_cert_not_valid_after_time,omitempty"` AccessControl *AccessControlOut `json:"access_control,omitempty"` AccessKey string `json:"access_key,omitempty"` Authentication string `json:"authentication,omitempty"` - ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` + ExpiringCertNotValidAfterTime string `json:"expiring_cert_not_valid_after_time,omitempty"` Password string `json:"password"` Type string `json:"type"` Username string `json:"username"` diff --git a/handler/serviceuser/serviceuser.go b/handler/serviceuser/serviceuser.go index 157bc9b..4815b9b 100644 --- a/handler/serviceuser/serviceuser.go +++ b/handler/serviceuser/serviceuser.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -149,7 +148,7 @@ func AuthenticationTypeChoices() []string { type BackupOut struct { AdditionalRegions []AdditionalRegionOut `json:"additional_regions,omitempty"` BackupName string `json:"backup_name"` - BackupTime time.Time `json:"backup_time"` + BackupTime string `json:"backup_time"` DataSize int `json:"data_size"` StorageLocation string `json:"storage_location,omitempty"` } @@ -178,15 +177,15 @@ type IntegrationStatusOut struct { } type MaintenanceOut struct { Dow string `json:"dow"` - Time time.Time `json:"time"` + Time string `json:"time"` Updates []UpdateOut `json:"updates"` } type MetadataOut struct { - EndOfLifeHelpArticleUrl string `json:"end_of_life_help_article_url,omitempty"` - EndOfLifePolicyUrl string `json:"end_of_life_policy_url,omitempty"` - ServiceEndOfLifeTime *time.Time `json:"service_end_of_life_time,omitempty"` - UpgradeToServiceType string `json:"upgrade_to_service_type,omitempty"` - UpgradeToVersion string `json:"upgrade_to_version,omitempty"` + EndOfLifeHelpArticleUrl string `json:"end_of_life_help_article_url,omitempty"` + EndOfLifePolicyUrl string `json:"end_of_life_policy_url,omitempty"` + ServiceEndOfLifeTime string `json:"service_end_of_life_time,omitempty"` + UpgradeToServiceType string `json:"upgrade_to_service_type,omitempty"` + UpgradeToVersion string `json:"upgrade_to_version,omitempty"` } type NodeStateOut struct { Name string `json:"name"` @@ -253,11 +252,11 @@ type ServiceUserCreateIn struct { } type ServiceUserCreateOut struct { AccessCert string `json:"access_cert,omitempty"` - AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` + AccessCertNotValidAfterTime string `json:"access_cert_not_valid_after_time,omitempty"` AccessControl *AccessControlOut `json:"access_control,omitempty"` AccessKey string `json:"access_key,omitempty"` Authentication string `json:"authentication,omitempty"` - ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` + ExpiringCertNotValidAfterTime string `json:"expiring_cert_not_valid_after_time,omitempty"` Password string `json:"password"` Type string `json:"type"` Username string `json:"username"` @@ -276,7 +275,7 @@ type ServiceUserCredentialsModifyOut struct { Components []ComponentOut `json:"components,omitempty"` ConnectionInfo map[string]any `json:"connection_info,omitempty"` ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Databases []string `json:"databases,omitempty"` DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` Features map[string]any `json:"features,omitempty"` @@ -302,7 +301,7 @@ type ServiceUserCredentialsModifyOut struct { TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TerminationProtection bool `json:"termination_protection"` Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserConfig map[string]any `json:"user_config"` Users []UserOut `json:"users,omitempty"` } @@ -314,7 +313,7 @@ type ServiceUserCredentialsResetOut struct { Components []ComponentOut `json:"components,omitempty"` ConnectionInfo map[string]any `json:"connection_info,omitempty"` ConnectionPools []ConnectionPoolOut `json:"connection_pools,omitempty"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` Databases []string `json:"databases,omitempty"` DiskSpaceMb *float64 `json:"disk_space_mb,omitempty"` Features map[string]any `json:"features,omitempty"` @@ -340,17 +339,17 @@ type ServiceUserCredentialsResetOut struct { TechEmails []TechEmailOut `json:"tech_emails,omitempty"` TerminationProtection bool `json:"termination_protection"` Topics []TopicOut `json:"topics,omitempty"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserConfig map[string]any `json:"user_config"` Users []UserOut `json:"users,omitempty"` } type ServiceUserGetOut struct { AccessCert string `json:"access_cert,omitempty"` - AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` + AccessCertNotValidAfterTime string `json:"access_cert_not_valid_after_time,omitempty"` AccessControl *AccessControlOut `json:"access_control,omitempty"` AccessKey string `json:"access_key,omitempty"` Authentication string `json:"authentication,omitempty"` - ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` + ExpiringCertNotValidAfterTime string `json:"expiring_cert_not_valid_after_time,omitempty"` Password string `json:"password"` Type string `json:"type"` Username string `json:"username"` @@ -379,18 +378,18 @@ type TopicOut struct { TopicName string `json:"topic_name"` } type UpdateOut struct { - Deadline string `json:"deadline,omitempty"` - Description string `json:"description,omitempty"` - StartAfter string `json:"start_after,omitempty"` - StartAt *time.Time `json:"start_at,omitempty"` + Deadline string `json:"deadline,omitempty"` + Description string `json:"description,omitempty"` + StartAfter string `json:"start_after,omitempty"` + StartAt string `json:"start_at,omitempty"` } type UserOut struct { AccessCert string `json:"access_cert,omitempty"` - AccessCertNotValidAfterTime *time.Time `json:"access_cert_not_valid_after_time,omitempty"` + AccessCertNotValidAfterTime string `json:"access_cert_not_valid_after_time,omitempty"` AccessControl *AccessControlOut `json:"access_control,omitempty"` AccessKey string `json:"access_key,omitempty"` Authentication string `json:"authentication,omitempty"` - ExpiringCertNotValidAfterTime *time.Time `json:"expiring_cert_not_valid_after_time,omitempty"` + ExpiringCertNotValidAfterTime string `json:"expiring_cert_not_valid_after_time,omitempty"` Password string `json:"password"` Type string `json:"type"` Username string `json:"username"` diff --git a/handler/user/user.go b/handler/user/user.go index dfa753e..cbd6311 100644 --- a/handler/user/user.go +++ b/handler/user/user.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -435,61 +434,61 @@ type AccessTokenCreateIn struct { Scopes *[]string `json:"scopes,omitempty"` } type AccessTokenCreateOut struct { - CreateTime time.Time `json:"create_time"` - CreatedManually bool `json:"created_manually"` - CurrentlyActive *bool `json:"currently_active,omitempty"` - Description string `json:"description,omitempty"` - ExpiryTime *time.Time `json:"expiry_time,omitempty"` - ExtendWhenUsed bool `json:"extend_when_used"` - FullToken string `json:"full_token"` - LastIp string `json:"last_ip,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LastUserAgent string `json:"last_user_agent,omitempty"` - LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` - MaxAgeSeconds float64 `json:"max_age_seconds"` - Scopes []string `json:"scopes,omitempty"` - TokenPrefix string `json:"token_prefix"` + CreateTime string `json:"create_time"` + CreatedManually bool `json:"created_manually"` + CurrentlyActive *bool `json:"currently_active,omitempty"` + Description string `json:"description,omitempty"` + ExpiryTime string `json:"expiry_time,omitempty"` + ExtendWhenUsed bool `json:"extend_when_used"` + FullToken string `json:"full_token"` + LastIp string `json:"last_ip,omitempty"` + LastUsedTime string `json:"last_used_time,omitempty"` + LastUserAgent string `json:"last_user_agent,omitempty"` + LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` + MaxAgeSeconds float64 `json:"max_age_seconds"` + Scopes []string `json:"scopes,omitempty"` + TokenPrefix string `json:"token_prefix"` } type AccessTokenUpdateIn struct { Description string `json:"description"` } type AccessTokenUpdateOut struct { - CreateTime time.Time `json:"create_time"` - CreatedManually *bool `json:"created_manually,omitempty"` - CurrentlyActive *bool `json:"currently_active,omitempty"` - Description string `json:"description,omitempty"` - ExpiryTime *time.Time `json:"expiry_time,omitempty"` - ExtendWhenUsed bool `json:"extend_when_used"` - LastIp string `json:"last_ip,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LastUserAgent string `json:"last_user_agent,omitempty"` - LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` - MaxAgeSeconds float64 `json:"max_age_seconds"` - Scopes []string `json:"scopes,omitempty"` - TokenPrefix string `json:"token_prefix"` + CreateTime string `json:"create_time"` + CreatedManually *bool `json:"created_manually,omitempty"` + CurrentlyActive *bool `json:"currently_active,omitempty"` + Description string `json:"description,omitempty"` + ExpiryTime string `json:"expiry_time,omitempty"` + ExtendWhenUsed bool `json:"extend_when_used"` + LastIp string `json:"last_ip,omitempty"` + LastUsedTime string `json:"last_used_time,omitempty"` + LastUserAgent string `json:"last_user_agent,omitempty"` + LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` + MaxAgeSeconds float64 `json:"max_age_seconds"` + Scopes []string `json:"scopes,omitempty"` + TokenPrefix string `json:"token_prefix"` } type AccountInviteOut struct { - AccountId string `json:"account_id"` - AccountName string `json:"account_name"` - CreateTime time.Time `json:"create_time"` - InvitedByUserEmail string `json:"invited_by_user_email"` - TeamId string `json:"team_id"` - TeamName string `json:"team_name"` - UserEmail string `json:"user_email"` + AccountId string `json:"account_id"` + AccountName string `json:"account_name"` + CreateTime string `json:"create_time"` + InvitedByUserEmail string `json:"invited_by_user_email"` + TeamId string `json:"team_id"` + TeamName string `json:"team_name"` + UserEmail string `json:"user_email"` } type AuthenticationMethodOut struct { - AuthenticationMethodAccountId string `json:"authentication_method_account_id"` - CreateTime time.Time `json:"create_time"` - CurrentlyActive bool `json:"currently_active"` - DeleteTime time.Time `json:"delete_time"` - LastUsedTime time.Time `json:"last_used_time"` - MethodId string `json:"method_id"` - Name string `json:"name,omitempty"` - PublicRemoteIdentity string `json:"public_remote_identity"` - RemoteProviderId string `json:"remote_provider_id"` - State string `json:"state"` - UpdateTime time.Time `json:"update_time"` - UserEmail string `json:"user_email"` + AuthenticationMethodAccountId string `json:"authentication_method_account_id"` + CreateTime string `json:"create_time"` + CurrentlyActive bool `json:"currently_active"` + DeleteTime string `json:"delete_time"` + LastUsedTime string `json:"last_used_time"` + MethodId string `json:"method_id"` + Name string `json:"name,omitempty"` + PublicRemoteIdentity string `json:"public_remote_identity"` + RemoteProviderId string `json:"remote_provider_id"` + State string `json:"state"` + UpdateTime string `json:"update_time"` + UserEmail string `json:"user_email"` } type CheckPasswordStrengthExistingUserIn struct { NewPassword string `json:"new_password"` @@ -515,10 +514,10 @@ type IntercomOut struct { Hmac string `json:"hmac"` } type InvitationOut struct { - InviteCode string `json:"invite_code"` - InviteTime time.Time `json:"invite_time"` - InvitingUserEmail string `json:"inviting_user_email"` - ProjectName string `json:"project_name"` + InviteCode string `json:"invite_code"` + InviteTime string `json:"invite_time"` + InvitingUserEmail string `json:"inviting_user_email"` + ProjectName string `json:"project_name"` } type ProjectMembershipOut struct { Any string `json:"ANY,omitempty"` @@ -527,19 +526,19 @@ type ProjectMembershipsOut struct { Any []string `json:"ANY,omitempty"` } type TokenOut struct { - CreateTime time.Time `json:"create_time"` - CreatedManually bool `json:"created_manually"` - CurrentlyActive *bool `json:"currently_active,omitempty"` - Description string `json:"description,omitempty"` - ExpiryTime *time.Time `json:"expiry_time,omitempty"` - ExtendWhenUsed bool `json:"extend_when_used"` - LastIp string `json:"last_ip,omitempty"` - LastUsedTime *time.Time `json:"last_used_time,omitempty"` - LastUserAgent string `json:"last_user_agent,omitempty"` - LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` - MaxAgeSeconds float64 `json:"max_age_seconds"` - Scopes []string `json:"scopes,omitempty"` - TokenPrefix string `json:"token_prefix"` + CreateTime string `json:"create_time"` + CreatedManually bool `json:"created_manually"` + CurrentlyActive *bool `json:"currently_active,omitempty"` + Description string `json:"description,omitempty"` + ExpiryTime string `json:"expiry_time,omitempty"` + ExtendWhenUsed bool `json:"extend_when_used"` + LastIp string `json:"last_ip,omitempty"` + LastUsedTime string `json:"last_used_time,omitempty"` + LastUserAgent string `json:"last_user_agent,omitempty"` + LastUserAgentHumanReadable string `json:"last_user_agent_human_readable,omitempty"` + MaxAgeSeconds float64 `json:"max_age_seconds"` + Scopes []string `json:"scopes,omitempty"` + TokenPrefix string `json:"token_prefix"` } type TwoFactorAuthConfigureIn struct { Method string `json:"method"` @@ -603,17 +602,17 @@ type UserCreateOut struct { UserEmail string `json:"user_email"` } type UserGroupOut struct { - CreateTime time.Time `json:"create_time"` - Description string `json:"description"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + CreateTime string `json:"create_time"` + Description string `json:"description"` + UpdateTime string `json:"update_time"` + UserGroupId string `json:"user_group_id"` + UserGroupName string `json:"user_group_name"` } type UserInfoOut struct { Auth []string `json:"auth"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` + CreateTime string `json:"create_time,omitempty"` Department string `json:"department,omitempty"` Features map[string]any `json:"features,omitempty"` Intercom IntercomOut `json:"intercom"` @@ -634,7 +633,7 @@ type UserOut struct { Auth []string `json:"auth"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` + CreateTime string `json:"create_time,omitempty"` Department string `json:"department,omitempty"` Features map[string]any `json:"features,omitempty"` Invitations []InvitationOut `json:"invitations"` @@ -671,7 +670,7 @@ type UserUpdateOut struct { Auth []string `json:"auth"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` + CreateTime string `json:"create_time,omitempty"` Department string `json:"department,omitempty"` Features map[string]any `json:"features,omitempty"` Intercom IntercomOut `json:"intercom"` diff --git a/handler/usergroup/usergroup.go b/handler/usergroup/usergroup.go index 7b1ffc4..4a0fe0f 100644 --- a/handler/usergroup/usergroup.go +++ b/handler/usergroup/usergroup.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -135,7 +134,7 @@ func (h *UserGroupHandler) UserGroupsList(ctx context.Context, organizationId st } type MemberOut struct { - LastActivityTime *time.Time `json:"last_activity_time,omitempty"` + LastActivityTime string `json:"last_activity_time,omitempty"` UserId string `json:"user_id"` UserInfo UserInfoOut `json:"user_info"` } @@ -155,54 +154,54 @@ type UserGroupCreateIn struct { UserGroupName string `json:"user_group_name"` } type UserGroupCreateOut struct { - CreateTime time.Time `json:"create_time"` - Description string `json:"description"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + CreateTime string `json:"create_time"` + Description string `json:"description"` + UpdateTime string `json:"update_time"` + UserGroupId string `json:"user_group_id"` + UserGroupName string `json:"user_group_name"` } type UserGroupGetOut struct { - CreateTime time.Time `json:"create_time"` - Description string `json:"description"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + CreateTime string `json:"create_time"` + Description string `json:"description"` + UpdateTime string `json:"update_time"` + UserGroupId string `json:"user_group_id"` + UserGroupName string `json:"user_group_name"` } type UserGroupMembersUpdateIn struct { MemberIds []string `json:"member_ids"` Operation OperationType `json:"operation"` } type UserGroupOut struct { - CreateTime time.Time `json:"create_time"` - Description string `json:"description"` - MemberCount int `json:"member_count"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + CreateTime string `json:"create_time"` + Description string `json:"description"` + MemberCount int `json:"member_count"` + UpdateTime string `json:"update_time"` + UserGroupId string `json:"user_group_id"` + UserGroupName string `json:"user_group_name"` } type UserGroupUpdateIn struct { Description string `json:"description,omitempty"` UserGroupName string `json:"user_group_name,omitempty"` } type UserGroupUpdateOut struct { - CreateTime time.Time `json:"create_time"` - Description string `json:"description"` - UpdateTime time.Time `json:"update_time"` - UserGroupId string `json:"user_group_id"` - UserGroupName string `json:"user_group_name"` + CreateTime string `json:"create_time"` + Description string `json:"description"` + UpdateTime string `json:"update_time"` + UserGroupId string `json:"user_group_id"` + UserGroupName string `json:"user_group_name"` } type UserInfoOut struct { - City string `json:"city,omitempty"` - Country string `json:"country,omitempty"` - CreateTime time.Time `json:"create_time"` - Department string `json:"department,omitempty"` - IsApplicationUser bool `json:"is_application_user"` - JobTitle string `json:"job_title,omitempty"` - ManagedByScim bool `json:"managed_by_scim"` - ManagingOrganizationId string `json:"managing_organization_id,omitempty"` - RealName string `json:"real_name"` - State string `json:"state"` - UserEmail string `json:"user_email"` + City string `json:"city,omitempty"` + Country string `json:"country,omitempty"` + CreateTime string `json:"create_time"` + Department string `json:"department,omitempty"` + IsApplicationUser bool `json:"is_application_user"` + JobTitle string `json:"job_title,omitempty"` + ManagedByScim bool `json:"managed_by_scim"` + ManagingOrganizationId string `json:"managing_organization_id,omitempty"` + RealName string `json:"real_name"` + State string `json:"state"` + UserEmail string `json:"user_email"` } type userGroupMemberListOut struct { Members []MemberOut `json:"members"` diff --git a/handler/vpc/vpc.go b/handler/vpc/vpc.go index 29f9873..6478d0d 100644 --- a/handler/vpc/vpc.go +++ b/handler/vpc/vpc.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "time" ) type Handler interface { @@ -202,7 +201,7 @@ type PeeringConnectionIn struct { UserPeerNetworkCidrs *[]string `json:"user_peer_network_cidrs,omitempty"` } type PeeringConnectionOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` PeerAzureAppId string `json:"peer_azure_app_id"` PeerAzureTenantId string `json:"peer_azure_tenant_id"` PeerCloudAccount string `json:"peer_cloud_account"` @@ -211,7 +210,7 @@ type PeeringConnectionOut struct { PeerVpc string `json:"peer_vpc"` State string `json:"state"` StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` VpcPeeringConnectionType string `json:"vpc_peering_connection_type"` } @@ -227,41 +226,41 @@ type VpcCreateIn struct { } type VpcCreateOut struct { CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` NetworkCidr string `json:"network_cidr"` PeeringConnections []PeeringConnectionOut `json:"peering_connections"` PendingBuildOnlyPeeringConnections string `json:"pending_build_only_peering_connections,omitempty"` ProjectVpcId string `json:"project_vpc_id"` State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type VpcDeleteOut struct { CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` NetworkCidr string `json:"network_cidr"` PeeringConnections []PeeringConnectionOut `json:"peering_connections"` PendingBuildOnlyPeeringConnections string `json:"pending_build_only_peering_connections,omitempty"` ProjectVpcId string `json:"project_vpc_id"` State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type VpcGetOut struct { CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` NetworkCidr string `json:"network_cidr"` PeeringConnections []PeeringConnectionOut `json:"peering_connections"` PendingBuildOnlyPeeringConnections string `json:"pending_build_only_peering_connections,omitempty"` ProjectVpcId string `json:"project_vpc_id"` State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type VpcOut struct { - CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` - NetworkCidr string `json:"network_cidr"` - ProjectVpcId string `json:"project_vpc_id"` - State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + CloudName string `json:"cloud_name"` + CreateTime string `json:"create_time"` + NetworkCidr string `json:"network_cidr"` + ProjectVpcId string `json:"project_vpc_id"` + State string `json:"state"` + UpdateTime string `json:"update_time"` } type VpcPeeringConnectionCreateIn struct { PeerAzureAppId string `json:"peer_azure_app_id,omitempty"` @@ -273,7 +272,7 @@ type VpcPeeringConnectionCreateIn struct { UserPeerNetworkCidrs *[]string `json:"user_peer_network_cidrs,omitempty"` } type VpcPeeringConnectionCreateOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` PeerAzureAppId string `json:"peer_azure_app_id"` PeerAzureTenantId string `json:"peer_azure_tenant_id"` PeerCloudAccount string `json:"peer_cloud_account"` @@ -282,12 +281,12 @@ type VpcPeeringConnectionCreateOut struct { PeerVpc string `json:"peer_vpc"` State string `json:"state"` StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` VpcPeeringConnectionType string `json:"vpc_peering_connection_type"` } type VpcPeeringConnectionDeleteOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` PeerAzureAppId string `json:"peer_azure_app_id"` PeerAzureTenantId string `json:"peer_azure_tenant_id"` PeerCloudAccount string `json:"peer_cloud_account"` @@ -296,7 +295,7 @@ type VpcPeeringConnectionDeleteOut struct { PeerVpc string `json:"peer_vpc"` State string `json:"state"` StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` VpcPeeringConnectionType string `json:"vpc_peering_connection_type"` } @@ -306,16 +305,16 @@ type VpcPeeringConnectionUpdateIn struct { } type VpcPeeringConnectionUpdateOut struct { CloudName string `json:"cloud_name"` - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` NetworkCidr string `json:"network_cidr"` PeeringConnections []PeeringConnectionOut `json:"peering_connections"` PendingBuildOnlyPeeringConnections string `json:"pending_build_only_peering_connections,omitempty"` ProjectVpcId string `json:"project_vpc_id"` State string `json:"state"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` } type VpcPeeringConnectionWithRegionDeleteOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` PeerAzureAppId string `json:"peer_azure_app_id"` PeerAzureTenantId string `json:"peer_azure_tenant_id"` PeerCloudAccount string `json:"peer_cloud_account"` @@ -324,12 +323,12 @@ type VpcPeeringConnectionWithRegionDeleteOut struct { PeerVpc string `json:"peer_vpc"` State string `json:"state"` StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` VpcPeeringConnectionType string `json:"vpc_peering_connection_type"` } type VpcPeeringConnectionWithResourceGroupDeleteOut struct { - CreateTime time.Time `json:"create_time"` + CreateTime string `json:"create_time"` PeerAzureAppId string `json:"peer_azure_app_id"` PeerAzureTenantId string `json:"peer_azure_tenant_id"` PeerCloudAccount string `json:"peer_cloud_account"` @@ -338,7 +337,7 @@ type VpcPeeringConnectionWithResourceGroupDeleteOut struct { PeerVpc string `json:"peer_vpc"` State string `json:"state"` StateInfo StateInfoOut `json:"state_info"` - UpdateTime time.Time `json:"update_time"` + UpdateTime string `json:"update_time"` UserPeerNetworkCidrs []string `json:"user_peer_network_cidrs"` VpcPeeringConnectionType string `json:"vpc_peering_connection_type"` }