public class UsageConfigAspect extends RuleBasedConfigAspect<com.google.api.UsageRule,com.google.api.UsageRule>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BILLING_REQUIREMENT |
static java.lang.String |
TOS_REQUIREMENT_PREFIX |
static java.lang.String |
UTOS_REQUIREMENT |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToRuleBuilder(com.google.api.Service.Builder builder,
java.lang.String selector,
com.google.api.UsageRule binding)
Adds a rule back to the rule builder, specialized for the given selector.
|
protected void |
clearRuleBuilder(com.google.api.Service.Builder builder)
Clears the rule builder during normalization.
|
static ConfigAspectBase |
create(Model model)
Creates usage config aspect.
|
protected com.google.api.UsageRule |
evaluate(ProtoElement element,
com.google.api.UsageRule rule,
boolean isFromIdl)
Evaluates the rule w.r.t.
|
protected boolean |
isApplicable(ProtoElement element)
Predicate determining whether a rule of the aspect is applicable to the element.
|
java.util.List<java.lang.Class<? extends ConfigAspect>> |
mergeDependencies()
Returns an empty list since this aspect does not depend on any other aspects.
|
void |
startMerging()
Default implementation of starting merge; does nothing.
|
void |
startNormalization(com.google.api.Service.Builder builder)
Default implementation of starting normalization; does nothing.
|
endMerging, fromIdlLayer, merge, normalizeasDiagCollector, endLinting, endNormalization, error, getAspectName, getDocumentation, getDocumentationTitle, getLintRuleNames, getLocationInConfig, getLocationOfRepeatedFieldInConfig, getModel, lint, lintWarning, registerLintRule, registerLintRuleName, startLinting, warningpublic static final java.lang.String BILLING_REQUIREMENT
public static final java.lang.String TOS_REQUIREMENT_PREFIX
public static final java.lang.String UTOS_REQUIREMENT
public static ConfigAspectBase create(Model model)
public java.util.List<java.lang.Class<? extends ConfigAspect>> mergeDependencies()
public void startMerging()
ConfigAspectBasestartMerging in interface ConfigAspectstartMerging in class ConfigAspectBasepublic void startNormalization(com.google.api.Service.Builder builder)
ConfigAspectBasestartNormalization in interface ConfigAspectstartNormalization in class RuleBasedConfigAspect<com.google.api.UsageRule,com.google.api.UsageRule>protected boolean isApplicable(ProtoElement element)
RuleBasedConfigAspectisApplicable in class RuleBasedConfigAspect<com.google.api.UsageRule,com.google.api.UsageRule>protected void clearRuleBuilder(com.google.api.Service.Builder builder)
RuleBasedConfigAspectclearRuleBuilder in class RuleBasedConfigAspect<com.google.api.UsageRule,com.google.api.UsageRule>protected void addToRuleBuilder(com.google.api.Service.Builder builder,
java.lang.String selector,
com.google.api.UsageRule binding)
RuleBasedConfigAspectaddToRuleBuilder in class RuleBasedConfigAspect<com.google.api.UsageRule,com.google.api.UsageRule>protected com.google.api.UsageRule evaluate(ProtoElement element, com.google.api.UsageRule rule, boolean isFromIdl)
RuleBasedConfigAspectevaluate in class RuleBasedConfigAspect<com.google.api.UsageRule,com.google.api.UsageRule>