Decode to both the struct and a map and add access (#349)
This will allow for better TF integration.
This commit is contained in:
1 parent
c689af4306
commit
b7524f8cfb
25 files changed
+311
-4
No files matched your search
@@ -2,6 +2,7 @@
|
||||
package hosts
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -27,6 +28,17 @@ type Host struct {
|
||||
Type string `json:"type,omitempty"`
|
||||
HostSetIds []string `json:"host_set_ids,omitempty"`
|
||||
Attributes map[string]interface{} `json:"attributes,omitempty"`
|
||||
|
||||
lastResponseBody *bytes.Buffer
|
||||
lastResponseMap map[string]interface{}
|
||||
}
|
||||
|
||||
func (n Host) LastResponseBody() *bytes.Buffer {
|
||||
return n.lastResponseBody
|
||||
}
|
||||
|
||||
func (n Host) LastResponseMap() map[string]interface{} {
|
||||
return n.lastResponseMap
|
||||
}
|
||||
|
||||
// Client is a client for this collection
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
// Code generated by "make api"; DO NOT EDIT.
|
||||
package hosts
|
||||
|
||||
import "bytes"
|
||||
|
||||
type StaticHostAttributes struct {
|
||||
Address string `json:"address,omitempty"`
|
||||
|
||||
lastResponseBody *bytes.Buffer
|
||||
lastResponseMap map[string]interface{}
|
||||
}
|
||||
|
||||
func (n StaticHostAttributes) LastResponseBody() *bytes.Buffer {
|
||||
return n.lastResponseBody
|
||||
}
|
||||
|
||||
func (n StaticHostAttributes) LastResponseMap() map[string]interface{} {
|
||||
return n.lastResponseMap
|
||||
}
|
||||
Reference in new issue
Block a user