1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package robomaker 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/robomaker/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Updates a simulation application. 16func (c *Client) UpdateSimulationApplication(ctx context.Context, params *UpdateSimulationApplicationInput, optFns ...func(*Options)) (*UpdateSimulationApplicationOutput, error) { 17 if params == nil { 18 params = &UpdateSimulationApplicationInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "UpdateSimulationApplication", params, optFns, addOperationUpdateSimulationApplicationMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*UpdateSimulationApplicationOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type UpdateSimulationApplicationInput struct { 32 33 // The application information for the simulation application. 34 // 35 // This member is required. 36 Application *string 37 38 // Information about the robot software suite (ROS distribution). 39 // 40 // This member is required. 41 RobotSoftwareSuite *types.RobotSoftwareSuite 42 43 // The simulation software suite used by the simulation application. 44 // 45 // This member is required. 46 SimulationSoftwareSuite *types.SimulationSoftwareSuite 47 48 // The sources of the simulation application. 49 // 50 // This member is required. 51 Sources []types.SourceConfig 52 53 // The revision id for the robot application. 54 CurrentRevisionId *string 55 56 // The rendering engine for the simulation application. 57 RenderingEngine *types.RenderingEngine 58} 59 60type UpdateSimulationApplicationOutput struct { 61 62 // The Amazon Resource Name (ARN) of the updated simulation application. 63 Arn *string 64 65 // The time, in milliseconds since the epoch, when the simulation application was 66 // last updated. 67 LastUpdatedAt *time.Time 68 69 // The name of the simulation application. 70 Name *string 71 72 // The rendering engine for the simulation application. 73 RenderingEngine *types.RenderingEngine 74 75 // The revision id of the simulation application. 76 RevisionId *string 77 78 // Information about the robot software suite (ROS distribution). 79 RobotSoftwareSuite *types.RobotSoftwareSuite 80 81 // The simulation software suite used by the simulation application. 82 SimulationSoftwareSuite *types.SimulationSoftwareSuite 83 84 // The sources of the simulation application. 85 Sources []types.Source 86 87 // The version of the robot application. 88 Version *string 89 90 // Metadata pertaining to the operation's result. 91 ResultMetadata middleware.Metadata 92} 93 94func addOperationUpdateSimulationApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { 95 err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSimulationApplication{}, middleware.After) 96 if err != nil { 97 return err 98 } 99 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSimulationApplication{}, middleware.After) 100 if err != nil { 101 return err 102 } 103 if err = addSetLoggerMiddleware(stack, options); err != nil { 104 return err 105 } 106 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 107 return err 108 } 109 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 110 return err 111 } 112 if err = addResolveEndpointMiddleware(stack, options); err != nil { 113 return err 114 } 115 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 116 return err 117 } 118 if err = addRetryMiddlewares(stack, options); err != nil { 119 return err 120 } 121 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 122 return err 123 } 124 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 125 return err 126 } 127 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 128 return err 129 } 130 if err = addClientUserAgent(stack); err != nil { 131 return err 132 } 133 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 134 return err 135 } 136 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 137 return err 138 } 139 if err = addOpUpdateSimulationApplicationValidationMiddleware(stack); err != nil { 140 return err 141 } 142 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSimulationApplication(options.Region), middleware.Before); err != nil { 143 return err 144 } 145 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 146 return err 147 } 148 if err = addResponseErrorMiddleware(stack); err != nil { 149 return err 150 } 151 if err = addRequestResponseLogging(stack, options); err != nil { 152 return err 153 } 154 return nil 155} 156 157func newServiceMetadataMiddleware_opUpdateSimulationApplication(region string) *awsmiddleware.RegisterServiceMetadata { 158 return &awsmiddleware.RegisterServiceMetadata{ 159 Region: region, 160 ServiceID: ServiceID, 161 SigningName: "robomaker", 162 OperationName: "UpdateSimulationApplication", 163 } 164} 165