1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package alexaforbusiness
4
5import (
6	"context"
7	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
8	"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
9	"github.com/aws/aws-sdk-go-v2/service/alexaforbusiness/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12)
13
14// Updates an existing room profile by room profile ARN.
15func (c *Client) UpdateProfile(ctx context.Context, params *UpdateProfileInput, optFns ...func(*Options)) (*UpdateProfileOutput, error) {
16	if params == nil {
17		params = &UpdateProfileInput{}
18	}
19
20	result, metadata, err := c.invokeOperation(ctx, "UpdateProfile", params, optFns, c.addOperationUpdateProfileMiddlewares)
21	if err != nil {
22		return nil, err
23	}
24
25	out := result.(*UpdateProfileOutput)
26	out.ResultMetadata = metadata
27	return out, nil
28}
29
30type UpdateProfileInput struct {
31
32	// The updated address for the room profile.
33	Address *string
34
35	// Whether data retention of the profile is enabled.
36	DataRetentionOptIn *bool
37
38	// The updated distance unit for the room profile.
39	DistanceUnit types.DistanceUnit
40
41	// Sets the profile as default if selected. If this is missing, no update is done
42	// to the default status.
43	IsDefault *bool
44
45	// The updated locale for the room profile. (This is currently only available to a
46	// limited preview audience.)
47	Locale *string
48
49	// The updated maximum volume limit for the room profile.
50	MaxVolumeLimit *int32
51
52	// The updated meeting room settings of a room profile.
53	MeetingRoomConfiguration *types.UpdateMeetingRoomConfiguration
54
55	// Whether the PSTN setting of the room profile is enabled.
56	PSTNEnabled *bool
57
58	// The ARN of the room profile to update. Required.
59	ProfileArn *string
60
61	// The updated name for the room profile.
62	ProfileName *string
63
64	// Whether the setup mode of the profile is enabled.
65	SetupModeDisabled *bool
66
67	// The updated temperature unit for the room profile.
68	TemperatureUnit types.TemperatureUnit
69
70	// The updated timezone for the room profile.
71	Timezone *string
72
73	// The updated wake word for the room profile.
74	WakeWord types.WakeWord
75
76	noSmithyDocumentSerde
77}
78
79type UpdateProfileOutput struct {
80	// Metadata pertaining to the operation's result.
81	ResultMetadata middleware.Metadata
82
83	noSmithyDocumentSerde
84}
85
86func (c *Client) addOperationUpdateProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
87	err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateProfile{}, middleware.After)
88	if err != nil {
89		return err
90	}
91	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateProfile{}, middleware.After)
92	if err != nil {
93		return err
94	}
95	if err = addSetLoggerMiddleware(stack, options); err != nil {
96		return err
97	}
98	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
99		return err
100	}
101	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
102		return err
103	}
104	if err = addResolveEndpointMiddleware(stack, options); err != nil {
105		return err
106	}
107	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
108		return err
109	}
110	if err = addRetryMiddlewares(stack, options); err != nil {
111		return err
112	}
113	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
114		return err
115	}
116	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
117		return err
118	}
119	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
120		return err
121	}
122	if err = addClientUserAgent(stack); err != nil {
123		return err
124	}
125	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
126		return err
127	}
128	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
129		return err
130	}
131	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProfile(options.Region), middleware.Before); err != nil {
132		return err
133	}
134	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
135		return err
136	}
137	if err = addResponseErrorMiddleware(stack); err != nil {
138		return err
139	}
140	if err = addRequestResponseLogging(stack, options); err != nil {
141		return err
142	}
143	return nil
144}
145
146func newServiceMetadataMiddleware_opUpdateProfile(region string) *awsmiddleware.RegisterServiceMetadata {
147	return &awsmiddleware.RegisterServiceMetadata{
148		Region:        region,
149		ServiceID:     ServiceID,
150		SigningName:   "a4b",
151		OperationName: "UpdateProfile",
152	}
153}
154