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

     1  // Code generated by tutone: DO NOT EDIT
     2  package eventstometrics
     3  
     4  import (
     5  	"github.com/newrelic/newrelic-client-go/pkg/nrtime"
     6  )
     7  
     8  // EventsToMetricsErrorReason - General error categories.
     9  type EventsToMetricsErrorReason string
    10  
    11  var EventsToMetricsErrorReasonTypes = struct {
    12  	// Other errors.
    13  	GENERAL EventsToMetricsErrorReason
    14  	// Indicates some part of your submission was invalid.
    15  	INVALID_INPUT EventsToMetricsErrorReason
    16  	// The user attempting to submit this rule is not authorized to do so.
    17  	USER_NOT_AUTHORIZED EventsToMetricsErrorReason
    18  }{
    19  	// Other errors.
    20  	GENERAL: "GENERAL",
    21  	// Indicates some part of your submission was invalid.
    22  	INVALID_INPUT: "INVALID_INPUT",
    23  	// The user attempting to submit this rule is not authorized to do so.
    24  	USER_NOT_AUTHORIZED: "USER_NOT_AUTHORIZED",
    25  }
    26  
    27  // EventsToMetricsAccountStitchedFields - Account stitched fields to enable autostitching in NerdGraph
    28  type EventsToMetricsAccountStitchedFields struct {
    29  	// List all rules for your account.
    30  	AllRules EventsToMetricsListRuleResult `json:"allRules,omitempty"`
    31  	// List rules for your account by id.
    32  	RulesById EventsToMetricsListRuleResult `json:"rulesById,omitempty"`
    33  }
    34  
    35  // EventsToMetricsCreateRuleFailure - Error details about the events to metrics rule that failed to be created and why.
    36  type EventsToMetricsCreateRuleFailure struct {
    37  	// Information about why the create failed.
    38  	Errors []EventsToMetricsError `json:"errors,omitempty"`
    39  	// Input information about a submitted rule that was unable to be created.
    40  	Submitted EventsToMetricsCreateRuleSubmission `json:"submitted,omitempty"`
    41  }
    42  
    43  // EventsToMetricsCreateRuleInput - Details needed to create an events to metrics conversion rule.
    44  type EventsToMetricsCreateRuleInput struct {
    45  	// The account where the events exist and the metrics will be put.
    46  	AccountID int `json:"accountId"`
    47  	// Provides additional information about the rule.
    48  	Description string `json:"description,omitempty"`
    49  	// Explains how to create one or more metrics from events.
    50  	NRQL string `json:"nrql"`
    51  	// The name of the rule. This must be unique within a given account.
    52  	Name string `json:"name"`
    53  }
    54  
    55  // EventsToMetricsCreateRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully created
    56  type EventsToMetricsCreateRuleResult struct {
    57  	// Rules that were not created and why.
    58  	Failures []EventsToMetricsCreateRuleFailure `json:"failures,omitempty"`
    59  	// Rules that were successfully created.
    60  	Successes []EventsToMetricsRule `json:"successes,omitempty"`
    61  }
    62  
    63  // EventsToMetricsCreateRuleSubmission - The details that were submitted when creating an events to metrics conversion rule.
    64  type EventsToMetricsCreateRuleSubmission struct {
    65  	// The account where the events exist and the metrics will be put.
    66  	AccountID int `json:"accountId"`
    67  	// Provides additional information about the rule.
    68  	Description string `json:"description,omitempty"`
    69  	// Explains how to create one or more metrics from events.
    70  	NRQL string `json:"nrql"`
    71  	// The name of the rule. This must be unique within a given account.
    72  	Name string `json:"name"`
    73  }
    74  
    75  // EventsToMetricsDeleteRuleFailure - Error details about the events to metrics rule that failed to be deleted and why.
    76  type EventsToMetricsDeleteRuleFailure struct {
    77  	// Information about why the delete failed.
    78  	Errors []EventsToMetricsError `json:"errors,omitempty"`
    79  	// Input information about a submitted rule that was unable to be deleted.
    80  	Submitted EventsToMetricsDeleteRuleSubmission `json:"submitted,omitempty"`
    81  }
    82  
    83  // EventsToMetricsDeleteRuleInput - Identifying information about the events to metrics rule you want to delete.
    84  type EventsToMetricsDeleteRuleInput struct {
    85  	// A submitted account id.
    86  	AccountID int `json:"accountId"`
    87  	// A submitted rule id.
    88  	RuleId string `json:"ruleId"`
    89  }
    90  
    91  // EventsToMetricsDeleteRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully deleted.
    92  type EventsToMetricsDeleteRuleResult struct {
    93  	// Information about the rules that could not be deleted.
    94  	Failures []EventsToMetricsDeleteRuleFailure `json:"failures,omitempty"`
    95  	// Rules that were successfully deleted.
    96  	Successes []EventsToMetricsRule `json:"successes,omitempty"`
    97  }
    98  
    99  // EventsToMetricsDeleteRuleSubmission - The details that were submitted when deleteing an events to metrics conversion rule.
   100  type EventsToMetricsDeleteRuleSubmission struct {
   101  	// A submitted account id.
   102  	AccountID int `json:"accountId"`
   103  	// A submitted rule id.
   104  	RuleId string `json:"ruleId"`
   105  }
   106  
   107  // EventsToMetricsError - Error details when processing events to metrics rule requests.
   108  type EventsToMetricsError struct {
   109  	// A detailed error message.
   110  	Description string `json:"description,omitempty"`
   111  	// The category of error that occurred.
   112  	Reason EventsToMetricsErrorReason `json:"reason,omitempty"`
   113  }
   114  
   115  // EventsToMetricsListRuleResult - A list of rule details to be returned.
   116  type EventsToMetricsListRuleResult struct {
   117  	// Event-to-metric rules to be returned.
   118  	Rules []EventsToMetricsRule `json:"rules,omitempty"`
   119  }
   120  
   121  // EventsToMetricsRule - Information about an event-to-metric rule which creates metrics from events.
   122  type EventsToMetricsRule struct {
   123  	// Account with the event and where the metrics will be placed.
   124  	AccountID int `json:"accountId"`
   125  	// The time at which the rule was created
   126  	CreatedAt nrtime.DateTime `json:"createdAt"`
   127  	// Additional information about the rule.
   128  	Description string `json:"description,omitempty"`
   129  	// True means this rule is enabled. False means the rule is currently not creating metrics.
   130  	Enabled bool `json:"enabled"`
   131  	// The id, uniquely identifying the rule.
   132  	ID string `json:"id"`
   133  	// Explains how to create metrics from events.
   134  	NRQL string `json:"nrql"`
   135  	// The name of the rule. This must be unique within an account.
   136  	Name string `json:"name"`
   137  	// The time at which the rule was updated
   138  	UpdatedAt nrtime.DateTime `json:"updatedAt"`
   139  }
   140  
   141  // EventsToMetricsUpdateRuleFailure - Error details about the events to metrics rule that failed to be updated and why.
   142  type EventsToMetricsUpdateRuleFailure struct {
   143  	// Information about why the update failed.
   144  	Errors []EventsToMetricsError `json:"errors,omitempty"`
   145  	// Input information about a failed update.
   146  	Submitted EventsToMetricsUpdateRuleSubmission `json:"submitted,omitempty"`
   147  }
   148  
   149  // EventsToMetricsUpdateRuleInput - Identifying information about the events to metrics rule you want to update.
   150  type EventsToMetricsUpdateRuleInput struct {
   151  	// A submitted account id.
   152  	AccountID int `json:"accountId"`
   153  	// Changes the state of the rule as being enabled or disabled.
   154  	Enabled bool `json:"enabled"`
   155  	// A submitted rule id.
   156  	RuleId string `json:"ruleId"`
   157  }
   158  
   159  // EventsToMetricsUpdateRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully update.
   160  type EventsToMetricsUpdateRuleResult struct {
   161  	// Rules that failed to get updated.
   162  	Failures []EventsToMetricsUpdateRuleFailure `json:"failures,omitempty"`
   163  	// Rules that were successfully enabled or disabled.
   164  	Successes []EventsToMetricsRule `json:"successes,omitempty"`
   165  }
   166  
   167  // EventsToMetricsUpdateRuleSubmission - The details that were submitted when updating an events to metrics conversion rule.
   168  type EventsToMetricsUpdateRuleSubmission struct {
   169  	// A submitted account id.
   170  	AccountID int `json:"accountId"`
   171  	// Changes the state of the rule as being enabled or disabled.
   172  	Enabled bool `json:"enabled"`
   173  	// A submitted rule id.
   174  	RuleId string `json:"ruleId"`
   175  }