func (tcc TotalConnectionCapacityPerPort) String(spacesn string) (result string) {
	spaces3 := "   "
	spacesn3 := spacesn + spaces3
	if tcc.Protocol != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "protocol", *tcc.Protocol)
	}
	if tcc.Port != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "port", *tcc.Port)
	}
	if tcc.Connection != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "connection", *tcc.Connection)
	}
	if tcc.ConnectionClient != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "connection-client", *tcc.ConnectionClient)
	}
	if tcc.Embryonic != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "embryonic", *tcc.Embryonic)
	}
	if tcc.EmbryonicClient != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "embryonic-client", *tcc.EmbryonicClient)
	}
	if tcc.ConnectionPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "connection-ps", *tcc.ConnectionPs)
	}
	if tcc.ConnectionClientPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "connection-client-ps", *tcc.ConnectionClientPs)
	}
	if tcc.RequestPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "request-ps", *tcc.RequestPs)
	}
	if tcc.RequestClientPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "request-client-ps", *tcc.RequestClientPs)
	}
	if tcc.PartialRequestPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "partial-request-ps", *tcc.PartialRequestPs)
	}
	if tcc.PartialRequestClientPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "partial-request-client-ps", *tcc.PartialRequestClientPs)
	}
	return
}
Convert TotalConnectionCapacityPerPort to string
package messages
import "fmt"
import "github.com/shopspring/decimal"
type PortRange struct {
	_struct   bool `codec:",uint"`  
	LowerPort *int `json:"lower-port" codec:"8,omitempty"`
	UpperPort *int `json:"upper-port" codec:"9,omitempty"`
}
type ICMPTypeRange struct {
	_struct   bool `codec:",uint"`  
	LowerType *int `json:"lower-type" codec:"32771,omitempty"`
	UpperType *int `json:"upper-type" codec:"32772,omitempty"`
}
type ACL struct {
	_struct        bool   `codec:",uint"`  
	AclName        string `json:"ietf-dots-signal-control:acl-name" codec:"54,omitempty"`
	ActivationType *int   `json:"ietf-dots-signal-control:activation-type" codec:"52,omitempty"`
}
type MitigationScope struct {
	_struct bool    `codec:",uint"`  
	Scopes  []Scope `json:"scope"             codec:"2"`
	ClientDomainIdentifier string `json:"cdid" codec:"3,omitempty"`
}
type Scope struct {
	_struct bool `codec:",uint"`  
	ClientIdentifier string `json:"cuid" codec:"4,omitempty"`
	MitigationId *int `json:"mid" codec:"5,omitempty"`
	TargetPrefix []string `json:"target-prefix" codec:"6,omitempty"`
	TargetPortRange []PortRange `json:"target-port-range" codec:"7,omitempty"`
	TargetProtocol []int `json:"target-protocol" codec:"10,omitempty"`
	FQDN []string `json:"target-fqdn" codec:"11,omitempty"`
	URI []string `json:"target-uri" codec:"12,omitempty"`
	AliasName []string `json:"alias-name" codec:"13,omitempty"`
	SourcePrefix []string `json:"ietf-dots-call-home:source-prefix" codec:"32768,omitempty"`
	SourcePortRange []PortRange `json:"ietf-dots-call-home:source-port-range" codec:"32769,omitempty"`
	SourceICMPTypeRange []ICMPTypeRange `json:"ietf-dots-call-home:source-icmp-type-range" codec:"32770,omitempty"`
	AclList []ACL `json:"ietf-dots-signal-control:acl-list" codec:"53,omitempty"`
	Lifetime *int `json:"lifetime" codec:"14,omitempty"`
	AttackStatus *int `json:"attack-status" codec:"29,omitempty"`
	TriggerMitigation *bool `json:"trigger-mitigation" codec:"45,omitempty"`
	TotalAttackTraffic []TelemetryTraffic `json:"ietf-dots-telemetry:total-attack-traffic" codec:"32885,omitempty"`
	AttackDetail []TelemetryAttackDetail `json:"ietf-dots-telemetry:attack-detail" codec:"32896,omitempty"`
}
type MitigationRequest struct {
	_struct         bool            `codec:",uint"`  
	MitigationScope MitigationScope `json:"ietf-dots-signal-channel:mitigation-scope" codec:"1"`
}
type TelemetryTraffic struct {
	_struct         bool    `codec:",uint"`  
	Unit            *int    `json:"ietf-dots-telemetry:unit" codec:"32880,omitempty"`
	Protocol        *uint8  `json:"ietf-dots-telemetry:protocol" codec:"32868,omitempty"`
	LowPercentileG  *uint64 `json:"ietf-dots-telemetry:low-percentile-g" codec:"32881,omitempty"`
	MidPercentileG  *uint64 `json:"ietf-dots-telemetry:mid-percentile-g" codec:"32882,omitempty"`
	HighPercentileG *uint64 `json:"ietf-dots-telemetry:high-percentile-g" codec:"32883,omitempty"`
	PeakG           *uint64 `json:"ietf-dots-telemetry:peak-g" codec:"32884,omitempty"`
}
type TelemetryAttackDetail struct {
	_struct        bool                  `codec:",uint"`  
	VendorId       *uint32               `json:"ietf-dots-telemetry:vendor-id" codec:"32917,omitempty"`  
	AttackId       *uint32               `json:"ietf-dots-telemetry:attack-id" codec:"32898,omitempty"`
	AttackName     *string               `json:"ietf-dots-telemetry:attack-name" codec:"32899,omitempty"`
	AttackSeverity *int                  `json:"ietf-dots-telemetry:attack-severity" codec:"32900,omitempty"`
	StartTime      *uint64               `json:"ietf-dots-telemetry:start-time" codec:"32901,omitempty"`
	EndTime        *uint64               `json:"ietf-dots-telemetry:end-time" codec:"32902,omitempty"`
	SourceCount    *TelemetrySourceCount `json:"ietf-dots-telemetry:source-count" codec:"32903,omitempty"`
	TopTalKer      *TelemetryTopTalker   `json:"ietf-dots-telemetry:top-talker" codec:"32904,omitempty"`
}
type TelemetrySourceCount struct{
	_struct         bool    `codec:",uint"`  
	LowPercentileG  *uint64 `json:"ietf-dots-telemetry:low-percentile-g" codec:"32881,omitempty"`
	MidPercentileG  *uint64 `json:"ietf-dots-telemetry:mid-percentile-g" codec:"32882,omitempty"`
	HighPercentileG *uint64 `json:"ietf-dots-telemetry:high-percentile-g" codec:"32883,omitempty"`
	PeakG           *uint64 `json:"ietf-dots-telemetry:peak-g" codec:"32884,omitempty"`
}
type TelemetryTopTalker struct {
	_struct bool              `codec:",uint"`  
	Talker  []TelemetryTalker `json:"ietf-dots-telemetry:talker" codec:"32906,omitempty"`
}
type TelemetryTalker struct {
	_struct               bool                            `codec:",uint"`  
	SpoofedStatus         *bool                           `json:"ietf-dots-telemetry:spoofed-status" codec:"32905,omitempty"`
	SourcePrefix          *string                         `json:"ietf-dots-telemetry:source-prefix" codec:"32907,omitempty"`
	SourcePortRange       []TelemetrySourcePortRange      `json:"ietf-dots-telemetry:source-port-range" codec:"32908,omitempty"`
	SourceIcmpTypeRange   []TelemetrySourceICMPTypeRange  `json:"ietf-dots-telemetry:source-icmp-type-range" codec:"32911,omitempty"`
	TotalAttackTraffic    []TelemetryTraffic              `json:"ietf-dots-telemetry:total-attack-traffic" codec:"32885,omitempty"`
	TotalAttackConnection *TelemetryTotalAttackConnection `json:"ietf-dots-telemetry:total-attack-connection" codec:"32886,omitempty"`
}
type TelemetryTotalAttackConnection struct {
	_struct         bool                           `codec:",uint"`  
	LowPercentileC  *TelemetryConnectionPercentile `json:"ietf-dots-telemetry:low-percentile-c" codec:"32887,omitempty"`
	MidPercentileC  *TelemetryConnectionPercentile `json:"ietf-dots-telemetry:mid-percentile-c" codec:"32888,omitempty"`
	HighPercentileC *TelemetryConnectionPercentile `json:"ietf-dots-telemetry:high-percentile-c" codec:"32889,omitempty"`
	PeakC           *TelemetryConnectionPercentile `json:"ietf-dots-telemetry:peak-c" codec:"32890,omitempty"`
}
type TelemetryConnectionPercentile struct {
	_struct          bool    `codec:",uint"`  
	Connection       *uint64 `json:"ietf-dots-telemetry:connection" codec:"32891,omitempty"`
	Embryonic        *uint64 `json:"ietf-dots-telemetry:embryonic" codec:"32892,omitempty"`
	ConnectionPs     *uint64 `json:"ietf-dots-telemetry:connection-ps" codec:"32893,omitempty"`
	RequestPs        *uint64 `json:"ietf-dots-telemetry:request-ps" codec:"32894,omitempty"`
	PartialRequestPs *uint64 `json:"ietf-dots-telemetry:partial-request-ps" codec:"32895,omitempty"`
}
type TelemetrySourcePortRange struct {
	_struct   bool `codec:",uint"`  
	LowerPort *int `json:"ietf-dots-telemetry:lower-port" codec:"32909,omitempty"`
	UpperPort *int `json:"ietf-dots-telemetry:upper-port" codec:"32910,omitempty"`
}
type TelemetrySourceICMPTypeRange struct {
	_struct   bool `codec:",uint"`  
	LowerType *int `json:"ietf-dots-telemetry:lower-type" codec:"32912,omitempty"`
	UpperType *int `json:"ietf-dots-telemetry:upper-type" codec:"32913,omitempty"`
}
func (m *MitigationRequest) EffectiveClientIdentifier() string {
	return m.MitigationScope.Scopes[0].ClientIdentifier
}
func (m *MitigationRequest) EffectiveClientDomainIdentifier() string {
	return m.MitigationScope.ClientDomainIdentifier
}
func (m *MitigationRequest) EffectiveMitigationId() *int {
	return m.MitigationScope.Scopes[0].MitigationId
}
func (m *MitigationRequest) UpdateClientIdentifier(cuid string) {
	m.MitigationScope.Scopes[0].ClientIdentifier = cuid
}
func (m *MitigationRequest) UpdateClientDomainIdentifier(cdid string) {
	m.MitigationScope.ClientDomainIdentifier = cdid
}
func (m *MitigationRequest) UpdateMitigationId(mid *int) {
	m.MitigationScope.Scopes[0].MitigationId = mid
}
func (m *MitigationRequest) String() (result string) {
	spaces3 := "   "
	spaces6 := spaces3 + spaces3
	spaces9 := spaces6 + spaces3
	result = "\n \"ietf-dots-signal-channel:mitigation-scope\":\n"
	for key, scope := range m.MitigationScope.Scopes {
		result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces3, "scope", key+1)
		if scope.MitigationId != nil {
			result += fmt.Sprintf("%s\"%s\": %d\n", spaces6, "mid", *scope.MitigationId)
		}
		if scope.TargetPrefix != nil {
			for k, v := range scope.TargetPrefix {
				result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spaces6, "target-prefix", k+1, v)
			}
		}
		if scope.TargetPortRange != nil {
			for k, v := range scope.TargetPortRange {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces6, "target-port-range", k+1)
				if v.LowerPort != nil {
					result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "lower-port", *v.LowerPort)
				}
				if v.UpperPort != nil {
					result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "upper-port", *v.UpperPort)
				}
			}
		}
		if scope.TargetProtocol != nil {
			for k, v := range scope.TargetProtocol {
				result += fmt.Sprintf("%s\"%s[%d]\": %d\n", spaces6, "target-protocol", k+1, v)
			}
		}
		if scope.FQDN != nil {
			for k, v := range scope.FQDN {
				result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spaces6, "target-fqdn", k+1, v)
			}
		}
		if scope.URI != nil {
			for k, v := range scope.URI {
				result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spaces6, "target-uri", k+1, v)
			}
		}
		if scope.AliasName != nil {
			for k, v := range scope.AliasName {
				result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spaces6, "alias-name", k+1, v)
			}
		}
		if scope.SourcePrefix != nil {
			for k, v := range scope.SourcePrefix {
				result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spaces6, "ietf-dots-call-home:source-prefix", k+1, v)
			}
		}
		if scope.SourcePortRange != nil {
			for k, v := range scope.SourcePortRange {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces6, "ietf-dots-call-home:source-port-range", k+1)
				if v.LowerPort != nil {
					result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "lower-port", *v.LowerPort)
				}
				if v.UpperPort != nil {
					result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "upper-port", *v.UpperPort)
				}
			}
		}
		if scope.SourceICMPTypeRange != nil {
			for k, v := range scope.SourceICMPTypeRange {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces6, "ietf-dots-call-home:source-icmp-type-range", k+1)
				if v.LowerType != nil {
					result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "lower-type", *v.LowerType)
				}
				if v.UpperType != nil {
					result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "upper-type", *v.UpperType)
				}
			}
		}
		if scope.AclList != nil {
			for k, v := range scope.AclList {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces6, "ietf-dots-signal-control:acl-list", k+1)
				result += fmt.Sprintf("%s\"%s\": %s\n", spaces9, "ietf-dots-signal-control:acl-name", v.AclName)
				if v.ActivationType != nil {
					result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "ietf-dots-signal-control:activation-type", *v.ActivationType)
				}
			}
		}
		if scope.Lifetime != nil {
			result += fmt.Sprintf("%s\"%s\": %d\n", spaces6, "lifetime", *scope.Lifetime)
		}
		if scope.AttackStatus != nil {
			result += fmt.Sprintf("%s\"%s\": %d\n", spaces6, "attack-status", *scope.AttackStatus)
		}
		if scope.TriggerMitigation != nil {
			result += fmt.Sprintf("%s\"%s\": %t\n", spaces6, "trigger-mitigation", *scope.TriggerMitigation)
		}
		for k, v := range scope.TotalAttackTraffic {
			result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces6, "ietf-dots-telemetry:total-attack-traffic", k+1)
			result += v.String(spaces6)
		}
		for k, v := range scope.AttackDetail {
			result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces6, "ietf-dots-telemetry:attack-detail", k+1)
			result += v.String(spaces6)
		}
	}
	return
}
type SignalConfigRequest struct {
	_struct       bool          `codec:",uint"`  
	SignalConfigs SignalConfigs `json:"ietf-dots-signal-channel:signal-config" codec:"30"`
}
type SignalConfigs struct {
	_struct          bool         `codec:",uint"`  
	MitigatingConfig SignalConfig `json:"mitigating-config" codec:"32"`
	IdleConfig       SignalConfig `json:"idle-config"       codec:"44"`
}
type IntCurrent struct {
	_struct      bool `codec:",uint"`  
	CurrentValue *int `json:"current-value" codec:"36,omitempty"`
}
type DecimalCurrent struct {
	_struct      bool             `codec:",uint"`  
	CurrentValue *decimal.Decimal `json:"current-value-decimal" codec:"43,omitempty"`
}
type SignalConfig struct {
	_struct bool `codec:",uint"`  
	SessionId int `json:"sid" codec:"31,omitempty"`
	HeartbeatInterval IntCurrent `json:"heartbeat-interval" codec:"33,omitempty"`
	MissingHbAllowed IntCurrent `json:"missing-hb-allowed" codec:"37,omitempty"`
	MaxRetransmit IntCurrent `json:"max-retransmit" codec:"38,omitempty"`
	AckTimeout DecimalCurrent `json:"ack-timeout" codec:"39,omitempty"`
	AckRandomFactor DecimalCurrent `json:"ack-random-factor" codec:"40,omitempty"`
}
type SignalChannelRequest struct {
	_struct bool `codec:",uint"`  
}
func (m *SignalConfigRequest) String() (result string) {
	var current_float float64
	result = "\n \"ietf-dots-signal-channel:signal-config\":\n"
	result += fmt.Sprintf("   \"%s\":\n", "mitigating-config")
	result += fmt.Sprintf("     \"%s\":\n", "heartbeat-interval")
	if m.SignalConfigs.MitigatingConfig.HeartbeatInterval.CurrentValue != nil {
		result += fmt.Sprintf("       \"%s\": %d\n", "current-value", *m.SignalConfigs.MitigatingConfig.HeartbeatInterval.CurrentValue)
	}
	result += fmt.Sprintf("     \"%s\":\n", "missing-hb-allowed")
	if m.SignalConfigs.MitigatingConfig.MissingHbAllowed.CurrentValue != nil {
		result += fmt.Sprintf("       \"%s\": %d\n", "current-value", *m.SignalConfigs.MitigatingConfig.MissingHbAllowed.CurrentValue)
	}
	result += fmt.Sprintf("     \"%s\":\n", "max-retransmit")
	if m.SignalConfigs.MitigatingConfig.MaxRetransmit.CurrentValue != nil {
		result += fmt.Sprintf("       \"%s\": %d\n", "current-value", *m.SignalConfigs.MitigatingConfig.MaxRetransmit.CurrentValue)
	}
	result += fmt.Sprintf("     \"%s\":\n", "ack-timeout")
	if m.SignalConfigs.MitigatingConfig.AckTimeout.CurrentValue != nil {
		current_float, _ = m.SignalConfigs.MitigatingConfig.AckTimeout.CurrentValue.Round(2).Float64()
		result += fmt.Sprintf("       \"%s\": %f\n", "current-value-decimal", current_float)
	}
	result += fmt.Sprintf("     \"%s\":\n", "ack-random-factor")
	if m.SignalConfigs.MitigatingConfig.AckRandomFactor.CurrentValue != nil {
		current_float, _ = m.SignalConfigs.MitigatingConfig.AckRandomFactor.CurrentValue.Round(2).Float64()
		result += fmt.Sprintf("       \"%s\": %f\n", "current-value-decimal", current_float)
	}
	result += fmt.Sprintf("   \"%s\":\n", "idle-config")
	result += fmt.Sprintf("     \"%s\":\n", "heartbeat-interval")
	if m.SignalConfigs.IdleConfig.HeartbeatInterval.CurrentValue != nil {
		result += fmt.Sprintf("       \"%s\": %d\n", "current-value", *m.SignalConfigs.IdleConfig.HeartbeatInterval.CurrentValue)
	}
	result += fmt.Sprintf("     \"%s\":\n", "missing-hb-allowed")
	if m.SignalConfigs.IdleConfig.MissingHbAllowed.CurrentValue != nil {
		result += fmt.Sprintf("       \"%s\": %d\n", "current-value", *m.SignalConfigs.IdleConfig.MissingHbAllowed.CurrentValue)
	}
	result += fmt.Sprintf("     \"%s\":\n", "max-retransmit")
	if m.SignalConfigs.IdleConfig.MaxRetransmit.CurrentValue != nil {
		result += fmt.Sprintf("       \"%s\": %d\n", "current-value", *m.SignalConfigs.IdleConfig.MaxRetransmit.CurrentValue)
	}
	result += fmt.Sprintf("     \"%s\":\n", "ack-timeout")
	if m.SignalConfigs.IdleConfig.AckTimeout.CurrentValue != nil {
		current_float, _ = m.SignalConfigs.IdleConfig.AckTimeout.CurrentValue.Round(2).Float64()
		result += fmt.Sprintf("       \"%s\": %f\n", "current-value-decimal", current_float)
	}
	result += fmt.Sprintf("     \"%s\":\n", "ack-random-factor")
	if m.SignalConfigs.IdleConfig.AckRandomFactor.CurrentValue != nil {
		current_float, _ = m.SignalConfigs.IdleConfig.AckRandomFactor.CurrentValue.Round(2).Float64()
		result += fmt.Sprintf("       \"%s\": %f\n", "current-value-decimal", current_float)
	}
	return
}
type HeartBeatRequest struct {
	_struct   bool      `codec:",uint"`  
	HeartBeat HeartBeat `json:"ietf-dots-signal-channel:heartbeat" codec:"49,omitempty"`
}
type HeartBeat struct {
	_struct      bool  `codec:",uint"`  
	PeerHbStatus *bool `json:"peer-hb-status" codec:"51,omitempty"`
}
func (hb *HeartBeatRequest) String() (result string) {
	result = "\n \"ietf-dots-signal-channel:heartbeat\":\n"
	if hb.HeartBeat.PeerHbStatus != nil {
		result += fmt.Sprintf("       \"%s\": %t\n", "peer-hb-status", *hb.HeartBeat.PeerHbStatus)
	}
	return
}
type TelemetrySetupRequest struct {
	_struct        bool           `codec:",uint"`  
	TelemetrySetup TelemetrySetup `json:"ietf-dots-telemetry:telemetry-setup" codec:"32878,omitempty"`
}
type TelemetrySetup struct {
	_struct   bool        `codec:",uint"`                             
	Telemetry []Telemetry `json:"telemetry" codec:"32802,omitempty"`
}
type Telemetry struct {
	_struct                       bool                           `codec:",uint"`  
	TelemetryConfigurationCurrent *TelemetryConfigurationCurrent `json:"current-config" codec:"32850,omitempty"`
	TotalPipeCapacity             []TotalPipeCapacity            `json:"total-pipe-capacity" codec:"32809,omitempty"`
	Baseline                      []Baseline                     `json:"baseline" codec:"32849,omitempty"`
}
type TelemetryConfigurationCurrent struct {
	_struct                   bool             `codec:",uint"`                                        
	MeasurementInterval       *int             `json:"measurement-interval" codec:"32857,omitempty"`
	MeasurementSample         *int             `json:"measurement-sample" codec:"32858,omitempty"`
	LowPercentile             *decimal.Decimal `json:"low-percentile" codec:"32803,omitempty"`
	MidPercentile             *decimal.Decimal `json:"mid-percentile" codec:"32804,omitempty"`
	HighPercentile            *decimal.Decimal `json:"high-percentile" codec:"32805,omitempty"`
	UnitConfigList            []UnitConfig     `json:"unit-config" codec:"32806,omitempty"`
	ServerOriginatedTelemetry *bool            `json:"server-originated-telemetry" codec:"32854,omitempty"`
	TelemetryNotifyInterval   *int             `json:"telemetry-notify-interval" codec:"32855,omitempty"`
}
type UnitConfig struct {
	_struct    bool  `codec:",uint"`  
	Unit       *int  `json:"unit" codec:"32807,omitempty"`
	UnitStatus *bool `json:"unit-status" codec:"32808,omitempty"`
}
type TotalPipeCapacity struct {
	_struct  bool    `codec:",uint"`                            
	LinkId   *string `json:"link-id" codec:"32810,omitempty"`
	Capacity *int    `json:"capacity" codec:"32867,omitempty"`
	Unit     *int    `json:"unit" codec:"32807,omitempty"`
}
type Baseline struct {
	_struct                        bool                             `codec:",uint"`  
	Id                             *int                             `json:"id" codec:"32836,omitempty"`
	TargetPrefix                   []string                         `json:"target-prefix" codec:"6,omitempty"`
	TargetPortRange                []PortRange                      `json:"target-port-range" codec:"7,omitempty"`
	TargetProtocol                 []int                            `json:"target-protocol" codec:"10,omitempty"`
	TargetFQDN                     []string                         `json:"target-fqdn" codec:"11,omitempty"`
	TargetURI                      []string                         `json:"target-uri" codec:"12,omitempty"`
	AliasName                      []string                         `json:"alias-name" codec:"13,omitempty"`
	TotalTrafficNormal             []Traffic                        `json:"total-traffic-normal" codec:"32812,omitempty"`
	TotalTrafficNormalPerProtocol  []TrafficPerProtocol             `json:"total-traffic-normal-per-protocol" codec:"32869,omitempty"`
	TotalTrafficNormalPerPort      []TrafficPerPort                 `json:"total-traffic-normal-per-port" codec:"32870,omitempty"`
	TotalConnectionCapacity        []TotalConnectionCapacity        `json:"total-connection-capacity" codec:"32819,omitempty"`
	TotalConnectionCapacityPerPort []TotalConnectionCapacityPerPort `json:"total-connection-capacity-per-port" codec:"32871,omitempty"`
}
type Traffic struct {
	_struct         bool    `codec:",uint"`  
	Unit            *int    `json:"unit" codec:"32807,omitempty"`
	LowPercentileG  *uint64 `json:"low-percentile-g" codec:"32813,omitempty"`
	MidPercentileG  *uint64 `json:"mid-percentile-g" codec:"32814,omitempty"`
	HighPercentileG *uint64 `json:"high-percentile-g" codec:"32815,omitempty"`
	PeakG           *uint64 `json:"peak-g" codec:"32816,omitempty"`
}
type TrafficPerProtocol struct {
	_struct         bool    `codec:",uint"`  
	Unit            *int    `json:"unit" codec:"32807,omitempty"`
	Protocol        *uint8  `json:"protocol" codec:"32868,omitempty"`
	LowPercentileG  *uint64 `json:"low-percentile-g" codec:"32813,omitempty"`
	MidPercentileG  *uint64 `json:"mid-percentile-g" codec:"32814,omitempty"`
	HighPercentileG *uint64 `json:"high-percentile-g" codec:"32815,omitempty"`
	PeakG           *uint64 `json:"peak-g" codec:"32816,omitempty"`
}
type TrafficPerPort struct {
	_struct         bool    `codec:",uint"`  
	Unit            *int    `json:"unit" codec:"32807,omitempty"`
	Port            *int    `json:"port" codec:"32877,omitempty"`
	LowPercentileG  *uint64 `json:"low-percentile-g" codec:"32813,omitempty"`
	MidPercentileG  *uint64 `json:"mid-percentile-g" codec:"32814,omitempty"`
	HighPercentileG *uint64 `json:"high-percentile-g" codec:"32815,omitempty"`
	PeakG           *uint64 `json:"peak-g" codec:"32816,omitempty"`
}
type TotalConnectionCapacity struct {
	_struct                bool    `codec:",uint"`  
	Protocol               *uint8  `json:"protocol" codec:"32868,omitempty"`
	Connection             *uint64 `json:"connection" codec:"32820,omitempty"`
	ConnectionClient       *uint64 `json:"connection-client" codec:"32821,omitempty"`
	Embryonic              *uint64 `json:"embryonic" codec:"32822,omitempty"`
	EmbryonicClient        *uint64 `json:"embryonic-client" codec:"32823,omitempty"`
	ConnectionPs           *uint64 `json:"connection-ps" codec:"32824,omitempty"`
	ConnectionClientPs     *uint64 `json:"connection-client-ps" codec:"32825,omitempty"`
	RequestPs              *uint64 `json:"request-ps" codec:"32826,omitempty"`
	RequestClientPs        *uint64 `json:"request-client-ps" codec:"32827,omitempty"`
	PartialRequestPs       *uint64 `json:"partial-request-ps" codec:"32828,omitempty"`
	PartialRequestClientPs *uint64 `json:"partial-request-client-ps" codec:"32829,omitempty"`
}
type TotalConnectionCapacityPerPort struct {
	_struct                bool    `codec:",uint"`  
	Protocol               *uint8  `json:"protocol" codec:"32868,omitempty"`
	Port                   *int    `json:"port" codec:"32877,omitempty"`
	Connection             *uint64 `json:"connection" codec:"32820,omitempty"`
	ConnectionClient       *uint64 `json:"connection-client" codec:"32821,omitempty"`
	Embryonic              *uint64 `json:"embryonic" codec:"32822,omitempty"`
	EmbryonicClient        *uint64 `json:"embryonic-client" codec:"32823,omitempty"`
	ConnectionPs           *uint64 `json:"connection-ps" codec:"32824,omitempty"`
	ConnectionClientPs     *uint64 `json:"connection-client-ps" codec:"32825,omitempty"`
	RequestPs              *uint64 `json:"request-ps" codec:"32826,omitempty"`
	RequestClientPs        *uint64 `json:"request-client-ps" codec:"32827,omitempty"`
	PartialRequestPs       *uint64 `json:"partial-request-ps" codec:"32828,omitempty"`
	PartialRequestClientPs *uint64 `json:"partial-request-client-ps" codec:"32829,omitempty"`
}
 func (ts *TelemetrySetupRequest) String() (result string) {
	spaces3  := "   "
	spaces6  := spaces3 + spaces3
	spaces9  := spaces6 + spaces3
	spaces12 := spaces9 + spaces3
	result = "\n \"ietf-dots-telemetry:telemetry-setup\":\n"
	for key, t := range ts.TelemetrySetup.Telemetry {
		result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces3, "telemetry", key+1)
		if t.TelemetryConfigurationCurrent != nil {
			result += fmt.Sprintf("%s\"%s\":\n", spaces6, "current-config")
			tConfig := t.TelemetryConfigurationCurrent
			if tConfig.MeasurementInterval != nil {
				result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "measurement-interval", *tConfig.MeasurementInterval)
			}
			if tConfig.MeasurementSample != nil {
				result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "measurement-sample", *tConfig.MeasurementSample)
			}
			if tConfig.LowPercentile != nil {
				low, _ := tConfig.LowPercentile.Round(2).Float64()
				result += fmt.Sprintf("%s\"%s\": %f\n", spaces9, "low-percentile", low)
			}
			if tConfig.MidPercentile != nil {
				mid, _ := tConfig.MidPercentile.Round(2).Float64()
				result += fmt.Sprintf("%s\"%s\": %f\n", spaces9, "mid-percentile", mid)
			}
			if tConfig.HighPercentile != nil {
				high, _ := tConfig.HighPercentile.Round(2).Float64()
				result += fmt.Sprintf("%s\"%s\": %f\n", spaces9, "high-percentile", high)
			}
			for k, v := range tConfig.UnitConfigList {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces9, "unit-config", k+1)
				if v.Unit != nil {
					result += fmt.Sprintf("%s\"%s\": %d\n", spaces12, "unit", *v.Unit)
				}
				if v.UnitStatus != nil {
					result += fmt.Sprintf("%s\"%s\": %t\n", spaces12, "unit-status", *v.UnitStatus)
				}
			}
			if tConfig.ServerOriginatedTelemetry != nil {
				result += fmt.Sprintf("%s\"%s\": %t\n", spaces9, "server-initiated-telemetry", *tConfig.ServerOriginatedTelemetry)
			}
			if tConfig.TelemetryNotifyInterval != nil {
				result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "telemetry-notify-interval", *tConfig.TelemetryNotifyInterval)
			}
		}
		for k, v := range t.TotalPipeCapacity {
			result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces6, "total-pipe-capacity", k+1)
			if v.LinkId != nil {
				result += fmt.Sprintf("%s\"%s\": %s\n", spaces9, "link-id", *v.LinkId)
			}
			if v.Capacity != nil {
				result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "capacity", *v.Capacity)
			}
			if v.Unit != nil {
				result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "unit", *v.Unit)
			}
		}
		for k, v := range t.Baseline {
			result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces6, "baseline", k+1)
			if v.Id != nil {
				result += fmt.Sprintf("%s\"%s\": %d\n", spaces9, "id", *v.Id)
			}
			resultTargets := ConvertTargetsRequestToStrings(v.TargetPrefix, v.TargetPortRange, v.TargetProtocol, v.TargetFQDN, v.TargetURI, v.AliasName, spaces9)
			result += resultTargets
			for kNormal, vNormal := range v.TotalTrafficNormal {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces9, "total-traffic-normal", kNormal+1)
				result += vNormal.String(spaces9)
			}
			for kNormalPerProtocol, vNormalPerProtocol := range v.TotalTrafficNormalPerProtocol {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces9, "total-traffic-normal-per-protocol", kNormalPerProtocol+1)
				result += vNormalPerProtocol.String(spaces9)
			}
			for kNormalPerPort, vNormalPerPort:= range v.TotalTrafficNormalPerPort {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces9, "total-traffic-normal-per-port", kNormalPerPort+1)
				result += vNormalPerPort.String(spaces9)
			}
			for kConnectionCapacity, vConnectionCapacity := range v.TotalConnectionCapacity {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces9, "total-connection-capacity", kConnectionCapacity+1)
				result += vConnectionCapacity.String(spaces9)
			}
			for kConnectionCapacityPerPort, vConnectionCapacityPerPort := range v.TotalConnectionCapacityPerPort {
				result += fmt.Sprintf("%s\"%s[%d]\":\n", spaces9, "total-connection-capacity-per-port", kConnectionCapacityPerPort+1)
				result += vConnectionCapacityPerPort.String(spaces9)
			}
		}
	}
	return
}
func ConvertTargetsRequestToStrings(prefixs []string, portRanges []PortRange, protocols []int, fqdns []string, uris []string,  aliases []string, spacesn string) (result string) {
	spaces3 := "   "
	spacesn3 := spacesn + spaces3
	for k, v := range prefixs {
		result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spacesn, "target-prefix", k+1, v)
	}
	for k, v := range portRanges {
		result += fmt.Sprintf("%s\"%s[%d]\":\n", spacesn, "target-port-range", k+1)
		if v.LowerPort != nil {
			result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "lower-port", *v.LowerPort)
		}
		if v.UpperPort != nil {
			result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "upper-port", *v.UpperPort)
		}
	}
	for k, v := range protocols {
		result += fmt.Sprintf("%s\"%s[%d]\": %d\n", spacesn, "target-protocol", k+1, v)
	}
	for k, v := range fqdns {
		result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spacesn, "target-fqdn", k+1, v)
	}
	for k, v := range uris {
		result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spacesn, "target-uri", k+1, v)
	}
	for k, v := range aliases {
		result += fmt.Sprintf("%s\"%s[%d]\": %s\n", spacesn, "alias-name", k+1, v)
	}
	return
}
func (traffic Traffic) String(spacesn string) (result string) {
	spaces3 := "   "
	spacesn3 := spacesn + spaces3
	if traffic.Unit != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "unit", *traffic.Unit)
	}
	if traffic.LowPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "low-percentile-g", *traffic.LowPercentileG)
	}
	if traffic.MidPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "mid-percentile-g", *traffic.MidPercentileG)
	}
	if traffic.HighPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "high-percentile-g", *traffic.HighPercentileG)
	}
	if traffic.PeakG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "peak-g", *traffic.PeakG)
	}
	return
}
func (traffic TrafficPerProtocol) String(spacesn string) (result string) {
	spaces3 := "   "
	spacesn3 := spacesn + spaces3
	if traffic.Unit != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "unit", *traffic.Unit)
	}
	if traffic.Protocol != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "protocol", *traffic.Protocol)
	}
	if traffic.LowPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "low-percentile-g", *traffic.LowPercentileG)
	}
	if traffic.MidPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "mid-percentile-g", *traffic.MidPercentileG)
	}
	if traffic.HighPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "high-percentile-g", *traffic.HighPercentileG)
	}
	if traffic.PeakG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "peak-g", *traffic.PeakG)
	}
	return
}
func (traffic TrafficPerPort) String(spacesn string) (result string) {
	spaces3 := "   "
	spacesn3 := spacesn + spaces3
	if traffic.Unit != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "unit", *traffic.Unit)
	}
	if traffic.Port != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "port", *traffic.Port)
	}
	if traffic.LowPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "low-percentile-g", *traffic.LowPercentileG)
	}
	if traffic.MidPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "mid-percentile-g", *traffic.MidPercentileG)
	}
	if traffic.HighPercentileG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "high-percentile-g", *traffic.HighPercentileG)
	}
	if traffic.PeakG != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "peak-g", *traffic.PeakG)
	}
	return
}
func (tcc TotalConnectionCapacity) String(spacesn string) (result string) {
	spaces3 := "   "
	spacesn3 := spacesn + spaces3
	if tcc.Protocol != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "protocol", *tcc.Protocol)
	}
	if tcc.Connection != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "connection", *tcc.Connection)
	}
	if tcc.ConnectionClient != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "connection-client", *tcc.ConnectionClient)
	}
	if tcc.Embryonic != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "embryonic", *tcc.Embryonic)
	}
	if tcc.EmbryonicClient != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "embryonic-client", *tcc.EmbryonicClient)
	}
	if tcc.ConnectionPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "connection-ps", *tcc.ConnectionPs)
	}
	if tcc.ConnectionClientPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "connection-client-ps", *tcc.ConnectionClientPs)
	}
	if tcc.RequestPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "request-ps", *tcc.RequestPs)
	}
	if tcc.RequestClientPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "request-client-ps", *tcc.RequestClientPs)
	}
	if tcc.PartialRequestPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "partial-request-ps", *tcc.PartialRequestPs)
	}
	if tcc.PartialRequestClientPs != nil {
		result += fmt.Sprintf("%s\"%s\": %d\n", spacesn3, "partial-request-client-ps", *tcc.PartialRequestClientPs)
	}
	return
}