package mutatefuncs

import (
	iamv1beta1 "github.com/upbound/provider-aws/apis/iam/v1beta1"
)

func MutateUpboundIAMOpenIDConnectProvider(current, expected *iamv1beta1.OpenIDConnectProvider) error {
	current.Labels = expected.Labels
	current.Annotations = expected.Annotations

	current.Spec.ResourceSpec = expected.Spec.ResourceSpec
	current.Spec.ForProvider = expected.Spec.ForProvider

	return nil
}

func MutateUpboundIAMRole(current, expected *iamv1beta1.Role) error {
	current.Labels = expected.Labels
	current.Annotations = expected.Annotations

	current.Spec.ResourceSpec = expected.Spec.ResourceSpec
	current.Spec.ForProvider = expected.Spec.ForProvider

	return nil
}

func MutateUpboundIAMPolicy(current, expected *iamv1beta1.Policy) error {
	current.Labels = expected.Labels
	current.Annotations = expected.Annotations

	current.Spec.ResourceSpec = expected.Spec.ResourceSpec
	current.Spec.ForProvider = expected.Spec.ForProvider

	return nil
}

func MutateUpboundIAMRolePolicyAttachment(current, expected *iamv1beta1.RolePolicyAttachment) error {
	current.Labels = expected.Labels
	current.Annotations = expected.Annotations

	current.Spec.ResourceSpec = expected.Spec.ResourceSpec
	current.Spec.ForProvider = expected.Spec.ForProvider

	return nil
}
