package awselasticloadbalancingv2

import (
	_jsii_ "github.com/aws/jsii-runtime-go/runtime"

	"github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch"
)

// Contains all metrics for a Network Load Balancer.
type INetworkLoadBalancerMetrics interface {
	// The total number of concurrent TCP flows (or connections) from clients to targets.
	//
	// This metric includes connections in the SYN_SENT and ESTABLISHED states.
	// TCP connections are not terminated at the load balancer, so a client
	// opening a TCP connection to a target counts as a single flow.
	// Default: Average over 5 minutes.
	//
	ActiveFlowCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of load balancer capacity units (LCU) used by your load balancer.
	// Default: Sum over 5 minutes.
	//
	ConsumedLCUs(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Return the given named metric for this Network Load Balancer.
	// Default: Average over 5 minutes.
	//
	Custom(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The total number of new TCP flows (or connections) established from clients to targets in the time period.
	// Default: Sum over 5 minutes.
	//
	NewFlowCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The total number of bytes processed by the load balancer, including TCP/IP headers.
	// Default: Sum over 5 minutes.
	//
	ProcessedBytes(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The total number of reset (RST) packets sent from a client to a target.
	//
	// These resets are generated by the client and forwarded by the load balancer.
	// Default: Sum over 5 minutes.
	//
	TcpClientResetCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The total number of reset (RST) packets generated by the load balancer.
	// Default: Sum over 5 minutes.
	//
	TcpElbResetCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The total number of reset (RST) packets sent from a target to a client.
	//
	// These resets are generated by the target and forwarded by the load balancer.
	// Default: Sum over 5 minutes.
	//
	TcpTargetResetCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
}

// The jsii proxy for INetworkLoadBalancerMetrics
type jsiiProxy_INetworkLoadBalancerMetrics struct {
	_ byte // padding
}

func (i *jsiiProxy_INetworkLoadBalancerMetrics) ActiveFlowCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateActiveFlowCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

	_jsii_.Invoke(
		i,
		"activeFlowCount",
		[]interface{}{props},
		&returns,
	)

	return returns
}

func (i *jsiiProxy_INetworkLoadBalancerMetrics) ConsumedLCUs(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateConsumedLCUsParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

	_jsii_.Invoke(
		i,
		"consumedLCUs",
		[]interface{}{props},
		&returns,
	)

	return returns
}

func (i *jsiiProxy_INetworkLoadBalancerMetrics) Custom(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateCustomParameters(metricName, props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

	_jsii_.Invoke(
		i,
		"custom",
		[]interface{}{metricName, props},
		&returns,
	)

	return returns
}

func (i *jsiiProxy_INetworkLoadBalancerMetrics) NewFlowCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateNewFlowCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

	_jsii_.Invoke(
		i,
		"newFlowCount",
		[]interface{}{props},
		&returns,
	)

	return returns
}

func (i *jsiiProxy_INetworkLoadBalancerMetrics) ProcessedBytes(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateProcessedBytesParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

	_jsii_.Invoke(
		i,
		"processedBytes",
		[]interface{}{props},
		&returns,
	)

	return returns
}

func (i *jsiiProxy_INetworkLoadBalancerMetrics) TcpClientResetCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateTcpClientResetCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

	_jsii_.Invoke(
		i,
		"tcpClientResetCount",
		[]interface{}{props},
		&returns,
	)

	return returns
}

func (i *jsiiProxy_INetworkLoadBalancerMetrics) TcpElbResetCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateTcpElbResetCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

	_jsii_.Invoke(
		i,
		"tcpElbResetCount",
		[]interface{}{props},
		&returns,
	)

	return returns
}

func (i *jsiiProxy_INetworkLoadBalancerMetrics) TcpTargetResetCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateTcpTargetResetCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

	_jsii_.Invoke(
		i,
		"tcpTargetResetCount",
		[]interface{}{props},
		&returns,
	)

	return returns
}

