github.com/newrelic/newrelic-client-go@v1.1.0/pkg/synthetics/types.go (about) 1 // Code generated by tutone: DO NOT EDIT 2 package synthetics 3 4 import ( 5 "encoding/json" 6 "fmt" 7 8 "github.com/newrelic/newrelic-client-go/pkg/nrtime" 9 ) 10 11 // Nr1CatalogInstallPlanDestination - Possible destinations for the install plan target 12 type Nr1CatalogInstallPlanDestination string 13 14 var Nr1CatalogInstallPlanDestinationTypes = struct { 15 // Application (APM) install 16 APPLICATION Nr1CatalogInstallPlanDestination 17 // Cloud provider install 18 CLOUD Nr1CatalogInstallPlanDestination 19 // Host install 20 HOST Nr1CatalogInstallPlanDestination 21 // Kubernetes install 22 KUBERNETES Nr1CatalogInstallPlanDestination 23 // Unknown install - special case when the target where the install takes place is unknown (such as guided install) 24 UNKNOWN Nr1CatalogInstallPlanDestination 25 }{ 26 // Application (APM) install 27 APPLICATION: "APPLICATION", 28 // Cloud provider install 29 CLOUD: "CLOUD", 30 // Host install 31 HOST: "HOST", 32 // Kubernetes install 33 KUBERNETES: "KUBERNETES", 34 // Unknown install - special case when the target where the install takes place is unknown (such as guided install) 35 UNKNOWN: "UNKNOWN", 36 } 37 38 // Nr1CatalogInstallPlanDirectiveMode - Possible modes for an install plan directive 39 type Nr1CatalogInstallPlanDirectiveMode string 40 41 var Nr1CatalogInstallPlanDirectiveModeTypes = struct { 42 // Directs the installation toward an external link 43 LINK Nr1CatalogInstallPlanDirectiveMode 44 // Directs the installation to open a stacked Nerdlet to perform the installation 45 NERDLET Nr1CatalogInstallPlanDirectiveMode 46 // Directs the installation toward a specific target 47 TARGETED Nr1CatalogInstallPlanDirectiveMode 48 }{ 49 // Directs the installation toward an external link 50 LINK: "LINK", 51 // Directs the installation to open a stacked Nerdlet to perform the installation 52 NERDLET: "NERDLET", 53 // Directs the installation toward a specific target 54 TARGETED: "TARGETED", 55 } 56 57 // Nr1CatalogInstallPlanOperatingSystem - Possible types for the install plan operating system 58 type Nr1CatalogInstallPlanOperatingSystem string 59 60 var Nr1CatalogInstallPlanOperatingSystemTypes = struct { 61 // Mac operating system 62 DARWIN Nr1CatalogInstallPlanOperatingSystem 63 // Linux operating system 64 LINUX Nr1CatalogInstallPlanOperatingSystem 65 // Windows operating system 66 WINDOWS Nr1CatalogInstallPlanOperatingSystem 67 }{ 68 // Mac operating system 69 DARWIN: "DARWIN", 70 // Linux operating system 71 LINUX: "LINUX", 72 // Windows operating system 73 WINDOWS: "WINDOWS", 74 } 75 76 // Nr1CatalogInstallPlanTargetType - Possible types for the install plan target 77 type Nr1CatalogInstallPlanTargetType string 78 79 var Nr1CatalogInstallPlanTargetTypeTypes = struct { 80 // Agent install 81 AGENT Nr1CatalogInstallPlanTargetType 82 // Integration install 83 INTEGRATION Nr1CatalogInstallPlanTargetType 84 // On host integration install 85 ON_HOST_INTEGRATION Nr1CatalogInstallPlanTargetType 86 // Unknown install - special case when the target where the install takes place is unknown (such as guided install) 87 UNKNOWN Nr1CatalogInstallPlanTargetType 88 }{ 89 // Agent install 90 AGENT: "AGENT", 91 // Integration install 92 INTEGRATION: "INTEGRATION", 93 // On host integration install 94 ON_HOST_INTEGRATION: "ON_HOST_INTEGRATION", 95 // Unknown install - special case when the target where the install takes place is unknown (such as guided install) 96 UNKNOWN: "UNKNOWN", 97 } 98 99 // SyntheticsMonitorCreateErrorType - Types of errors that can be returned from a create monitor request 100 type SyntheticsMonitorCreateErrorType string 101 102 var SyntheticsMonitorCreateErrorTypeTypes = struct { 103 // Received a request missing required fields or containing invalid data 104 BAD_REQUEST SyntheticsMonitorCreateErrorType 105 // An unknown error occured while processing request to mutate monitor 106 INTERNAL_SERVER_ERROR SyntheticsMonitorCreateErrorType 107 // Monitor not found for given guid (monitor does not exist on account or has already been deleted) 108 NOT_FOUND SyntheticsMonitorCreateErrorType 109 // Monitor tags were not udpated. 110 TAGGING_ERROR SyntheticsMonitorCreateErrorType 111 // User does not have authorization to perform monitor mutation. 112 UNAUTHORIZED SyntheticsMonitorCreateErrorType 113 // An unknown error occurred while processing request to create monitor 114 UNKNOWN_ERROR SyntheticsMonitorCreateErrorType 115 }{ 116 // Received a request missing required fields or containing invalid data 117 BAD_REQUEST: "BAD_REQUEST", 118 // An unknown error occured while processing request to mutate monitor 119 INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR", 120 // Monitor not found for given guid (monitor does not exist on account or has already been deleted) 121 NOT_FOUND: "NOT_FOUND", 122 // Monitor tags were not udpated. 123 TAGGING_ERROR: "TAGGING_ERROR", 124 // User does not have authorization to perform monitor mutation. 125 UNAUTHORIZED: "UNAUTHORIZED", 126 // An unknown error occurred while processing request to create monitor 127 UNKNOWN_ERROR: "UNKNOWN_ERROR", 128 } 129 130 // SyntheticsMonitorPeriod - Enum of monitor period types 131 type SyntheticsMonitorPeriod string 132 133 var SyntheticsMonitorPeriodTypes = struct { 134 // 10 minute monitor period 135 EVERY_10_MINUTES SyntheticsMonitorPeriod 136 // 12 hour monitor period (720 minutes) 137 EVERY_12_HOURS SyntheticsMonitorPeriod 138 // 15 minute monitor period 139 EVERY_15_MINUTES SyntheticsMonitorPeriod 140 // 30 minute monitor period 141 EVERY_30_MINUTES SyntheticsMonitorPeriod 142 // 5 minute monitor period 143 EVERY_5_MINUTES SyntheticsMonitorPeriod 144 // 6 hour monitor period (360 minutes) 145 EVERY_6_HOURS SyntheticsMonitorPeriod 146 // 1 day monitor period (1440 minutes) 147 EVERY_DAY SyntheticsMonitorPeriod 148 // 1 hour monitor period (60 minutes) 149 EVERY_HOUR SyntheticsMonitorPeriod 150 // 1 minute monitor period 151 EVERY_MINUTE SyntheticsMonitorPeriod 152 }{ 153 // 10 minute monitor period 154 EVERY_10_MINUTES: "EVERY_10_MINUTES", 155 // 12 hour monitor period (720 minutes) 156 EVERY_12_HOURS: "EVERY_12_HOURS", 157 // 15 minute monitor period 158 EVERY_15_MINUTES: "EVERY_15_MINUTES", 159 // 30 minute monitor period 160 EVERY_30_MINUTES: "EVERY_30_MINUTES", 161 // 5 minute monitor period 162 EVERY_5_MINUTES: "EVERY_5_MINUTES", 163 // 6 hour monitor period (360 minutes) 164 EVERY_6_HOURS: "EVERY_6_HOURS", 165 // 1 day monitor period (1440 minutes) 166 EVERY_DAY: "EVERY_DAY", 167 // 1 hour monitor period (60 minutes) 168 EVERY_HOUR: "EVERY_HOUR", 169 // 1 minute monitor period 170 EVERY_MINUTE: "EVERY_MINUTE", 171 } 172 173 // SyntheticsMonitorStatus - Run state of the monitor 174 type SyntheticsMonitorStatus string 175 176 var SyntheticsMonitorStatusTypes = struct { 177 // Monitor disabled runs status of a monitor 178 DISABLED SyntheticsMonitorStatus 179 // Enabled status of a monitor 180 ENABLED SyntheticsMonitorStatus 181 // Alerts muted status of a monitor 182 MUTED SyntheticsMonitorStatus 183 }{ 184 // Monitor disabled runs status of a monitor 185 DISABLED: "DISABLED", 186 // Enabled status of a monitor 187 ENABLED: "ENABLED", 188 // Alerts muted status of a monitor 189 MUTED: "MUTED", 190 } 191 192 // SyntheticsMonitorUpdateErrorType - Types of errors that can be returned from a Monitor mutation request 193 type SyntheticsMonitorUpdateErrorType string 194 195 var SyntheticsMonitorUpdateErrorTypeTypes = struct { 196 // Received a request missing required fields or containing invalid data 197 BAD_REQUEST SyntheticsMonitorUpdateErrorType 198 // An unknown error occured while processing request to mutate monitor 199 INTERNAL_SERVER_ERROR SyntheticsMonitorUpdateErrorType 200 // Monitor not found for given guid (monitor does not exist on account or has already been deleted) 201 NOT_FOUND SyntheticsMonitorUpdateErrorType 202 // An error occurred while updating monitor script 203 SCRIPT_ERROR SyntheticsMonitorUpdateErrorType 204 // Monitor tags were not udpated. 205 TAGGING_ERROR SyntheticsMonitorUpdateErrorType 206 // User does not have authorization to perform monitor mutation. 207 UNAUTHORIZED SyntheticsMonitorUpdateErrorType 208 // An unknown error occurred while processing request to update monitor 209 UNKNOWN_ERROR SyntheticsMonitorUpdateErrorType 210 }{ 211 // Received a request missing required fields or containing invalid data 212 BAD_REQUEST: "BAD_REQUEST", 213 // An unknown error occured while processing request to mutate monitor 214 INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR", 215 // Monitor not found for given guid (monitor does not exist on account or has already been deleted) 216 NOT_FOUND: "NOT_FOUND", 217 // An error occurred while updating monitor script 218 SCRIPT_ERROR: "SCRIPT_ERROR", 219 // Monitor tags were not udpated. 220 TAGGING_ERROR: "TAGGING_ERROR", 221 // User does not have authorization to perform monitor mutation. 222 UNAUTHORIZED: "UNAUTHORIZED", 223 // An unknown error occurred while processing request to update monitor 224 UNKNOWN_ERROR: "UNKNOWN_ERROR", 225 } 226 227 // SyntheticsPrivateLocationMutationErrorType - Types of errors that can be returned from a Private Location mutation request 228 type SyntheticsPrivateLocationMutationErrorType string 229 230 var SyntheticsPrivateLocationMutationErrorTypeTypes = struct { 231 // Received a request missing required fields or containing invalid data 232 BAD_REQUEST SyntheticsPrivateLocationMutationErrorType 233 // An unknown error occured while processing request to purge specified private location job queue 234 INTERNAL_SERVER_ERROR SyntheticsPrivateLocationMutationErrorType 235 // Private location not found for key (private location does not exist on account or has already been deleted) 236 NOT_FOUND SyntheticsPrivateLocationMutationErrorType 237 // User does not have authorization to purge job queue for specified private location 238 UNAUTHORIZED SyntheticsPrivateLocationMutationErrorType 239 }{ 240 // Received a request missing required fields or containing invalid data 241 BAD_REQUEST: "BAD_REQUEST", 242 // An unknown error occured while processing request to purge specified private location job queue 243 INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR", 244 // Private location not found for key (private location does not exist on account or has already been deleted) 245 NOT_FOUND: "NOT_FOUND", 246 // User does not have authorization to purge job queue for specified private location 247 UNAUTHORIZED: "UNAUTHORIZED", 248 } 249 250 // SyntheticsStepType - enum of of script step types 251 type SyntheticsStepType string 252 253 var SyntheticsStepTypeTypes = struct { 254 // Assert on element accessed by ID, CSS, or x-path 255 ASSERT_ELEMENT SyntheticsStepType 256 // Assert on modal exists 257 ASSERT_MODAL SyntheticsStepType 258 // Assert on text accessed by ID, CSS, or x-path 259 ASSERT_TEXT SyntheticsStepType 260 // Assert on title of page 261 ASSERT_TITLE SyntheticsStepType 262 // Click on an element by ID, CSS, or x-path 263 CLICK_ELEMENT SyntheticsStepType 264 // Preform actions on a modal to dismiss 265 DISMISS_MODAL SyntheticsStepType 266 // Double click on an element by ID, CSS, or x-path 267 DOUBLE_CLICK_ELEMENT SyntheticsStepType 268 // Hover over an element by x-path 269 HOVER_ELEMENT SyntheticsStepType 270 // Navigate to the specified url 271 NAVIGATE SyntheticsStepType 272 // Input secure credential into element accessed by ID, CSS, or x-path 273 SECURE_TEXT_ENTRY SyntheticsStepType 274 // Select a dropdown element by value, text, ID, CSS, or x-path 275 SELECT_ELEMENT SyntheticsStepType 276 // Input text into element accessed by ID, CSS, or x-path 277 TEXT_ENTRY SyntheticsStepType 278 }{ 279 // Assert on element accessed by ID, CSS, or x-path 280 ASSERT_ELEMENT: "ASSERT_ELEMENT", 281 // Assert on modal exists 282 ASSERT_MODAL: "ASSERT_MODAL", 283 // Assert on text accessed by ID, CSS, or x-path 284 ASSERT_TEXT: "ASSERT_TEXT", 285 // Assert on title of page 286 ASSERT_TITLE: "ASSERT_TITLE", 287 // Click on an element by ID, CSS, or x-path 288 CLICK_ELEMENT: "CLICK_ELEMENT", 289 // Preform actions on a modal to dismiss 290 DISMISS_MODAL: "DISMISS_MODAL", 291 // Double click on an element by ID, CSS, or x-path 292 DOUBLE_CLICK_ELEMENT: "DOUBLE_CLICK_ELEMENT", 293 // Hover over an element by x-path 294 HOVER_ELEMENT: "HOVER_ELEMENT", 295 // Navigate to the specified url 296 NAVIGATE: "NAVIGATE", 297 // Input secure credential into element accessed by ID, CSS, or x-path 298 SECURE_TEXT_ENTRY: "SECURE_TEXT_ENTRY", 299 // Select a dropdown element by value, text, ID, CSS, or x-path 300 SELECT_ELEMENT: "SELECT_ELEMENT", 301 // Input text into element accessed by ID, CSS, or x-path 302 TEXT_ENTRY: "TEXT_ENTRY", 303 } 304 305 // Account - The `Account` object provides general data about the account, as well as 306 // being the entry point into more detailed data about a single account. 307 // 308 // Account configuration data is queried through this object, as well as 309 // telemetry data that is specific to a single account. 310 type Account struct { 311 // 312 ID int `json:"id,omitempty"` 313 // 314 LicenseKey string `json:"licenseKey,omitempty"` 315 // 316 Name string `json:"name,omitempty"` 317 // This field provides access to Synthetics data. 318 Synthetics SyntheticsAccountStitchedFields `json:"synthetics,omitempty"` 319 } 320 321 // Actor - The `Actor` object contains fields that are scoped to the API user's access level. 322 type Actor struct { 323 // The `account` field is the entry point into data that is scoped to a single account. 324 Account Account `json:"account,omitempty"` 325 } 326 327 // Nr1CatalogInstallPlanDirective - Information about an install plan directive 328 type Nr1CatalogInstallPlanDirective struct { 329 // The mode of the install plan directive 330 Mode Nr1CatalogInstallPlanDirectiveMode `json:"mode"` 331 } 332 333 func (x *Nr1CatalogInstallPlanDirective) ImplementsNr1CatalogInstallPlanDirective() {} 334 335 // Nr1CatalogInstallPlanStep - Information pertaining to a specific step in the installation plan 336 type Nr1CatalogInstallPlanStep struct { 337 // A short form description for the install plan step 338 Description string `json:"description,omitempty"` 339 // The human-readable name for the install plan step 340 DisplayName string `json:"displayName"` 341 // Provides context about how the fallback install plan step should proceed 342 Fallback Nr1CatalogInstallPlanDirectiveInterface `json:"fallback,omitempty"` 343 // Used as a heading for the install plan step 344 Heading string `json:"heading"` 345 // The unique identifier for the install plan step 346 ID string `json:"id"` 347 // Provides context about how the primary install plan step should proceed 348 Primary Nr1CatalogInstallPlanDirectiveInterface `json:"primary"` 349 // Provides context about where the install will occur 350 Target Nr1CatalogInstallPlanTarget `json:"target"` 351 } 352 353 // special 354 func (x *Nr1CatalogInstallPlanStep) UnmarshalJSON(b []byte) error { 355 var objMap map[string]*json.RawMessage 356 err := json.Unmarshal(b, &objMap) 357 if err != nil { 358 return err 359 } 360 361 for k, v := range objMap { 362 if v == nil { 363 continue 364 } 365 366 switch k { 367 case "description": 368 err = json.Unmarshal(*v, &x.Description) 369 if err != nil { 370 return err 371 } 372 case "displayName": 373 err = json.Unmarshal(*v, &x.DisplayName) 374 if err != nil { 375 return err 376 } 377 case "fallback": 378 if v == nil { 379 continue 380 } 381 xxx, err := UnmarshalNr1CatalogInstallPlanDirectiveInterface(*v) 382 if err != nil { 383 return err 384 } 385 386 if xxx != nil { 387 x.Fallback = *xxx 388 } 389 case "heading": 390 err = json.Unmarshal(*v, &x.Heading) 391 if err != nil { 392 return err 393 } 394 case "id": 395 err = json.Unmarshal(*v, &x.ID) 396 if err != nil { 397 return err 398 } 399 case "primary": 400 if v == nil { 401 continue 402 } 403 xxx, err := UnmarshalNr1CatalogInstallPlanDirectiveInterface(*v) 404 if err != nil { 405 return err 406 } 407 408 if xxx != nil { 409 x.Primary = *xxx 410 } 411 case "target": 412 err = json.Unmarshal(*v, &x.Target) 413 if err != nil { 414 return err 415 } 416 } 417 } 418 419 return nil 420 } 421 422 // Nr1CatalogInstallPlanTarget - Represents the location of an install 423 type Nr1CatalogInstallPlanTarget struct { 424 // Provides context on the location the install will take place 425 Destination Nr1CatalogInstallPlanDestination `json:"destination"` 426 // Provides context for the operating system that will be targeted 427 Os []Nr1CatalogInstallPlanOperatingSystem `json:"os"` 428 // Provides context for the type of installation that will take place 429 Type Nr1CatalogInstallPlanTargetType `json:"type"` 430 } 431 432 // Nr1CatalogLinkInstallPlanDirective - Information about a link install plan directive 433 type Nr1CatalogLinkInstallPlanDirective struct { 434 // The mode of the install plan directive 435 Mode Nr1CatalogInstallPlanDirectiveMode `json:"mode"` 436 // The URL of the external link used to guide the user through installation 437 URL string `json:"url"` 438 } 439 440 func (x *Nr1CatalogLinkInstallPlanDirective) ImplementsNr1CatalogInstallPlanDirective() {} 441 442 // Nr1CatalogNerdletInstallPlanDirective - Information about a targeted install plan directive 443 type Nr1CatalogNerdletInstallPlanDirective struct { 444 // The mode of the install plan directive 445 Mode Nr1CatalogInstallPlanDirectiveMode `json:"mode"` 446 // The nerdlet ID used to guide the user through installation 447 NerdletId string `json:"nerdletId"` 448 // The nerdlet state used to intialize the nerdlet 449 NerdletState Nr1CatalogRawNerdletState `json:"nerdletState,omitempty"` 450 } 451 452 func (x *Nr1CatalogNerdletInstallPlanDirective) ImplementsNr1CatalogInstallPlanDirective() {} 453 454 // Nr1CatalogTargetedInstallPlanDirective - Information about a targeted install plan directive 455 type Nr1CatalogTargetedInstallPlanDirective struct { 456 // The mode of the install plan directive 457 Mode Nr1CatalogInstallPlanDirectiveMode `json:"mode"` 458 // The name of the recipe used for the installation 459 RecipeName string `json:"recipeName"` 460 } 461 462 func (x *Nr1CatalogTargetedInstallPlanDirective) ImplementsNr1CatalogInstallPlanDirective() {} 463 464 // SyntheticsAccountStitchedFields - Nerdgraph account field 465 type SyntheticsAccountStitchedFields struct { 466 // Query that fetches the script of a specific scripted monitor 467 Script SyntheticsMonitorScriptQueryResponse `json:"script,omitempty"` 468 // visiblity(flag:Synthetics/setGraphqlCustomerVisible) Query that fetches the steps used by the specified Step Monitor 469 Steps []SyntheticsStep `json:"steps"` 470 } 471 472 // SyntheticsBrokenLinksMonitor - A Broken Links monitor resulting from a Broken Links monitor mutation 473 type SyntheticsBrokenLinksMonitor struct { 474 // The creation time of the monitor in millis 475 CreatedAt nrtime.EpochMilliseconds `json:"createdAt,omitempty"` 476 // The unique client identifier for the Synthetics Monitor in New Relic 477 GUID EntityGUID `json:"guid,omitempty"` 478 // The unique identifier of the monitor within the Synthetics domain 479 ID string `json:"id,omitempty"` 480 // The locations the monitor runs from 481 Locations SyntheticsLocations `json:"locations,omitempty"` 482 // The last modification time of the monitor in millis 483 ModifiedAt nrtime.EpochMilliseconds `json:"modifiedAt,omitempty"` 484 // The human readable identifier for the monitor 485 Name string `json:"name,omitempty"` 486 // The interval at which the monitor runs in minutes 487 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 488 // The run state of the monitor 489 Status SyntheticsMonitorStatus `json:"status,omitempty"` 490 // The uri the monitor runs against 491 Uri string `json:"uri,omitempty"` 492 } 493 494 // SyntheticsBrokenLinksMonitorCreateMutationResult - The result of a Broken Links monitor create mutation 495 type SyntheticsBrokenLinksMonitorCreateMutationResult struct { 496 // Errors that occurred during Broken Links monitor create mutation 497 Errors []SyntheticsMonitorCreateError `json:"errors"` 498 // The resulting Broken Links monitor 499 Monitor SyntheticsBrokenLinksMonitor `json:"monitor,omitempty"` 500 } 501 502 // SyntheticsBrokenLinksMonitorUpdateMutationResult - The result of a Broken Links monitor update mutation 503 type SyntheticsBrokenLinksMonitorUpdateMutationResult struct { 504 // Errors that occurred during Broken Links monitor update mutation 505 Errors []SyntheticsMonitorUpdateError `json:"errors"` 506 // The resulting Broken Links monitor 507 Monitor SyntheticsBrokenLinksMonitor `json:"monitor,omitempty"` 508 } 509 510 // SyntheticsCertCheckMonitor - A Cert Check monitor resulting from a Cert Check monitor mutation 511 type SyntheticsCertCheckMonitor struct { 512 // The creation time of the monitor in millis 513 CreatedAt nrtime.EpochMilliseconds `json:"createdAt,omitempty"` 514 // The domain of the host that will have its certificate checked 515 Domain string `json:"domain,omitempty"` 516 // The unique client identifier for the Synthetics Monitor in New Relic 517 GUID EntityGUID `json:"guid,omitempty"` 518 // The unique identifier of the monitor within the Synthetics domain 519 ID string `json:"id,omitempty"` 520 // The locations the monitor runs from 521 Locations SyntheticsLocations `json:"locations,omitempty"` 522 // The last modification time of the monitor in millis 523 ModifiedAt nrtime.EpochMilliseconds `json:"modifiedAt,omitempty"` 524 // The human readable identifier for the monitor 525 Name string `json:"name,omitempty"` 526 // The desired number of remaining days until the certificate expires to trigger a monitor failure 527 NumberDaysToFailBeforeCertExpires int `json:"numberDaysToFailBeforeCertExpires,omitempty"` 528 // The interval at which the monitor runs in minutes 529 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 530 // The run state of the monitor 531 Status SyntheticsMonitorStatus `json:"status,omitempty"` 532 } 533 534 // SyntheticsCertCheckMonitorCreateMutationResult - The result of a Cert Check monitor create mutation 535 type SyntheticsCertCheckMonitorCreateMutationResult struct { 536 // Errors that occurred during Cert Check monitor create mutation 537 Errors []SyntheticsMonitorCreateError `json:"errors"` 538 // The resulting Cert Check monitor 539 Monitor SyntheticsCertCheckMonitor `json:"monitor,omitempty"` 540 } 541 542 // SyntheticsCertCheckMonitorUpdateMutationResult - The result of a Cert Check monitor update mutation 543 type SyntheticsCertCheckMonitorUpdateMutationResult struct { 544 // Errors that occurred during Cert Check monitor update mutation 545 Errors []SyntheticsMonitorUpdateError `json:"errors"` 546 // The resulting Cert Check monitor 547 Monitor SyntheticsCertCheckMonitor `json:"monitor,omitempty"` 548 } 549 550 // SyntheticsCreateBrokenLinksMonitorInput - The monitor input values needed to create a Broken Links monitor 551 type SyntheticsCreateBrokenLinksMonitorInput struct { 552 // The locations the monitor will run from 553 Locations SyntheticsLocationsInput `json:"locations,omitempty"` 554 // The human readable identifier for the monitor 555 Name string `json:"name"` 556 // The interval at which the monitor runs in minutes 557 Period SyntheticsMonitorPeriod `json:"period"` 558 // The run state of the monitor 559 Status SyntheticsMonitorStatus `json:"status"` 560 // The tags that will be associated with the monitor 561 Tags []SyntheticsTag `json:"tags,omitempty"` 562 // The uri the monitor runs against 563 Uri string `json:"uri"` 564 } 565 566 // SyntheticsCreateCertCheckMonitorInput - The monitor input values needed to create a Cert Check monitor 567 type SyntheticsCreateCertCheckMonitorInput struct { 568 // The domain of the host that will have its certificate checked 569 Domain string `json:"domain"` 570 // The locations the monitor will run from 571 Locations SyntheticsLocationsInput `json:"locations,omitempty"` 572 // The human readable identifier for the monitor 573 Name string `json:"name"` 574 // The desired number of remaining days until the certificate expires to trigger a monitor failure 575 NumberDaysToFailBeforeCertExpires int `json:"numberDaysToFailBeforeCertExpires"` 576 // The interval at which the monitor runs in minutes 577 Period SyntheticsMonitorPeriod `json:"period"` 578 // The run state of the monitor 579 Status SyntheticsMonitorStatus `json:"status"` 580 // The tags that will be associated with the monitor 581 Tags []SyntheticsTag `json:"tags,omitempty"` 582 } 583 584 // SyntheticsCreateScriptAPIMonitorInput - The monitor input values needed to create a Script Api monitor 585 type SyntheticsCreateScriptAPIMonitorInput struct { 586 // The locations the monitor will run from 587 Locations SyntheticsScriptedMonitorLocationsInput `json:"locations,omitempty"` 588 // The human readable identifier for the monitor 589 Name string `json:"name"` 590 // The interval at which the monitor runs in minutes 591 Period SyntheticsMonitorPeriod `json:"period"` 592 // The runtime that the monitor will use to run jobs 593 Runtime SyntheticsRuntimeInput `json:"runtime,omitempty"` 594 // The script that the monitor runs 595 Script string `json:"script"` 596 // The run state of the monitor 597 Status SyntheticsMonitorStatus `json:"status"` 598 // The tags that will be associated with the monitor 599 Tags []SyntheticsTag `json:"tags,omitempty"` 600 } 601 602 // SyntheticsCreateScriptBrowserMonitorInput - The monitor input values needed to create a Script Browser monitor 603 type SyntheticsCreateScriptBrowserMonitorInput struct { 604 // The monitor advanced options 605 AdvancedOptions SyntheticsScriptBrowserMonitorAdvancedOptionsInput `json:"advancedOptions,omitempty"` 606 // The locations the monitor will run from 607 Locations SyntheticsScriptedMonitorLocationsInput `json:"locations,omitempty"` 608 // The human readable identifier for the monitor 609 Name string `json:"name"` 610 // The interval at which the monitor runs in minutes 611 Period SyntheticsMonitorPeriod `json:"period"` 612 // The runtime that the monitor will use to run jobs 613 Runtime SyntheticsRuntimeInput `json:"runtime,omitempty"` 614 // The script that the monitor runs 615 Script string `json:"script"` 616 // The run state of the monitor 617 Status SyntheticsMonitorStatus `json:"status"` 618 // The tags that will be associated with the monitor 619 Tags []SyntheticsTag `json:"tags,omitempty"` 620 } 621 622 // SyntheticsCreateSimpleBrowserMonitorInput - The monitor input values needed to create a Simple Browser monitor 623 type SyntheticsCreateSimpleBrowserMonitorInput struct { 624 // The monitor advanced options 625 AdvancedOptions SyntheticsSimpleBrowserMonitorAdvancedOptionsInput `json:"advancedOptions,omitempty"` 626 // The locations the monitor will run from 627 Locations SyntheticsLocationsInput `json:"locations,omitempty"` 628 // The human readable identifier for the monitor 629 Name string `json:"name"` 630 // The interval at which the monitor runs in minutes 631 Period SyntheticsMonitorPeriod `json:"period"` 632 // The runtime that the monitor will use to run jobs 633 Runtime SyntheticsRuntimeInput `json:"runtime,omitempty"` 634 // The run state of the monitor 635 Status SyntheticsMonitorStatus `json:"status"` 636 // The tags that will be associated with the monitor 637 Tags []SyntheticsTag `json:"tags,omitempty"` 638 // The uri the monitor runs against 639 Uri string `json:"uri"` 640 } 641 642 // SyntheticsCreateSimpleMonitorInput - The monitor input values needed to create a Simple (ping) monitor 643 type SyntheticsCreateSimpleMonitorInput struct { 644 // The monitor advanced options 645 AdvancedOptions SyntheticsSimpleMonitorAdvancedOptionsInput `json:"advancedOptions,omitempty"` 646 // The locations the monitor will run from 647 Locations SyntheticsLocationsInput `json:"locations,omitempty"` 648 // The human readable identifier for the monitor 649 Name string `json:"name"` 650 // The interval at which the monitor runs in minutes 651 Period SyntheticsMonitorPeriod `json:"period"` 652 // The run state of the monitor 653 Status SyntheticsMonitorStatus `json:"status"` 654 // The tags that will be associated with the monitor 655 Tags []SyntheticsTag `json:"tags,omitempty"` 656 // The uri the monitor runs against 657 Uri string `json:"uri"` 658 } 659 660 // SyntheticsCreateStepMonitorInput - The monitor input values needed to create a Step monitor 661 type SyntheticsCreateStepMonitorInput struct { 662 // The monitor advanced options 663 AdvancedOptions SyntheticsStepMonitorAdvancedOptionsInput `json:"advancedOptions,omitempty"` 664 // The locations the monitor will run from 665 Locations SyntheticsScriptedMonitorLocationsInput `json:"locations,omitempty"` 666 // The human readable identifier for the monitor 667 Name string `json:"name"` 668 // The interval at which the monitor runs in minutes 669 Period SyntheticsMonitorPeriod `json:"period"` 670 // The run state of the monitor 671 Status SyntheticsMonitorStatus `json:"status"` 672 // The steps that make up the script the monitor will run 673 Steps []SyntheticsStepInput `json:"steps,omitempty"` 674 // The tags that will be associated with the monitor 675 Tags []SyntheticsTag `json:"tags,omitempty"` 676 } 677 678 // SyntheticsCustomHeader - Custom header for monitor jobs 679 type SyntheticsCustomHeader struct { 680 // Header name 681 Name string `json:"name"` 682 // Header value 683 Value string `json:"value"` 684 } 685 686 // SyntheticsCustomHeaderInput - Custom header input for monitor jobs 687 type SyntheticsCustomHeaderInput struct { 688 // Header name 689 Name string `json:"name"` 690 // Header value 691 Value string `json:"value"` 692 } 693 694 // SyntheticsError - Error object for Synthetics mutations 695 type SyntheticsError struct { 696 // Description explaining the cause of the error 697 Description string `json:"description,omitempty"` 698 } 699 700 // SyntheticsLocations - The location(s) from which the monitor runs 701 type SyntheticsLocations struct { 702 // Existing private location(s) in which the monitor will run 703 Private []string `json:"private,omitempty"` 704 // Publicly available location(s) in which the monitor will run 705 Public []string `json:"public,omitempty"` 706 } 707 708 // SyntheticsLocationsInput - The location(s) from which a non-scripted monitor runs 709 type SyntheticsLocationsInput struct { 710 // Existing private location(s) in which the monitor will run 711 Private []string `json:"private,omitempty"` 712 // Publicly available location(s) in which the monitor will run 713 Public []string `json:"public,omitempty"` 714 } 715 716 // SyntheticsMonitorCreateError - Error object for Synthetics monitor creation request 717 type SyntheticsMonitorCreateError struct { 718 // String description of error 719 Description string `json:"description"` 720 // Enum of error that was returned during monitor creation 721 Type SyntheticsMonitorCreateErrorType `json:"type"` 722 } 723 724 // SyntheticsMonitorDeleteMutationResult - The result of a monitor delete mutation 725 type SyntheticsMonitorDeleteMutationResult struct { 726 // The unique identifier of the deleted monitor 727 DeletedGUID EntityGUID `json:"deletedGuid,omitempty"` 728 } 729 730 // SyntheticsMonitorScriptQueryResponse - The script that a monitor runs 731 type SyntheticsMonitorScriptQueryResponse struct { 732 // The script associated with the specified monitor 733 Text string `json:"text,omitempty"` 734 } 735 736 // SyntheticsMonitorUpdateError - Error object for Synthetics monitor update request 737 type SyntheticsMonitorUpdateError struct { 738 // String description of error 739 Description string `json:"description"` 740 // Enum of error that was returned during monitor update 741 Type SyntheticsMonitorUpdateErrorType `json:"type"` 742 } 743 744 // SyntheticsPrivateLocationDeleteResult - An array containing errors from the deletion of a private location, if any 745 type SyntheticsPrivateLocationDeleteResult struct { 746 // An array container errors resulting from the mutation, if any 747 Errors []SyntheticsPrivateLocationMutationError `json:"errors,omitempty"` 748 } 749 750 // SyntheticsPrivateLocationInput - Information realating to a private location 751 type SyntheticsPrivateLocationInput struct { 752 // The unique identifier for the Synthetics private location in New Relic 753 GUID string `json:"guid"` 754 // The location's Verified Script Execution password (Only necessary if Verified Script Execution is enabled for the location) 755 VsePassword SecureValue `json:"vsePassword,omitempty"` 756 } 757 758 // SyntheticsPrivateLocationMutationError - Error object for Synthetic Private Location mutation request 759 type SyntheticsPrivateLocationMutationError struct { 760 // String description of error 761 Description string `json:"description"` 762 // Enum type of error response 763 Type SyntheticsPrivateLocationMutationErrorType `json:"type"` 764 } 765 766 // SyntheticsPrivateLocationMutationResult - Result of a private location mutation 767 type SyntheticsPrivateLocationMutationResult struct { 768 // The account associated to the private location 769 AccountID int `json:"accountId,omitempty"` 770 // A description of the private location 771 Description string `json:"description,omitempty"` 772 // The private location globally unique identifier 773 DomainId string `json:"domainId,omitempty"` 774 // An array container errors resulting from the mutation, if any 775 Errors []SyntheticsPrivateLocationMutationError `json:"errors,omitempty"` 776 // The unique client identifier for the Synthetics private location in New Relic 777 GUID EntityGUID `json:"guid,omitempty"` 778 // The private locations key 779 Key string `json:"key,omitempty"` 780 // An alternate identifier based on name 781 LocationId string `json:"locationId,omitempty"` 782 // The name of the private location 783 Name string `json:"name,omitempty"` 784 // Specifies whether the private location requires a password for scripted monitors 785 VerifiedScriptExecution *bool `json:"verifiedScriptExecution,omitempty"` 786 } 787 788 // SyntheticsPrivateLocationPurgeQueueResult - Result of a Synthetics purge private location queue mutation 789 type SyntheticsPrivateLocationPurgeQueueResult struct { 790 // An array containing errors resulting from the mutation, if any 791 Errors []SyntheticsPrivateLocationMutationError `json:"errors,omitempty"` 792 } 793 794 // SyntheticsRuntime - The runtime that a monitor runs 795 type SyntheticsRuntime struct { 796 // The runtime type that the monitor will run 797 RuntimeType string `json:"runtimeType,omitempty"` 798 // The specific version of the runtime type selected 799 RuntimeTypeVersion SemVer `json:"runtimeTypeVersion"` 800 // The programing language that should execute the script 801 ScriptLanguage string `json:"scriptLanguage,omitempty"` 802 } 803 804 // SyntheticsRuntimeInput - Input to determine which runtime the monitor will run 805 type SyntheticsRuntimeInput struct { 806 // The runtime type that the monitor will run 807 RuntimeType string `json:"runtimeType"` 808 // The specific version of the runtime type selected 809 RuntimeTypeVersion SemVer `json:"runtimeTypeVersion"` 810 // The programing language that should execute the script 811 ScriptLanguage string `json:"scriptLanguage,omitempty"` 812 } 813 814 // SyntheticsScriptAPIMonitor - A Script Api monitor resulting from a Script Api mutation 815 type SyntheticsScriptAPIMonitor struct { 816 // The creation time of the monitor in millis 817 CreatedAt nrtime.EpochMilliseconds `json:"createdAt,omitempty"` 818 // The unique client identifier for the Synthetics Monitor in New Relic 819 GUID EntityGUID `json:"guid,omitempty"` 820 // The unique identifier of the monitor within the Synthetics domain 821 ID string `json:"id,omitempty"` 822 // The locations the monitor runs from 823 Locations SyntheticsLocations `json:"locations,omitempty"` 824 // The last modification time of the monitor in millis 825 ModifiedAt nrtime.EpochMilliseconds `json:"modifiedAt,omitempty"` 826 // The human readable identifier for the monitor 827 Name string `json:"name,omitempty"` 828 // The interval at which the monitor runs in minutes 829 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 830 // The runtime that the monitor will use to run jobs 831 Runtime SyntheticsRuntime `json:"runtime,omitempty"` 832 // The run state of the monitor 833 Status SyntheticsMonitorStatus `json:"status,omitempty"` 834 } 835 836 // SyntheticsScriptAPIMonitorCreateMutationResult - The result of a Script Api monitor create mutation 837 type SyntheticsScriptAPIMonitorCreateMutationResult struct { 838 // Errors that occurred during Script Api monitor create mutation 839 Errors []SyntheticsMonitorCreateError `json:"errors"` 840 // The resulting Script Api monitor 841 Monitor SyntheticsScriptAPIMonitor `json:"monitor,omitempty"` 842 } 843 844 // SyntheticsScriptAPIMonitorUpdateMutationResult - The result of a Script Api monitor update mutation 845 type SyntheticsScriptAPIMonitorUpdateMutationResult struct { 846 // Errors that occurred during Script Api monitor update mutation 847 Errors []SyntheticsMonitorUpdateError `json:"errors"` 848 // The resulting Script Api monitor 849 Monitor SyntheticsScriptAPIMonitor `json:"monitor,omitempty"` 850 } 851 852 // SyntheticsScriptBrowserMonitor - A Script Browser monitor resulting from a Script Browser mutation 853 type SyntheticsScriptBrowserMonitor struct { 854 // The monitor advanced options 855 AdvancedOptions SyntheticsScriptBrowserMonitorAdvancedOptions `json:"advancedOptions,omitempty"` 856 // The creation time of the monitor in millis 857 CreatedAt nrtime.EpochMilliseconds `json:"createdAt,omitempty"` 858 // The unique client identifier for the Synthetics Monitor in New Relic 859 GUID EntityGUID `json:"guid,omitempty"` 860 // The unique identifier of the monitor within the Synthetics domain 861 ID string `json:"id,omitempty"` 862 // The locations the monitor runs from 863 Locations SyntheticsLocations `json:"locations,omitempty"` 864 // The last modification time of the monitor in millis 865 ModifiedAt nrtime.EpochMilliseconds `json:"modifiedAt,omitempty"` 866 // The human readable identifier for the monitor 867 Name string `json:"name,omitempty"` 868 // The interval at which the monitor runs in minutes 869 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 870 // The runtime that the monitor will use to run jobs 871 Runtime SyntheticsRuntime `json:"runtime,omitempty"` 872 // The run state of the monitor 873 Status SyntheticsMonitorStatus `json:"status,omitempty"` 874 } 875 876 // SyntheticsScriptBrowserMonitorAdvancedOptions - The advanced options available for a Script Browser monitor 877 type SyntheticsScriptBrowserMonitorAdvancedOptions struct { 878 // Capture a screenshot during job execution 879 EnableScreenshotOnFailureAndScript *bool `json:"enableScreenshotOnFailureAndScript,omitempty"` 880 } 881 882 // SyntheticsScriptBrowserMonitorAdvancedOptionsInput - The advanced options inputs available for a Script Browser monitor 883 type SyntheticsScriptBrowserMonitorAdvancedOptionsInput struct { 884 // Capture a screenshot during job execution 885 EnableScreenshotOnFailureAndScript *bool `json:"enableScreenshotOnFailureAndScript,omitempty"` 886 } 887 888 // SyntheticsScriptBrowserMonitorCreateMutationResult - The result of a Script Browser monitor create mutation 889 type SyntheticsScriptBrowserMonitorCreateMutationResult struct { 890 // Errors that occurred during Script Browser monitor create mutation 891 Errors []SyntheticsMonitorCreateError `json:"errors"` 892 // The resulting script browser monitor 893 Monitor SyntheticsScriptBrowserMonitor `json:"monitor,omitempty"` 894 } 895 896 // SyntheticsScriptBrowserMonitorUpdateMutationResult - The result of a Script Browser monitor update mutation 897 type SyntheticsScriptBrowserMonitorUpdateMutationResult struct { 898 // Errors that occurred during Script Browser monitor update mutation 899 Errors []SyntheticsMonitorUpdateError `json:"errors"` 900 // The resulting script browser monitor 901 Monitor SyntheticsScriptBrowserMonitor `json:"monitor,omitempty"` 902 } 903 904 // SyntheticsScriptedMonitorLocationsInput - The location(s) from which the scripted monitor runs. 905 type SyntheticsScriptedMonitorLocationsInput struct { 906 // The private location(s) that the monitor will run jobs from 907 Private []SyntheticsPrivateLocationInput `json:"private,omitempty"` 908 // The public location(s) that the monitor will run jobs from 909 Public []string `json:"public"` 910 } 911 912 // SyntheticsSecureCredentialMutationResult - The result of a secure credential mutation 913 type SyntheticsSecureCredentialMutationResult struct { 914 // The moment when the secure credential was created, represented in milliseconds since the Unix epoch. 915 CreatedAt nrtime.EpochMilliseconds `json:"createdAt,omitempty"` 916 // Description of the secure credential, if available 917 Description string `json:"description,omitempty"` 918 // An array containing errors, if any 919 Errors []SyntheticsError `json:"errors,omitempty"` 920 // The unique identifier of the secure credential, if available 921 Key string `json:"key,omitempty"` 922 // The moment when the secure credential was last updated, represented in milliseconds since the Unix epoch. 923 LastUpdate nrtime.EpochMilliseconds `json:"lastUpdate,omitempty"` 924 } 925 926 // SyntheticsSimpleBrowserMonitor - A Simple Browser monitor resulting from a Simple Browser monitor mutation 927 type SyntheticsSimpleBrowserMonitor struct { 928 // The monitor advanced options 929 AdvancedOptions SyntheticsSimpleBrowserMonitorAdvancedOptions `json:"advancedOptions,omitempty"` 930 // The creation time of the monitor in millis 931 CreatedAt nrtime.EpochMilliseconds `json:"createdAt,omitempty"` 932 // The unique client identifier for the Synthetics Monitor in New Relic 933 GUID EntityGUID `json:"guid,omitempty"` 934 // The unique identifier of the monitor within the Synthetics domain 935 ID string `json:"id,omitempty"` 936 // The locations the monitor runs from 937 Locations SyntheticsLocations `json:"locations,omitempty"` 938 // The last modification time of the monitor in millis 939 ModifiedAt nrtime.EpochMilliseconds `json:"modifiedAt,omitempty"` 940 // The human readable identifier for the monitor 941 Name string `json:"name,omitempty"` 942 // The interval at which the monitor runs in minutes 943 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 944 // The runtime that the monitor will use to run jobs 945 Runtime SyntheticsRuntime `json:"runtime,omitempty"` 946 // The run state of the monitor 947 Status SyntheticsMonitorStatus `json:"status,omitempty"` 948 // The uri the monitor runs against 949 Uri string `json:"uri,omitempty"` 950 } 951 952 // SyntheticsSimpleBrowserMonitorAdvancedOptions - The advanced options available for a Simple Browser monitor 953 type SyntheticsSimpleBrowserMonitorAdvancedOptions struct { 954 // Custom headers to use in monitor job 955 CustomHeaders []SyntheticsCustomHeader `json:"customHeaders,omitempty"` 956 // Capture a screenshot during job execution 957 EnableScreenshotOnFailureAndScript *bool `json:"enableScreenshotOnFailureAndScript,omitempty"` 958 // Validation text for monitor to search for at given URI 959 ResponseValidationText string `json:"responseValidationText,omitempty"` 960 // Monitor should validate SSL certificate chain 961 UseTlsValidation *bool `json:"useTlsValidation,omitempty"` 962 } 963 964 // SyntheticsSimpleBrowserMonitorAdvancedOptionsInput - The advanced options inputs available for a Simple Browser monitor 965 type SyntheticsSimpleBrowserMonitorAdvancedOptionsInput struct { 966 // Custom headers to use in monitor job 967 CustomHeaders []SyntheticsCustomHeaderInput `json:"customHeaders,omitempty"` 968 // Capture a screenshot during job execution 969 EnableScreenshotOnFailureAndScript *bool `json:"enableScreenshotOnFailureAndScript,omitempty"` 970 // Validation text for monitor to search for at given URI 971 ResponseValidationText string `json:"responseValidationText,omitempty"` 972 // Monitor should validate SSL certificate chain 973 UseTlsValidation *bool `json:"useTlsValidation,omitempty"` 974 } 975 976 // SyntheticsSimpleBrowserMonitorCreateMutationResult - The result of a Simple Browser monitor create mutation 977 type SyntheticsSimpleBrowserMonitorCreateMutationResult struct { 978 // Errors that occurred during Simple Browser monitor create mutation 979 Errors []SyntheticsMonitorCreateError `json:"errors"` 980 // The resulting Simple Browser monitor 981 Monitor SyntheticsSimpleBrowserMonitor `json:"monitor,omitempty"` 982 } 983 984 // SyntheticsSimpleBrowserMonitorUpdateMutationResult - The result of a Simple Browser monitor update mutation 985 type SyntheticsSimpleBrowserMonitorUpdateMutationResult struct { 986 // Errors that occurred during Simple Browser monitor update mutation 987 Errors []SyntheticsMonitorUpdateError `json:"errors"` 988 // The resulting Simple Browser monitor 989 Monitor SyntheticsSimpleBrowserMonitor `json:"monitor,omitempty"` 990 } 991 992 // SyntheticsSimpleMonitor - A Simple (ping) monitor resulting from a Simple monitor mutation 993 type SyntheticsSimpleMonitor struct { 994 // The monitor advanced options 995 AdvancedOptions SyntheticsSimpleMonitorAdvancedOptions `json:"advancedOptions,omitempty"` 996 // The creation time of the monitor in millis 997 CreatedAt nrtime.EpochMilliseconds `json:"createdAt,omitempty"` 998 // The unique client identifier for the Synthetics Monitor in New Relic 999 GUID EntityGUID `json:"guid,omitempty"` 1000 // The unique identifier of the monitor within the Synthetics domain 1001 ID string `json:"id,omitempty"` 1002 // The locations the monitor runs from 1003 Locations SyntheticsLocations `json:"locations,omitempty"` 1004 // The last modification time of the monitor in millis 1005 ModifiedAt nrtime.EpochMilliseconds `json:"modifiedAt,omitempty"` 1006 // The human readable identifier for the monitor 1007 Name string `json:"name,omitempty"` 1008 // The interval at which the monitor runs in minutes 1009 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1010 // The run state of the monitor 1011 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1012 // The uri the monitor runs against 1013 Uri string `json:"uri,omitempty"` 1014 } 1015 1016 // SyntheticsSimpleMonitorAdvancedOptions - The advanced options available for a Simple (ping) monitor 1017 type SyntheticsSimpleMonitorAdvancedOptions struct { 1018 // Custom headers to use in monitor job 1019 CustomHeaders []SyntheticsCustomHeader `json:"customHeaders,omitempty"` 1020 // Categorize redirects during a monitor job as a failure 1021 RedirectIsFailure *bool `json:"redirectIsFailure,omitempty"` 1022 // Validation text for monitor to search for at given URI 1023 ResponseValidationText string `json:"responseValidationText,omitempty"` 1024 // Monitor should skip default HEAD request and instead use GET verb in check 1025 ShouldBypassHeadRequest *bool `json:"shouldBypassHeadRequest,omitempty"` 1026 // Monitor should validate SSL certificate chain 1027 UseTlsValidation *bool `json:"useTlsValidation,omitempty"` 1028 } 1029 1030 // SyntheticsSimpleMonitorAdvancedOptionsInput - The advanced options inputs available for a Simple (ping) monitor 1031 type SyntheticsSimpleMonitorAdvancedOptionsInput struct { 1032 // Custom headers to use in monitor job 1033 CustomHeaders []SyntheticsCustomHeaderInput `json:"customHeaders,omitempty"` 1034 // Categorize redirects during a monitor job as a failure 1035 RedirectIsFailure *bool `json:"redirectIsFailure,omitempty"` 1036 // Validation text for monitor to search for at given URI 1037 ResponseValidationText string `json:"responseValidationText,omitempty"` 1038 // Monitor should skip default HEAD request and instead use GET verb in check 1039 ShouldBypassHeadRequest *bool `json:"shouldBypassHeadRequest,omitempty"` 1040 // Monitor should validate SSL certificate chain 1041 UseTlsValidation *bool `json:"useTlsValidation,omitempty"` 1042 } 1043 1044 // SyntheticsSimpleMonitorUpdateMutationResult - The result of a Simple (ping) monitor update mutation 1045 type SyntheticsSimpleMonitorUpdateMutationResult struct { 1046 // Errors that occurred during Simple (ping) monitor update mutation 1047 Errors []SyntheticsMonitorUpdateError `json:"errors"` 1048 // The resulting Simple (ping) monitor 1049 Monitor SyntheticsSimpleMonitor `json:"monitor,omitempty"` 1050 } 1051 1052 // SyntheticsStep - A step that will be added to the monitor script 1053 type SyntheticsStep struct { 1054 // The position of the step within the script ranging from 1-100. 1055 Ordinal int `json:"ordinal"` 1056 // The type of step to be added to the script 1057 Type SyntheticsStepType `json:"type"` 1058 // The metadata values related to the step 1059 Values []string `json:"values"` 1060 } 1061 1062 // SyntheticsStepInput - A step that will be added to the monitor script 1063 type SyntheticsStepInput struct { 1064 // The position of the step within the script ranging from 1-100. 1065 Ordinal int `json:"ordinal"` 1066 // The type of step to be added to the script 1067 Type SyntheticsStepType `json:"type"` 1068 // The metadata values related to the step 1069 Values []string `json:"values"` 1070 } 1071 1072 // SyntheticsStepMonitor - A Step monitor resulting from a Step monitor mutation 1073 type SyntheticsStepMonitor struct { 1074 // The monitor advanced options 1075 AdvancedOptions SyntheticsStepMonitorAdvancedOptions `json:"advancedOptions,omitempty"` 1076 // The creation time of the monitor in millis 1077 CreatedAt nrtime.EpochMilliseconds `json:"createdAt,omitempty"` 1078 // The unique client identifier for the Synthetics Monitor in New Relic 1079 GUID EntityGUID `json:"guid,omitempty"` 1080 // The unique identifier of the monitor within the Synthetics domain 1081 ID string `json:"id,omitempty"` 1082 // The locations the monitor runs from 1083 Locations SyntheticsLocations `json:"locations,omitempty"` 1084 // The last modification time of the monitor in millis 1085 ModifiedAt nrtime.EpochMilliseconds `json:"modifiedAt,omitempty"` 1086 // The human readable identifier for the monitor 1087 Name string `json:"name,omitempty"` 1088 // The interval at which the monitor runs in minutes 1089 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1090 // The run state of the monitor 1091 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1092 // The steps that make up the script the monitor will run 1093 Steps []SyntheticsStep `json:"steps,omitempty"` 1094 } 1095 1096 // SyntheticsStepMonitorAdvancedOptions - The advanced options available for a Step monitor 1097 type SyntheticsStepMonitorAdvancedOptions struct { 1098 // Capture a screenshot during job execution 1099 EnableScreenshotOnFailureAndScript *bool `json:"enableScreenshotOnFailureAndScript,omitempty"` 1100 } 1101 1102 // SyntheticsStepMonitorAdvancedOptionsInput - The advanced options inputs available for a Step monitor 1103 type SyntheticsStepMonitorAdvancedOptionsInput struct { 1104 // Capture a screenshot during job execution 1105 EnableScreenshotOnFailureAndScript *bool `json:"enableScreenshotOnFailureAndScript,omitempty"` 1106 } 1107 1108 // SyntheticsStepMonitorCreateMutationResult - The result of a Step monitor create mutation 1109 type SyntheticsStepMonitorCreateMutationResult struct { 1110 // Errors that occurred during Step monitor create mutation 1111 Errors []SyntheticsMonitorCreateError `json:"errors"` 1112 // The resulting Step monitor 1113 Monitor SyntheticsStepMonitor `json:"monitor,omitempty"` 1114 } 1115 1116 // SyntheticsStepMonitorUpdateMutationResult - The result of a Step monitor update mutation 1117 type SyntheticsStepMonitorUpdateMutationResult struct { 1118 // Errors that occurred during Step monitor update mutation 1119 Errors []SyntheticsMonitorUpdateError `json:"errors"` 1120 // The resulting Step monitor 1121 Monitor SyntheticsStepMonitor `json:"monitor,omitempty"` 1122 } 1123 1124 // SyntheticsTag - Tag entries for the monitor 1125 type SyntheticsTag struct { 1126 // Name of the tag key 1127 Key string `json:"key"` 1128 // Values associated with the tag key 1129 Values []string `json:"values"` 1130 } 1131 1132 // SyntheticsUpdateBrokenLinksMonitorInput - The monitor values that can be updated on a Broken Links monitor 1133 type SyntheticsUpdateBrokenLinksMonitorInput struct { 1134 // The locations the monitor will run from 1135 Locations SyntheticsLocationsInput `json:"locations,omitempty"` 1136 // The human readable identifier for the monitor 1137 Name string `json:"name,omitempty"` 1138 // The interval at which the monitor runs in minutes 1139 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1140 // The run state of the monitor 1141 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1142 // The tags that will be associated with the monitor 1143 Tags []SyntheticsTag `json:"tags,omitempty"` 1144 // The uri the monitor runs against 1145 Uri string `json:"uri,omitempty"` 1146 } 1147 1148 // SyntheticsUpdateCertCheckMonitorInput - The monitor values that can be updated on a Cert Check monitor 1149 type SyntheticsUpdateCertCheckMonitorInput struct { 1150 // The domain of the host that will have its certificate checked 1151 Domain string `json:"domain,omitempty"` 1152 // The locations the monitor will run from 1153 Locations SyntheticsLocationsInput `json:"locations,omitempty"` 1154 // The human readable identifier for the monitor 1155 Name string `json:"name,omitempty"` 1156 // The desired number of remaining days until the certificate expires to trigger a monitor failure 1157 NumberDaysToFailBeforeCertExpires int `json:"numberDaysToFailBeforeCertExpires,omitempty"` 1158 // The interval at which the monitor runs in minutes 1159 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1160 // The run state of the monitor 1161 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1162 // The tags that will be associated with the monitor 1163 Tags []SyntheticsTag `json:"tags,omitempty"` 1164 } 1165 1166 // SyntheticsUpdateScriptAPIMonitorInput - The monitor values that can be updated on a Script Api monitor 1167 type SyntheticsUpdateScriptAPIMonitorInput struct { 1168 // The locations the monitor will run from 1169 Locations SyntheticsScriptedMonitorLocationsInput `json:"locations,omitempty"` 1170 // The human readable identifier for the monitor 1171 Name string `json:"name,omitempty"` 1172 // The interval at which the monitor runs in minutes 1173 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1174 // The runtime that the monitor will use to run jobs 1175 Runtime SyntheticsRuntimeInput `json:"runtime,omitempty"` 1176 // The script that the monitor runs 1177 Script string `json:"script,omitempty"` 1178 // The run state of the monitor 1179 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1180 // The tags that will be associated with the monitor 1181 Tags []SyntheticsTag `json:"tags,omitempty"` 1182 } 1183 1184 // SyntheticsUpdateScriptBrowserMonitorInput - The monitor values that can be updated on a Script Browser monitor 1185 type SyntheticsUpdateScriptBrowserMonitorInput struct { 1186 // The monitor advanced options 1187 AdvancedOptions SyntheticsScriptBrowserMonitorAdvancedOptionsInput `json:"advancedOptions,omitempty"` 1188 // The locations the monitor will run from 1189 Locations SyntheticsScriptedMonitorLocationsInput `json:"locations,omitempty"` 1190 // The human readable identifier for the monitor 1191 Name string `json:"name,omitempty"` 1192 // The interval at which the monitor runs in minutes 1193 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1194 // The runtime that the monitor will use to run jobs 1195 Runtime SyntheticsRuntimeInput `json:"runtime,omitempty"` 1196 // The script that the monitor runs 1197 Script string `json:"script,omitempty"` 1198 // The run state of the monitor 1199 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1200 // The tags that will be associated with the monitor 1201 Tags []SyntheticsTag `json:"tags,omitempty"` 1202 } 1203 1204 // SyntheticsUpdateSimpleBrowserMonitorInput - The monitor values that can be updated on a Simple Browser monitor 1205 type SyntheticsUpdateSimpleBrowserMonitorInput struct { 1206 // The monitor advanced options 1207 AdvancedOptions SyntheticsSimpleBrowserMonitorAdvancedOptionsInput `json:"advancedOptions,omitempty"` 1208 // The locations the monitor will run from 1209 Locations SyntheticsLocationsInput `json:"locations,omitempty"` 1210 // The human readable identifier for the monitor 1211 Name string `json:"name,omitempty"` 1212 // The interval at which the monitor runs in minutes 1213 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1214 // The runtime that the monitor will use to run jobs 1215 Runtime SyntheticsRuntimeInput `json:"runtime,omitempty"` 1216 // The run state of the monitor 1217 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1218 // The tags that will be associated with the monitor 1219 Tags []SyntheticsTag `json:"tags,omitempty"` 1220 // The uri the monitor runs against 1221 Uri string `json:"uri,omitempty"` 1222 } 1223 1224 // SyntheticsUpdateSimpleMonitorInput - The monitor values that can be updated on a simple (ping) monitor 1225 type SyntheticsUpdateSimpleMonitorInput struct { 1226 // The monitor advanced options 1227 AdvancedOptions SyntheticsSimpleMonitorAdvancedOptionsInput `json:"advancedOptions,omitempty"` 1228 // The locations the monitor will run from 1229 Locations SyntheticsLocationsInput `json:"locations,omitempty"` 1230 // The human readable identifier for the monitor 1231 Name string `json:"name,omitempty"` 1232 // The interval at which the monitor runs in minutes 1233 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1234 // The run state of the monitor 1235 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1236 // The tags that will be associated with the monitor 1237 Tags []SyntheticsTag `json:"tags,omitempty"` 1238 // The uri the monitor runs against 1239 Uri string `json:"uri,omitempty"` 1240 } 1241 1242 // SyntheticsUpdateStepMonitorInput - The monitor values that can be updated on a Step monitor 1243 type SyntheticsUpdateStepMonitorInput struct { 1244 // The monitor advanced options 1245 AdvancedOptions SyntheticsStepMonitorAdvancedOptionsInput `json:"advancedOptions,omitempty"` 1246 // The locations the monitor will run from 1247 Locations SyntheticsScriptedMonitorLocationsInput `json:"locations,omitempty"` 1248 // The human readable identifier for the monitor 1249 Name string `json:"name,omitempty"` 1250 // The interval at which the monitor runs in minutes 1251 Period SyntheticsMonitorPeriod `json:"period,omitempty"` 1252 // The run state of the monitor 1253 Status SyntheticsMonitorStatus `json:"status,omitempty"` 1254 // The steps that make up the script the monitor will run 1255 Steps []SyntheticsStepInput `json:"steps,omitempty"` 1256 // The tags that will be associated with the monitor 1257 Tags []SyntheticsTag `json:"tags,omitempty"` 1258 } 1259 1260 type scriptResponse struct { 1261 Actor Actor `json:"actor"` 1262 } 1263 1264 type stepsResponse struct { 1265 Actor Actor `json:"actor"` 1266 } 1267 1268 // EntityGUID - An encoded Entity GUID 1269 type EntityGUID string 1270 1271 // Nr1CatalogRawNerdletState - Represents JSON nerdlet state data 1272 type Nr1CatalogRawNerdletState string 1273 1274 // SecureValue - The `SecureValue` scalar represents a secure value, ie a password, an API key, etc. 1275 type SecureValue string 1276 1277 // SemVer - The `SemVer` scalar represents a version designation conforming to the SemVer specification. 1278 type SemVer string 1279 1280 // Nr1CatalogInstallPlanDirective - Information about an install plan directive 1281 type Nr1CatalogInstallPlanDirectiveInterface interface { 1282 ImplementsNr1CatalogInstallPlanDirective() 1283 } 1284 1285 // UnmarshalNr1CatalogInstallPlanDirectiveInterface unmarshals the interface into the correct type 1286 // based on __typename provided by GraphQL 1287 func UnmarshalNr1CatalogInstallPlanDirectiveInterface(b []byte) (*Nr1CatalogInstallPlanDirectiveInterface, error) { 1288 var err error 1289 1290 var rawMessageNr1CatalogInstallPlanDirective map[string]*json.RawMessage 1291 err = json.Unmarshal(b, &rawMessageNr1CatalogInstallPlanDirective) 1292 if err != nil { 1293 return nil, err 1294 } 1295 1296 // Nothing to unmarshal 1297 if len(rawMessageNr1CatalogInstallPlanDirective) < 1 { 1298 return nil, nil 1299 } 1300 1301 var typeName string 1302 1303 if rawTypeName, ok := rawMessageNr1CatalogInstallPlanDirective["__typename"]; ok { 1304 err = json.Unmarshal(*rawTypeName, &typeName) 1305 if err != nil { 1306 return nil, err 1307 } 1308 1309 switch typeName { 1310 case "Nr1CatalogLinkInstallPlanDirective": 1311 var interfaceType Nr1CatalogLinkInstallPlanDirective 1312 err = json.Unmarshal(b, &interfaceType) 1313 if err != nil { 1314 return nil, err 1315 } 1316 1317 var xxx Nr1CatalogInstallPlanDirectiveInterface = &interfaceType 1318 1319 return &xxx, nil 1320 case "Nr1CatalogNerdletInstallPlanDirective": 1321 var interfaceType Nr1CatalogNerdletInstallPlanDirective 1322 err = json.Unmarshal(b, &interfaceType) 1323 if err != nil { 1324 return nil, err 1325 } 1326 1327 var xxx Nr1CatalogInstallPlanDirectiveInterface = &interfaceType 1328 1329 return &xxx, nil 1330 case "Nr1CatalogTargetedInstallPlanDirective": 1331 var interfaceType Nr1CatalogTargetedInstallPlanDirective 1332 err = json.Unmarshal(b, &interfaceType) 1333 if err != nil { 1334 return nil, err 1335 } 1336 1337 var xxx Nr1CatalogInstallPlanDirectiveInterface = &interfaceType 1338 1339 return &xxx, nil 1340 } 1341 } else { 1342 keys := []string{} 1343 for k := range rawMessageNr1CatalogInstallPlanDirective { 1344 keys = append(keys, k) 1345 } 1346 return nil, fmt.Errorf("interface Nr1CatalogInstallPlanDirective did not include a __typename field for inspection: %s", keys) 1347 } 1348 1349 return nil, fmt.Errorf("interface Nr1CatalogInstallPlanDirective was not matched against all PossibleTypes: %s", typeName) 1350 }