Skip to content

Commit

Permalink
Revert "temp: introduce generated code changes from removing classify…
Browse files Browse the repository at this point in the history
…Text method"

This reverts commit 71b6f95.
  • Loading branch information
emmileaf committed May 8, 2023
1 parent 71b6f95 commit a683a99
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ public LanguageServiceSettings languageServiceSettings(
clientSettingsBuilder.analyzeSyntaxSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.analyzeSyntaxSettings().setRetrySettings(analyzeSyntaxRetrySettings);

RetrySettings classifyTextRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.classifyTextSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.classifyTextSettings().setRetrySettings(classifyTextRetrySettings);

RetrySettings annotateTextRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.annotateTextSettings().getRetrySettings(), serviceRetry);
Expand Down Expand Up @@ -244,6 +249,16 @@ public LanguageServiceSettings languageServiceSettings(
LOGGER.trace("Configured method-level retry settings for analyzeSyntax from properties.");
}
}
Retry classifyTextRetry = clientProperties.getClassifyTextRetry();
if (classifyTextRetry != null) {
RetrySettings classifyTextRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.classifyTextSettings().getRetrySettings(), classifyTextRetry);
clientSettingsBuilder.classifyTextSettings().setRetrySettings(classifyTextRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for classifyText from properties.");
}
}
Retry annotateTextRetry = clientProperties.getAnnotateTextRetry();
if (annotateTextRetry != null) {
RetrySettings annotateTextRetrySettings =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public class LanguageServiceSpringProperties implements CredentialsSupplier {
* precedence over service-level retry configurations for that RPC method.
*/
@NestedConfigurationProperty private Retry analyzeSyntaxRetry;
/**
* Allow override of retry settings at method-level for classifyText. If defined, this takes
* precedence over service-level retry configurations for that RPC method.
*/
@NestedConfigurationProperty private Retry classifyTextRetry;
/**
* Allow override of retry settings at method-level for annotateText. If defined, this takes
* precedence over service-level retry configurations for that RPC method.
Expand Down Expand Up @@ -139,6 +144,14 @@ public void setAnalyzeSyntaxRetry(Retry analyzeSyntaxRetry) {
this.analyzeSyntaxRetry = analyzeSyntaxRetry;
}

public Retry getClassifyTextRetry() {
return this.classifyTextRetry;
}

public void setClassifyTextRetry(Retry classifyTextRetry) {
this.classifyTextRetry = classifyTextRetry;
}

public Retry getAnnotateTextRetry() {
return this.annotateTextRetry;
}
Expand Down

0 comments on commit a683a99

Please sign in to comment.