Skip to content

Commit

Permalink
CodeGen from PR 13394 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Fix broken links (Azure#13394)

* Replace relative paths with absolute paths

* Fix two more broken links.

* Fix another one

* Remove en-us from link

Co-authored-by: Zhi Zhou <zhizho@microsoft.com>
  • Loading branch information
SDKAuto and Zhi Zhou committed Mar 12, 2021
1 parent a2ec4c6 commit b6aa968
Show file tree
Hide file tree
Showing 11 changed files with 311 additions and 329 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from ._models_py3 import LargeFaceList
from ._models_py3 import LargePersonGroup
from ._models_py3 import Makeup
from ._models_py3 import Mask
from ._models_py3 import MetaDataContract
from ._models_py3 import NameAndUserDataContract
from ._models_py3 import Noise
Expand Down Expand Up @@ -82,6 +83,7 @@
from ._models import LargeFaceList
from ._models import LargePersonGroup
from ._models import Makeup
from ._models import Mask
from ._models import MetaDataContract
from ._models import NameAndUserDataContract
from ._models import Noise
Expand Down Expand Up @@ -109,6 +111,7 @@
Gender,
GlassesType,
HairColorType,
MaskType,
NoiseLevel,
OperationStatusType,
RecognitionModel,
Expand Down Expand Up @@ -145,6 +148,7 @@
'LargeFaceList',
'LargePersonGroup',
'Makeup',
'Mask',
'MetaDataContract',
'NameAndUserDataContract',
'Noise',
Expand All @@ -170,6 +174,7 @@
'BlurLevel',
'ExposureLevel',
'NoiseLevel',
'MaskType',
'FindSimilarMatchMode',
'TrainingStatusType',
'SnapshotApplyMode',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class RecognitionModel(str, Enum):

recognition_01 = "recognition_01"
recognition_02 = "recognition_02"
recognition_03 = "recognition_03"
recognition_04 = "recognition_04"


class Gender(str, Enum):
Expand Down Expand Up @@ -72,6 +74,14 @@ class NoiseLevel(str, Enum):
high = "High"


class MaskType(str, Enum):

no_mask = "noMask"
face_mask = "faceMask"
other_mask_or_occlusion = "otherMaskOrOcclusion"
uncertain = "uncertain"


class FindSimilarMatchMode(str, Enum):

match_person = "matchPerson"
Expand Down Expand Up @@ -123,9 +133,11 @@ class FaceAttributeType(str, Enum):
blur = "blur"
exposure = "exposure"
noise = "noise"
mask = "mask"


class DetectionModel(str, Enum):

detection_01 = "detection_01"
detection_02 = "detection_02"
detection_03 = "detection_03"
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ class DetectedFace(Model):
:param face_id:
:type face_id: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
'recognition_02', 'recognition_03', 'recognition_04'. Default value:
"recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param face_rectangle: Required.
Expand Down Expand Up @@ -300,7 +301,8 @@ class FaceAttributes(Model):
:type emotion: ~azure.cognitiveservices.vision.face.models.Emotion
:param hair: Properties describing hair attributes.
:type hair: ~azure.cognitiveservices.vision.face.models.Hair
:param makeup: Properties describing present makeups on a given face.
:param makeup: Properties describing the presence of makeup on a given
face.
:type makeup: ~azure.cognitiveservices.vision.face.models.Makeup
:param occlusion: Properties describing occlusions on a given face.
:type occlusion: ~azure.cognitiveservices.vision.face.models.Occlusion
Expand All @@ -313,6 +315,8 @@ class FaceAttributes(Model):
:type exposure: ~azure.cognitiveservices.vision.face.models.Exposure
:param noise: Properties describing noise level of the image.
:type noise: ~azure.cognitiveservices.vision.face.models.Noise
:param mask: Properties describing the presence of a mask on a given face.
:type mask: ~azure.cognitiveservices.vision.face.models.Mask
"""

_attribute_map = {
Expand All @@ -330,6 +334,7 @@ class FaceAttributes(Model):
'blur': {'key': 'blur', 'type': 'Blur'},
'exposure': {'key': 'exposure', 'type': 'Exposure'},
'noise': {'key': 'noise', 'type': 'Noise'},
'mask': {'key': 'mask', 'type': 'Mask'},
}

def __init__(self, **kwargs):
Expand All @@ -348,6 +353,7 @@ def __init__(self, **kwargs):
self.blur = kwargs.get('blur', None)
self.exposure = kwargs.get('exposure', None)
self.noise = kwargs.get('noise', None)
self.mask = kwargs.get('mask', None)


class FaceLandmarks(Model):
Expand Down Expand Up @@ -527,7 +533,8 @@ class MetaDataContract(NameAndUserDataContract):
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
'recognition_02', 'recognition_03', 'recognition_04'. Default value:
"recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
"""
Expand Down Expand Up @@ -558,7 +565,8 @@ class FaceList(MetaDataContract):
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
'recognition_02', 'recognition_03', 'recognition_04'. Default value:
"recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param face_list_id: Required. FaceListId of the target face list.
Expand Down Expand Up @@ -658,7 +666,8 @@ class FindSimilarRequest(Model):
:param face_id: Required. FaceId of the query face. User needs to call
Face - Detect first to get a valid faceId. Note that this faceId is not
persisted and will expire 24 hours after the detection call
persisted and will expire at the time specified by faceIdTimeToLive after
the detection call
:type face_id: str
:param face_list_id: An existing user-specified unique candidate face
list, created in Face List - Create a Face List. Face list contains a set
Expand All @@ -673,9 +682,10 @@ class FindSimilarRequest(Model):
provided at the same time.
:type large_face_list_id: str
:param face_ids: An array of candidate faceIds. All of them are created by
Face - Detect and the faceIds will expire 24 hours after the detection
call. The number of faceIds is limited to 1000. Parameter faceListId,
largeFaceListId and faceIds should not be provided at the same time.
Face - Detect and the faceIds will expire at the time specified by
faceIdTimeToLive after the detection call. The number of faceIds is
limited to 1000. Parameter faceListId, largeFaceListId and faceIds should
not be provided at the same time.
:type face_ids: list[str]
:param max_num_of_candidates_returned: The number of top similar faces
returned. The valid range is [1, 1000]. Default value: 20 .
Expand Down Expand Up @@ -983,7 +993,8 @@ class LargeFaceList(MetaDataContract):
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
'recognition_02', 'recognition_03', 'recognition_04'. Default value:
"recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param large_face_list_id: Required. LargeFaceListId of the target large
Expand Down Expand Up @@ -1019,7 +1030,8 @@ class LargePersonGroup(MetaDataContract):
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
'recognition_02', 'recognition_03', 'recognition_04'. Default value:
"recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param large_person_group_id: Required. LargePersonGroupId of the target
Expand All @@ -1046,7 +1058,7 @@ def __init__(self, **kwargs):


class Makeup(Model):
"""Properties describing present makeups on a given face.
"""Properties describing the presence of makeup on a given face.
:param eye_makeup: A boolean value describing whether eye makeup is
present on a face.
Expand All @@ -1067,6 +1079,28 @@ def __init__(self, **kwargs):
self.lip_makeup = kwargs.get('lip_makeup', None)


class Mask(Model):
"""Properties describing the presence of a mask on a given face.
:param type: Mask type if any of the face. Possible values include:
'noMask', 'faceMask', 'otherMaskOrOcclusion', 'uncertain'
:type type: str or ~azure.cognitiveservices.vision.face.models.MaskType
:param nose_and_mouth_covered: A boolean value indicating whether nose and
mouth are covered.
:type nose_and_mouth_covered: bool
"""

_attribute_map = {
'type': {'key': 'type', 'type': 'MaskType'},
'nose_and_mouth_covered': {'key': 'noseAndMouthCovered', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(Mask, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.nose_and_mouth_covered = kwargs.get('nose_and_mouth_covered', None)


class Noise(Model):
"""Properties describing noise level of the image.
Expand Down Expand Up @@ -1186,8 +1220,8 @@ class PersistedFace(Model):
:param persisted_face_id: Required. The persistedFaceId of the target
face, which is persisted and will not expire. Different from faceId
created by Face - Detect and will expire in 24 hours after the detection
call.
created by Face - Detect and will expire in at the time specified by
faceIdTimeToLive after the detection call.
:type persisted_face_id: str
:param user_data: User-provided data attached to the face. The size limit
is 1KB.
Expand Down Expand Up @@ -1256,7 +1290,8 @@ class PersonGroup(MetaDataContract):
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
'recognition_02', 'recognition_03', 'recognition_04'. Default value:
"recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param person_group_id: Required. PersonGroupId of the target person
Expand Down Expand Up @@ -1288,7 +1323,8 @@ class SimilarFace(Model):
All required parameters must be populated in order to send to Azure.
:param face_id: FaceId of candidate face when find by faceIds. faceId is
created by Face - Detect and will expire 24 hours after the detection call
created by Face - Detect and will expire at the time specified by
faceIdTimeToLive after the detection call
:type face_id: str
:param persisted_face_id: PersistedFaceId of candidate face when find by
faceListId. persistedFaceId in face list is persisted and will not expire.
Expand Down

0 comments on commit b6aa968

Please sign in to comment.