code: def ReplaceTrigger(self, trigger_link, trigger, options=None):
          
          if options is None:
              options = {}
  
          CosmosClient.__ValidateResource(trigger)
          trigger = trigger.copy()
          if trigger.get('serverScript'):
              trigger['body'] = str(trigger['serverScript'])
          elif trigger.get('body'):
              trigger['body'] = str(trigger['body'])
  
          path = base.GetPathFromLink(trigger_link)
          trigger_id = base.GetResourceIdOrFullNameFromLink(trigger_link)
          return self.Replace(trigger,
                              path,
                              'triggers',
                              trigger_id,
                              None,
                              options)
docs: Replaces a trigger and returns it.
  
          :param str trigger_link:
              The link to the trigger.
          :param dict trigger:
          :param dict options:
              The request options for the request.
  
          :return:
              The replaced Trigger.
          :rtype:
              dict