authentication/v1alpha1/policy_json.gen.go (72 lines of code) (raw):
// Code generated by protoc-gen-jsonshim. DO NOT EDIT.
package v1alpha1
import (
bytes "bytes"
jsonpb "github.com/golang/protobuf/jsonpb"
)
// MarshalJSON is a custom marshaler for StringMatch
func (this *StringMatch) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for StringMatch
func (this *StringMatch) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for MutualTls
func (this *MutualTls) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for MutualTls
func (this *MutualTls) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for Jwt
func (this *Jwt) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for Jwt
func (this *Jwt) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for Jwt_TriggerRule
func (this *Jwt_TriggerRule) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for Jwt_TriggerRule
func (this *Jwt_TriggerRule) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for PeerAuthenticationMethod
func (this *PeerAuthenticationMethod) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for PeerAuthenticationMethod
func (this *PeerAuthenticationMethod) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for OriginAuthenticationMethod
func (this *OriginAuthenticationMethod) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for OriginAuthenticationMethod
func (this *OriginAuthenticationMethod) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for Policy
func (this *Policy) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for Policy
func (this *Policy) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for TargetSelector
func (this *TargetSelector) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for TargetSelector
func (this *TargetSelector) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
// MarshalJSON is a custom marshaler for PortSelector
func (this *PortSelector) MarshalJSON() ([]byte, error) {
str, err := PolicyMarshaler.MarshalToString(this)
return []byte(str), err
}
// UnmarshalJSON is a custom unmarshaler for PortSelector
func (this *PortSelector) UnmarshalJSON(b []byte) error {
return PolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
var (
PolicyMarshaler = &jsonpb.Marshaler{}
PolicyUnmarshaler = &jsonpb.Unmarshaler{AllowUnknownFields: true}
)