text: # coding: utf-8
  
  """
      OpsGenie REST API
  
      OpsGenie OpenAPI Specification  # noqa: E501
  
      OpenAPI spec version: 2.0.0
      
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  import pprint
  import re  # noqa: F401
  
  import six
  
  from opsgenie_swagger.models.action_mapping import ActionMapping  # noqa: F401,E501
  from opsgenie_swagger.models.alert_filter import AlertFilter  # noqa: F401,E501
  from opsgenie_swagger.models.integration import Integration  # noqa: F401,E501
  from opsgenie_swagger.models.recipient import Recipient  # noqa: F401,E501
  from opsgenie_swagger.models.service_now_callback import ServiceNowCallback  # noqa: F401,E501
  from opsgenie_swagger.models.team_meta import TeamMeta  # noqa: F401,E501
  from opsgenie_swagger.models.token_based_incoming_feature import TokenBasedIncomingFeature  # noqa: F401,E501
  
  
  class ServiceNowV2Integration(object):
      """NOTE: This class is auto generated by the swagger code generator program.
  
      Do not edit the class manually.
      """
  
      """
      Attributes:
        swagger_types (dict): The key is attribute name
                              and the value is attribute type.
        attribute_map (dict): The key is attribute name
                              and the value is json key in definition.
      """
      swagger_types = {
          'suppress_notifications': 'bool',
          'ignore_teams_from_payload': 'bool',
          'ignore_recipients_from_payload': 'bool',
          'recipients': 'list[Recipient]',
          'is_advanced': 'bool',
          'feature_type': 'str',
          'allow_configuration_access': 'bool',
          'allow_write_access': 'bool',
          'alert_filter': 'AlertFilter',
          'forwarding_enabled': 'bool',
          'forwarding_action_mappings': 'list[ActionMapping]',
          'callback_type': 'str',
          'updates_action_mappings': 'list[ActionMapping]',
          'updates_enabled': 'bool',
          'bidirectional_callback_type': 'str',
          'scripted_rest_apiurl': 'str',
          'servicenow_user_name': 'str',
          'servicenow_password': 'str'
      }
  
      attribute_map = {
          'suppress_notifications': 'suppressNotifications',
          'ignore_teams_from_payload': 'ignoreTeamsFromPayload',
          'ignore_recipients_from_payload': 'ignoreRecipientsFromPayload',
          'recipients': 'recipients',
          'is_advanced': 'isAdvanced',
          'feature_type': 'feature-type',
          'allow_configuration_access': 'allowConfigurationAccess',
          'allow_write_access': 'allowWriteAccess',
          'alert_filter': 'alertFilter',
          'forwarding_enabled': 'forwardingEnabled',
          'forwarding_action_mappings': 'forwardingActionMappings',
          'callback_type': 'callback-type',
          'updates_action_mappings': 'updatesActionMappings',
          'updates_enabled': 'updatesEnabled',
          'bidirectional_callback_type': 'bidirectional-callback-type',
          'scripted_rest_apiurl': 'scriptedRestAPIURL',
          'servicenow_user_name': 'servicenowUserName',
          'servicenow_password': 'servicenowPassword'
      }
  
      def __init__(self, suppress_notifications=None, ignore_teams_from_payload=None, ignore_recipients_from_payload=None, recipients=None, is_advanced=None, feature_type=None, allow_configuration_access=None, allow_write_access=None, alert_filter=None, forwarding_enabled=None, forwarding_action_mappings=None, callback_type=None, updates_action_mappings=None, updates_enabled=None, bidirectional_callback_type=None, scripted_rest_apiurl=None, servicenow_user_name=None, servicenow_password=None):  # noqa: E501
          """ServiceNowV2Integration - a model defined in Swagger"""  # noqa: E501
  
          self._suppress_notifications = None
          self._ignore_teams_from_payload = None
          self._ignore_recipients_from_payload = None
          self._recipients = None
          self._is_advanced = None
          self._feature_type = None
          self._allow_configuration_access = None
          self._allow_write_access = None
          self._alert_filter = None
          self._forwarding_enabled = None
          self._forwarding_action_mappings = None
          self._callback_type = None
          self._updates_action_mappings = None
          self._updates_enabled = None
          self._bidirectional_callback_type = None
          self._scripted_rest_apiurl = None
          self._servicenow_user_name = None
          self._servicenow_password = None
          self.discriminator = None
  
          if suppress_notifications is not None:
              self.suppress_notifications = suppress_notifications
          if ignore_teams_from_payload is not None:
              self.ignore_teams_from_payload = ignore_teams_from_payload
          if ignore_recipients_from_payload is not None:
              self.ignore_recipients_from_payload = ignore_recipients_from_payload
          if recipients is not None:
              self.recipients = recipients
          if is_advanced is not None:
              self.is_advanced = is_advanced
          if feature_type is not None:
              self.feature_type = feature_type
          if allow_configuration_access is not None:
              self.allow_configuration_access = allow_configuration_access
          if allow_write_access is not None:
              self.allow_write_access = allow_write_access
          if alert_filter is not None:
              self.alert_filter = alert_filter
          if forwarding_enabled is not None:
              self.forwarding_enabled = forwarding_enabled
          if forwarding_action_mappings is not None:
              self.forwarding_action_mappings = forwarding_action_mappings
          if callback_type is not None:
              self.callback_type = callback_type
          if updates_action_mappings is not None:
              self.updates_action_mappings = updates_action_mappings
          if updates_enabled is not None:
              self.updates_enabled = updates_enabled
          if bidirectional_callback_type is not None:
              self.bidirectional_callback_type = bidirectional_callback_type
          if scripted_rest_apiurl is not None:
              self.scripted_rest_apiurl = scripted_rest_apiurl
          if servicenow_user_name is not None:
              self.servicenow_user_name = servicenow_user_name
          if servicenow_password is not None:
              self.servicenow_password = servicenow_password
  
      @property
      def suppress_notifications(self):
          """Gets the suppress_notifications of this ServiceNowV2Integration.  # noqa: E501
  
          If enabled, notifications that come from alerts will be suppressed. Defaults to false  # noqa: E501
  
          :return: The suppress_notifications of this ServiceNowV2Integration.  # noqa: E501
          :rtype: bool
          """
          return self._suppress_notifications
  
      @suppress_notifications.setter
      def suppress_notifications(self, suppress_notifications):
          """Sets the suppress_notifications of this ServiceNowV2Integration.
  
          If enabled, notifications that come from alerts will be suppressed. Defaults to false  # noqa: E501
  
          :param suppress_notifications: The suppress_notifications of this ServiceNowV2Integration.  # noqa: E501
          :type: bool
          """
  
          self._suppress_notifications = suppress_notifications
  
      @property
      def ignore_teams_from_payload(self):
          """Gets the ignore_teams_from_payload of this ServiceNowV2Integration.  # noqa: E501
  
          If enabled, the integration will ignore teams sent in request payloads. Defaults to false  # noqa: E501
  
          :return: The ignore_teams_from_payload of this ServiceNowV2Integration.  # noqa: E501
          :rtype: bool
          """
          return self._ignore_teams_from_payload
  
      @ignore_teams_from_payload.setter
      def ignore_teams_from_payload(self, ignore_teams_from_payload):
          """Sets the ignore_teams_from_payload of this ServiceNowV2Integration.
  
          If enabled, the integration will ignore teams sent in request payloads. Defaults to false  # noqa: E501
  
          :param ignore_teams_from_payload: The ignore_teams_from_payload of this ServiceNowV2Integration.  # noqa: E501
          :type: bool
          """
  
          self._ignore_teams_from_payload = ignore_teams_from_payload
  
      @property
      def ignore_recipients_from_payload(self):
          """Gets the ignore_recipients_from_payload of this ServiceNowV2Integration.  # noqa: E501
  
          If enabled, the integration will ignore recipients sent in request payloads. Defaults to false  # noqa: E501
  
          :return: The ignore_recipients_from_payload of this ServiceNowV2Integration.  # noqa: E501
          :rtype: bool
          """
          return self._ignore_recipients_from_payload
  
      @ignore_recipients_from_payload.setter
      def ignore_recipients_from_payload(self, ignore_recipients_from_payload):
          """Sets the ignore_recipients_from_payload of this ServiceNowV2Integration.
  
          If enabled, the integration will ignore recipients sent in request payloads. Defaults to false  # noqa: E501
  
          :param ignore_recipients_from_payload: The ignore_recipients_from_payload of this ServiceNowV2Integration.  # noqa: E501
          :type: bool
          """
  
          self._ignore_recipients_from_payload = ignore_recipients_from_payload
  
      @property
      def recipients(self):
          """Gets the recipients of this ServiceNowV2Integration.  # noqa: E501
  
          Optional user, schedule, teams or escalation names to calculate which users will receive the notifications of the alert. Recipients which are exceeding the limit are ignored  # noqa: E501
  
          :return: The recipients of this ServiceNowV2Integration.  # noqa: E501
          :rtype: list[Recipient]
          """
          return self._recipients
  
      @recipients.setter
      def recipients(self, recipients):
          """Sets the recipients of this ServiceNowV2Integration.
  
          Optional user, schedule, teams or escalation names to calculate which users will receive the notifications of the alert. Recipients which are exceeding the limit are ignored  # noqa: E501
  
          :param recipients: The recipients of this ServiceNowV2Integration.  # noqa: E501
          :type: list[Recipient]
          """
  
          self._recipients = recipients
  
      @property
      def is_advanced(self):
          """Gets the is_advanced of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The is_advanced of this ServiceNowV2Integration.  # noqa: E501
          :rtype: bool
          """
          return self._is_advanced
  
      @is_advanced.setter
      def is_advanced(self, is_advanced):
          """Sets the is_advanced of this ServiceNowV2Integration.
  
  
          :param is_advanced: The is_advanced of this ServiceNowV2Integration.  # noqa: E501
          :type: bool
          """
  
          self._is_advanced = is_advanced
  
      @property
      def feature_type(self):
          """Gets the feature_type of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The feature_type of this ServiceNowV2Integration.  # noqa: E501
          :rtype: str
          """
          return self._feature_type
  
      @feature_type.setter
      def feature_type(self, feature_type):
          """Sets the feature_type of this ServiceNowV2Integration.
  
  
          :param feature_type: The feature_type of this ServiceNowV2Integration.  # noqa: E501
          :type: str
          """
          allowed_values = ["email-based", "token-based"]  # noqa: E501
          if feature_type not in allowed_values:
              raise ValueError(
                  "Invalid value for `feature_type` ({0}), must be one of {1}"  # noqa: E501
                  .format(feature_type, allowed_values)
              )
  
          self._feature_type = feature_type
  
      @property
      def allow_configuration_access(self):
          """Gets the allow_configuration_access of this ServiceNowV2Integration.  # noqa: E501
  
          This parameter is for allowing or restricting the configuration access. If configuration access is restricted, the integration will be limited to Alert API requests and sending heartbeats. Defaults to false  # noqa: E501
  
          :return: The allow_configuration_access of this ServiceNowV2Integration.  # noqa: E501
          :rtype: bool
          """
          return self._allow_configuration_access
  
      @allow_configuration_access.setter
      def allow_configuration_access(self, allow_configuration_access):
          """Sets the allow_configuration_access of this ServiceNowV2Integration.
  
          This parameter is for allowing or restricting the configuration access. If configuration access is restricted, the integration will be limited to Alert API requests and sending heartbeats. Defaults to false  # noqa: E501
  
          :param allow_configuration_access: The allow_configuration_access of this ServiceNowV2Integration.  # noqa: E501
          :type: bool
          """
  
          self._allow_configuration_access = allow_configuration_access
  
      @property
      def allow_write_access(self):
          """Gets the allow_write_access of this ServiceNowV2Integration.  # noqa: E501
  
          This parameter is for configuring the read-only access of integration. If the integration is limited to read-only access, the integration will not be authorized to perform any create, update or delete action within any domain. Defaults to true  # noqa: E501
  
          :return: The allow_write_access of this ServiceNowV2Integration.  # noqa: E501
          :rtype: bool
          """
          return self._allow_write_access
  
      @allow_write_access.setter
      def allow_write_access(self, allow_write_access):
          """Sets the allow_write_access of this ServiceNowV2Integration.
  
          This parameter is for configuring the read-only access of integration. If the integration is limited to read-only access, the integration will not be authorized to perform any create, update or delete action within any domain. Defaults to true  # noqa: E501
  
          :param allow_write_access: The allow_write_access of this ServiceNowV2Integration.  # noqa: E501
          :type: bool
          """
  
          self._allow_write_access = allow_write_access
  
      @property
      def alert_filter(self):
          """Gets the alert_filter of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The alert_filter of this ServiceNowV2Integration.  # noqa: E501
          :rtype: AlertFilter
          """
          return self._alert_filter
  
      @alert_filter.setter
      def alert_filter(self, alert_filter):
          """Sets the alert_filter of this ServiceNowV2Integration.
  
  
          :param alert_filter: The alert_filter of this ServiceNowV2Integration.  # noqa: E501
          :type: AlertFilter
          """
  
          self._alert_filter = alert_filter
  
      @property
      def forwarding_enabled(self):
          """Gets the forwarding_enabled of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The forwarding_enabled of this ServiceNowV2Integration.  # noqa: E501
          :rtype: bool
          """
          return self._forwarding_enabled
  
      @forwarding_enabled.setter
      def forwarding_enabled(self, forwarding_enabled):
          """Sets the forwarding_enabled of this ServiceNowV2Integration.
  
  
          :param forwarding_enabled: The forwarding_enabled of this ServiceNowV2Integration.  # noqa: E501
          :type: bool
          """
  
          self._forwarding_enabled = forwarding_enabled
  
      @property
      def forwarding_action_mappings(self):
          """Gets the forwarding_action_mappings of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The forwarding_action_mappings of this ServiceNowV2Integration.  # noqa: E501
          :rtype: list[ActionMapping]
          """
          return self._forwarding_action_mappings
  
      @forwarding_action_mappings.setter
      def forwarding_action_mappings(self, forwarding_action_mappings):
          """Sets the forwarding_action_mappings of this ServiceNowV2Integration.
  
  
          :param forwarding_action_mappings: The forwarding_action_mappings of this ServiceNowV2Integration.  # noqa: E501
          :type: list[ActionMapping]
          """
  
          self._forwarding_action_mappings = forwarding_action_mappings
  
      @property
      def callback_type(self):
          """Gets the callback_type of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The callback_type of this ServiceNowV2Integration.  # noqa: E501
          :rtype: str
          """
          return self._callback_type
  
      @callback_type.setter
      def callback_type(self, callback_type):
          """Sets the callback_type of this ServiceNowV2Integration.
  
  
          :param callback_type: The callback_type of this ServiceNowV2Integration.  # noqa: E501
          :type: str
          """
          allowed_values = ["bidirectional-callback-new", "amazon-sns-callback"]  # noqa: E501
          if callback_type not in allowed_values:
              raise ValueError(
                  "Invalid value for `callback_type` ({0}), must be one of {1}"  # noqa: E501
                  .format(callback_type, allowed_values)
              )
  
          self._callback_type = callback_type
  
      @property
      def updates_action_mappings(self):
          """Gets the updates_action_mappings of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The updates_action_mappings of this ServiceNowV2Integration.  # noqa: E501
          :rtype: list[ActionMapping]
          """
          return self._updates_action_mappings
  
      @updates_action_mappings.setter
      def updates_action_mappings(self, updates_action_mappings):
          """Sets the updates_action_mappings of this ServiceNowV2Integration.
  
  
          :param updates_action_mappings: The updates_action_mappings of this ServiceNowV2Integration.  # noqa: E501
          :type: list[ActionMapping]
          """
  
          self._updates_action_mappings = updates_action_mappings
  
      @property
      def updates_enabled(self):
          """Gets the updates_enabled of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The updates_enabled of this ServiceNowV2Integration.  # noqa: E501
          :rtype: bool
          """
          return self._updates_enabled
  
      @updates_enabled.setter
      def updates_enabled(self, updates_enabled):
          """Sets the updates_enabled of this ServiceNowV2Integration.
  
  
          :param updates_enabled: The updates_enabled of this ServiceNowV2Integration.  # noqa: E501
          :type: bool
          """
  
          self._updates_enabled = updates_enabled
  
      @property
      def bidirectional_callback_type(self):
          """Gets the bidirectional_callback_type of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The bidirectional_callback_type of this ServiceNowV2Integration.  # noqa: E501
          :rtype: str
          """
          return self._bidirectional_callback_type
  
      @bidirectional_callback_type.setter
      def bidirectional_callback_type(self, bidirectional_callback_type):
          """Sets the bidirectional_callback_type of this ServiceNowV2Integration.
  
  
          :param bidirectional_callback_type: The bidirectional_callback_type of this ServiceNowV2Integration.  # noqa: E501
          :type: str
          """
          allowed_values = ["opsgenie-callback", "jira-callback", "jira-service-desk-callback", "service-now-callback", "kayako-callback", "ms-teams-callback", "op5-callback", "status-page-io-callback", "zendesk-callback"]  # noqa: E501
          if bidirectional_callback_type not in allowed_values:
              raise ValueError(
                  "Invalid value for `bidirectional_callback_type` ({0}), must be one of {1}"  # noqa: E501
                  .format(bidirectional_callback_type, allowed_values)
              )
  
          self._bidirectional_callback_type = bidirectional_callback_type
  
      @property
      def scripted_rest_apiurl(self):
          """Gets the scripted_rest_apiurl of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The scripted_rest_apiurl of this ServiceNowV2Integration.  # noqa: E501
          :rtype: str
          """
          return self._scripted_rest_apiurl
  
      @scripted_rest_apiurl.setter
      def scripted_rest_apiurl(self, scripted_rest_apiurl):
          """Sets the scripted_rest_apiurl of this ServiceNowV2Integration.
  
  
          :param scripted_rest_apiurl: The scripted_rest_apiurl of this ServiceNowV2Integration.  # noqa: E501
          :type: str
          """
  
          self._scripted_rest_apiurl = scripted_rest_apiurl
  
      @property
      def servicenow_user_name(self):
          """Gets the servicenow_user_name of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The servicenow_user_name of this ServiceNowV2Integration.  # noqa: E501
          :rtype: str
          """
          return self._servicenow_user_name
  
      @servicenow_user_name.setter
      def servicenow_user_name(self, servicenow_user_name):
          """Sets the servicenow_user_name of this ServiceNowV2Integration.
  
  
          :param servicenow_user_name: The servicenow_user_name of this ServiceNowV2Integration.  # noqa: E501
          :type: str
          """
  
          self._servicenow_user_name = servicenow_user_name
  
      @property
      def servicenow_password(self):
          """Gets the servicenow_password of this ServiceNowV2Integration.  # noqa: E501
  
  
          :return: The servicenow_password of this ServiceNowV2Integration.  # noqa: E501
          :rtype: str
          """
          return self._servicenow_password
  
      @servicenow_password.setter
      def servicenow_password(self, servicenow_password):
          """Sets the servicenow_password of this ServiceNowV2Integration.
  
  
          :param servicenow_password: The servicenow_password of this ServiceNowV2Integration.  # noqa: E501
          :type: str
          """
  
          self._servicenow_password = servicenow_password
  
      def to_dict(self):
          """Returns the model properties as a dict"""
          result = {}
  
          for attr, _ in six.iteritems(self.swagger_types):
              value = getattr(self, attr)
              if isinstance(value, list):
                  result[attr] = list(map(
                      lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                      value
                  ))
              elif hasattr(value, "to_dict"):
                  result[attr] = value.to_dict()
              elif isinstance(value, dict):
                  result[attr] = dict(map(
                      lambda item: (item[0], item[1].to_dict())
                      if hasattr(item[1], "to_dict") else item,
                      value.items()
                  ))
              else:
                  result[attr] = value
  
          return result
  
      def to_str(self):
          """Returns the string representation of the model"""
          return pprint.pformat(self.to_dict())
  
      def __repr__(self):
          """For `print` and `pprint`"""
          return self.to_str()
  
      def __eq__(self, other):
          """Returns true if both objects are equal"""
          if not isinstance(other, ServiceNowV2Integration):
              return False
  
          return self.__dict__ == other.__dict__
  
      def __ne__(self, other):
          """Returns true if both objects are not equal"""
          return not self == other
  