#! usr/bin/python3.9
"""
    Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357

    .. warning::
        The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
        They are there as a guide as to how the visual basic / catscript functions work
        and thus help debugging in pycatia.
        
"""

from pycatia.system_interfaces.setting_controller import SettingController


class TypeEssObjectSettingAtt(SettingController):

    """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)

                | System.IUnknown
                |     System.IDispatch
                |         System.CATBaseUnknown
                |             System.CATBaseDispatch
                |                 System.AnyObject
                |                     System.SettingController
                |                         TypeESSObjectSettingAtt
                | 
                | The interface to access a CATIATypeESSObjectSettingAtt.
    
    """

    def __init__(self, com_object):
        super().__init__(com_object)
        self.type_ess_object_setting_att = com_object

    @property
    def member_types(self) -> str:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
                | o Property MemberTypes() As CATBSTR
                | 
                |     Returns or sets the MemberTypes parameter.
                | 
                |     Ensure consistency with the C++ interface to which the work is delegated.

        :return: str
        :rtype: str
        """

        return self.type_ess_object_setting_att.MemberTypes

    @member_types.setter
    def member_types(self, value: str):
        """
        :param str value:
        """

        self.type_ess_object_setting_att.MemberTypes = value

    @property
    def plate_types(self) -> str:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
                | o Property PlateTypes() As CATBSTR
                | 
                |     Returns or sets the PlateTypes parameter.
                | 
                |     Ensure consistency with the C++ interface to which the work is delegated.

        :return: str
        :rtype: str
        """

        return self.type_ess_object_setting_att.PlateTypes

    @plate_types.setter
    def plate_types(self, value: str):
        """
        :param str value:
        """

        self.type_ess_object_setting_att.PlateTypes = value

    def get_member_types_info(self, io_admin_level: str, io_locked: str) -> bool:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
                | o Func GetMemberTypesInfo(CATBSTR ioAdminLevel,
                | CATBSTR ioLocked) As boolean
                | 
                |     Retrieves environment informations for the MemberTypes
                |     parameter.
                |     Role:Retrieves the state of the MemberTypes parameter in the current
                |     environment.
                | 
                |     Parameters:
                | 
                |         ioAdminLevel
                | 
                |             If the parameter is locked, AdminLevel gives the administration
                |             level that imposes the value of the parameter.
                |             If the parameter is not locked, AdminLevel gives the administration
                |             level that will give the value of the parameter after a reset.
                |             
                |         ioLocked
                |             Indicates if the parameter has been locked. 
                | 
                |     Returns:
                |         Indicates if the parameter has been explicitly modified or remain to
                |         the administrated value.

        :param str io_admin_level:
        :param str io_locked:
        :return: bool
        :rtype: bool
        """
        return self.type_ess_object_setting_att.GetMemberTypesInfo(io_admin_level, io_locked)

    def get_plate_types_info(self, io_admin_level: str, io_locked: str) -> bool:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
                | o Func GetPlateTypesInfo(CATBSTR ioAdminLevel,
                | CATBSTR ioLocked) As boolean
                | 
                |     Retrieves environment informations for the PlateTypes
                |     parameter.
                |     Role:Retrieves the state of the PlateTypes parameter in the current
                |     environment.
                | 
                |     Parameters:
                | 
                |         ioAdminLevel
                | 
                |             If the parameter is locked, AdminLevel gives the administration
                |             level that imposes the value of the parameter.
                |             If the parameter is not locked, AdminLevel gives the administration
                |             level that will give the value of the parameter after a reset.
                |             
                |         ioLocked
                |             Indicates if the parameter has been locked. 
                | 
                |     Returns:
                |         Indicates if the parameter has been explicitly modified or remain to
                |         the administrated value.

        :param str io_admin_level:
        :param str io_locked:
        :return: bool
        :rtype: bool
        """
        return self.type_ess_object_setting_att.GetPlateTypesInfo(io_admin_level, io_locked)

    def set_member_types_lock(self, i_locked: bool) -> None:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
                | o Sub SetMemberTypesLock(boolean iLocked)
                | 
                |     Locks or unlocks the MemberTypes parameter.
                |     Role:Locks or unlocks the MemberTypes parameter if it is possible in the
                |     current administrative context. In user mode this method will always return
                |     E_FAIL.
                | 
                |     Parameters:
                | 
                |         iLocked
                |             the locking operation to be performed Legal
                |             values:
                |             TRUE : to lock the parameter.
                |             FALSE: to unlock the parameter.

        :param bool i_locked:
        :return: None
        :rtype: None
        """
        return self.type_ess_object_setting_att.SetMemberTypesLock(i_locked)
        # # # # Autogenerated comment: 
        # # some methods require a system service call as the methods expects a vb array object
        # # passed to it and there is no way to do this directly with python. In those cases the following code
        # # should be uncommented and edited accordingly. Otherwise completely remove all this.
        # # vba_function_name = 'set_member_types_lock'
        # # vba_code = """
        # # Public Function set_member_types_lock(type_ess_object_setting_att)
        # #     Dim iLocked (2)
        # #     type_ess_object_setting_att.SetMemberTypesLock iLocked
        # #     set_member_types_lock = iLocked
        # # End Function
        # # """

        # # system_service = SystemService(self.application.SystemService)
        # # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])

    def set_plate_types_lock(self, i_locked: bool) -> None:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
                | o Sub SetPlateTypesLock(boolean iLocked)
                | 
                |     Locks or unlocks the PlateTypes parameter.
                |     Role:Locks or unlocks the PlateTypes parameter if it is possible in the
                |     current administrative context. In user mode this method will always return
                |     E_FAIL.
                | 
                |     Parameters:
                | 
                |         iLocked
                |             the locking operation to be performed Legal
                |             values:
                |             TRUE : to lock the parameter.
                |             FALSE: to unlock the parameter.

        :param bool i_locked:
        :return: None
        :rtype: None
        """
        return self.type_ess_object_setting_att.SetPlateTypesLock(i_locked)
        # # # # Autogenerated comment: 
        # # some methods require a system service call as the methods expects a vb array object
        # # passed to it and there is no way to do this directly with python. In those cases the following code
        # # should be uncommented and edited accordingly. Otherwise completely remove all this.
        # # vba_function_name = 'set_plate_types_lock'
        # # vba_code = """
        # # Public Function set_plate_types_lock(type_ess_object_setting_att)
        # #     Dim iLocked (2)
        # #     type_ess_object_setting_att.SetPlateTypesLock iLocked
        # #     set_plate_types_lock = iLocked
        # # End Function
        # # """

        # # system_service = SystemService(self.application.SystemService)
        # # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])

    def __repr__(self):
        return f'TypeEssObjectSettingAtt(name="{ self.name }")'
