Source code for kappa_sdk.well_property
from .measure_enum import MeasureEnum
from typing import Union, Optional
from .well_property_type_enum import WellPropertyType
[docs]
class WellProperty:
""" Well Property object.
Presents a KAPPA Automate Well Property object.
"""
def __init__(self, alias: str, name: str, well_property_type: WellPropertyType, measure: Optional[Union[str, MeasureEnum]] = None, comment: str = "",
is_built_in: bool = False, to_be_extracted: bool = False, xml_path: Optional[str] = None):
self.__alias: str = alias
self.__name: str = name
self.__type: WellPropertyType = well_property_type
if self.__type != WellPropertyType.numeric:
measure = None
else:
measure = MeasureEnum.no_unit if measure is None else measure
self.__measure: Optional[Union[str, MeasureEnum]] = measure
self.__comment: str = comment
self.__is_built_in: bool = is_built_in
self.__to_be_extracted: bool = to_be_extracted
self.__xml_path: Optional[str] = xml_path
@property
def alias(self) -> str:
"""
Gets the alias of the :class:`WellProperty` object.
"""
return self.__alias
@property
def name(self) -> str:
"""
Gets the name of the :class:`WellProperty` object.
"""
return self.__name
@property
def type(self) -> WellPropertyType:
"""
Gets the type of the :class:`WellProperty` object.
"""
return self.__type
@property
def measure(self) -> Optional[Union[str, MeasureEnum]]:
"""
Gets the measure of the :class:`WellProperty` object.
"""
return self.__measure
@property
def comment(self) -> str:
"""
Gets the comment of the :class:`WellProperty` object.
"""
return self.__comment
@property
def is_built_in(self) -> bool:
"""
if the :class:`WellProperty` object is a built-in Well Property.
"""
return self.__is_built_in
@property
def to_be_extracted(self) -> bool:
"""
if the :class:`WellProperty` object is to be extracted during ipta.
Returns
-------
"""
return self.__to_be_extracted
@property
def xml_path(self) -> Optional[str]:
"""
The xml path of the :class:`WellProperty` object. Only works is to be extracted is set up to true.
Returns
-------
"""
return self.__xml_path