timeplus.sink
sink
This module defines sink class
:copyright: (c) 2022 by Timeplus
:license: Apache2, see LICENSE for more details.
View Source
0""" 1sink 2 3This module defines sink class 4:copyright: (c) 2022 by Timeplus 5:license: Apache2, see LICENSE for more details. 6""" 7 8 9from timeplus.resource import ResourceBase 10 11 12class Sink(ResourceBase): 13 """ 14 Sink class defines base class for sinks 15 """ 16 17 _resource_name = "sinks" 18 19 def __init__(self, env=None): 20 ResourceBase.__init__(self, env) 21 22 @classmethod 23 def build(cls, sink, env=None): 24 obj = cls(env=env) 25 obj._data = sink 26 return obj 27 28 def name(self, *args): 29 return self.prop("name", *args) 30 31 def id(self): 32 return self.prop("id") 33 34 def type(self, *args): 35 return self.prop("type", *args) 36 37 def properties(self, *args): 38 return self.prop("properties", *args)
View Source
13class Sink(ResourceBase): 14 """ 15 Sink class defines base class for sinks 16 """ 17 18 _resource_name = "sinks" 19 20 def __init__(self, env=None): 21 ResourceBase.__init__(self, env) 22 23 @classmethod 24 def build(cls, sink, env=None): 25 obj = cls(env=env) 26 obj._data = sink 27 return obj 28 29 def name(self, *args): 30 return self.prop("name", *args) 31 32 def id(self): 33 return self.prop("id") 34 35 def type(self, *args): 36 return self.prop("type", *args) 37 38 def properties(self, *args): 39 return self.prop("properties", *args)
Sink class defines base class for sinks