@@ -111,40 +111,42 @@ func mapSignInPageToState(ctx context.Context, data *okta.SignInPage, state *sig
111111
112112func buildSignInPageRequest (ctx context.Context , model signinPageModel ) (okta.SignInPage , diag.Diagnostics ) {
113113 sp := okta.SignInPage {}
114- sp .SetPageContent (model .PageContent .ValueString ())
115- sp .SetWidgetVersion (model .WidgetVersion .ValueString ())
114+ if ! model .PageContent .IsNull () {
115+ sp .SetPageContent (model .PageContent .ValueString ())
116+ }
116117
117118 if ! model .WidgetVersion .IsNull () {
118- wc := okta.SignInPageAllOfWidgetCustomizations {}
119- wcm := & widgetCustomizationsModel {}
120- diags := model .WidgetCustomizations .As (ctx , wcm , basetypes.ObjectAsOptions {})
121- if diags .HasError () {
122- return * okta .NewSignInPage (), diags
123- }
124- wc .SignInLabel = wcm .SignInLabel .ValueStringPointer ()
125- wc .UsernameLabel = wcm .UsernameLabel .ValueStringPointer ()
126- wc .UsernameInfoTip = wcm .UsernameInfoTip .ValueStringPointer ()
127- wc .PasswordLabel = wcm .PasswordLabel .ValueStringPointer ()
128- wc .PasswordInfoTip = wcm .PasswordInfoTip .ValueStringPointer ()
129- wc .ShowPasswordVisibilityToggle = wcm .ShowPasswordVisibilityToggle .ValueBoolPointer ()
130- wc .ShowUserIdentifier = wcm .ShowUserIdentifier .ValueBoolPointer ()
131- wc .ForgotPasswordLabel = wcm .ForgotPasswordLabel .ValueStringPointer ()
132- wc .ForgotPasswordUrl = wcm .ForgotPasswordURL .ValueStringPointer ()
133- wc .UnlockAccountLabel = wcm .UnlockAccountLabel .ValueStringPointer ()
134- wc .UnlockAccountUrl = wcm .UnlockAccountURL .ValueStringPointer ()
135- wc .HelpLabel = wcm .HelpLabel .ValueStringPointer ()
136- wc .HelpUrl = wcm .HelpURL .ValueStringPointer ()
137- wc .CustomLink1Label = wcm .CustomLink1Label .ValueStringPointer ()
138- wc .CustomLink1Url = wcm .CustomLink1URL .ValueStringPointer ()
139- wc .CustomLink2Label = wcm .CustomLink2Label .ValueStringPointer ()
140- wc .CustomLink2Url = wcm .CustomLink2URL .ValueStringPointer ()
141- wc .AuthenticatorPageCustomLinkLabel = wcm .AuthenticatorPageCustomLinkLabel .ValueStringPointer ()
142- wc .AuthenticatorPageCustomLinkUrl = wcm .AuthenticatorPageCustomLinkURL .ValueStringPointer ()
143- wc .ClassicRecoveryFlowEmailOrUsernameLabel = wcm .ClassicRecoveryFlowEmailOrUsernameLabel .ValueStringPointer ()
144- wc .SetWidgetGeneration (wcm .WidgetGeneration .ValueString ())
119+ sp .SetWidgetVersion (model .WidgetVersion .ValueString ())
120+ }
145121
146- sp .SetWidgetCustomizations (wc )
122+ wc := okta.SignInPageAllOfWidgetCustomizations {}
123+ wcm := & widgetCustomizationsModel {}
124+ diags := model .WidgetCustomizations .As (ctx , wcm , basetypes.ObjectAsOptions {})
125+ if diags .HasError () {
126+ return * okta .NewSignInPage (), diags
147127 }
128+ wc .SignInLabel = wcm .SignInLabel .ValueStringPointer ()
129+ wc .UsernameLabel = wcm .UsernameLabel .ValueStringPointer ()
130+ wc .UsernameInfoTip = wcm .UsernameInfoTip .ValueStringPointer ()
131+ wc .PasswordLabel = wcm .PasswordLabel .ValueStringPointer ()
132+ wc .PasswordInfoTip = wcm .PasswordInfoTip .ValueStringPointer ()
133+ wc .ShowPasswordVisibilityToggle = wcm .ShowPasswordVisibilityToggle .ValueBoolPointer ()
134+ wc .ShowUserIdentifier = wcm .ShowUserIdentifier .ValueBoolPointer ()
135+ wc .ForgotPasswordLabel = wcm .ForgotPasswordLabel .ValueStringPointer ()
136+ wc .ForgotPasswordUrl = wcm .ForgotPasswordURL .ValueStringPointer ()
137+ wc .UnlockAccountLabel = wcm .UnlockAccountLabel .ValueStringPointer ()
138+ wc .UnlockAccountUrl = wcm .UnlockAccountURL .ValueStringPointer ()
139+ wc .HelpLabel = wcm .HelpLabel .ValueStringPointer ()
140+ wc .HelpUrl = wcm .HelpURL .ValueStringPointer ()
141+ wc .CustomLink1Label = wcm .CustomLink1Label .ValueStringPointer ()
142+ wc .CustomLink1Url = wcm .CustomLink1URL .ValueStringPointer ()
143+ wc .CustomLink2Label = wcm .CustomLink2Label .ValueStringPointer ()
144+ wc .CustomLink2Url = wcm .CustomLink2URL .ValueStringPointer ()
145+ wc .AuthenticatorPageCustomLinkLabel = wcm .AuthenticatorPageCustomLinkLabel .ValueStringPointer ()
146+ wc .AuthenticatorPageCustomLinkUrl = wcm .AuthenticatorPageCustomLinkURL .ValueStringPointer ()
147+ wc .ClassicRecoveryFlowEmailOrUsernameLabel = wcm .ClassicRecoveryFlowEmailOrUsernameLabel .ValueStringPointer ()
148+ wc .SetWidgetGeneration (wcm .WidgetGeneration .ValueString ())
149+ sp .SetWidgetCustomizations (wc )
148150
149151 if ! model .ContentSecurityPolicySetting .IsNull () {
150152 csp := okta.ContentSecurityPolicySetting {}
0 commit comments