@@ -66,7 +66,6 @@ func (data PolicyObjectPreferredColorGroup) getPath() string {
66
66
67
67
// End of section. //template:end getPath
68
68
69
- // Section below is generated&owned by "gen/generator.go". //template:begin toBody
70
69
func (data PolicyObjectPreferredColorGroup ) toBody (ctx context.Context ) string {
71
70
body := ""
72
71
body , _ = sjson .Set (body , "name" , data .Name .ValueString ())
@@ -76,7 +75,9 @@ func (data PolicyObjectPreferredColorGroup) toBody(ctx context.Context) string {
76
75
77
76
for _ , item := range data .Entries {
78
77
itemBody := ""
79
- if ! item .PrimaryColorPreference .IsNull () {
78
+ if item .PrimaryColorPreference .IsNull () {
79
+ itemBody , _ = sjson .Set (itemBody , "primaryPreference" , map [string ]interface {}{})
80
+ } else {
80
81
if true {
81
82
itemBody , _ = sjson .Set (itemBody , "primaryPreference.colorPreference.optionType" , "global" )
82
83
var values []string
@@ -90,7 +91,9 @@ func (data PolicyObjectPreferredColorGroup) toBody(ctx context.Context) string {
90
91
itemBody , _ = sjson .Set (itemBody , "primaryPreference.pathPreference.value" , item .PrimaryPathPreference .ValueString ())
91
92
}
92
93
}
93
- if ! item .SecondaryColorPreference .IsNull () {
94
+ if item .SecondaryColorPreference .IsNull () {
95
+ itemBody , _ = sjson .Set (itemBody , "secondaryPreference" , map [string ]interface {}{})
96
+ } else {
94
97
if true {
95
98
itemBody , _ = sjson .Set (itemBody , "secondaryPreference.colorPreference.optionType" , "global" )
96
99
var values []string
@@ -104,7 +107,9 @@ func (data PolicyObjectPreferredColorGroup) toBody(ctx context.Context) string {
104
107
itemBody , _ = sjson .Set (itemBody , "secondaryPreference.pathPreference.value" , item .SecondaryPathPreference .ValueString ())
105
108
}
106
109
}
107
- if ! item .TertiaryColorPreference .IsNull () {
110
+ if item .TertiaryColorPreference .IsNull () {
111
+ itemBody , _ = sjson .Set (itemBody , "tertiaryPreference" , map [string ]interface {}{})
112
+ } else {
108
113
if true {
109
114
itemBody , _ = sjson .Set (itemBody , "tertiaryPreference.colorPreference.optionType" , "global" )
110
115
var values []string
@@ -124,8 +129,6 @@ func (data PolicyObjectPreferredColorGroup) toBody(ctx context.Context) string {
124
129
return body
125
130
}
126
131
127
- // End of section. //template:end toBody
128
-
129
132
// Section below is generated&owned by "gen/generator.go". //template:begin fromBody
130
133
func (data * PolicyObjectPreferredColorGroup ) fromBody (ctx context.Context , res gjson.Result ) {
131
134
data .Name = types .StringValue (res .Get ("payload.name" ).String ())
0 commit comments