From c81cde9f0c53b9f818a12515256f0a31f43849f3 Mon Sep 17 00:00:00 2001 From: Tien Nguyen Date: Thu, 12 Dec 2024 14:54:16 -0500 Subject: [PATCH] fix policy embedded unable to marshal Signed-off-by: Tien Nguyen --- ...gement-APIs-oasv3-noEnums-inheritance.yaml | 4 +--- okta/api/openapi.yaml | 4 +--- okta/client.go | 24 +++++++++---------- okta/docs/ListPolicies200ResponseInner.md | 8 +++---- okta/docs/Policy.md | 8 +++---- okta/main_test.go | 1 - okta/model_app_user_update_request.go | 2 ++ okta/model_assign_role_to_client_request.go | 2 ++ ..._factor_transaction_status_200_response.go | 2 ++ okta/model_get_ssf_streams_200_response.go | 6 +++-- ...el_list_applications_200_response_inner.go | 2 ++ ...uthenticator_methods_200_response_inner.go | 2 ++ ..._list_authenticators_200_response_inner.go | 2 ++ ...vior_detection_rules_200_response_inner.go | 2 ++ ...e_assurance_policies_200_response_inner.go | 2 ++ okta/model_list_factors_200_response_inner.go | 2 ++ ...ures_for_application_200_response_inner.go | 2 ++ ...del_list_log_streams_200_response_inner.go | 2 ++ ...l_list_network_zones_200_response_inner.go | 2 ++ .../model_list_policies_200_response_inner.go | 2 ++ ...el_list_policy_rules_200_response_inner.go | 2 ++ ..._list_push_providers_200_response_inner.go | 2 ++ ...t_subscriptions_role_role_ref_parameter.go | 6 +++-- okta/model_policy.go | 12 +++++----- okta/model_replace_log_stream_request.go | 2 ++ okta/model_resend_enroll_factor_request.go | 2 ++ ...curity_events_provider_request_settings.go | 2 ++ okta/model_stream_configuration_aud.go | 10 ++++---- ...ning_connection_for_application_request.go | 2 ++ ..._update_feature_for_application_request.go | 2 ++ okta/model_user_factor_token_all_of_verify.go | 2 ++ 31 files changed, 83 insertions(+), 42 deletions(-) diff --git a/.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml b/.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml index 01a06d08..337ee955 100644 --- a/.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml +++ b/.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml @@ -42391,9 +42391,7 @@ components: $ref: '#/components/schemas/PolicyType' _embedded: type: object - additionalProperties: - type: object - properties: {} + additionalProperties: true readOnly: true _links: $ref: '#/components/schemas/PolicyLinks' diff --git a/okta/api/openapi.yaml b/okta/api/openapi.yaml index e61acc87..cbf4c7f6 100644 --- a/okta/api/openapi.yaml +++ b/okta/api/openapi.yaml @@ -64755,9 +64755,7 @@ components: - PROFILE_ENROLLMENT - RESOURCE_ACCESS _embedded: - additionalProperties: - properties: {} - type: object + additionalProperties: true readOnly: true type: object _links: diff --git a/okta/client.go b/okta/client.go index 8a6f3800..3a3c447b 100644 --- a/okta/client.go +++ b/okta/client.go @@ -1,7 +1,7 @@ /* Okta Admin Management -# Allows customers to easily access the Okta Management APIs +Allows customers to easily access the Okta Management APIs Copyright 2018 - Present Okta, Inc. @@ -9,7 +9,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -57,10 +57,10 @@ import ( "github.com/cenkalti/backoff/v4" "github.com/go-jose/go-jose/v3" "github.com/go-jose/go-jose/v3/jwt" + "golang.org/x/oauth2" "github.com/google/uuid" "github.com/lestrrat-go/jwx/jwk" goCache "github.com/patrickmn/go-cache" - "golang.org/x/oauth2" ) var ( @@ -283,7 +283,7 @@ type PrivateKeyAuth struct { privateKeyId string clientId string orgURL string - userAgent string + userAgent string scopes []string maxRetries int32 maxBackoff int64 @@ -298,7 +298,7 @@ type PrivateKeyAuthConfig struct { PrivateKeyId string ClientId string OrgURL string - UserAgent string + UserAgent string Scopes []string MaxRetries int32 MaxBackoff int64 @@ -392,7 +392,7 @@ type JWTAuth struct { tokenCache *goCache.Cache httpClient *http.Client orgURL string - userAgent string + userAgent string scopes []string clientAssertion string maxRetries int32 @@ -404,7 +404,7 @@ type JWTAuthConfig struct { TokenCache *goCache.Cache HttpClient *http.Client OrgURL string - UserAgent string + UserAgent string Scopes []string ClientAssertion string MaxRetries int32 @@ -417,7 +417,7 @@ func NewJWTAuth(config JWTAuthConfig) *JWTAuth { tokenCache: config.TokenCache, httpClient: config.HttpClient, orgURL: config.OrgURL, - userAgent: config.UserAgent, + userAgent: config.UserAgent, scopes: config.Scopes, clientAssertion: config.ClientAssertion, maxRetries: config.MaxRetries, @@ -499,7 +499,7 @@ type JWKAuth struct { type JWKAuthConfig struct { TokenCache *goCache.Cache HttpClient *http.Client - JWK string + JWK string EncryptionType string PrivateKeySigner jose.Signer PrivateKeyId string @@ -516,8 +516,8 @@ func NewJWKAuth(config JWKAuthConfig) *JWKAuth { return &JWKAuth{ tokenCache: config.TokenCache, httpClient: config.HttpClient, - jwk: config.JWK, - encryptionType: config.EncryptionType, + jwk: config.JWK, + encryptionType: config.EncryptionType, privateKeySigner: config.PrivateKeySigner, privateKeyId: config.PrivateKeyId, clientId: config.ClientId, @@ -696,7 +696,6 @@ func getAccessTokenForPrivateKey(httpClient *http.Client, orgURL, clientAssertio if err != nil { return nil, "", nil, err } - tokenRequest.Header.Add("Accept", "application/json") tokenRequest.Header.Add("Content-Type", "application/x-www-form-urlencoded") tokenRequest.Header.Add("User-Agent", userAgent) @@ -778,7 +777,6 @@ func getAccessTokenForDpopPrivateKey(tokenRequest *http.Request, httpClient *htt if err != nil { return nil, "", nil, err } - respBody, err := io.ReadAll(tokenResponse.Body) if err != nil { return nil, "", nil, err diff --git a/okta/docs/ListPolicies200ResponseInner.md b/okta/docs/ListPolicies200ResponseInner.md index b96beefb..d47e4cdd 100644 --- a/okta/docs/ListPolicies200ResponseInner.md +++ b/okta/docs/ListPolicies200ResponseInner.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **Status** | Pointer to **string** | | [optional] **System** | Pointer to **bool** | Specifies whether Okta created the Policy | [optional] **Type** | Pointer to **string** | All Okta orgs contain only one IdP Discovery Policy with an immutable default Rule routing to your org's sign-in page. Creating or replacing a policy with `IDP_DISCOVERY` type isn't supported. The following policy types are available with the Okta Identity Engine: `ACCESS_POLICY`, `PROFILE_ENROLLMENT`, `CONTINUOUS_ACCESS`, and `ENTITY_RISK`. The `CONTINUOUS_ACCESS`, and `ENTITY_RISK` policy types are in Early Access (EA). Contact your Okta account team to enable these features. | [optional] -**Embedded** | Pointer to **map[string]map[string]interface{}** | | [optional] [readonly] +**Embedded** | Pointer to **map[string]interface{}** | | [optional] [readonly] **Links** | Pointer to [**PolicyLinks**](PolicyLinks.md) | | [optional] **Conditions** | Pointer to **NullableString** | Policy conditions aren't supported for this policy type. | [optional] **Settings** | Pointer to [**PasswordPolicySettings**](PasswordPolicySettings.md) | | [optional] @@ -264,20 +264,20 @@ HasType returns a boolean if a field has been set. ### GetEmbedded -`func (o *ListPolicies200ResponseInner) GetEmbedded() map[string]map[string]interface{}` +`func (o *ListPolicies200ResponseInner) GetEmbedded() map[string]interface{}` GetEmbedded returns the Embedded field if non-nil, zero value otherwise. ### GetEmbeddedOk -`func (o *ListPolicies200ResponseInner) GetEmbeddedOk() (*map[string]map[string]interface{}, bool)` +`func (o *ListPolicies200ResponseInner) GetEmbeddedOk() (*map[string]interface{}, bool)` GetEmbeddedOk returns a tuple with the Embedded field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmbedded -`func (o *ListPolicies200ResponseInner) SetEmbedded(v map[string]map[string]interface{})` +`func (o *ListPolicies200ResponseInner) SetEmbedded(v map[string]interface{})` SetEmbedded sets Embedded field to given value. diff --git a/okta/docs/Policy.md b/okta/docs/Policy.md index 5c51aa72..ee4e97e7 100644 --- a/okta/docs/Policy.md +++ b/okta/docs/Policy.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **Status** | Pointer to **string** | | [optional] **System** | Pointer to **bool** | Specifies whether Okta created the Policy | [optional] **Type** | Pointer to **string** | All Okta orgs contain only one IdP Discovery Policy with an immutable default Rule routing to your org's sign-in page. Creating or replacing a policy with `IDP_DISCOVERY` type isn't supported. The following policy types are available with the Okta Identity Engine: `ACCESS_POLICY`, `PROFILE_ENROLLMENT`, `CONTINUOUS_ACCESS`, and `ENTITY_RISK`. The `CONTINUOUS_ACCESS`, and `ENTITY_RISK` policy types are in Early Access (EA). Contact your Okta account team to enable these features. | [optional] -**Embedded** | Pointer to **map[string]map[string]interface{}** | | [optional] [readonly] +**Embedded** | Pointer to **map[string]interface{}** | | [optional] [readonly] **Links** | Pointer to [**PolicyLinks**](PolicyLinks.md) | | [optional] ## Methods @@ -262,20 +262,20 @@ HasType returns a boolean if a field has been set. ### GetEmbedded -`func (o *Policy) GetEmbedded() map[string]map[string]interface{}` +`func (o *Policy) GetEmbedded() map[string]interface{}` GetEmbedded returns the Embedded field if non-nil, zero value otherwise. ### GetEmbeddedOk -`func (o *Policy) GetEmbeddedOk() (*map[string]map[string]interface{}, bool)` +`func (o *Policy) GetEmbeddedOk() (*map[string]interface{}, bool)` GetEmbeddedOk returns a tuple with the Embedded field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmbedded -`func (o *Policy) SetEmbedded(v map[string]map[string]interface{})` +`func (o *Policy) SetEmbedded(v map[string]interface{})` SetEmbedded sets Embedded field to given value. diff --git a/okta/main_test.go b/okta/main_test.go index 03fdcd6c..b1bd0e04 100644 --- a/okta/main_test.go +++ b/okta/main_test.go @@ -40,7 +40,6 @@ func sweep() (err error) { if err != nil { return } - fmt.Println("43", apiClient.cfg.Host) err = sweepGroups() if err != nil { return diff --git a/okta/model_app_user_update_request.go b/okta/model_app_user_update_request.go index 22352976..0c042b4c 100644 --- a/okta/model_app_user_update_request.go +++ b/okta/model_app_user_update_request.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // AppUserUpdateRequest - struct for AppUserUpdateRequest type AppUserUpdateRequest struct { @@ -160,3 +161,4 @@ func (v *NullableAppUserUpdateRequest) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_assign_role_to_client_request.go b/okta/model_assign_role_to_client_request.go index a5e514ed..63bf01cd 100644 --- a/okta/model_assign_role_to_client_request.go +++ b/okta/model_assign_role_to_client_request.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // AssignRoleToClientRequest - struct for AssignRoleToClientRequest type AssignRoleToClientRequest struct { @@ -160,3 +161,4 @@ func (v *NullableAssignRoleToClientRequest) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_get_factor_transaction_status_200_response.go b/okta/model_get_factor_transaction_status_200_response.go index 9c95a9ae..ed1ad884 100644 --- a/okta/model_get_factor_transaction_status_200_response.go +++ b/okta/model_get_factor_transaction_status_200_response.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // GetFactorTransactionStatus200Response - struct for GetFactorTransactionStatus200Response type GetFactorTransactionStatus200Response struct { @@ -258,3 +259,4 @@ func (v *NullableGetFactorTransactionStatus200Response) UnmarshalJSON(src []byte return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_get_ssf_streams_200_response.go b/okta/model_get_ssf_streams_200_response.go index e9a6ebb6..e1d07793 100644 --- a/okta/model_get_ssf_streams_200_response.go +++ b/okta/model_get_ssf_streams_200_response.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // GetSsfStreams200Response - struct for GetSsfStreams200Response type GetSsfStreams200Response struct { @@ -71,8 +72,8 @@ func (dst *GetSsfStreams200Response) UnmarshalJSON(data []byte) error { // try to unmarshal data into ArrayOfStreamConfiguration err = json.Unmarshal(data, &dst.ArrayOfStreamConfiguration) if err == nil { - jsonStreamConfiguration, _ := json.Marshal(dst.ArrayOfStreamConfiguration) - if string(jsonStreamConfiguration) == "{}" { // empty struct + jsonArrayOfStreamConfiguration, _ := json.Marshal(dst.ArrayOfStreamConfiguration) + if string(jsonArrayOfStreamConfiguration) == "{}" { // empty struct dst.ArrayOfStreamConfiguration = nil } else { match++ @@ -160,3 +161,4 @@ func (v *NullableGetSsfStreams200Response) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_applications_200_response_inner.go b/okta/model_list_applications_200_response_inner.go index 9f2b5df9..ffdc174c 100644 --- a/okta/model_list_applications_200_response_inner.go +++ b/okta/model_list_applications_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListApplications200ResponseInner - struct for ListApplications200ResponseInner type ListApplications200ResponseInner struct { @@ -458,3 +459,4 @@ func (v *NullableListApplications200ResponseInner) UnmarshalJSON(src []byte) err return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_authenticator_methods_200_response_inner.go b/okta/model_list_authenticator_methods_200_response_inner.go index b7e0f068..cf4f2768 100644 --- a/okta/model_list_authenticator_methods_200_response_inner.go +++ b/okta/model_list_authenticator_methods_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListAuthenticatorMethods200ResponseInner - struct for ListAuthenticatorMethods200ResponseInner type ListAuthenticatorMethods200ResponseInner struct { @@ -450,3 +451,4 @@ func (v *NullableListAuthenticatorMethods200ResponseInner) UnmarshalJSON(src []b return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_authenticators_200_response_inner.go b/okta/model_list_authenticators_200_response_inner.go index 87d14f70..e4555aa6 100644 --- a/okta/model_list_authenticators_200_response_inner.go +++ b/okta/model_list_authenticators_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListAuthenticators200ResponseInner - struct for ListAuthenticators200ResponseInner type ListAuthenticators200ResponseInner struct { @@ -698,3 +699,4 @@ func (v *NullableListAuthenticators200ResponseInner) UnmarshalJSON(src []byte) e return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_behavior_detection_rules_200_response_inner.go b/okta/model_list_behavior_detection_rules_200_response_inner.go index 14b93ddc..3fd119ee 100644 --- a/okta/model_list_behavior_detection_rules_200_response_inner.go +++ b/okta/model_list_behavior_detection_rules_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListBehaviorDetectionRules200ResponseInner - struct for ListBehaviorDetectionRules200ResponseInner type ListBehaviorDetectionRules200ResponseInner struct { @@ -258,3 +259,4 @@ func (v *NullableListBehaviorDetectionRules200ResponseInner) UnmarshalJSON(src [ return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_device_assurance_policies_200_response_inner.go b/okta/model_list_device_assurance_policies_200_response_inner.go index 62d8a11e..b8bbb2f2 100644 --- a/okta/model_list_device_assurance_policies_200_response_inner.go +++ b/okta/model_list_device_assurance_policies_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListDeviceAssurancePolicies200ResponseInner - struct for ListDeviceAssurancePolicies200ResponseInner type ListDeviceAssurancePolicies200ResponseInner struct { @@ -298,3 +299,4 @@ func (v *NullableListDeviceAssurancePolicies200ResponseInner) UnmarshalJSON(src return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_factors_200_response_inner.go b/okta/model_list_factors_200_response_inner.go index de548e76..7f674c34 100644 --- a/okta/model_list_factors_200_response_inner.go +++ b/okta/model_list_factors_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListFactors200ResponseInner - struct for ListFactors200ResponseInner type ListFactors200ResponseInner struct { @@ -590,3 +591,4 @@ func (v *NullableListFactors200ResponseInner) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_features_for_application_200_response_inner.go b/okta/model_list_features_for_application_200_response_inner.go index 6f7c1e75..9d20381a 100644 --- a/okta/model_list_features_for_application_200_response_inner.go +++ b/okta/model_list_features_for_application_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListFeaturesForApplication200ResponseInner - struct for ListFeaturesForApplication200ResponseInner type ListFeaturesForApplication200ResponseInner struct { @@ -178,3 +179,4 @@ func (v *NullableListFeaturesForApplication200ResponseInner) UnmarshalJSON(src [ return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_log_streams_200_response_inner.go b/okta/model_list_log_streams_200_response_inner.go index f736c666..89683c79 100644 --- a/okta/model_list_log_streams_200_response_inner.go +++ b/okta/model_list_log_streams_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListLogStreams200ResponseInner - struct for ListLogStreams200ResponseInner type ListLogStreams200ResponseInner struct { @@ -178,3 +179,4 @@ func (v *NullableListLogStreams200ResponseInner) UnmarshalJSON(src []byte) error return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_network_zones_200_response_inner.go b/okta/model_list_network_zones_200_response_inner.go index ab0c2ab2..2bdcda41 100644 --- a/okta/model_list_network_zones_200_response_inner.go +++ b/okta/model_list_network_zones_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListNetworkZones200ResponseInner - struct for ListNetworkZones200ResponseInner type ListNetworkZones200ResponseInner struct { @@ -218,3 +219,4 @@ func (v *NullableListNetworkZones200ResponseInner) UnmarshalJSON(src []byte) err return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_policies_200_response_inner.go b/okta/model_list_policies_200_response_inner.go index 9920f55b..e403e9d6 100644 --- a/okta/model_list_policies_200_response_inner.go +++ b/okta/model_list_policies_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListPolicies200ResponseInner - struct for ListPolicies200ResponseInner type ListPolicies200ResponseInner struct { @@ -418,3 +419,4 @@ func (v *NullableListPolicies200ResponseInner) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_policy_rules_200_response_inner.go b/okta/model_list_policy_rules_200_response_inner.go index 86049ae7..e81871cd 100644 --- a/okta/model_list_policy_rules_200_response_inner.go +++ b/okta/model_list_policy_rules_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListPolicyRules200ResponseInner - struct for ListPolicyRules200ResponseInner type ListPolicyRules200ResponseInner struct { @@ -418,3 +419,4 @@ func (v *NullableListPolicyRules200ResponseInner) UnmarshalJSON(src []byte) erro return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_push_providers_200_response_inner.go b/okta/model_list_push_providers_200_response_inner.go index 879d1829..f0699725 100644 --- a/okta/model_list_push_providers_200_response_inner.go +++ b/okta/model_list_push_providers_200_response_inner.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListPushProviders200ResponseInner - struct for ListPushProviders200ResponseInner type ListPushProviders200ResponseInner struct { @@ -178,3 +179,4 @@ func (v *NullableListPushProviders200ResponseInner) UnmarshalJSON(src []byte) er return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_list_subscriptions_role_role_ref_parameter.go b/okta/model_list_subscriptions_role_role_ref_parameter.go index 3400ad2e..957249d8 100644 --- a/okta/model_list_subscriptions_role_role_ref_parameter.go +++ b/okta/model_list_subscriptions_role_role_ref_parameter.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ListSubscriptionsRoleRoleRefParameter - struct for ListSubscriptionsRoleRoleRefParameter type ListSubscriptionsRoleRoleRefParameter struct { @@ -50,8 +51,8 @@ func (dst *ListSubscriptionsRoleRoleRefParameter) UnmarshalJSON(data []byte) err // try to unmarshal data into String err = json.Unmarshal(data, &dst.String) if err == nil { - jsonstring, _ := json.Marshal(dst.String) - if string(jsonstring) == "{}" { // empty struct + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct dst.String = nil } else { match++ @@ -130,3 +131,4 @@ func (v *NullableListSubscriptionsRoleRoleRefParameter) UnmarshalJSON(src []byte return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_policy.go b/okta/model_policy.go index 9e598935..c48435e3 100644 --- a/okta/model_policy.go +++ b/okta/model_policy.go @@ -48,7 +48,7 @@ type Policy struct { System *bool `json:"system,omitempty"` // All Okta orgs contain only one IdP Discovery Policy with an immutable default Rule routing to your org's sign-in page. Creating or replacing a policy with `IDP_DISCOVERY` type isn't supported. The following policy types are available with the Okta Identity Engine: `ACCESS_POLICY`, `PROFILE_ENROLLMENT`, `CONTINUOUS_ACCESS`, and `ENTITY_RISK`. The `CONTINUOUS_ACCESS`, and `ENTITY_RISK` policy types are in Early Access (EA). Contact your Okta account team to enable these features. Type *string `json:"type,omitempty"` - Embedded map[string]map[string]interface{} `json:"_embedded,omitempty"` + Embedded map[string]interface{} `json:"_embedded,omitempty"` Links *PolicyLinks `json:"_links,omitempty"` AdditionalProperties map[string]interface{} } @@ -361,9 +361,9 @@ func (o *Policy) SetType(v string) { } // GetEmbedded returns the Embedded field value if set, zero value otherwise. -func (o *Policy) GetEmbedded() map[string]map[string]interface{} { +func (o *Policy) GetEmbedded() map[string]interface{} { if o == nil || o.Embedded == nil { - var ret map[string]map[string]interface{} + var ret map[string]interface{} return ret } return o.Embedded @@ -371,7 +371,7 @@ func (o *Policy) GetEmbedded() map[string]map[string]interface{} { // GetEmbeddedOk returns a tuple with the Embedded field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Policy) GetEmbeddedOk() (map[string]map[string]interface{}, bool) { +func (o *Policy) GetEmbeddedOk() (map[string]interface{}, bool) { if o == nil || o.Embedded == nil { return nil, false } @@ -387,8 +387,8 @@ func (o *Policy) HasEmbedded() bool { return false } -// SetEmbedded gets a reference to the given map[string]map[string]interface{} and assigns it to the Embedded field. -func (o *Policy) SetEmbedded(v map[string]map[string]interface{}) { +// SetEmbedded gets a reference to the given map[string]interface{} and assigns it to the Embedded field. +func (o *Policy) SetEmbedded(v map[string]interface{}) { o.Embedded = v } diff --git a/okta/model_replace_log_stream_request.go b/okta/model_replace_log_stream_request.go index 46b552a8..08114235 100644 --- a/okta/model_replace_log_stream_request.go +++ b/okta/model_replace_log_stream_request.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ReplaceLogStreamRequest - struct for ReplaceLogStreamRequest type ReplaceLogStreamRequest struct { @@ -178,3 +179,4 @@ func (v *NullableReplaceLogStreamRequest) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_resend_enroll_factor_request.go b/okta/model_resend_enroll_factor_request.go index 338daea2..2d957c99 100644 --- a/okta/model_resend_enroll_factor_request.go +++ b/okta/model_resend_enroll_factor_request.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // ResendEnrollFactorRequest - struct for ResendEnrollFactorRequest type ResendEnrollFactorRequest struct { @@ -218,3 +219,4 @@ func (v *NullableResendEnrollFactorRequest) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_security_events_provider_request_settings.go b/okta/model_security_events_provider_request_settings.go index 39c108de..cef27681 100644 --- a/okta/model_security_events_provider_request_settings.go +++ b/okta/model_security_events_provider_request_settings.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // SecurityEventsProviderRequestSettings - Information about the Security Events Provider for signal ingestion type SecurityEventsProviderRequestSettings struct { @@ -160,3 +161,4 @@ func (v *NullableSecurityEventsProviderRequestSettings) UnmarshalJSON(src []byte return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_stream_configuration_aud.go b/okta/model_stream_configuration_aud.go index 371dfa9c..08dbc4a1 100644 --- a/okta/model_stream_configuration_aud.go +++ b/okta/model_stream_configuration_aud.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // StreamConfigurationAud - The audience used in the SET. This value is set as `aud` in the claim. A read-only parameter that is set by the transmitter. If this parameter is included in the request, the value must match the expected value from the transmitter. type StreamConfigurationAud struct { @@ -58,8 +59,8 @@ func (dst *StreamConfigurationAud) UnmarshalJSON(data []byte) error { // try to unmarshal data into ArrayOfString err = json.Unmarshal(data, &dst.ArrayOfString) if err == nil { - jsonstring, _ := json.Marshal(dst.ArrayOfString) - if string(jsonstring) == "{}" { // empty struct + jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) + if string(jsonArrayOfString) == "{}" { // empty struct dst.ArrayOfString = nil } else { match++ @@ -71,8 +72,8 @@ func (dst *StreamConfigurationAud) UnmarshalJSON(data []byte) error { // try to unmarshal data into String err = json.Unmarshal(data, &dst.String) if err == nil { - jsonstring, _ := json.Marshal(dst.String) - if string(jsonstring) == "{}" { // empty struct + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct dst.String = nil } else { match++ @@ -160,3 +161,4 @@ func (v *NullableStreamConfigurationAud) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_update_default_provisioning_connection_for_application_request.go b/okta/model_update_default_provisioning_connection_for_application_request.go index bf14aabf..906cf6b5 100644 --- a/okta/model_update_default_provisioning_connection_for_application_request.go +++ b/okta/model_update_default_provisioning_connection_for_application_request.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // UpdateDefaultProvisioningConnectionForApplicationRequest - struct for UpdateDefaultProvisioningConnectionForApplicationRequest type UpdateDefaultProvisioningConnectionForApplicationRequest struct { @@ -160,3 +161,4 @@ func (v *NullableUpdateDefaultProvisioningConnectionForApplicationRequest) Unmar return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_update_feature_for_application_request.go b/okta/model_update_feature_for_application_request.go index 8501ddab..b456ccde 100644 --- a/okta/model_update_feature_for_application_request.go +++ b/okta/model_update_feature_for_application_request.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // UpdateFeatureForApplicationRequest - struct for UpdateFeatureForApplicationRequest type UpdateFeatureForApplicationRequest struct { @@ -160,3 +161,4 @@ func (v *NullableUpdateFeatureForApplicationRequest) UnmarshalJSON(src []byte) e return json.Unmarshal(src, &v.value) } + diff --git a/okta/model_user_factor_token_all_of_verify.go b/okta/model_user_factor_token_all_of_verify.go index c72d43aa..50c45343 100644 --- a/okta/model_user_factor_token_all_of_verify.go +++ b/okta/model_user_factor_token_all_of_verify.go @@ -29,6 +29,7 @@ import ( "fmt" ) + //model_oneof.mustache // UserFactorTokenAllOfVerify - struct for UserFactorTokenAllOfVerify type UserFactorTokenAllOfVerify struct { @@ -160,3 +161,4 @@ func (v *NullableUserFactorTokenAllOfVerify) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } +