Decode to both the struct and a map and add access (#349)

This will allow for better TF integration.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-09-11 00:51:55 -04:00
1 parent c689af4306
commit b7524f8cfb
25 files changed
+311 -4

No files matched your search

+13
View File
@@ -1,7 +1,20 @@
// Code generated by "make api"; DO NOT EDIT.
package targets
import "bytes"
type HostSet struct {
Id string `json:"id,omitempty"`
HostCatalogId string `json:"host_catalog_id,omitempty"`
lastResponseBody *bytes.Buffer
lastResponseMap map[string]interface{}
}
func (n HostSet) LastResponseBody() *bytes.Buffer {
return n.lastResponseBody
}
func (n HostSet) LastResponseMap() map[string]interface{} {
return n.lastResponseMap
}
+12
View File
@@ -2,6 +2,7 @@
package targets
import (
"bytes"
"context"
"errors"
"fmt"
@@ -28,6 +29,17 @@ type Target struct {
HostSetIds []string `json:"host_set_ids,omitempty"`
HostSets []*HostSet `json:"host_sets,omitempty"`
DefaultPort uint32 `json:"default_port,omitempty"`
lastResponseBody *bytes.Buffer
lastResponseMap map[string]interface{}
}
func (n Target) LastResponseBody() *bytes.Buffer {
return n.lastResponseBody
}
func (n Target) LastResponseMap() map[string]interface{} {
return n.lastResponseMap
}
// Client is a client for this collection