Skip to content

Commit e94c0d4

Browse files
committed
Merge branch 'main' into webhooks-custom-payloads
2 parents d3d131e + 8755f41 commit e94c0d4

File tree

15 files changed

+360
-19
lines changed

15 files changed

+360
-19
lines changed

generated/.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ docs/RuleRequest.md
5252
docs/SnoozeTimeUnitEnum.md
5353
docs/SourceEnum.md
5454
docs/StatusEnum.md
55+
docs/TextModeConfiguration.md
5556
docs/TextRecognitionResult.md
5657
docs/UserApi.md
5758
docs/VerbEnum.md
@@ -118,6 +119,7 @@ groundlight_openapi_client/model/rule_request.py
118119
groundlight_openapi_client/model/snooze_time_unit_enum.py
119120
groundlight_openapi_client/model/source_enum.py
120121
groundlight_openapi_client/model/status_enum.py
122+
groundlight_openapi_client/model/text_mode_configuration.py
121123
groundlight_openapi_client/model/text_recognition_result.py
122124
groundlight_openapi_client/model/verb_enum.py
123125
groundlight_openapi_client/model/webhook_action.py

generated/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ Class | Method | HTTP request | Description
182182
- [SnoozeTimeUnitEnum](docs/SnoozeTimeUnitEnum.md)
183183
- [SourceEnum](docs/SourceEnum.md)
184184
- [StatusEnum](docs/StatusEnum.md)
185+
- [TextModeConfiguration](docs/TextModeConfiguration.md)
185186
- [TextRecognitionResult](docs/TextRecognitionResult.md)
186187
- [VerbEnum](docs/VerbEnum.md)
187188
- [WebhookAction](docs/WebhookAction.md)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# TextModeConfiguration
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value_max_length** | **int** | | [optional]
8+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

generated/docs/TextRecognitionResult.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**text** | **str** | |
7+
**text** | **str, none_type** | |
88
**truncated** | **bool** | |
99
**confidence** | **float, none_type** | | [optional]
1010
**source** | **str** | | [optional]

generated/groundlight_openapi_client/model/detector_creation_input_request.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ def lazy_import():
3333
from groundlight_openapi_client.model.count_mode_configuration import CountModeConfiguration
3434
from groundlight_openapi_client.model.mode_enum import ModeEnum
3535
from groundlight_openapi_client.model.multi_class_mode_configuration import MultiClassModeConfiguration
36+
from groundlight_openapi_client.model.text_mode_configuration import TextModeConfiguration
3637

3738
globals()["CountModeConfiguration"] = CountModeConfiguration
3839
globals()["ModeEnum"] = ModeEnum
3940
globals()["MultiClassModeConfiguration"] = MultiClassModeConfiguration
41+
globals()["TextModeConfiguration"] = TextModeConfiguration
4042

4143

4244
class DetectorCreationInputRequest(ModelNormal):

generated/groundlight_openapi_client/model/label_value_request.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ class LabelValueRequest(ModelNormal):
6262
allowed_values = {}
6363

