-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[AutoPR azure-resourcemanager-monitor-slis]-generated-from-SDK Generation - Java-6342625 #49251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
azure-sdk
wants to merge
14
commits into
main
Choose a base branch
from
sdkauto/azure-resourcemanager-monitor-slis-6342625
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f270e75
Configurations: 'specification/monitoringservice/resource-manager/Mi…
azure-sdk 5d89ed0
Layered CRUD recording-based test scaffolding on auto-regen PR
saleelpk 968071d
Skip Monitor SLIs live test in playback
Copilot 2dc3bf7
Update SLI live test to use real AKS Prometheus metric
saleelpk c48ec89
Add record/playback support to SLI CRUD test
saleelpk 437c0fc
Address review: expand CHANGELOG and use {@code} in JavaDoc
saleelpk f9ee678
Ensure SLI review fixes survive code generation
saleelpk 95a7fd8
Point Monitor SLIs generation to Java customization config
saleelpk 197a83a
Align SLI JavaDoc formatting with regeneration
saleelpk 5e19002
Add ConditionValues utility for in/notin list operators
saleelpk 0b3761f
Revert "Add ConditionValues utility for in/notin list operators"
saleelpk d56b193
Merge branch 'main' into sdkauto/azure-resourcemanager-monitor-slis-6…
saleelpk 3ffd49c
Merge branch 'main' into sdkauto/azure-resourcemanager-monitor-slis-6…
saleelpk 4c28b35
Merge branch 'main' into sdkauto/azure-resourcemanager-monitor-slis-6…
saleelpk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "AssetsRepo": "Azure/azure-sdk-assets", | ||
| "AssetsRepoPrefixPath": "java", | ||
| "TagPrefix": "java/monitor/azure-resourcemanager-monitor-slis", | ||
| "Tag": "java/monitor/azure-resourcemanager-monitor-slis_7b447d0598" | ||
| } |
17 changes: 17 additions & 0 deletions
17
sdk/monitor/azure-resourcemanager-monitor-slis/customization/pom.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
|
||
| <parent> | ||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-code-customization-parent</artifactId> | ||
| <version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-code-customization-parent;current} --> | ||
| <relativePath>../../../parents/azure-code-customization-parent</relativePath> | ||
| </parent> | ||
|
|
||
| <groupId>com.azure.resourcemanager</groupId> | ||
| <artifactId>azure-resourcemanager-monitor-slis-customization</artifactId> | ||
| <version>1.0.0-beta.1</version> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| </project> |
42 changes: 42 additions & 0 deletions
42
...re-resourcemanager-monitor-slis/customization/src/main/java/MonitorSlisCustomization.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import com.azure.autorest.customization.Customization; | ||
| import com.azure.autorest.customization.Editor; | ||
| import com.azure.autorest.customization.LibraryCustomization; | ||
| import org.slf4j.Logger; | ||
|
|
||
| /** | ||
| * Code customization after code generation. | ||
| */ | ||
| public class MonitorSlisCustomization extends Customization { | ||
| @Override | ||
| public void customize(LibraryCustomization customization, Logger logger) { | ||
| Editor editor = customization.getRawEditor(); | ||
| customizeConditionOperator(editor); | ||
| customizeCondition(editor); | ||
| } | ||
|
|
||
| private static void customizeConditionOperator(Editor editor) { | ||
| String fileName = "src/main/java/com/azure/resourcemanager/monitor/slis/models/ConditionOperator.java"; | ||
| String fileContent = editor.getFileContent(fileName) | ||
| .replace("Matches when `value` is one of the items in the `^^`-delimited list (for example, `value` = \"east^^west^^north\").", | ||
| "Matches when {@code value} is one of the items in the {@code ^^}-delimited list (for example, {@code value} = \"east^^west^^north\").") | ||
| .replace("Matches when `value` is none of the items in the `^^`-delimited list (for example, `value` =", | ||
| "Matches when {@code value} is none of the items in the {@code ^^}-delimited list (for example, {@code value} ="); | ||
|
|
||
| editor.replaceFile(fileName, fileContent); | ||
| } | ||
|
|
||
| private static void customizeCondition(Editor editor) { | ||
| String fileName = "src/main/java/com/azure/resourcemanager/monitor/slis/models/Condition.java"; | ||
| String fileContent = editor.getFileContent(fileName) | ||
| .replace("`in`", "{@code in}") | ||
| .replace("`notin`", "{@code notin}") | ||
| .replace("`^^`", "{@code ^^}") | ||
| .replace("Get the value property:", "Get the {@code value} property:") | ||
| .replace("Set the value property:", "Set the {@code value} property:"); | ||
|
|
||
| editor.replaceFile(fileName, fileContent); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.