You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: api_op_CreateManagedEndpoint.go
    path of file: ./repos/aws-sdk-go-v2/service/emrcontainers
    
    the code of the file until where you have to start completion: // Code generated by smithy-go-codegen DO NOT EDIT.

package emrcontainers

import (
	"context"
	"fmt"
	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
	"github.com/aws/aws-sdk-go-v2/service/emrcontainers/types"
	"github.com/aws/smithy-go/middleware"
	smithyhttp "github.com/aws/smithy-go/transport/http"
)

// Creates a managed endpoint. A managed endpoint is a gateway that connects
// Amazon EMR Studio to Amazon EMR on EKS so that Amazon EMR Studio can communicate
// with your virtual cluster.
func (c *Client) CreateManagedEndpoint(ctx context.Context, params *CreateManagedEndpointInput, optFns ...func(*Options)) (*CreateManagedEndpointOutput, error) {
	if params == nil {
		params = &CreateManagedEndpointInput{}
	}

	result, metadata, err := c.invokeOperation(ctx, "CreateManagedEndpoint", params, optFns, c.addOperationCreateManagedEndpointMiddlewares)
	if err != nil {
		return nil, err
	}

	out := result.(*CreateManagedEndpointOutput)
	out.ResultMetadata = metadata
	return out, nil
}

type CreateManagedEndpointInput struct {

	// The client idempotency token for this create call.
	//
	// This member is required.
	ClientToken *string

	// The ARN of the execution role.
	//
	// This member is required.
	ExecutionRoleArn *string

	// The name of the managed endpoint.
	//
	// This member is required.
	Name *string

	// The Amazon EMR release version.
	//
	// This member is required.
	ReleaseLabel *string

	// The type of the managed endpoint.
	//
	// This member is required.
	Type *string

	// The ID of the virtual cluster for which a managed endpoint is created.
	//
	// This member is required.
	VirtualClusterId *string

	// The certificate ARN provided by users for the managed endpoint. This field is
	// under deprecation and will be removed in future releases.
	//
	// Deprecated: Customer provided certificate-arn is deprecated and would be
	// removed in future.
	CertificateArn *string

	// The configuration settings that will be used to override existing
	// configurations.
	ConfigurationOverrides *types.ConfigurationOverrides

	// The tags of the managed endpoint.
	Tags map[string]string

	noSmithyDocumentSerde
}

type CreateManagedEndpointOutput struct {

	// The output contains the ARN of the managed endpoint.
	Arn *string

	// The output contains th
    
func (c *Client) addOperationCreateManagedEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
	if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
		return err
	}
	err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateManagedEndpoint{}, middleware.After)
	if err != nil {
		return err
	}
	err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateManagedEndpoint{}, middleware.After)
	if err != nil {
		return err
	}
	if err := addProtocolFinalizerMiddlewares(stack, options, "CreateManagedEndpoint"); err != nil {
		return fmt.Errorf("add protocol finalizers: %v", err)
	}

	if err = addlegacyEndpointContextSetter(stack, options); err != nil {
		return err
	}
	if err = addSetLoggerMiddleware(stack, options); err != nil {
		return err
	}
	if err = addClientRequestID(stack); err != nil {
		return err
	}
	if err = addComputeContentLength(stack); err != nil {
		return err
	}
	if err = addResolveEndpointMiddleware(stack, options); err != nil {
		return err
	}
	if err = addComputePayloadSHA256(stack); err != nil {
		return err
	}
	if err = addRetry(stack, options); err != nil {
		return err
	}
	if err = addRawResponseToMetadata(stack); err != nil {
		return err
	}
	if err = addRecordResponseTiming(stack); err != nil {
		return err
	}
	if err = addClientUserAgent(stack, options); err != nil {
		return err
	}
	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
		return err
	}
	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
		return err
	}
	if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
		return err
	}
	if err = addIdempotencyToken_opCreateManagedEndpointMiddleware(stack, options); err != nil {
		return err
	}
	if err = addOpCreateManagedEndpointValidationMiddleware(stack); err != nil {
		return err
	}
	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateManagedEndpoint(options.Region), middleware.Before); err != nil {
		return err
	}
	if err = addRecursionDetection(stack); err != nil {
		return err
	}
	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
		return err
	}
	if err = addResponseErrorMiddleware(stack); err != nil {
		return err
	}
	if err = addRequestResponseLogging(stack, options); err != nil {
		return err
	}
	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
		return err
	}
	return nil
}