6464
validations = {
65-
("label",): {
66-
"min_length": 1,
67-
},
6865
("image_query_id",): {
6966
"min_length": 1,
7067
},
Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
"""
2+
Groundlight API
3+
4+
Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501
5+
6+
The version of the OpenAPI document: 0.18.2
7+
Contact: support@groundlight.ai
8+
Generated by: https://openapi-generator.tech
9+
"""
10+
11+
import re # noqa: F401
12+
import sys # noqa: F401
13+
14+
from groundlight_openapi_client.model_utils import ( # noqa: F401
15+
ApiTypeError,
16+
ModelComposed,
17+
ModelNormal,
18+
ModelSimple,
19+
cached_property,
20+
change_keys_js_to_python,
21+
convert_js_args_to_python_args,
22+
date,
23+
datetime,
24+
file_type,
25+
none_type,
26+
validate_get_composed_info,
27+
OpenApiModel,
28+
)
29+
from groundlight_openapi_client.exceptions import ApiAttributeError
30+
31+
32+
class TextModeConfiguration(ModelNormal):
33+
"""NOTE: This class is auto generated by OpenAPI Generator.
34+
Ref: https://openapi-generator.tech
35+
36+
Do not edit the class manually.
37+
38+
Attributes:
39+
allowed_values (dict): The key is the tuple path to the attribute
40+
and the for var_name this is (var_name,). The value is a dict
41+
with a capitalized key describing the allowed value and an allowed
42+
value. These dicts store the allowed enum values.
43+
attribute_map (dict): The key is attribute name
44+
and the value is json key in definition.
45+
discriminator_value_class_map (dict): A dict to go from the discriminator
46+
variable value to the discriminator class name.
47+
validations (dict): The key is the tuple path to the attribute
48+
and the for var_name this is (var_name,). The value is a dict
49+
that stores validations for max_length, min_length, max_items,
50+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
51+
inclusive_minimum, and regex.
52+
additional_properties_type (tuple): A tuple of classes accepted
53+
as additional properties values.
54+
"""
55+
56+
allowed_values = {}
57+
58+
validations = {
59+
("value_max_length",): {
60+
"inclusive_maximum": 250,
61+
"inclusive_minimum": 1,
62+
},
63+
}
64+
65+
@cached_property
66+
def additional_properties_type():
67+
"""
68+
This must be a method because a model may have properties that are
69+
of type self, this must run after the class is loaded
70+
"""
71+
return (
72+
bool,
73+
date,
74+
datetime,
75+
dict,
76+
float,
77+
int,
78+
list,
79+
str,
80+
none_type,
81+
) # noqa: E501
82+
83+
_nullable = False
84+
85+
@cached_property
86+
def openapi_types():
87+
"""
88+
This must be a method because a model may have properties that are
89+
of type self, this must run after the class is loaded
90+
91+
Returns
92+
openapi_types (dict): The key is attribute name
93+
and the value is attribute type.
94+
"""
95+
return {
96+
"value_max_length": (int,), # noqa: E501
97+
}
98+
99+
@cached_property
100+
def discriminator():
101+
return None
102+
103+
attribute_map = {
104+
"value_max_length": "value_max_length", # noqa: E501
105+
}
106+
107+
read_only_vars = {}
108+
109+
_composed_schemas = {}
110+
111+
@classmethod
112+
@convert_js_args_to_python_args
113+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
114+
"""TextModeConfiguration - a model defined in OpenAPI
115+
116+
Keyword Args:
117+
_check_type (bool): if True, values for parameters in openapi_types
118+
will be type checked and a TypeError will be
119+
raised if the wrong type is input.
120+
Defaults to True
121+
_path_to_item (tuple/list): This is a list of keys or values to
122+
drill down to the model in received_data
123+
when deserializing a response
124+
_spec_property_naming (bool): True if the variable names in the input data
125+
are serialized names, as specified in the OpenAPI document.
126+
False if the variable names in the input data
127+
are pythonic names, e.g. snake case (default)
128+
_configuration (Configuration): the instance to use when
129+
deserializing a file_type parameter.
130+
If passed, type conversion is attempted
131+
If omitted no type conversion is done.
132+
_visited_composed_classes (tuple): This stores a tuple of
133+
classes that we have traveled through so that
134+
if we see that class again we will not use its
135+
discriminator again.
136+
When traveling through a discriminator, the
137+
composed schema that is
138+
is traveled through is added to this set.
139+
For example if Animal has a discriminator
140+
petType and we pass in "Dog", and the class Dog
141+
allOf includes Animal, we move through Animal
142+
once using the discriminator, and pick Dog.
143+
Then in Dog, we will make an instance of the
144+
Animal class but this time we won't travel
145+
through its discriminator because we passed in
146+
_visited_composed_classes = (Animal,)
147+
value_max_length (int): [optional] # noqa: E501
148+
"""
149+
150+
_check_type = kwargs.pop("_check_type", True)
151+
_spec_property_naming = kwargs.pop("_spec_property_naming", False)
152+
_path_to_item = kwargs.pop("_path_to_item", ())
153+
_configuration = kwargs.pop("_configuration", None)
154+
_visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
155+
156+
self = super(OpenApiModel, cls).__new__(cls)
157+
158+
if args:
159+
raise ApiTypeError(
160+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
161+
% (
162+
args,
163+
self.__class__.__name__,
164+
),
165+
path_to_item=_path_to_item,
166+
valid_classes=(self.__class__,),
167+
)
168+
169+
self._data_store = {}
170+
self._check_type = _check_type
171+
self._spec_property_naming = _spec_property_naming
172+
self._path_to_item = _path_to_item
173+
self._configuration = _configuration
174+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
175+
176+
for var_name, var_value in kwargs.items():
177+
if (
178+
var_name not in self.attribute_map
179+
and self._configuration is not None
180+
and self._configuration.discard_unknown_keys
181+
and self.additional_properties_type is None
182+
):
183+
# discard variable.
184+
continue
185+
setattr(self, var_name, var_value)
186+
return self
187+
188+
required_properties = set([
189+
"_data_store",
190+
"_check_type",
191+
"_spec_property_naming",
192+
"_path_to_item",
193+
"_configuration",
194+
"_visited_composed_classes",
195+
])
196+
197+
@convert_js_args_to_python_args
198+
def __init__(self, *args, **kwargs): # noqa: E501
199+
"""TextModeConfiguration - a model defined in OpenAPI
200+
201+
Keyword Args:
202+
_check_type (bool): if True, values for parameters in openapi_types
203+
will be type checked and a TypeError will be
204+
raised if the wrong type is input.
205+
Defaults to True
206+
_path_to_item (tuple/list): This is a list of keys or values to
207+
drill down to the model in received_data
208+
when deserializing a response
209+
_spec_property_naming (bool): True if the variable names in the input data
210+
are serialized names, as specified in the OpenAPI document.
211+
False if the variable names in the input data
212+
are pythonic names, e.g. snake case (default)
213+
_configuration (Configuration): the instance to use when
214+
deserializing a file_type parameter.
215+
If passed, type conversion is attempted
216+
If omitted no type conversion is done.
217+
_visited_composed_classes (tuple): This stores a tuple of
218+
classes that we have traveled through so that
219+
if we see that class again we will not use its
220+
discriminator again.
221+
When traveling through a discriminator, the
222+
composed schema that is
223+
is traveled through is added to this set.
224+
For example if Animal has a discriminator
225+
petType and we pass in "Dog", and the class Dog
226+
allOf includes Animal, we move through Animal
227+
once using the discriminator, and pick Dog.
228+
Then in Dog, we will make an instance of the
229+
Animal class but this time we won't travel
230+
through its discriminator because we passed in
231+
_visited_composed_classes = (Animal,)
232+
value_max_length (int): [optional] # noqa: E501
233+
"""
234+
235+
_check_type = kwargs.pop("_check_type", True)
236+
_spec_property_naming = kwargs.pop("_spec_property_naming", False)
237+
_path_to_item = kwargs.pop("_path_to_item", ())
238+
_configuration = kwargs.pop("_configuration", None)
239+
_visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
240+
241+
if args:
242+
raise ApiTypeError(
243+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
244+
% (
245+
args,
246+
self.__class__.__name__,
247+
),
248+
path_to_item=_path_to_item,
249+
valid_classes=(self.__class__,),
250+
)
251+
252+
self._data_store = {}
253+
self._check_type = _check_type
254+
self._spec_property_naming = _spec_property_naming
255+
self._path_to_item = _path_to_item
256+
self._configuration = _configuration
257+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
258+
259+
for var_name, var_value in kwargs.items():
260+
if (
261+
var_name not in self.attribute_map
262+
and self._configuration is not None
263+
and self._configuration.discard_unknown_keys
264+
and self.additional_properties_type is None
265+
):
266+
# discard variable.
267+
continue
268+
setattr(self, var_name, var_value)
269+
if var_name in self.read_only_vars:
270+
raise ApiAttributeError(
271+
f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
272+
"class with read only attributes."
273+
)

generated/groundlight_openapi_client/model/text_recognition_result.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ def openapi_types():
101101
and the value is attribute type.
102102
"""
103103
return {
104-
"text": (str,), # noqa: E501
104+
"text": (
105+
str,
106+
none_type,
107+
), # noqa: E501
105108
"truncated": (bool,), # noqa: E501
106109
"confidence": (
107110
float,
@@ -131,7 +134,7 @@ def _from_openapi_data(cls, text, truncated, *args, **kwargs): # noqa: E501
131134
"""TextRecognitionResult - a model defined in OpenAPI
132135
133136
Args:
134-
text (str):
137+
text (str, none_type):
135138
truncated (bool):
136139
137140
Keyword Args:
@@ -223,7 +226,7 @@ def __init__(self, text, truncated, *args, **kwargs): # noqa: E501
223226
"""TextRecognitionResult - a model defined in OpenAPI
224227
225228
Args:
226-
text (str):
229+
text (str, none_type):
227230
truncated (bool):
228231
229232
Keyword Args:

generated/groundlight_openapi_client/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
from groundlight_openapi_client.model.snooze_time_unit_enum import SnoozeTimeUnitEnum
5454
from groundlight_openapi_client.model.source_enum import SourceEnum
5555
from groundlight_openapi_client.model.status_enum import StatusEnum
56+
from groundlight_openapi_client.model.text_mode_configuration import TextModeConfiguration
5657
from groundlight_openapi_client.model.text_recognition_result import TextRecognitionResult
5758
from groundlight_openapi_client.model.verb_enum import VerbEnum
5859
from groundlight_openapi_client.model.webhook_action import WebhookAction

0 commit comments

Comments
 (0)