Use root JSON paths with list Values.
diff --git a/openstack/cdn/v1/services/results.go b/openstack/cdn/v1/services/results.go
index 3e806be..40581a4 100644
--- a/openstack/cdn/v1/services/results.go
+++ b/openstack/cdn/v1/services/results.go
@@ -30,6 +30,10 @@
return PathDomains
}
+func (d Domain) renderRootOr(render func(p Path) string) string {
+ return render(d.appropriatePath())
+}
+
// DomainList provides a useful way to perform bulk operations in a single Patch.
type DomainList []Domain
@@ -45,6 +49,10 @@
return PathDomains
}
+func (list DomainList) renderRootOr(_ func(p Path) string) string {
+ return list.appropriatePath().renderRoot()
+}
+
// OriginRule represents a rule that defines when an origin should be accessed.
type OriginRule struct {
// Specifies the name of this rule.
@@ -87,6 +95,10 @@
return PathOrigins
}
+func (o Origin) renderRootOr(render func(p Path) string) string {
+ return render(o.appropriatePath())
+}
+
// OriginList provides a useful way to perform bulk operations in a single Patch.
type OriginList []Domain
@@ -102,6 +114,10 @@
return PathOrigins
}
+func (list OriginList) renderRootOr(_ func(p Path) string) string {
+ return list.appropriatePath().renderRoot()
+}
+
// TTLRule specifies a rule that determines if a TTL should be applied to an asset.
type TTLRule struct {
// Specifies the name of this rule.
@@ -137,6 +153,10 @@
return PathCaching
}
+func (c CacheRule) renderRootOr(render func(p Path) string) string {
+ return render(c.appropriatePath())
+}
+
// CacheRuleList provides a useful way to perform bulk operations in a single Patch.
type CacheRuleList []Domain
@@ -152,6 +172,10 @@
return PathCaching
}
+func (list CacheRuleList) renderRootOr(_ func(p Path) string) string {
+ return list.appropriatePath().renderRoot()
+}
+
// RestrictionRule specifies a rule that determines if this restriction should be applied to an asset.
type RestrictionRule struct {
// Specifies the name of this rule.