1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package storagegateway 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/smithy-go/middleware" 10 smithyhttp "github.com/aws/smithy-go/transport/http" 11) 12 13// Updates a gateway's weekly maintenance start time information, including day and 14// time of the week. The maintenance time is the time in your gateway's time zone. 15func (c *Client) UpdateMaintenanceStartTime(ctx context.Context, params *UpdateMaintenanceStartTimeInput, optFns ...func(*Options)) (*UpdateMaintenanceStartTimeOutput, error) { 16 if params == nil { 17 params = &UpdateMaintenanceStartTimeInput{} 18 } 19 20 result, metadata, err := c.invokeOperation(ctx, "UpdateMaintenanceStartTime", params, optFns, addOperationUpdateMaintenanceStartTimeMiddlewares) 21 if err != nil { 22 return nil, err 23 } 24 25 out := result.(*UpdateMaintenanceStartTimeOutput) 26 out.ResultMetadata = metadata 27 return out, nil 28} 29 30// A JSON object containing the following fields: 31// 32// * 33// UpdateMaintenanceStartTimeInput$DayOfMonth 34// 35// * 36// UpdateMaintenanceStartTimeInput$DayOfWeek 37// 38// * 39// UpdateMaintenanceStartTimeInput$HourOfDay 40// 41// * 42// UpdateMaintenanceStartTimeInput$MinuteOfHour 43type UpdateMaintenanceStartTimeInput struct { 44 45 // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to 46 // return a list of gateways for your account and AWS Region. 47 // 48 // This member is required. 49 GatewayARN *string 50 51 // The hour component of the maintenance start time represented as hh, where hh is 52 // the hour (00 to 23). The hour of the day is in the time zone of the gateway. 53 // 54 // This member is required. 55 HourOfDay *int32 56 57 // The minute component of the maintenance start time represented as mm, where mm 58 // is the minute (00 to 59). The minute of the hour is in the time zone of the 59 // gateway. 60 // 61 // This member is required. 62 MinuteOfHour *int32 63 64 // The day of the month component of the maintenance start time represented as an 65 // ordinal number from 1 to 28, where 1 represents the first day of the month and 66 // 28 represents the last day of the month. 67 DayOfMonth *int32 68 69 // The day of the week component of the maintenance start time week represented as 70 // an ordinal number from 0 to 6, where 0 represents Sunday and 6 Saturday. 71 DayOfWeek *int32 72} 73 74// A JSON object containing the Amazon Resource Name (ARN) of the gateway whose 75// maintenance start time is updated. 76type UpdateMaintenanceStartTimeOutput struct { 77 78 // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to 79 // return a list of gateways for your account and AWS Region. 80 GatewayARN *string 81 82 // Metadata pertaining to the operation's result. 83 ResultMetadata middleware.Metadata 84} 85 86func addOperationUpdateMaintenanceStartTimeMiddlewares(stack *middleware.Stack, options Options) (err error) { 87 err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateMaintenanceStartTime{}, middleware.After) 88 if err != nil { 89 return err 90 } 91 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateMaintenanceStartTime{}, 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 = addOpUpdateMaintenanceStartTimeValidationMiddleware(stack); err != nil { 132 return err 133 } 134 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMaintenanceStartTime(options.Region), middleware.Before); err != nil { 135 return err 136 } 137 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 138 return err 139 } 140 if err = addResponseErrorMiddleware(stack); err != nil { 141 return err 142 } 143 if err = addRequestResponseLogging(stack, options); err != nil { 144 return err 145 } 146 return nil 147} 148 149func newServiceMetadataMiddleware_opUpdateMaintenanceStartTime(region string) *awsmiddleware.RegisterServiceMetadata { 150 return &awsmiddleware.RegisterServiceMetadata{ 151 Region: region, 152 ServiceID: ServiceID, 153 SigningName: "storagegateway", 154 OperationName: "UpdateMaintenanceStartTime", 155 } 156} 157