func (origin Origin) Params() []rfc5424.StructuredDataParam {
	var params []rfc5424.StructuredDataParam

	for _, ip := range origin.IPs {
		params = append(params, rfc5424.StructuredDataParam{
			Name:  "ip",
			Value: rfc5424.StructuredDataParamValue(ip.String()),
		})
	}

	enterpriseID := origin.EnterpriseID.String()
	if enterpriseID != "" {
		params = append(params, rfc5424.StructuredDataParam{
			Name:  "enterpriseID",
			Value: rfc5424.StructuredDataParamValue(enterpriseID),
		})
	}

	if origin.SoftwareName != "" {
		params = append(params, rfc5424.StructuredDataParam{
			Name:  "software",
			Value: rfc5424.StructuredDataParamValue(origin.SoftwareName),
		})
	}

	if origin.SoftwareVersion != version.Zero {
		params = append(params, rfc5424.StructuredDataParam{
			Name:  "swVersion",
			Value: rfc5424.StructuredDataParamValue(origin.SoftwareVersion.String()),
		})
	}

	return params
}
// Params returns the []SD-PARAM for this element.
Params returns the []SD-PARAM for this element.
// Params returns the [] SD - PARAM for this element .
func (origin Origin) Params() []rfc5424.StructuredDataParam {
	var params []rfc5424.StructuredDataParam
	for _, ip := range origin.IPs {
		params = append(params, rfc5424.StructuredDataParam{
			Name:  "ip",
			Value: rfc5424.StructuredDataParamValue(ip.String()),
		})
	}
	enterpriseID := origin.EnterpriseID.String()
	if enterpriseID != "" {
		params = append(params, rfc5424.StructuredDataParam{
			Name:  "enterpriseID",
			Value: rfc5424.StructuredDataParamValue(enterpriseID),
		})
	}
	if origin.SoftwareName != "" {
		params = append(params, rfc5424.StructuredDataParam{
			Name:  "software",
			Value: rfc5424.StructuredDataParamValue(origin.SoftwareName),
		})
	}
	if origin.SoftwareVersion != version.Zero {
		params = append(params, rfc5424.StructuredDataParam{
			Name:  "swVersion",
			Value: rfc5424.StructuredDataParamValue(origin.SoftwareVersion.String()),
		})
	}
	return params
}
func ( origin Origin ) Params ( ) [ ] rfc5424 . StructuredDataParam { var params [ ] rfc5424 . StructuredDataParam for _ , ip := range origin . IPs { params = append ( params , rfc5424 . StructuredDataParam { Name : " " , Value : rfc5424 . StructuredDataParamValue ( ip . String ( ) ) , } ) } enterpriseID := origin . EnterpriseID . String ( ) if enterpriseID != " " { params = append ( params , rfc5424 . StructuredDataParam { Name : " " , Value : rfc5424 . StructuredDataParamValue ( enterpriseID ) , } ) } if origin . SoftwareName != " " { params = append ( params , rfc5424 . StructuredDataParam { Name : " " , Value : rfc5424 . StructuredDataParamValue ( origin . SoftwareName ) , } ) } if origin . SoftwareVersion != version . Zero { params = append ( params , rfc5424 . StructuredDataParam { Name : " " , Value : rfc5424 . StructuredDataParamValue ( origin . SoftwareVersion . String ( ) ) , } ) } return params }
Params returns the []SD-PARAM for this element.
Params returns the [] SD - PARAM for this element .