code: def method(self, method):
          
          if method is None:
              raise ValueError("Invalid value for `method`, must not be `None`")  # noqa: E501
          allowed_values = ["WEBHOOK", "EMAIL", "PAGERDUTY"]  # noqa: E501
          if method not in allowed_values:
              raise ValueError(
                  "Invalid value for `method` ({0}), must be one of {1}"  # noqa: E501
                  .format(method, allowed_values)
              )
  
          self._method = method
docs: Sets the method of this Notificant.
  
          The notification method used for notification target.  # noqa: E501
  
          :param method: The method of this Notificant.  # noqa: E501
          :type: str