// MarshalBinary writes the subnet mask option to binary.
332760
func (s SubnetMask) MarshalBinary() ([]byte, error) {
	return []byte(s[:net.IPv4len]), nil
}
1275134
func (p PackageVersionAnsPayload) MarshalBinary() ([]byte, error) {
	return []byte{
		p.PackageIdentifier,
		p.PackageVersion,
	}, nil
}
1188369
func (m *SwaggerOAuthIntrospectionRequest) 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)
}
1190047
func (m *Status) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
7733
func (m *Endpoint) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
559637
func (m *StatusResponseContainerRuntime) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
596382
func (p McGroupStatusReqPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, p.Size())
	for i, mask := range p.CmdMask.RegGroupMask {
		if mask {
			b[0] |= (1 << uint8(i))
		}
	}
	return b, nil
}
249951
func (p DLChannelAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelFrequencyOK {
		b = b ^ 1
	}
	if p.UplinkFrequencyExists {
		b = b ^ (1 << 1)
	}
	return []byte{b}, nil
}
252618
func (p DeviceModeIndPayload) MarshalBinary() ([]byte, error) {
	return []byte{byte(p.Class)}, nil
}
1202563
func (m *SwaggerJwkCreateSet) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
442580
func (m *EndpointNetworking) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
91527
func (m *NodeAddressingElement) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
637775
func (v *VLAN) MarshalBinary() ([]byte, error) {
	b := make([]byte, 2)
	_, err := v.read(b)
	return b, err
}
995239
func (m *Swaggeroauth2TokenParameters) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1202883
func (m *LabelConfigurationSpec) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
190150
func (r Redundancy) MarshalBinary() ([]byte, error) {
	b := make([]byte, 1)
	if r.NbRep > 15 {
		return b, errors.New("lorawan: max value of NbRep is 15")
	}
	if r.ChMaskCntl > 7 {
		return b, errors.New("lorawan: max value of ChMaskCntl is 7")
	}
	b[0] = r.NbRep ^ (r.ChMaskCntl << 4)
	return b, nil
}