code: def set_value(self, value, set_alarm_ts=True, alarm=None, ts=None):
          # type: (Any, bool, Alarm, TimeStamp) -> Any
          
          value = self.meta.validate(value)
          if set_alarm_ts:
              if alarm is None:
                  alarm = Alarm.ok
              else:
                  alarm = deserialize_object(alarm, Alarm)
              if ts is None:
                  ts = TimeStamp()
              else:
                  ts = deserialize_object(ts, TimeStamp)
              self.set_value_alarm_ts(value, alarm, ts)
          else:
              self.set_endpoint_data("value", value)
          return self.value
docs: Set value, calculating alarm and ts if requested