Class DefaultNamingStrategy
- java.lang.Object
-
- software.amazon.awssdk.codegen.naming.DefaultNamingStrategy
-
- All Implemented Interfaces:
NamingStrategy
public class DefaultNamingStrategy extends Object implements NamingStrategy
Default implementation of naming strategy respecting.
-
-
Constructor Summary
Constructors Constructor Description DefaultNamingStrategy(ServiceModel serviceModel, CustomizationConfig customizationConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthSchemePackageName(String serviceName)Retrieve the auth scheme package name that should be used based on the service name.StringgetBatchManagerPackageName(String serviceName)Retrieve the batchManager package name that should be used based on the service name.StringgetBeanStyleGetterMethodName(String memberName, Shape parentShape, Shape c2jShape)StringgetBeanStyleSetterMethodName(String memberName, Shape parentShape, Shape c2jShape)StringgetClientPackageName(String serviceName)Retrieve the client package name that should be used based on the service name.StringgetEndpointRulesPackageName(String serviceName)Retrieve the endpoint rules package name that should be used based on the service name.StringgetEnumValueName(String enumValue)StringgetExceptionName(String errorShapeName)StringgetExistenceCheckMethodName(String memberName, Shape parentShape)Names a method that would check for existence of the member in the response.StringgetFluentEnumGetterMethodName(String memberName, Shape parentShape, Shape shape)StringgetFluentEnumSetterMethodName(String memberName, Shape parentShape, Shape shape)StringgetFluentGetterMethodName(String memberName, Shape parentShape, Shape shape)StringgetFluentSetterMethodName(String memberName, Shape parentShape, Shape shape)StringgetJmesPathPackageName(String serviceName)Retrieve the path runtime package name that should be used based on the service name.StringgetModelPackageName(String serviceName)Retrieve the model package name that should be used based on the service name.StringgetPaginatorsPackageName(String serviceName)Retrieve the paginators package name that should be used based on the service name.StringgetRequestClassName(String operationName)StringgetRequestTransformPackageName(String serviceName)Retrieve the request transform package name that should be used based on the service name.StringgetResponseClassName(String operationName)StringgetSdkFieldFieldName(MemberModel memberModel)Stuttering is intentional, returns the name of theSdkFieldfield.StringgetServiceName()Retrieve the service name that should be used based on the model.StringgetServiceNameForEnvironmentVariables()Retrieve the service name that should be used for environment variables.StringgetServiceNameForProfileFile()Retrieve the service name that should be used for profile properties.StringgetServiceNameForSystemProperties()Retrieve the service name that should be used for system properties.StringgetShapeClassName(String shapeName)StringgetSigningName()Retrieve the service's signing name that should be used based on the model.StringgetSigningNameForEnvironmentVariables()Retrieve the service's signing name that should be used for environment variables.StringgetSigningNameForSystemProperties()Retrieve the service's signing name that should be used for system properties.StringgetSmokeTestPackageName(String serviceName)Retrieve the smote test package name that should be used based on the service name.StringgetTransformPackageName(String serviceName)Retrieve the transform package name that should be used based on the service name.StringgetUnionEnumTypeName(MemberModel memberModel)Returns the name of the provided member as if it will be included in an enum (as in, when the parent shape is a union and we need to create an enum with each member name in it).StringgetVariableName(String name)StringgetWaitersPackageName(String serviceName)Retrieve the waiters package name that should be used based on the service name.voidvalidateCustomerVisibleNaming(IntermediateModel trimmedModel)Verify the customer-visible naming in the provided intermediate model will compile and is idiomatic to Java.
-
-
-
Constructor Detail
-
DefaultNamingStrategy
public DefaultNamingStrategy(ServiceModel serviceModel, CustomizationConfig customizationConfig)
-
-
Method Detail
-
getServiceName
public String getServiceName()
Description copied from interface:NamingStrategyRetrieve the service name that should be used based on the model.- Specified by:
getServiceNamein interfaceNamingStrategy
-
getServiceNameForEnvironmentVariables
public String getServiceNameForEnvironmentVariables()
Description copied from interface:NamingStrategyRetrieve the service name that should be used for environment variables.- Specified by:
getServiceNameForEnvironmentVariablesin interfaceNamingStrategy
-
getServiceNameForSystemProperties
public String getServiceNameForSystemProperties()
Description copied from interface:NamingStrategyRetrieve the service name that should be used for system properties.- Specified by:
getServiceNameForSystemPropertiesin interfaceNamingStrategy
-
getServiceNameForProfileFile
public String getServiceNameForProfileFile()
Description copied from interface:NamingStrategyRetrieve the service name that should be used for profile properties.- Specified by:
getServiceNameForProfileFilein interfaceNamingStrategy
-
getClientPackageName
public String getClientPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the client package name that should be used based on the service name.- Specified by:
getClientPackageNamein interfaceNamingStrategy
-
getModelPackageName
public String getModelPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the model package name that should be used based on the service name.- Specified by:
getModelPackageNamein interfaceNamingStrategy
-
getTransformPackageName
public String getTransformPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the transform package name that should be used based on the service name.- Specified by:
getTransformPackageNamein interfaceNamingStrategy
-
getRequestTransformPackageName
public String getRequestTransformPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the request transform package name that should be used based on the service name.- Specified by:
getRequestTransformPackageNamein interfaceNamingStrategy
-
getPaginatorsPackageName
public String getPaginatorsPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the paginators package name that should be used based on the service name.- Specified by:
getPaginatorsPackageNamein interfaceNamingStrategy
-
getWaitersPackageName
public String getWaitersPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the waiters package name that should be used based on the service name.- Specified by:
getWaitersPackageNamein interfaceNamingStrategy
-
getEndpointRulesPackageName
public String getEndpointRulesPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the endpoint rules package name that should be used based on the service name.- Specified by:
getEndpointRulesPackageNamein interfaceNamingStrategy
-
getAuthSchemePackageName
public String getAuthSchemePackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the auth scheme package name that should be used based on the service name.- Specified by:
getAuthSchemePackageNamein interfaceNamingStrategy
-
getJmesPathPackageName
public String getJmesPathPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the path runtime package name that should be used based on the service name.- Specified by:
getJmesPathPackageNamein interfaceNamingStrategy
-
getBatchManagerPackageName
public String getBatchManagerPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the batchManager package name that should be used based on the service name.- Specified by:
getBatchManagerPackageNamein interfaceNamingStrategy
-
getSmokeTestPackageName
public String getSmokeTestPackageName(String serviceName)
Description copied from interface:NamingStrategyRetrieve the smote test package name that should be used based on the service name.- Specified by:
getSmokeTestPackageNamein interfaceNamingStrategy
-
getExceptionName
public String getExceptionName(String errorShapeName)
- Specified by:
getExceptionNamein interfaceNamingStrategy- Parameters:
errorShapeName- Name of error shape to derive exception class name from.- Returns:
- Appropriate name to use for a Java exception class name
-
getRequestClassName
public String getRequestClassName(String operationName)
- Specified by:
getRequestClassNamein interfaceNamingStrategy- Parameters:
operationName- Name of operation used to derive request class name.- Returns:
- Appropriate name to use for the Java class representing the request shape.
-
getResponseClassName
public String getResponseClassName(String operationName)
- Specified by:
getResponseClassNamein interfaceNamingStrategy- Parameters:
operationName- Name of operation used to derive response class name.- Returns:
- Appropriate name to use for the Java class representing the response shape.
-
getVariableName
public String getVariableName(String name)
- Specified by:
getVariableNamein interfaceNamingStrategy- Parameters:
name- Some contextual name to derive variable name from (i.e. member name, java class name, etc).- Returns:
- Appropriate name to use for a Java variable or field.
-
getEnumValueName
public String getEnumValueName(String enumValue)
- Specified by:
getEnumValueNamein interfaceNamingStrategy- Parameters:
enumValue- Enum value as defined in the service model used to derive the java name.- Returns:
- Appropriate name to use for a Java enum value
-
getShapeClassName
public String getShapeClassName(String shapeName)
- Specified by:
getShapeClassNamein interfaceNamingStrategy- Parameters:
shapeName- Name of structure used to derive Java class name.- Returns:
- Appropriate name to use for a Java class for an arbitrary (not a request, response, error) structure.
-
getFluentGetterMethodName
public String getFluentGetterMethodName(String memberName, Shape parentShape, Shape shape)
- Specified by:
getFluentGetterMethodNamein interfaceNamingStrategy- Parameters:
memberName- Member name to name getter for.shape- The shape associated with the member.- Returns:
- Name of the getter method for a model class member.
-
getFluentEnumGetterMethodName
public String getFluentEnumGetterMethodName(String memberName, Shape parentShape, Shape shape)
- Specified by:
getFluentEnumGetterMethodNamein interfaceNamingStrategy- Parameters:
memberName- The full member to get the name for.shape- The shape associated with the member.- Returns:
- Name of the getter method for an enum model class member.
-
getExistenceCheckMethodName
public String getExistenceCheckMethodName(String memberName, Shape parentShape)
Description copied from interface:NamingStrategyNames a method that would check for existence of the member in the response.- Specified by:
getExistenceCheckMethodNamein interfaceNamingStrategy- Parameters:
memberName- The member name to get the method name for.parentShape- The shape containing the member.- Returns:
- Name of an existence check method.
-
getBeanStyleGetterMethodName
public String getBeanStyleGetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
- Specified by:
getBeanStyleGetterMethodNamein interfaceNamingStrategy- Parameters:
memberName- Member name to name getter for.- Returns:
- Name of the JavaBean getter method for model class member.
-
getBeanStyleSetterMethodName
public String getBeanStyleSetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
- Specified by:
getBeanStyleSetterMethodNamein interfaceNamingStrategy- Parameters:
memberName- Member name to name setter for.- Returns:
- Name of the JavaBean setter method for model class member.
-
getFluentSetterMethodName
public String getFluentSetterMethodName(String memberName, Shape parentShape, Shape shape)
- Specified by:
getFluentSetterMethodNamein interfaceNamingStrategy- Parameters:
memberName- Member name to name fluent setter for.- Returns:
- Appropriate name to use for fluent setter method (i.e. withFoo) for a model class member.
-
getFluentEnumSetterMethodName
public String getFluentEnumSetterMethodName(String memberName, Shape parentShape, Shape shape)
- Specified by:
getFluentEnumSetterMethodNamein interfaceNamingStrategy- Parameters:
memberName- The full member to get the name for.shape- The shape associated with the member.- Returns:
- Name of the getter method for an enum model class member.
-
getSdkFieldFieldName
public String getSdkFieldFieldName(MemberModel memberModel)
Description copied from interface:NamingStrategyStuttering is intentional, returns the name of theSdkFieldfield.- Specified by:
getSdkFieldFieldNamein interfaceNamingStrategy- Parameters:
memberModel- Member to generate field name for.- Returns:
- Name of field for
SdkFieldpojo.
-
getUnionEnumTypeName
public String getUnionEnumTypeName(MemberModel memberModel)
Description copied from interface:NamingStrategyReturns the name of the provided member as if it will be included in an enum (as in, when the parent shape is a union and we need to create an enum with each member name in it).- Specified by:
getUnionEnumTypeNamein interfaceNamingStrategy- Parameters:
memberModel- Member to generate the union enum type name for.
-
getSigningName
public String getSigningName()
Description copied from interface:NamingStrategyRetrieve the service's signing name that should be used based on the model.- Specified by:
getSigningNamein interfaceNamingStrategy
-
getSigningNameForEnvironmentVariables
public String getSigningNameForEnvironmentVariables()
Description copied from interface:NamingStrategyRetrieve the service's signing name that should be used for environment variables.- Specified by:
getSigningNameForEnvironmentVariablesin interfaceNamingStrategy
-
getSigningNameForSystemProperties
public String getSigningNameForSystemProperties()
Description copied from interface:NamingStrategyRetrieve the service's signing name that should be used for system properties.- Specified by:
getSigningNameForSystemPropertiesin interfaceNamingStrategy
-
validateCustomerVisibleNaming
public void validateCustomerVisibleNaming(IntermediateModel trimmedModel)
Description copied from interface:NamingStrategyVerify the customer-visible naming in the provided intermediate model will compile and is idiomatic to Java.- Specified by:
validateCustomerVisibleNamingin interfaceNamingStrategy
-
-