public class DefaultNamingStrategy extends Object implements NamingStrategy
Constructor and Description |
---|
DefaultNamingStrategy(ServiceModel serviceModel,
CustomizationConfig customizationConfig) |
Modifier and Type | Method and Description |
---|---|
String |
getAuthSchemePackageName(String serviceName)
Retrieve the auth scheme 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 |
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 the
SdkField field. |
String |
getServiceName()
Retrieve the service name that should be used based on the model.
|
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.
|
public DefaultNamingStrategy(ServiceModel serviceModel, CustomizationConfig customizationConfig)
public String getServiceName()
NamingStrategy
getServiceName
in interface NamingStrategy
public String getClientPackageName(String serviceName)
NamingStrategy
getClientPackageName
in interface NamingStrategy
public String getModelPackageName(String serviceName)
NamingStrategy
getModelPackageName
in interface NamingStrategy
public String getTransformPackageName(String serviceName)
NamingStrategy
getTransformPackageName
in interface NamingStrategy
public String getRequestTransformPackageName(String serviceName)
NamingStrategy
getRequestTransformPackageName
in interface NamingStrategy
public String getPaginatorsPackageName(String serviceName)
NamingStrategy
getPaginatorsPackageName
in interface NamingStrategy
public String getWaitersPackageName(String serviceName)
NamingStrategy
getWaitersPackageName
in interface NamingStrategy
public String getEndpointRulesPackageName(String serviceName)
NamingStrategy
getEndpointRulesPackageName
in interface NamingStrategy
public String getAuthSchemePackageName(String serviceName)
NamingStrategy
getAuthSchemePackageName
in interface NamingStrategy
public String getSmokeTestPackageName(String serviceName)
NamingStrategy
getSmokeTestPackageName
in interface NamingStrategy
public String getExceptionName(String errorShapeName)
getExceptionName
in interface NamingStrategy
errorShapeName
- Name of error shape to derive exception class name from.public String getRequestClassName(String operationName)
getRequestClassName
in interface NamingStrategy
operationName
- Name of operation used to derive request class name.public String getResponseClassName(String operationName)
getResponseClassName
in interface NamingStrategy
operationName
- Name of operation used to derive response class name.public String getVariableName(String name)
getVariableName
in interface NamingStrategy
name
- Some contextual name to derive variable name from (i.e. member name, java class name, etc).public String getEnumValueName(String enumValue)
getEnumValueName
in interface NamingStrategy
enumValue
- Enum value as defined in the service model used to derive the java name.public String getShapeClassName(String shapeName)
getShapeClassName
in interface NamingStrategy
shapeName
- Name of structure used to derive Java class name.public String getFluentGetterMethodName(String memberName, Shape parentShape, Shape shape)
getFluentGetterMethodName
in interface NamingStrategy
memberName
- Member name to name getter for.shape
- The shape associated with the member.public String getFluentEnumGetterMethodName(String memberName, Shape parentShape, Shape shape)
getFluentEnumGetterMethodName
in interface NamingStrategy
memberName
- The full member to get the name for.shape
- The shape associated with the member.public String getExistenceCheckMethodName(String memberName, Shape parentShape)
NamingStrategy
getExistenceCheckMethodName
in interface NamingStrategy
memberName
- The member name to get the method name for.parentShape
- The shape containing the member.public String getBeanStyleGetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
getBeanStyleGetterMethodName
in interface NamingStrategy
memberName
- Member name to name getter for.public String getBeanStyleSetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
getBeanStyleSetterMethodName
in interface NamingStrategy
memberName
- Member name to name setter for.public String getFluentSetterMethodName(String memberName, Shape parentShape, Shape shape)
getFluentSetterMethodName
in interface NamingStrategy
memberName
- Member name to name fluent setter for.public String getFluentEnumSetterMethodName(String memberName, Shape parentShape, Shape shape)
getFluentEnumSetterMethodName
in interface NamingStrategy
memberName
- The full member to get the name for.shape
- The shape associated with the member.public String getSdkFieldFieldName(MemberModel memberModel)
NamingStrategy
SdkField
field.getSdkFieldFieldName
in interface NamingStrategy
memberModel
- Member to generate field name for.SdkField
pojo.public String getUnionEnumTypeName(MemberModel memberModel)
NamingStrategy
getUnionEnumTypeName
in interface NamingStrategy
memberModel
- Member to generate the union enum type name for.public void validateCustomerVisibleNaming(IntermediateModel trimmedModel)
NamingStrategy
validateCustomerVisibleNaming
in interface NamingStrategy
Copyright © 2023. All rights reserved.