@@ -13,14 +13,14 @@ import (
13
13
"github.com/hashicorp/terraform-plugin-go/tftypes"
14
14
)
15
15
16
- // ResourceObject represents a Terraform resource.
17
- type ResourceObject struct {
16
+ // Resource represents a Terraform resource.
17
+ type Resource struct {
18
18
Raw tftypes.Value
19
19
Schema fwschema.Schema
20
20
}
21
21
22
22
// Get populates the struct passed as `target` with the resource.
23
- func (c ResourceObject ) Get (ctx context.Context , target interface {}) diag.Diagnostics {
23
+ func (c Resource ) Get (ctx context.Context , target interface {}) diag.Diagnostics {
24
24
return c .data ().Get (ctx , target )
25
25
}
26
26
@@ -31,7 +31,7 @@ func (c ResourceObject) Get(ctx context.Context, target interface{}) diag.Diagno
31
31
//
32
32
// Attributes or elements under null or unknown collections return null
33
33
// values, however this behavior is not protected by compatibility promises.
34
- func (c ResourceObject ) GetAttribute (ctx context.Context , path path.Path , target interface {}) diag.Diagnostics {
34
+ func (c Resource ) GetAttribute (ctx context.Context , path path.Path , target interface {}) diag.Diagnostics {
35
35
return c .data ().GetAtPath (ctx , path , target )
36
36
}
37
37
@@ -40,11 +40,11 @@ func (c ResourceObject) GetAttribute(ctx context.Context, path path.Path, target
40
40
// If a parent path is null or unknown, which would prevent a full expression
41
41
// from matching, the parent path is returned rather than no match to prevent
42
42
// false positives.
43
- func (c ResourceObject ) PathMatches (ctx context.Context , pathExpr path.Expression ) (path.Paths , diag.Diagnostics ) {
43
+ func (c Resource ) PathMatches (ctx context.Context , pathExpr path.Expression ) (path.Paths , diag.Diagnostics ) {
44
44
return c .data ().PathMatches (ctx , pathExpr )
45
45
}
46
46
47
- func (c ResourceObject ) data () fwschemadata.Data {
47
+ func (c Resource ) data () fwschemadata.Data {
48
48
return fwschemadata.Data {
49
49
Description : fwschemadata .DataDescriptionConfiguration ,
50
50
Schema : c .Schema ,
0 commit comments