-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 984c12a568b2dd36acb521eb3b1c00fbd5b42995 (#2575)
Update CognitiveService ComputerVision Swagger for new extensions (#1) * Merged PR 17875: Add new languages Add new languages Also tidy up the enum definition so that AutoRest generates C# that actually compiles * Merged PR 17942: Replace fancy quotes with plain single quotes Make javac compile without complaint even without setting the codepage to utf-8 by dropping the gratuitous typographic quotes. * Merged PR 17956: Rename url argument for overloaded endpoint to imageUrl This name will become the name of the argument in Python. Since you can used named arguments in Python, give them less ambiguous names. * Changes to make --azure-validator run more cleanly Errors Fixed * XmsExamplesRequired/D5001/Documentation (7) * XmsPathsMustOverloadPaths/R2058/SDKViolation (7) Errors Ignored * SecurityDefinitionsStructure/R2054/SDKViolation (1) - API Key scheme for Cognitive Services * APIVersionPattern/R3012/ARMViolation (1) - Keeping with the Cognitive Services numbering scheme * OperationsAPIImplementation/R3023/ARMViolation (1) - Not sure what this is Warnings Fixed * XmsEnumValidation/R2018/SDKViolation (1) * DescriptionAndTitleMissing/R4000/SDKViolation (1) Warnings Ignored * DescriptionAndTitleMissing/R4000/SDKViolation (35) - description is contained in #ref * EnumInsteadOfBoolean/R3018/ARMViolation (5) - fix would be a breaking change * ListInOperationName/R1003/SDKViolation (1) - fix would be a breaking change * LongRunningOperationsWithLongRunningExtension/R2007/SDKViolation (2) - endpoint will not ultimately yield a 200, as this extension would require * NonApplicationJsonType/R2004/ARMViolation (15) - fix would be breaking change * PageableOperation/R2029/SDKViolation (1) - not actually pageable * ParameterNotDefinedInGlobalParameters/R2015/SDKViolation (1) - All our own parameters specify x-ms-parameter-location * PostOperationIdContainsUrlVerb/R2066/SDKViolation (7) - fix would be breaking change
- Loading branch information
1 parent
223ddb6
commit b957717
Showing
60 changed files
with
1,429 additions
and
254 deletions.
There are no files selected for viewing
147 changes: 93 additions & 54 deletions
147
...ision-computervision/azure/cognitiveservices/vision/computervision/computer_vision_api.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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
44 changes: 44 additions & 0 deletions
44
...ion-computervision/azure/cognitiveservices/vision/computervision/models/adult_info_py3.py
This file contains 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,44 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class AdultInfo(Model): | ||
"""An object describing whether the image contains adult-oriented content | ||
and/or is racy. | ||
:param is_adult_content: A value indicating if the image contains | ||
adult-oriented content. | ||
:type is_adult_content: bool | ||
:param is_racy_content: A value indicating if the image is race. | ||
:type is_racy_content: bool | ||
:param adult_score: Score from 0 to 1 that indicates how much of adult | ||
content is within the image. | ||
:type adult_score: float | ||
:param racy_score: Score from 0 to 1 that indicates how suggestive is the | ||
image. | ||
:type racy_score: float | ||
""" | ||
|
||
_attribute_map = { | ||
'is_adult_content': {'key': 'isAdultContent', 'type': 'bool'}, | ||
'is_racy_content': {'key': 'isRacyContent', 'type': 'bool'}, | ||
'adult_score': {'key': 'adultScore', 'type': 'float'}, | ||
'racy_score': {'key': 'racyScore', 'type': 'float'}, | ||
} | ||
|
||
def __init__(self, *, is_adult_content: bool=None, is_racy_content: bool=None, adult_score: float=None, racy_score: float=None, **kwargs) -> None: | ||
super(AdultInfo, self).__init__(**kwargs) | ||
self.is_adult_content = is_adult_content | ||
self.is_racy_content = is_racy_content | ||
self.adult_score = adult_score | ||
self.racy_score = racy_score |
This file contains 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 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
29 changes: 29 additions & 0 deletions
29
...omputervision/azure/cognitiveservices/vision/computervision/models/category_detail_py3.py
This file contains 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,29 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class CategoryDetail(Model): | ||
"""An object describing additional category details. | ||
:param celebrities: An array of celebrities if any identified. | ||
:type celebrities: | ||
list[~azure.cognitiveservices.vision.computervision.models.CelebritiesModel] | ||
""" | ||
|
||
_attribute_map = { | ||
'celebrities': {'key': 'celebrities', 'type': '[CelebritiesModel]'}, | ||
} | ||
|
||
def __init__(self, *, celebrities=None, **kwargs) -> None: | ||
super(CategoryDetail, self).__init__(**kwargs) | ||
self.celebrities = celebrities |
37 changes: 37 additions & 0 deletions
37
...ision-computervision/azure/cognitiveservices/vision/computervision/models/category_py3.py
This file contains 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,37 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class Category(Model): | ||
"""An object describing identified category. | ||
:param name: Name of the category. | ||
:type name: str | ||
:param score: Scoring of the category. | ||
:type score: float | ||
:param detail: | ||
:type detail: | ||
~azure.cognitiveservices.vision.computervision.models.CategoryDetail | ||
""" | ||
|
||
_attribute_map = { | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'score': {'key': 'score', 'type': 'float'}, | ||
'detail': {'key': 'detail', 'type': 'CategoryDetail'}, | ||
} | ||
|
||
def __init__(self, *, name: str=None, score: float=None, detail=None, **kwargs) -> None: | ||
super(Category, self).__init__(**kwargs) | ||
self.name = name | ||
self.score = score | ||
self.detail = detail |
This file contains 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
37 changes: 37 additions & 0 deletions
37
...putervision/azure/cognitiveservices/vision/computervision/models/celebrities_model_py3.py
This file contains 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,37 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class CelebritiesModel(Model): | ||
"""An object describing possible celebrity identification. | ||
:param name: Name of the celebrity. | ||
:type name: str | ||
:param confidence: Level of confidence ranging from 0 to 1. | ||
:type confidence: float | ||
:param face_rectangle: | ||
:type face_rectangle: | ||
~azure.cognitiveservices.vision.computervision.models.FaceRectangle | ||
""" | ||
|
||
_attribute_map = { | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'confidence': {'key': 'confidence', 'type': 'float'}, | ||
'face_rectangle': {'key': 'faceRectangle', 'type': 'FaceRectangle'}, | ||
} | ||
|
||
def __init__(self, *, name: str=None, confidence: float=None, face_rectangle=None, **kwargs) -> None: | ||
super(CelebritiesModel, self).__init__(**kwargs) | ||
self.name = name | ||
self.confidence = confidence | ||
self.face_rectangle = face_rectangle |
This file contains 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
44 changes: 44 additions & 0 deletions
44
...ion-computervision/azure/cognitiveservices/vision/computervision/models/color_info_py3.py
This file contains 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,44 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class ColorInfo(Model): | ||
"""An object providing additional metadata describing color attributes. | ||
:param dominant_color_foreground: Possible dominant foreground color. | ||
:type dominant_color_foreground: str | ||
:param dominant_color_background: Possible dominant background color. | ||
:type dominant_color_background: str | ||
:param dominant_colors: An array of possible dominant colors. | ||
:type dominant_colors: list[str] | ||
:param accent_color: Possible accent color. | ||
:type accent_color: str | ||
:param is_bw_img: A value indicating if the image is black and white. | ||
:type is_bw_img: bool | ||
""" | ||
|
||
_attribute_map = { | ||
'dominant_color_foreground': {'key': 'dominantColorForeground', 'type': 'str'}, | ||
'dominant_color_background': {'key': 'dominantColorBackground', 'type': 'str'}, | ||
'dominant_colors': {'key': 'dominantColors', 'type': '[str]'}, | ||
'accent_color': {'key': 'accentColor', 'type': 'str'}, | ||
'is_bw_img': {'key': 'isBWImg', 'type': 'bool'}, | ||
} | ||
|
||
def __init__(self, *, dominant_color_foreground: str=None, dominant_color_background: str=None, dominant_colors=None, accent_color: str=None, is_bw_img: bool=None, **kwargs) -> None: | ||
super(ColorInfo, self).__init__(**kwargs) | ||
self.dominant_color_foreground = dominant_color_foreground | ||
self.dominant_color_background = dominant_color_background | ||
self.dominant_colors = dominant_colors | ||
self.accent_color = accent_color | ||
self.is_bw_img = is_bw_img |
Oops, something went wrong.