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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

var (
	WorkloadMarshaler   = &jsonpb.Marshaler{}
	WorkloadUnmarshaler = &jsonpb.Unmarshaler{AllowUnknownFields: true}
)
