package aws

import (
	"context"

	ec2api "github.com/aws/aws-sdk-go-v2/service/ec2"
	elbapi "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2"
	iamapi "github.com/aws/aws-sdk-go-v2/service/iam"
	s3api "github.com/aws/aws-sdk-go-v2/service/s3"
	"github.com/aws/aws-sdk-go-v2/service/sns"
)

type elbClient interface {
	DescribeLoadBalancers(ctx context.Context, params *elbapi.DescribeLoadBalancersInput, optFns ...func(*elbapi.Options)) (*elbapi.DescribeLoadBalancersOutput, error)
}

type endpointServiceClient interface {
	CreateVpcEndpointServiceConfiguration(ctx context.Context, params *ec2api.CreateVpcEndpointServiceConfigurationInput, optFns ...func(*ec2api.Options)) (*ec2api.CreateVpcEndpointServiceConfigurationOutput, error)
	ModifyVpcEndpointServicePermissions(ctx context.Context, params *ec2api.ModifyVpcEndpointServicePermissionsInput, optFns ...func(*ec2api.Options)) (*ec2api.ModifyVpcEndpointServicePermissionsOutput, error)
	DescribeVpcEndpointServiceConfigurations(ctx context.Context, params *ec2api.DescribeVpcEndpointServiceConfigurationsInput, optFns ...func(*ec2api.Options)) (*ec2api.DescribeVpcEndpointServiceConfigurationsOutput, error)
	DeleteVpcEndpointServiceConfigurations(ctx context.Context, params *ec2api.DeleteVpcEndpointServiceConfigurationsInput, optFns ...func(*ec2api.Options)) (*ec2api.DeleteVpcEndpointServiceConfigurationsOutput, error)
}

type iamClient interface {
	CreateRole(ctx context.Context, params *iamapi.CreateRoleInput, optFns ...func(*iamapi.Options)) (*iamapi.CreateRoleOutput, error)
	GetRole(ctx context.Context, params *iamapi.GetRoleInput, optFns ...func(*iamapi.Options)) (*iamapi.GetRoleOutput, error)
	ListRolePolicies(ctx context.Context, params *iamapi.ListRolePoliciesInput, optFns ...func(*iamapi.Options)) (*iamapi.ListRolePoliciesOutput, error)
	PutRolePolicy(ctx context.Context, params *iamapi.PutRolePolicyInput, optFns ...func(*iamapi.Options)) (*iamapi.PutRolePolicyOutput, error)
	DeleteRolePolicy(ctx context.Context, params *iamapi.DeleteRolePolicyInput, optFns ...func(*iamapi.Options)) (*iamapi.DeleteRolePolicyOutput, error)
	DeleteRole(ctx context.Context, params *iamapi.DeleteRoleInput, optFns ...func(*iamapi.Options)) (*iamapi.DeleteRoleOutput, error)
	UpdateAssumeRolePolicy(ctx context.Context, params *iamapi.UpdateAssumeRolePolicyInput, optFns ...func(*iamapi.Options)) (*iamapi.UpdateAssumeRolePolicyOutput, error)
}

type s3Client interface {
	CreateBucket(ctx context.Context, params *s3api.CreateBucketInput, optFns ...func(*s3api.Options)) (*s3api.CreateBucketOutput, error)
	HeadBucket(ctx context.Context, params *s3api.HeadBucketInput, optFns ...func(*s3api.Options)) (*s3api.HeadBucketOutput, error)
	GetObject(ctx context.Context, params *s3api.GetObjectInput, optFns ...func(*s3api.Options)) (*s3api.GetObjectOutput, error)
	ListObjectsV2(ctx context.Context, params *s3api.ListObjectsV2Input, optFns ...func(*s3api.Options)) (*s3api.ListObjectsV2Output, error)
	PutObject(ctx context.Context, params *s3api.PutObjectInput, optFns ...func(*s3api.Options)) (*s3api.PutObjectOutput, error)
	PutBucketLifecycleConfiguration(ctx context.Context, params *s3api.PutBucketLifecycleConfigurationInput, optFns ...func(*s3api.Options)) (*s3api.PutBucketLifecycleConfigurationOutput, error)
	GetBucketLifecycleConfiguration(ctx context.Context, params *s3api.GetBucketLifecycleConfigurationInput, optFns ...func(*s3api.Options)) (*s3api.GetBucketLifecycleConfigurationOutput, error)
	DeleteBucketLifecycle(ctx context.Context, params *s3api.DeleteBucketLifecycleInput, optFns ...func(*s3api.Options)) (*s3api.DeleteBucketLifecycleOutput, error)
	DeleteObjects(ctx context.Context, params *s3api.DeleteObjectsInput, optFns ...func(*s3api.Options)) (*s3api.DeleteObjectsOutput, error)
}

type SnsClient interface {
	CreateTopic(ctx context.Context, input *sns.CreateTopicInput, opts ...func(*sns.Options)) (*sns.CreateTopicOutput, error)
	DeleteTopic(ctx context.Context, input *sns.DeleteTopicInput, opts ...func(*sns.Options)) (*sns.DeleteTopicOutput, error)
	GetTopicAttributes(ctx context.Context, input *sns.GetTopicAttributesInput, opts ...func(*sns.Options)) (*sns.GetTopicAttributesOutput, error)
	Subscribe(ctx context.Context, input *sns.SubscribeInput, opts ...func(*sns.Options)) (*sns.SubscribeOutput, error)
	Unsubscribe(ctx context.Context, input *sns.UnsubscribeInput, opts ...func(*sns.Options)) (*sns.UnsubscribeOutput, error)
	GetSubscriptionAttributes(ctx context.Context, input *sns.GetSubscriptionAttributesInput, opts ...func(*sns.Options)) (*sns.GetSubscriptionAttributesOutput, error)
	ListSubscriptionsByTopic(ctx context.Context, input *sns.ListSubscriptionsByTopicInput, opts ...func(options *sns.Options)) (*sns.ListSubscriptionsByTopicOutput, error)
}

type privateEndpointClient interface {
	DescribeVpcEndpointServices(ctx context.Context, params *ec2api.DescribeVpcEndpointServicesInput, optFns ...func(*ec2api.Options)) (*ec2api.DescribeVpcEndpointServicesOutput, error)
	DescribeSubnets(ctx context.Context, params *ec2api.DescribeSubnetsInput, optFns ...func(*ec2api.Options)) (*ec2api.DescribeSubnetsOutput, error)
	CreateVpcEndpoint(ctx context.Context, params *ec2api.CreateVpcEndpointInput, optFns ...func(*ec2api.Options)) (*ec2api.CreateVpcEndpointOutput, error)
	DeleteVpcEndpoints(ctx context.Context, params *ec2api.DeleteVpcEndpointsInput, optFns ...func(*ec2api.Options)) (*ec2api.DeleteVpcEndpointsOutput, error)
	DescribeVpcEndpoints(ctx context.Context, params *ec2api.DescribeVpcEndpointsInput, optFns ...func(*ec2api.Options)) (*ec2api.DescribeVpcEndpointsOutput, error)
}
