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

     1  // Code generated by tutone: DO NOT EDIT
     2  package dashboards
     3  
     4  import (
     5  	"github.com/newrelic/newrelic-client-go/pkg/common"
     6  	"github.com/newrelic/newrelic-client-go/pkg/entities"
     7  	"github.com/newrelic/newrelic-client-go/pkg/nrdb"
     8  	"github.com/newrelic/newrelic-client-go/pkg/nrtime"
     9  )
    10  
    11  // DashboardCreateErrorType - Expected error types that can be returned by create operation
    12  type DashboardCreateErrorType string
    13  
    14  var DashboardCreateErrorTypeTypes = struct {
    15  	// Invalid input error
    16  	INVALID_INPUT DashboardCreateErrorType
    17  }{
    18  	// Invalid input error
    19  	INVALID_INPUT: "INVALID_INPUT",
    20  }
    21  
    22  // DashboardDeleteErrorType - Expected error types that can be returned by delete operation
    23  type DashboardDeleteErrorType string
    24  
    25  var DashboardDeleteErrorTypeTypes = struct {
    26  	// Dashboard not found in the system
    27  	DASHBOARD_NOT_FOUND DashboardDeleteErrorType
    28  	// User is not allowed to execute the operation
    29  	FORBIDDEN_OPERATION DashboardDeleteErrorType
    30  }{
    31  	// Dashboard not found in the system
    32  	DASHBOARD_NOT_FOUND: "DASHBOARD_NOT_FOUND",
    33  	// User is not allowed to execute the operation
    34  	FORBIDDEN_OPERATION: "FORBIDDEN_OPERATION",
    35  }
    36  
    37  // DashboardDeleteResultStatus - Result status of delete operation.
    38  type DashboardDeleteResultStatus string
    39  
    40  var DashboardDeleteResultStatusTypes = struct {
    41  	// FAILURE.
    42  	FAILURE DashboardDeleteResultStatus
    43  	// SUCCESS.
    44  	SUCCESS DashboardDeleteResultStatus
    45  }{
    46  	// FAILURE.
    47  	FAILURE: "FAILURE",
    48  	// SUCCESS.
    49  	SUCCESS: "SUCCESS",
    50  }
    51  
    52  // DashboardUpdateErrorType - Expected error types that can be returned by update operation
    53  type DashboardUpdateErrorType string
    54  
    55  var DashboardUpdateErrorTypeTypes = struct {
    56  	// User is not allowed to execute the operation
    57  	FORBIDDEN_OPERATION DashboardUpdateErrorType
    58  	// Invalid input error
    59  	INVALID_INPUT DashboardUpdateErrorType
    60  }{
    61  	// User is not allowed to execute the operation
    62  	FORBIDDEN_OPERATION: "FORBIDDEN_OPERATION",
    63  	// Invalid input error
    64  	INVALID_INPUT: "INVALID_INPUT",
    65  }
    66  
    67  // DashboardUpdatePageErrorType - Expected error types that can be returned by updatePage operation
    68  type DashboardUpdatePageErrorType string
    69  
    70  var DashboardUpdatePageErrorTypeTypes = struct {
    71  	// User is not allowed to execute the operation
    72  	FORBIDDEN_OPERATION DashboardUpdatePageErrorType
    73  	// Invalid input error
    74  	INVALID_INPUT DashboardUpdatePageErrorType
    75  	// Page not found in the system
    76  	PAGE_NOT_FOUND DashboardUpdatePageErrorType
    77  }{
    78  	// User is not allowed to execute the operation
    79  	FORBIDDEN_OPERATION: "FORBIDDEN_OPERATION",
    80  	// Invalid input error
    81  	INVALID_INPUT: "INVALID_INPUT",
    82  	// Page not found in the system
    83  	PAGE_NOT_FOUND: "PAGE_NOT_FOUND",
    84  }
    85  
    86  // DashboardUpdateWidgetsInPageErrorType - Expected error types that can be returned by updateWidgetsInPage operation
    87  type DashboardUpdateWidgetsInPageErrorType string
    88  
    89  var DashboardUpdateWidgetsInPageErrorTypeTypes = struct {
    90  	// User is not allowed to execute the operation
    91  	FORBIDDEN_OPERATION DashboardUpdateWidgetsInPageErrorType
    92  	// Invalid input error
    93  	INVALID_INPUT DashboardUpdateWidgetsInPageErrorType
    94  	// Page not found in the system
    95  	PAGE_NOT_FOUND DashboardUpdateWidgetsInPageErrorType
    96  	// Widget not found in the system
    97  	WIDGET_NOT_FOUND DashboardUpdateWidgetsInPageErrorType
    98  }{
    99  	// User is not allowed to execute the operation
   100  	FORBIDDEN_OPERATION: "FORBIDDEN_OPERATION",
   101  	// Invalid input error
   102  	INVALID_INPUT: "INVALID_INPUT",
   103  	// Page not found in the system
   104  	PAGE_NOT_FOUND: "PAGE_NOT_FOUND",
   105  	// Widget not found in the system
   106  	WIDGET_NOT_FOUND: "WIDGET_NOT_FOUND",
   107  }
   108  
   109  // DashboardAreaWidgetConfigurationInput - Configuration for visualization type 'viz.area'
   110  type DashboardAreaWidgetConfigurationInput struct {
   111  	// nrql queries
   112  	NRQLQueries []DashboardWidgetNRQLQueryInput `json:"nrqlQueries,omitempty"`
   113  }
   114  
   115  // DashboardBarWidgetConfigurationInput - Configuration for visualization type 'viz.bar'
   116  type DashboardBarWidgetConfigurationInput struct {
   117  	// nrql queries
   118  	NRQLQueries []DashboardWidgetNRQLQueryInput `json:"nrqlQueries,omitempty"`
   119  }
   120  
   121  // DashboardBillboardWidgetConfigurationInput - Configuration for visualization type 'viz.billboard'
   122  type DashboardBillboardWidgetConfigurationInput struct {
   123  	// nrql queries
   124  	NRQLQueries []DashboardWidgetNRQLQueryInput `json:"nrqlQueries,omitempty"`
   125  	// thresholds
   126  	Thresholds []DashboardBillboardWidgetThresholdInput `json:"thresholds,omitempty"`
   127  }
   128  
   129  // DashboardCreateError - Expected errors that can be returned by create operation
   130  type DashboardCreateError struct {
   131  	// Error description
   132  	Description string `json:"description,omitempty"`
   133  	// Error type
   134  	Type DashboardCreateErrorType `json:"type"`
   135  }
   136  
   137  // DashboardCreateResult - Result of create operation.
   138  type DashboardCreateResult struct {
   139  	// Dashboard creation result
   140  	EntityResult DashboardEntityResult `json:"entityResult,omitempty"`
   141  	// Expected errors while processing request
   142  	Errors []DashboardCreateError `json:"errors,omitempty"`
   143  }
   144  
   145  // DashboardDeleteError - Expected error types that can be returned by delete operation
   146  type DashboardDeleteError struct {
   147  	// Error description
   148  	Description string `json:"description,omitempty"`
   149  	// Error type
   150  	Type DashboardDeleteErrorType `json:"type"`
   151  }
   152  
   153  // DashboardDeleteResult - Result of delete operation.
   154  type DashboardDeleteResult struct {
   155  	// Expected errors while processing request
   156  	Errors []DashboardDeleteError `json:"errors,omitempty"`
   157  	// The status of the attempted delete.
   158  	Status DashboardDeleteResultStatus `json:"status,omitempty"`
   159  }
   160  
   161  // DashboardEntityResult - Public schema - `DashboardEntity` result representation for mutations. It's a subset of the `DashboardEntity` that inherits from the Entity type, but a complete different type.
   162  type DashboardEntityResult struct {
   163  	// Account ID.
   164  	AccountID int `json:"accountId,omitempty"`
   165  	// Dashboard creation timestamp.
   166  	CreatedAt nrtime.DateTime `json:"createdAt,omitempty"`
   167  	// Dashboard description.
   168  	Description string `json:"description,omitempty"`
   169  	// Unique entity identifier.
   170  	GUID common.EntityGUID `json:"guid,omitempty"`
   171  	// Dashboard name.
   172  	Name string `json:"name,omitempty"`
   173  	// Dashboard owner
   174  	Owner entities.DashboardOwnerInfo `json:"owner,omitempty"`
   175  	// Dashboard pages.
   176  	Pages []entities.DashboardPage `json:"pages,omitempty"`
   177  	// Dashboard permissions configuration.
   178  	Permissions entities.DashboardPermissions `json:"permissions,omitempty"`
   179  	// Dashboard update timestamp.
   180  	UpdatedAt nrtime.DateTime `json:"updatedAt,omitempty"`
   181  }
   182  
   183  // DashboardInput - Dashboard input
   184  type DashboardInput struct {
   185  	// Dashboard description.
   186  	Description string `json:"description,omitempty"`
   187  	// Dashboard name.
   188  	Name string `json:"name"`
   189  	// Dashboard page input.
   190  	Pages []DashboardPageInput `json:"pages,omitempty"`
   191  	// Dashboard permissions configuration.
   192  	Permissions entities.DashboardPermissions `json:"permissions"`
   193  }
   194  
   195  // DashboardLineWidgetConfigurationInput - Configuration for visualization type 'viz.line'
   196  type DashboardLineWidgetConfigurationInput struct {
   197  	// nrql queries
   198  	NRQLQueries []DashboardWidgetNRQLQueryInput `json:"nrqlQueries,omitempty"`
   199  }
   200  
   201  // DashboardMarkdownWidgetConfigurationInput - Configuration for visualization type 'viz.markdown'
   202  type DashboardMarkdownWidgetConfigurationInput struct {
   203  	// Markdown content of the widget
   204  	Text string `json:"text"`
   205  }
   206  
   207  // DashboardPageInput - Page input
   208  type DashboardPageInput struct {
   209  	// Page description.
   210  	Description string `json:"description,omitempty"`
   211  	// Unique entity identifier of the Page to be updated. When null, it means a new Page will be created.
   212  	GUID common.EntityGUID `json:"guid,omitempty"`
   213  	// Page name.
   214  	Name string `json:"name"`
   215  	// Page widgets.
   216  	Widgets []DashboardWidgetInput `json:"widgets,omitempty"`
   217  }
   218  
   219  // DashboardPieWidgetConfigurationInput - Configuration for visualization type 'viz.pie'
   220  type DashboardPieWidgetConfigurationInput struct {
   221  	// nrql queries
   222  	NRQLQueries []DashboardWidgetNRQLQueryInput `json:"nrqlQueries,omitempty"`
   223  }
   224  
   225  // DashboardSnapshotURLInput - Parameters that affect the data and the rendering of the dashboards returned by the snapshot url mutation.
   226  type DashboardSnapshotURLInput struct {
   227  	// Period of time from which the data to be displayed on the dashboard will be obtained.
   228  	TimeWindow DashboardSnapshotURLTimeWindowInput `json:"timeWindow,omitempty"`
   229  }
   230  
   231  // DashboardSnapshotURLTimeWindowInput - Period of time from which the data to be displayed on the dashboard will be obtained.
   232  type DashboardSnapshotURLTimeWindowInput struct {
   233  	// The starting time of the time window. If specified, an endTime or a duration must also be specified.
   234  	BeginTime nrtime.EpochMilliseconds `json:"beginTime,omitempty"`
   235  	// The duration of the time window.
   236  	Duration nrtime.Milliseconds `json:"duration,omitempty"`
   237  	// The end time of the time window. If specified, a beginTime or a duration must also be specified.
   238  	EndTime nrtime.EpochMilliseconds `json:"endTime,omitempty"`
   239  }
   240  
   241  // DashboardTableWidgetConfigurationInput - Configuration for visualization type 'viz.table'
   242  type DashboardTableWidgetConfigurationInput struct {
   243  	// nrql queries
   244  	NRQLQueries []DashboardWidgetNRQLQueryInput `json:"nrqlQueries,omitempty"`
   245  }
   246  
   247  // DashboardUpdateError - Expected errors that can be returned by update operation
   248  type DashboardUpdateError struct {
   249  	// Error description
   250  	Description string `json:"description,omitempty"`
   251  	// Error type
   252  	Type DashboardUpdateErrorType `json:"type"`
   253  }
   254  
   255  // DashboardUpdatePageError - Expected errors that can be returned by updatePage operation
   256  type DashboardUpdatePageError struct {
   257  	// Error description
   258  	Description string `json:"description,omitempty"`
   259  	// Error type
   260  	Type DashboardUpdatePageErrorType `json:"type"`
   261  }
   262  
   263  // DashboardUpdatePageInput - Page input used when updating an individual page
   264  type DashboardUpdatePageInput struct {
   265  	// Page description.
   266  	Description string `json:"description,omitempty"`
   267  	// Page name.
   268  	Name string `json:"name"`
   269  	// Page widgets.
   270  	Widgets []DashboardWidgetInput `json:"widgets,omitempty"`
   271  }
   272  
   273  // DashboardUpdatePageResult - Result of updatePage operation.
   274  type DashboardUpdatePageResult struct {
   275  	// Expected errors while processing request. No errors means successful request.
   276  	Errors []DashboardUpdatePageError `json:"errors,omitempty"`
   277  }
   278  
   279  // DashboardUpdateResult - Result of update operation.
   280  type DashboardUpdateResult struct {
   281  	// Dashboard update result
   282  	EntityResult DashboardEntityResult `json:"entityResult,omitempty"`
   283  	// Expected errors while processing request
   284  	Errors []DashboardUpdateError `json:"errors,omitempty"`
   285  }
   286  
   287  // DashboardUpdateWidgetInput - Input type used when updating widgets
   288  type DashboardUpdateWidgetInput struct {
   289  	// Typed configuration for the widget
   290  	Configuration DashboardWidgetConfigurationInput `json:"configuration,omitempty"`
   291  	// Id of the widget to be updated.
   292  	ID string `json:"id"`
   293  	// layout
   294  	Layout DashboardWidgetLayoutInput `json:"layout,omitempty"`
   295  	// Related entities. Currently only supports Dashboard entities, but may allow other cases in the future.
   296  	LinkedEntityGUIDs []common.EntityGUID `json:"linkedEntityGuids"`
   297  	// Untyped scalar of configuration for the widget
   298  	RawConfiguration entities.DashboardWidgetRawConfiguration `json:"rawConfiguration,omitempty"`
   299  	// title
   300  	Title string `json:"title,omitempty"`
   301  	// Specifies how this widget will be visualized. If null, the WidgetConfigurationInput will be used to determine the visualization.
   302  	Visualization DashboardWidgetVisualizationInput `json:"visualization,omitempty"`
   303  }
   304  
   305  // DashboardUpdateWidgetsInPageError - Expected errors that can be returned by updateWidgetsInPage operation
   306  type DashboardUpdateWidgetsInPageError struct {
   307  	// Error description
   308  	Description string `json:"description,omitempty"`
   309  	// Error type
   310  	Type DashboardUpdateWidgetsInPageErrorType `json:"type"`
   311  }
   312  
   313  // DashboardUpdateWidgetsInPageResult - Result of updateWidgetsInPage operation.
   314  type DashboardUpdateWidgetsInPageResult struct {
   315  	// Expected errors while processing request. No errors means successful request.
   316  	Errors []DashboardUpdateWidgetsInPageError `json:"errors,omitempty"`
   317  }
   318  
   319  // DashboardWidgetConfigurationInput - Typed configuration for known visualizations. At most one may be populated.
   320  type DashboardWidgetConfigurationInput struct {
   321  	// Configuration for visualization type 'viz.area'
   322  	Area *DashboardAreaWidgetConfigurationInput `json:"area,omitempty"`
   323  	// Configuration for visualization type 'viz.bar'
   324  	Bar *DashboardBarWidgetConfigurationInput `json:"bar,omitempty"`
   325  	// Configuration for visualization type 'viz.billboard'
   326  	Billboard *DashboardBillboardWidgetConfigurationInput `json:"billboard,omitempty"`
   327  	// Configuration for visualization type 'viz.line'
   328  	Line *DashboardLineWidgetConfigurationInput `json:"line,omitempty"`
   329  	// Configuration for visualization type 'viz.markdown'
   330  	Markdown *DashboardMarkdownWidgetConfigurationInput `json:"markdown,omitempty"`
   331  	// Configuration for visualization type 'viz.pie'
   332  	Pie *DashboardPieWidgetConfigurationInput `json:"pie,omitempty"`
   333  	// Configuration for visualization type 'viz.table'
   334  	Table *DashboardTableWidgetConfigurationInput `json:"table,omitempty"`
   335  }
   336  
   337  // DashboardWidgetInput - Widget input
   338  type DashboardWidgetInput struct {
   339  	// Typed configuration for the widget
   340  	Configuration DashboardWidgetConfigurationInput `json:"configuration,omitempty"`
   341  	// Id of the widget. If null, a new widget will be created and added to a dashboard.
   342  	ID string `json:"id,omitempty"`
   343  	// layout
   344  	Layout DashboardWidgetLayoutInput `json:"layout,omitempty"`
   345  	// Related entities. Currently only supports Dashboard entities, but may allow other cases in the future.
   346  	LinkedEntityGUIDs []common.EntityGUID `json:"linkedEntityGuids"`
   347  	// Untyped scalar of configuration for the widget
   348  	RawConfiguration entities.DashboardWidgetRawConfiguration `json:"rawConfiguration,omitempty"`
   349  	// title
   350  	Title string `json:"title,omitempty"`
   351  	// Specifies how this widget will be visualized. If null, the WidgetConfigurationInput will be used to determine the visualization.
   352  	Visualization DashboardWidgetVisualizationInput `json:"visualization,omitempty"`
   353  }
   354  
   355  // DashboardWidgetLayoutInput - Widget layout input
   356  type DashboardWidgetLayoutInput struct {
   357  	// column.
   358  	Column int `json:"column,omitempty"`
   359  	// height.
   360  	Height int `json:"height,omitempty"`
   361  	// row.
   362  	Row int `json:"row,omitempty"`
   363  	// width.
   364  	Width int `json:"width,omitempty"`
   365  }
   366  
   367  // DashboardWidgetNRQLQueryInput - NRQL query used by a widget
   368  type DashboardWidgetNRQLQueryInput struct {
   369  	// accountId
   370  	AccountID int `json:"accountId"`
   371  	// NRQL formatted query
   372  	Query nrdb.NRQL `json:"query"`
   373  }
   374  
   375  // DashboardWidgetVisualizationInput - Visualization configuration
   376  type DashboardWidgetVisualizationInput struct {
   377  	// Nerdpack artifact ID
   378  	ID string `json:"id,omitempty"`
   379  }