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

     1  // Code generated by tutone: DO NOT EDIT
     2  package workflows
     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  // AiWorkflowsCreateErrorType - Type of create error
    13  type AiWorkflowsCreateErrorType string
    14  
    15  var AiWorkflowsCreateErrorTypeTypes = struct {
    16  	// We couldn't find a channel with the given id
    17  	CHANNEL_NOT_FOUND AiWorkflowsCreateErrorType
    18  	// A workflow with this name already exists
    19  	DUPLICATE AiWorkflowsCreateErrorType
    20  	// One or more of the parameters you provided are incorrect
    21  	INVALID_PARAMETER AiWorkflowsCreateErrorType
    22  	// Reached the maximum number of workflows per account
    23  	LIMIT_REACHED AiWorkflowsCreateErrorType
    24  	// This account is missing the required entitlement(s) to perform this action
    25  	MISSING_ENTITLEMENT AiWorkflowsCreateErrorType
    26  	// This account in not authorized to perform this action
    27  	UNAUTHORIZED_ACCOUNT AiWorkflowsCreateErrorType
    28  	// The given channel id represents an unsupported channel type
    29  	UNSUPPORTED_CHANNEL_TYPE AiWorkflowsCreateErrorType
    30  	// The parameter provided does not have a valid form
    31  	VALIDATION_ERROR AiWorkflowsCreateErrorType
    32  }{
    33  	// We couldn't find a channel with the given id
    34  	CHANNEL_NOT_FOUND: "CHANNEL_NOT_FOUND",
    35  	// A workflow with this name already exists
    36  	DUPLICATE: "DUPLICATE",
    37  	// One or more of the parameters you provided are incorrect
    38  	INVALID_PARAMETER: "INVALID_PARAMETER",
    39  	// Reached the maximum number of workflows per account
    40  	LIMIT_REACHED: "LIMIT_REACHED",
    41  	// This account is missing the required entitlement(s) to perform this action
    42  	MISSING_ENTITLEMENT: "MISSING_ENTITLEMENT",
    43  	// This account in not authorized to perform this action
    44  	UNAUTHORIZED_ACCOUNT: "UNAUTHORIZED_ACCOUNT",
    45  	// The given channel id represents an unsupported channel type
    46  	UNSUPPORTED_CHANNEL_TYPE: "UNSUPPORTED_CHANNEL_TYPE",
    47  	// The parameter provided does not have a valid form
    48  	VALIDATION_ERROR: "VALIDATION_ERROR",
    49  }
    50  
    51  // AiWorkflowsDeleteErrorType - Type of delete error
    52  type AiWorkflowsDeleteErrorType string
    53  
    54  var AiWorkflowsDeleteErrorTypeTypes = struct {
    55  	// One or more of the parameters you provided are incorrect
    56  	INVALID_PARAMETER AiWorkflowsDeleteErrorType
    57  	// This account in not authorized to perform this action
    58  	UNAUTHORIZED_ACCOUNT AiWorkflowsDeleteErrorType
    59  	// The parameter provided does not have a valid form
    60  	VALIDATION_ERROR AiWorkflowsDeleteErrorType
    61  }{
    62  	// One or more of the parameters you provided are incorrect
    63  	INVALID_PARAMETER: "INVALID_PARAMETER",
    64  	// This account in not authorized to perform this action
    65  	UNAUTHORIZED_ACCOUNT: "UNAUTHORIZED_ACCOUNT",
    66  	// The parameter provided does not have a valid form
    67  	VALIDATION_ERROR: "VALIDATION_ERROR",
    68  }
    69  
    70  // AiWorkflowsDestinationType - Type of Destination Configuration
    71  type AiWorkflowsDestinationType string
    72  
    73  var AiWorkflowsDestinationTypeTypes = struct {
    74  	// Email Destination Configuration type
    75  	EMAIL AiWorkflowsDestinationType
    76  	// Event Bridge Destination Configuration type
    77  	EVENT_BRIDGE AiWorkflowsDestinationType
    78  	// Jira Destination Configuration type
    79  	JIRA AiWorkflowsDestinationType
    80  	// New Relic Mobile Push Destination Configuration type
    81  	MOBILE_PUSH AiWorkflowsDestinationType
    82  	// Pager Duty Destination Configuration type
    83  	PAGERDUTY AiWorkflowsDestinationType
    84  	// Pager Duty with account integration Destination Configuration type
    85  	PAGERDUTY_ACCOUNT_INTEGRATION AiWorkflowsDestinationType
    86  	// Pager Duty with service integration Destination Configuration type
    87  	PAGERDUTY_SERVICE_INTEGRATION AiWorkflowsDestinationType
    88  	// Service Now Destination Configuration type
    89  	SERVICE_NOW AiWorkflowsDestinationType
    90  	// Slack Destination Configuration type
    91  	SLACK AiWorkflowsDestinationType
    92  	// Webhook Destination Configuration type
    93  	WEBHOOK AiWorkflowsDestinationType
    94  }{
    95  	// Email Destination Configuration type
    96  	EMAIL: "EMAIL",
    97  	// Event Bridge Destination Configuration type
    98  	EVENT_BRIDGE: "EVENT_BRIDGE",
    99  	// Jira Destination Configuration type
   100  	JIRA: "JIRA",
   101  	// New Relic Mobile Push Destination Configuration type
   102  	MOBILE_PUSH: "MOBILE_PUSH",
   103  	// Pager Duty Destination Configuration type
   104  	PAGERDUTY: "PAGERDUTY",
   105  	// Pager Duty with account integration Destination Configuration type
   106  	PAGERDUTY_ACCOUNT_INTEGRATION: "PAGERDUTY_ACCOUNT_INTEGRATION",
   107  	// Pager Duty with service integration Destination Configuration type
   108  	PAGERDUTY_SERVICE_INTEGRATION: "PAGERDUTY_SERVICE_INTEGRATION",
   109  	// Service Now Destination Configuration type
   110  	SERVICE_NOW: "SERVICE_NOW",
   111  	// Slack Destination Configuration type
   112  	SLACK: "SLACK",
   113  	// Webhook Destination Configuration type
   114  	WEBHOOK: "WEBHOOK",
   115  }
   116  
   117  // AiWorkflowsEnrichmentType - Type of Enrichment
   118  type AiWorkflowsEnrichmentType string
   119  
   120  var AiWorkflowsEnrichmentTypeTypes = struct {
   121  	// NRQL Enrichment type
   122  	NRQL AiWorkflowsEnrichmentType
   123  }{
   124  	// NRQL Enrichment type
   125  	NRQL: "NRQL",
   126  }
   127  
   128  // AiWorkflowsFilterType - Type of Filter
   129  type AiWorkflowsFilterType string
   130  
   131  var AiWorkflowsFilterTypeTypes = struct {
   132  	// Standard Filter type
   133  	FILTER AiWorkflowsFilterType
   134  	// View Filter type
   135  	VIEW AiWorkflowsFilterType
   136  }{
   137  	// Standard Filter type
   138  	FILTER: "FILTER",
   139  	// View Filter type
   140  	VIEW: "VIEW",
   141  }
   142  
   143  // AiWorkflowsMutingRulesHandling - The wanted behavior for muted issues in the workflow
   144  type AiWorkflowsMutingRulesHandling string
   145  
   146  var AiWorkflowsMutingRulesHandlingTypes = struct {
   147  	// Notify only about partially muted and unmuted issues
   148  	DONT_NOTIFY_FULLY_MUTED_ISSUES AiWorkflowsMutingRulesHandling
   149  	// Notify only about unmuted issues
   150  	DONT_NOTIFY_FULLY_OR_PARTIALLY_MUTED_ISSUES AiWorkflowsMutingRulesHandling
   151  	// Notify about all issues
   152  	NOTIFY_ALL_ISSUES AiWorkflowsMutingRulesHandling
   153  }{
   154  	// Notify only about partially muted and unmuted issues
   155  	DONT_NOTIFY_FULLY_MUTED_ISSUES: "DONT_NOTIFY_FULLY_MUTED_ISSUES",
   156  	// Notify only about unmuted issues
   157  	DONT_NOTIFY_FULLY_OR_PARTIALLY_MUTED_ISSUES: "DONT_NOTIFY_FULLY_OR_PARTIALLY_MUTED_ISSUES",
   158  	// Notify about all issues
   159  	NOTIFY_ALL_ISSUES: "NOTIFY_ALL_ISSUES",
   160  }
   161  
   162  // AiWorkflowsOperator - Type of Filter
   163  type AiWorkflowsOperator string
   164  
   165  var AiWorkflowsOperatorTypes = struct {
   166  	// String or list attribute contains this value
   167  	CONTAINS AiWorkflowsOperator
   168  	// String or list attribute does not contain this value
   169  	DOES_NOT_CONTAIN AiWorkflowsOperator
   170  	// String or Numeric attribute does not equal this value
   171  	DOES_NOT_EQUAL AiWorkflowsOperator
   172  	// Element in list attribute does not exactly match this value
   173  	DOES_NOT_EXACTLY_MATCH AiWorkflowsOperator
   174  	// String attribute ends with this value
   175  	ENDS_WITH AiWorkflowsOperator
   176  	// String or Numeric attribute equals this value
   177  	EQUAL AiWorkflowsOperator
   178  	// Element in list attribute exactly matches this value
   179  	EXACTLY_MATCHES AiWorkflowsOperator
   180  	// Numeric attribute is greater or equal to this value
   181  	GREATER_OR_EQUAL AiWorkflowsOperator
   182  	// Numeric attribute is greater than this value
   183  	GREATER_THAN AiWorkflowsOperator
   184  	// Boolean attribute equals value
   185  	IS AiWorkflowsOperator
   186  	// Boolean attribute does not equal value
   187  	IS_NOT AiWorkflowsOperator
   188  	// Numeric attribute is less or equal to this value
   189  	LESS_OR_EQUAL AiWorkflowsOperator
   190  	// Numeric attribute is less than this value
   191  	LESS_THAN AiWorkflowsOperator
   192  	// String attribute starts with this value
   193  	STARTS_WITH AiWorkflowsOperator
   194  }{
   195  	// String or list attribute contains this value
   196  	CONTAINS: "CONTAINS",
   197  	// String or list attribute does not contain this value
   198  	DOES_NOT_CONTAIN: "DOES_NOT_CONTAIN",
   199  	// String or Numeric attribute does not equal this value
   200  	DOES_NOT_EQUAL: "DOES_NOT_EQUAL",
   201  	// Element in list attribute does not exactly match this value
   202  	DOES_NOT_EXACTLY_MATCH: "DOES_NOT_EXACTLY_MATCH",
   203  	// String attribute ends with this value
   204  	ENDS_WITH: "ENDS_WITH",
   205  	// String or Numeric attribute equals this value
   206  	EQUAL: "EQUAL",
   207  	// Element in list attribute exactly matches this value
   208  	EXACTLY_MATCHES: "EXACTLY_MATCHES",
   209  	// Numeric attribute is greater or equal to this value
   210  	GREATER_OR_EQUAL: "GREATER_OR_EQUAL",
   211  	// Numeric attribute is greater than this value
   212  	GREATER_THAN: "GREATER_THAN",
   213  	// Boolean attribute equals value
   214  	IS: "IS",
   215  	// Boolean attribute does not equal value
   216  	IS_NOT: "IS_NOT",
   217  	// Numeric attribute is less or equal to this value
   218  	LESS_OR_EQUAL: "LESS_OR_EQUAL",
   219  	// Numeric attribute is less than this value
   220  	LESS_THAN: "LESS_THAN",
   221  	// String attribute starts with this value
   222  	STARTS_WITH: "STARTS_WITH",
   223  }
   224  
   225  // AiWorkflowsTestErrorType - Type of test error
   226  type AiWorkflowsTestErrorType string
   227  
   228  var AiWorkflowsTestErrorTypeTypes = struct {
   229  	// We couldn't find a channel with the given id
   230  	CHANNEL_NOT_FOUND AiWorkflowsTestErrorType
   231  	// Failed running test workflow
   232  	FAILED_RUNNING_TEST AiWorkflowsTestErrorType
   233  	// This account is missing the required entitlement(s) to perform this action
   234  	MISSING_ENTITLEMENT AiWorkflowsTestErrorType
   235  	// This account is not allowed to preform this action
   236  	UNAUTHORIZED_ACCOUNT AiWorkflowsTestErrorType
   237  	// The given channel id represents an unsupported channel type
   238  	UNSUPPORTED_CHANNEL_TYPE AiWorkflowsTestErrorType
   239  	// The parameter provided does not have a valid form
   240  	VALIDATION_ERROR AiWorkflowsTestErrorType
   241  	// Failed to send a notification to the channel
   242  	WARNING_FAILED_SENDING_NOTIFICATION AiWorkflowsTestErrorType
   243  	// There are no issues that match this filter
   244  	WARNING_NO_FILTERED_ISSUE_FOUND AiWorkflowsTestErrorType
   245  	// There are no issues that match these dynamic variables
   246  	WARNING_NO_MATCHING_DYNAMIC_VARIABLES_FOUND AiWorkflowsTestErrorType
   247  }{
   248  	// We couldn't find a channel with the given id
   249  	CHANNEL_NOT_FOUND: "CHANNEL_NOT_FOUND",
   250  	// Failed running test workflow
   251  	FAILED_RUNNING_TEST: "FAILED_RUNNING_TEST",
   252  	// This account is missing the required entitlement(s) to perform this action
   253  	MISSING_ENTITLEMENT: "MISSING_ENTITLEMENT",
   254  	// This account is not allowed to preform this action
   255  	UNAUTHORIZED_ACCOUNT: "UNAUTHORIZED_ACCOUNT",
   256  	// The given channel id represents an unsupported channel type
   257  	UNSUPPORTED_CHANNEL_TYPE: "UNSUPPORTED_CHANNEL_TYPE",
   258  	// The parameter provided does not have a valid form
   259  	VALIDATION_ERROR: "VALIDATION_ERROR",
   260  	// Failed to send a notification to the channel
   261  	WARNING_FAILED_SENDING_NOTIFICATION: "WARNING_FAILED_SENDING_NOTIFICATION",
   262  	// There are no issues that match this filter
   263  	WARNING_NO_FILTERED_ISSUE_FOUND: "WARNING_NO_FILTERED_ISSUE_FOUND",
   264  	// There are no issues that match these dynamic variables
   265  	WARNING_NO_MATCHING_DYNAMIC_VARIABLES_FOUND: "WARNING_NO_MATCHING_DYNAMIC_VARIABLES_FOUND",
   266  }
   267  
   268  // AiWorkflowsUpdateErrorType - Type of update error
   269  type AiWorkflowsUpdateErrorType string
   270  
   271  var AiWorkflowsUpdateErrorTypeTypes = struct {
   272  	// We couldn't find a channel with the given id
   273  	CHANNEL_NOT_FOUND AiWorkflowsUpdateErrorType
   274  	// A workflow with this name already exists
   275  	DUPLICATE AiWorkflowsUpdateErrorType
   276  	// One or more of the parameters you provided are incorrect
   277  	INVALID_PARAMETER AiWorkflowsUpdateErrorType
   278  	// This account is missing the required entitlement(s) to perform this action
   279  	MISSING_ENTITLEMENT AiWorkflowsUpdateErrorType
   280  	// This account in not authorized to perform this action
   281  	UNAUTHORIZED_ACCOUNT AiWorkflowsUpdateErrorType
   282  	// The given channel id represents an unsupported channel type
   283  	UNSUPPORTED_CHANNEL_TYPE AiWorkflowsUpdateErrorType
   284  	// The parameter provided does not have a valid form
   285  	VALIDATION_ERROR AiWorkflowsUpdateErrorType
   286  }{
   287  	// We couldn't find a channel with the given id
   288  	CHANNEL_NOT_FOUND: "CHANNEL_NOT_FOUND",
   289  	// A workflow with this name already exists
   290  	DUPLICATE: "DUPLICATE",
   291  	// One or more of the parameters you provided are incorrect
   292  	INVALID_PARAMETER: "INVALID_PARAMETER",
   293  	// This account is missing the required entitlement(s) to perform this action
   294  	MISSING_ENTITLEMENT: "MISSING_ENTITLEMENT",
   295  	// This account in not authorized to perform this action
   296  	UNAUTHORIZED_ACCOUNT: "UNAUTHORIZED_ACCOUNT",
   297  	// The given channel id represents an unsupported channel type
   298  	UNSUPPORTED_CHANNEL_TYPE: "UNSUPPORTED_CHANNEL_TYPE",
   299  	// The parameter provided does not have a valid form
   300  	VALIDATION_ERROR: "VALIDATION_ERROR",
   301  }
   302  
   303  // Account - The `Account` object provides general data about the account, as well as
   304  // being the entry point into more detailed data about a single account.
   305  //
   306  // Account configuration data is queried through this object, as well as
   307  // telemetry data that is specific to a single account.
   308  type Account struct {
   309  	// This field provides access to AiWorkflows data.
   310  	AiWorkflows AiWorkflowsAccountStitchedFields `json:"aiWorkflows,omitempty"`
   311  	//
   312  	ID int `json:"id,omitempty"`
   313  	//
   314  	LicenseKey string `json:"licenseKey,omitempty"`
   315  	//
   316  	Name string `json:"name,omitempty"`
   317  }
   318  
   319  // Actor - The `Actor` object contains fields that are scoped to the API user's access level.
   320  type Actor struct {
   321  	// The `account` field is the entry point into data that is scoped to a single account.
   322  	Account Account `json:"account,omitempty"`
   323  }
   324  
   325  // AiWorkflowsAccountStitchedFields -
   326  type AiWorkflowsAccountStitchedFields struct {
   327  	// Returns a list of workflows with pagination cursor according to account id and filters
   328  	Workflows AiWorkflowsWorkflows `json:"workflows,omitempty"`
   329  }
   330  
   331  // AiWorkflowsCreateResponseError - Create error description
   332  type AiWorkflowsCreateResponseError struct {
   333  	// The error description
   334  	Description string `json:"description"`
   335  	// The error type
   336  	Type AiWorkflowsCreateErrorType `json:"type"`
   337  }
   338  
   339  func (x *AiWorkflowsCreateResponseError) ImplementsAiWorkflowsResponseError() {}
   340  
   341  // AiWorkflowsCreateWorkflowInput - Workflow input object
   342  type AiWorkflowsCreateWorkflowInput struct {
   343  	// destinationConfigurations
   344  	DestinationConfigurations []AiWorkflowsDestinationConfigurationInput `json:"destinationConfigurations,omitempty"`
   345  	// destinationsEnabled
   346  	DestinationsEnabled bool `json:"destinationsEnabled,omitempty"`
   347  	// enrichments
   348  	Enrichments *AiWorkflowsEnrichmentsInput `json:"enrichments,omitempty"`
   349  	// enrichmentsEnabled
   350  	EnrichmentsEnabled bool `json:"enrichmentsEnabled,omitempty"`
   351  	// issuesFilter
   352  	IssuesFilter AiWorkflowsFilterInput `json:"issuesFilter,omitempty"`
   353  	// mutingRulesHandling
   354  	MutingRulesHandling AiWorkflowsMutingRulesHandling `json:"mutingRulesHandling"`
   355  	// name
   356  	Name string `json:"name"`
   357  	// workflowEnabled
   358  	WorkflowEnabled bool `json:"workflowEnabled,omitempty"`
   359  }
   360  
   361  // AiWorkflowsCreateWorkflowResponse - Create workflow mutation response including errors
   362  type AiWorkflowsCreateWorkflowResponse struct {
   363  	// A list of errors that occurred while performing the create workflow action
   364  	Errors []AiWorkflowsCreateResponseError `json:"errors"`
   365  	// Successfully created workflow
   366  	Workflow AiWorkflowsWorkflow `json:"workflow,omitempty"`
   367  }
   368  
   369  // AiWorkflowsDeleteResponseError - Delete error description
   370  type AiWorkflowsDeleteResponseError struct {
   371  	// The error description
   372  	Description string `json:"description"`
   373  	// The error type
   374  	Type AiWorkflowsDeleteErrorType `json:"type"`
   375  }
   376  
   377  func (x *AiWorkflowsDeleteResponseError) ImplementsAiWorkflowsResponseError() {}
   378  
   379  // AiWorkflowsDeleteWorkflowResponse - Delete workflow mutation response including errors
   380  type AiWorkflowsDeleteWorkflowResponse struct {
   381  	// A list of errors that occurred while performing the delete workflow action
   382  	Errors []AiWorkflowsDeleteResponseError `json:"errors"`
   383  	// Id of the successfully deleted workflow
   384  	ID string `json:"id,omitempty"`
   385  }
   386  
   387  // AiWorkflowsDestinationConfiguration - Destination Configuration Object
   388  type AiWorkflowsDestinationConfiguration struct {
   389  	// Channel Id of the Destination Configuration
   390  	ChannelId string `json:"channelId"`
   391  	// Name of the Destination Configuration
   392  	Name string `json:"name"`
   393  	// Type of the Destination Configuration
   394  	Type AiWorkflowsDestinationType `json:"type"`
   395  }
   396  
   397  // AiWorkflowsDestinationConfigurationInput - Destination Configuration input object
   398  type AiWorkflowsDestinationConfigurationInput struct {
   399  	// channelId
   400  	ChannelId string `json:"channelId"`
   401  }
   402  
   403  // AiWorkflowsEnrichment - Makes it possible to augment the notification with additional data from the New Relic platform
   404  type AiWorkflowsEnrichment struct {
   405  	// Account Id of the Enrichment
   406  	AccountID int `json:"accountId"`
   407  	// List of configurations for the enrichment
   408  	Configurations []ai.AiWorkflowsConfiguration `json:"configurations"`
   409  	// The time the Enrichment was created
   410  	CreatedAt nrtime.DateTime `json:"createdAt"`
   411  	// Enrichment Id
   412  	ID string `json:"id"`
   413  	// Name of the Enrichment
   414  	Name string `json:"name"`
   415  	// Type of the Enrichment
   416  	Type AiWorkflowsEnrichmentType `json:"type"`
   417  	// The time the Enrichment was last updated
   418  	UpdatedAt nrtime.DateTime `json:"updatedAt"`
   419  }
   420  
   421  // AiWorkflowsEnrichmentsInput - Enrichment input object
   422  type AiWorkflowsEnrichmentsInput struct {
   423  	// nrql
   424  	NRQL []AiWorkflowsNRQLEnrichmentInput `json:"nrql,omitempty"`
   425  }
   426  
   427  // AiWorkflowsFilter - Filter Object
   428  type AiWorkflowsFilter struct {
   429  	// Account Id of this Filter
   430  	AccountID int `json:"accountId"`
   431  	// Filter Id
   432  	ID string `json:"id"`
   433  	// Name of the Filter
   434  	Name string `json:"name"`
   435  	// Expressions that determine which issues will be handled
   436  	Predicates []AiWorkflowsPredicate `json:"predicates"`
   437  	// The type of the Filter
   438  	Type AiWorkflowsFilterType `json:"type"`
   439  }
   440  
   441  // AiWorkflowsFilterInput - Filter input object
   442  type AiWorkflowsFilterInput struct {
   443  	// name
   444  	Name string `json:"name,omitempty"`
   445  	// predicates
   446  	Predicates []AiWorkflowsPredicateInput `json:"predicates,omitempty"`
   447  	// type
   448  	Type AiWorkflowsFilterType `json:"type"`
   449  }
   450  
   451  // AiWorkflowsFilters - Filter on the workflow objects
   452  type AiWorkflowsFilters struct {
   453  	// channelId
   454  	ChannelId string `json:"channelId,omitempty"`
   455  	// destinationType
   456  	DestinationType AiWorkflowsDestinationType `json:"destinationType,omitempty"`
   457  	// enrichmentId
   458  	EnrichmentId string `json:"enrichmentId,omitempty"`
   459  	// filterId
   460  	FilterId string `json:"filterId,omitempty"`
   461  	// id
   462  	ID string `json:"id,omitempty"`
   463  	// name
   464  	Name string `json:"name,omitempty"`
   465  	// workflowEnabled
   466  	WorkflowEnabled bool `json:"workflowEnabled,omitempty"`
   467  }
   468  
   469  // AiWorkflowsNRQLConfigurationInput - NRQL type configuration input object
   470  type AiWorkflowsNRQLConfigurationInput struct {
   471  	// query
   472  	Query string `json:"query"`
   473  }
   474  
   475  // AiWorkflowsNRQLEnrichmentInput - NRQL type enrichment input object
   476  type AiWorkflowsNRQLEnrichmentInput struct {
   477  	// configuration
   478  	Configuration []AiWorkflowsNRQLConfigurationInput `json:"configuration,omitempty"`
   479  	// name
   480  	Name string `json:"name"`
   481  }
   482  
   483  // AiWorkflowsNRQLUpdateEnrichmentInput - NRQL type update enrichment input object
   484  type AiWorkflowsNRQLUpdateEnrichmentInput struct {
   485  	// configuration
   486  	Configuration []AiWorkflowsNRQLConfigurationInput `json:"configuration,omitempty"`
   487  	// id
   488  	ID string `json:"id,omitempty"`
   489  	// name
   490  	Name string `json:"name"`
   491  }
   492  
   493  // AiWorkflowsPredicate - Predicate Object
   494  type AiWorkflowsPredicate struct {
   495  	// Field name in the issue event
   496  	Attribute string `json:"attribute"`
   497  	// Type of operator used to match the values
   498  	Operator AiWorkflowsOperator `json:"operator"`
   499  	// Values to compare
   500  	Values []string `json:"values"`
   501  }
   502  
   503  // AiWorkflowsPredicateInput - PredicateInput input object
   504  type AiWorkflowsPredicateInput struct {
   505  	// attribute
   506  	Attribute string `json:"attribute"`
   507  	// operator
   508  	Operator AiWorkflowsOperator `json:"operator"`
   509  	// values
   510  	Values []string `json:"values"`
   511  }
   512  
   513  // AiWorkflowsResponseError - Error description
   514  type AiWorkflowsResponseError struct {
   515  	// The error description
   516  	Description string `json:"description"`
   517  }
   518  
   519  func (x *AiWorkflowsResponseError) ImplementsAiWorkflowsResponseError() {}
   520  
   521  // AiWorkflowsTestResponseError - Test error description
   522  type AiWorkflowsTestResponseError struct {
   523  	// The error description
   524  	Description string `json:"description"`
   525  	// The error type
   526  	Type AiWorkflowsTestErrorType `json:"type"`
   527  }
   528  
   529  func (x *AiWorkflowsTestResponseError) ImplementsAiWorkflowsResponseError() {}
   530  
   531  // AiWorkflowsUpdateEnrichmentsInput - Update Enrichment input object
   532  type AiWorkflowsUpdateEnrichmentsInput struct {
   533  	// nrql
   534  	NRQL []AiWorkflowsNRQLUpdateEnrichmentInput `json:"nrql,omitempty"`
   535  }
   536  
   537  // AiWorkflowsUpdateResponseError - Update error description
   538  type AiWorkflowsUpdateResponseError struct {
   539  	// The error description
   540  	Description string `json:"description"`
   541  	// The error type
   542  	Type AiWorkflowsUpdateErrorType `json:"type"`
   543  }
   544  
   545  func (x *AiWorkflowsUpdateResponseError) ImplementsAiWorkflowsResponseError() {}
   546  
   547  // AiWorkflowsUpdateWorkflowInput - Update Workflow input object
   548  type AiWorkflowsUpdateWorkflowInput struct {
   549  	// destinationConfigurations
   550  	DestinationConfigurations []AiWorkflowsDestinationConfigurationInput `json:"destinationConfigurations,omitempty"`
   551  	// destinationsEnabled
   552  	DestinationsEnabled bool `json:"destinationsEnabled,omitempty"`
   553  	// enrichments
   554  	Enrichments *AiWorkflowsUpdateEnrichmentsInput `json:"enrichments,omitempty"`
   555  	// enrichmentsEnabled
   556  	EnrichmentsEnabled bool `json:"enrichmentsEnabled,omitempty"`
   557  	// id
   558  	ID string `json:"id"`
   559  	// issuesFilter
   560  	IssuesFilter AiWorkflowsUpdatedFilterInput `json:"issuesFilter,omitempty"`
   561  	// mutingRulesHandling
   562  	MutingRulesHandling AiWorkflowsMutingRulesHandling `json:"mutingRulesHandling,omitempty"`
   563  	// name
   564  	Name string `json:"name,omitempty"`
   565  	// workflowEnabled
   566  	WorkflowEnabled bool `json:"workflowEnabled,omitempty"`
   567  }
   568  
   569  // AiWorkflowsUpdateWorkflowResponse - Update workflow mutation response including errors
   570  type AiWorkflowsUpdateWorkflowResponse struct {
   571  	// A list of errors that occurred while performing the update workflow action
   572  	Errors []AiWorkflowsUpdateResponseError `json:"errors"`
   573  	// Successfully updated workflow
   574  	Workflow AiWorkflowsWorkflow `json:"workflow,omitempty"`
   575  }
   576  
   577  // AiWorkflowsUpdatedFilterInput - Update Filter input object
   578  type AiWorkflowsUpdatedFilterInput struct {
   579  	// filterInput
   580  	FilterInput AiWorkflowsFilterInput `json:"filterInput,omitempty"`
   581  	// id
   582  	ID string `json:"id,omitempty"`
   583  }
   584  
   585  // AiWorkflowsWorkflow - Workflow object
   586  type AiWorkflowsWorkflow struct {
   587  	// Account Id of this Workflow
   588  	AccountID int `json:"accountId"`
   589  	// The time the Workflow was created
   590  	CreatedAt nrtime.DateTime `json:"createdAt"`
   591  	// Specifies where to send the notifications
   592  	DestinationConfigurations []AiWorkflowsDestinationConfiguration `json:"destinationConfigurations"`
   593  	// Are Destinations enabled
   594  	DestinationsEnabled bool `json:"destinationsEnabled"`
   595  	// List of enrichments that are attached to the notifications
   596  	Enrichments []AiWorkflowsEnrichment `json:"enrichments"`
   597  	// Are Enrichments enabled
   598  	EnrichmentsEnabled bool `json:"enrichmentsEnabled"`
   599  	// Workflow Id
   600  	ID string `json:"id"`
   601  	// Specifies which issues the workflow will handle
   602  	IssuesFilter AiWorkflowsFilter `json:"issuesFilter"`
   603  	// Last time a notification was sent regarding this workflow
   604  	LastRun nrtime.DateTime `json:"lastRun,omitempty"`
   605  	// Describes how to handle muted issues
   606  	MutingRulesHandling AiWorkflowsMutingRulesHandling `json:"mutingRulesHandling"`
   607  	// Name of the Workflow
   608  	Name string `json:"name"`
   609  	// The time the Workflow was last updated
   610  	UpdatedAt nrtime.DateTime `json:"updatedAt"`
   611  	// Is Workflow enabled
   612  	WorkflowEnabled bool `json:"workflowEnabled"`
   613  }
   614  
   615  // AiWorkflowsWorkflows - Workflows query response
   616  type AiWorkflowsWorkflows struct {
   617  	// List of all workflows
   618  	Entities []AiWorkflowsWorkflow `json:"entities"`
   619  	// Cursor to get the next batch of results
   620  	NextCursor string `json:"nextCursor,omitempty"`
   621  	// Total count of all workflows
   622  	TotalCount int `json:"totalCount"`
   623  }
   624  
   625  type workflowsResponse struct {
   626  	Actor Actor `json:"actor"`
   627  }
   628  
   629  // AiWorkflowsResponseError - Error description
   630  type AiWorkflowsResponseErrorInterface interface {
   631  	ImplementsAiWorkflowsResponseError()
   632  }
   633  
   634  // UnmarshalAiWorkflowsResponseErrorInterface unmarshals the interface into the correct type
   635  // based on __typename provided by GraphQL
   636  func UnmarshalAiWorkflowsResponseErrorInterface(b []byte) (*AiWorkflowsResponseErrorInterface, error) {
   637  	var err error
   638  
   639  	var rawMessageAiWorkflowsResponseError map[string]*json.RawMessage
   640  	err = json.Unmarshal(b, &rawMessageAiWorkflowsResponseError)
   641  	if err != nil {
   642  		return nil, err
   643  	}
   644  
   645  	// Nothing to unmarshal
   646  	if len(rawMessageAiWorkflowsResponseError) < 1 {
   647  		return nil, nil
   648  	}
   649  
   650  	var typeName string
   651  
   652  	if rawTypeName, ok := rawMessageAiWorkflowsResponseError["__typename"]; ok {
   653  		err = json.Unmarshal(*rawTypeName, &typeName)
   654  		if err != nil {
   655  			return nil, err
   656  		}
   657  
   658  		switch typeName {
   659  		case "AiWorkflowsCreateResponseError":
   660  			var interfaceType AiWorkflowsCreateResponseError
   661  			err = json.Unmarshal(b, &interfaceType)
   662  			if err != nil {
   663  				return nil, err
   664  			}
   665  
   666  			var xxx AiWorkflowsResponseErrorInterface = &interfaceType
   667  
   668  			return &xxx, nil
   669  		case "AiWorkflowsDeleteResponseError":
   670  			var interfaceType AiWorkflowsDeleteResponseError
   671  			err = json.Unmarshal(b, &interfaceType)
   672  			if err != nil {
   673  				return nil, err
   674  			}
   675  
   676  			var xxx AiWorkflowsResponseErrorInterface = &interfaceType
   677  
   678  			return &xxx, nil
   679  		case "AiWorkflowsTestResponseError":
   680  			var interfaceType AiWorkflowsTestResponseError
   681  			err = json.Unmarshal(b, &interfaceType)
   682  			if err != nil {
   683  				return nil, err
   684  			}
   685  
   686  			var xxx AiWorkflowsResponseErrorInterface = &interfaceType
   687  
   688  			return &xxx, nil
   689  		case "AiWorkflowsUpdateResponseError":
   690  			var interfaceType AiWorkflowsUpdateResponseError
   691  			err = json.Unmarshal(b, &interfaceType)
   692  			if err != nil {
   693  				return nil, err
   694  			}
   695  
   696  			var xxx AiWorkflowsResponseErrorInterface = &interfaceType
   697  
   698  			return &xxx, nil
   699  		}
   700  	} else {
   701  		keys := []string{}
   702  		for k := range rawMessageAiWorkflowsResponseError {
   703  			keys = append(keys, k)
   704  		}
   705  		return nil, fmt.Errorf("interface AiWorkflowsResponseError did not include a __typename field for inspection: %s", keys)
   706  	}
   707  
   708  	return nil, fmt.Errorf("interface AiWorkflowsResponseError was not matched against all PossibleTypes: %s", typeName)
   709  }