polyticket-api/poly-ticket-api-client/poly_ticket_api_client/models/patched_event.py

742 lines
31 KiB
Python

import datetime
from collections.abc import Mapping
from typing import Any, TypeVar, Union, cast
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from dateutil.parser import isoparse
from .. import types
from ..models.event_status_enum import EventStatusEnum
from ..models.moderation_status_enum import ModerationStatusEnum
from ..types import UNSET, Unset
T = TypeVar("T", bound="PatchedEvent")
@_attrs_define
class PatchedEvent:
"""Serializer for Node model
Attributes:
id (Union[Unset, int]):
unit_id (Union[Unset, int]):
name (Union[Unset, str]):
status (Union[Unset, EventStatusEnum]): * `draft` - Draft
* `public` - Public
* `closed` - Closed (force)
* `archived` - Archived
moderation_status (Union[Unset, ModerationStatusEnum]): * `not_requested` - Not requested
* `requested` - Requested
* `change_requested` - Change requested
* `validated` - Validated
are_registrations_allowed (Union[Unset, bool]):
are_payments_allowed (Union[Unset, bool]):
registrations_start_date (Union[None, Unset, datetime.datetime]):
payments_start_date (Union[None, Unset, datetime.datetime]):
payments_end_date (Union[None, Unset, datetime.datetime]):
closed_start_date (Union[None, Unset, datetime.date]):
registrations_end_date (Union[None, Unset, datetime.datetime]):
start_date (Union[None, Unset, datetime.datetime]):
end_date (Union[None, Unset, datetime.datetime]):
custom_key (Union[Unset, str]):
welcome_text (Union[Unset, str]): Welcome text displayed on the Ticket Office event page. Some restricted HTML
markup is allowed, everything else is filtered out automatically.
frontend_url (Union[Unset, str]): External url provided by the organizer. I.e. their website or social media
page
frontend_title (Union[Unset, str]): Main name of the event shown to end users. I.e. shown on the Ticket Office
webpage
frontend_organizers (Union[Unset, str]): Name of the organizer, displayed on the Ticket Office event page
frontend_path (Union[Unset, str]): Root of public path of the event url
multiple_registration_per_login (Union[Unset, bool]):
user_nickname_enabled (Union[Unset, bool]):
user_registration_link_unique (Union[Unset, bool]):
description_header_image (Union[None, Unset, int]):
terms_of_service (Union[Unset, str]):
location_text (Union[Unset, str]):
location (Union[None, Unset, str]):
location_address (Union[Unset, str]):
is_public_visible (Union[Unset, bool]):
is_unit_visible (Union[Unset, bool]):
ticket_office_url (Union[Unset, str]):
ticket_office_testing_url (Union[Unset, str]):
is_basket_item_modification_allowed (Union[Unset, bool]): This field informs the front end on what actions
should be allowed or prevented, in the front end only.
is_in_lausanne (Union[Unset, bool]): if the event physically takes place in the city of Lausanne, set this
boolean so that taxes are calculated properly
is_status_public (Union[Unset, bool]):
"""
id: Union[Unset, int] = UNSET
unit_id: Union[Unset, int] = UNSET
name: Union[Unset, str] = UNSET
status: Union[Unset, EventStatusEnum] = UNSET
moderation_status: Union[Unset, ModerationStatusEnum] = UNSET
are_registrations_allowed: Union[Unset, bool] = UNSET
are_payments_allowed: Union[Unset, bool] = UNSET
registrations_start_date: Union[None, Unset, datetime.datetime] = UNSET
payments_start_date: Union[None, Unset, datetime.datetime] = UNSET
payments_end_date: Union[None, Unset, datetime.datetime] = UNSET
closed_start_date: Union[None, Unset, datetime.date] = UNSET
registrations_end_date: Union[None, Unset, datetime.datetime] = UNSET
start_date: Union[None, Unset, datetime.datetime] = UNSET
end_date: Union[None, Unset, datetime.datetime] = UNSET
custom_key: Union[Unset, str] = UNSET
welcome_text: Union[Unset, str] = UNSET
frontend_url: Union[Unset, str] = UNSET
frontend_title: Union[Unset, str] = UNSET
frontend_organizers: Union[Unset, str] = UNSET
frontend_path: Union[Unset, str] = UNSET
multiple_registration_per_login: Union[Unset, bool] = UNSET
user_nickname_enabled: Union[Unset, bool] = UNSET
user_registration_link_unique: Union[Unset, bool] = UNSET
description_header_image: Union[None, Unset, int] = UNSET
terms_of_service: Union[Unset, str] = UNSET
location_text: Union[Unset, str] = UNSET
location: Union[None, Unset, str] = UNSET
location_address: Union[Unset, str] = UNSET
is_public_visible: Union[Unset, bool] = UNSET
is_unit_visible: Union[Unset, bool] = UNSET
ticket_office_url: Union[Unset, str] = UNSET
ticket_office_testing_url: Union[Unset, str] = UNSET
is_basket_item_modification_allowed: Union[Unset, bool] = UNSET
is_in_lausanne: Union[Unset, bool] = UNSET
is_status_public: Union[Unset, bool] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
id = self.id
unit_id = self.unit_id
name = self.name
status: Union[Unset, str] = UNSET
if not isinstance(self.status, Unset):
status = self.status.value
moderation_status: Union[Unset, str] = UNSET
if not isinstance(self.moderation_status, Unset):
moderation_status = self.moderation_status.value
are_registrations_allowed = self.are_registrations_allowed
are_payments_allowed = self.are_payments_allowed
registrations_start_date: Union[None, Unset, str]
if isinstance(self.registrations_start_date, Unset):
registrations_start_date = UNSET
elif isinstance(self.registrations_start_date, datetime.datetime):
registrations_start_date = self.registrations_start_date.isoformat()
else:
registrations_start_date = self.registrations_start_date
payments_start_date: Union[None, Unset, str]
if isinstance(self.payments_start_date, Unset):
payments_start_date = UNSET
elif isinstance(self.payments_start_date, datetime.datetime):
payments_start_date = self.payments_start_date.isoformat()
else:
payments_start_date = self.payments_start_date
payments_end_date: Union[None, Unset, str]
if isinstance(self.payments_end_date, Unset):
payments_end_date = UNSET
elif isinstance(self.payments_end_date, datetime.datetime):
payments_end_date = self.payments_end_date.isoformat()
else:
payments_end_date = self.payments_end_date
closed_start_date: Union[None, Unset, str]
if isinstance(self.closed_start_date, Unset):
closed_start_date = UNSET
elif isinstance(self.closed_start_date, datetime.date):
closed_start_date = self.closed_start_date.isoformat()
else:
closed_start_date = self.closed_start_date
registrations_end_date: Union[None, Unset, str]
if isinstance(self.registrations_end_date, Unset):
registrations_end_date = UNSET
elif isinstance(self.registrations_end_date, datetime.datetime):
registrations_end_date = self.registrations_end_date.isoformat()
else:
registrations_end_date = self.registrations_end_date
start_date: Union[None, Unset, str]
if isinstance(self.start_date, Unset):
start_date = UNSET
elif isinstance(self.start_date, datetime.datetime):
start_date = self.start_date.isoformat()
else:
start_date = self.start_date
end_date: Union[None, Unset, str]
if isinstance(self.end_date, Unset):
end_date = UNSET
elif isinstance(self.end_date, datetime.datetime):
end_date = self.end_date.isoformat()
else:
end_date = self.end_date
custom_key = self.custom_key
welcome_text = self.welcome_text
frontend_url = self.frontend_url
frontend_title = self.frontend_title
frontend_organizers = self.frontend_organizers
frontend_path = self.frontend_path
multiple_registration_per_login = self.multiple_registration_per_login
user_nickname_enabled = self.user_nickname_enabled
user_registration_link_unique = self.user_registration_link_unique
description_header_image: Union[None, Unset, int]
if isinstance(self.description_header_image, Unset):
description_header_image = UNSET
else:
description_header_image = self.description_header_image
terms_of_service = self.terms_of_service
location_text = self.location_text
location: Union[None, Unset, str]
if isinstance(self.location, Unset):
location = UNSET
else:
location = self.location
location_address = self.location_address
is_public_visible = self.is_public_visible
is_unit_visible = self.is_unit_visible
ticket_office_url = self.ticket_office_url
ticket_office_testing_url = self.ticket_office_testing_url
is_basket_item_modification_allowed = self.is_basket_item_modification_allowed
is_in_lausanne = self.is_in_lausanne
is_status_public = self.is_status_public
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if id is not UNSET:
field_dict["id"] = id
if unit_id is not UNSET:
field_dict["unit_id"] = unit_id
if name is not UNSET:
field_dict["name"] = name
if status is not UNSET:
field_dict["status"] = status
if moderation_status is not UNSET:
field_dict["moderation_status"] = moderation_status
if are_registrations_allowed is not UNSET:
field_dict["are_registrations_allowed"] = are_registrations_allowed
if are_payments_allowed is not UNSET:
field_dict["are_payments_allowed"] = are_payments_allowed
if registrations_start_date is not UNSET:
field_dict["registrations_start_date"] = registrations_start_date
if payments_start_date is not UNSET:
field_dict["payments_start_date"] = payments_start_date
if payments_end_date is not UNSET:
field_dict["payments_end_date"] = payments_end_date
if closed_start_date is not UNSET:
field_dict["closed_start_date"] = closed_start_date
if registrations_end_date is not UNSET:
field_dict["registrations_end_date"] = registrations_end_date
if start_date is not UNSET:
field_dict["start_date"] = start_date
if end_date is not UNSET:
field_dict["end_date"] = end_date
if custom_key is not UNSET:
field_dict["custom_key"] = custom_key
if welcome_text is not UNSET:
field_dict["welcome_text"] = welcome_text
if frontend_url is not UNSET:
field_dict["frontend_url"] = frontend_url
if frontend_title is not UNSET:
field_dict["frontend_title"] = frontend_title
if frontend_organizers is not UNSET:
field_dict["frontend_organizers"] = frontend_organizers
if frontend_path is not UNSET:
field_dict["frontend_path"] = frontend_path
if multiple_registration_per_login is not UNSET:
field_dict["multiple_registration_per_login"] = multiple_registration_per_login
if user_nickname_enabled is not UNSET:
field_dict["user_nickname_enabled"] = user_nickname_enabled
if user_registration_link_unique is not UNSET:
field_dict["user_registration_link_unique"] = user_registration_link_unique
if description_header_image is not UNSET:
field_dict["description_header_image"] = description_header_image
if terms_of_service is not UNSET:
field_dict["terms_of_service"] = terms_of_service
if location_text is not UNSET:
field_dict["location_text"] = location_text
if location is not UNSET:
field_dict["location"] = location
if location_address is not UNSET:
field_dict["location_address"] = location_address
if is_public_visible is not UNSET:
field_dict["is_public_visible"] = is_public_visible
if is_unit_visible is not UNSET:
field_dict["is_unit_visible"] = is_unit_visible
if ticket_office_url is not UNSET:
field_dict["ticket_office_url"] = ticket_office_url
if ticket_office_testing_url is not UNSET:
field_dict["ticket_office_testing_url"] = ticket_office_testing_url
if is_basket_item_modification_allowed is not UNSET:
field_dict["is_basket_item_modification_allowed"] = is_basket_item_modification_allowed
if is_in_lausanne is not UNSET:
field_dict["is_in_lausanne"] = is_in_lausanne
if is_status_public is not UNSET:
field_dict["is_status_public"] = is_status_public
return field_dict
def to_multipart(self) -> types.RequestFiles:
files: types.RequestFiles = []
if not isinstance(self.id, Unset):
files.append(("id", (None, str(self.id).encode(), "text/plain")))
if not isinstance(self.unit_id, Unset):
files.append(("unit_id", (None, str(self.unit_id).encode(), "text/plain")))
if not isinstance(self.name, Unset):
files.append(("name", (None, str(self.name).encode(), "text/plain")))
if not isinstance(self.status, Unset):
files.append(("status", (None, str(self.status.value).encode(), "text/plain")))
if not isinstance(self.moderation_status, Unset):
files.append(("moderation_status", (None, str(self.moderation_status.value).encode(), "text/plain")))
if not isinstance(self.are_registrations_allowed, Unset):
files.append(
("are_registrations_allowed", (None, str(self.are_registrations_allowed).encode(), "text/plain"))
)
if not isinstance(self.are_payments_allowed, Unset):
files.append(("are_payments_allowed", (None, str(self.are_payments_allowed).encode(), "text/plain")))
if not isinstance(self.registrations_start_date, Unset):
if isinstance(self.registrations_start_date, datetime.datetime):
files.append(
(
"registrations_start_date",
(None, self.registrations_start_date.isoformat().encode(), "text/plain"),
)
)
else:
files.append(
("registrations_start_date", (None, str(self.registrations_start_date).encode(), "text/plain"))
)
if not isinstance(self.payments_start_date, Unset):
if isinstance(self.payments_start_date, datetime.datetime):
files.append(
("payments_start_date", (None, self.payments_start_date.isoformat().encode(), "text/plain"))
)
else:
files.append(("payments_start_date", (None, str(self.payments_start_date).encode(), "text/plain")))
if not isinstance(self.payments_end_date, Unset):
if isinstance(self.payments_end_date, datetime.datetime):
files.append(("payments_end_date", (None, self.payments_end_date.isoformat().encode(), "text/plain")))
else:
files.append(("payments_end_date", (None, str(self.payments_end_date).encode(), "text/plain")))
if not isinstance(self.closed_start_date, Unset):
if isinstance(self.closed_start_date, datetime.date):
files.append(("closed_start_date", (None, self.closed_start_date.isoformat().encode(), "text/plain")))
else:
files.append(("closed_start_date", (None, str(self.closed_start_date).encode(), "text/plain")))
if not isinstance(self.registrations_end_date, Unset):
if isinstance(self.registrations_end_date, datetime.datetime):
files.append(
("registrations_end_date", (None, self.registrations_end_date.isoformat().encode(), "text/plain"))
)
else:
files.append(
("registrations_end_date", (None, str(self.registrations_end_date).encode(), "text/plain"))
)
if not isinstance(self.start_date, Unset):
if isinstance(self.start_date, datetime.datetime):
files.append(("start_date", (None, self.start_date.isoformat().encode(), "text/plain")))
else:
files.append(("start_date", (None, str(self.start_date).encode(), "text/plain")))
if not isinstance(self.end_date, Unset):
if isinstance(self.end_date, datetime.datetime):
files.append(("end_date", (None, self.end_date.isoformat().encode(), "text/plain")))
else:
files.append(("end_date", (None, str(self.end_date).encode(), "text/plain")))
if not isinstance(self.custom_key, Unset):
files.append(("custom_key", (None, str(self.custom_key).encode(), "text/plain")))
if not isinstance(self.welcome_text, Unset):
files.append(("welcome_text", (None, str(self.welcome_text).encode(), "text/plain")))
if not isinstance(self.frontend_url, Unset):
files.append(("frontend_url", (None, str(self.frontend_url).encode(), "text/plain")))
if not isinstance(self.frontend_title, Unset):
files.append(("frontend_title", (None, str(self.frontend_title).encode(), "text/plain")))
if not isinstance(self.frontend_organizers, Unset):
files.append(("frontend_organizers", (None, str(self.frontend_organizers).encode(), "text/plain")))
if not isinstance(self.frontend_path, Unset):
files.append(("frontend_path", (None, str(self.frontend_path).encode(), "text/plain")))
if not isinstance(self.multiple_registration_per_login, Unset):
files.append(
(
"multiple_registration_per_login",
(None, str(self.multiple_registration_per_login).encode(), "text/plain"),
)
)
if not isinstance(self.user_nickname_enabled, Unset):
files.append(("user_nickname_enabled", (None, str(self.user_nickname_enabled).encode(), "text/plain")))
if not isinstance(self.user_registration_link_unique, Unset):
files.append(
(
"user_registration_link_unique",
(None, str(self.user_registration_link_unique).encode(), "text/plain"),
)
)
if not isinstance(self.description_header_image, Unset):
if isinstance(self.description_header_image, int):
files.append(
("description_header_image", (None, str(self.description_header_image).encode(), "text/plain"))
)
else:
files.append(
("description_header_image", (None, str(self.description_header_image).encode(), "text/plain"))
)
if not isinstance(self.terms_of_service, Unset):
files.append(("terms_of_service", (None, str(self.terms_of_service).encode(), "text/plain")))
if not isinstance(self.location_text, Unset):
files.append(("location_text", (None, str(self.location_text).encode(), "text/plain")))
if not isinstance(self.location, Unset):
if isinstance(self.location, str):
files.append(("location", (None, str(self.location).encode(), "text/plain")))
else:
files.append(("location", (None, str(self.location).encode(), "text/plain")))
if not isinstance(self.location_address, Unset):
files.append(("location_address", (None, str(self.location_address).encode(), "text/plain")))
if not isinstance(self.is_public_visible, Unset):
files.append(("is_public_visible", (None, str(self.is_public_visible).encode(), "text/plain")))
if not isinstance(self.is_unit_visible, Unset):
files.append(("is_unit_visible", (None, str(self.is_unit_visible).encode(), "text/plain")))
if not isinstance(self.ticket_office_url, Unset):
files.append(("ticket_office_url", (None, str(self.ticket_office_url).encode(), "text/plain")))
if not isinstance(self.ticket_office_testing_url, Unset):
files.append(
("ticket_office_testing_url", (None, str(self.ticket_office_testing_url).encode(), "text/plain"))
)
if not isinstance(self.is_basket_item_modification_allowed, Unset):
files.append(
(
"is_basket_item_modification_allowed",
(None, str(self.is_basket_item_modification_allowed).encode(), "text/plain"),
)
)
if not isinstance(self.is_in_lausanne, Unset):
files.append(("is_in_lausanne", (None, str(self.is_in_lausanne).encode(), "text/plain")))
if not isinstance(self.is_status_public, Unset):
files.append(("is_status_public", (None, str(self.is_status_public).encode(), "text/plain")))
for prop_name, prop in self.additional_properties.items():
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
return files
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
id = d.pop("id", UNSET)
unit_id = d.pop("unit_id", UNSET)
name = d.pop("name", UNSET)
_status = d.pop("status", UNSET)
status: Union[Unset, EventStatusEnum]
if isinstance(_status, Unset):
status = UNSET
else:
status = EventStatusEnum(_status)
_moderation_status = d.pop("moderation_status", UNSET)
moderation_status: Union[Unset, ModerationStatusEnum]
if isinstance(_moderation_status, Unset):
moderation_status = UNSET
else:
moderation_status = ModerationStatusEnum(_moderation_status)
are_registrations_allowed = d.pop("are_registrations_allowed", UNSET)
are_payments_allowed = d.pop("are_payments_allowed", UNSET)
def _parse_registrations_start_date(data: object) -> Union[None, Unset, datetime.datetime]:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, str):
raise TypeError()
registrations_start_date_type_0 = isoparse(data)
return registrations_start_date_type_0
except: # noqa: E722
pass
return cast(Union[None, Unset, datetime.datetime], data)
registrations_start_date = _parse_registrations_start_date(d.pop("registrations_start_date", UNSET))
def _parse_payments_start_date(data: object) -> Union[None, Unset, datetime.datetime]:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, str):
raise TypeError()
payments_start_date_type_0 = isoparse(data)
return payments_start_date_type_0
except: # noqa: E722
pass
return cast(Union[None, Unset, datetime.datetime], data)
payments_start_date = _parse_payments_start_date(d.pop("payments_start_date", UNSET))
def _parse_payments_end_date(data: object) -> Union[None, Unset, datetime.datetime]:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, str):
raise TypeError()
payments_end_date_type_0 = isoparse(data)
return payments_end_date_type_0
except: # noqa: E722
pass
return cast(Union[None, Unset, datetime.datetime], data)
payments_end_date = _parse_payments_end_date(d.pop("payments_end_date", UNSET))
def _parse_closed_start_date(data: object) -> Union[None, Unset, datetime.date]:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, str):
raise TypeError()
closed_start_date_type_0 = isoparse(data).date()
return closed_start_date_type_0
except: # noqa: E722
pass
return cast(Union[None, Unset, datetime.date], data)
closed_start_date = _parse_closed_start_date(d.pop("closed_start_date", UNSET))
def _parse_registrations_end_date(data: object) -> Union[None, Unset, datetime.datetime]:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, str):
raise TypeError()
registrations_end_date_type_0 = isoparse(data)
return registrations_end_date_type_0
except: # noqa: E722
pass
return cast(Union[None, Unset, datetime.datetime], data)
registrations_end_date = _parse_registrations_end_date(d.pop("registrations_end_date", UNSET))
def _parse_start_date(data: object) -> Union[None, Unset, datetime.datetime]:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, str):
raise TypeError()
start_date_type_0 = isoparse(data)
return start_date_type_0
except: # noqa: E722
pass
return cast(Union[None, Unset, datetime.datetime], data)
start_date = _parse_start_date(d.pop("start_date", UNSET))
def _parse_end_date(data: object) -> Union[None, Unset, datetime.datetime]:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, str):
raise TypeError()
end_date_type_0 = isoparse(data)
return end_date_type_0
except: # noqa: E722
pass
return cast(Union[None, Unset, datetime.datetime], data)
end_date = _parse_end_date(d.pop("end_date", UNSET))
custom_key = d.pop("custom_key", UNSET)
welcome_text = d.pop("welcome_text", UNSET)
frontend_url = d.pop("frontend_url", UNSET)
frontend_title = d.pop("frontend_title", UNSET)
frontend_organizers = d.pop("frontend_organizers", UNSET)
frontend_path = d.pop("frontend_path", UNSET)
multiple_registration_per_login = d.pop("multiple_registration_per_login", UNSET)
user_nickname_enabled = d.pop("user_nickname_enabled", UNSET)
user_registration_link_unique = d.pop("user_registration_link_unique", UNSET)
def _parse_description_header_image(data: object) -> Union[None, Unset, int]:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(Union[None, Unset, int], data)
description_header_image = _parse_description_header_image(d.pop("description_header_image", UNSET))
terms_of_service = d.pop("terms_of_service", UNSET)
location_text = d.pop("location_text", UNSET)
def _parse_location(data: object) -> Union[None, Unset, str]:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(Union[None, Unset, str], data)
location = _parse_location(d.pop("location", UNSET))
location_address = d.pop("location_address", UNSET)
is_public_visible = d.pop("is_public_visible", UNSET)
is_unit_visible = d.pop("is_unit_visible", UNSET)
ticket_office_url = d.pop("ticket_office_url", UNSET)
ticket_office_testing_url = d.pop("ticket_office_testing_url", UNSET)
is_basket_item_modification_allowed = d.pop("is_basket_item_modification_allowed", UNSET)
is_in_lausanne = d.pop("is_in_lausanne", UNSET)
is_status_public = d.pop("is_status_public", UNSET)
patched_event = cls(
id=id,
unit_id=unit_id,
name=name,
status=status,
moderation_status=moderation_status,
are_registrations_allowed=are_registrations_allowed,
are_payments_allowed=are_payments_allowed,
registrations_start_date=registrations_start_date,
payments_start_date=payments_start_date,
payments_end_date=payments_end_date,
closed_start_date=closed_start_date,
registrations_end_date=registrations_end_date,
start_date=start_date,
end_date=end_date,
custom_key=custom_key,
welcome_text=welcome_text,
frontend_url=frontend_url,
frontend_title=frontend_title,
frontend_organizers=frontend_organizers,
frontend_path=frontend_path,
multiple_registration_per_login=multiple_registration_per_login,
user_nickname_enabled=user_nickname_enabled,
user_registration_link_unique=user_registration_link_unique,
description_header_image=description_header_image,
terms_of_service=terms_of_service,
location_text=location_text,
location=location,
location_address=location_address,
is_public_visible=is_public_visible,
is_unit_visible=is_unit_visible,
ticket_office_url=ticket_office_url,
ticket_office_testing_url=ticket_office_testing_url,
is_basket_item_modification_allowed=is_basket_item_modification_allowed,
is_in_lausanne=is_in_lausanne,
is_status_public=is_status_public,
)
patched_event.additional_properties = d
return patched_event
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties