here.platform.model.subscription
Source code for here.platform.model.subscription
Copyright (C) 2020-2022 HERE Global B.V. and its affiliate(s).
All rights reserved.
This software and other materials contain proprietary information
controlled by HERE and are protected by applicable copyright legislation.
Any use and utilization of this software and other materials and
disclosure to any third parties is conditional upon having a separate
agreement with HERE for the access, use, utilization or disclosure of this
software. In the absence of such agreement, the use of the software is not
allowed.
"""HERE platform module
"""
import enum
from typing import Any, Dict, Optional
from here.platform.utils import JsonDictDocument
[docs]
class InteractiveMapSubscriptionStatus(JsonDictDocument):
"""
This class handles parses InteractiveMap Subscription Status json response.
"""
@property
def status(self) -> str:
"""The status value of InteractiveMapSubscriptionStatus"""
return str(self.json["status"])
@property
def subscription_hrn(self) -> str:
"""The subscriptionHrn value of InteractiveMapSubscriptionStatus"""
return str(self.json["subscriptionHrn"])
[docs]
class InteractiveMapUnsubscribe(JsonDictDocument):
"""
This class handles parses InteractiveMap Unsubscribe json response.
"""
@property
def status_token(self) -> Optional[str]:
"""The statusToken value of InteractiveMapUnsubscribe"""
return self.json.get("statusToken")
@property
def status(self) -> str:
"""The status value of InteractiveMapUnsubscribe"""
return str(self.json["status"])
@property
def subscription_hrn(self) -> str:
"""The subscriptionHrn value of InteractiveMapUnsubscribe"""
return str(self.json["subscriptionHrn"])
[docs]
class InteractiveMapSubscription(JsonDictDocument):
"""
This class handles parses InteractiveMap Subscription json response.
"""
@property
def status_token(self) -> Optional[str]:
"""The statusToken value of InteractiveMapSubscription"""
return self.json.get("statusToken")
@property
def subscription_name(self) -> str:
"""The subscriptionName value of InteractiveMapSubscription"""
return str(self.json["subscriptionName"])
@property
def subscription_hrn(self) -> str:
"""The subscriptionHrn value of InteractiveMapSubscription"""
return str(self.json["subscriptionHrn"])
@property
def description(self) -> str:
"""The description value of InteractiveMapSubscription"""
return str(self.json["description"])
@property
def source_catalog(self) -> str:
"""The sourceCatalog value of InteractiveMapSubscription"""
return str(self.json["sourceCatalog"])
@property
def source_layer(self) -> str:
"""The sourceLayer value of InteractiveMapSubscription"""
return str(self.json["sourceLayer"])
@property
def destination_catalog(self) -> str:
"""The destinationCatalog value of InteractiveMapSubscription"""
return str(self.json["destinationCatalog"])
@property
def destination_layer(self) -> str:
"""The destinationLayer value of InteractiveMapSubscription"""
return str(self.json["destinationLayer"])
@property
def interactive_map_subscription(self) -> dict:
"""The interactiveMapSubscription value of InteractiveMapSubscription"""
return dict(self.json["interactiveMapSubscription"])
@property
def owner(self) -> dict:
"""The owner value of InteractiveMapSubscription"""
return dict(self.json["owner"])
@property
def version(self) -> int:
"""The version value of InteractiveMapSubscription"""
return int(self.json["version"])
@property
def created(self) -> str:
"""The created time string value of InteractiveMapSubscription"""
return str(self.json["created"])
@property
def updated(self) -> str:
"""The updated time string value of InteractiveMapSubscription"""
return str(self.json["updated"])
@property
def status(self) -> Dict[Any, Any]:
"""The status of InteractiveMapSubscription"""
return dict(self.json["status"])
[docs]
class InteractiveMapSubscriptionType(enum.Enum):
"""
Enum for InteractiveMapSubscriptionType
"""
PER_FEATURE = "perFeature"
PER_TRANSACTION = "perTransaction"
CONTENT_CHANGE = "contentChange"