// Code generated by protoc-gen-microweb. DO NOT EDIT.
// source: v0.proto

package v0

import (
	"encoding/json"

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

// ResourceIDJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ResourceID. This struct is safe to replace or modify but
// should not be done so concurrently.
var ResourceIDJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ResourceID) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ResourceIDJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ResourceID)(nil)

// ResourceIDJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ResourceID. This struct is safe to replace or modify but
// should not be done so concurrently.
var ResourceIDJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ResourceID) UnmarshalJSON(b []byte) error {
	return ResourceIDJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ResourceID)(nil)

// ReferenceJSONMarshaler describes the default protojson.Marshaler used by all
// instances of Reference. This struct is safe to replace or modify but
// should not be done so concurrently.
var ReferenceJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *Reference) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ReferenceJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*Reference)(nil)

// ReferenceJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of Reference. This struct is safe to replace or modify but
// should not be done so concurrently.
var ReferenceJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *Reference) UnmarshalJSON(b []byte) error {
	return ReferenceJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*Reference)(nil)

// AudioJSONMarshaler describes the default protojson.Marshaler used by all
// instances of Audio. This struct is safe to replace or modify but
// should not be done so concurrently.
var AudioJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *Audio) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return AudioJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*Audio)(nil)

// AudioJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of Audio. This struct is safe to replace or modify but
// should not be done so concurrently.
var AudioJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *Audio) UnmarshalJSON(b []byte) error {
	return AudioJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*Audio)(nil)

// ImageJSONMarshaler describes the default protojson.Marshaler used by all
// instances of Image. This struct is safe to replace or modify but
// should not be done so concurrently.
var ImageJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *Image) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ImageJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*Image)(nil)

// ImageJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of Image. This struct is safe to replace or modify but
// should not be done so concurrently.
var ImageJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *Image) UnmarshalJSON(b []byte) error {
	return ImageJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*Image)(nil)

// GeoCoordinatesJSONMarshaler describes the default protojson.Marshaler used by all
// instances of GeoCoordinates. This struct is safe to replace or modify but
// should not be done so concurrently.
var GeoCoordinatesJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *GeoCoordinates) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return GeoCoordinatesJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*GeoCoordinates)(nil)

// GeoCoordinatesJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of GeoCoordinates. This struct is safe to replace or modify but
// should not be done so concurrently.
var GeoCoordinatesJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *GeoCoordinates) UnmarshalJSON(b []byte) error {
	return GeoCoordinatesJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*GeoCoordinates)(nil)

// PhotoJSONMarshaler describes the default protojson.Marshaler used by all
// instances of Photo. This struct is safe to replace or modify but
// should not be done so concurrently.
var PhotoJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *Photo) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return PhotoJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*Photo)(nil)

// PhotoJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of Photo. This struct is safe to replace or modify but
// should not be done so concurrently.
var PhotoJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *Photo) UnmarshalJSON(b []byte) error {
	return PhotoJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*Photo)(nil)

// EntityJSONMarshaler describes the default protojson.Marshaler used by all
// instances of Entity. This struct is safe to replace or modify but
// should not be done so concurrently.
var EntityJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *Entity) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return EntityJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*Entity)(nil)

// EntityJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of Entity. This struct is safe to replace or modify but
// should not be done so concurrently.
var EntityJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *Entity) UnmarshalJSON(b []byte) error {
	return EntityJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*Entity)(nil)

// MatchJSONMarshaler describes the default protojson.Marshaler used by all
// instances of Match. This struct is safe to replace or modify but
// should not be done so concurrently.
var MatchJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *Match) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return MatchJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*Match)(nil)

// MatchJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of Match. This struct is safe to replace or modify but
// should not be done so concurrently.
var MatchJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *Match) UnmarshalJSON(b []byte) error {
	return MatchJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*Match)(nil)
