1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/appflow/model/ConnectorType.h> 7 #include <aws/core/utils/HashingUtils.h> 8 #include <aws/core/Globals.h> 9 #include <aws/core/utils/EnumParseOverflowContainer.h> 10 11 using namespace Aws::Utils; 12 13 14 namespace Aws 15 { 16 namespace Appflow 17 { 18 namespace Model 19 { 20 namespace ConnectorTypeMapper 21 { 22 23 static const int Salesforce_HASH = HashingUtils::HashString("Salesforce"); 24 static const int Singular_HASH = HashingUtils::HashString("Singular"); 25 static const int Slack_HASH = HashingUtils::HashString("Slack"); 26 static const int Redshift_HASH = HashingUtils::HashString("Redshift"); 27 static const int S3_HASH = HashingUtils::HashString("S3"); 28 static const int Marketo_HASH = HashingUtils::HashString("Marketo"); 29 static const int Googleanalytics_HASH = HashingUtils::HashString("Googleanalytics"); 30 static const int Zendesk_HASH = HashingUtils::HashString("Zendesk"); 31 static const int Servicenow_HASH = HashingUtils::HashString("Servicenow"); 32 static const int Datadog_HASH = HashingUtils::HashString("Datadog"); 33 static const int Trendmicro_HASH = HashingUtils::HashString("Trendmicro"); 34 static const int Snowflake_HASH = HashingUtils::HashString("Snowflake"); 35 static const int Dynatrace_HASH = HashingUtils::HashString("Dynatrace"); 36 static const int Infornexus_HASH = HashingUtils::HashString("Infornexus"); 37 static const int Amplitude_HASH = HashingUtils::HashString("Amplitude"); 38 static const int Veeva_HASH = HashingUtils::HashString("Veeva"); 39 static const int EventBridge_HASH = HashingUtils::HashString("EventBridge"); 40 static const int LookoutMetrics_HASH = HashingUtils::HashString("LookoutMetrics"); 41 static const int Upsolver_HASH = HashingUtils::HashString("Upsolver"); 42 static const int Honeycode_HASH = HashingUtils::HashString("Honeycode"); 43 static const int CustomerProfiles_HASH = HashingUtils::HashString("CustomerProfiles"); 44 static const int SAPOData_HASH = HashingUtils::HashString("SAPOData"); 45 46 GetConnectorTypeForName(const Aws::String & name)47 ConnectorType GetConnectorTypeForName(const Aws::String& name) 48 { 49 int hashCode = HashingUtils::HashString(name.c_str()); 50 if (hashCode == Salesforce_HASH) 51 { 52 return ConnectorType::Salesforce; 53 } 54 else if (hashCode == Singular_HASH) 55 { 56 return ConnectorType::Singular; 57 } 58 else if (hashCode == Slack_HASH) 59 { 60 return ConnectorType::Slack; 61 } 62 else if (hashCode == Redshift_HASH) 63 { 64 return ConnectorType::Redshift; 65 } 66 else if (hashCode == S3_HASH) 67 { 68 return ConnectorType::S3; 69 } 70 else if (hashCode == Marketo_HASH) 71 { 72 return ConnectorType::Marketo; 73 } 74 else if (hashCode == Googleanalytics_HASH) 75 { 76 return ConnectorType::Googleanalytics; 77 } 78 else if (hashCode == Zendesk_HASH) 79 { 80 return ConnectorType::Zendesk; 81 } 82 else if (hashCode == Servicenow_HASH) 83 { 84 return ConnectorType::Servicenow; 85 } 86 else if (hashCode == Datadog_HASH) 87 { 88 return ConnectorType::Datadog; 89 } 90 else if (hashCode == Trendmicro_HASH) 91 { 92 return ConnectorType::Trendmicro; 93 } 94 else if (hashCode == Snowflake_HASH) 95 { 96 return ConnectorType::Snowflake; 97 } 98 else if (hashCode == Dynatrace_HASH) 99 { 100 return ConnectorType::Dynatrace; 101 } 102 else if (hashCode == Infornexus_HASH) 103 { 104 return ConnectorType::Infornexus; 105 } 106 else if (hashCode == Amplitude_HASH) 107 { 108 return ConnectorType::Amplitude; 109 } 110 else if (hashCode == Veeva_HASH) 111 { 112 return ConnectorType::Veeva; 113 } 114 else if (hashCode == EventBridge_HASH) 115 { 116 return ConnectorType::EventBridge; 117 } 118 else if (hashCode == LookoutMetrics_HASH) 119 { 120 return ConnectorType::LookoutMetrics; 121 } 122 else if (hashCode == Upsolver_HASH) 123 { 124 return ConnectorType::Upsolver; 125 } 126 else if (hashCode == Honeycode_HASH) 127 { 128 return ConnectorType::Honeycode; 129 } 130 else if (hashCode == CustomerProfiles_HASH) 131 { 132 return ConnectorType::CustomerProfiles; 133 } 134 else if (hashCode == SAPOData_HASH) 135 { 136 return ConnectorType::SAPOData; 137 } 138 EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); 139 if(overflowContainer) 140 { 141 overflowContainer->StoreOverflow(hashCode, name); 142 return static_cast<ConnectorType>(hashCode); 143 } 144 145 return ConnectorType::NOT_SET; 146 } 147 GetNameForConnectorType(ConnectorType enumValue)148 Aws::String GetNameForConnectorType(ConnectorType enumValue) 149 { 150 switch(enumValue) 151 { 152 case ConnectorType::Salesforce: 153 return "Salesforce"; 154 case ConnectorType::Singular: 155 return "Singular"; 156 case ConnectorType::Slack: 157 return "Slack"; 158 case ConnectorType::Redshift: 159 return "Redshift"; 160 case ConnectorType::S3: 161 return "S3"; 162 case ConnectorType::Marketo: 163 return "Marketo"; 164 case ConnectorType::Googleanalytics: 165 return "Googleanalytics"; 166 case ConnectorType::Zendesk: 167 return "Zendesk"; 168 case ConnectorType::Servicenow: 169 return "Servicenow"; 170 case ConnectorType::Datadog: 171 return "Datadog"; 172 case ConnectorType::Trendmicro: 173 return "Trendmicro"; 174 case ConnectorType::Snowflake: 175 return "Snowflake"; 176 case ConnectorType::Dynatrace: 177 return "Dynatrace"; 178 case ConnectorType::Infornexus: 179 return "Infornexus"; 180 case ConnectorType::Amplitude: 181 return "Amplitude"; 182 case ConnectorType::Veeva: 183 return "Veeva"; 184 case ConnectorType::EventBridge: 185 return "EventBridge"; 186 case ConnectorType::LookoutMetrics: 187 return "LookoutMetrics"; 188 case ConnectorType::Upsolver: 189 return "Upsolver"; 190 case ConnectorType::Honeycode: 191 return "Honeycode"; 192 case ConnectorType::CustomerProfiles: 193 return "CustomerProfiles"; 194 case ConnectorType::SAPOData: 195 return "SAPOData"; 196 default: 197 EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); 198 if(overflowContainer) 199 { 200 return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue)); 201 } 202 203 return {}; 204 } 205 } 206 207 } // namespace ConnectorTypeMapper 208 } // namespace Model 209 } // namespace Appflow 210 } // namespace Aws 211