Skip to content

Commit 6eb51c4

Browse files
authored
32 proxy connection data structure (#37)
* Proxy model * Version bump * chore: Autoformat code --------- Co-authored-by: kjy5 <[email protected]>
1 parent d41c232 commit 6eb51c4

5 files changed

Lines changed: 35 additions & 4 deletions

File tree

models/csharp/ProxyModels.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
[Serializable]
3+
public struct PinpointIdResponse
4+
{
5+
public string PinpointId;
6+
public bool IsRequester;
7+
8+
public PinpointIdResponse(string pinpointId, bool isRequester)
9+
{
10+
PinpointId = pinpointId;
11+
IsRequester = isRequester;
12+
}
13+
}
14+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"description": "Response format for a pinpoint ID request.\n\n:param pinpoint_id: ID of the service.\n:type pinpoint_id: str\n:param is_requester: Whether the service is a requester.\n:type is_requester: bool", "properties": {"PinpointId": {"maxLength": 8, "minLength": 8, "title": "Pinpointid", "type": "string"}, "IsRequester": {"title": "Isrequester", "type": "boolean"}}, "required": ["PinpointId", "IsRequester"], "title": "PinpointIdResponse", "type": "object"}

src/vbl_aquarium/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.14"
1+
__version__ = "0.0.15"

src/vbl_aquarium/build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pydantic.alias_generators import to_pascal
88

99
from vbl_aquarium.generate_cs import pydantic_to_csharp
10-
from vbl_aquarium.models import dock, ephys_link, generic, logging, pinpoint, unity, urchin
10+
from vbl_aquarium.models import dock, ephys_link, generic, logging, pinpoint, proxy, unity, urchin
1111
from vbl_aquarium.utils.common import get_classes
1212
from vbl_aquarium.utils.vbl_base_model import VBLBaseModel
1313

@@ -21,8 +21,8 @@ def remove_ignored_classes(module):
2121
ignored_classes.append(VBLBaseModel)
2222
unity_class_names = [x.__name__ for x in get_classes(unity)]
2323

24-
module_list = [generic, urchin, logging, pinpoint, ephys_link, dock]
25-
folder_prefix = ["generic", "urchin", "logging", "pinpoint", "ephys_link", "dock"]
24+
module_list = [generic, urchin, logging, pinpoint, ephys_link, dock, proxy]
25+
folder_prefix = ["generic", "urchin", "logging", "pinpoint", "ephys_link", "dock", "proxy"]
2626

2727
cdir = dirname(abspath(__file__))
2828

src/vbl_aquarium/models/proxy.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from pydantic import Field
2+
3+
from vbl_aquarium.utils.vbl_base_model import VBLBaseModel
4+
5+
6+
class PinpointIdResponse(VBLBaseModel):
7+
"""Response format for a pinpoint ID request.
8+
9+
:param pinpoint_id: ID of the service.
10+
:type pinpoint_id: str
11+
:param is_requester: Whether the service is a requester.
12+
:type is_requester: bool
13+
"""
14+
15+
pinpoint_id: str = Field(min_length=8, max_length=8)
16+
is_requester: bool

0 commit comments

Comments
 (0)