@@ -206,11 +206,13 @@ func (a *SDKAPI) GetOperationMap(cfg *ackgenconfig.Config) *OperationMap {
206206	// create an index of Operations by operation types and resource name 
207207	opMap  :=  OperationMap {}
208208	for  opID , op  :=  range  a .API .Operations  {
209- 		opType , resName  :=  getOpTypeAndResourceName (opID , cfg )
210- 		if  _ , found  :=  opMap [opType ]; ! found  {
211- 			opMap [opType ] =  map [string ]* awssdkmodel.Operation {}
212- 		}
213- 		opMap [opType ][resName ] =  op 
209+ 		opTypeArray , resName  :=  getOpTypeAndResourceName (opID , cfg )
210+ 		for  _ , opType  :=  range  opTypeArray  {
211+ 			if  _ , found  :=  opMap [opType ]; ! found  {
212+ 				opMap [opType ] =  map [string ]* awssdkmodel.Operation {}
213+ 			}
214+ 			opMap [opType ][resName ] =  op 
215+ 		}	
214216	}
215217	a .opMap  =  & opMap 
216218	return  & opMap 
@@ -382,20 +384,27 @@ func (a *SDKAPI) SDKAPIInterfaceTypeName() string {
382384}
383385
384386// Override the operation type and/or resource name if specified in config 
385- func  getOpTypeAndResourceName (opID  string , cfg  * ackgenconfig.Config ) (OpType , string ) {
387+ func  getOpTypeAndResourceName (opID  string , cfg  * ackgenconfig.Config ) ([] OpType , string ) {
386388	opType , resName  :=  GetOpTypeAndResourceNameFromOpID (opID )
387- 
389+ 	opTypeArray  :=  make ([]OpType , 0 )
390+ 	// TODO: or use var opTypeArray []OpType 
388391	if  cfg  !=  nil  {
389392		if  operationConfig , exists  :=  cfg .Operations [opID ]; exists  {
390- 			if  operationConfig .OperationType  !=  ""  {
391- 				opType  =  OpTypeFromString (operationConfig .OperationType )
392- 			}
393- 
394393			if  operationConfig .ResourceName  !=  ""  {
395394				resName  =  operationConfig .ResourceName 
396395			}
397- 		}
398- 	}
399396
400- 	return  opType , resName 
397+ 			if  len (operationConfig .OperationType ) >  0  {
398+ 				for  _ , operationType  :=  range  operationConfig .OperationType  {
399+ 					opType  =  OpTypeFromString (operationType )
400+ 					opTypeArray  =  append (opTypeArray , opType )
401+ 				}	
402+ 			} else  {
403+ 				opTypeArray  =  append (opTypeArray , opType )
404+ 			}
405+ 		} else  {
406+ 			opTypeArray  =  append (opTypeArray , opType )
407+ 		}
408+ 	} 
409+ 	return  opTypeArray , resName 
401410}
0 commit comments