github.com/newrelic/newrelic-client-go@v1.1.0/pkg/notifications/types.go (about)

     1  // Code generated by tutone: DO NOT EDIT
     2  package notifications
     3  
     4  import (
     5  	"encoding/json"
     6  	"fmt"
     7  
     8  	"github.com/newrelic/newrelic-client-go/pkg/ai"
     9  	"github.com/newrelic/newrelic-client-go/pkg/nrtime"
    10  )
    11  
    12  // AiNotificationsAuthType - Authentication types
    13  type AiNotificationsAuthType string
    14  
    15  var AiNotificationsAuthTypeTypes = struct {
    16  	// Basic user and password authentication
    17  	BASIC AiNotificationsAuthType
    18  	// OAuth based authentication
    19  	OAUTH2 AiNotificationsAuthType
    20  	// Token based authentication
    21  	TOKEN AiNotificationsAuthType
    22  }{
    23  	// Basic user and password authentication
    24  	BASIC: "BASIC",
    25  	// OAuth based authentication
    26  	OAUTH2: "OAUTH2",
    27  	// Token based authentication
    28  	TOKEN: "TOKEN",
    29  }
    30  
    31  // AiNotificationsChannelFields - Channel fields to filter by
    32  type AiNotificationsChannelFields string
    33  
    34  var AiNotificationsChannelFieldsTypes = struct {
    35  	// active field
    36  	ACTIVE AiNotificationsChannelFields
    37  	// created timestamp field
    38  	CREATED_AT AiNotificationsChannelFields
    39  	// default field
    40  	DEFAULT AiNotificationsChannelFields
    41  	// destination id field
    42  	DESTINATION_ID AiNotificationsChannelFields
    43  	// name field
    44  	NAME AiNotificationsChannelFields
    45  	// product field
    46  	PRODUCT AiNotificationsChannelFields
    47  	// status field
    48  	STATUS AiNotificationsChannelFields
    49  	// type field
    50  	TYPE AiNotificationsChannelFields
    51  	// updated timestamp field
    52  	UPDATED_AT AiNotificationsChannelFields
    53  	// updated_by field
    54  	UPDATED_BY AiNotificationsChannelFields
    55  }{
    56  	// active field
    57  	ACTIVE: "ACTIVE",
    58  	// created timestamp field
    59  	CREATED_AT: "CREATED_AT",
    60  	// default field
    61  	DEFAULT: "DEFAULT",
    62  	// destination id field
    63  	DESTINATION_ID: "DESTINATION_ID",
    64  	// name field
    65  	NAME: "NAME",
    66  	// product field
    67  	PRODUCT: "PRODUCT",
    68  	// status field
    69  	STATUS: "STATUS",
    70  	// type field
    71  	TYPE: "TYPE",
    72  	// updated timestamp field
    73  	UPDATED_AT: "UPDATED_AT",
    74  	// updated_by field
    75  	UPDATED_BY: "UPDATED_BY",
    76  }
    77  
    78  // AiNotificationsChannelStatus - Channel statuses
    79  type AiNotificationsChannelStatus string
    80  
    81  var AiNotificationsChannelStatusTypes = struct {
    82  	// Configuration Error channel status
    83  	CONFIGURATION_ERROR AiNotificationsChannelStatus
    84  	// Configuration Warning channel status
    85  	CONFIGURATION_WARNING AiNotificationsChannelStatus
    86  	// Default channel status
    87  	DEFAULT AiNotificationsChannelStatus
    88  	// Draft channel status
    89  	DRAFT AiNotificationsChannelStatus
    90  	// Error channel status
    91  	ERROR AiNotificationsChannelStatus
    92  	// Tested channel status
    93  	TESTED AiNotificationsChannelStatus
    94  	// Throttled channel status
    95  	THROTTLED AiNotificationsChannelStatus
    96  	// Unknown Error channel status
    97  	UNKNOWN_ERROR AiNotificationsChannelStatus
    98  }{
    99  	// Configuration Error channel status
   100  	CONFIGURATION_ERROR: "CONFIGURATION_ERROR",
   101  	// Configuration Warning channel status
   102  	CONFIGURATION_WARNING: "CONFIGURATION_WARNING",
   103  	// Default channel status
   104  	DEFAULT: "DEFAULT",
   105  	// Draft channel status
   106  	DRAFT: "DRAFT",
   107  	// Error channel status
   108  	ERROR: "ERROR",
   109  	// Tested channel status
   110  	TESTED: "TESTED",
   111  	// Throttled channel status
   112  	THROTTLED: "THROTTLED",
   113  	// Unknown Error channel status
   114  	UNKNOWN_ERROR: "UNKNOWN_ERROR",
   115  }
   116  
   117  // AiNotificationsChannelType - Channel type
   118  type AiNotificationsChannelType string
   119  
   120  var AiNotificationsChannelTypeTypes = struct {
   121  	// Email channel type
   122  	EMAIL AiNotificationsChannelType
   123  	// Event Bridge channel type
   124  	EVENT_BRIDGE AiNotificationsChannelType
   125  	// Jira Classic channel type
   126  	JIRA_CLASSIC AiNotificationsChannelType
   127  	// Jira Nextgen channel type
   128  	JIRA_NEXTGEN AiNotificationsChannelType
   129  	// Mobile push channel type
   130  	MOBILE_PUSH AiNotificationsChannelType
   131  	// PagerDuty channel type
   132  	PAGERDUTY_ACCOUNT_INTEGRATION AiNotificationsChannelType
   133  	// Pager Duty channel type
   134  	PAGERDUTY_SERVICE_INTEGRATION AiNotificationsChannelType
   135  	// Servicenow events channel type
   136  	SERVICENOW_EVENTS AiNotificationsChannelType
   137  	// Servicenow incidents channel type
   138  	SERVICENOW_INCIDENTS AiNotificationsChannelType
   139  	// Slack channel type
   140  	SLACK AiNotificationsChannelType
   141  	// Slack Collaboration channel type
   142  	SLACK_COLLABORATION AiNotificationsChannelType
   143  	// Legacy Slack channel type based on Incoming Webhooks
   144  	SLACK_LEGACY AiNotificationsChannelType
   145  	// Webhook channel type
   146  	WEBHOOK AiNotificationsChannelType
   147  }{
   148  	// Email channel type
   149  	EMAIL: "EMAIL",
   150  	// Event Bridge channel type
   151  	EVENT_BRIDGE: "EVENT_BRIDGE",
   152  	// Jira Classic channel type
   153  	JIRA_CLASSIC: "JIRA_CLASSIC",
   154  	// Jira Nextgen channel type
   155  	JIRA_NEXTGEN: "JIRA_NEXTGEN",
   156  	// Mobile push channel type
   157  	MOBILE_PUSH: "MOBILE_PUSH",
   158  	// PagerDuty channel type
   159  	PAGERDUTY_ACCOUNT_INTEGRATION: "PAGERDUTY_ACCOUNT_INTEGRATION",
   160  	// Pager Duty channel type
   161  	PAGERDUTY_SERVICE_INTEGRATION: "PAGERDUTY_SERVICE_INTEGRATION",
   162  	// Servicenow events channel type
   163  	SERVICENOW_EVENTS: "SERVICENOW_EVENTS",
   164  	// Servicenow incidents channel type
   165  	SERVICENOW_INCIDENTS: "SERVICENOW_INCIDENTS",
   166  	// Slack channel type
   167  	SLACK: "SLACK",
   168  	// Slack Collaboration channel type
   169  	SLACK_COLLABORATION: "SLACK_COLLABORATION",
   170  	// Legacy Slack channel type based on Incoming Webhooks
   171  	SLACK_LEGACY: "SLACK_LEGACY",
   172  	// Webhook channel type
   173  	WEBHOOK: "WEBHOOK",
   174  }
   175  
   176  // AiNotificationsDestinationFields - Destination fields
   177  type AiNotificationsDestinationFields string
   178  
   179  var AiNotificationsDestinationFieldsTypes = struct {
   180  	// active field
   181  	ACTIVE AiNotificationsDestinationFields
   182  	// created_at field
   183  	CREATED_AT AiNotificationsDestinationFields
   184  	// default field
   185  	DEFAULT AiNotificationsDestinationFields
   186  	// last_sent field
   187  	LAST_SENT AiNotificationsDestinationFields
   188  	// name field
   189  	NAME AiNotificationsDestinationFields
   190  	// status field
   191  	STATUS AiNotificationsDestinationFields
   192  	// type field
   193  	TYPE AiNotificationsDestinationFields
   194  	// updated_at field
   195  	UPDATED_AT AiNotificationsDestinationFields
   196  	// updated_by field
   197  	UPDATED_BY AiNotificationsDestinationFields
   198  }{
   199  	// active field
   200  	ACTIVE: "ACTIVE",
   201  	// created_at field
   202  	CREATED_AT: "CREATED_AT",
   203  	// default field
   204  	DEFAULT: "DEFAULT",
   205  	// last_sent field
   206  	LAST_SENT: "LAST_SENT",
   207  	// name field
   208  	NAME: "NAME",
   209  	// status field
   210  	STATUS: "STATUS",
   211  	// type field
   212  	TYPE: "TYPE",
   213  	// updated_at field
   214  	UPDATED_AT: "UPDATED_AT",
   215  	// updated_by field
   216  	UPDATED_BY: "UPDATED_BY",
   217  }
   218  
   219  // AiNotificationsDestinationStatus - Destination statuses
   220  type AiNotificationsDestinationStatus string
   221  
   222  var AiNotificationsDestinationStatusTypes = struct {
   223  	// Authentication Error destination status
   224  	AUTHENTICATION_ERROR AiNotificationsDestinationStatus
   225  	// Authorization Error destination status
   226  	AUTHORIZATION_ERROR AiNotificationsDestinationStatus
   227  	// Authorization Warning destination status
   228  	AUTHORIZATION_WARNING AiNotificationsDestinationStatus
   229  	// Configuration Error destination status
   230  	CONFIGURATION_ERROR AiNotificationsDestinationStatus
   231  	// Default destination status
   232  	DEFAULT AiNotificationsDestinationStatus
   233  	// Draft channel status
   234  	DRAFT AiNotificationsDestinationStatus
   235  	// Error channel status
   236  	ERROR AiNotificationsDestinationStatus
   237  	// Temporary Warning destination status
   238  	TEMPORARY_WARNING AiNotificationsDestinationStatus
   239  	// Tested channel status
   240  	TESTED AiNotificationsDestinationStatus
   241  	// Throttled channel status
   242  	THROTTLED AiNotificationsDestinationStatus
   243  	// Throttling Warning destination status
   244  	THROTTLING_WARNING AiNotificationsDestinationStatus
   245  	// Unknown Error destination status
   246  	UNKNOWN_ERROR AiNotificationsDestinationStatus
   247  }{
   248  	// Authentication Error destination status
   249  	AUTHENTICATION_ERROR: "AUTHENTICATION_ERROR",
   250  	// Authorization Error destination status
   251  	AUTHORIZATION_ERROR: "AUTHORIZATION_ERROR",
   252  	// Authorization Warning destination status
   253  	AUTHORIZATION_WARNING: "AUTHORIZATION_WARNING",
   254  	// Configuration Error destination status
   255  	CONFIGURATION_ERROR: "CONFIGURATION_ERROR",
   256  	// Default destination status
   257  	DEFAULT: "DEFAULT",
   258  	// Draft channel status
   259  	DRAFT: "DRAFT",
   260  	// Error channel status
   261  	ERROR: "ERROR",
   262  	// Temporary Warning destination status
   263  	TEMPORARY_WARNING: "TEMPORARY_WARNING",
   264  	// Tested channel status
   265  	TESTED: "TESTED",
   266  	// Throttled channel status
   267  	THROTTLED: "THROTTLED",
   268  	// Throttling Warning destination status
   269  	THROTTLING_WARNING: "THROTTLING_WARNING",
   270  	// Unknown Error destination status
   271  	UNKNOWN_ERROR: "UNKNOWN_ERROR",
   272  }
   273  
   274  // AiNotificationsDestinationType - Destination types
   275  type AiNotificationsDestinationType string
   276  
   277  var AiNotificationsDestinationTypeTypes = struct {
   278  	// Email destination type
   279  	EMAIL AiNotificationsDestinationType
   280  	// EventBridge destination type
   281  	EVENT_BRIDGE AiNotificationsDestinationType
   282  	// Jira destination type
   283  	JIRA AiNotificationsDestinationType
   284  	// Mobile push destination type
   285  	MOBILE_PUSH AiNotificationsDestinationType
   286  	// PagerDuty destination type
   287  	PAGERDUTY_ACCOUNT_INTEGRATION AiNotificationsDestinationType
   288  	// PagerDuty destination type}
   289  	PAGERDUTY_SERVICE_INTEGRATION AiNotificationsDestinationType
   290  	// ServiceNow destination type
   291  	SERVICE_NOW AiNotificationsDestinationType
   292  	// Slack destination type
   293  	SLACK AiNotificationsDestinationType
   294  	// Slack Collaboration destination type
   295  	SLACK_COLLABORATION AiNotificationsDestinationType
   296  	// Legacy Slack destination type based on Incoming Webhooks
   297  	SLACK_LEGACY AiNotificationsDestinationType
   298  	// WebHook destination type
   299  	WEBHOOK AiNotificationsDestinationType
   300  }{
   301  	// Email destination type
   302  	EMAIL: "EMAIL",
   303  	// EventBridge destination type
   304  	EVENT_BRIDGE: "EVENT_BRIDGE",
   305  	// Jira destination type
   306  	JIRA: "JIRA",
   307  	// Mobile push destination type
   308  	MOBILE_PUSH: "MOBILE_PUSH",
   309  	// PagerDuty destination type
   310  	PAGERDUTY_ACCOUNT_INTEGRATION: "PAGERDUTY_ACCOUNT_INTEGRATION",
   311  	// PagerDuty destination type}
   312  	PAGERDUTY_SERVICE_INTEGRATION: "PAGERDUTY_SERVICE_INTEGRATION",
   313  	// ServiceNow destination type
   314  	SERVICE_NOW: "SERVICE_NOW",
   315  	// Slack destination type
   316  	SLACK: "SLACK",
   317  	// Slack Collaboration destination type
   318  	SLACK_COLLABORATION: "SLACK_COLLABORATION",
   319  	// Legacy Slack destination type based on Incoming Webhooks
   320  	SLACK_LEGACY: "SLACK_LEGACY",
   321  	// WebHook destination type
   322  	WEBHOOK: "WEBHOOK",
   323  }
   324  
   325  // AiNotificationsErrorType - Error types
   326  type AiNotificationsErrorType string
   327  
   328  var AiNotificationsErrorTypeTypes = struct {
   329  	// Unable to connect to external service to perform this action
   330  	CONNECTION_ERROR AiNotificationsErrorType
   331  	// This operation could not be completed because the entity is in use
   332  	ENTITY_IN_USE AiNotificationsErrorType
   333  	// The credentials provided were invalid, Please check them and try again
   334  	INVALID_CREDENTIALS AiNotificationsErrorType
   335  	// Could not provide suggestions for this key
   336  	INVALID_KEY AiNotificationsErrorType
   337  	// The parameter provided does not correspond to any valid entity
   338  	INVALID_PARAMETER AiNotificationsErrorType
   339  	// Entities limit has been reached
   340  	LIMIT_REACHED AiNotificationsErrorType
   341  	// User is missing capabilities
   342  	MISSING_CAPABILITIES AiNotificationsErrorType
   343  	// This key requires additional constraints
   344  	MISSING_CONSTRAINTS AiNotificationsErrorType
   345  	// At least one parameter is required to complete this action
   346  	MISSING_PARAMETERS AiNotificationsErrorType
   347  	// This destination does not support OAuth authentication
   348  	OAUTH_NOT_SUPPORTED AiNotificationsErrorType
   349  	// This destination does not provide any suggestions
   350  	SUGGESTIONS_UNAVAILABLE AiNotificationsErrorType
   351  	// Request did not finish within time limit
   352  	TIMEOUT_ERROR AiNotificationsErrorType
   353  	// The variable type is different from the example type
   354  	TYPE_EXAMPLE_MISMATCH AiNotificationsErrorType
   355  	// This account is not allowed to perform this action
   356  	UNAUTHORIZED_ACCOUNT AiNotificationsErrorType
   357  	// Received one or more unexpected parameters
   358  	UNEXPECTED_PARAMETER AiNotificationsErrorType
   359  	// An unknown error has occurred
   360  	UNKNOWN_ERROR AiNotificationsErrorType
   361  }{
   362  	// Unable to connect to external service to perform this action
   363  	CONNECTION_ERROR: "CONNECTION_ERROR",
   364  	// This operation could not be completed because the entity is in use
   365  	ENTITY_IN_USE: "ENTITY_IN_USE",
   366  	// The credentials provided were invalid, Please check them and try again
   367  	INVALID_CREDENTIALS: "INVALID_CREDENTIALS",
   368  	// Could not provide suggestions for this key
   369  	INVALID_KEY: "INVALID_KEY",
   370  	// The parameter provided does not correspond to any valid entity
   371  	INVALID_PARAMETER: "INVALID_PARAMETER",
   372  	// Entities limit has been reached
   373  	LIMIT_REACHED: "LIMIT_REACHED",
   374  	// User is missing capabilities
   375  	MISSING_CAPABILITIES: "MISSING_CAPABILITIES",
   376  	// This key requires additional constraints
   377  	MISSING_CONSTRAINTS: "MISSING_CONSTRAINTS",
   378  	// At least one parameter is required to complete this action
   379  	MISSING_PARAMETERS: "MISSING_PARAMETERS",
   380  	// This destination does not support OAuth authentication
   381  	OAUTH_NOT_SUPPORTED: "OAUTH_NOT_SUPPORTED",
   382  	// This destination does not provide any suggestions
   383  	SUGGESTIONS_UNAVAILABLE: "SUGGESTIONS_UNAVAILABLE",
   384  	// Request did not finish within time limit
   385  	TIMEOUT_ERROR: "TIMEOUT_ERROR",
   386  	// The variable type is different from the example type
   387  	TYPE_EXAMPLE_MISMATCH: "TYPE_EXAMPLE_MISMATCH",
   388  	// This account is not allowed to perform this action
   389  	UNAUTHORIZED_ACCOUNT: "UNAUTHORIZED_ACCOUNT",
   390  	// Received one or more unexpected parameters
   391  	UNEXPECTED_PARAMETER: "UNEXPECTED_PARAMETER",
   392  	// An unknown error has occurred
   393  	UNKNOWN_ERROR: "UNKNOWN_ERROR",
   394  }
   395  
   396  // AiNotificationsProduct - Product types
   397  type AiNotificationsProduct string
   398  
   399  var AiNotificationsProductTypes = struct {
   400  	// Alerts product type
   401  	ALERTS AiNotificationsProduct
   402  	// Discussions and comments product type
   403  	DISCUSSIONS AiNotificationsProduct
   404  	// Error Tracking product type
   405  	ERROR_TRACKING AiNotificationsProduct
   406  	// Incident Intelligence product type
   407  	IINT AiNotificationsProduct
   408  	// Notifications internal product type
   409  	NTFC AiNotificationsProduct
   410  	// Proactive Detection product type
   411  	PD AiNotificationsProduct
   412  	// Sharing product type
   413  	SHARING AiNotificationsProduct
   414  }{
   415  	// Alerts product type
   416  	ALERTS: "ALERTS",
   417  	// Discussions and comments product type
   418  	DISCUSSIONS: "DISCUSSIONS",
   419  	// Error Tracking product type
   420  	ERROR_TRACKING: "ERROR_TRACKING",
   421  	// Incident Intelligence product type
   422  	IINT: "IINT",
   423  	// Notifications internal product type
   424  	NTFC: "NTFC",
   425  	// Proactive Detection product type
   426  	PD: "PD",
   427  	// Sharing product type
   428  	SHARING: "SHARING",
   429  }
   430  
   431  // AiNotificationsSortOrder - Sort order
   432  type AiNotificationsSortOrder string
   433  
   434  var AiNotificationsSortOrderTypes = struct {
   435  	// Ascending sort order
   436  	ASC AiNotificationsSortOrder
   437  	// Descending sort order
   438  	DESC AiNotificationsSortOrder
   439  }{
   440  	// Ascending sort order
   441  	ASC: "ASC",
   442  	// Descending sort order
   443  	DESC: "DESC",
   444  }
   445  
   446  // AlertsNotificationChannelType - The type of the notification channel which determines its configuration field.
   447  type AlertsNotificationChannelType string
   448  
   449  var AlertsNotificationChannelTypeTypes = struct {
   450  	// Campfire notification channel.
   451  	CAMPFIRE AlertsNotificationChannelType
   452  	// Email notification channel.
   453  	EMAIL AlertsNotificationChannelType
   454  	// HipChat notification channel.
   455  	HIP_CHAT AlertsNotificationChannelType
   456  	// OpsGenie notification channel.
   457  	OPSGENIE AlertsNotificationChannelType
   458  	// PagerDuty notification channel.
   459  	PAGERDUTY AlertsNotificationChannelType
   460  	// Slack notification channel.
   461  	SLACK AlertsNotificationChannelType
   462  	// User notification channel.
   463  	USER AlertsNotificationChannelType
   464  	// VictorOps notification channel.
   465  	VICTOROPS AlertsNotificationChannelType
   466  	// Webhook notification channel.
   467  	WEBHOOK AlertsNotificationChannelType
   468  	// xMatters notification channel.
   469  	XMATTERS AlertsNotificationChannelType
   470  }{
   471  	// Campfire notification channel.
   472  	CAMPFIRE: "CAMPFIRE",
   473  	// Email notification channel.
   474  	EMAIL: "EMAIL",
   475  	// HipChat notification channel.
   476  	HIP_CHAT: "HIP_CHAT",
   477  	// OpsGenie notification channel.
   478  	OPSGENIE: "OPSGENIE",
   479  	// PagerDuty notification channel.
   480  	PAGERDUTY: "PAGERDUTY",
   481  	// Slack notification channel.
   482  	SLACK: "SLACK",
   483  	// User notification channel.
   484  	USER: "USER",
   485  	// VictorOps notification channel.
   486  	VICTOROPS: "VICTOROPS",
   487  	// Webhook notification channel.
   488  	WEBHOOK: "WEBHOOK",
   489  	// xMatters notification channel.
   490  	XMATTERS: "XMATTERS",
   491  }
   492  
   493  // AlertsOpsGenieDataCenterRegion - OpsGenie data center region
   494  type AlertsOpsGenieDataCenterRegion string
   495  
   496  var AlertsOpsGenieDataCenterRegionTypes = struct {
   497  	// EU data center region
   498  	EU AlertsOpsGenieDataCenterRegion
   499  	// US data center region
   500  	US AlertsOpsGenieDataCenterRegion
   501  }{
   502  	// EU data center region
   503  	EU: "EU",
   504  	// US data center region
   505  	US: "US",
   506  }
   507  
   508  // AlertsWebhookCustomPayloadType - Webhook custom payload type
   509  type AlertsWebhookCustomPayloadType string
   510  
   511  var AlertsWebhookCustomPayloadTypeTypes = struct {
   512  	// FORM payload type
   513  	FORM AlertsWebhookCustomPayloadType
   514  	// JSON payload type
   515  	JSON AlertsWebhookCustomPayloadType
   516  }{
   517  	// FORM payload type
   518  	FORM: "FORM",
   519  	// JSON payload type
   520  	JSON: "JSON",
   521  }
   522  
   523  // Account - The `Account` object provides general data about the account, as well as
   524  // being the entry point into more detailed data about a single account.
   525  //
   526  // Account configuration data is queried through this object, as well as
   527  // telemetry data that is specific to a single account.
   528  type Account struct {
   529  	// This field provides access to AiNotifications data.
   530  	AiNotifications AiNotificationsAccountStitchedFields `json:"aiNotifications,omitempty"`
   531  	//
   532  	ID int `json:"id,omitempty"`
   533  	//
   534  	LicenseKey string `json:"licenseKey,omitempty"`
   535  	//
   536  	Name string `json:"name,omitempty"`
   537  }
   538  
   539  // Actor - The `Actor` object contains fields that are scoped to the API user's access level.
   540  type Actor struct {
   541  	// The `account` field is the entry point into data that is scoped to a single account.
   542  	Account Account `json:"account,omitempty"`
   543  }
   544  
   545  // AiNotificationsAccountStitchedFields -
   546  type AiNotificationsAccountStitchedFields struct {
   547  	// Fetch a Channel by product
   548  	Channels AiNotificationsChannelsResponse `json:"channels,omitempty"`
   549  	// Fetch a Destinations by type
   550  	Destinations AiNotificationsDestinationsResponse `json:"destinations,omitempty"`
   551  }
   552  
   553  // AiNotificationsBasicAuthInput - Basic auth input object
   554  type AiNotificationsBasicAuthInput struct {
   555  	// password
   556  	Password SecureValue `json:"password"`
   557  	// user
   558  	User string `json:"user"`
   559  }
   560  
   561  // AiNotificationsChannel - Channel object
   562  type AiNotificationsChannel struct {
   563  	// The accountId of the creator of the channel
   564  	AccountID int `json:"accountId"`
   565  	// Is channel active
   566  	Active bool `json:"active"`
   567  	// Channel creation time
   568  	CreatedAt nrtime.DateTime `json:"createdAt"`
   569  	// Related destination type
   570  	DestinationId string `json:"destinationId"`
   571  	// Channel id
   572  	ID string `json:"id"`
   573  	// Channel name
   574  	Name string `json:"name"`
   575  	// Related product type
   576  	Product AiNotificationsProduct `json:"product"`
   577  	// List of destination property types
   578  	Properties []AiNotificationsProperty `json:"properties"`
   579  	// Channel Status
   580  	Status AiNotificationsChannelStatus `json:"status"`
   581  	// Channel type
   582  	Type AiNotificationsChannelType `json:"type"`
   583  	// Channel last update time
   584  	UpdatedAt nrtime.DateTime `json:"updatedAt"`
   585  	// Message template creator userId
   586  	UpdatedBy int `json:"updatedBy"`
   587  }
   588  
   589  // AiNotificationsChannelFilter - Filter channel object
   590  type AiNotificationsChannelFilter struct {
   591  	// active
   592  	Active bool `json:"active,omitempty"`
   593  	// destinationId
   594  	DestinationId string `json:"destinationId,omitempty"`
   595  	// id
   596  	ID string `json:"id,omitempty"`
   597  	// name
   598  	Name string `json:"name,omitempty"`
   599  	// product
   600  	Product AiNotificationsProduct `json:"product,omitempty"`
   601  	// property
   602  	Property AiNotificationsPropertyFilter `json:"property,omitempty"`
   603  	// type
   604  	Type AiNotificationsChannelType `json:"type,omitempty"`
   605  }
   606  
   607  // AiNotificationsChannelInput - Channel input object
   608  type AiNotificationsChannelInput struct {
   609  	// destinationId
   610  	DestinationId string `json:"destinationId"`
   611  	// name
   612  	Name string `json:"name"`
   613  	// product
   614  	Product AiNotificationsProduct `json:"product"`
   615  	// properties
   616  	Properties []AiNotificationsPropertyInput `json:"properties,omitempty"`
   617  	// type
   618  	Type AiNotificationsChannelType `json:"type"`
   619  }
   620  
   621  // AiNotificationsChannelResponse - Response for all channel related mutations. Includes relevant channel and/or errors
   622  type AiNotificationsChannelResponse struct {
   623  	// Successfully mutated channel
   624  	Channel AiNotificationsChannel `json:"channel,omitempty"`
   625  	// Error in channel mutation
   626  	Error ai.AiNotificationsError `json:"error,omitempty"`
   627  	// Deprecated list of errors
   628  	Errors []ai.AiNotificationsError `json:"errors"`
   629  }
   630  
   631  // AiNotificationsChannelSorter - Sort object
   632  type AiNotificationsChannelSorter struct {
   633  	// direction
   634  	Direction AiNotificationsSortOrder `json:"direction"`
   635  	// field
   636  	Field AiNotificationsChannelFields `json:"field"`
   637  }
   638  
   639  // AiNotificationsChannelUpdate - Channel update object
   640  type AiNotificationsChannelUpdate struct {
   641  	// active
   642  	Active bool `json:"active,omitempty"`
   643  	// name
   644  	Name string `json:"name,omitempty"`
   645  	// properties
   646  	Properties []AiNotificationsPropertyInput `json:"properties,omitempty"`
   647  }
   648  
   649  // AiNotificationsChannelsResponse - Channel result object
   650  type AiNotificationsChannelsResponse struct {
   651  	// Channel entities
   652  	Entities []AiNotificationsChannel `json:"entities"`
   653  	// Error in channel entities fetching
   654  	Error AiNotificationsResponseError `json:"error,omitempty"`
   655  	// Deprecated list of errors
   656  	Errors []AiNotificationsResponseError `json:"errors"`
   657  	// Cursor to get the next batch of results
   658  	NextCursor string `json:"nextCursor,omitempty"`
   659  	// Count of all channel entities
   660  	TotalCount int `json:"totalCount"`
   661  }
   662  
   663  // AiNotificationsCredentialsInput - Credential input object
   664  type AiNotificationsCredentialsInput struct {
   665  	// basic
   666  	Basic AiNotificationsBasicAuthInput `json:"basic,omitempty"`
   667  	// oauth2
   668  	Oauth2 AiNotificationsOAuth2AuthInput `json:"oauth2,omitempty"`
   669  	// token
   670  	Token AiNotificationsTokenAuthInput `json:"token,omitempty"`
   671  	// type
   672  	Type AiNotificationsAuthType `json:"type"`
   673  }
   674  
   675  // AiNotificationsDeleteResponse - Delete response object
   676  type AiNotificationsDeleteResponse struct {
   677  	// Error in object deletion
   678  	Error AiNotificationsResponseError `json:"error,omitempty"`
   679  	// Deprecated list of errors
   680  	Errors []AiNotificationsResponseError `json:"errors"`
   681  	// Deleted object ids
   682  	IDs []string `json:"ids"`
   683  }
   684  
   685  // AiNotificationsDestination - Destination Object
   686  type AiNotificationsDestination struct {
   687  	// The accountId of the creator of the destination
   688  	AccountID int `json:"accountId"`
   689  	// Destination active
   690  	Active bool `json:"active"`
   691  	// Authentication for this destination
   692  	Auth ai.AiNotificationsAuth `json:"auth,omitempty"`
   693  	// Destination created at
   694  	CreatedAt nrtime.DateTime `json:"createdAt"`
   695  	// Destination id
   696  	ID string `json:"id"`
   697  	// Indicates whether the user is authenticated with the destination
   698  	IsUserAuthenticated bool `json:"isUserAuthenticated"`
   699  	// Last time a notification was sent
   700  	LastSent nrtime.DateTime `json:"lastSent,omitempty"`
   701  	// Destination name
   702  	Name string `json:"name"`
   703  	// List of destination property types
   704  	Properties []AiNotificationsProperty `json:"properties"`
   705  	// Destination status
   706  	Status AiNotificationsDestinationStatus `json:"status"`
   707  	// Destination type
   708  	Type AiNotificationsDestinationType `json:"type"`
   709  	// Destination updated at
   710  	UpdatedAt nrtime.DateTime `json:"updatedAt"`
   711  	// Destination updated by
   712  	UpdatedBy int `json:"updatedBy"`
   713  }
   714  
   715  // AiNotificationsDestinationFilter - Filter destination object
   716  type AiNotificationsDestinationFilter struct {
   717  	// active
   718  	Active bool `json:"active,omitempty"`
   719  	// authType
   720  	AuthType AiNotificationsAuthType `json:"authType,omitempty"`
   721  	// id
   722  	ID string `json:"id,omitempty"`
   723  	// name
   724  	Name string `json:"name,omitempty"`
   725  	// property
   726  	Property AiNotificationsPropertyFilter `json:"property,omitempty"`
   727  	// type
   728  	Type AiNotificationsDestinationType `json:"type,omitempty"`
   729  	// updatedAt
   730  	UpdatedAt nrtime.DateTime `json:"updatedAt,omitempty"`
   731  }
   732  
   733  // AiNotificationsDestinationInput - Destination input object
   734  type AiNotificationsDestinationInput struct {
   735  	// auth
   736  	Auth *AiNotificationsCredentialsInput `json:"auth,omitempty"`
   737  	// name
   738  	Name string `json:"name"`
   739  	// properties
   740  	Properties []AiNotificationsPropertyInput `json:"properties,omitempty"`
   741  	// type
   742  	Type AiNotificationsDestinationType `json:"type"`
   743  }
   744  
   745  // AiNotificationsDestinationResponse - Response for all destinations related mutation. Includes relevant destination and/or errors
   746  type AiNotificationsDestinationResponse struct {
   747  	// Successfully mutated destination
   748  	Destination AiNotificationsDestination `json:"destination,omitempty"`
   749  	// Error in destination mutation
   750  	Error ai.AiNotificationsError `json:"error,omitempty"`
   751  	// Deprecated list of errors
   752  	Errors []ai.AiNotificationsError `json:"errors"`
   753  }
   754  
   755  // AiNotificationsDestinationSorter - Sort object
   756  type AiNotificationsDestinationSorter struct {
   757  	// direction
   758  	Direction AiNotificationsSortOrder `json:"direction"`
   759  	// field
   760  	Field AiNotificationsDestinationFields `json:"field"`
   761  }
   762  
   763  // AiNotificationsDestinationUpdate - Destination update object
   764  type AiNotificationsDestinationUpdate struct {
   765  	// active
   766  	Active bool `json:"active,omitempty"`
   767  	// auth
   768  	Auth *AiNotificationsCredentialsInput `json:"auth,omitempty"`
   769  	// disableAuth
   770  	DisableAuth bool `json:"disableAuth,omitempty"`
   771  	// name
   772  	Name string `json:"name,omitempty"`
   773  	// properties
   774  	Properties []AiNotificationsPropertyInput `json:"properties,omitempty"`
   775  }
   776  
   777  // AiNotificationsDestinationsResponse - Destinations result object
   778  type AiNotificationsDestinationsResponse struct {
   779  	// Destination entities
   780  	Entities []AiNotificationsDestination `json:"entities"`
   781  	// Error in destinations entities fetching
   782  	Error AiNotificationsResponseError `json:"error,omitempty"`
   783  	// Deprecated list of errors
   784  	Errors []AiNotificationsResponseError `json:"errors"`
   785  	// Cursor to get the next batch of results
   786  	NextCursor string `json:"nextCursor,omitempty"`
   787  	// Count of all destination entities
   788  	TotalCount int `json:"totalCount"`
   789  }
   790  
   791  // AiNotificationsOAuth2AuthInput - OAuth2 auth input object
   792  type AiNotificationsOAuth2AuthInput struct {
   793  	// accessTokenUrl
   794  	AccessTokenURL string `json:"accessTokenUrl"`
   795  	// authorizationUrl
   796  	AuthorizationURL string `json:"authorizationUrl"`
   797  	// clientId
   798  	ClientId string `json:"clientId"`
   799  	// clientSecret
   800  	ClientSecret SecureValue `json:"clientSecret"`
   801  	// prefix
   802  	Prefix string `json:"prefix,omitempty"`
   803  	// refreshInterval
   804  	RefreshInterval int `json:"refreshInterval,omitempty"`
   805  	// refreshToken
   806  	RefreshToken SecureValue `json:"refreshToken,omitempty"`
   807  	// refreshable
   808  	Refreshable bool `json:"refreshable"`
   809  	// scope
   810  	Scope string `json:"scope,omitempty"`
   811  	// token
   812  	Token SecureValue `json:"token"`
   813  }
   814  
   815  // AiNotificationsProperty - Channel property Object
   816  type AiNotificationsProperty struct {
   817  	// Channel property display key
   818  	DisplayValue string `json:"displayValue,omitempty"`
   819  	// Channel property key
   820  	Key string `json:"key"`
   821  	// Channel property display key
   822  	Label string `json:"label,omitempty"`
   823  	// Channel property value
   824  	Value string `json:"value"`
   825  }
   826  
   827  // AiNotificationsPropertyFilter - Filter object by property
   828  type AiNotificationsPropertyFilter struct {
   829  	// key
   830  	Key string `json:"key"`
   831  	// value
   832  	Value string `json:"value"`
   833  }
   834  
   835  // AiNotificationsPropertyInput - Property object
   836  type AiNotificationsPropertyInput struct {
   837  	// displayValue
   838  	DisplayValue string `json:"displayValue,omitempty"`
   839  	// key
   840  	Key string `json:"key"`
   841  	// label
   842  	Label string `json:"label,omitempty"`
   843  	// value
   844  	Value string `json:"value"`
   845  }
   846  
   847  // AiNotificationsResponseError - Response error object
   848  type AiNotificationsResponseError struct {
   849  	// Error description
   850  	Description string `json:"description"`
   851  	// Error details
   852  	Details string `json:"details"`
   853  	// Error type
   854  	Type AiNotificationsErrorType `json:"type"`
   855  }
   856  
   857  // AiNotificationsTokenAuthInput - Token auth input object
   858  type AiNotificationsTokenAuthInput struct {
   859  	// prefix
   860  	Prefix string `json:"prefix,omitempty"`
   861  	// token
   862  	Token SecureValue `json:"token"`
   863  }
   864  
   865  // AlertsCampfireNotificationChannel - Campfire notification channel.
   866  type AlertsCampfireNotificationChannel struct {
   867  	// Policies associated with the channel.
   868  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
   869  	// Campfire channel specific configuration.
   870  	Config AlertsCampfireNotificationChannelConfig `json:"config"`
   871  	// Channel ID.
   872  	ID string `json:"id"`
   873  	// Channel name.
   874  	Name string `json:"name"`
   875  	// Channel type.
   876  	Type AlertsNotificationChannelType `json:"type"`
   877  }
   878  
   879  func (x *AlertsCampfireNotificationChannel) ImplementsAlertsNotificationChannel() {}
   880  
   881  // AlertsCampfireNotificationChannelConfig - Configuration for Campfire notification channel.
   882  type AlertsCampfireNotificationChannelConfig struct {
   883  	// Room.
   884  	Room string `json:"room"`
   885  	// Subdomain.
   886  	Subdomain string `json:"subdomain"`
   887  	// Authentication token.
   888  	Token SecureValue `json:"token"`
   889  }
   890  
   891  // AlertsEmailNotificationChannel - Email notification channel.
   892  type AlertsEmailNotificationChannel struct {
   893  	// Policies associated with the channel.
   894  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
   895  	// Email channel specific configuration.
   896  	Config AlertsEmailNotificationChannelConfig `json:"config"`
   897  	// Channel ID.
   898  	ID string `json:"id"`
   899  	// Channel name.
   900  	Name string `json:"name"`
   901  	// Channel type.
   902  	Type AlertsNotificationChannelType `json:"type"`
   903  }
   904  
   905  func (x *AlertsEmailNotificationChannel) ImplementsAlertsNotificationChannel() {}
   906  
   907  // AlertsEmailNotificationChannelConfig - Configuration for Email notification channel.
   908  type AlertsEmailNotificationChannelConfig struct {
   909  	// List of email recipients.
   910  	Emails []string `json:"emails"`
   911  	// Include details about the violation as a JSON attachment.
   912  	IncludeJson bool `json:"includeJson"`
   913  }
   914  
   915  // AlertsHipChatNotificationChannel - HipChat notification channel.
   916  type AlertsHipChatNotificationChannel struct {
   917  	// Policies associated with the channel.
   918  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
   919  	// HipChat channel specific configuration.
   920  	Config AlertsHipChatNotificationChannelConfig `json:"config"`
   921  	// Channel ID.
   922  	ID string `json:"id"`
   923  	// Channel name.
   924  	Name string `json:"name"`
   925  	// Channel type.
   926  	Type AlertsNotificationChannelType `json:"type"`
   927  }
   928  
   929  func (x *AlertsHipChatNotificationChannel) ImplementsAlertsNotificationChannel() {}
   930  
   931  // AlertsHipChatNotificationChannelConfig - Configuration for HipChat notification channel.
   932  type AlertsHipChatNotificationChannelConfig struct {
   933  	// Authentication token.
   934  	AuthToken SecureValue `json:"authToken"`
   935  	// Base URL.
   936  	BaseURL string `json:"baseUrl"`
   937  	// Room ID.
   938  	RoomId string `json:"roomId"`
   939  }
   940  
   941  // AlertsNotificationChannel - A notification channel.
   942  type AlertsNotificationChannel struct {
   943  	// Policies associated with the channel.
   944  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
   945  	// Channel ID.
   946  	ID string `json:"id"`
   947  	// Channel name.
   948  	Name string `json:"name"`
   949  	// Channel type.
   950  	Type AlertsNotificationChannelType `json:"type"`
   951  }
   952  
   953  func (x *AlertsNotificationChannel) ImplementsAlertsNotificationChannel() {}
   954  
   955  // AlertsNotificationChannelPoliciesResultSet - A result set containing associated policies information for a notification channel.
   956  type AlertsNotificationChannelPoliciesResultSet struct {
   957  	// A set of policies associated with the channel.
   958  	Policies []AlertsNotificationChannelPolicy `json:"policies"`
   959  	// Total number of policies associated with the channel.
   960  	TotalCount int `json:"totalCount"`
   961  }
   962  
   963  // AlertsNotificationChannelPolicy - Information about a policy associated with a notification channel.
   964  type AlertsNotificationChannelPolicy struct {
   965  	// Policy ID.
   966  	ID string `json:"id"`
   967  	// Policy name.
   968  	Name string `json:"name"`
   969  }
   970  
   971  // AlertsOpsGenieNotificationChannel - OpsGenie notification channel.
   972  type AlertsOpsGenieNotificationChannel struct {
   973  	// Policies associated with the channel.
   974  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
   975  	// OpsGenie channel specific configuration.
   976  	Config AlertsOpsGenieNotificationChannelConfig `json:"config"`
   977  	// Channel ID.
   978  	ID string `json:"id"`
   979  	// Channel name.
   980  	Name string `json:"name"`
   981  	// Channel type.
   982  	Type AlertsNotificationChannelType `json:"type"`
   983  }
   984  
   985  func (x *AlertsOpsGenieNotificationChannel) ImplementsAlertsNotificationChannel() {}
   986  
   987  // AlertsOpsGenieNotificationChannelConfig - Configuration for OpsGenie notification channel.
   988  type AlertsOpsGenieNotificationChannelConfig struct {
   989  	// API key.
   990  	APIKey SecureValue `json:"apiKey"`
   991  	// OpsGenie data center region.
   992  	DataCenterRegion AlertsOpsGenieDataCenterRegion `json:"dataCenterRegion"`
   993  	// List of email recipients.
   994  	Recipients []string `json:"recipients"`
   995  	// Tags.
   996  	Tags []string `json:"tags"`
   997  	// Teams.
   998  	Teams []string `json:"teams"`
   999  }
  1000  
  1001  // AlertsPagerDutyNotificationChannel - PagerDuty notification channel.
  1002  type AlertsPagerDutyNotificationChannel struct {
  1003  	// Policies associated with the channel.
  1004  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
  1005  	// PagerDuty channel specific configuration.
  1006  	Config AlertsPagerDutyNotificationChannelConfig `json:"config"`
  1007  	// Channel ID.
  1008  	ID string `json:"id"`
  1009  	// Channel name.
  1010  	Name string `json:"name"`
  1011  	// Channel type.
  1012  	Type AlertsNotificationChannelType `json:"type"`
  1013  }
  1014  
  1015  func (x *AlertsPagerDutyNotificationChannel) ImplementsAlertsNotificationChannel() {}
  1016  
  1017  // AlertsPagerDutyNotificationChannelConfig - Configuration for PagerDuty notification channel.
  1018  type AlertsPagerDutyNotificationChannelConfig struct {
  1019  	// API key.
  1020  	APIKey SecureValue `json:"apiKey"`
  1021  }
  1022  
  1023  // AlertsSlackNotificationChannel - Slack notification channel.
  1024  type AlertsSlackNotificationChannel struct {
  1025  	// Policies associated with the channel.
  1026  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
  1027  	// Slack channel specific configuration.
  1028  	Config AlertsSlackNotificationChannelConfig `json:"config"`
  1029  	// Channel ID.
  1030  	ID string `json:"id"`
  1031  	// Channel name.
  1032  	Name string `json:"name"`
  1033  	// Channel type.
  1034  	Type AlertsNotificationChannelType `json:"type"`
  1035  }
  1036  
  1037  func (x *AlertsSlackNotificationChannel) ImplementsAlertsNotificationChannel() {}
  1038  
  1039  // AlertsSlackNotificationChannelConfig - Configuration for Slack notification channel.
  1040  type AlertsSlackNotificationChannelConfig struct {
  1041  	// Slack channel name.
  1042  	TeamChannel string `json:"teamChannel,omitempty"`
  1043  	// Slack channel URL.
  1044  	URL SecureValue `json:"url"`
  1045  }
  1046  
  1047  // AlertsUserNotificationChannel - User notification channel.
  1048  type AlertsUserNotificationChannel struct {
  1049  	// Policies associated with the channel.
  1050  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
  1051  	// User channel specific configuration.
  1052  	Config AlertsUserNotificationChannelConfig `json:"config"`
  1053  	// Channel ID.
  1054  	ID string `json:"id"`
  1055  	// Channel name.
  1056  	Name string `json:"name"`
  1057  	// Channel type.
  1058  	Type AlertsNotificationChannelType `json:"type"`
  1059  }
  1060  
  1061  func (x *AlertsUserNotificationChannel) ImplementsAlertsNotificationChannel() {}
  1062  
  1063  // AlertsUserNotificationChannelConfig - Configuration for user notification channel.
  1064  type AlertsUserNotificationChannelConfig struct {
  1065  	// User ID.
  1066  	UserID string `json:"userId"`
  1067  }
  1068  
  1069  // AlertsVictorOpsNotificationChannel - VictorOps notification channel.
  1070  type AlertsVictorOpsNotificationChannel struct {
  1071  	// Policies associated with the channel.
  1072  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
  1073  	// VictorOps channel specific configuration.
  1074  	Config AlertsVictorOpsNotificationChannelConfig `json:"config"`
  1075  	// Channel ID.
  1076  	ID string `json:"id"`
  1077  	// Channel name.
  1078  	Name string `json:"name"`
  1079  	// Channel type.
  1080  	Type AlertsNotificationChannelType `json:"type"`
  1081  }
  1082  
  1083  func (x *AlertsVictorOpsNotificationChannel) ImplementsAlertsNotificationChannel() {}
  1084  
  1085  // AlertsVictorOpsNotificationChannelConfig - Configuration for VictorOps notification channel.
  1086  type AlertsVictorOpsNotificationChannelConfig struct {
  1087  	// Key.
  1088  	Key SecureValue `json:"key"`
  1089  	// Route key.
  1090  	RouteKey string `json:"routeKey"`
  1091  }
  1092  
  1093  // AlertsWebhookBasicAuthInput - Webhook basic auth
  1094  type AlertsWebhookBasicAuthInput struct {
  1095  	// Password
  1096  	Password SecureValue `json:"password"`
  1097  	// Username
  1098  	Username string `json:"username"`
  1099  }
  1100  
  1101  // AlertsWebhookCustomHeaderInput - Webhook header
  1102  type AlertsWebhookCustomHeaderInput struct {
  1103  	// Header name
  1104  	Name string `json:"name"`
  1105  	// Header value
  1106  	Value SecureValue `json:"value"`
  1107  }
  1108  
  1109  // AlertsWebhookNotificationChannel - Webhook notification channel.
  1110  type AlertsWebhookNotificationChannel struct {
  1111  	// Policies associated with the channel.
  1112  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
  1113  	// Webhook channel specific configuration.
  1114  	Config AlertsWebhookNotificationChannelConfig `json:"config"`
  1115  	// Channel ID.
  1116  	ID string `json:"id"`
  1117  	// Channel name.
  1118  	Name string `json:"name"`
  1119  	// Channel type.
  1120  	Type AlertsNotificationChannelType `json:"type"`
  1121  }
  1122  
  1123  func (x *AlertsWebhookNotificationChannel) ImplementsAlertsNotificationChannel() {}
  1124  
  1125  // AlertsWebhookNotificationChannelConfig - Configuration for Webhook notification channel.
  1126  type AlertsWebhookNotificationChannelConfig struct {
  1127  	// Base URL.
  1128  	BaseURL string `json:"baseUrl"`
  1129  	// Basic auth.
  1130  	BasicAuth AlertsWebhookBasicAuthInput `json:"basicAuth,omitempty"`
  1131  	// Custom HTTP headers.
  1132  	CustomHttpHeaders []AlertsWebhookCustomHeaderInput `json:"customHttpHeaders"`
  1133  	// Custom payload body.
  1134  	CustomPayloadBody string `json:"customPayloadBody,omitempty"`
  1135  	// Custom payload type.
  1136  	CustomPayloadType AlertsWebhookCustomPayloadType `json:"customPayloadType,omitempty"`
  1137  }
  1138  
  1139  // AlertsXMattersNotificationChannel - xMatters notification channel.
  1140  type AlertsXMattersNotificationChannel struct {
  1141  	// Policies associated with the channel.
  1142  	AssociatedPolicies AlertsNotificationChannelPoliciesResultSet `json:"associatedPolicies"`
  1143  	// xMatters channel specific configuration.
  1144  	Config AlertsXMattersNotificationChannelConfig `json:"config"`
  1145  	// Channel ID.
  1146  	ID string `json:"id"`
  1147  	// Channel name.
  1148  	Name string `json:"name"`
  1149  	// Channel type.
  1150  	Type AlertsNotificationChannelType `json:"type"`
  1151  }
  1152  
  1153  func (x *AlertsXMattersNotificationChannel) ImplementsAlertsNotificationChannel() {}
  1154  
  1155  // AlertsXMattersNotificationChannelConfig - Configuration for xMatters notification channel.
  1156  type AlertsXMattersNotificationChannelConfig struct {
  1157  	// Integration URL.
  1158  	IntegrationURL SecureValue `json:"integrationUrl"`
  1159  }
  1160  
  1161  type channelsResponse struct {
  1162  	Actor Actor `json:"actor"`
  1163  }
  1164  
  1165  type destinationsResponse struct {
  1166  	Actor Actor `json:"actor"`
  1167  }
  1168  
  1169  // SecureValue - The `SecureValue` scalar represents a secure value, ie a password, an API key, etc.
  1170  type SecureValue string
  1171  
  1172  // AlertsNotificationChannel - A notification channel.
  1173  type AlertsNotificationChannelInterface interface {
  1174  	ImplementsAlertsNotificationChannel()
  1175  }
  1176  
  1177  // UnmarshalAlertsNotificationChannelInterface unmarshals the interface into the correct type
  1178  // based on __typename provided by GraphQL
  1179  func UnmarshalAlertsNotificationChannelInterface(b []byte) (*AlertsNotificationChannelInterface, error) {
  1180  	var err error
  1181  
  1182  	var rawMessageAlertsNotificationChannel map[string]*json.RawMessage
  1183  	err = json.Unmarshal(b, &rawMessageAlertsNotificationChannel)
  1184  	if err != nil {
  1185  		return nil, err
  1186  	}
  1187  
  1188  	// Nothing to unmarshal
  1189  	if len(rawMessageAlertsNotificationChannel) < 1 {
  1190  		return nil, nil
  1191  	}
  1192  
  1193  	var typeName string
  1194  
  1195  	if rawTypeName, ok := rawMessageAlertsNotificationChannel["__typename"]; ok {
  1196  		err = json.Unmarshal(*rawTypeName, &typeName)
  1197  		if err != nil {
  1198  			return nil, err
  1199  		}
  1200  
  1201  		switch typeName {
  1202  		case "AlertsCampfireNotificationChannel":
  1203  			var interfaceType AlertsCampfireNotificationChannel
  1204  			err = json.Unmarshal(b, &interfaceType)
  1205  			if err != nil {
  1206  				return nil, err
  1207  			}
  1208  
  1209  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1210  
  1211  			return &xxx, nil
  1212  		case "AlertsEmailNotificationChannel":
  1213  			var interfaceType AlertsEmailNotificationChannel
  1214  			err = json.Unmarshal(b, &interfaceType)
  1215  			if err != nil {
  1216  				return nil, err
  1217  			}
  1218  
  1219  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1220  
  1221  			return &xxx, nil
  1222  		case "AlertsHipChatNotificationChannel":
  1223  			var interfaceType AlertsHipChatNotificationChannel
  1224  			err = json.Unmarshal(b, &interfaceType)
  1225  			if err != nil {
  1226  				return nil, err
  1227  			}
  1228  
  1229  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1230  
  1231  			return &xxx, nil
  1232  		case "AlertsOpsGenieNotificationChannel":
  1233  			var interfaceType AlertsOpsGenieNotificationChannel
  1234  			err = json.Unmarshal(b, &interfaceType)
  1235  			if err != nil {
  1236  				return nil, err
  1237  			}
  1238  
  1239  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1240  
  1241  			return &xxx, nil
  1242  		case "AlertsPagerDutyNotificationChannel":
  1243  			var interfaceType AlertsPagerDutyNotificationChannel
  1244  			err = json.Unmarshal(b, &interfaceType)
  1245  			if err != nil {
  1246  				return nil, err
  1247  			}
  1248  
  1249  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1250  
  1251  			return &xxx, nil
  1252  		case "AlertsSlackNotificationChannel":
  1253  			var interfaceType AlertsSlackNotificationChannel
  1254  			err = json.Unmarshal(b, &interfaceType)
  1255  			if err != nil {
  1256  				return nil, err
  1257  			}
  1258  
  1259  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1260  
  1261  			return &xxx, nil
  1262  		case "AlertsUserNotificationChannel":
  1263  			var interfaceType AlertsUserNotificationChannel
  1264  			err = json.Unmarshal(b, &interfaceType)
  1265  			if err != nil {
  1266  				return nil, err
  1267  			}
  1268  
  1269  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1270  
  1271  			return &xxx, nil
  1272  		case "AlertsVictorOpsNotificationChannel":
  1273  			var interfaceType AlertsVictorOpsNotificationChannel
  1274  			err = json.Unmarshal(b, &interfaceType)
  1275  			if err != nil {
  1276  				return nil, err
  1277  			}
  1278  
  1279  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1280  
  1281  			return &xxx, nil
  1282  		case "AlertsWebhookNotificationChannel":
  1283  			var interfaceType AlertsWebhookNotificationChannel
  1284  			err = json.Unmarshal(b, &interfaceType)
  1285  			if err != nil {
  1286  				return nil, err
  1287  			}
  1288  
  1289  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1290  
  1291  			return &xxx, nil
  1292  		case "AlertsXMattersNotificationChannel":
  1293  			var interfaceType AlertsXMattersNotificationChannel
  1294  			err = json.Unmarshal(b, &interfaceType)
  1295  			if err != nil {
  1296  				return nil, err
  1297  			}
  1298  
  1299  			var xxx AlertsNotificationChannelInterface = &interfaceType
  1300  
  1301  			return &xxx, nil
  1302  		}
  1303  	} else {
  1304  		keys := []string{}
  1305  		for k := range rawMessageAlertsNotificationChannel {
  1306  			keys = append(keys, k)
  1307  		}
  1308  		return nil, fmt.Errorf("interface AlertsNotificationChannel did not include a __typename field for inspection: %s", keys)
  1309  	}
  1310  
  1311  	return nil, fmt.Errorf("interface AlertsNotificationChannel was not matched against all PossibleTypes: %s", typeName)
  1312  }