func (x *DecodeDownlinkRequest) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "end_device_ids", "endDeviceIds":
			s.AddField("end_device_ids")
			var v EndDeviceIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.EndDeviceIds = &v
		case "version_ids", "versionIds":
			s.AddField("version_ids")
			var v EndDeviceVersionIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.VersionIds = &v
		case "downlink":
			if !s.ReadNil() {
				x.Downlink = &ApplicationDownlink{}
				x.Downlink.UnmarshalProtoJSON(s.WithField("downlink", true))
			}
		case "formatter":
			s.AddField("formatter")
			x.Formatter.UnmarshalProtoJSON(s)
		case "parameter":
			s.AddField("parameter")
			x.Parameter = s.ReadString()
		}
	})
}
UnmarshalProtoJSON unmarshals the DecodeDownlinkRequest message from JSON.
package ttnpb
import (
	gogo "github.com/TheThingsIndustries/protoc-gen-go-json/gogo"
	jsonplugin "github.com/TheThingsIndustries/protoc-gen-go-json/jsonplugin"
	types "github.com/gogo/protobuf/types"
)
func (x *ApplicationLink) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.DefaultFormatters != nil || s.HasField("default_formatters") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("default_formatters")
		x.DefaultFormatters.MarshalProtoJSON(s.WithField("default_formatters"))
	}
	if x.SkipPayloadCrypto != nil || s.HasField("skip_payload_crypto") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("skip_payload_crypto")
		if x.SkipPayloadCrypto == nil {
			s.WriteNil()
		} else {
			s.WriteBool(x.SkipPayloadCrypto.Value)
		}
	}
	s.WriteObjectEnd()
}
func (x *ApplicationLink) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "default_formatters", "defaultFormatters":
			if !s.ReadNil() {
				x.DefaultFormatters = &MessagePayloadFormatters{}
				x.DefaultFormatters.UnmarshalProtoJSON(s.WithField("default_formatters", true))
			}
		case "skip_payload_crypto", "skipPayloadCrypto":
			s.AddField("skip_payload_crypto")
			if !s.ReadNil() {
				v := s.ReadBool()
				if s.Err() != nil {
					return
				}
				x.SkipPayloadCrypto = &types.BoolValue{Value: v}
			}
		}
	})
}
func (x *SetApplicationLinkRequest) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.ApplicationIds != nil || s.HasField("application_ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("application_ids")
		gogo.MarshalMessage(s, x.ApplicationIds)
	}
	if x.Link != nil || s.HasField("link") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("link")
		x.Link.MarshalProtoJSON(s.WithField("link"))
	}
	if x.FieldMask != nil || s.HasField("field_mask") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("field_mask")
		if x.FieldMask == nil {
			s.WriteNil()
		} else {
			gogo.MarshalFieldMask(s, x.FieldMask)
		}
	}
	s.WriteObjectEnd()
}
func (x *SetApplicationLinkRequest) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "application_ids", "applicationIds":
			s.AddField("application_ids")
			var v ApplicationIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.ApplicationIds = &v
		case "link":
			if !s.ReadNil() {
				x.Link = &ApplicationLink{}
				x.Link.UnmarshalProtoJSON(s.WithField("link", true))
			}
		case "field_mask", "fieldMask":
			s.AddField("field_mask")
			v := gogo.UnmarshalFieldMask(s)
			if s.Err() != nil {
				return
			}
			x.FieldMask = v
		}
	})
}
func (x AsConfiguration_PubSub_Providers_Status) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	s.WriteEnumString(int32(x), AsConfiguration_PubSub_Providers_Status_name)
}
func (x *AsConfiguration_PubSub_Providers_Status) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	v := s.ReadEnum(AsConfiguration_PubSub_Providers_Status_value)
	if err := s.Err(); err != nil {
		s.SetErrorf("could not read Status enum: %v", err)
		return
	}
	*x = AsConfiguration_PubSub_Providers_Status(v)
}
func (x *AsConfiguration_PubSub_Providers) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Mqtt != 0 || s.HasField("mqtt") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("mqtt")
		x.Mqtt.MarshalProtoJSON(s)
	}
	if x.Nats != 0 || s.HasField("nats") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("nats")
		x.Nats.MarshalProtoJSON(s)
	}
	s.WriteObjectEnd()
}
func (x *AsConfiguration_PubSub_Providers) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "mqtt":
			s.AddField("mqtt")
			x.Mqtt.UnmarshalProtoJSON(s)
		case "nats":
			s.AddField("nats")
			x.Nats.UnmarshalProtoJSON(s)
		}
	})
}
func (x *AsConfiguration_PubSub) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Providers != nil || s.HasField("providers") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("providers")
		x.Providers.MarshalProtoJSON(s.WithField("providers"))
	}
	s.WriteObjectEnd()
}
func (x *AsConfiguration_PubSub) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "providers":
			if !s.ReadNil() {
				x.Providers = &AsConfiguration_PubSub_Providers{}
				x.Providers.UnmarshalProtoJSON(s.WithField("providers", true))
			}
		}
	})
}
func (x *AsConfiguration) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Pubsub != nil || s.HasField("pubsub") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("pubsub")
		x.Pubsub.MarshalProtoJSON(s.WithField("pubsub"))
	}
	s.WriteObjectEnd()
}
func (x *AsConfiguration) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "pubsub":
			if !s.ReadNil() {
				x.Pubsub = &AsConfiguration_PubSub{}
				x.Pubsub.UnmarshalProtoJSON(s.WithField("pubsub", true))
			}
		}
	})
}
func (x *GetAsConfigurationResponse) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Configuration != nil || s.HasField("configuration") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("configuration")
		x.Configuration.MarshalProtoJSON(s.WithField("configuration"))
	}
	s.WriteObjectEnd()
}
func (x *GetAsConfigurationResponse) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "configuration":
			if !s.ReadNil() {
				x.Configuration = &AsConfiguration{}
				x.Configuration.UnmarshalProtoJSON(s.WithField("configuration", true))
			}
		}
	})
}
func (x *NsAsHandleUplinkRequest) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if len(x.ApplicationUps) > 0 || s.HasField("application_ups") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("application_ups")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.ApplicationUps {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s.WithField("application_ups"))
		}
		s.WriteArrayEnd()
	}
	s.WriteObjectEnd()
}
func (x *NsAsHandleUplinkRequest) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "application_ups", "applicationUps":
			s.AddField("application_ups")
			s.ReadArray(func() {
				if s.ReadNil() {
					x.ApplicationUps = append(x.ApplicationUps, nil)
					return
				}
				v := &ApplicationUp{}
				v.UnmarshalProtoJSON(s.WithField("application_ups", false))
				if s.Err() != nil {
					return
				}
				x.ApplicationUps = append(x.ApplicationUps, v)
			})
		}
	})
}
func (x *EncodeDownlinkRequest) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.EndDeviceIds != nil || s.HasField("end_device_ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("end_device_ids")
		gogo.MarshalMessage(s, x.EndDeviceIds)
	}
	if x.VersionIds != nil || s.HasField("version_ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("version_ids")
		gogo.MarshalMessage(s, x.VersionIds)
	}
	if x.Downlink != nil || s.HasField("downlink") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("downlink")
		x.Downlink.MarshalProtoJSON(s.WithField("downlink"))
	}
	if x.Formatter != 0 || s.HasField("formatter") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("formatter")
		x.Formatter.MarshalProtoJSON(s)
	}
	if x.Parameter != "" || s.HasField("parameter") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("parameter")
		s.WriteString(x.Parameter)
	}
	s.WriteObjectEnd()
}
func (x *EncodeDownlinkRequest) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "end_device_ids", "endDeviceIds":
			s.AddField("end_device_ids")
			var v EndDeviceIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.EndDeviceIds = &v
		case "version_ids", "versionIds":
			s.AddField("version_ids")
			var v EndDeviceVersionIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.VersionIds = &v
		case "downlink":
			if !s.ReadNil() {
				x.Downlink = &ApplicationDownlink{}
				x.Downlink.UnmarshalProtoJSON(s.WithField("downlink", true))
			}
		case "formatter":
			s.AddField("formatter")
			x.Formatter.UnmarshalProtoJSON(s)
		case "parameter":
			s.AddField("parameter")
			x.Parameter = s.ReadString()
		}
	})
}
func (x *EncodeDownlinkResponse) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Downlink != nil || s.HasField("downlink") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("downlink")
		x.Downlink.MarshalProtoJSON(s.WithField("downlink"))
	}
	s.WriteObjectEnd()
}
func (x *EncodeDownlinkResponse) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "downlink":
			if !s.ReadNil() {
				x.Downlink = &ApplicationDownlink{}
				x.Downlink.UnmarshalProtoJSON(s.WithField("downlink", true))
			}
		}
	})
}
func (x *DecodeUplinkRequest) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.EndDeviceIds != nil || s.HasField("end_device_ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("end_device_ids")
		gogo.MarshalMessage(s, x.EndDeviceIds)
	}
	if x.VersionIds != nil || s.HasField("version_ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("version_ids")
		gogo.MarshalMessage(s, x.VersionIds)
	}
	if x.Uplink != nil || s.HasField("uplink") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("uplink")
		x.Uplink.MarshalProtoJSON(s.WithField("uplink"))
	}
	if x.Formatter != 0 || s.HasField("formatter") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("formatter")
		x.Formatter.MarshalProtoJSON(s)
	}
	if x.Parameter != "" || s.HasField("parameter") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("parameter")
		s.WriteString(x.Parameter)
	}
	s.WriteObjectEnd()
}
func (x *DecodeUplinkRequest) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "end_device_ids", "endDeviceIds":
			s.AddField("end_device_ids")
			var v EndDeviceIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.EndDeviceIds = &v
		case "version_ids", "versionIds":
			s.AddField("version_ids")
			var v EndDeviceVersionIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.VersionIds = &v
		case "uplink":
			if !s.ReadNil() {
				x.Uplink = &ApplicationUplink{}
				x.Uplink.UnmarshalProtoJSON(s.WithField("uplink", true))
			}
		case "formatter":
			s.AddField("formatter")
			x.Formatter.UnmarshalProtoJSON(s)
		case "parameter":
			s.AddField("parameter")
			x.Parameter = s.ReadString()
		}
	})
}
func (x *DecodeUplinkResponse) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Uplink != nil || s.HasField("uplink") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("uplink")
		x.Uplink.MarshalProtoJSON(s.WithField("uplink"))
	}
	s.WriteObjectEnd()
}
func (x *DecodeUplinkResponse) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "uplink":
			if !s.ReadNil() {
				x.Uplink = &ApplicationUplink{}
				x.Uplink.UnmarshalProtoJSON(s.WithField("uplink", true))
			}
		}
	})
}
func (x *DecodeDownlinkRequest) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.EndDeviceIds != nil || s.HasField("end_device_ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("end_device_ids")
		gogo.MarshalMessage(s, x.EndDeviceIds)
	}
	if x.VersionIds != nil || s.HasField("version_ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("version_ids")
		gogo.MarshalMessage(s, x.VersionIds)
	}
	if x.Downlink != nil || s.HasField("downlink") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("downlink")
		x.Downlink.MarshalProtoJSON(s.WithField("downlink"))
	}
	if x.Formatter != 0 || s.HasField("formatter") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("formatter")
		x.Formatter.MarshalProtoJSON(s)
	}
	if x.Parameter != "" || s.HasField("parameter") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("parameter")
		s.WriteString(x.Parameter)
	}
	s.WriteObjectEnd()
}