// MarshalBinary encodes the payload to a slice of bytes.
190231
func (p McClassBSessionReqPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, p.Size())

	// McGroupIDHeader
	b[0] = p.McGroupIDHeader.McGroupID & 0x03 // first 2 bits

	// SessionTime
	binary.LittleEndian.PutUint32(b[1:5], p.SessionTime)

	// TimeOutPeriodicity
	b[5] = p.TimeOutPeriodicity.TimeOut & 0x1f // first 4 bits
	b[5] |= (p.TimeOutPeriodicity.Periodicity & 0x17) << 4

	// DLFrequency
	if p.DLFrequency%100 != 0 {
		return nil, errors.New("lorawan/applayer/multicastsetup: DLFrequency must be a multiple of 100")
	}
	dlFreqB := make([]byte, 4)
	binary.LittleEndian.PutUint32(dlFreqB, p.DLFrequency/100)
	copy(b[6:9], dlFreqB[:3])

	// DR
	b[9] = p.DR

	return b, nil
}
940697
func (r *RequestWriteV3) MarshalBinary() ([]byte, error) {
	return MarshalBinary(&r.Handle, &r.WriteFlags, &r.Offset, &r.RequiredSize, &r.Reserved, r.Payload)
}
134736
func (m *ExtUser) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
348466
func (m *StatusResponseCilium) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1112855
func (m *EndpointConfigurationSpec) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1091162
func (m *SwaggerJwkUpdateSet) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
874740
func (m *StatusResponseClusterNodesItems0PrimaryAddressIPV4) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
667779
func (p McGroupSetupAnsPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, p.Size())
	b[0] = p.McGroupIDHeader.McGroupID & 0x03 // first 2 bits
	if p.McGroupIDHeader.IDError {
		b[0] |= 0x04
	}
	return b, nil
}
434079
func (p BeaconFreqAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.BeaconFrequencyOK {
		b = (1 << 0)
	}

	return []byte{b}, nil
}
1190047
func (m *Status) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
184540
func (p NewChannelAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelFrequencyOK {
		b = (1 << 0)
	}
	if p.DataRateRangeOK {
		b = b ^ (1 << 1)
	}
	return []byte{b}, nil
}
1202563
func (m *SwaggerJwkCreateSet) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
250268
func (bh *Header) MarshalBinary() ([]byte, error) {
	b := &bytes.Buffer{}
	err := bh.EncodeBinary(b)
	if err != nil {
		return nil, err
	}
	return b.Bytes(), nil
}
272958
func (m *BPFMapEntry) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
158620
func (bf *BitField) MarshalBinary() ([]byte, error) {
	ret := make([]byte, binary.MaxVarintLen32+len(bf.data))
	n := binary.PutUvarint(ret, uint64(bf.size))
	n += copy(ret[n:], bf.data)
	return ret[:n], nil
}
1139891
func (m *OpenIDConnectContext) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1350463
func (m *IpvlanConfiguration) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}