Interface NamingStrategy
-
- All Known Implementing Classes:
DefaultNamingStrategy
public interface NamingStrategy
Strategy to name various Java constructs based on the naming in the model and potentially customizations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getAuthSchemePackageName(String serviceName)
Retrieve the auth scheme package name that should be used based on the service name.String
getBatchManagerPackageName(String serviceName)
Retrieve the batchManager package name that should be used based on the service name.String
getBeanStyleGetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
String
getBeanStyleSetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
String
getClientPackageName(String serviceName)
Retrieve the client package name that should be used based on the service name.String
getEndpointRulesPackageName(String serviceName)
Retrieve the endpoint rules package name that should be used based on the service name.String
getEnumValueName(String enumValue)
String
getExceptionName(String errorShapeName)
String
getExistenceCheckMethodName(String memberName, Shape parentShape)
Names a method that would check for existence of the member in the response.String
getFluentEnumGetterMethodName(String memberName, Shape parentShape, Shape shape)
String
getFluentEnumSetterMethodName(String memberName, Shape parentShape, Shape shape)
String
getFluentGetterMethodName(String memberName, Shape parentShape, Shape shape)
String
getFluentSetterMethodName(String memberName, Shape parentShape, Shape shape)
String
getJmesPathPackageName(String serviceName)
Retrieve the path runtime package name that should be used based on the service name.String
getModelPackageName(String serviceName)
Retrieve the model package name that should be used based on the service name.String
getPaginatorsPackageName(String serviceName)
Retrieve the paginators package name that should be used based on the service name.String
getRequestClassName(String operationName)
String
getRequestTransformPackageName(String serviceName)
Retrieve the request transform package name that should be used based on the service name.String
getResponseClassName(String operationName)
String
getSdkFieldFieldName(MemberModel memberModel)
Stuttering is intentional, returns the name of theSdkField
field.String
getServiceName()
Retrieve the service name that should be used based on the model.String
getServiceNameForEnvironmentVariables()
Retrieve the service name that should be used for environment variables.String
getServiceNameForProfileFile()
Retrieve the service name that should be used for profile properties.String
getServiceNameForSystemProperties()
Retrieve the service name that should be used for system properties.String
getShapeClassName(String shapeName)
String
getSmokeTestPackageName(String serviceName)
Retrieve the smote test package name that should be used based on the service name.String
getTransformPackageName(String serviceName)
Retrieve the transform package name that should be used based on the service name.String
getUnionEnumTypeName(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).String
getVariableName(String name)
String
getWaitersPackageName(String serviceName)
Retrieve the waiters package name that should be used based on the service name.void
validateCustomerVisibleNaming(IntermediateModel trimmedModel)
Verify the customer-visible naming in the provided intermediate model will compile and is idiomatic to Java.
-
-
-
Method Detail
-
getServiceName
String getServiceName()
Retrieve the service name that should be used based on the model.
-
getServiceNameForEnvironmentVariables
String getServiceNameForEnvironmentVariables()
Retrieve the service name that should be used for environment variables.
-
getServiceNameForSystemProperties
String getServiceNameForSystemProperties()
Retrieve the service name that should be used for system properties.
-
getServiceNameForProfileFile
String getServiceNameForProfileFile()
Retrieve the service name that should be used for profile properties.
-
getClientPackageName
String getClientPackageName(String serviceName)
Retrieve the client package name that should be used based on the service name.
-
getModelPackageName
String getModelPackageName(String serviceName)
Retrieve the model package name that should be used based on the service name.
-
getTransformPackageName
String getTransformPackageName(String serviceName)
Retrieve the transform package name that should be used based on the service name.
-
getRequestTransformPackageName
String getRequestTransformPackageName(String serviceName)
Retrieve the request transform package name that should be used based on the service name.
-
getPaginatorsPackageName
String getPaginatorsPackageName(String serviceName)
Retrieve the paginators package name that should be used based on the service name.
-
getWaitersPackageName
String getWaitersPackageName(String serviceName)
Retrieve the waiters package name that should be used based on the service name.
-
getEndpointRulesPackageName
String getEndpointRulesPackageName(String serviceName)
Retrieve the endpoint rules package name that should be used based on the service name.
-
getAuthSchemePackageName
String getAuthSchemePackageName(String serviceName)
Retrieve the auth scheme package name that should be used based on the service name.
-
getJmesPathPackageName
String getJmesPathPackageName(String serviceName)
Retrieve the path runtime package name that should be used based on the service name.
-
getBatchManagerPackageName
String getBatchManagerPackageName(String serviceName)
Retrieve the batchManager package name that should be used based on the service name.
-
getSmokeTestPackageName
String getSmokeTestPackageName(String serviceName)
Retrieve the smote test package name that should be used based on the service name.
-
getExceptionName
String getExceptionName(String errorShapeName)
- Parameters:
errorShapeName
- Name of error shape to derive exception class name from.- Returns:
- Appropriate name to use for a Java exception class name
-
getRequestClassName
String getRequestClassName(String operationName)
- 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
String getResponseClassName(String operationName)
- 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
String getVariableName(String name)
- 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
String getEnumValueName(String enumValue)
- 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
String getShapeClassName(String shapeName)
- 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
String getFluentGetterMethodName(String memberName, Shape parentShape, Shape shape)
- 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
String getFluentEnumGetterMethodName(String memberName, Shape parentShape, Shape shape)
- 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.
-
getBeanStyleGetterMethodName
String getBeanStyleGetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
- Parameters:
memberName
- Member name to name getter for.- Returns:
- Name of the JavaBean getter method for model class member.
-
getBeanStyleSetterMethodName
String getBeanStyleSetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
- Parameters:
memberName
- Member name to name setter for.- Returns:
- Name of the JavaBean setter method for model class member.
-
getFluentSetterMethodName
String getFluentSetterMethodName(String memberName, Shape parentShape, Shape shape)
- 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
String getFluentEnumSetterMethodName(String memberName, Shape parentShape, Shape shape)
- 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
String getSdkFieldFieldName(MemberModel memberModel)
Stuttering is intentional, returns the name of theSdkField
field.- Parameters:
memberModel
- Member to generate field name for.- Returns:
- Name of field for
SdkField
pojo.
-
getUnionEnumTypeName
String getUnionEnumTypeName(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).- Parameters:
memberModel
- Member to generate the union enum type name for.
-
getExistenceCheckMethodName
String getExistenceCheckMethodName(String memberName, Shape parentShape)
Names a method that would check for existence of the member in the response.- Parameters:
memberName
- The member name to get the method name for.parentShape
- The shape containing the member.- Returns:
- Name of an existence check method.
-
validateCustomerVisibleNaming
void validateCustomerVisibleNaming(IntermediateModel trimmedModel)
Verify the customer-visible naming in the provided intermediate model will compile and is idiomatic to Java.
-
-