@@ -34,14 +34,14 @@ var (
3434// Model contains the ACK model for the generator to process and apply
3535// templates against.
3636type Model struct {
37- SDKAPI * SDKAPI
38- servicePackage string
39- serviceAlias string
40- apiVersion string
41- crds []* CRD
42- typeDefs []* TypeDef
43- typeImports map [string ]string
44- typeRenames map [string ]string
37+ SDKAPI * SDKAPI
38+ serviceAlias string
39+ serviceModelName string
40+ apiVersion string
41+ crds []* CRD
42+ typeDefs []* TypeDef
43+ typeImports map [string ]string
44+ typeRenames map [string ]string
4545 // Instructions to the code generator how to handle the API and its
4646 // resources
4747 cfg * ackgenconfig.Config
@@ -51,11 +51,11 @@ type Model struct {
5151// service API
5252func (m * Model ) MetaVars () templateset.MetaVars {
5353 return templateset.MetaVars {
54- ServiceAlias : m . serviceAlias ,
55- ServiceIDClean : m . ServiceIDClean () ,
54+ ServiceAliasClean : m . ServiceAliasClean () ,
55+ ServiceModelName : m . serviceModelName ,
5656 APIGroup : m .APIGroup (),
5757 APIVersion : m .apiVersion ,
58- AWSSDKModelServiceID : m .SDKAPI .AWSSDKModelServiceID (),
58+ ServiceID : m .SDKAPI .ServiceID (),
5959 SDKAPIInterfaceTypeName : m .SDKAPI .SDKAPIInterfaceTypeName (),
6060 CRDNames : m .crdNames (),
6161 }
@@ -695,17 +695,17 @@ func (m *Model) GetConfig() *ackgenconfig.Config {
695695// APIGroup returns the normalized Kubernetes APIGroup for the AWS service API,
696696// e.g. "sns.services.k8s.aws"
697697func (m * Model ) APIGroup () string {
698- serviceID := m .servicePackage
698+ serviceID := m .serviceAlias
699699 suffix := "services.k8s.aws"
700700 if m .SDKAPI .apiGroupSuffix != "" {
701701 suffix = m .SDKAPI .apiGroupSuffix
702702 }
703703 return fmt .Sprintf ("%s.%s" , serviceID , suffix )
704704}
705705
706- // ServiceIDClean returns a lowercased, whitespace-stripped ServiceID
707- func (m * Model ) ServiceIDClean () string {
708- serviceID := strings .ToLower (m .servicePackage )
706+ // ServiceAliasClean returns a lowercased, whitespace-stripped ServiceID
707+ func (m * Model ) ServiceAliasClean () string {
708+ serviceID := strings .ToLower (m .serviceAlias )
709709 return strings .Replace (serviceID , " " , "" , - 1 )
710710}
711711
@@ -714,7 +714,8 @@ func (m *Model) ServiceIDClean() string {
714714// instruct the code generator how to handle the API properly
715715func New (
716716 SDKAPI * SDKAPI ,
717- servicePackage string ,
717+ serviceAlias string ,
718+ serviceModelName string ,
718719 apiVersion string ,
719720 configPath string ,
720721 defaultConfig ackgenconfig.Config ,
@@ -724,11 +725,11 @@ func New(
724725 return nil , err
725726 }
726727 m := & Model {
727- SDKAPI : SDKAPI ,
728- servicePackage : servicePackage ,
729- serviceAlias : SDKAPI . AWSSDKModelServiceID () ,
730- apiVersion : apiVersion ,
731- cfg : & cfg ,
728+ SDKAPI : SDKAPI ,
729+ serviceAlias : serviceAlias ,
730+ serviceModelName : serviceModelName ,
731+ apiVersion : apiVersion ,
732+ cfg : & cfg ,
732733 }
733734 m .ApplyShapeIgnoreRules ()
734735 return m , nil
0 commit comments