/
json.gen.go
50 lines (40 loc) · 1.36 KB
/
json.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Code generated by skv2. DO NOT EDIT.
// Generated json marshal and unmarshal functions
package v1alpha1
import (
bytes "bytes"
fmt "fmt"
math "math"
jsonpb "github.com/golang/protobuf/jsonpb"
proto "github.com/golang/protobuf/proto"
skv2jsonpb "github.com/solo-io/skv2/pkg/kube_jsonpb"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var (
marshaller = &skv2jsonpb.Marshaler{}
unmarshaller = &jsonpb.Unmarshaler{
AllowUnknownFields: true,
}
strictUnmarshaller = &jsonpb.Unmarshaler{}
)
// MarshalJSON is a custom marshaler for KubernetesClusterSpec
func (this *KubernetesClusterSpec) MarshalJSON() ([]byte, error) {
str, err := marshaller.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for KubernetesClusterSpec
func (this *KubernetesClusterSpec) UnmarshalJSON(b []byte) error {
return unmarshaller.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for KubernetesClusterStatus
func (this *KubernetesClusterStatus) MarshalJSON() ([]byte, error) {
str, err := marshaller.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for KubernetesClusterStatus
func (this *KubernetesClusterStatus) UnmarshalJSON(b []byte) error {
return unmarshaller.Unmarshal(bytes.NewReader(b), this)
}