Skip to content

Commit

Permalink
Rename Face models and clients (#30354)
Browse files Browse the repository at this point in the history
* Rename models

* Update python pkg version

* Reduce operation
  • Loading branch information
Han-msft authored Sep 9, 2024
1 parent f37031b commit 2ed29f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 79 deletions.
85 changes: 6 additions & 79 deletions specification/ai/Face/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ namespace ClientCustomizations;
@@clientName(GroupingResult, "FaceGroupingResult");
@@clientName(LivenessDecision, "FaceLivenessDecision");
@@clientName(ImageType, "FaceImageType");
@@clientName(OperationStatus, "FaceOperationStatus");
@@clientName(TrainingResult, "FaceTrainingResult");
@@clientName(IdentificationCandidate, "FaceIdentificationCandidate");
@@clientName(IdentificationResult, "FaceIdentificationResult");

@@access(DetectionModel, Access.public);
@@access(RecognitionModel, Access.public);
Expand Down Expand Up @@ -70,52 +74,19 @@ interface FaceClient {
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/group for more details.")
group is FaceRecognitionOperations.group;

@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/find-similar-from-face-list for more details.")
findSimilarFromFaceList is FaceRecognitionOperations.findSimilarFromFaceList;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/find-similar-from-large-face-list for more details.")
findSimilarFromLargeFaceList is FaceRecognitionOperations.findSimilarFromLargeFaceList;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/identify-from-person-group for more details.")
identifyFromPersonGroup is FaceRecognitionOperations.identifyFromPersonGroup;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/identify-from-large-person-group for more details.")
identifyFromLargePersonGroup is FaceRecognitionOperations.identifyFromLargePersonGroup;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/verify-from-person-group for more details.")
verifyFromPersonGroup is FaceRecognitionOperations.verifyFromPersonGroup;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/verify-from-large-person-group for more details.")
verifyFromLargePersonGroup is FaceRecognitionOperations.verifyFromLargePersonGroup;
}

@client({
name: "FaceServiceClient",
name: "FaceAdministrationClient",
service: Face,
})
namespace FaceServiceClient {
@operationGroup
@clientName("FaceListClientImpl", "csharp")
interface FaceList {
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-face-list for more details.")
create is FaceListOperations.createFaceList;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-face-list for more details.")
delete is FaceListOperations.deleteFaceList;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-face-list for more details.")
get is FaceListOperations.getFaceList;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/update-face-list for more details.")
update is FaceListOperations.updateFaceList;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-face-lists for more details.")
getFaceLists is FaceListOperations.getFaceLists;

@access(Access.internal, "java,csharp")
@clientName("addFaceFromUrlImpl", "java,csharp")
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-face-list-face-from-url for more details.")
addFaceFromUrl is FaceListOperations.addFaceListFaceFromUrl;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
@access(Access.internal, "java,csharp")
@clientName("addFaceImpl", "java,csharp")
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-face-list-face for more details.")
addFace is FaceListOperations.addFaceListFace;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/delete-face-list-face for more details.")
deleteFace is FaceListOperations.deleteFaceListFace;
}

namespace FaceAdministrationClient {
@operationGroup
@clientName("LargeFaceListClientImpl", "csharp")
interface LargeFaceList {
Expand Down Expand Up @@ -152,50 +123,6 @@ namespace FaceServiceClient {
getFaces is FaceListOperations.getLargeFaceListFaces;
}

@operationGroup
@clientName("PersonGroupClientImpl", "csharp")
interface PersonGroup {
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-person-group for more details.")
create is PersonGroupOperations.createPersonGroup;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-person-group for more details.")
delete is PersonGroupOperations.deletePersonGroup;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-person-group for more details.")
get is PersonGroupOperations.getPersonGroup;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-person-group for more details.")
update is PersonGroupOperations.updatePersonGroup;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-person-groups for more details.")
getPersonGroups is PersonGroupOperations.getPersonGroups;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-person-group-training-status for more details.")
getTrainingStatus is PersonGroupOperations.getPersonGroupTrainingStatus;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/train-person-group for more details.")
train is PersonGroupOperations.trainPersonGroup;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/create-person-group-person for more details.")
createPerson is PersonGroupOperations.createPersonGroupPerson;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-person-group-person for more details.")
deletePerson is PersonGroupOperations.deletePersonGroupPerson;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-person-group-person for more details.")
getPerson is PersonGroupOperations.getPersonGroupPerson;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-person-group-person for more details.")
updatePerson is PersonGroupOperations.updatePersonGroupPerson;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-person-group-persons for more details.")
getPersons is PersonGroupOperations.getPersonGroupPersons;
@access(Access.internal, "java,csharp")
@clientName("addFaceFromUrlImpl", "java,csharp")
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-person-group-person-face-from-url for more details.")
addFaceFromUrl is PersonGroupOperations.addPersonGroupPersonFaceFromUrl;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
@access(Access.internal, "java,csharp")
@clientName("addFaceImpl", "java,csharp")
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-person-group-person-face for more details.")
addFace is PersonGroupOperations.addPersonGroupPersonFace;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/delete-person-group-person-face for more details.")
deleteFace is PersonGroupOperations.deletePersonGroupPersonFace;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-person-group-person-face for more details.")
getFace is PersonGroupOperations.getPersonGroupPersonFace;
@doc("Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/update-person-group-person-face for more details.")
updateFace is PersonGroupOperations.updatePersonGroupPersonFace;
}

@operationGroup
@clientName("LargePersonGroupClientImpl", "csharp")
interface LargePersonGroup {
Expand Down
1 change: 1 addition & 0 deletions specification/ai/Face/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ options:
"@azure-tools/typespec-python":
package-dir: "azure-ai-vision-face"
package-name: "{package-dir}"
package-version: 1.0.0b2
package-mode: dataplane
flavor: azure
generate-test: true
Expand Down

0 comments on commit 2ed29f6

Please sign in to comment.