|
@@ -1,3 +1,6 @@
|
|
|
+// Copyright (c) HashiCorp, Inc.
|
|
|
+// SPDX-License-Identifier: MPL-2.0
|
|
|
+
|
|
|
package provider
|
|
|
|
|
|
import (
|
|
@@ -67,41 +70,51 @@ func (r *orderResource) Schema(_ context.Context, _ resource.SchemaRequest, resp
|
|
|
resp.Schema = schema.Schema{
|
|
|
Attributes: map[string]schema.Attribute{
|
|
|
"id": schema.StringAttribute{
|
|
|
- Computed: true,
|
|
|
+ Computed: true,
|
|
|
+ Description: "Numeric identifier of the order.",
|
|
|
PlanModifiers: []planmodifier.String{
|
|
|
stringplanmodifier.UseStateForUnknown(),
|
|
|
},
|
|
|
},
|
|
|
"last_updated": schema.StringAttribute{
|
|
|
- Computed: true,
|
|
|
+ Computed: true,
|
|
|
+ Description: "Timestamp of the last Terraform update of the order.",
|
|
|
},
|
|
|
"items": schema.ListNestedAttribute{
|
|
|
- Required: true,
|
|
|
+ Description: "List of items in the order.",
|
|
|
+ Required: true,
|
|
|
NestedObject: schema.NestedAttributeObject{
|
|
|
Attributes: map[string]schema.Attribute{
|
|
|
"quantity": schema.Int64Attribute{
|
|
|
- Required: true,
|
|
|
+ Description: "Count of this item in the order.",
|
|
|
+ Required: true,
|
|
|
},
|
|
|
"coffee": schema.SingleNestedAttribute{
|
|
|
Required: true,
|
|
|
Attributes: map[string]schema.Attribute{
|
|
|
"id": schema.Int64Attribute{
|
|
|
- Required: true,
|
|
|
+ Description: "Numeric identifier of the coffee.",
|
|
|
+ Required: true,
|
|
|
},
|
|
|
"name": schema.StringAttribute{
|
|
|
- Computed: true,
|
|
|
+ Computed: true,
|
|
|
+ Description: "Product name of the coffee.",
|
|
|
},
|
|
|
"teaser": schema.StringAttribute{
|
|
|
- Computed: true,
|
|
|
+ Computed: true,
|
|
|
+ Description: "Fun tagline for the coffee.",
|
|
|
},
|
|
|
"description": schema.StringAttribute{
|
|
|
- Computed: true,
|
|
|
+ Computed: true,
|
|
|
+ Description: "Product description of the coffee.",
|
|
|
},
|
|
|
"price": schema.Float64Attribute{
|
|
|
- Computed: true,
|
|
|
+ Computed: true,
|
|
|
+ Description: "Suggested cost of the coffee.",
|
|
|
},
|
|
|
"image": schema.StringAttribute{
|
|
|
- Computed: true,
|
|
|
+ Computed: true,
|
|
|
+ Description: "URI for an image of the coffee.",
|
|
|
},
|
|
|
},
|
|
|
},
|