package awselasticloadbalancingv2

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

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

// Contains all metrics for an Application Load Balancer.
type IApplicationLoadBalancerMetrics interface {
	// The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets.
	// Default: Sum over 5 minutes.
	//
	ActiveConnectionCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of TLS connections initiated by the client that did not establish a session with the load balancer.
	//
	// Possible causes include a
	// mismatch of ciphers or protocols.
	// Default: Sum over 5 minutes.
	//
	ClientTlsNegotiationErrorCount(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 Application Load Balancer.
	// Default: Average over 5 minutes.
	//
	Custom(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of user authentications that could not be completed.
	//
	// Because an authenticate action was misconfigured, the load balancer
	// couldn't establish a connection with the IdP, or the load balancer
	// couldn't complete the authentication flow due to an internal error.
	// Default: Sum over 5 minutes.
	//
	ElbAuthError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of user authentications that could not be completed because the IdP denied access to the user or an authorization code was used more than once.
	// Default: Sum over 5 minutes.
	//
	ElbAuthFailure(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The time elapsed, in milliseconds, to query the IdP for the ID token and user info.
	//
	// If one or more of these operations fail, this is the time to failure.
	// Default: Average over 5 minutes.
	//
	ElbAuthLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of authenticate actions that were successful.
	//
	// This metric is incremented at the end of the authentication workflow,
	// after the load balancer has retrieved the user claims from the IdP.
	// Default: Sum over 5 minutes.
	//
	ElbAuthSuccess(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of HTTP 3xx/4xx/5xx codes that originate from the load balancer.
	//
	// This does not include any response codes generated by the targets.
	// Default: Sum over 5 minutes.
	//
	HttpCodeElb(code HttpCodeElb, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of HTTP 2xx/3xx/4xx/5xx response codes generated by all targets in the load balancer.
	//
	// This does not include any response codes generated by the load balancer.
	// Default: Sum over 5 minutes.
	//
	HttpCodeTarget(code HttpCodeTarget, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of fixed-response actions that were successful.
	// Default: Sum over 5 minutes.
	//
	HttpFixedResponseCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of redirect actions that were successful.
	// Default: Sum over 5 minutes.
	//
	HttpRedirectCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of redirect actions that couldn't be completed because the URL in the response location header is larger than 8K.
	// Default: Sum over 5 minutes.
	//
	HttpRedirectUrlLimitExceededCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The total number of bytes processed by the load balancer over IPv6.
	// Default: Sum over 5 minutes.
	//
	Ipv6ProcessedBytes(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of IPv6 requests received by the load balancer.
	// Default: Sum over 5 minutes.
	//
	Ipv6RequestCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.
	// Default: Sum over 5 minutes.
	//
	NewConnectionCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The total number of bytes processed by the load balancer over IPv4 and IPv6.
	// Default: Sum over 5 minutes.
	//
	ProcessedBytes(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of connections that were rejected because the load balancer had reached its maximum number of connections.
	// Default: Sum over 5 minutes.
	//
	RejectedConnectionCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of requests processed over IPv4 and IPv6.
	//
	// This count includes only the requests with a response generated by a target of the load balancer.
	// Default: Sum over 5 minutes.
	//
	RequestCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of rules processed by the load balancer given a request rate averaged over an hour.
	// Default: Sum over 5 minutes.
	//
	RuleEvaluations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of connections that were not successfully established between the load balancer and target.
	// Default: Sum over 5 minutes.
	//
	TargetConnectionErrorCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received.
	// Default: Average over 5 minutes.
	//
	TargetResponseTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The number of TLS connections initiated by the load balancer that did not establish a session with the target.
	//
	// Possible causes include a mismatch of ciphers or protocols.
	// Default: Sum over 5 minutes.
	//
	TargetTLSNegotiationErrorCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
}

// The jsii proxy for IApplicationLoadBalancerMetrics
type jsiiProxy_IApplicationLoadBalancerMetrics struct {
	_ byte // padding
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) ActiveConnectionCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateActiveConnectionCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) ClientTlsNegotiationErrorCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateClientTlsNegotiationErrorCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) 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_IApplicationLoadBalancerMetrics) 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_IApplicationLoadBalancerMetrics) ElbAuthError(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateElbAuthErrorParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) ElbAuthFailure(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateElbAuthFailureParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) ElbAuthLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateElbAuthLatencyParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) ElbAuthSuccess(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateElbAuthSuccessParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) HttpCodeElb(code HttpCodeElb, props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateHttpCodeElbParameters(code, props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) HttpCodeTarget(code HttpCodeTarget, props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateHttpCodeTargetParameters(code, props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) HttpFixedResponseCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateHttpFixedResponseCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) HttpRedirectCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateHttpRedirectCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) HttpRedirectUrlLimitExceededCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateHttpRedirectUrlLimitExceededCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) Ipv6ProcessedBytes(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateIpv6ProcessedBytesParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) Ipv6RequestCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateIpv6RequestCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) NewConnectionCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateNewConnectionCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) 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_IApplicationLoadBalancerMetrics) RejectedConnectionCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateRejectedConnectionCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) RequestCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateRequestCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) RuleEvaluations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateRuleEvaluationsParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) TargetConnectionErrorCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateTargetConnectionErrorCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) TargetResponseTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateTargetResponseTimeParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

func (i *jsiiProxy_IApplicationLoadBalancerMetrics) TargetTLSNegotiationErrorCount(props *awscloudwatch.MetricOptions) awscloudwatch.Metric {
	if err := i.validateTargetTLSNegotiationErrorCountParameters(props); err != nil {
		panic(err)
	}
	var returns awscloudwatch.Metric

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

	return returns
}

