Skip to content

Commit

Permalink
Release 22.11 (#48)
Browse files Browse the repository at this point in the history
* Add MaxiCodeMode class

*Add :param mode: :type: MaxiCodeMode to MaxiCodeParams

*Delete :param encode_mode: :type: int MaxiCodeParams

* Try to temp fix build issue
actions/setup-python#162
  • Loading branch information
AStar9999 committed Nov 24, 2022
1 parent 654e6b4 commit 9c38a55
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
# Define the job to run before your matrix job
get-python-versions:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
outputs:
python-matrix: ${{ steps.get-python-versions-action.outputs.latest-python-versions }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
# see https://www.python.org/downloads/
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![PyPI](https://img.shields.io/pypi/v/aspose-barcode-cloud)](https://pypi.org/project/aspose-barcode-cloud/)

- API version: 3.0
- Package version: 22.10.0
- Package version: 22.11.0

## Demo applications

Expand Down Expand Up @@ -181,6 +181,7 @@ Class | Method | HTTP request | Description
- [ITF14BorderType](docs/ITF14BorderType.md)
- [ITFParams](docs/ITFParams.md)
- [MacroCharacter](docs/MacroCharacter.md)
- [MaxiCodeMode](docs/MaxiCodeMode.md)
- [MaxiCodeParams](docs/MaxiCodeParams.md)
- [ObjectExist](docs/ObjectExist.md)
- [Padding](docs/Padding.md)
Expand Down
1 change: 1 addition & 0 deletions aspose_barcode_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
from aspose_barcode_cloud.models.itf14_border_type import ITF14BorderType
from aspose_barcode_cloud.models.itf_params import ITFParams
from aspose_barcode_cloud.models.macro_character import MacroCharacter
from aspose_barcode_cloud.models.maxi_code_mode import MaxiCodeMode
from aspose_barcode_cloud.models.maxi_code_params import MaxiCodeParams
from aspose_barcode_cloud.models.object_exist import ObjectExist
from aspose_barcode_cloud.models.padding import Padding
Expand Down
4 changes: 2 additions & 2 deletions aspose_barcode_cloud/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
self.rest_client = RESTClientObject(configuration)
self.default_headers = {
"x-aspose-client": "python sdk",
"x-aspose-client-version": "22.10.0",
"x-aspose-client-version": "22.11.0",
}
if header_name is not None:
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = "Aspose-Barcode-SDK/22.10.0/python"
self.user_agent = "Aspose-Barcode-SDK/22.11.0/python"

def __del__(self):
self.rest_client.close()
Expand Down
2 changes: 1 addition & 1 deletion aspose_barcode_cloud/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def to_debug_report(self):
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: 3.0\n"
"SDK Package Version: 22.10.0".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 22.11.0".format(env=sys.platform, pyversion=sys.version)
)

@staticmethod
Expand Down
1 change: 1 addition & 0 deletions aspose_barcode_cloud/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
from aspose_barcode_cloud.models.itf14_border_type import ITF14BorderType
from aspose_barcode_cloud.models.itf_params import ITFParams
from aspose_barcode_cloud.models.macro_character import MacroCharacter
from aspose_barcode_cloud.models.maxi_code_mode import MaxiCodeMode
from aspose_barcode_cloud.models.maxi_code_params import MaxiCodeParams
from aspose_barcode_cloud.models.object_exist import ObjectExist
from aspose_barcode_cloud.models.padding import Padding
Expand Down
106 changes: 106 additions & 0 deletions aspose_barcode_cloud/models/maxi_code_mode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# coding: utf-8

"""
Copyright (c) 2022 Aspose.BarCode for Cloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""


import pprint
import re # noqa: F401

import six


class MaxiCodeMode(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""

"""
allowed enum values
"""
MODE2 = "Mode2"
MODE3 = "Mode3"
MODE4 = "Mode4"
MODE5 = "Mode5"
MODE6 = "Mode6"

"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {}

attribute_map = {}

def __init__(self): # noqa: E501
"""MaxiCodeMode - a model defined in Swagger""" # noqa: E501
self.discriminator = None

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}

for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(
map(
lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
value.items(),
)
)
else:
result[attr] = value
if issubclass(MaxiCodeMode, dict):
for key, value in self.items():
result[key] = value

return result

def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())

def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()

def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, MaxiCodeMode):
return False

return self.__dict__ == other.__dict__

def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
38 changes: 19 additions & 19 deletions aspose_barcode_cloud/models/maxi_code_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ class MaxiCodeParams(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {"aspect_ratio": "float", "encode_mode": "int"}
swagger_types = {"aspect_ratio": "float", "mode": "MaxiCodeMode"}

attribute_map = {"aspect_ratio": "AspectRatio", "encode_mode": "EncodeMode"}
attribute_map = {"aspect_ratio": "AspectRatio", "mode": "Mode"}

def __init__(self, aspect_ratio=None, encode_mode=None): # noqa: E501
def __init__(self, aspect_ratio=None, mode=None): # noqa: E501
"""MaxiCodeParams - a model defined in Swagger""" # noqa: E501

self._aspect_ratio = None
self._encode_mode = None
self._mode = None
self.discriminator = None

if aspect_ratio is not None:
self.aspect_ratio = aspect_ratio
if encode_mode is not None:
self.encode_mode = encode_mode
if mode is not None:
self.mode = mode

@property
def aspect_ratio(self):
Expand All @@ -84,27 +84,27 @@ def aspect_ratio(self, aspect_ratio):
self._aspect_ratio = aspect_ratio

@property
def encode_mode(self):
"""Gets the encode_mode of this MaxiCodeParams. # noqa: E501
def mode(self):
"""Gets the mode of this MaxiCodeParams. # noqa: E501
MaxiCode encode mode. # noqa: E501
Encoding mode for MaxiCode barcodes. # noqa: E501
:return: The encode_mode of this MaxiCodeParams. # noqa: E501
:rtype: int
:return: The mode of this MaxiCodeParams. # noqa: E501
:rtype: MaxiCodeMode
"""
return self._encode_mode
return self._mode

@encode_mode.setter
def encode_mode(self, encode_mode):
"""Sets the encode_mode of this MaxiCodeParams.
@mode.setter
def mode(self, mode):
"""Sets the mode of this MaxiCodeParams.
MaxiCode encode mode. # noqa: E501
Encoding mode for MaxiCode barcodes. # noqa: E501
:param encode_mode: The encode_mode of this MaxiCodeParams. # noqa: E501
:type: int
:param mode: The mode of this MaxiCodeParams. # noqa: E501
:type: MaxiCodeMode
"""

self._encode_mode = encode_mode
self._mode = mode

def to_dict(self):
"""Returns the model properties as a dict"""
Expand Down
9 changes: 9 additions & 0 deletions docs/MaxiCodeMode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# MaxiCodeMode

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion docs/MaxiCodeParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**aspect_ratio** | **float** | Height/Width ratio of 2D BarCode module. | [optional]
**encode_mode** | **int** | MaxiCode encode mode. | [optional]
**mode** | [**MaxiCodeMode**](MaxiCodeMode.md) | Encoding mode for MaxiCode barcodes. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from setuptools import setup, find_packages

NAME = "aspose-barcode-cloud"
VERSION = "22.10.0"
VERSION = "22.11.0"
# To install the library, run the following
#
# python setup.py install
Expand Down
4 changes: 2 additions & 2 deletions tests/test_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def test_default_headers(self):

self.assertEqual(1, self.rest_client_mock.GET.call_count)
headers = self.rest_client_mock.GET.call_args[1]["headers"]
self.assertEqual("Aspose-Barcode-SDK/22.10.0/python", headers["User-Agent"])
self.assertEqual("Aspose-Barcode-SDK/22.11.0/python", headers["User-Agent"])
self.assertEqual("python sdk", headers["x-aspose-client"])
self.assertEqual("22.10.0", headers["x-aspose-client-version"])
self.assertEqual("22.11.0", headers["x-aspose-client-version"])

def test_header_override(self):
api_client = ApiClient(self.local_config, header_name="x-aspose-client", header_value="some custom sdk")
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ deps=-r{toxinidir}/requirements.txt
commands=
make clean-pyc
make test

0 comments on commit 9c38a55

Please sign in to comment.