Skip to content

Commit

Permalink
[AutoPR cognitiveservices/data-plane/InkRecognizer] [Hub Generated] R…
Browse files Browse the repository at this point in the history
…eview request for InkRecognizer to add version preview/v1.0 (#6532)

* Generated from 34c67e4beeb3721701921ded0f374c834723b2f7

re-naming inputDevice to inputDeviceKind

* Packaging update of azure-cognitiveservices-inkrecognizer

* Generated from ae13f3bcaab268fc0365a1e0452535827d2bda64

Update specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/InkRecognizer.json

Co-Authored-By: Nick Schonning <[email protected]>

* Generated from ae13f3bcaab268fc0365a1e0452535827d2bda64

Update specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/InkRecognizer.json

Co-Authored-By: Nick Schonning <[email protected]>
  • Loading branch information
AutorestCI and nschonni authored Aug 5, 2019
1 parent f49422f commit dac5aed
Show file tree
Hide file tree
Showing 18 changed files with 1,933 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:
Release History
===============

0.1.0 (1970-01-01)
++++++++++++++++++

* Initial Release
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/cognitiveservices/__init__.py

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure MyService Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Usage
=====

For code examples, see `MyService Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-cognitiveservices-inkrecognizer%2FREADME.png
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 ._configuration import InkRecognizerClientConfiguration
from ._ink_recognizer_client import InkRecognizerClient
__all__ = ['InkRecognizerClient', 'InkRecognizerClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 import Configuration

from .version import VERSION


class InkRecognizerClientConfiguration(Configuration):
"""Configuration for InkRecognizerClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param endpoint: Supported Cognitive Services endpoints (protocol and
hostname, for example: https://westus2.api.cognitive.microsoft.com).
:type endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, endpoint, credentials):

if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
base_url = 'https://{Endpoint}/inkrecognizer/v1.0-preview'

super(InkRecognizerClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-cognitiveservices-inkrecognizer/{}'.format(VERSION))

self.endpoint = endpoint
self.credentials = credentials
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import InkRecognizerClientConfiguration
from .operations import InkRecognizerOperations
from . import models


class InkRecognizerClient(SDKClient):
"""The service is used to perform ink layout and recognition of written words and shapes. Ink strokes passed to the service are recognized and organized into recognition results in the response
:ivar config: Configuration for client.
:vartype config: InkRecognizerClientConfiguration
:ivar ink_recognizer: InkRecognizer operations
:vartype ink_recognizer: azure.cognitiveservices.inkrecognizer.operations.InkRecognizerOperations
:param endpoint: Supported Cognitive Services endpoints (protocol and
hostname, for example: https://westus2.api.cognitive.microsoft.com).
:type endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, endpoint, credentials):

self.config = InkRecognizerClientConfiguration(endpoint, credentials)
super(InkRecognizerClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.ink_recognizer = InkRecognizerOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# 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.
# --------------------------------------------------------------------------

try:
from ._models_py3 import AlternatePatternItem
from ._models_py3 import AnalysisRequest
from ._models_py3 import AnalysisResponse
from ._models_py3 import DrawingAttributesPattern
from ._models_py3 import DrawingAttributesPatternColor
from ._models_py3 import ErrorModel, ErrorModelException
from ._models_py3 import ErrorModelDetailsItem
from ._models_py3 import InkPoint
from ._models_py3 import InkPointValueAttribute
from ._models_py3 import PointDetailsPattern
from ._models_py3 import RecognitionUnitItem
from ._models_py3 import RecognitionUnitItemBoundingRectangle
from ._models_py3 import Stroke
except (SyntaxError, ImportError):
from ._models import AlternatePatternItem
from ._models import AnalysisRequest
from ._models import AnalysisResponse
from ._models import DrawingAttributesPattern
from ._models import DrawingAttributesPatternColor
from ._models import ErrorModel, ErrorModelException
from ._models import ErrorModelDetailsItem
from ._models import InkPoint
from ._models import InkPointValueAttribute
from ._models import PointDetailsPattern
from ._models import RecognitionUnitItem
from ._models import RecognitionUnitItemBoundingRectangle
from ._models import Stroke
from ._ink_recognizer_client_enums import (
Application,
Category,
Container,
InputDevice,
Kind,
Leaf,
RasterOp,
Shape,
Tip,
Unit,
)

__all__ = [
'AlternatePatternItem',
'AnalysisRequest',
'AnalysisResponse',
'DrawingAttributesPattern',
'DrawingAttributesPatternColor',
'ErrorModel', 'ErrorModelException',
'ErrorModelDetailsItem',
'InkPoint',
'InkPointValueAttribute',
'PointDetailsPattern',
'RecognitionUnitItem',
'RecognitionUnitItemBoundingRectangle',
'Stroke',
'RasterOp',
'Tip',
'Shape',
'Category',
'Container',
'Leaf',
'Kind',
'Unit',
'Application',
'InputDevice',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# 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 enum import Enum


class RasterOp(str, Enum):

no_operation = "noOperation"
copy_pen = "copyPen"
mask_pen = "maskPen"


class Tip(str, Enum):

ellipse = "ellipse"
rectangle = "rectangle"


class Shape(str, Enum):

drawing = "drawing"
square = "square"
rectangle = "rectangle"
circle = "circle"
ellipse = "ellipse"
triangle = "triangle"
isosceles_triangle = "isoscelesTriangle"
equilateral_triangle = "equilateralTriangle"
right_triangle = "rightTriangle"
quadrilateral = "quadrilateral"
diamond = "diamond"
trapezoid = "trapezoid"
parallelogram = "parallelogram"
pentagon = "pentagon"
hexagon = "hexagon"
block_arrow = "blockArrow"
heart = "heart"
star_simple = "starSimple"
star_crossed = "starCrossed"
cloud = "cloud"
line = "line"
curve = "curve"
poly_line = "polyLine"


class Category(str, Enum):

root = "root"
writing_region = "writingRegion"
paragraph = "paragraph"
line = "line"
ink_bullet = "inkBullet"
ink_drawing = "inkDrawing"
ink_word = "inkWord"
unknown = "unknown"


class Container(str, Enum):

root = "root"
writing_region = "writingRegion"
paragraph = "paragraph"
line = "line"


class Leaf(str, Enum):

ink_drawing = "inkDrawing"
ink_bullet = "inkBullet"
ink_word = "inkWord"
unknown = "unknown"


class Kind(str, Enum):

ink_drawing = "inkDrawing"
ink_writing = "inkWriting"


class Unit(str, Enum):

mm = "mm"
cm = "cm"
in_enum = "in"


class Application(str, Enum):

drawing = "drawing"
writing = "writing"
mixed = "mixed"


class InputDevice(str, Enum):

digitizer = "digitizer"
pen = "pen"
light_pen = "lightPen"
touch_screen = "touchScreen"
touch_pad = "touchPad"
white_board = "whiteBoard"
threed_digitizer = "3dDigitizer"
stereo_plotter = "stereoPlotter"
articulated_arm = "articulatedArm"
armature = "armature"
Loading

0 comments on commit dac5aed

Please sign in to comment.