ESTSettingPowerSmartPowerModeEnable

@interface ESTSettingPowerSmartPowerModeEnable : ESTSettingReadWrite <NSCopying>

ESTSettingPowerSmartPowerModeEnable represents Power SmartPowerModeEnable value.

  • Designated initializer. Validates provided value internally with +validationErrorForValue:.

    See

    +[ESTSettingPowerSmartPowerModeEnable validationErrorForValue:]

    Declaration

    Objective-C

    - (nonnull instancetype)initWithValue:(BOOL)smartPowerModeEnable;

    Swift

    init(value smartPowerModeEnable: Bool)

    Parameters

    smartPowerModeEnable

    Power SmartPowerModeEnable value.

    Return Value

    Initialized object. Nil if validation fails.

  • Returns current value of Power SmartPowerModeEnable setting.

    Declaration

    Objective-C

    - (BOOL)getValue;

    Swift

    func getValue() -> Bool

    Return Value

    Power SmartPowerModeEnable value.

  • Method allows to read value of initialized Power SmartPowerModeEnable setting object.

    Declaration

    Objective-C

    - (void)readValueWithCompletion:
        (nonnull ESTSettingPowerSmartPowerModeEnableCompletionBlock)completion;

    Swift

    func readValue(completion: @escaping ESTSettingPowerSmartPowerModeEnableCompletionBlock)

    Parameters

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

  • Method allows to create write operation from already initialized Power SmartPowerModeEnable setting object. Value provided during initialization will be used as a desired value.

    Declaration

    Objective-C

    - (void)writeValue:(BOOL)smartPowerModeEnable
            completion:(nonnull ESTSettingPowerSmartPowerModeEnableCompletionBlock)
                           completion;

    Swift

    func writeValue(_ smartPowerModeEnable: Bool, completion: @escaping ESTSettingPowerSmartPowerModeEnableCompletionBlock)

    Parameters

    smartPowerModeEnable

    SmartPowerModeEnable value to be written to the device.

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

  • Method checks if provided value is allowed. Returns nil if validation passes.

    Declaration

    Objective-C

    + (NSError *_Nullable)validationErrorForValue:(BOOL)smartPowerModeEnable;

    Swift

    class func validationError(forValue smartPowerModeEnable: Bool) -> Error?

    Parameters

    smartPowerModeEnable

    SmartPowerModeEnable value.

    Return Value

    Error object describing why validation failed. Nil if validation passes.