@@ -42,14 +42,14 @@ type ListResource interface {
4242 List (context.Context , ListRequest , * ListResultsStream )
4343}
4444
45- // ListResourceWithProtoSchemas is an interface type that extends ListResource to include a method
45+ // ListResourceWithRawV5Schemas is an interface type that extends ListResource to include a method
4646// which allows provider developers to supply the ProtoV5 representations of resource and resource identity
4747// schemas. This is necessary if list functionality is being used with a legacy resource.
48- type ListResourceWithProtoSchemas interface {
48+ type ListResourceWithRawV5Schemas interface {
4949 ListResource
5050
51- // Schemas is called to provide the ProtoV5 representations of the resource and resource identity schemas.
52- Schemas (context.Context , * SchemaResponse )
51+ // RawV5Schemas is called to provide the ProtoV5 representations of the resource and resource identity schemas.
52+ RawV5Schemas (context.Context , SchemaRequest , * SchemaResponse )
5353}
5454
5555// ListResourceWithConfigure is an interface type that extends ListResource to include a method
@@ -193,18 +193,23 @@ type ListResult struct {
193193 Diagnostics diag.Diagnostics
194194}
195195
196+ // SchemaRequest represents a request for the ListResource to return the
197+ // ProtoV5 schemas. An instance of this request struct is supplied as an argument
198+ // to the ListResource type RawV5Schemas method.
199+ type SchemaRequest struct {}
200+
196201// SchemaResponse represents a response that is populated by the Schemas method
197202// and is used to pass along the ProtoV5 representations of the resource and resource identity schemas.
198203type SchemaResponse struct {
199204 // ProtoV5IdentitySchema is the ProtoV5 representation of the resource identity
200205 // schema. This should only be supplied if framework functionality is being used
201206 // with a legacy resource. Currently, this only applies to list.
202- ProtoV5IdentitySchema func () * tfprotov5.ResourceIdentitySchema
207+ ProtoV5IdentitySchema * tfprotov5.ResourceIdentitySchema
203208
204209 // ProtoV5Schema is the ProtoV5 representation of the resource schema
205210 // This should only be supplied if framework functionality is being used
206211 // with a legacy resource. Currently, this only applies to list.
207- ProtoV5Schema func () * tfprotov5.Schema
212+ ProtoV5Schema * tfprotov5.Schema
208213}
209214
210215// ValidateConfigRequest represents a request to validate the configuration of
0 commit comments