// Code generated by protoc-json-shim. DO NOT EDIT.
package authv2beta1

import (
	protojson "google.golang.org/protobuf/encoding/protojson"
)

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

// UnmarshalJSON is a custom unmarshaler for TrafficPermissions
func (this *TrafficPermissions) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for NamespaceTrafficPermissions
func (this *NamespaceTrafficPermissions) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for PartitionTrafficPermissions
func (this *PartitionTrafficPermissions) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for Destination
func (this *Destination) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for Permission
func (this *Permission) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for Source
func (this *Source) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for ExcludeSource
func (this *ExcludeSource) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for DestinationRule
func (this *DestinationRule) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for ExcludePermissionRule
func (this *ExcludePermissionRule) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

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

// UnmarshalJSON is a custom unmarshaler for DestinationRuleHeader
func (this *DestinationRuleHeader) UnmarshalJSON(b []byte) error {
	return TrafficPermissionsUnmarshaler.Unmarshal(b, this)
}

var (
	TrafficPermissionsMarshaler   = &protojson.MarshalOptions{}
	TrafficPermissionsUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false}
)