// Code generated by smithy-go-codegen DO NOT EDIT.

package cloudwatch

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

// Returns the current status of vended metric enrichment for the account,
// including whether CloudWatch vended metrics are enriched with resource ARN and
// resource tag labels and queryable using PromQL. For the list of supported
// resources, see [Supported Amazon Web Services infrastructure metrics].
//
// [Supported Amazon Web Services infrastructure metrics]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingResourceTagsForTelemetry.html
func (c *Client) GetOTelEnrichment(ctx context.Context, params *GetOTelEnrichmentInput, optFns ...func(*Options)) (*GetOTelEnrichmentOutput, error) {
	if params == nil {
		params = &GetOTelEnrichmentInput{}
	}

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

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

type GetOTelEnrichmentInput struct {
	noSmithyDocumentSerde
}

type GetOTelEnrichmentOutput struct {

	// The status of OTel enrichment for the account. Valid values are Running
	// (enrichment is enabled) and Stopped (enrichment is disabled).
	//
	// This member is required.
	Status types.OTelEnrichmentStatus

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata

	noSmithyDocumentSerde
}

func (c *Client) addOperationGetOTelEnrichmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
	err = stack.Serialize.Add(&smithyRpcv2cbor_serializeOpGetOTelEnrichment{}, middleware.After)
	if err != nil {
		return err
	}
	err = stack.Deserialize.Add(&smithyRpcv2cbor_deserializeOpGetOTelEnrichment{}, middleware.After)
	if err != nil {
		return err
	}

	if err = addlegacyEndpointContextSetter(stack, options); 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 = addRecordResponseTiming(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 = addUserAgentFeatureProtocolRPCV2CBOR(stack, options); err != nil {
		return err
	}
	if err = addCredentialSource(stack, options); err != nil {
		return err
	}
	if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetOTelEnrichment"), middleware.Before); 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
	}
	if err = addInterceptors(stack, options); err != nil {
		return err
	}
	return nil
}
