@@ -59,24 +59,26 @@ func PaginationCursorJSONClientModelToTF(in *PaginationCursorJSONClientModel) (P
5959
6060// PolicyAccessPolicyTFModel is a Terraform model struct for the PolicyAccessPolicyAttributes schema.
6161type PolicyAccessPolicyTFModel struct {
62- Components types.List `tfsdk:"components"`
63- Description types.String `tfsdk:"description"`
64- ID types.String `tfsdk:"id"`
65- Name types.String `tfsdk:"name"`
66- PolicyType types.String `tfsdk:"policy_type"`
67- TagIds types.List `tfsdk:"tag_ids"`
68- Version types.Int64 `tfsdk:"version"`
62+ Components types.List `tfsdk:"components"`
63+ Description types.String `tfsdk:"description"`
64+ ID types.String `tfsdk:"id"`
65+ IsAutogenerated types.Bool `tfsdk:"is_autogenerated"`
66+ Name types.String `tfsdk:"name"`
67+ PolicyType types.String `tfsdk:"policy_type"`
68+ TagIds types.List `tfsdk:"tag_ids"`
69+ Version types.Int64 `tfsdk:"version"`
6970}
7071
7172// PolicyAccessPolicyJSONClientModel stores data for use with jsonclient for making API requests.
7273type PolicyAccessPolicyJSONClientModel struct {
73- Components * []PolicyAccessPolicyComponentJSONClientModel `json:"components,omitempty"`
74- Description * string `json:"description,omitempty"`
75- ID * uuid.UUID `json:"id,omitempty"`
76- Name * string `json:"name,omitempty"`
77- PolicyType * string `json:"policy_type,omitempty"`
78- TagIds * []uuid.UUID `json:"tag_ids,omitempty"`
79- Version * int64 `json:"version,omitempty"`
74+ Components * []PolicyAccessPolicyComponentJSONClientModel `json:"components,omitempty"`
75+ Description * string `json:"description,omitempty"`
76+ ID * uuid.UUID `json:"id,omitempty"`
77+ IsAutogenerated * bool `json:"is_autogenerated,omitempty"`
78+ Name * string `json:"name,omitempty"`
79+ PolicyType * string `json:"policy_type,omitempty"`
80+ TagIds * []uuid.UUID `json:"tag_ids,omitempty"`
81+ Version * int64 `json:"version,omitempty"`
8082}
8183
8284// PolicyAccessPolicyAttrTypes defines the attribute types for the PolicyAccessPolicyAttributes schema.
@@ -86,10 +88,11 @@ var PolicyAccessPolicyAttrTypes = map[string]attr.Type{
8688 AttrTypes : PolicyAccessPolicyComponentAttrTypes ,
8789 },
8890 },
89- "description" : types .StringType ,
90- "id" : types .StringType ,
91- "name" : types .StringType ,
92- "policy_type" : types .StringType ,
91+ "description" : types .StringType ,
92+ "id" : types .StringType ,
93+ "is_autogenerated" : types .BoolType ,
94+ "name" : types .StringType ,
95+ "policy_type" : types .StringType ,
9396 "tag_ids" : types.ListType {
9497 ElemType : types .StringType ,
9598 },
@@ -128,6 +131,12 @@ var PolicyAccessPolicyAttributes = map[string]schema.Attribute{
128131 stringplanmodifier .UseStateForUnknown (),
129132 },
130133 },
134+ "is_autogenerated" : schema.BoolAttribute {
135+ Computed : true ,
136+ Description : "Whether this policy is autogenerated from an accessor or mutator." ,
137+ MarkdownDescription : "Whether this policy is autogenerated from an accessor or mutator." ,
138+ Optional : true ,
139+ },
131140 "name" : schema.StringAttribute {
132141 Description : "" ,
133142 MarkdownDescription : "" ,
@@ -223,6 +232,16 @@ func PolicyAccessPolicyTFModelToJSONClient(in *PolicyAccessPolicyTFModel) (*Poli
223232 if err != nil {
224233 return nil , ucerr .Errorf ("failed to convert \" id\" field: %+v" , err )
225234 }
235+ out .IsAutogenerated , err = func (val * types.Bool ) (* bool , error ) {
236+ if val .IsNull () || val .IsUnknown () {
237+ return nil , nil
238+ }
239+ converted := val .ValueBool ()
240+ return & converted , nil
241+ }(& in .IsAutogenerated )
242+ if err != nil {
243+ return nil , ucerr .Errorf ("failed to convert \" is_autogenerated\" field: %+v" , err )
244+ }
226245 out .Name , err = func (val * types.String ) (* string , error ) {
227246 if val .IsNull () || val .IsUnknown () {
228247 return nil , nil
@@ -349,6 +368,12 @@ func PolicyAccessPolicyJSONClientModelToTF(in *PolicyAccessPolicyJSONClientModel
349368 if err != nil {
350369 return PolicyAccessPolicyTFModel {}, ucerr .Errorf ("failed to convert \" id\" field: %+v" , err )
351370 }
371+ out .IsAutogenerated , err = func (val * bool ) (types.Bool , error ) {
372+ return types .BoolPointerValue (val ), nil
373+ }(in .IsAutogenerated )
374+ if err != nil {
375+ return PolicyAccessPolicyTFModel {}, ucerr .Errorf ("failed to convert \" is_autogenerated\" field: %+v" , err )
376+ }
352377 out .Name , err = func (val * string ) (types.String , error ) {
353378 return types .StringPointerValue (val ), nil
354379 }(in .Name )
0 commit comments