Skip to content

Commit

Permalink
32 proxy connection data structure (#37)
Browse files Browse the repository at this point in the history
* Proxy model

* Version bump

* chore: Autoformat code

---------

Co-authored-by: kjy5 <[email protected]>
  • Loading branch information
kjy5 and kjy5 authored Jun 18, 2024
1 parent d41c232 commit 6eb51c4
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
14 changes: 14 additions & 0 deletions models/csharp/ProxyModels.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
[Serializable]
public struct PinpointIdResponse
{
public string PinpointId;
public bool IsRequester;

public PinpointIdResponse(string pinpointId, bool isRequester)
{
PinpointId = pinpointId;
IsRequester = isRequester;
}
}

1 change: 1 addition & 0 deletions models/schemas/proxy/PinpointIdResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +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"}
2 changes: 1 addition & 1 deletion src/vbl_aquarium/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.14"
__version__ = "0.0.15"
6 changes: 3 additions & 3 deletions src/vbl_aquarium/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pydantic.alias_generators import to_pascal

from vbl_aquarium.generate_cs import pydantic_to_csharp
from vbl_aquarium.models import dock, ephys_link, generic, logging, pinpoint, unity, urchin
from vbl_aquarium.models import dock, ephys_link, generic, logging, pinpoint, proxy, unity, urchin
from vbl_aquarium.utils.common import get_classes
from vbl_aquarium.utils.vbl_base_model import VBLBaseModel

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

module_list = [generic, urchin, logging, pinpoint, ephys_link, dock]
folder_prefix = ["generic", "urchin", "logging", "pinpoint", "ephys_link", "dock"]
module_list = [generic, urchin, logging, pinpoint, ephys_link, dock, proxy]
folder_prefix = ["generic", "urchin", "logging", "pinpoint", "ephys_link", "dock", "proxy"]

cdir = dirname(abspath(__file__))

Expand Down
16 changes: 16 additions & 0 deletions src/vbl_aquarium/models/proxy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from pydantic import Field

from vbl_aquarium.utils.vbl_base_model import VBLBaseModel


class PinpointIdResponse(VBLBaseModel):
"""Response format for a pinpoint ID request.
:param pinpoint_id: ID of the service.
:type pinpoint_id: str
:param is_requester: Whether the service is a requester.
:type is_requester: bool
"""

pinpoint_id: str = Field(min_length=8, max_length=8)
is_requester: bool

0 comments on commit 6eb51c4

Please sign in to comment.