func (x *Collaborators) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "collaborators":
			s.AddField("collaborators")
			s.ReadArray(func() {
				if s.ReadNil() {
					x.Collaborators = append(x.Collaborators, nil)
					return
				}
				v := &Collaborator{}
				v.UnmarshalProtoJSON(s.WithField("collaborators", false))
				if s.Err() != nil {
					return
				}
				x.Collaborators = append(x.Collaborators, v)
			})
		}
	})
}
UnmarshalProtoJSON unmarshals the Collaborators message from JSON.
package ttnpb
import (
	gogo "github.com/TheThingsIndustries/protoc-gen-go-json/gogo"
	jsonplugin "github.com/TheThingsIndustries/protoc-gen-go-json/jsonplugin"
)
func (x Right) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	s.WriteEnumString(int32(x), Right_name)
}
var Right_customvalue = map[string]int32{
	"USER_INFO":                          1,
	"USER_SETTINGS_BASIC":                2,
	"USER_SETTINGS_API_KEYS":             3,
	"USER_DELETE":                        4,
	"USER_AUTHORIZED_CLIENTS":            5,
	"USER_APPLICATIONS_LIST":             6,
	"USER_APPLICATIONS_CREATE":           7,
	"USER_GATEWAYS_LIST":                 8,
	"USER_GATEWAYS_CREATE":               9,
	"USER_CLIENTS_LIST":                  10,
	"USER_CLIENTS_CREATE":                11,
	"USER_ORGANIZATIONS_LIST":            12,
	"USER_ORGANIZATIONS_CREATE":          13,
	"USER_ALL":                           14,
	"APPLICATION_INFO":                   15,
	"APPLICATION_SETTINGS_BASIC":         16,
	"APPLICATION_SETTINGS_API_KEYS":      17,
	"APPLICATION_SETTINGS_COLLABORATORS": 18,
	"APPLICATION_SETTINGS_PACKAGES":      56,
	"APPLICATION_DELETE":                 19,
	"APPLICATION_DEVICES_READ":           20,
	"APPLICATION_DEVICES_WRITE":          21,
	"APPLICATION_DEVICES_READ_KEYS":      22,
	"APPLICATION_DEVICES_WRITE_KEYS":     23,
	"APPLICATION_TRAFFIC_READ":           24,
	"APPLICATION_TRAFFIC_UP_WRITE":       25,
	"APPLICATION_TRAFFIC_DOWN_WRITE":     26,
	"APPLICATION_LINK":                   27,
	"APPLICATION_ALL":                    28,
	"CLIENT_ALL":                         29,
	"GATEWAY_INFO":                       30,
	"GATEWAY_SETTINGS_BASIC":             31,
	"GATEWAY_SETTINGS_API_KEYS":          32,
	"GATEWAY_SETTINGS_COLLABORATORS":     33,
	"GATEWAY_DELETE":                     34,
	"GATEWAY_TRAFFIC_READ":               35,
	"GATEWAY_TRAFFIC_DOWN_WRITE":         36,
	"GATEWAY_LINK":                       37,
	"GATEWAY_STATUS_READ":                38,
	"GATEWAY_LOCATION_READ":              39,
	"GATEWAY_WRITE_SECRETS":              57,
	"GATEWAY_READ_SECRETS":               58,
	"GATEWAY_ALL":                        40,
	"ORGANIZATION_INFO":                  41,
	"ORGANIZATION_SETTINGS_BASIC":        42,
	"ORGANIZATION_SETTINGS_API_KEYS":     43,
	"ORGANIZATION_SETTINGS_MEMBERS":      44,
	"ORGANIZATION_DELETE":                45,
	"ORGANIZATION_APPLICATIONS_LIST":     46,
	"ORGANIZATION_APPLICATIONS_CREATE":   47,
	"ORGANIZATION_GATEWAYS_LIST":         48,
	"ORGANIZATION_GATEWAYS_CREATE":       49,
	"ORGANIZATION_CLIENTS_LIST":          50,
	"ORGANIZATION_CLIENTS_CREATE":        51,
	"ORGANIZATION_ADD_AS_COLLABORATOR":   52,
	"ORGANIZATION_ALL":                   53,
	"SEND_INVITES":                       54,
	"ALL":                                55,
}
func (x *Right) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	v := s.ReadEnum(Right_value, Right_customvalue)
	if err := s.Err(); err != nil {
		s.SetErrorf("could not read Right enum: %v", err)
		return
	}
	*x = Right(v)
}
func (x *Rights) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if len(x.Rights) > 0 || s.HasField("rights") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("rights")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.Rights {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s)
		}
		s.WriteArrayEnd()
	}
	s.WriteObjectEnd()
}
func (x *Rights) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "rights":
			s.AddField("rights")
			s.ReadArray(func() {
				var v Right
				v.UnmarshalProtoJSON(s)
				x.Rights = append(x.Rights, v)
			})
		}
	})
}
func (x *APIKey) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Id != "" || s.HasField("id") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("id")
		s.WriteString(x.Id)
	}
	if x.Key != "" || s.HasField("key") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("key")
		s.WriteString(x.Key)
	}
	if x.Name != "" || s.HasField("name") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("name")
		s.WriteString(x.Name)
	}
	if len(x.Rights) > 0 || s.HasField("rights") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("rights")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.Rights {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s)
		}
		s.WriteArrayEnd()
	}
	if true {  
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("created_at")
		s.WriteTime(x.CreatedAt)
	}
	if true {  
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("updated_at")
		s.WriteTime(x.UpdatedAt)
	}
	if x.ExpiresAt != nil || s.HasField("expires_at") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("expires_at")
		if x.ExpiresAt == nil {
			s.WriteNil()
		} else {
			s.WriteTime(*x.ExpiresAt)
		}
	}
	s.WriteObjectEnd()
}
func (x *APIKey) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "id":
			s.AddField("id")
			x.Id = s.ReadString()
		case "key":
			s.AddField("key")
			x.Key = s.ReadString()
		case "name":
			s.AddField("name")
			x.Name = s.ReadString()
		case "rights":
			s.AddField("rights")
			s.ReadArray(func() {
				var v Right
				v.UnmarshalProtoJSON(s)
				x.Rights = append(x.Rights, v)
			})
		case "created_at", "createdAt":
			s.AddField("created_at")
			v := s.ReadTime()
			if s.Err() != nil {
				return
			}
			x.CreatedAt = *v
		case "updated_at", "updatedAt":
			s.AddField("updated_at")
			v := s.ReadTime()
			if s.Err() != nil {
				return
			}
			x.UpdatedAt = *v
		case "expires_at", "expiresAt":
			s.AddField("expires_at")
			v := s.ReadTime()
			if s.Err() != nil {
				return
			}
			x.ExpiresAt = v
		}
	})
}
func (x *APIKeys) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if len(x.ApiKeys) > 0 || s.HasField("api_keys") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("api_keys")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.ApiKeys {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s.WithField("api_keys"))
		}
		s.WriteArrayEnd()
	}
	s.WriteObjectEnd()
}
func (x *APIKeys) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "api_keys", "apiKeys":
			s.AddField("api_keys")
			s.ReadArray(func() {
				if s.ReadNil() {
					x.ApiKeys = append(x.ApiKeys, nil)
					return
				}
				v := &APIKey{}
				v.UnmarshalProtoJSON(s.WithField("api_keys", false))
				if s.Err() != nil {
					return
				}
				x.ApiKeys = append(x.ApiKeys, v)
			})
		}
	})
}
func (x *Collaborator) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Ids != nil || s.HasField("ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("ids")
		gogo.MarshalMessage(s, x.Ids)
	}
	if len(x.Rights) > 0 || s.HasField("rights") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("rights")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.Rights {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s)
		}
		s.WriteArrayEnd()
	}
	s.WriteObjectEnd()
}
func (x *Collaborator) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "ids":
			s.AddField("ids")
			var v OrganizationOrUserIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.Ids = &v
		case "rights":
			s.AddField("rights")
			s.ReadArray(func() {
				var v Right
				v.UnmarshalProtoJSON(s)
				x.Rights = append(x.Rights, v)
			})
		}
	})
}
func (x *GetCollaboratorResponse) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Ids != nil || s.HasField("ids") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("ids")
		gogo.MarshalMessage(s, x.Ids)
	}
	if len(x.Rights) > 0 || s.HasField("rights") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("rights")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.Rights {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s)
		}
		s.WriteArrayEnd()
	}
	s.WriteObjectEnd()
}
func (x *GetCollaboratorResponse) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "ids":
			s.AddField("ids")
			var v OrganizationOrUserIdentifiers
			gogo.UnmarshalMessage(s, &v)
			x.Ids = &v
		case "rights":
			s.AddField("rights")
			s.ReadArray(func() {
				var v Right
				v.UnmarshalProtoJSON(s)
				x.Rights = append(x.Rights, v)
			})
		}
	})
}
func (x *Collaborators) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if len(x.Collaborators) > 0 || s.HasField("collaborators") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("collaborators")
		s.WriteArrayStart()
		var wroteElement bool
		for _, element := range x.Collaborators {
			s.WriteMoreIf(&wroteElement)
			element.MarshalProtoJSON(s.WithField("collaborators"))
		}
		s.WriteArrayEnd()
	}
	s.WriteObjectEnd()
}