1 /* 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"). 5 * You may not use this file except in compliance with the License. 6 * A copy of the License is located at 7 * 8 * http://aws.amazon.com/apache2.0 9 * 10 * or in the "license" file accompanying this file. This file is distributed 11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 * express or implied. See the License for the specific language governing 13 * permissions and limitations under the License. 14 */ 15 16 package software.amazon.awssdk.codegen.model.config.customization; 17 18 import java.util.ArrayList; 19 import java.util.Collections; 20 import java.util.HashMap; 21 import java.util.List; 22 import java.util.Map; 23 import software.amazon.awssdk.codegen.model.service.ClientContextParam; 24 import software.amazon.awssdk.core.retry.RetryMode; 25 import software.amazon.awssdk.core.traits.PayloadTrait; 26 import software.amazon.awssdk.utils.AttributeMap; 27 28 /** 29 * {@code service-2.json} models can be manually modified via defining properties in an associated {@code customization.config} 30 * file. This class defines the Java bean representation that will be used to parse the JSON customization file. The bean can 31 * then be later queried in the misc. codegen steps. 32 */ 33 public class CustomizationConfig { 34 35 /** 36 * List of 'convenience' overloads to generate for model classes. Convenience overloads expose a 37 * different type that is adapted to the real type 38 */ 39 private final List<ConvenienceTypeOverload> convenienceTypeOverloads = new ArrayList<>(); 40 41 /** 42 * Configuration object for service-specific configuration options. 43 */ 44 private ServiceConfig serviceConfig = new ServiceConfig(); 45 46 /** 47 * Specify shapes to be renamed. 48 */ 49 private Map<String, String> renameShapes; 50 51 /** 52 * Custom service and intermediate model metadata properties. 53 */ 54 private MetadataConfig customServiceMetadata; 55 /** 56 * Codegen customization mechanism shared by the .NET SDK 57 */ 58 private Map<String, OperationModifier> operationModifiers; 59 private Map<String, ShapeSubstitution> shapeSubstitutions; 60 private CustomSdkShapes customSdkShapes; 61 private Map<String, ShapeModifier> shapeModifiers; 62 /** 63 * Sets the custom field name that identifies the type of modeled exception for JSON protocols. 64 * Normally this is '__type' but Glacier has a custom error code field named simply 'code'. 65 */ 66 private String customErrorCodeFieldName; 67 /** 68 * Service specific base class for all modeled exceptions. By default this is syncInterface + 69 * Exception (i.e. AmazonSQSException). Currently only DynamoDB Streams utilizes this 70 * customization since it shares exception types with the DynamoDB client. 71 * 72 * <p>This customization should only provide the simple class name. The typical model package 73 * will be used when fully qualifying references to this exception</p> 74 * 75 * <p><b>Note:</b> that if a custom base class is provided the generator will not generate one. 76 * We assume it already exists.</p> 77 */ 78 private String sdkModeledExceptionBaseClassName; 79 /** 80 * Service calculates CRC32 checksum from compressed file when Accept-Encoding: gzip header is provided. 81 */ 82 private boolean calculateCrc32FromCompressedData; 83 84 /** 85 * Exclude the create() method on a client. This is useful for global services that will need a global region configured to 86 * work. 87 */ 88 private boolean excludeClientCreateMethod = false; 89 90 /** 91 * Configurations for the service that share model with other services. The models and non-request marshallers will be 92 * generated into the same directory as the provided service's models. 93 */ 94 private ShareModelConfig shareModelConfig; 95 96 /** 97 * Fully qualified name of the class that contains the custom http config. The class should expose a public static method 98 * with name "defaultHttpConfig" that returns an {@link AttributeMap} containing the desired http config defaults. 99 * 100 * See SWF customization.config for an example. 101 */ 102 private String serviceSpecificHttpConfig; 103 104 /** 105 * APIs that have no required arguments in their model but can't be called via a simple method 106 */ 107 private List<String> excludedSimpleMethods = new ArrayList<>(); 108 109 /** 110 * APIs that have no required arguments in their model but can't be called via a simple method. 111 * Superseded by {@link #excludedSimpleMethods} 112 */ 113 @Deprecated 114 private List<String> blacklistedSimpleMethods = new ArrayList<>(); 115 116 /** 117 * APIs that are not Get/List/Describe APIs that have been verified that they are able 118 * to be used through simple methods 119 */ 120 private List<String> verifiedSimpleMethods = new ArrayList<>(); 121 122 /** 123 * If a service isn't in the endpoints.json, the region that should be used for simple method integration tests. 124 */ 125 private String defaultSimpleMethodTestRegion; 126 127 private List<String> deprecatedOperations = new ArrayList<>(); 128 129 private List<String> deprecatedShapes = new ArrayList<>(); 130 131 private String sdkRequestBaseClassName; 132 133 private String sdkResponseBaseClassName; 134 135 private Map<String, String> modelMarshallerDefaultValueSupplier = new HashMap<>(); 136 137 /** 138 * Custom Retry Policy 139 */ 140 private String customRetryPolicy; 141 142 private boolean skipSyncClientGeneration; 143 144 /** 145 * Customization to attach the {@link PayloadTrait} to a member. Currently this is only used for 146 * S3 which doesn't model a member as a payload trait even though it is. 147 */ 148 private Map<String, String> attachPayloadTraitToMember = new HashMap<>(); 149 150 /** 151 * Custom Response metadata 152 */ 153 private Map<String, String> customResponseMetadata; 154 155 /** 156 * Custom protocol factory implementation. Currently this is only respected by the REST-XML protocol as only S3 157 * needs a custom factory. 158 */ 159 private String customProtocolFactoryFqcn; 160 161 /** 162 * Map of paginated operations that use custom class generation. 163 * Key - c2j operation name 164 * Value - indicates the type of pagination strategy to use 165 */ 166 private Map<String, String> paginationCustomization; 167 168 /** 169 * Config to generate a utilities() in the low-level client 170 */ 171 private UtilitiesMethod utilitiesMethod; 172 173 /** 174 * Config to generate a additional Builder methods in the client interface. 175 */ 176 private List<AdditionalBuilderMethod> additionalBuilderMethods; 177 178 /** 179 * Force generation of deprecated client builder method 'enableEndpointDiscovery'. Only services that already had 180 * this method when it was deprecated require this flag to be set. 181 */ 182 private boolean enableEndpointDiscoveryMethodRequired = false; 183 184 /** 185 * Arnable fields used in s3 control 186 */ 187 private Map<String, S3ArnableFieldConfig> s3ArnableFields; 188 189 /** 190 * Allow a customer to set an endpoint override AND bypass endpoint discovery on their client even when endpoint discovery 191 * enabled is true and endpoint discovery is required for an operation. This customization should almost never be "true" 192 * because it creates a confusing customer experience. 193 */ 194 private boolean allowEndpointOverrideForEndpointDiscoveryRequiredOperations = false; 195 196 /** 197 * Customization to instruct the code generator to use the legacy model generation scheme for the given events. 198 * <p> 199 * <b>NOTE</b>This customization is primarily here to preserve backwards compatibility with existing code before the 200 * generation scheme for the visitor methods was changed. There should be no good reason to use this customization 201 * for any other purpose. 202 */ 203 private Map<String, List<String>> useLegacyEventGenerationScheme = new HashMap<>(); 204 205 /** 206 * How the code generator should behave when it encounters shapes with underscores in the name. 207 */ 208 private UnderscoresInNameBehavior underscoresInNameBehavior; 209 210 private String userAgent; 211 212 private RetryMode defaultRetryMode; 213 214 /** 215 * Whether to generate an abstract decorator class that delegates to the async service client 216 */ 217 private boolean delegateAsyncClientClass; 218 219 /** 220 * Whether to generate an abstract decorator class that delegates to the sync service client 221 */ 222 private boolean delegateSyncClientClass; 223 224 /** 225 * Fully qualified name of a class that given the default sync client instance can return the final client instance, 226 * for instance by decorating the client with specific-purpose implementations of the client interface. 227 * See S3 customization.config for an example. 228 */ 229 private String syncClientDecorator; 230 231 /** 232 * Fully qualified name of a class that given the default async client instance can return the final client instance, 233 * for instance by decorating the client with specific-purpose implementations of the client interface. 234 * See S3 customization.config for an example. 235 */ 236 private String asyncClientDecorator; 237 238 /** 239 * Only for s3. A set of customization to related to multipart operations. 240 */ 241 private MultipartCustomization multipartCustomization; 242 243 /** 244 * Whether to skip generating endpoint tests from endpoint-tests.json 245 */ 246 private boolean skipEndpointTestGeneration; 247 248 /** 249 * Whether to generate client-level endpoint tests; overrides test case criteria such as operation inputs. 250 */ 251 private boolean generateEndpointClientTests; 252 253 /** 254 * A mapping from the skipped test's description to the reason why it's being skipped. 255 */ 256 private Map<String, String> skipEndpointTests; 257 258 private boolean useGlobalEndpoint; 259 260 private boolean useS3ExpressSessionAuth; 261 262 private List<String> interceptors = new ArrayList<>(); 263 264 private List<String> internalPlugins = new ArrayList<>(); 265 266 /** 267 * Whether marshallers perform validations against members marked with RequiredTrait. 268 */ 269 private boolean requiredTraitValidationEnabled = false; 270 271 /** 272 * Whether SRA based auth logic should be used. 273 */ 274 private boolean useSraAuth = false; 275 276 /** 277 * Whether to generate auth scheme params based on endpoint params. 278 */ 279 private boolean enableEndpointAuthSchemeParams = false; 280 281 /** 282 * List of endpoint params to be used for the auth scheme params 283 */ 284 private List<String> allowedEndpointAuthSchemeParams = Collections.emptyList(); 285 286 /** 287 * Whether the list of allowed endpoint auth scheme params was explicitly configured. 288 */ 289 private boolean allowedEndpointAuthSchemeParamsConfigured = false; 290 291 /** 292 * Customization to attach map of Custom client param configs that can be set on a client builder. 293 */ 294 private Map<String, ClientContextParam> customClientContextParams; 295 296 private boolean s3ExpressAuthSupport; 297 298 /** 299 * Set to true to enable compiled endpoint rules. Currently defaults to false. 300 */ 301 private boolean enableGenerateCompiledEndpointRules = false; 302 303 /** 304 * Customization related to auth scheme derived from endpoints. 305 */ 306 private EndpointAuthSchemeConfig endpointAuthSchemeConfig; 307 308 /** 309 * Customization to change the root package name. 310 * By default, it's "software.amazon.awssdk.services.[serviceId]" 311 */ 312 private String rootPackageName; 313 CustomizationConfig()314 private CustomizationConfig() { 315 } 316 create()317 public static CustomizationConfig create() { 318 return new CustomizationConfig(); 319 } 320 getOperationModifiers()321 public Map<String, OperationModifier> getOperationModifiers() { 322 return operationModifiers; 323 } 324 setOperationModifiers(Map<String, OperationModifier> operationModifiers)325 public void setOperationModifiers(Map<String, OperationModifier> operationModifiers) { 326 this.operationModifiers = operationModifiers; 327 } 328 getRenameShapes()329 public Map<String, String> getRenameShapes() { 330 return renameShapes; 331 } 332 setRenameShapes(Map<String, String> renameShapes)333 public void setRenameShapes(Map<String, String> renameShapes) { 334 this.renameShapes = renameShapes; 335 } 336 getCustomSdkShapes()337 public CustomSdkShapes getCustomSdkShapes() { 338 return customSdkShapes; 339 } 340 setCustomSdkShapes(CustomSdkShapes customSdkShapes)341 public void setCustomSdkShapes(CustomSdkShapes customSdkShapes) { 342 this.customSdkShapes = customSdkShapes; 343 } 344 getShapeSubstitutions()345 public Map<String, ShapeSubstitution> getShapeSubstitutions() { 346 return shapeSubstitutions; 347 } 348 setShapeSubstitutions(Map<String, ShapeSubstitution> shapeSubstitutions)349 public void setShapeSubstitutions(Map<String, ShapeSubstitution> shapeSubstitutions) { 350 this.shapeSubstitutions = shapeSubstitutions; 351 } 352 getShapeModifiers()353 public Map<String, ShapeModifier> getShapeModifiers() { 354 return shapeModifiers; 355 } 356 setShapeModifiers(Map<String, ShapeModifier> shapeModifiers)357 public void setShapeModifiers(Map<String, ShapeModifier> shapeModifiers) { 358 this.shapeModifiers = shapeModifiers; 359 } 360 getConvenienceTypeOverloads()361 public List<ConvenienceTypeOverload> getConvenienceTypeOverloads() { 362 return this.convenienceTypeOverloads; 363 } 364 setConvenienceTypeOverloads(List<ConvenienceTypeOverload> convenienceTypeOverloads)365 public void setConvenienceTypeOverloads(List<ConvenienceTypeOverload> convenienceTypeOverloads) { 366 this.convenienceTypeOverloads.addAll(convenienceTypeOverloads); 367 } 368 getCustomServiceMetadata()369 public MetadataConfig getCustomServiceMetadata() { 370 return customServiceMetadata; 371 } 372 setCustomServiceMetadata(MetadataConfig metadataConfig)373 public void setCustomServiceMetadata(MetadataConfig metadataConfig) { 374 this.customServiceMetadata = metadataConfig; 375 } 376 getCustomErrorCodeFieldName()377 public String getCustomErrorCodeFieldName() { 378 return customErrorCodeFieldName; 379 } 380 setCustomErrorCodeFieldName(String customErrorCodeFieldName)381 public void setCustomErrorCodeFieldName(String customErrorCodeFieldName) { 382 this.customErrorCodeFieldName = customErrorCodeFieldName; 383 } 384 getSdkModeledExceptionBaseClassName()385 public String getSdkModeledExceptionBaseClassName() { 386 return sdkModeledExceptionBaseClassName; 387 } 388 setSdkModeledExceptionBaseClassName(String sdkModeledExceptionBaseClassName)389 public void setSdkModeledExceptionBaseClassName(String sdkModeledExceptionBaseClassName) { 390 this.sdkModeledExceptionBaseClassName = sdkModeledExceptionBaseClassName; 391 } 392 isCalculateCrc32FromCompressedData()393 public boolean isCalculateCrc32FromCompressedData() { 394 return calculateCrc32FromCompressedData; 395 } 396 setCalculateCrc32FromCompressedData( boolean calculateCrc32FromCompressedData)397 public void setCalculateCrc32FromCompressedData( 398 boolean calculateCrc32FromCompressedData) { 399 this.calculateCrc32FromCompressedData = calculateCrc32FromCompressedData; 400 } 401 isExcludeClientCreateMethod()402 public boolean isExcludeClientCreateMethod() { 403 return excludeClientCreateMethod; 404 } 405 setExcludeClientCreateMethod(boolean excludeClientCreateMethod)406 public void setExcludeClientCreateMethod(boolean excludeClientCreateMethod) { 407 this.excludeClientCreateMethod = excludeClientCreateMethod; 408 } 409 getShareModelConfig()410 public ShareModelConfig getShareModelConfig() { 411 return shareModelConfig; 412 } 413 setShareModelConfig(ShareModelConfig shareModelConfig)414 public void setShareModelConfig(ShareModelConfig shareModelConfig) { 415 this.shareModelConfig = shareModelConfig; 416 } 417 getServiceSpecificHttpConfig()418 public String getServiceSpecificHttpConfig() { 419 return serviceSpecificHttpConfig; 420 } 421 setServiceSpecificHttpConfig(String serviceSpecificHttpConfig)422 public void setServiceSpecificHttpConfig(String serviceSpecificHttpConfig) { 423 this.serviceSpecificHttpConfig = serviceSpecificHttpConfig; 424 } 425 getExcludedSimpleMethods()426 public List<String> getExcludedSimpleMethods() { 427 return excludedSimpleMethods; 428 } 429 setExcludedSimpleMethods(List<String> excludedSimpleMethods)430 public void setExcludedSimpleMethods(List<String> excludedSimpleMethods) { 431 this.excludedSimpleMethods = excludedSimpleMethods; 432 } 433 434 /** 435 * Use {@link #getExcludedSimpleMethods()} 436 */ 437 @Deprecated getBlacklistedSimpleMethods()438 public List<String> getBlacklistedSimpleMethods() { 439 return blacklistedSimpleMethods; 440 } 441 442 /** 443 * Use {@link #setExcludedSimpleMethods(List)} 444 */ 445 @Deprecated setBlacklistedSimpleMethods(List<String> blackListedSimpleMethods)446 public void setBlacklistedSimpleMethods(List<String> blackListedSimpleMethods) { 447 this.blacklistedSimpleMethods = blackListedSimpleMethods; 448 } 449 getVerifiedSimpleMethods()450 public List<String> getVerifiedSimpleMethods() { 451 return verifiedSimpleMethods; 452 } 453 setVerifiedSimpleMethods(List<String> verifiedSimpleMethods)454 public void setVerifiedSimpleMethods(List<String> verifiedSimpleMethods) { 455 this.verifiedSimpleMethods = verifiedSimpleMethods; 456 } 457 getDefaultSimpleMethodTestRegion()458 public String getDefaultSimpleMethodTestRegion() { 459 return defaultSimpleMethodTestRegion; 460 } 461 setDefaultSimpleMethodTestRegion(String defaultSimpleMethodTestRegion)462 public void setDefaultSimpleMethodTestRegion(String defaultSimpleMethodTestRegion) { 463 this.defaultSimpleMethodTestRegion = defaultSimpleMethodTestRegion; 464 } 465 getDeprecatedOperations()466 public List<String> getDeprecatedOperations() { 467 return deprecatedOperations; 468 } 469 setDeprecatedOperations(List<String> deprecatedOperations)470 public void setDeprecatedOperations(List<String> deprecatedOperations) { 471 this.deprecatedOperations = deprecatedOperations; 472 } 473 getDeprecatedShapes()474 public List<String> getDeprecatedShapes() { 475 return deprecatedShapes; 476 } 477 setDeprecatedShapes(List<String> deprecatedShapes)478 public void setDeprecatedShapes(List<String> deprecatedShapes) { 479 this.deprecatedShapes = deprecatedShapes; 480 } 481 getSdkRequestBaseClassName()482 public String getSdkRequestBaseClassName() { 483 return sdkRequestBaseClassName; 484 } 485 setSdkRequestBaseClassName(String sdkRequestBaseClassName)486 public void setSdkRequestBaseClassName(String sdkRequestBaseClassName) { 487 this.sdkRequestBaseClassName = sdkRequestBaseClassName; 488 } 489 getSdkResponseBaseClassName()490 public String getSdkResponseBaseClassName() { 491 return sdkResponseBaseClassName; 492 } 493 setSdkResponseBaseClassName(String sdkResponseBaseClassName)494 public void setSdkResponseBaseClassName(String sdkResponseBaseClassName) { 495 this.sdkResponseBaseClassName = sdkResponseBaseClassName; 496 } 497 getModelMarshallerDefaultValueSupplier()498 public Map<String, String> getModelMarshallerDefaultValueSupplier() { 499 return modelMarshallerDefaultValueSupplier; 500 } 501 setModelMarshallerDefaultValueSupplier(Map<String, String> modelMarshallerDefaultValueSupplier)502 public void setModelMarshallerDefaultValueSupplier(Map<String, String> modelMarshallerDefaultValueSupplier) { 503 this.modelMarshallerDefaultValueSupplier = modelMarshallerDefaultValueSupplier; 504 } 505 getCustomRetryPolicy()506 public String getCustomRetryPolicy() { 507 return customRetryPolicy; 508 } 509 setCustomRetryPolicy(String customRetryPolicy)510 public void setCustomRetryPolicy(String customRetryPolicy) { 511 this.customRetryPolicy = customRetryPolicy; 512 } 513 isSkipSyncClientGeneration()514 public boolean isSkipSyncClientGeneration() { 515 return skipSyncClientGeneration; 516 } 517 setSkipSyncClientGeneration(boolean skipSyncClientGeneration)518 public void setSkipSyncClientGeneration(boolean skipSyncClientGeneration) { 519 this.skipSyncClientGeneration = skipSyncClientGeneration; 520 } 521 getAttachPayloadTraitToMember()522 public Map<String, String> getAttachPayloadTraitToMember() { 523 return attachPayloadTraitToMember; 524 } 525 setAttachPayloadTraitToMember(Map<String, String> attachPayloadTraitToMember)526 public void setAttachPayloadTraitToMember(Map<String, String> attachPayloadTraitToMember) { 527 this.attachPayloadTraitToMember = attachPayloadTraitToMember; 528 } 529 getCustomResponseMetadata()530 public Map<String, String> getCustomResponseMetadata() { 531 return customResponseMetadata; 532 } 533 setCustomResponseMetadata(Map<String, String> customResponseMetadata)534 public void setCustomResponseMetadata(Map<String, String> customResponseMetadata) { 535 this.customResponseMetadata = customResponseMetadata; 536 } 537 getCustomProtocolFactoryFqcn()538 public String getCustomProtocolFactoryFqcn() { 539 return customProtocolFactoryFqcn; 540 } 541 setCustomProtocolFactoryFqcn(String customProtocolFactoryFqcn)542 public void setCustomProtocolFactoryFqcn(String customProtocolFactoryFqcn) { 543 this.customProtocolFactoryFqcn = customProtocolFactoryFqcn; 544 } 545 getPaginationCustomization()546 public Map<String, String> getPaginationCustomization() { 547 return paginationCustomization; 548 } 549 setPaginationCustomization(Map<String, String> paginationCustomization)550 public void setPaginationCustomization(Map<String, String> paginationCustomization) { 551 this.paginationCustomization = paginationCustomization; 552 } 553 getUtilitiesMethod()554 public UtilitiesMethod getUtilitiesMethod() { 555 return utilitiesMethod; 556 } 557 setUtilitiesMethod(UtilitiesMethod utilitiesMethod)558 public void setUtilitiesMethod(UtilitiesMethod utilitiesMethod) { 559 this.utilitiesMethod = utilitiesMethod; 560 } 561 562 getAdditionalBuilderMethods()563 public List<AdditionalBuilderMethod> getAdditionalBuilderMethods() { 564 return additionalBuilderMethods; 565 } 566 setAdditionalBuilderMethods(List<AdditionalBuilderMethod> additionalBuilderMethods)567 public void setAdditionalBuilderMethods(List<AdditionalBuilderMethod> additionalBuilderMethods) { 568 this.additionalBuilderMethods = additionalBuilderMethods; 569 } 570 isEnableEndpointDiscoveryMethodRequired()571 public boolean isEnableEndpointDiscoveryMethodRequired() { 572 return enableEndpointDiscoveryMethodRequired; 573 } 574 setEnableEndpointDiscoveryMethodRequired(boolean enableEndpointDiscoveryMethodRequired)575 public void setEnableEndpointDiscoveryMethodRequired(boolean enableEndpointDiscoveryMethodRequired) { 576 this.enableEndpointDiscoveryMethodRequired = enableEndpointDiscoveryMethodRequired; 577 } 578 getS3ArnableFields()579 public Map<String, S3ArnableFieldConfig> getS3ArnableFields() { 580 return s3ArnableFields; 581 } 582 withS3ArnableFields(Map<String, S3ArnableFieldConfig> s3ArnableFields)583 public CustomizationConfig withS3ArnableFields(Map<String, S3ArnableFieldConfig> s3ArnableFields) { 584 this.s3ArnableFields = s3ArnableFields; 585 return this; 586 } 587 setS3ArnableFields(Map<String, S3ArnableFieldConfig> s3ArnableFields)588 public void setS3ArnableFields(Map<String, S3ArnableFieldConfig> s3ArnableFields) { 589 this.s3ArnableFields = s3ArnableFields; 590 } 591 allowEndpointOverrideForEndpointDiscoveryRequiredOperations()592 public boolean allowEndpointOverrideForEndpointDiscoveryRequiredOperations() { 593 return allowEndpointOverrideForEndpointDiscoveryRequiredOperations; 594 } 595 setAllowEndpointOverrideForEndpointDiscoveryRequiredOperations( boolean allowEndpointOverrideForEndpointDiscoveryRequiredOperations)596 public void setAllowEndpointOverrideForEndpointDiscoveryRequiredOperations( 597 boolean allowEndpointOverrideForEndpointDiscoveryRequiredOperations) { 598 this.allowEndpointOverrideForEndpointDiscoveryRequiredOperations = 599 allowEndpointOverrideForEndpointDiscoveryRequiredOperations; 600 } 601 getUseLegacyEventGenerationScheme()602 public Map<String, List<String>> getUseLegacyEventGenerationScheme() { 603 return useLegacyEventGenerationScheme; 604 } 605 setUseLegacyEventGenerationScheme(Map<String, List<String>> useLegacyEventGenerationScheme)606 public void setUseLegacyEventGenerationScheme(Map<String, List<String>> useLegacyEventGenerationScheme) { 607 this.useLegacyEventGenerationScheme = useLegacyEventGenerationScheme; 608 } 609 getUnderscoresInNameBehavior()610 public UnderscoresInNameBehavior getUnderscoresInNameBehavior() { 611 return underscoresInNameBehavior; 612 } 613 setUnderscoresInNameBehavior(UnderscoresInNameBehavior behavior)614 public void setUnderscoresInNameBehavior(UnderscoresInNameBehavior behavior) { 615 this.underscoresInNameBehavior = behavior; 616 } 617 withUnderscoresInShapeNameBehavior(UnderscoresInNameBehavior behavior)618 public CustomizationConfig withUnderscoresInShapeNameBehavior(UnderscoresInNameBehavior behavior) { 619 this.underscoresInNameBehavior = behavior; 620 return this; 621 } 622 getUserAgent()623 public String getUserAgent() { 624 return userAgent; 625 } 626 setUserAgent(String userAgent)627 public void setUserAgent(String userAgent) { 628 this.userAgent = userAgent; 629 } 630 withUserAgent(String userAgent)631 public CustomizationConfig withUserAgent(String userAgent) { 632 this.userAgent = userAgent; 633 return this; 634 } 635 getDefaultRetryMode()636 public RetryMode getDefaultRetryMode() { 637 return defaultRetryMode; 638 } 639 setDefaultRetryMode(RetryMode defaultRetryMode)640 public void setDefaultRetryMode(RetryMode defaultRetryMode) { 641 this.defaultRetryMode = defaultRetryMode; 642 } 643 getServiceConfig()644 public ServiceConfig getServiceConfig() { 645 return serviceConfig; 646 } 647 setServiceConfig(ServiceConfig serviceConfig)648 public void setServiceConfig(ServiceConfig serviceConfig) { 649 this.serviceConfig = serviceConfig; 650 } 651 isDelegateAsyncClientClass()652 public boolean isDelegateAsyncClientClass() { 653 return delegateAsyncClientClass; 654 } 655 setDelegateAsyncClientClass(boolean delegateAsyncClientClass)656 public void setDelegateAsyncClientClass(boolean delegateAsyncClientClass) { 657 this.delegateAsyncClientClass = delegateAsyncClientClass; 658 } 659 getSyncClientDecorator()660 public String getSyncClientDecorator() { 661 return syncClientDecorator; 662 } 663 setSyncClientDecorator(String syncClientDecorator)664 public void setSyncClientDecorator(String syncClientDecorator) { 665 this.syncClientDecorator = syncClientDecorator; 666 } 667 getAsyncClientDecorator()668 public String getAsyncClientDecorator() { 669 return asyncClientDecorator; 670 } 671 setAsyncClientDecorator(String asyncClientDecorator)672 public void setAsyncClientDecorator(String asyncClientDecorator) { 673 this.asyncClientDecorator = asyncClientDecorator; 674 } 675 isDelegateSyncClientClass()676 public boolean isDelegateSyncClientClass() { 677 return delegateSyncClientClass; 678 } 679 setDelegateSyncClientClass(boolean delegateSyncClientClass)680 public void setDelegateSyncClientClass(boolean delegateSyncClientClass) { 681 this.delegateSyncClientClass = delegateSyncClientClass; 682 } 683 isSkipEndpointTestGeneration()684 public boolean isSkipEndpointTestGeneration() { 685 return skipEndpointTestGeneration; 686 } 687 setSkipEndpointTestGeneration(boolean skipEndpointTestGeneration)688 public void setSkipEndpointTestGeneration(boolean skipEndpointTestGeneration) { 689 this.skipEndpointTestGeneration = skipEndpointTestGeneration; 690 } 691 isGenerateEndpointClientTests()692 public boolean isGenerateEndpointClientTests() { 693 return generateEndpointClientTests; 694 } 695 setGenerateEndpointClientTests(boolean generateEndpointClientTests)696 public void setGenerateEndpointClientTests(boolean generateEndpointClientTests) { 697 this.generateEndpointClientTests = generateEndpointClientTests; 698 } 699 useGlobalEndpoint()700 public boolean useGlobalEndpoint() { 701 return useGlobalEndpoint; 702 } 703 setUseGlobalEndpoint(boolean useGlobalEndpoint)704 public void setUseGlobalEndpoint(boolean useGlobalEndpoint) { 705 this.useGlobalEndpoint = useGlobalEndpoint; 706 } 707 useS3ExpressSessionAuth()708 public boolean useS3ExpressSessionAuth() { 709 return useS3ExpressSessionAuth; 710 } 711 setUseS3ExpressSessionAuth(boolean useS3ExpressSessionAuth)712 public void setUseS3ExpressSessionAuth(boolean useS3ExpressSessionAuth) { 713 this.useS3ExpressSessionAuth = useS3ExpressSessionAuth; 714 } 715 isEnableGenerateCompiledEndpointRules()716 public boolean isEnableGenerateCompiledEndpointRules() { 717 return enableGenerateCompiledEndpointRules; 718 } 719 setEnableGenerateCompiledEndpointRules(boolean enableGenerateCompiledEndpointRules)720 public void setEnableGenerateCompiledEndpointRules(boolean enableGenerateCompiledEndpointRules) { 721 this.enableGenerateCompiledEndpointRules = enableGenerateCompiledEndpointRules; 722 } 723 getSkipEndpointTests()724 public Map<String, String> getSkipEndpointTests() { 725 return skipEndpointTests; 726 } 727 setSkipEndpointTests(Map<String, String> skipEndpointTests)728 public void setSkipEndpointTests(Map<String, String> skipEndpointTests) { 729 this.skipEndpointTests = skipEndpointTests; 730 } 731 getInterceptors()732 public List<String> getInterceptors() { 733 return interceptors; 734 } 735 setInterceptors(List<String> interceptors)736 public void setInterceptors(List<String> interceptors) { 737 this.interceptors = interceptors; 738 } 739 getInternalPlugins()740 public List<String> getInternalPlugins() { 741 return internalPlugins; 742 } 743 setInternalPlugins(List<String> internalPlugins)744 public void setInternalPlugins(List<String> internalPlugins) { 745 this.internalPlugins = internalPlugins; 746 } 747 isRequiredTraitValidationEnabled()748 public boolean isRequiredTraitValidationEnabled() { 749 return requiredTraitValidationEnabled; 750 } 751 setRequiredTraitValidationEnabled(boolean requiredTraitValidationEnabled)752 public void setRequiredTraitValidationEnabled(boolean requiredTraitValidationEnabled) { 753 this.requiredTraitValidationEnabled = requiredTraitValidationEnabled; 754 } 755 setUseSraAuth(boolean useSraAuth)756 public void setUseSraAuth(boolean useSraAuth) { 757 this.useSraAuth = useSraAuth; 758 } 759 760 // TODO(post-sra-identity-auth): Remove this customization and all related switching logic, keeping only the 761 // useSraAuth==true branch going forward. useSraAuth()762 public boolean useSraAuth() { 763 return useSraAuth; 764 } 765 setEnableEndpointAuthSchemeParams(boolean enableEndpointAuthSchemeParams)766 public void setEnableEndpointAuthSchemeParams(boolean enableEndpointAuthSchemeParams) { 767 this.enableEndpointAuthSchemeParams = enableEndpointAuthSchemeParams; 768 } 769 isEnableEndpointAuthSchemeParams()770 public boolean isEnableEndpointAuthSchemeParams() { 771 return enableEndpointAuthSchemeParams; 772 } 773 setAllowedEndpointAuthSchemeParams(List<String> allowedEndpointAuthSchemeParams)774 public void setAllowedEndpointAuthSchemeParams(List<String> allowedEndpointAuthSchemeParams) { 775 this.allowedEndpointAuthSchemeParamsConfigured = true; 776 this.allowedEndpointAuthSchemeParams = allowedEndpointAuthSchemeParams; 777 } 778 getAllowedEndpointAuthSchemeParams()779 public List<String> getAllowedEndpointAuthSchemeParams() { 780 return this.allowedEndpointAuthSchemeParams; 781 } 782 getAllowedEndpointAuthSchemeParamsConfigured()783 public boolean getAllowedEndpointAuthSchemeParamsConfigured() { 784 return allowedEndpointAuthSchemeParamsConfigured; 785 } 786 getCustomClientContextParams()787 public Map<String, ClientContextParam> getCustomClientContextParams() { 788 return customClientContextParams; 789 } 790 setCustomClientContextParams(Map<String, ClientContextParam> customClientContextParams)791 public void setCustomClientContextParams(Map<String, ClientContextParam> customClientContextParams) { 792 this.customClientContextParams = customClientContextParams; 793 } 794 getS3ExpressAuthSupport()795 public boolean getS3ExpressAuthSupport() { 796 return s3ExpressAuthSupport; 797 } 798 setS3ExpressAuthSupport(boolean s3ExpressAuthSupport)799 public void setS3ExpressAuthSupport(boolean s3ExpressAuthSupport) { 800 this.s3ExpressAuthSupport = s3ExpressAuthSupport; 801 } 802 getMultipartCustomization()803 public MultipartCustomization getMultipartCustomization() { 804 return this.multipartCustomization; 805 } 806 setMultipartCustomization(MultipartCustomization multipartCustomization)807 public void setMultipartCustomization(MultipartCustomization multipartCustomization) { 808 this.multipartCustomization = multipartCustomization; 809 } 810 getEndpointAuthSchemeConfig()811 public EndpointAuthSchemeConfig getEndpointAuthSchemeConfig() { 812 return endpointAuthSchemeConfig; 813 } 814 setEndpointAuthSchemeConfig(EndpointAuthSchemeConfig endpointAuthSchemeConfig)815 public void setEndpointAuthSchemeConfig(EndpointAuthSchemeConfig endpointAuthSchemeConfig) { 816 this.endpointAuthSchemeConfig = endpointAuthSchemeConfig; 817 } 818 getRootPackageName()819 public String getRootPackageName() { 820 return rootPackageName; 821 } 822 setRootPackageName(String rootPackageName)823 public void setRootPackageName(String rootPackageName) { 824 this.rootPackageName = rootPackageName; 825 } 826 withRootPackageName(String packageName)827 public CustomizationConfig withRootPackageName(String packageName) { 828 this.rootPackageName = packageName; 829 return this; 830 } 831 } 832