-
Notifications
You must be signed in to change notification settings - Fork 2.1k
AI Face beta2 #42239
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
Merged
Merged
AI Face beta2 #42239
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c6f81d0
update commitId to spec
weidongxu-microsoft 3f5536a
empty customization java
weidongxu-microsoft dc2ad77
generate code
weidongxu-microsoft 86ab1ea
customization
weidongxu-microsoft a101737
Merge remote-tracking branch 'upstream/main' into hachiang/face-beta2
Han-msft c054c41
Regen
Han-msft 7399475
remove generated test and sample
Han-msft 0d51be0
Add face customization
Han-msft ece6d90
Add sample
Han-msft bdc4de1
Refine sample
Han-msft 18e4324
Disable test and sample generation
Han-msft d841d6d
Switch sample to token cred
Han-msft 5b1f949
Remove unused import
Han-msft 9617727
Refine administration client doc
Han-msft c220b64
Update tsp commit and changelog
Han-msft 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,21 @@ | ||
| <?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"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <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> | ||
|
|
||
| <name>Microsoft Azure Face client for Java</name> | ||
| <description>This package contains client customization for Microsoft Azure Face</description> | ||
|
|
||
| <groupId>com.azure.tools</groupId> | ||
| <artifactId>azure-face-customization</artifactId> | ||
| <version>1.0.0-beta.1</version> | ||
| <packaging>jar</packaging> | ||
| </project> |
33 changes: 33 additions & 0 deletions
33
sdk/face/azure-ai-vision-face/customization/src/main/java/FaceCustomizations.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,33 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import com.azure.autorest.customization.ClassCustomization; | ||
| import com.azure.autorest.customization.Customization; | ||
| import com.azure.autorest.customization.LibraryCustomization; | ||
| import org.slf4j.Logger; | ||
|
|
||
| import java.lang.reflect.Modifier; | ||
| import java.util.Arrays; | ||
Han-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| /** | ||
| * This class contains the customization code to customize the AutoRest generated code for OpenAI. | ||
| */ | ||
| public class FaceCustomizations extends Customization { | ||
|
|
||
| @Override | ||
| public void customize(LibraryCustomization customization, Logger logger) { | ||
| ClassCustomization classCustomization = customization.getClass( | ||
| "com.azure.ai.vision.face.administration", | ||
| "FaceAdministrationClientBuilder"); | ||
|
|
||
| classCustomization.removeAnnotation("@ServiceClientBuilder"); | ||
| classCustomization.addAnnotation("@ServiceClientBuilder(\n" + | ||
| " serviceClients = {\n" + | ||
| " FaceAdministrationClient.class,\n" + | ||
| " FaceAdministrationAsyncClient.class,\n" + | ||
| " LargeFaceListClient.class,\n" + | ||
| " LargePersonGroupClient.class,\n" + | ||
| " LargeFaceListAsyncClient.class,\n" + | ||
| " LargePersonGroupAsyncClient.class })"); | ||
| } | ||
| } | ||
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.