// Code generated by protoc-gen-jsonshim. DO NOT EDIT.
package v1beta1

import (
	bytes "bytes"
	jsonpb "github.com/golang/protobuf/jsonpb"
)

// MarshalJSON is a custom marshaler for WorkloadSelector
func (this *WorkloadSelector) MarshalJSON() ([]byte, error) {
	str, err := SelectorMarshaler.MarshalToString(this)
	return []byte(str), err
}

// UnmarshalJSON is a custom unmarshaler for WorkloadSelector
func (this *WorkloadSelector) UnmarshalJSON(b []byte) error {
	return SelectorUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}

// MarshalJSON is a custom marshaler for PortSelector
func (this *PortSelector) MarshalJSON() ([]byte, error) {
	str, err := SelectorMarshaler.MarshalToString(this)
	return []byte(str), err
}

// UnmarshalJSON is a custom unmarshaler for PortSelector
func (this *PortSelector) UnmarshalJSON(b []byte) error {
	return SelectorUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}

// MarshalJSON is a custom marshaler for PolicyTargetReference
func (this *PolicyTargetReference) MarshalJSON() ([]byte, error) {
	str, err := SelectorMarshaler.MarshalToString(this)
	return []byte(str), err
}

// UnmarshalJSON is a custom unmarshaler for PolicyTargetReference
func (this *PolicyTargetReference) UnmarshalJSON(b []byte) error {
	return SelectorUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}

var (
	SelectorMarshaler   = &jsonpb.Marshaler{}
	SelectorUnmarshaler = &jsonpb.Unmarshaler{AllowUnknownFields: true}
)
