diff --git a/internal/api/enums.go b/internal/api/enums.go index 7122d8a..5277969 100644 --- a/internal/api/enums.go +++ b/internal/api/enums.go @@ -23,75 +23,109 @@ import "github.com/devhelmhq/terraform-provider-devhelm/internal/generated" // AssertionTypes lists every wire-format assertion type. Used by the // monitor resource's `assertions[*].type` validator. +// +// Sourced from each assertion SUBTYPE's discriminator-tag constant +// (e.g. `BodyContainsAssertionTypeBodyContains BodyContainsAssertionType +// = "body_contains"`) rather than from the parent +// `MonitorAssertionDto.assertionType` response enum. Under the +// spec-level Postel's-Law relaxation (`mini/runbooks/api-contract.md` +// § 3), response-DTO multi-value enums are dropped and the parent typed +// alias no longer exists. Subtype discriminator tags are single-value +// enums and survive — they're the canonical source for plan-time +// validation here. Constant names are pinned by +// `compatibility.always-prefix-enum-values: true` in +// `scripts/oapi-codegen.yaml` so unrelated enum churn cannot rename +// them. var AssertionTypes = []string{ - string(generated.MonitorAssertionDtoAssertionTypeBodyContains), - string(generated.MonitorAssertionDtoAssertionTypeDnsExpectedCname), - string(generated.MonitorAssertionDtoAssertionTypeDnsExpectedIps), - string(generated.MonitorAssertionDtoAssertionTypeDnsMaxAnswers), - string(generated.MonitorAssertionDtoAssertionTypeDnsMinAnswers), - string(generated.MonitorAssertionDtoAssertionTypeDnsRecordContains), - string(generated.MonitorAssertionDtoAssertionTypeDnsRecordEquals), - string(generated.MonitorAssertionDtoAssertionTypeDnsResolves), - string(generated.MonitorAssertionDtoAssertionTypeDnsResponseTime), - string(generated.MonitorAssertionDtoAssertionTypeDnsResponseTimeWarn), - string(generated.MonitorAssertionDtoAssertionTypeDnsTtlHigh), - string(generated.MonitorAssertionDtoAssertionTypeDnsTtlLow), - string(generated.MonitorAssertionDtoAssertionTypeDnsTxtContains), - string(generated.MonitorAssertionDtoAssertionTypeHeaderValue), - string(generated.MonitorAssertionDtoAssertionTypeHeartbeatIntervalDrift), - string(generated.MonitorAssertionDtoAssertionTypeHeartbeatMaxInterval), - string(generated.MonitorAssertionDtoAssertionTypeHeartbeatPayloadContains), - string(generated.MonitorAssertionDtoAssertionTypeHeartbeatReceived), - string(generated.MonitorAssertionDtoAssertionTypeIcmpPacketLoss), - string(generated.MonitorAssertionDtoAssertionTypeIcmpReachable), - string(generated.MonitorAssertionDtoAssertionTypeIcmpResponseTime), - string(generated.MonitorAssertionDtoAssertionTypeIcmpResponseTimeWarn), - string(generated.MonitorAssertionDtoAssertionTypeJsonPath), - string(generated.MonitorAssertionDtoAssertionTypeMcpConnects), - string(generated.MonitorAssertionDtoAssertionTypeMcpHasCapability), - string(generated.MonitorAssertionDtoAssertionTypeMcpMinTools), - string(generated.MonitorAssertionDtoAssertionTypeMcpProtocolVersion), - string(generated.MonitorAssertionDtoAssertionTypeMcpResponseTime), - string(generated.MonitorAssertionDtoAssertionTypeMcpResponseTimeWarn), - string(generated.MonitorAssertionDtoAssertionTypeMcpToolAvailable), - string(generated.MonitorAssertionDtoAssertionTypeMcpToolCountChanged), - string(generated.MonitorAssertionDtoAssertionTypeRedirectCount), - string(generated.MonitorAssertionDtoAssertionTypeRedirectTarget), - string(generated.MonitorAssertionDtoAssertionTypeRegexBody), - string(generated.MonitorAssertionDtoAssertionTypeResponseSize), - string(generated.MonitorAssertionDtoAssertionTypeResponseTime), - string(generated.MonitorAssertionDtoAssertionTypeResponseTimeWarn), - string(generated.MonitorAssertionDtoAssertionTypeSslExpiry), - string(generated.MonitorAssertionDtoAssertionTypeStatusCode), - string(generated.MonitorAssertionDtoAssertionTypeTcpConnects), - string(generated.MonitorAssertionDtoAssertionTypeTcpResponseTime), - string(generated.MonitorAssertionDtoAssertionTypeTcpResponseTimeWarn), + string(generated.BodyContainsAssertionTypeBodyContains), + string(generated.DnsExpectedCnameAssertionTypeDnsExpectedCname), + string(generated.DnsExpectedIpsAssertionTypeDnsExpectedIps), + string(generated.DnsMaxAnswersAssertionTypeDnsMaxAnswers), + string(generated.DnsMinAnswersAssertionTypeDnsMinAnswers), + string(generated.DnsRecordContainsAssertionTypeDnsRecordContains), + string(generated.DnsRecordEqualsAssertionTypeDnsRecordEquals), + string(generated.DnsResolvesAssertionTypeDnsResolves), + string(generated.DnsResponseTimeAssertionTypeDnsResponseTime), + string(generated.DnsResponseTimeWarnAssertionTypeDnsResponseTimeWarn), + string(generated.DnsTtlHighAssertionTypeDnsTtlHigh), + string(generated.DnsTtlLowAssertionTypeDnsTtlLow), + string(generated.DnsTxtContainsAssertionTypeDnsTxtContains), + string(generated.HeaderValueAssertionTypeHeaderValue), + string(generated.HeartbeatIntervalDriftAssertionTypeHeartbeatIntervalDrift), + string(generated.HeartbeatMaxIntervalAssertionTypeHeartbeatMaxInterval), + string(generated.HeartbeatPayloadContainsAssertionTypeHeartbeatPayloadContains), + string(generated.HeartbeatReceivedAssertionTypeHeartbeatReceived), + string(generated.IcmpPacketLossAssertionTypeIcmpPacketLoss), + string(generated.IcmpReachableAssertionTypeIcmpReachable), + string(generated.IcmpResponseTimeAssertionTypeIcmpResponseTime), + string(generated.IcmpResponseTimeWarnAssertionTypeIcmpResponseTimeWarn), + string(generated.JsonPathAssertionTypeJsonPath), + string(generated.McpConnectsAssertionTypeMcpConnects), + string(generated.McpHasCapabilityAssertionTypeMcpHasCapability), + string(generated.McpMinToolsAssertionTypeMcpMinTools), + string(generated.McpProtocolVersionAssertionTypeMcpProtocolVersion), + string(generated.McpResponseTimeAssertionTypeMcpResponseTime), + string(generated.McpResponseTimeWarnAssertionTypeMcpResponseTimeWarn), + string(generated.McpToolAvailableAssertionTypeMcpToolAvailable), + string(generated.McpToolCountChangedAssertionTypeMcpToolCountChanged), + string(generated.RedirectCountAssertionTypeRedirectCount), + string(generated.RedirectTargetAssertionTypeRedirectTarget), + string(generated.RegexBodyAssertionTypeRegexBody), + string(generated.ResponseSizeAssertionTypeResponseSize), + string(generated.ResponseTimeAssertionTypeResponseTime), + string(generated.ResponseTimeWarnAssertionTypeResponseTimeWarn), + string(generated.SslExpiryAssertionTypeSslExpiry), + string(generated.StatusCodeAssertionTypeStatusCode), + string(generated.TcpConnectsAssertionTypeTcpConnects), + string(generated.TcpResponseTimeAssertionTypeTcpResponseTime), + string(generated.TcpResponseTimeWarnAssertionTypeTcpResponseTimeWarn), } // AlertChannelTypes lists every wire-format alert channel kind. Used by // the alert_channel resource's `channel_type` validator (and by anything // else that needs to discriminate channels by wire type). +// +// Sourced from each alert-channel SUBTYPE's discriminator-tag constant +// (e.g. `EmailChannelConfigChannelTypeEmail`) rather than from the +// parent `AlertChannelDto.channelType` response enum, for the same +// reason as `AssertionTypes` above. var AlertChannelTypes = []string{ - string(generated.AlertChannelDtoChannelTypeEmail), - string(generated.AlertChannelDtoChannelTypeWebhook), - string(generated.AlertChannelDtoChannelTypeSlack), - string(generated.AlertChannelDtoChannelTypePagerduty), - string(generated.AlertChannelDtoChannelTypeOpsgenie), - string(generated.AlertChannelDtoChannelTypeTeams), - string(generated.AlertChannelDtoChannelTypeDiscord), + string(generated.EmailChannelConfigChannelTypeEmail), + string(generated.WebhookChannelConfigChannelTypeWebhook), + string(generated.SlackChannelConfigChannelTypeSlack), + string(generated.PagerDutyChannelConfigChannelTypePagerduty), + string(generated.OpsGenieChannelConfigChannelTypeOpsgenie), + string(generated.TeamsChannelConfigChannelTypeTeams), + string(generated.DiscordChannelConfigChannelTypeDiscord), +} + +// AlertSensitivities lists every wire-format alert-sensitivity value for +// the dependency / service-subscription resources. +// +// `ServiceSubscriptionDto.alertSensitivity` is response-shaped, so under +// the spec-level Postel's-Law relaxation it has no typed alias. The +// request-side schema (`UpdateAlertSensitivityRequest.alertSensitivity`) +// uses an OpenAPI `pattern` instead of `enum`, so oapi-codegen also +// emits it as `string`. We therefore enumerate the allowed wire values +// here, and `TestEnumSliceCoverage` cross-checks them against the +// authoritative spec on each typegen run. +var AlertSensitivities = []string{ + "ALL", + "INCIDENTS_ONLY", + "MAJOR_ONLY", } // MatchRuleTypes lists every wire-format notification-policy match-rule // kind. Used by the notification_policy resource's // `match_rule[*].type` validator. var MatchRuleTypes = []string{ - string(generated.ComponentNameIn), - string(generated.IncidentStatus), - string(generated.MonitorIdIn), - string(generated.MonitorTagIn), - string(generated.MonitorTypeIn), - string(generated.RegionIn), - string(generated.ResourceGroupIdIn), - string(generated.ServiceIdIn), - string(generated.SeverityGte), + string(generated.MatchRuleTypeComponentNameIn), + string(generated.MatchRuleTypeIncidentStatus), + string(generated.MatchRuleTypeMonitorIdIn), + string(generated.MatchRuleTypeMonitorTagIn), + string(generated.MatchRuleTypeMonitorTypeIn), + string(generated.MatchRuleTypeRegionIn), + string(generated.MatchRuleTypeResourceGroupIdIn), + string(generated.MatchRuleTypeServiceIdIn), + string(generated.MatchRuleTypeSeverityGte), } diff --git a/internal/api/enums_coverage_test.go b/internal/api/enums_coverage_test.go index 3f14109..40f25b5 100644 --- a/internal/api/enums_coverage_test.go +++ b/internal/api/enums_coverage_test.go @@ -47,9 +47,19 @@ import ( type enumSliceCase struct { // generatedTypeName is the name of the enum type as declared in // `internal/generated/types.go` (e.g. `MonitorAssertionDtoAssertionType`). + // When `typeNameSuffix` is non-empty, this field is ignored and the + // assertion is sourced from the union of all enum types whose name + // ends in that suffix. generatedTypeName string + // typeNameSuffix, when non-empty, makes the test gather literals + // from every enum type ending in this suffix (e.g. `AssertionType` + // covers `BodyContainsAssertionType`, `DnsExpectedCnameAssertionType`, + // …). Used for slices that aggregate discriminator-subtype tags + // after the parent response-DTO enum was dropped by the spec-level + // Postel's-Law relaxation (`mini/runbooks/api-contract.md` § 3). + typeNameSuffix string // slice is the in-package slice we expect to be exhaustive for - // `generatedTypeName`. + // the case's source type(s). slice []string // description is surfaced in test failure output so a maintainer // can immediately see which slice / which surface is affected. @@ -66,14 +76,21 @@ type enumSliceCase struct { // relevant resource Schema(). var enumSliceCoverage = []enumSliceCase{ { - generatedTypeName: "MonitorAssertionDtoAssertionType", - slice: AssertionTypes, - description: "monitor assertions[*].type validator", + // The parent `MonitorAssertionDto.assertionType` typed alias + // was dropped by spec-level Postel's-Law relaxation. The + // canonical source is now the union of every assertion + // subtype's discriminator constant. + typeNameSuffix: "AssertionType", + slice: AssertionTypes, + description: "monitor assertions[*].type validator", }, { - generatedTypeName: "AlertChannelDtoChannelType", - slice: AlertChannelTypes, - description: "alert_channel.channel_type validator", + // Same rationale as `AssertionType` above — sourced from each + // alert-channel subtype's `*ChannelConfigChannelType` + // discriminator constant. + typeNameSuffix: "ChannelConfigChannelType", + slice: AlertChannelTypes, + description: "alert_channel.channel_type validator", }, { generatedTypeName: "MatchRuleType", @@ -90,16 +107,42 @@ func TestEnumSliceCoverage(t *testing.T) { for _, c := range enumSliceCoverage { c := c - t.Run(c.generatedTypeName, func(t *testing.T) { - expected, ok := literals[c.generatedTypeName] - if !ok { - t.Fatalf( - "generated package has no `const ... %s = \"...\"` block. "+ - "Either the spec stopped declaring this enum (drop the entry "+ - "from `enumSliceCoverage`), or oapi-codegen output shape "+ - "changed (update `parseGeneratedEnumLiterals`).", - c.generatedTypeName, - ) + caseName := c.generatedTypeName + if caseName == "" { + caseName = "*" + c.typeNameSuffix + } + t.Run(caseName, func(t *testing.T) { + var expected []string + if c.typeNameSuffix != "" { + // Aggregate every type whose name ends in the given + // suffix — used for discriminator-subtype unions. + for typeName, vals := range literals { + if !endsWith(typeName, c.typeNameSuffix) { + continue + } + expected = append(expected, vals...) + } + if len(expected) == 0 { + t.Fatalf( + "generated package has no enum types ending in %q. "+ + "Either the spec dropped the discriminated union "+ + "(drop this case from `enumSliceCoverage`) or "+ + "the suffix needs updating.", + c.typeNameSuffix, + ) + } + } else { + vals, ok := literals[c.generatedTypeName] + if !ok { + t.Fatalf( + "generated package has no `const ... %s = \"...\"` block. "+ + "Either the spec stopped declaring this enum (drop the entry "+ + "from `enumSliceCoverage`), or oapi-codegen output shape "+ + "changed (update `parseGeneratedEnumLiterals`).", + c.generatedTypeName, + ) + } + expected = vals } actual := append([]string(nil), c.slice...) sort.Strings(actual) @@ -196,6 +239,12 @@ func parseGeneratedEnumLiterals() (map[string][]string, error) { return out, nil } +// endsWith is a tiny helper that mirrors `strings.HasSuffix` without +// pulling another import into this test file. +func endsWith(s, suffix string) bool { + return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix +} + // diffStrings returns the elements present in `a` but not in `b`. Both // inputs are pre-sorted by the caller. func diffStrings(a, b []string) []string { diff --git a/internal/api/validate.go b/internal/api/validate.go index 3d5224f..bb20238 100644 --- a/internal/api/validate.go +++ b/internal/api/validate.go @@ -29,9 +29,18 @@ var ( // The validator walks the struct and enforces two invariants: // 1. Non-pointer fields must not be zero-valued (catches missing required fields // that json.Unmarshal silently accepts). -// 2. Fields whose type implements Valid() bool must return true (catches enum -// values the provider doesn't recognize, e.g. after an API update adds a -// new variant). +// 2. Fields whose type implements Valid() bool must return true (catches +// known-bad values for the enums that survive spec-level relaxation — +// primarily single-value discriminator tags). +// +// Note on Postel's-Law tolerance (see `mini/runbooks/api-contract.md` § 3): +// multi-value enums on response-shaped DTOs are dropped from the spec +// before codegen, so those fields are emitted as plain `string` and +// trivially skip the `Valid()` check. That is the desired behaviour — +// adding a new wire-format value to e.g. `MonitorDto.type` must NOT +// break existing provider versions reading existing resources. The +// `Valid()` branch only fires for enums that intentionally remain +// strict (request DTOs and discriminator subtype tags). // // This is the Go equivalent of Zod safeParse (SDK-JS) and Pydantic model_validate // (SDK-Python) — runtime response validation driven by the spec, with zero diff --git a/internal/api/validate_test.go b/internal/api/validate_test.go index 6ad022a..7c2bdb9 100644 --- a/internal/api/validate_test.go +++ b/internal/api/validate_test.go @@ -13,8 +13,8 @@ func TestValidateDTO_ValidMonitorDto(t *testing.T) { dto := generated.MonitorDto{ Id: openapi_types.UUID(uuid.New()), Name: "test-monitor", - Type: generated.MonitorDtoTypeHTTP, - ManagedBy: generated.MonitorDtoManagedByDASHBOARD, + Type: "HTTP", + ManagedBy: "DASHBOARD", FrequencySeconds: 60, OrganizationId: 1, Regions: []string{"us-east"}, @@ -29,8 +29,8 @@ func TestValidateDTO_ValidMonitorDto(t *testing.T) { func TestValidateDTO_ZeroID(t *testing.T) { dto := generated.MonitorDto{ Name: "test", - Type: generated.MonitorDtoTypeHTTP, - ManagedBy: generated.MonitorDtoManagedByDASHBOARD, + Type: "HTTP", + ManagedBy: "DASHBOARD", Regions: []string{"us-east"}, CreatedAt: time.Now(), UpdatedAt: time.Now(), @@ -47,8 +47,8 @@ func TestValidateDTO_ZeroID(t *testing.T) { func TestValidateDTO_MissingName(t *testing.T) { dto := generated.MonitorDto{ Id: openapi_types.UUID(uuid.New()), - Type: generated.MonitorDtoTypeHTTP, - ManagedBy: generated.MonitorDtoManagedByDASHBOARD, + Type: "HTTP", + ManagedBy: "DASHBOARD", Regions: []string{"us-east"}, CreatedAt: time.Now(), UpdatedAt: time.Now(), @@ -62,41 +62,42 @@ func TestValidateDTO_MissingName(t *testing.T) { } } -func TestValidateDTO_InvalidEnumType(t *testing.T) { +// TestValidateDTO_TolerantEnum_MonitorType pins Postel's-Law behavior: +// response-DTO multi-value enums are decoded as plain strings (the +// typed alias is dropped by the spec-level relaxation in +// `mini/runbooks/api-contract.md` § 3) so unknown wire values must +// flow through without an error. Forward-compat: when the API adds a +// new MonitorType the provider keeps reading existing resources +// instead of crashing on unknown values. +func TestValidateDTO_TolerantEnum_MonitorType(t *testing.T) { dto := generated.MonitorDto{ Id: openapi_types.UUID(uuid.New()), Name: "test", - Type: generated.MonitorDtoType("INVALID_PROTOCOL"), - ManagedBy: generated.MonitorDtoManagedByDASHBOARD, + Type: "FUTURE_PROTOCOL_NOT_YET_KNOWN", + ManagedBy: "DASHBOARD", Regions: []string{"us-east"}, CreatedAt: time.Now(), UpdatedAt: time.Now(), } - err := ValidateDTO(&dto, "monitor.Read") - if err == nil { - t.Fatal("expected error for invalid enum") - } - if got := err.Error(); !contains(got, "type: unknown enum value") { - t.Errorf("expected type enum error, got: %s", got) + if err := ValidateDTO(&dto, "monitor.Read"); err != nil { + t.Fatalf("unknown response-DTO enum value must be tolerated, got: %v", err) } } -func TestValidateDTO_InvalidEnumManagedBy(t *testing.T) { +// TestValidateDTO_TolerantEnum_ManagedBy is the ManagedBy counterpart +// of `TolerantEnum_MonitorType` — same invariant, different field. +func TestValidateDTO_TolerantEnum_ManagedBy(t *testing.T) { dto := generated.MonitorDto{ Id: openapi_types.UUID(uuid.New()), Name: "test", - Type: generated.MonitorDtoTypeHTTP, - ManagedBy: generated.MonitorDtoManagedBy("UNKNOWN_SOURCE"), + Type: "HTTP", + ManagedBy: "FUTURE_SOURCE_NOT_YET_KNOWN", Regions: []string{"us-east"}, CreatedAt: time.Now(), UpdatedAt: time.Now(), } - err := ValidateDTO(&dto, "monitor.Read") - if err == nil { - t.Fatal("expected error for invalid managedBy enum") - } - if got := err.Error(); !contains(got, "managedBy: unknown enum value") { - t.Errorf("expected managedBy enum error, got: %s", got) + if err := ValidateDTO(&dto, "monitor.Read"); err != nil { + t.Fatalf("unknown response-DTO enum value must be tolerated, got: %v", err) } } @@ -104,8 +105,8 @@ func TestValidateDTO_MissingRequiredRegions(t *testing.T) { dto := generated.MonitorDto{ Id: openapi_types.UUID(uuid.New()), Name: "test", - Type: generated.MonitorDtoTypeHTTP, - ManagedBy: generated.MonitorDtoManagedByDASHBOARD, + Type: "HTTP", + ManagedBy: "DASHBOARD", CreatedAt: time.Now(), UpdatedAt: time.Now(), } @@ -139,8 +140,8 @@ func TestValidateDTO_OptionalFieldsSkipped(t *testing.T) { dto := generated.MonitorDto{ Id: openapi_types.UUID(uuid.New()), Name: "test", - Type: generated.MonitorDtoTypeHTTP, - ManagedBy: generated.MonitorDtoManagedByDASHBOARD, + Type: "HTTP", + ManagedBy: "DASHBOARD", FrequencySeconds: 60, OrganizationId: 1, Regions: []string{"us-east"}, @@ -152,20 +153,20 @@ func TestValidateDTO_OptionalFieldsSkipped(t *testing.T) { } } -func TestValidateDTO_AlertChannelDto(t *testing.T) { +// TestValidateDTO_TolerantEnum_AlertChannelDto pins the same Postel's-Law +// invariant for alert-channel discovery: unknown wire values on +// `AlertChannelDto.channelType` flow through without an error so newly +// added channel kinds (e.g. a future `pagerduty_v2`) don't break Read. +func TestValidateDTO_TolerantEnum_AlertChannelDto(t *testing.T) { dto := generated.AlertChannelDto{ Id: openapi_types.UUID(uuid.New()), - Name: "slack-alerts", - ChannelType: generated.AlertChannelDtoChannelType("NONEXISTENT"), + Name: "future-channel", + ChannelType: "future_channel_type_not_yet_known", CreatedAt: time.Now(), UpdatedAt: time.Now(), } - err := ValidateDTO(&dto, "alert-channel.Read") - if err == nil { - t.Fatal("expected error for invalid channel type") - } - if got := err.Error(); !contains(got, "channelType: unknown enum value") { - t.Errorf("expected channelType enum error, got: %s", got) + if err := ValidateDTO(&dto, "alert-channel.Read"); err != nil { + t.Fatalf("unknown response-DTO channelType must be tolerated, got: %v", err) } } @@ -173,8 +174,8 @@ func TestValidateDTO_StatusPageComponentDto(t *testing.T) { dto := generated.StatusPageComponentDto{ Id: openapi_types.UUID(uuid.New()), Name: "api-component", - Type: generated.StatusPageComponentDtoTypeMONITOR, - CurrentStatus: generated.StatusPageComponentDtoCurrentStatusOPERATIONAL, + Type: "MONITOR", + CurrentStatus: "OPERATIONAL", StatusPageId: openapi_types.UUID(uuid.New()), DisplayOrder: 1, PageOrder: 1, @@ -254,7 +255,7 @@ func TestValidateDTO_ZeroNumericIsValid(t *testing.T) { ActiveIncidents: 0, OperationalCount: 0, TotalMembers: 0, - Status: generated.ResourceGroupHealthDtoStatusOperational, + Status: "operational", }, CreatedAt: time.Now(), UpdatedAt: time.Now(), @@ -292,8 +293,8 @@ func TestValidateDTO_ZeroNumericIsValid(t *testing.T) { func TestValidateDTO_RequiredStringStillRejected(t *testing.T) { dto := generated.MonitorDto{ Id: openapi_types.UUID(uuid.New()), - Type: generated.MonitorDtoTypeHTTP, - ManagedBy: generated.MonitorDtoManagedByDASHBOARD, + Type: "HTTP", + ManagedBy: "DASHBOARD", Regions: []string{"us-east"}, CreatedAt: time.Now(), UpdatedAt: time.Now(), diff --git a/internal/generated/types.go b/internal/generated/types.go index da4fd4e..6503dd5 100644 --- a/internal/generated/types.go +++ b/internal/generated/types.go @@ -67,114 +67,6 @@ func (e AffectedComponentStatus) Valid() bool { } } -// Defines values for AlertChannelDtoChannelType. -const ( - AlertChannelDtoChannelTypeDiscord AlertChannelDtoChannelType = "discord" - AlertChannelDtoChannelTypeEmail AlertChannelDtoChannelType = "email" - AlertChannelDtoChannelTypeOpsgenie AlertChannelDtoChannelType = "opsgenie" - AlertChannelDtoChannelTypePagerduty AlertChannelDtoChannelType = "pagerduty" - AlertChannelDtoChannelTypeSlack AlertChannelDtoChannelType = "slack" - AlertChannelDtoChannelTypeTeams AlertChannelDtoChannelType = "teams" - AlertChannelDtoChannelTypeWebhook AlertChannelDtoChannelType = "webhook" -) - -// Valid indicates whether the value is a known member of the AlertChannelDtoChannelType enum. -func (e AlertChannelDtoChannelType) Valid() bool { - switch e { - case AlertChannelDtoChannelTypeDiscord: - return true - case AlertChannelDtoChannelTypeEmail: - return true - case AlertChannelDtoChannelTypeOpsgenie: - return true - case AlertChannelDtoChannelTypePagerduty: - return true - case AlertChannelDtoChannelTypeSlack: - return true - case AlertChannelDtoChannelTypeTeams: - return true - case AlertChannelDtoChannelTypeWebhook: - return true - default: - return false - } -} - -// Defines values for AlertChannelDtoManagedBy. -const ( - AlertChannelDtoManagedByAPI AlertChannelDtoManagedBy = "API" - AlertChannelDtoManagedByCLI AlertChannelDtoManagedBy = "CLI" - AlertChannelDtoManagedByDASHBOARD AlertChannelDtoManagedBy = "DASHBOARD" - AlertChannelDtoManagedByMCP AlertChannelDtoManagedBy = "MCP" - AlertChannelDtoManagedByTERRAFORM AlertChannelDtoManagedBy = "TERRAFORM" -) - -// Valid indicates whether the value is a known member of the AlertChannelDtoManagedBy enum. -func (e AlertChannelDtoManagedBy) Valid() bool { - switch e { - case AlertChannelDtoManagedByAPI: - return true - case AlertChannelDtoManagedByCLI: - return true - case AlertChannelDtoManagedByDASHBOARD: - return true - case AlertChannelDtoManagedByMCP: - return true - case AlertChannelDtoManagedByTERRAFORM: - return true - default: - return false - } -} - -// Defines values for AlertDeliveryDtoEventType. -const ( - INCIDENTCREATED AlertDeliveryDtoEventType = "INCIDENT_CREATED" - INCIDENTREOPENED AlertDeliveryDtoEventType = "INCIDENT_REOPENED" - INCIDENTRESOLVED AlertDeliveryDtoEventType = "INCIDENT_RESOLVED" -) - -// Valid indicates whether the value is a known member of the AlertDeliveryDtoEventType enum. -func (e AlertDeliveryDtoEventType) Valid() bool { - switch e { - case INCIDENTCREATED: - return true - case INCIDENTREOPENED: - return true - case INCIDENTRESOLVED: - return true - default: - return false - } -} - -// Defines values for AlertDeliveryDtoStatus. -const ( - AlertDeliveryDtoStatusCANCELLED AlertDeliveryDtoStatus = "CANCELLED" - AlertDeliveryDtoStatusDELIVERED AlertDeliveryDtoStatus = "DELIVERED" - AlertDeliveryDtoStatusFAILED AlertDeliveryDtoStatus = "FAILED" - AlertDeliveryDtoStatusPENDING AlertDeliveryDtoStatus = "PENDING" - AlertDeliveryDtoStatusRETRYPENDING AlertDeliveryDtoStatus = "RETRY_PENDING" -) - -// Valid indicates whether the value is a known member of the AlertDeliveryDtoStatus enum. -func (e AlertDeliveryDtoStatus) Valid() bool { - switch e { - case AlertDeliveryDtoStatusCANCELLED: - return true - case AlertDeliveryDtoStatusDELIVERED: - return true - case AlertDeliveryDtoStatusFAILED: - return true - case AlertDeliveryDtoStatusPENDING: - return true - case AlertDeliveryDtoStatusRETRYPENDING: - return true - default: - return false - } -} - // Defines values for ApiKeyAuthConfigType. const ( ApiKeyAuthConfigTypeApiKey ApiKeyAuthConfigType = "api_key" @@ -190,189 +82,15 @@ func (e ApiKeyAuthConfigType) Valid() bool { } } -// Defines values for AssertionResultDtoSeverity. -const ( - AssertionResultDtoSeverityFail AssertionResultDtoSeverity = "fail" - AssertionResultDtoSeverityWarn AssertionResultDtoSeverity = "warn" -) - -// Valid indicates whether the value is a known member of the AssertionResultDtoSeverity enum. -func (e AssertionResultDtoSeverity) Valid() bool { - switch e { - case AssertionResultDtoSeverityFail: - return true - case AssertionResultDtoSeverityWarn: - return true - default: - return false - } -} - -// Defines values for AssertionTestResultDtoAssertionType. -const ( - AssertionTestResultDtoAssertionTypeBodyContains AssertionTestResultDtoAssertionType = "body_contains" - AssertionTestResultDtoAssertionTypeDnsExpectedCname AssertionTestResultDtoAssertionType = "dns_expected_cname" - AssertionTestResultDtoAssertionTypeDnsExpectedIps AssertionTestResultDtoAssertionType = "dns_expected_ips" - AssertionTestResultDtoAssertionTypeDnsMaxAnswers AssertionTestResultDtoAssertionType = "dns_max_answers" - AssertionTestResultDtoAssertionTypeDnsMinAnswers AssertionTestResultDtoAssertionType = "dns_min_answers" - AssertionTestResultDtoAssertionTypeDnsRecordContains AssertionTestResultDtoAssertionType = "dns_record_contains" - AssertionTestResultDtoAssertionTypeDnsRecordEquals AssertionTestResultDtoAssertionType = "dns_record_equals" - AssertionTestResultDtoAssertionTypeDnsResolves AssertionTestResultDtoAssertionType = "dns_resolves" - AssertionTestResultDtoAssertionTypeDnsResponseTime AssertionTestResultDtoAssertionType = "dns_response_time" - AssertionTestResultDtoAssertionTypeDnsResponseTimeWarn AssertionTestResultDtoAssertionType = "dns_response_time_warn" - AssertionTestResultDtoAssertionTypeDnsTtlHigh AssertionTestResultDtoAssertionType = "dns_ttl_high" - AssertionTestResultDtoAssertionTypeDnsTtlLow AssertionTestResultDtoAssertionType = "dns_ttl_low" - AssertionTestResultDtoAssertionTypeDnsTxtContains AssertionTestResultDtoAssertionType = "dns_txt_contains" - AssertionTestResultDtoAssertionTypeHeaderValue AssertionTestResultDtoAssertionType = "header_value" - AssertionTestResultDtoAssertionTypeHeartbeatIntervalDrift AssertionTestResultDtoAssertionType = "heartbeat_interval_drift" - AssertionTestResultDtoAssertionTypeHeartbeatMaxInterval AssertionTestResultDtoAssertionType = "heartbeat_max_interval" - AssertionTestResultDtoAssertionTypeHeartbeatPayloadContains AssertionTestResultDtoAssertionType = "heartbeat_payload_contains" - AssertionTestResultDtoAssertionTypeHeartbeatReceived AssertionTestResultDtoAssertionType = "heartbeat_received" - AssertionTestResultDtoAssertionTypeIcmpPacketLoss AssertionTestResultDtoAssertionType = "icmp_packet_loss" - AssertionTestResultDtoAssertionTypeIcmpReachable AssertionTestResultDtoAssertionType = "icmp_reachable" - AssertionTestResultDtoAssertionTypeIcmpResponseTime AssertionTestResultDtoAssertionType = "icmp_response_time" - AssertionTestResultDtoAssertionTypeIcmpResponseTimeWarn AssertionTestResultDtoAssertionType = "icmp_response_time_warn" - AssertionTestResultDtoAssertionTypeJsonPath AssertionTestResultDtoAssertionType = "json_path" - AssertionTestResultDtoAssertionTypeMcpConnects AssertionTestResultDtoAssertionType = "mcp_connects" - AssertionTestResultDtoAssertionTypeMcpHasCapability AssertionTestResultDtoAssertionType = "mcp_has_capability" - AssertionTestResultDtoAssertionTypeMcpMinTools AssertionTestResultDtoAssertionType = "mcp_min_tools" - AssertionTestResultDtoAssertionTypeMcpProtocolVersion AssertionTestResultDtoAssertionType = "mcp_protocol_version" - AssertionTestResultDtoAssertionTypeMcpResponseTime AssertionTestResultDtoAssertionType = "mcp_response_time" - AssertionTestResultDtoAssertionTypeMcpResponseTimeWarn AssertionTestResultDtoAssertionType = "mcp_response_time_warn" - AssertionTestResultDtoAssertionTypeMcpToolAvailable AssertionTestResultDtoAssertionType = "mcp_tool_available" - AssertionTestResultDtoAssertionTypeMcpToolCountChanged AssertionTestResultDtoAssertionType = "mcp_tool_count_changed" - AssertionTestResultDtoAssertionTypeRedirectCount AssertionTestResultDtoAssertionType = "redirect_count" - AssertionTestResultDtoAssertionTypeRedirectTarget AssertionTestResultDtoAssertionType = "redirect_target" - AssertionTestResultDtoAssertionTypeRegexBody AssertionTestResultDtoAssertionType = "regex_body" - AssertionTestResultDtoAssertionTypeResponseSize AssertionTestResultDtoAssertionType = "response_size" - AssertionTestResultDtoAssertionTypeResponseTime AssertionTestResultDtoAssertionType = "response_time" - AssertionTestResultDtoAssertionTypeResponseTimeWarn AssertionTestResultDtoAssertionType = "response_time_warn" - AssertionTestResultDtoAssertionTypeSslExpiry AssertionTestResultDtoAssertionType = "ssl_expiry" - AssertionTestResultDtoAssertionTypeStatusCode AssertionTestResultDtoAssertionType = "status_code" - AssertionTestResultDtoAssertionTypeTcpConnects AssertionTestResultDtoAssertionType = "tcp_connects" - AssertionTestResultDtoAssertionTypeTcpResponseTime AssertionTestResultDtoAssertionType = "tcp_response_time" - AssertionTestResultDtoAssertionTypeTcpResponseTimeWarn AssertionTestResultDtoAssertionType = "tcp_response_time_warn" -) - -// Valid indicates whether the value is a known member of the AssertionTestResultDtoAssertionType enum. -func (e AssertionTestResultDtoAssertionType) Valid() bool { - switch e { - case AssertionTestResultDtoAssertionTypeBodyContains: - return true - case AssertionTestResultDtoAssertionTypeDnsExpectedCname: - return true - case AssertionTestResultDtoAssertionTypeDnsExpectedIps: - return true - case AssertionTestResultDtoAssertionTypeDnsMaxAnswers: - return true - case AssertionTestResultDtoAssertionTypeDnsMinAnswers: - return true - case AssertionTestResultDtoAssertionTypeDnsRecordContains: - return true - case AssertionTestResultDtoAssertionTypeDnsRecordEquals: - return true - case AssertionTestResultDtoAssertionTypeDnsResolves: - return true - case AssertionTestResultDtoAssertionTypeDnsResponseTime: - return true - case AssertionTestResultDtoAssertionTypeDnsResponseTimeWarn: - return true - case AssertionTestResultDtoAssertionTypeDnsTtlHigh: - return true - case AssertionTestResultDtoAssertionTypeDnsTtlLow: - return true - case AssertionTestResultDtoAssertionTypeDnsTxtContains: - return true - case AssertionTestResultDtoAssertionTypeHeaderValue: - return true - case AssertionTestResultDtoAssertionTypeHeartbeatIntervalDrift: - return true - case AssertionTestResultDtoAssertionTypeHeartbeatMaxInterval: - return true - case AssertionTestResultDtoAssertionTypeHeartbeatPayloadContains: - return true - case AssertionTestResultDtoAssertionTypeHeartbeatReceived: - return true - case AssertionTestResultDtoAssertionTypeIcmpPacketLoss: - return true - case AssertionTestResultDtoAssertionTypeIcmpReachable: - return true - case AssertionTestResultDtoAssertionTypeIcmpResponseTime: - return true - case AssertionTestResultDtoAssertionTypeIcmpResponseTimeWarn: - return true - case AssertionTestResultDtoAssertionTypeJsonPath: - return true - case AssertionTestResultDtoAssertionTypeMcpConnects: - return true - case AssertionTestResultDtoAssertionTypeMcpHasCapability: - return true - case AssertionTestResultDtoAssertionTypeMcpMinTools: - return true - case AssertionTestResultDtoAssertionTypeMcpProtocolVersion: - return true - case AssertionTestResultDtoAssertionTypeMcpResponseTime: - return true - case AssertionTestResultDtoAssertionTypeMcpResponseTimeWarn: - return true - case AssertionTestResultDtoAssertionTypeMcpToolAvailable: - return true - case AssertionTestResultDtoAssertionTypeMcpToolCountChanged: - return true - case AssertionTestResultDtoAssertionTypeRedirectCount: - return true - case AssertionTestResultDtoAssertionTypeRedirectTarget: - return true - case AssertionTestResultDtoAssertionTypeRegexBody: - return true - case AssertionTestResultDtoAssertionTypeResponseSize: - return true - case AssertionTestResultDtoAssertionTypeResponseTime: - return true - case AssertionTestResultDtoAssertionTypeResponseTimeWarn: - return true - case AssertionTestResultDtoAssertionTypeSslExpiry: - return true - case AssertionTestResultDtoAssertionTypeStatusCode: - return true - case AssertionTestResultDtoAssertionTypeTcpConnects: - return true - case AssertionTestResultDtoAssertionTypeTcpResponseTime: - return true - case AssertionTestResultDtoAssertionTypeTcpResponseTimeWarn: - return true - default: - return false - } -} - -// Defines values for AssertionTestResultDtoSeverity. -const ( - AssertionTestResultDtoSeverityFail AssertionTestResultDtoSeverity = "fail" - AssertionTestResultDtoSeverityWarn AssertionTestResultDtoSeverity = "warn" -) - -// Valid indicates whether the value is a known member of the AssertionTestResultDtoSeverity enum. -func (e AssertionTestResultDtoSeverity) Valid() bool { - switch e { - case AssertionTestResultDtoSeverityFail: - return true - case AssertionTestResultDtoSeverityWarn: - return true - default: - return false - } -} - // Defines values for BasicAuthConfigType. const ( - Basic BasicAuthConfigType = "basic" + BasicAuthConfigTypeBasic BasicAuthConfigType = "basic" ) // Valid indicates whether the value is a known member of the BasicAuthConfigType enum. func (e BasicAuthConfigType) Valid() bool { switch e { - case Basic: + case BasicAuthConfigTypeBasic: return true default: return false @@ -381,13 +99,13 @@ func (e BasicAuthConfigType) Valid() bool { // Defines values for BearerAuthConfigType. const ( - Bearer BearerAuthConfigType = "bearer" + BearerAuthConfigTypeBearer BearerAuthConfigType = "bearer" ) // Valid indicates whether the value is a known member of the BearerAuthConfigType enum. func (e BearerAuthConfigType) Valid() bool { switch e { - case Bearer: + case BearerAuthConfigTypeBearer: return true default: return false @@ -489,13 +207,13 @@ func (e ChangeStatusRequestStatus) Valid() bool { // Defines values for ConfirmationPolicyType. const ( - MultiRegion ConfirmationPolicyType = "multi_region" + ConfirmationPolicyTypeMultiRegion ConfirmationPolicyType = "multi_region" ) // Valid indicates whether the value is a known member of the ConfirmationPolicyType enum. func (e ConfirmationPolicyType) Valid() bool { switch e { - case MultiRegion: + case ConfirmationPolicyTypeMultiRegion: return true default: return false @@ -993,13 +711,13 @@ func (e DnsExpectedCnameAssertionType) Valid() bool { // Defines values for DnsExpectedIpsAssertionType. const ( - DnsExpectedIps DnsExpectedIpsAssertionType = "dns_expected_ips" + DnsExpectedIpsAssertionTypeDnsExpectedIps DnsExpectedIpsAssertionType = "dns_expected_ips" ) // Valid indicates whether the value is a known member of the DnsExpectedIpsAssertionType enum. func (e DnsExpectedIpsAssertionType) Valid() bool { switch e { - case DnsExpectedIps: + case DnsExpectedIpsAssertionTypeDnsExpectedIps: return true default: return false @@ -1008,13 +726,13 @@ func (e DnsExpectedIpsAssertionType) Valid() bool { // Defines values for DnsMaxAnswersAssertionType. const ( - DnsMaxAnswers DnsMaxAnswersAssertionType = "dns_max_answers" + DnsMaxAnswersAssertionTypeDnsMaxAnswers DnsMaxAnswersAssertionType = "dns_max_answers" ) // Valid indicates whether the value is a known member of the DnsMaxAnswersAssertionType enum. func (e DnsMaxAnswersAssertionType) Valid() bool { switch e { - case DnsMaxAnswers: + case DnsMaxAnswersAssertionTypeDnsMaxAnswers: return true default: return false @@ -1023,13 +741,13 @@ func (e DnsMaxAnswersAssertionType) Valid() bool { // Defines values for DnsMinAnswersAssertionType. const ( - DnsMinAnswers DnsMinAnswersAssertionType = "dns_min_answers" + DnsMinAnswersAssertionTypeDnsMinAnswers DnsMinAnswersAssertionType = "dns_min_answers" ) // Valid indicates whether the value is a known member of the DnsMinAnswersAssertionType enum. func (e DnsMinAnswersAssertionType) Valid() bool { switch e { - case DnsMinAnswers: + case DnsMinAnswersAssertionTypeDnsMinAnswers: return true default: return false @@ -1080,13 +798,13 @@ func (e DnsMonitorConfigRecordTypes) Valid() bool { // Defines values for DnsRecordContainsAssertionType. const ( - DnsRecordContains DnsRecordContainsAssertionType = "dns_record_contains" + DnsRecordContainsAssertionTypeDnsRecordContains DnsRecordContainsAssertionType = "dns_record_contains" ) // Valid indicates whether the value is a known member of the DnsRecordContainsAssertionType enum. func (e DnsRecordContainsAssertionType) Valid() bool { switch e { - case DnsRecordContains: + case DnsRecordContainsAssertionTypeDnsRecordContains: return true default: return false @@ -1095,13 +813,13 @@ func (e DnsRecordContainsAssertionType) Valid() bool { // Defines values for DnsRecordEqualsAssertionType. const ( - DnsRecordEquals DnsRecordEqualsAssertionType = "dns_record_equals" + DnsRecordEqualsAssertionTypeDnsRecordEquals DnsRecordEqualsAssertionType = "dns_record_equals" ) // Valid indicates whether the value is a known member of the DnsRecordEqualsAssertionType enum. func (e DnsRecordEqualsAssertionType) Valid() bool { switch e { - case DnsRecordEquals: + case DnsRecordEqualsAssertionTypeDnsRecordEquals: return true default: return false @@ -1110,13 +828,13 @@ func (e DnsRecordEqualsAssertionType) Valid() bool { // Defines values for DnsResolvesAssertionType. const ( - DnsResolves DnsResolvesAssertionType = "dns_resolves" + DnsResolvesAssertionTypeDnsResolves DnsResolvesAssertionType = "dns_resolves" ) // Valid indicates whether the value is a known member of the DnsResolvesAssertionType enum. func (e DnsResolvesAssertionType) Valid() bool { switch e { - case DnsResolves: + case DnsResolvesAssertionTypeDnsResolves: return true default: return false @@ -1125,13 +843,13 @@ func (e DnsResolvesAssertionType) Valid() bool { // Defines values for DnsResponseTimeAssertionType. const ( - DnsResponseTime DnsResponseTimeAssertionType = "dns_response_time" + DnsResponseTimeAssertionTypeDnsResponseTime DnsResponseTimeAssertionType = "dns_response_time" ) // Valid indicates whether the value is a known member of the DnsResponseTimeAssertionType enum. func (e DnsResponseTimeAssertionType) Valid() bool { switch e { - case DnsResponseTime: + case DnsResponseTimeAssertionTypeDnsResponseTime: return true default: return false @@ -1140,13 +858,13 @@ func (e DnsResponseTimeAssertionType) Valid() bool { // Defines values for DnsResponseTimeWarnAssertionType. const ( - DnsResponseTimeWarn DnsResponseTimeWarnAssertionType = "dns_response_time_warn" + DnsResponseTimeWarnAssertionTypeDnsResponseTimeWarn DnsResponseTimeWarnAssertionType = "dns_response_time_warn" ) // Valid indicates whether the value is a known member of the DnsResponseTimeWarnAssertionType enum. func (e DnsResponseTimeWarnAssertionType) Valid() bool { switch e { - case DnsResponseTimeWarn: + case DnsResponseTimeWarnAssertionTypeDnsResponseTimeWarn: return true default: return false @@ -1155,13 +873,13 @@ func (e DnsResponseTimeWarnAssertionType) Valid() bool { // Defines values for DnsTtlHighAssertionType. const ( - DnsTtlHigh DnsTtlHighAssertionType = "dns_ttl_high" + DnsTtlHighAssertionTypeDnsTtlHigh DnsTtlHighAssertionType = "dns_ttl_high" ) // Valid indicates whether the value is a known member of the DnsTtlHighAssertionType enum. func (e DnsTtlHighAssertionType) Valid() bool { switch e { - case DnsTtlHigh: + case DnsTtlHighAssertionTypeDnsTtlHigh: return true default: return false @@ -1170,13 +888,13 @@ func (e DnsTtlHighAssertionType) Valid() bool { // Defines values for DnsTtlLowAssertionType. const ( - DnsTtlLow DnsTtlLowAssertionType = "dns_ttl_low" + DnsTtlLowAssertionTypeDnsTtlLow DnsTtlLowAssertionType = "dns_ttl_low" ) // Valid indicates whether the value is a known member of the DnsTtlLowAssertionType enum. func (e DnsTtlLowAssertionType) Valid() bool { switch e { - case DnsTtlLow: + case DnsTtlLowAssertionTypeDnsTtlLow: return true default: return false @@ -1185,13 +903,13 @@ func (e DnsTtlLowAssertionType) Valid() bool { // Defines values for DnsTxtContainsAssertionType. const ( - DnsTxtContains DnsTxtContainsAssertionType = "dns_txt_contains" + DnsTxtContainsAssertionTypeDnsTxtContains DnsTxtContainsAssertionType = "dns_txt_contains" ) // Valid indicates whether the value is a known member of the DnsTxtContainsAssertionType enum. func (e DnsTxtContainsAssertionType) Valid() bool { switch e { - case DnsTxtContains: + case DnsTxtContainsAssertionTypeDnsTxtContains: return true default: return false @@ -1215,13 +933,13 @@ func (e EmailChannelConfigChannelType) Valid() bool { // Defines values for HeaderAuthConfigType. const ( - Header HeaderAuthConfigType = "header" + HeaderAuthConfigTypeHeader HeaderAuthConfigType = "header" ) // Valid indicates whether the value is a known member of the HeaderAuthConfigType enum. func (e HeaderAuthConfigType) Valid() bool { switch e { - case Header: + case HeaderAuthConfigTypeHeader: return true default: return false @@ -1260,13 +978,13 @@ func (e HeaderValueAssertionOperator) Valid() bool { // Defines values for HeaderValueAssertionType. const ( - HeaderValue HeaderValueAssertionType = "header_value" + HeaderValueAssertionTypeHeaderValue HeaderValueAssertionType = "header_value" ) // Valid indicates whether the value is a known member of the HeaderValueAssertionType enum. func (e HeaderValueAssertionType) Valid() bool { switch e { - case HeaderValue: + case HeaderValueAssertionTypeHeaderValue: return true default: return false @@ -1275,13 +993,13 @@ func (e HeaderValueAssertionType) Valid() bool { // Defines values for HeartbeatIntervalDriftAssertionType. const ( - HeartbeatIntervalDrift HeartbeatIntervalDriftAssertionType = "heartbeat_interval_drift" + HeartbeatIntervalDriftAssertionTypeHeartbeatIntervalDrift HeartbeatIntervalDriftAssertionType = "heartbeat_interval_drift" ) // Valid indicates whether the value is a known member of the HeartbeatIntervalDriftAssertionType enum. func (e HeartbeatIntervalDriftAssertionType) Valid() bool { switch e { - case HeartbeatIntervalDrift: + case HeartbeatIntervalDriftAssertionTypeHeartbeatIntervalDrift: return true default: return false @@ -1290,13 +1008,13 @@ func (e HeartbeatIntervalDriftAssertionType) Valid() bool { // Defines values for HeartbeatMaxIntervalAssertionType. const ( - HeartbeatMaxInterval HeartbeatMaxIntervalAssertionType = "heartbeat_max_interval" + HeartbeatMaxIntervalAssertionTypeHeartbeatMaxInterval HeartbeatMaxIntervalAssertionType = "heartbeat_max_interval" ) // Valid indicates whether the value is a known member of the HeartbeatMaxIntervalAssertionType enum. func (e HeartbeatMaxIntervalAssertionType) Valid() bool { switch e { - case HeartbeatMaxInterval: + case HeartbeatMaxIntervalAssertionTypeHeartbeatMaxInterval: return true default: return false @@ -1305,13 +1023,13 @@ func (e HeartbeatMaxIntervalAssertionType) Valid() bool { // Defines values for HeartbeatPayloadContainsAssertionType. const ( - HeartbeatPayloadContains HeartbeatPayloadContainsAssertionType = "heartbeat_payload_contains" + HeartbeatPayloadContainsAssertionTypeHeartbeatPayloadContains HeartbeatPayloadContainsAssertionType = "heartbeat_payload_contains" ) // Valid indicates whether the value is a known member of the HeartbeatPayloadContainsAssertionType enum. func (e HeartbeatPayloadContainsAssertionType) Valid() bool { switch e { - case HeartbeatPayloadContains: + case HeartbeatPayloadContainsAssertionTypeHeartbeatPayloadContains: return true default: return false @@ -1320,13 +1038,13 @@ func (e HeartbeatPayloadContainsAssertionType) Valid() bool { // Defines values for HeartbeatReceivedAssertionType. const ( - HeartbeatReceived HeartbeatReceivedAssertionType = "heartbeat_received" + HeartbeatReceivedAssertionTypeHeartbeatReceived HeartbeatReceivedAssertionType = "heartbeat_received" ) // Valid indicates whether the value is a known member of the HeartbeatReceivedAssertionType enum. func (e HeartbeatReceivedAssertionType) Valid() bool { switch e { - case HeartbeatReceived: + case HeartbeatReceivedAssertionTypeHeartbeatReceived: return true default: return false @@ -1395,13 +1113,13 @@ func (e IcmpCheckType) Valid() bool { // Defines values for IcmpPacketLossAssertionType. const ( - IcmpPacketLoss IcmpPacketLossAssertionType = "icmp_packet_loss" + IcmpPacketLossAssertionTypeIcmpPacketLoss IcmpPacketLossAssertionType = "icmp_packet_loss" ) // Valid indicates whether the value is a known member of the IcmpPacketLossAssertionType enum. func (e IcmpPacketLossAssertionType) Valid() bool { switch e { - case IcmpPacketLoss: + case IcmpPacketLossAssertionTypeIcmpPacketLoss: return true default: return false @@ -1410,13 +1128,13 @@ func (e IcmpPacketLossAssertionType) Valid() bool { // Defines values for IcmpReachableAssertionType. const ( - IcmpReachable IcmpReachableAssertionType = "icmp_reachable" + IcmpReachableAssertionTypeIcmpReachable IcmpReachableAssertionType = "icmp_reachable" ) // Valid indicates whether the value is a known member of the IcmpReachableAssertionType enum. func (e IcmpReachableAssertionType) Valid() bool { switch e { - case IcmpReachable: + case IcmpReachableAssertionTypeIcmpReachable: return true default: return false @@ -1425,13 +1143,13 @@ func (e IcmpReachableAssertionType) Valid() bool { // Defines values for IcmpResponseTimeAssertionType. const ( - IcmpResponseTime IcmpResponseTimeAssertionType = "icmp_response_time" + IcmpResponseTimeAssertionTypeIcmpResponseTime IcmpResponseTimeAssertionType = "icmp_response_time" ) // Valid indicates whether the value is a known member of the IcmpResponseTimeAssertionType enum. func (e IcmpResponseTimeAssertionType) Valid() bool { switch e { - case IcmpResponseTime: + case IcmpResponseTimeAssertionTypeIcmpResponseTime: return true default: return false @@ -1440,106 +1158,13 @@ func (e IcmpResponseTimeAssertionType) Valid() bool { // Defines values for IcmpResponseTimeWarnAssertionType. const ( - IcmpResponseTimeWarn IcmpResponseTimeWarnAssertionType = "icmp_response_time_warn" + IcmpResponseTimeWarnAssertionTypeIcmpResponseTimeWarn IcmpResponseTimeWarnAssertionType = "icmp_response_time_warn" ) // Valid indicates whether the value is a known member of the IcmpResponseTimeWarnAssertionType enum. func (e IcmpResponseTimeWarnAssertionType) Valid() bool { switch e { - case IcmpResponseTimeWarn: - return true - default: - return false - } -} - -// Defines values for IncidentDtoResolutionReason. -const ( - IncidentDtoResolutionReasonAUTORECOVERED IncidentDtoResolutionReason = "AUTO_RECOVERED" - IncidentDtoResolutionReasonAUTORESOLVED IncidentDtoResolutionReason = "AUTO_RESOLVED" - IncidentDtoResolutionReasonMANUAL IncidentDtoResolutionReason = "MANUAL" -) - -// Valid indicates whether the value is a known member of the IncidentDtoResolutionReason enum. -func (e IncidentDtoResolutionReason) Valid() bool { - switch e { - case IncidentDtoResolutionReasonAUTORECOVERED: - return true - case IncidentDtoResolutionReasonAUTORESOLVED: - return true - case IncidentDtoResolutionReasonMANUAL: - return true - default: - return false - } -} - -// Defines values for IncidentDtoSeverity. -const ( - IncidentDtoSeverityDEGRADED IncidentDtoSeverity = "DEGRADED" - IncidentDtoSeverityDOWN IncidentDtoSeverity = "DOWN" - IncidentDtoSeverityMAINTENANCE IncidentDtoSeverity = "MAINTENANCE" -) - -// Valid indicates whether the value is a known member of the IncidentDtoSeverity enum. -func (e IncidentDtoSeverity) Valid() bool { - switch e { - case IncidentDtoSeverityDEGRADED: - return true - case IncidentDtoSeverityDOWN: - return true - case IncidentDtoSeverityMAINTENANCE: - return true - default: - return false - } -} - -// Defines values for IncidentDtoSource. -const ( - IncidentDtoSourceAUTOMATIC IncidentDtoSource = "AUTOMATIC" - IncidentDtoSourceMANUAL IncidentDtoSource = "MANUAL" - IncidentDtoSourceMONITORS IncidentDtoSource = "MONITORS" - IncidentDtoSourceRESOURCEGROUP IncidentDtoSource = "RESOURCE_GROUP" - IncidentDtoSourceSTATUSDATA IncidentDtoSource = "STATUS_DATA" -) - -// Valid indicates whether the value is a known member of the IncidentDtoSource enum. -func (e IncidentDtoSource) Valid() bool { - switch e { - case IncidentDtoSourceAUTOMATIC: - return true - case IncidentDtoSourceMANUAL: - return true - case IncidentDtoSourceMONITORS: - return true - case IncidentDtoSourceRESOURCEGROUP: - return true - case IncidentDtoSourceSTATUSDATA: - return true - default: - return false - } -} - -// Defines values for IncidentDtoStatus. -const ( - IncidentDtoStatusCONFIRMED IncidentDtoStatus = "CONFIRMED" - IncidentDtoStatusRESOLVED IncidentDtoStatus = "RESOLVED" - IncidentDtoStatusTRIGGERED IncidentDtoStatus = "TRIGGERED" - IncidentDtoStatusWATCHING IncidentDtoStatus = "WATCHING" -) - -// Valid indicates whether the value is a known member of the IncidentDtoStatus enum. -func (e IncidentDtoStatus) Valid() bool { - switch e { - case IncidentDtoStatusCONFIRMED: - return true - case IncidentDtoStatusRESOLVED: - return true - case IncidentDtoStatusTRIGGERED: - return true - case IncidentDtoStatusWATCHING: + case IcmpResponseTimeWarnAssertionTypeIcmpResponseTimeWarn: return true default: return false @@ -1548,19 +1173,19 @@ func (e IncidentDtoStatus) Valid() bool { // Defines values for IncidentFilterParamsSeverity. const ( - DEGRADED IncidentFilterParamsSeverity = "DEGRADED" - DOWN IncidentFilterParamsSeverity = "DOWN" - MAINTENANCE IncidentFilterParamsSeverity = "MAINTENANCE" + IncidentFilterParamsSeverityDEGRADED IncidentFilterParamsSeverity = "DEGRADED" + IncidentFilterParamsSeverityDOWN IncidentFilterParamsSeverity = "DOWN" + IncidentFilterParamsSeverityMAINTENANCE IncidentFilterParamsSeverity = "MAINTENANCE" ) // Valid indicates whether the value is a known member of the IncidentFilterParamsSeverity enum. func (e IncidentFilterParamsSeverity) Valid() bool { switch e { - case DEGRADED: + case IncidentFilterParamsSeverityDEGRADED: return true - case DOWN: + case IncidentFilterParamsSeverityDOWN: return true - case MAINTENANCE: + case IncidentFilterParamsSeverityMAINTENANCE: return true default: return false @@ -1618,309 +1243,144 @@ func (e IncidentFilterParamsStatus) Valid() bool { } } -// Defines values for IncidentUpdateDtoCreatedBy. +// Defines values for JsonPathAssertionOperator. const ( - IncidentUpdateDtoCreatedBySYSTEM IncidentUpdateDtoCreatedBy = "SYSTEM" - IncidentUpdateDtoCreatedByUSER IncidentUpdateDtoCreatedBy = "USER" + JsonPathAssertionOperatorContains JsonPathAssertionOperator = "contains" + JsonPathAssertionOperatorEquals JsonPathAssertionOperator = "equals" + JsonPathAssertionOperatorGreaterThan JsonPathAssertionOperator = "greater_than" + JsonPathAssertionOperatorLessThan JsonPathAssertionOperator = "less_than" + JsonPathAssertionOperatorMatches JsonPathAssertionOperator = "matches" + JsonPathAssertionOperatorRange JsonPathAssertionOperator = "range" ) -// Valid indicates whether the value is a known member of the IncidentUpdateDtoCreatedBy enum. -func (e IncidentUpdateDtoCreatedBy) Valid() bool { +// Valid indicates whether the value is a known member of the JsonPathAssertionOperator enum. +func (e JsonPathAssertionOperator) Valid() bool { switch e { - case IncidentUpdateDtoCreatedBySYSTEM: + case JsonPathAssertionOperatorContains: return true - case IncidentUpdateDtoCreatedByUSER: + case JsonPathAssertionOperatorEquals: return true - default: - return false - } -} - -// Defines values for IncidentUpdateDtoNewStatus. -const ( - IncidentUpdateDtoNewStatusCONFIRMED IncidentUpdateDtoNewStatus = "CONFIRMED" - IncidentUpdateDtoNewStatusRESOLVED IncidentUpdateDtoNewStatus = "RESOLVED" - IncidentUpdateDtoNewStatusTRIGGERED IncidentUpdateDtoNewStatus = "TRIGGERED" - IncidentUpdateDtoNewStatusWATCHING IncidentUpdateDtoNewStatus = "WATCHING" -) - -// Valid indicates whether the value is a known member of the IncidentUpdateDtoNewStatus enum. -func (e IncidentUpdateDtoNewStatus) Valid() bool { - switch e { - case IncidentUpdateDtoNewStatusCONFIRMED: + case JsonPathAssertionOperatorGreaterThan: return true - case IncidentUpdateDtoNewStatusRESOLVED: + case JsonPathAssertionOperatorLessThan: return true - case IncidentUpdateDtoNewStatusTRIGGERED: + case JsonPathAssertionOperatorMatches: return true - case IncidentUpdateDtoNewStatusWATCHING: + case JsonPathAssertionOperatorRange: return true default: return false } } -// Defines values for IncidentUpdateDtoOldStatus. +// Defines values for JsonPathAssertionType. const ( - IncidentUpdateDtoOldStatusCONFIRMED IncidentUpdateDtoOldStatus = "CONFIRMED" - IncidentUpdateDtoOldStatusRESOLVED IncidentUpdateDtoOldStatus = "RESOLVED" - IncidentUpdateDtoOldStatusTRIGGERED IncidentUpdateDtoOldStatus = "TRIGGERED" - IncidentUpdateDtoOldStatusWATCHING IncidentUpdateDtoOldStatus = "WATCHING" + JsonPathAssertionTypeJsonPath JsonPathAssertionType = "json_path" ) -// Valid indicates whether the value is a known member of the IncidentUpdateDtoOldStatus enum. -func (e IncidentUpdateDtoOldStatus) Valid() bool { +// Valid indicates whether the value is a known member of the JsonPathAssertionType enum. +func (e JsonPathAssertionType) Valid() bool { switch e { - case IncidentUpdateDtoOldStatusCONFIRMED: - return true - case IncidentUpdateDtoOldStatusRESOLVED: - return true - case IncidentUpdateDtoOldStatusTRIGGERED: - return true - case IncidentUpdateDtoOldStatusWATCHING: + case JsonPathAssertionTypeJsonPath: return true default: return false } } -// Defines values for IntegrationDtoTierAvailability. +// Defines values for MatchRuleType. const ( - IntegrationDtoTierAvailabilityBUSINESS IntegrationDtoTierAvailability = "BUSINESS" - IntegrationDtoTierAvailabilityENTERPRISE IntegrationDtoTierAvailability = "ENTERPRISE" - IntegrationDtoTierAvailabilityFREE IntegrationDtoTierAvailability = "FREE" - IntegrationDtoTierAvailabilityPRO IntegrationDtoTierAvailability = "PRO" - IntegrationDtoTierAvailabilitySTARTER IntegrationDtoTierAvailability = "STARTER" - IntegrationDtoTierAvailabilityTEAM IntegrationDtoTierAvailability = "TEAM" + MatchRuleTypeComponentNameIn MatchRuleType = "component_name_in" + MatchRuleTypeIncidentStatus MatchRuleType = "incident_status" + MatchRuleTypeMonitorIdIn MatchRuleType = "monitor_id_in" + MatchRuleTypeMonitorTagIn MatchRuleType = "monitor_tag_in" + MatchRuleTypeMonitorTypeIn MatchRuleType = "monitor_type_in" + MatchRuleTypeRegionIn MatchRuleType = "region_in" + MatchRuleTypeResourceGroupIdIn MatchRuleType = "resource_group_id_in" + MatchRuleTypeServiceIdIn MatchRuleType = "service_id_in" + MatchRuleTypeSeverityGte MatchRuleType = "severity_gte" ) -// Valid indicates whether the value is a known member of the IntegrationDtoTierAvailability enum. -func (e IntegrationDtoTierAvailability) Valid() bool { +// Valid indicates whether the value is a known member of the MatchRuleType enum. +func (e MatchRuleType) Valid() bool { switch e { - case IntegrationDtoTierAvailabilityBUSINESS: + case MatchRuleTypeComponentNameIn: + return true + case MatchRuleTypeIncidentStatus: + return true + case MatchRuleTypeMonitorIdIn: + return true + case MatchRuleTypeMonitorTagIn: return true - case IntegrationDtoTierAvailabilityENTERPRISE: + case MatchRuleTypeMonitorTypeIn: return true - case IntegrationDtoTierAvailabilityFREE: + case MatchRuleTypeRegionIn: return true - case IntegrationDtoTierAvailabilityPRO: + case MatchRuleTypeResourceGroupIdIn: return true - case IntegrationDtoTierAvailabilitySTARTER: + case MatchRuleTypeServiceIdIn: return true - case IntegrationDtoTierAvailabilityTEAM: + case MatchRuleTypeSeverityGte: return true default: return false } } -// Defines values for InviteDtoRoleOffered. +// Defines values for McpConnectsAssertionType. const ( - InviteDtoRoleOfferedADMIN InviteDtoRoleOffered = "ADMIN" - InviteDtoRoleOfferedMEMBER InviteDtoRoleOffered = "MEMBER" - InviteDtoRoleOfferedOWNER InviteDtoRoleOffered = "OWNER" + McpConnectsAssertionTypeMcpConnects McpConnectsAssertionType = "mcp_connects" ) -// Valid indicates whether the value is a known member of the InviteDtoRoleOffered enum. -func (e InviteDtoRoleOffered) Valid() bool { +// Valid indicates whether the value is a known member of the McpConnectsAssertionType enum. +func (e McpConnectsAssertionType) Valid() bool { switch e { - case InviteDtoRoleOfferedADMIN: - return true - case InviteDtoRoleOfferedMEMBER: - return true - case InviteDtoRoleOfferedOWNER: + case McpConnectsAssertionTypeMcpConnects: return true default: return false } } -// Defines values for JsonPathAssertionOperator. +// Defines values for McpHasCapabilityAssertionType. const ( - JsonPathAssertionOperatorContains JsonPathAssertionOperator = "contains" - JsonPathAssertionOperatorEquals JsonPathAssertionOperator = "equals" - JsonPathAssertionOperatorGreaterThan JsonPathAssertionOperator = "greater_than" - JsonPathAssertionOperatorLessThan JsonPathAssertionOperator = "less_than" - JsonPathAssertionOperatorMatches JsonPathAssertionOperator = "matches" - JsonPathAssertionOperatorRange JsonPathAssertionOperator = "range" + McpHasCapabilityAssertionTypeMcpHasCapability McpHasCapabilityAssertionType = "mcp_has_capability" ) -// Valid indicates whether the value is a known member of the JsonPathAssertionOperator enum. -func (e JsonPathAssertionOperator) Valid() bool { +// Valid indicates whether the value is a known member of the McpHasCapabilityAssertionType enum. +func (e McpHasCapabilityAssertionType) Valid() bool { switch e { - case JsonPathAssertionOperatorContains: - return true - case JsonPathAssertionOperatorEquals: - return true - case JsonPathAssertionOperatorGreaterThan: - return true - case JsonPathAssertionOperatorLessThan: - return true - case JsonPathAssertionOperatorMatches: - return true - case JsonPathAssertionOperatorRange: + case McpHasCapabilityAssertionTypeMcpHasCapability: return true default: return false } } -// Defines values for JsonPathAssertionType. +// Defines values for McpMinToolsAssertionType. const ( - JsonPath JsonPathAssertionType = "json_path" + McpMinToolsAssertionTypeMcpMinTools McpMinToolsAssertionType = "mcp_min_tools" ) -// Valid indicates whether the value is a known member of the JsonPathAssertionType enum. -func (e JsonPathAssertionType) Valid() bool { +// Valid indicates whether the value is a known member of the McpMinToolsAssertionType enum. +func (e McpMinToolsAssertionType) Valid() bool { switch e { - case JsonPath: + case McpMinToolsAssertionTypeMcpMinTools: return true default: return false } } -// Defines values for LinkedStatusPageIncidentDtoImpact. +// Defines values for McpProtocolVersionAssertionType. const ( - LinkedStatusPageIncidentDtoImpactCRITICAL LinkedStatusPageIncidentDtoImpact = "CRITICAL" - LinkedStatusPageIncidentDtoImpactMAJOR LinkedStatusPageIncidentDtoImpact = "MAJOR" - LinkedStatusPageIncidentDtoImpactMINOR LinkedStatusPageIncidentDtoImpact = "MINOR" - LinkedStatusPageIncidentDtoImpactNONE LinkedStatusPageIncidentDtoImpact = "NONE" + McpProtocolVersionAssertionTypeMcpProtocolVersion McpProtocolVersionAssertionType = "mcp_protocol_version" ) -// Valid indicates whether the value is a known member of the LinkedStatusPageIncidentDtoImpact enum. -func (e LinkedStatusPageIncidentDtoImpact) Valid() bool { +// Valid indicates whether the value is a known member of the McpProtocolVersionAssertionType enum. +func (e McpProtocolVersionAssertionType) Valid() bool { switch e { - case LinkedStatusPageIncidentDtoImpactCRITICAL: - return true - case LinkedStatusPageIncidentDtoImpactMAJOR: - return true - case LinkedStatusPageIncidentDtoImpactMINOR: - return true - case LinkedStatusPageIncidentDtoImpactNONE: - return true - default: - return false - } -} - -// Defines values for LinkedStatusPageIncidentDtoStatus. -const ( - LinkedStatusPageIncidentDtoStatusIDENTIFIED LinkedStatusPageIncidentDtoStatus = "IDENTIFIED" - LinkedStatusPageIncidentDtoStatusINVESTIGATING LinkedStatusPageIncidentDtoStatus = "INVESTIGATING" - LinkedStatusPageIncidentDtoStatusMONITORING LinkedStatusPageIncidentDtoStatus = "MONITORING" - LinkedStatusPageIncidentDtoStatusRESOLVED LinkedStatusPageIncidentDtoStatus = "RESOLVED" -) - -// Valid indicates whether the value is a known member of the LinkedStatusPageIncidentDtoStatus enum. -func (e LinkedStatusPageIncidentDtoStatus) Valid() bool { - switch e { - case LinkedStatusPageIncidentDtoStatusIDENTIFIED: - return true - case LinkedStatusPageIncidentDtoStatusINVESTIGATING: - return true - case LinkedStatusPageIncidentDtoStatusMONITORING: - return true - case LinkedStatusPageIncidentDtoStatusRESOLVED: - return true - default: - return false - } -} - -// Defines values for MatchRuleType. -const ( - ComponentNameIn MatchRuleType = "component_name_in" - IncidentStatus MatchRuleType = "incident_status" - MonitorIdIn MatchRuleType = "monitor_id_in" - MonitorTagIn MatchRuleType = "monitor_tag_in" - MonitorTypeIn MatchRuleType = "monitor_type_in" - RegionIn MatchRuleType = "region_in" - ResourceGroupIdIn MatchRuleType = "resource_group_id_in" - ServiceIdIn MatchRuleType = "service_id_in" - SeverityGte MatchRuleType = "severity_gte" -) - -// Valid indicates whether the value is a known member of the MatchRuleType enum. -func (e MatchRuleType) Valid() bool { - switch e { - case ComponentNameIn: - return true - case IncidentStatus: - return true - case MonitorIdIn: - return true - case MonitorTagIn: - return true - case MonitorTypeIn: - return true - case RegionIn: - return true - case ResourceGroupIdIn: - return true - case ServiceIdIn: - return true - case SeverityGte: - return true - default: - return false - } -} - -// Defines values for McpConnectsAssertionType. -const ( - McpConnects McpConnectsAssertionType = "mcp_connects" -) - -// Valid indicates whether the value is a known member of the McpConnectsAssertionType enum. -func (e McpConnectsAssertionType) Valid() bool { - switch e { - case McpConnects: - return true - default: - return false - } -} - -// Defines values for McpHasCapabilityAssertionType. -const ( - McpHasCapability McpHasCapabilityAssertionType = "mcp_has_capability" -) - -// Valid indicates whether the value is a known member of the McpHasCapabilityAssertionType enum. -func (e McpHasCapabilityAssertionType) Valid() bool { - switch e { - case McpHasCapability: - return true - default: - return false - } -} - -// Defines values for McpMinToolsAssertionType. -const ( - McpMinTools McpMinToolsAssertionType = "mcp_min_tools" -) - -// Valid indicates whether the value is a known member of the McpMinToolsAssertionType enum. -func (e McpMinToolsAssertionType) Valid() bool { - switch e { - case McpMinTools: - return true - default: - return false - } -} - -// Defines values for McpProtocolVersionAssertionType. -const ( - McpProtocolVersion McpProtocolVersionAssertionType = "mcp_protocol_version" -) - -// Valid indicates whether the value is a known member of the McpProtocolVersionAssertionType enum. -func (e McpProtocolVersionAssertionType) Valid() bool { - switch e { - case McpProtocolVersion: + case McpProtocolVersionAssertionTypeMcpProtocolVersion: return true default: return false @@ -1929,13 +1389,13 @@ func (e McpProtocolVersionAssertionType) Valid() bool { // Defines values for McpResponseTimeAssertionType. const ( - McpResponseTime McpResponseTimeAssertionType = "mcp_response_time" + McpResponseTimeAssertionTypeMcpResponseTime McpResponseTimeAssertionType = "mcp_response_time" ) // Valid indicates whether the value is a known member of the McpResponseTimeAssertionType enum. func (e McpResponseTimeAssertionType) Valid() bool { switch e { - case McpResponseTime: + case McpResponseTimeAssertionTypeMcpResponseTime: return true default: return false @@ -1944,13 +1404,13 @@ func (e McpResponseTimeAssertionType) Valid() bool { // Defines values for McpResponseTimeWarnAssertionType. const ( - McpResponseTimeWarn McpResponseTimeWarnAssertionType = "mcp_response_time_warn" + McpResponseTimeWarnAssertionTypeMcpResponseTimeWarn McpResponseTimeWarnAssertionType = "mcp_response_time_warn" ) // Valid indicates whether the value is a known member of the McpResponseTimeWarnAssertionType enum. func (e McpResponseTimeWarnAssertionType) Valid() bool { switch e { - case McpResponseTimeWarn: + case McpResponseTimeWarnAssertionTypeMcpResponseTimeWarn: return true default: return false @@ -1974,13 +1434,13 @@ func (e McpServerCheckType) Valid() bool { // Defines values for McpToolAvailableAssertionType. const ( - McpToolAvailable McpToolAvailableAssertionType = "mcp_tool_available" + McpToolAvailableAssertionTypeMcpToolAvailable McpToolAvailableAssertionType = "mcp_tool_available" ) // Valid indicates whether the value is a known member of the McpToolAvailableAssertionType enum. func (e McpToolAvailableAssertionType) Valid() bool { switch e { - case McpToolAvailable: + case McpToolAvailableAssertionTypeMcpToolAvailable: return true default: return false @@ -1989,64 +1449,13 @@ func (e McpToolAvailableAssertionType) Valid() bool { // Defines values for McpToolCountChangedAssertionType. const ( - McpToolCountChanged McpToolCountChangedAssertionType = "mcp_tool_count_changed" + McpToolCountChangedAssertionTypeMcpToolCountChanged McpToolCountChangedAssertionType = "mcp_tool_count_changed" ) // Valid indicates whether the value is a known member of the McpToolCountChangedAssertionType enum. func (e McpToolCountChangedAssertionType) Valid() bool { switch e { - case McpToolCountChanged: - return true - default: - return false - } -} - -// Defines values for MemberDtoOrgRole. -const ( - MemberDtoOrgRoleADMIN MemberDtoOrgRole = "ADMIN" - MemberDtoOrgRoleMEMBER MemberDtoOrgRole = "MEMBER" - MemberDtoOrgRoleOWNER MemberDtoOrgRole = "OWNER" -) - -// Valid indicates whether the value is a known member of the MemberDtoOrgRole enum. -func (e MemberDtoOrgRole) Valid() bool { - switch e { - case MemberDtoOrgRoleADMIN: - return true - case MemberDtoOrgRoleMEMBER: - return true - case MemberDtoOrgRoleOWNER: - return true - default: - return false - } -} - -// Defines values for MemberDtoStatus. -const ( - MemberDtoStatusACTIVE MemberDtoStatus = "ACTIVE" - MemberDtoStatusDECLINED MemberDtoStatus = "DECLINED" - MemberDtoStatusINVITED MemberDtoStatus = "INVITED" - MemberDtoStatusLEFT MemberDtoStatus = "LEFT" - MemberDtoStatusREMOVED MemberDtoStatus = "REMOVED" - MemberDtoStatusSUSPENDED MemberDtoStatus = "SUSPENDED" -) - -// Valid indicates whether the value is a known member of the MemberDtoStatus enum. -func (e MemberDtoStatus) Valid() bool { - switch e { - case MemberDtoStatusACTIVE: - return true - case MemberDtoStatusDECLINED: - return true - case MemberDtoStatusINVITED: - return true - case MemberDtoStatusLEFT: - return true - case MemberDtoStatusREMOVED: - return true - case MemberDtoStatusSUSPENDED: + case McpToolCountChangedAssertionTypeMcpToolCountChanged: return true default: return false @@ -2055,13 +1464,13 @@ func (e MemberDtoStatus) Valid() bool { // Defines values for MemberRoleChangedMetadataKind. const ( - MemberRoleChanged MemberRoleChangedMetadataKind = "member_role_changed" + MemberRoleChangedMetadataKindMemberRoleChanged MemberRoleChangedMetadataKind = "member_role_changed" ) // Valid indicates whether the value is a known member of the MemberRoleChangedMetadataKind enum. func (e MemberRoleChangedMetadataKind) Valid() bool { switch e { - case MemberRoleChanged: + case MemberRoleChangedMetadataKindMemberRoleChanged: return true default: return false @@ -2093,1181 +1502,368 @@ func (e MemberRoleChangedMetadataNewRole) Valid() bool { const ( MemberRoleChangedMetadataOldRoleADMIN MemberRoleChangedMetadataOldRole = "ADMIN" MemberRoleChangedMetadataOldRoleMEMBER MemberRoleChangedMetadataOldRole = "MEMBER" - MemberRoleChangedMetadataOldRoleOWNER MemberRoleChangedMetadataOldRole = "OWNER" -) - -// Valid indicates whether the value is a known member of the MemberRoleChangedMetadataOldRole enum. -func (e MemberRoleChangedMetadataOldRole) Valid() bool { - switch e { - case MemberRoleChangedMetadataOldRoleADMIN: - return true - case MemberRoleChangedMetadataOldRoleMEMBER: - return true - case MemberRoleChangedMetadataOldRoleOWNER: - return true - default: - return false - } -} - -// Defines values for MonitorAssertionDtoAssertionType. -const ( - MonitorAssertionDtoAssertionTypeBodyContains MonitorAssertionDtoAssertionType = "body_contains" - MonitorAssertionDtoAssertionTypeDnsExpectedCname MonitorAssertionDtoAssertionType = "dns_expected_cname" - MonitorAssertionDtoAssertionTypeDnsExpectedIps MonitorAssertionDtoAssertionType = "dns_expected_ips" - MonitorAssertionDtoAssertionTypeDnsMaxAnswers MonitorAssertionDtoAssertionType = "dns_max_answers" - MonitorAssertionDtoAssertionTypeDnsMinAnswers MonitorAssertionDtoAssertionType = "dns_min_answers" - MonitorAssertionDtoAssertionTypeDnsRecordContains MonitorAssertionDtoAssertionType = "dns_record_contains" - MonitorAssertionDtoAssertionTypeDnsRecordEquals MonitorAssertionDtoAssertionType = "dns_record_equals" - MonitorAssertionDtoAssertionTypeDnsResolves MonitorAssertionDtoAssertionType = "dns_resolves" - MonitorAssertionDtoAssertionTypeDnsResponseTime MonitorAssertionDtoAssertionType = "dns_response_time" - MonitorAssertionDtoAssertionTypeDnsResponseTimeWarn MonitorAssertionDtoAssertionType = "dns_response_time_warn" - MonitorAssertionDtoAssertionTypeDnsTtlHigh MonitorAssertionDtoAssertionType = "dns_ttl_high" - MonitorAssertionDtoAssertionTypeDnsTtlLow MonitorAssertionDtoAssertionType = "dns_ttl_low" - MonitorAssertionDtoAssertionTypeDnsTxtContains MonitorAssertionDtoAssertionType = "dns_txt_contains" - MonitorAssertionDtoAssertionTypeHeaderValue MonitorAssertionDtoAssertionType = "header_value" - MonitorAssertionDtoAssertionTypeHeartbeatIntervalDrift MonitorAssertionDtoAssertionType = "heartbeat_interval_drift" - MonitorAssertionDtoAssertionTypeHeartbeatMaxInterval MonitorAssertionDtoAssertionType = "heartbeat_max_interval" - MonitorAssertionDtoAssertionTypeHeartbeatPayloadContains MonitorAssertionDtoAssertionType = "heartbeat_payload_contains" - MonitorAssertionDtoAssertionTypeHeartbeatReceived MonitorAssertionDtoAssertionType = "heartbeat_received" - MonitorAssertionDtoAssertionTypeIcmpPacketLoss MonitorAssertionDtoAssertionType = "icmp_packet_loss" - MonitorAssertionDtoAssertionTypeIcmpReachable MonitorAssertionDtoAssertionType = "icmp_reachable" - MonitorAssertionDtoAssertionTypeIcmpResponseTime MonitorAssertionDtoAssertionType = "icmp_response_time" - MonitorAssertionDtoAssertionTypeIcmpResponseTimeWarn MonitorAssertionDtoAssertionType = "icmp_response_time_warn" - MonitorAssertionDtoAssertionTypeJsonPath MonitorAssertionDtoAssertionType = "json_path" - MonitorAssertionDtoAssertionTypeMcpConnects MonitorAssertionDtoAssertionType = "mcp_connects" - MonitorAssertionDtoAssertionTypeMcpHasCapability MonitorAssertionDtoAssertionType = "mcp_has_capability" - MonitorAssertionDtoAssertionTypeMcpMinTools MonitorAssertionDtoAssertionType = "mcp_min_tools" - MonitorAssertionDtoAssertionTypeMcpProtocolVersion MonitorAssertionDtoAssertionType = "mcp_protocol_version" - MonitorAssertionDtoAssertionTypeMcpResponseTime MonitorAssertionDtoAssertionType = "mcp_response_time" - MonitorAssertionDtoAssertionTypeMcpResponseTimeWarn MonitorAssertionDtoAssertionType = "mcp_response_time_warn" - MonitorAssertionDtoAssertionTypeMcpToolAvailable MonitorAssertionDtoAssertionType = "mcp_tool_available" - MonitorAssertionDtoAssertionTypeMcpToolCountChanged MonitorAssertionDtoAssertionType = "mcp_tool_count_changed" - MonitorAssertionDtoAssertionTypeRedirectCount MonitorAssertionDtoAssertionType = "redirect_count" - MonitorAssertionDtoAssertionTypeRedirectTarget MonitorAssertionDtoAssertionType = "redirect_target" - MonitorAssertionDtoAssertionTypeRegexBody MonitorAssertionDtoAssertionType = "regex_body" - MonitorAssertionDtoAssertionTypeResponseSize MonitorAssertionDtoAssertionType = "response_size" - MonitorAssertionDtoAssertionTypeResponseTime MonitorAssertionDtoAssertionType = "response_time" - MonitorAssertionDtoAssertionTypeResponseTimeWarn MonitorAssertionDtoAssertionType = "response_time_warn" - MonitorAssertionDtoAssertionTypeSslExpiry MonitorAssertionDtoAssertionType = "ssl_expiry" - MonitorAssertionDtoAssertionTypeStatusCode MonitorAssertionDtoAssertionType = "status_code" - MonitorAssertionDtoAssertionTypeTcpConnects MonitorAssertionDtoAssertionType = "tcp_connects" - MonitorAssertionDtoAssertionTypeTcpResponseTime MonitorAssertionDtoAssertionType = "tcp_response_time" - MonitorAssertionDtoAssertionTypeTcpResponseTimeWarn MonitorAssertionDtoAssertionType = "tcp_response_time_warn" -) - -// Valid indicates whether the value is a known member of the MonitorAssertionDtoAssertionType enum. -func (e MonitorAssertionDtoAssertionType) Valid() bool { - switch e { - case MonitorAssertionDtoAssertionTypeBodyContains: - return true - case MonitorAssertionDtoAssertionTypeDnsExpectedCname: - return true - case MonitorAssertionDtoAssertionTypeDnsExpectedIps: - return true - case MonitorAssertionDtoAssertionTypeDnsMaxAnswers: - return true - case MonitorAssertionDtoAssertionTypeDnsMinAnswers: - return true - case MonitorAssertionDtoAssertionTypeDnsRecordContains: - return true - case MonitorAssertionDtoAssertionTypeDnsRecordEquals: - return true - case MonitorAssertionDtoAssertionTypeDnsResolves: - return true - case MonitorAssertionDtoAssertionTypeDnsResponseTime: - return true - case MonitorAssertionDtoAssertionTypeDnsResponseTimeWarn: - return true - case MonitorAssertionDtoAssertionTypeDnsTtlHigh: - return true - case MonitorAssertionDtoAssertionTypeDnsTtlLow: - return true - case MonitorAssertionDtoAssertionTypeDnsTxtContains: - return true - case MonitorAssertionDtoAssertionTypeHeaderValue: - return true - case MonitorAssertionDtoAssertionTypeHeartbeatIntervalDrift: - return true - case MonitorAssertionDtoAssertionTypeHeartbeatMaxInterval: - return true - case MonitorAssertionDtoAssertionTypeHeartbeatPayloadContains: - return true - case MonitorAssertionDtoAssertionTypeHeartbeatReceived: - return true - case MonitorAssertionDtoAssertionTypeIcmpPacketLoss: - return true - case MonitorAssertionDtoAssertionTypeIcmpReachable: - return true - case MonitorAssertionDtoAssertionTypeIcmpResponseTime: - return true - case MonitorAssertionDtoAssertionTypeIcmpResponseTimeWarn: - return true - case MonitorAssertionDtoAssertionTypeJsonPath: - return true - case MonitorAssertionDtoAssertionTypeMcpConnects: - return true - case MonitorAssertionDtoAssertionTypeMcpHasCapability: - return true - case MonitorAssertionDtoAssertionTypeMcpMinTools: - return true - case MonitorAssertionDtoAssertionTypeMcpProtocolVersion: - return true - case MonitorAssertionDtoAssertionTypeMcpResponseTime: - return true - case MonitorAssertionDtoAssertionTypeMcpResponseTimeWarn: - return true - case MonitorAssertionDtoAssertionTypeMcpToolAvailable: - return true - case MonitorAssertionDtoAssertionTypeMcpToolCountChanged: - return true - case MonitorAssertionDtoAssertionTypeRedirectCount: - return true - case MonitorAssertionDtoAssertionTypeRedirectTarget: - return true - case MonitorAssertionDtoAssertionTypeRegexBody: - return true - case MonitorAssertionDtoAssertionTypeResponseSize: - return true - case MonitorAssertionDtoAssertionTypeResponseTime: - return true - case MonitorAssertionDtoAssertionTypeResponseTimeWarn: - return true - case MonitorAssertionDtoAssertionTypeSslExpiry: - return true - case MonitorAssertionDtoAssertionTypeStatusCode: - return true - case MonitorAssertionDtoAssertionTypeTcpConnects: - return true - case MonitorAssertionDtoAssertionTypeTcpResponseTime: - return true - case MonitorAssertionDtoAssertionTypeTcpResponseTimeWarn: - return true - default: - return false - } -} - -// Defines values for MonitorAssertionDtoSeverity. -const ( - MonitorAssertionDtoSeverityFail MonitorAssertionDtoSeverity = "fail" - MonitorAssertionDtoSeverityWarn MonitorAssertionDtoSeverity = "warn" -) - -// Valid indicates whether the value is a known member of the MonitorAssertionDtoSeverity enum. -func (e MonitorAssertionDtoSeverity) Valid() bool { - switch e { - case MonitorAssertionDtoSeverityFail: - return true - case MonitorAssertionDtoSeverityWarn: - return true - default: - return false - } -} - -// Defines values for MonitorAuthDtoAuthType. -const ( - MonitorAuthDtoAuthTypeApiKey MonitorAuthDtoAuthType = "api_key" - MonitorAuthDtoAuthTypeBasic MonitorAuthDtoAuthType = "basic" - MonitorAuthDtoAuthTypeBearer MonitorAuthDtoAuthType = "bearer" - MonitorAuthDtoAuthTypeHeader MonitorAuthDtoAuthType = "header" -) - -// Valid indicates whether the value is a known member of the MonitorAuthDtoAuthType enum. -func (e MonitorAuthDtoAuthType) Valid() bool { - switch e { - case MonitorAuthDtoAuthTypeApiKey: - return true - case MonitorAuthDtoAuthTypeBasic: - return true - case MonitorAuthDtoAuthTypeBearer: - return true - case MonitorAuthDtoAuthTypeHeader: - return true - default: - return false - } -} - -// Defines values for MonitorDtoCurrentStatus. -const ( - MonitorDtoCurrentStatusDegraded MonitorDtoCurrentStatus = "degraded" - MonitorDtoCurrentStatusDown MonitorDtoCurrentStatus = "down" - MonitorDtoCurrentStatusPaused MonitorDtoCurrentStatus = "paused" - MonitorDtoCurrentStatusUnknown MonitorDtoCurrentStatus = "unknown" - MonitorDtoCurrentStatusUp MonitorDtoCurrentStatus = "up" -) - -// Valid indicates whether the value is a known member of the MonitorDtoCurrentStatus enum. -func (e MonitorDtoCurrentStatus) Valid() bool { - switch e { - case MonitorDtoCurrentStatusDegraded: - return true - case MonitorDtoCurrentStatusDown: - return true - case MonitorDtoCurrentStatusPaused: - return true - case MonitorDtoCurrentStatusUnknown: - return true - case MonitorDtoCurrentStatusUp: - return true - default: - return false - } -} - -// Defines values for MonitorDtoManagedBy. -const ( - MonitorDtoManagedByAPI MonitorDtoManagedBy = "API" - MonitorDtoManagedByCLI MonitorDtoManagedBy = "CLI" - MonitorDtoManagedByDASHBOARD MonitorDtoManagedBy = "DASHBOARD" - MonitorDtoManagedByMCP MonitorDtoManagedBy = "MCP" - MonitorDtoManagedByTERRAFORM MonitorDtoManagedBy = "TERRAFORM" -) - -// Valid indicates whether the value is a known member of the MonitorDtoManagedBy enum. -func (e MonitorDtoManagedBy) Valid() bool { - switch e { - case MonitorDtoManagedByAPI: - return true - case MonitorDtoManagedByCLI: - return true - case MonitorDtoManagedByDASHBOARD: - return true - case MonitorDtoManagedByMCP: - return true - case MonitorDtoManagedByTERRAFORM: - return true - default: - return false - } -} - -// Defines values for MonitorDtoType. -const ( - MonitorDtoTypeDNS MonitorDtoType = "DNS" - MonitorDtoTypeHEARTBEAT MonitorDtoType = "HEARTBEAT" - MonitorDtoTypeHTTP MonitorDtoType = "HTTP" - MonitorDtoTypeICMP MonitorDtoType = "ICMP" - MonitorDtoTypeMCPSERVER MonitorDtoType = "MCP_SERVER" - MonitorDtoTypeTCP MonitorDtoType = "TCP" -) - -// Valid indicates whether the value is a known member of the MonitorDtoType enum. -func (e MonitorDtoType) Valid() bool { - switch e { - case MonitorDtoTypeDNS: - return true - case MonitorDtoTypeHEARTBEAT: - return true - case MonitorDtoTypeHTTP: - return true - case MonitorDtoTypeICMP: - return true - case MonitorDtoTypeMCPSERVER: - return true - case MonitorDtoTypeTCP: - return true - default: - return false - } -} - -// Defines values for MonitorTestRequestType. -const ( - MonitorTestRequestTypeDNS MonitorTestRequestType = "DNS" - MonitorTestRequestTypeHEARTBEAT MonitorTestRequestType = "HEARTBEAT" - MonitorTestRequestTypeHTTP MonitorTestRequestType = "HTTP" - MonitorTestRequestTypeICMP MonitorTestRequestType = "ICMP" - MonitorTestRequestTypeMCPSERVER MonitorTestRequestType = "MCP_SERVER" - MonitorTestRequestTypeTCP MonitorTestRequestType = "TCP" -) - -// Valid indicates whether the value is a known member of the MonitorTestRequestType enum. -func (e MonitorTestRequestType) Valid() bool { - switch e { - case MonitorTestRequestTypeDNS: - return true - case MonitorTestRequestTypeHEARTBEAT: - return true - case MonitorTestRequestTypeHTTP: - return true - case MonitorTestRequestTypeICMP: - return true - case MonitorTestRequestTypeMCPSERVER: - return true - case MonitorTestRequestTypeTCP: - return true - default: - return false - } -} - -// Defines values for MonitorVersionDtoChangedVia. -const ( - MonitorVersionDtoChangedViaAPI MonitorVersionDtoChangedVia = "API" - MonitorVersionDtoChangedViaCLI MonitorVersionDtoChangedVia = "CLI" - MonitorVersionDtoChangedViaDASHBOARD MonitorVersionDtoChangedVia = "DASHBOARD" - MonitorVersionDtoChangedViaTERRAFORM MonitorVersionDtoChangedVia = "TERRAFORM" -) - -// Valid indicates whether the value is a known member of the MonitorVersionDtoChangedVia enum. -func (e MonitorVersionDtoChangedVia) Valid() bool { - switch e { - case MonitorVersionDtoChangedViaAPI: - return true - case MonitorVersionDtoChangedViaCLI: - return true - case MonitorVersionDtoChangedViaDASHBOARD: - return true - case MonitorVersionDtoChangedViaTERRAFORM: - return true - default: - return false - } -} - -// Defines values for NotificationDispatchDtoCompletionReason. -const ( - NotificationDispatchDtoCompletionReasonEXHAUSTED NotificationDispatchDtoCompletionReason = "EXHAUSTED" - NotificationDispatchDtoCompletionReasonNOSTEPS NotificationDispatchDtoCompletionReason = "NO_STEPS" - NotificationDispatchDtoCompletionReasonRESOLVED NotificationDispatchDtoCompletionReason = "RESOLVED" -) - -// Valid indicates whether the value is a known member of the NotificationDispatchDtoCompletionReason enum. -func (e NotificationDispatchDtoCompletionReason) Valid() bool { - switch e { - case NotificationDispatchDtoCompletionReasonEXHAUSTED: - return true - case NotificationDispatchDtoCompletionReasonNOSTEPS: - return true - case NotificationDispatchDtoCompletionReasonRESOLVED: - return true - default: - return false - } -} - -// Defines values for NotificationDispatchDtoStatus. -const ( - NotificationDispatchDtoStatusACKNOWLEDGED NotificationDispatchDtoStatus = "ACKNOWLEDGED" - NotificationDispatchDtoStatusCOMPLETED NotificationDispatchDtoStatus = "COMPLETED" - NotificationDispatchDtoStatusDELIVERED NotificationDispatchDtoStatus = "DELIVERED" - NotificationDispatchDtoStatusDISPATCHING NotificationDispatchDtoStatus = "DISPATCHING" - NotificationDispatchDtoStatusESCALATING NotificationDispatchDtoStatus = "ESCALATING" - NotificationDispatchDtoStatusPENDING NotificationDispatchDtoStatus = "PENDING" -) - -// Valid indicates whether the value is a known member of the NotificationDispatchDtoStatus enum. -func (e NotificationDispatchDtoStatus) Valid() bool { - switch e { - case NotificationDispatchDtoStatusACKNOWLEDGED: - return true - case NotificationDispatchDtoStatusCOMPLETED: - return true - case NotificationDispatchDtoStatusDELIVERED: - return true - case NotificationDispatchDtoStatusDISPATCHING: - return true - case NotificationDispatchDtoStatusESCALATING: - return true - case NotificationDispatchDtoStatusPENDING: - return true - default: - return false - } -} - -// Defines values for OpsGenieChannelConfigChannelType. -const ( - Opsgenie OpsGenieChannelConfigChannelType = "opsgenie" -) - -// Valid indicates whether the value is a known member of the OpsGenieChannelConfigChannelType enum. -func (e OpsGenieChannelConfigChannelType) Valid() bool { - switch e { - case Opsgenie: - return true - default: - return false - } -} - -// Defines values for PagerDutyChannelConfigChannelType. -const ( - Pagerduty PagerDutyChannelConfigChannelType = "pagerduty" -) - -// Valid indicates whether the value is a known member of the PagerDutyChannelConfigChannelType enum. -func (e PagerDutyChannelConfigChannelType) Valid() bool { - switch e { - case Pagerduty: - return true - default: - return false - } -} - -// Defines values for PlanInfoTier. -const ( - PlanInfoTierBUSINESS PlanInfoTier = "BUSINESS" - PlanInfoTierENTERPRISE PlanInfoTier = "ENTERPRISE" - PlanInfoTierFREE PlanInfoTier = "FREE" - PlanInfoTierPRO PlanInfoTier = "PRO" - PlanInfoTierSTARTER PlanInfoTier = "STARTER" - PlanInfoTierTEAM PlanInfoTier = "TEAM" -) - -// Valid indicates whether the value is a known member of the PlanInfoTier enum. -func (e PlanInfoTier) Valid() bool { - switch e { - case PlanInfoTierBUSINESS: - return true - case PlanInfoTierENTERPRISE: - return true - case PlanInfoTierFREE: - return true - case PlanInfoTierPRO: - return true - case PlanInfoTierSTARTER: - return true - case PlanInfoTierTEAM: - return true - default: - return false - } -} - -// Defines values for PublishStatusPageIncidentRequestImpact. -const ( - PublishStatusPageIncidentRequestImpactCRITICAL PublishStatusPageIncidentRequestImpact = "CRITICAL" - PublishStatusPageIncidentRequestImpactMAJOR PublishStatusPageIncidentRequestImpact = "MAJOR" - PublishStatusPageIncidentRequestImpactMINOR PublishStatusPageIncidentRequestImpact = "MINOR" - PublishStatusPageIncidentRequestImpactNONE PublishStatusPageIncidentRequestImpact = "NONE" -) - -// Valid indicates whether the value is a known member of the PublishStatusPageIncidentRequestImpact enum. -func (e PublishStatusPageIncidentRequestImpact) Valid() bool { - switch e { - case PublishStatusPageIncidentRequestImpactCRITICAL: - return true - case PublishStatusPageIncidentRequestImpactMAJOR: - return true - case PublishStatusPageIncidentRequestImpactMINOR: - return true - case PublishStatusPageIncidentRequestImpactNONE: - return true - default: - return false - } -} - -// Defines values for PublishStatusPageIncidentRequestStatus. -const ( - PublishStatusPageIncidentRequestStatusIDENTIFIED PublishStatusPageIncidentRequestStatus = "IDENTIFIED" - PublishStatusPageIncidentRequestStatusINVESTIGATING PublishStatusPageIncidentRequestStatus = "INVESTIGATING" - PublishStatusPageIncidentRequestStatusMONITORING PublishStatusPageIncidentRequestStatus = "MONITORING" - PublishStatusPageIncidentRequestStatusRESOLVED PublishStatusPageIncidentRequestStatus = "RESOLVED" -) - -// Valid indicates whether the value is a known member of the PublishStatusPageIncidentRequestStatus enum. -func (e PublishStatusPageIncidentRequestStatus) Valid() bool { - switch e { - case PublishStatusPageIncidentRequestStatusIDENTIFIED: - return true - case PublishStatusPageIncidentRequestStatusINVESTIGATING: - return true - case PublishStatusPageIncidentRequestStatusMONITORING: - return true - case PublishStatusPageIncidentRequestStatusRESOLVED: - return true - default: - return false - } -} - -// Defines values for RedirectCountAssertionType. -const ( - RedirectCount RedirectCountAssertionType = "redirect_count" -) - -// Valid indicates whether the value is a known member of the RedirectCountAssertionType enum. -func (e RedirectCountAssertionType) Valid() bool { - switch e { - case RedirectCount: - return true - default: - return false - } -} - -// Defines values for RedirectTargetAssertionOperator. -const ( - RedirectTargetAssertionOperatorContains RedirectTargetAssertionOperator = "contains" - RedirectTargetAssertionOperatorEquals RedirectTargetAssertionOperator = "equals" - RedirectTargetAssertionOperatorGreaterThan RedirectTargetAssertionOperator = "greater_than" - RedirectTargetAssertionOperatorLessThan RedirectTargetAssertionOperator = "less_than" - RedirectTargetAssertionOperatorMatches RedirectTargetAssertionOperator = "matches" - RedirectTargetAssertionOperatorRange RedirectTargetAssertionOperator = "range" -) - -// Valid indicates whether the value is a known member of the RedirectTargetAssertionOperator enum. -func (e RedirectTargetAssertionOperator) Valid() bool { - switch e { - case RedirectTargetAssertionOperatorContains: - return true - case RedirectTargetAssertionOperatorEquals: - return true - case RedirectTargetAssertionOperatorGreaterThan: - return true - case RedirectTargetAssertionOperatorLessThan: - return true - case RedirectTargetAssertionOperatorMatches: - return true - case RedirectTargetAssertionOperatorRange: - return true - default: - return false - } -} - -// Defines values for RedirectTargetAssertionType. -const ( - RedirectTarget RedirectTargetAssertionType = "redirect_target" -) - -// Valid indicates whether the value is a known member of the RedirectTargetAssertionType enum. -func (e RedirectTargetAssertionType) Valid() bool { - switch e { - case RedirectTarget: - return true - default: - return false - } -} - -// Defines values for RegexBodyAssertionType. -const ( - RegexBody RegexBodyAssertionType = "regex_body" -) - -// Valid indicates whether the value is a known member of the RegexBodyAssertionType enum. -func (e RegexBodyAssertionType) Valid() bool { - switch e { - case RegexBody: - return true - default: - return false - } -} - -// Defines values for ResourceGroupDtoHealthThresholdType. -const ( - ResourceGroupDtoHealthThresholdTypeCOUNT ResourceGroupDtoHealthThresholdType = "COUNT" - ResourceGroupDtoHealthThresholdTypePERCENTAGE ResourceGroupDtoHealthThresholdType = "PERCENTAGE" -) - -// Valid indicates whether the value is a known member of the ResourceGroupDtoHealthThresholdType enum. -func (e ResourceGroupDtoHealthThresholdType) Valid() bool { - switch e { - case ResourceGroupDtoHealthThresholdTypeCOUNT: - return true - case ResourceGroupDtoHealthThresholdTypePERCENTAGE: - return true - default: - return false - } -} - -// Defines values for ResourceGroupDtoManagedBy. -const ( - ResourceGroupDtoManagedByAPI ResourceGroupDtoManagedBy = "API" - ResourceGroupDtoManagedByCLI ResourceGroupDtoManagedBy = "CLI" - ResourceGroupDtoManagedByDASHBOARD ResourceGroupDtoManagedBy = "DASHBOARD" - ResourceGroupDtoManagedByMCP ResourceGroupDtoManagedBy = "MCP" - ResourceGroupDtoManagedByTERRAFORM ResourceGroupDtoManagedBy = "TERRAFORM" -) - -// Valid indicates whether the value is a known member of the ResourceGroupDtoManagedBy enum. -func (e ResourceGroupDtoManagedBy) Valid() bool { - switch e { - case ResourceGroupDtoManagedByAPI: - return true - case ResourceGroupDtoManagedByCLI: - return true - case ResourceGroupDtoManagedByDASHBOARD: - return true - case ResourceGroupDtoManagedByMCP: - return true - case ResourceGroupDtoManagedByTERRAFORM: - return true - default: - return false - } -} - -// Defines values for ResourceGroupHealthDtoStatus. -const ( - ResourceGroupHealthDtoStatusDegraded ResourceGroupHealthDtoStatus = "degraded" - ResourceGroupHealthDtoStatusDown ResourceGroupHealthDtoStatus = "down" - ResourceGroupHealthDtoStatusMaintenance ResourceGroupHealthDtoStatus = "maintenance" - ResourceGroupHealthDtoStatusOperational ResourceGroupHealthDtoStatus = "operational" -) - -// Valid indicates whether the value is a known member of the ResourceGroupHealthDtoStatus enum. -func (e ResourceGroupHealthDtoStatus) Valid() bool { - switch e { - case ResourceGroupHealthDtoStatusDegraded: - return true - case ResourceGroupHealthDtoStatusDown: - return true - case ResourceGroupHealthDtoStatusMaintenance: - return true - case ResourceGroupHealthDtoStatusOperational: - return true - default: - return false - } -} - -// Defines values for ResourceGroupHealthDtoThresholdStatus. -const ( - ResourceGroupHealthDtoThresholdStatusDegraded ResourceGroupHealthDtoThresholdStatus = "degraded" - ResourceGroupHealthDtoThresholdStatusDown ResourceGroupHealthDtoThresholdStatus = "down" - ResourceGroupHealthDtoThresholdStatusHealthy ResourceGroupHealthDtoThresholdStatus = "healthy" -) - -// Valid indicates whether the value is a known member of the ResourceGroupHealthDtoThresholdStatus enum. -func (e ResourceGroupHealthDtoThresholdStatus) Valid() bool { - switch e { - case ResourceGroupHealthDtoThresholdStatusDegraded: - return true - case ResourceGroupHealthDtoThresholdStatusDown: - return true - case ResourceGroupHealthDtoThresholdStatusHealthy: - return true - default: - return false - } -} - -// Defines values for ResourceGroupMemberDtoStatus. -const ( - ResourceGroupMemberDtoStatusDegraded ResourceGroupMemberDtoStatus = "degraded" - ResourceGroupMemberDtoStatusDown ResourceGroupMemberDtoStatus = "down" - ResourceGroupMemberDtoStatusMaintenance ResourceGroupMemberDtoStatus = "maintenance" - ResourceGroupMemberDtoStatusOperational ResourceGroupMemberDtoStatus = "operational" -) - -// Valid indicates whether the value is a known member of the ResourceGroupMemberDtoStatus enum. -func (e ResourceGroupMemberDtoStatus) Valid() bool { - switch e { - case ResourceGroupMemberDtoStatusDegraded: - return true - case ResourceGroupMemberDtoStatusDown: - return true - case ResourceGroupMemberDtoStatusMaintenance: - return true - case ResourceGroupMemberDtoStatusOperational: - return true - default: - return false - } -} - -// Defines values for ResponseSizeAssertionType. -const ( - ResponseSize ResponseSizeAssertionType = "response_size" -) - -// Valid indicates whether the value is a known member of the ResponseSizeAssertionType enum. -func (e ResponseSizeAssertionType) Valid() bool { - switch e { - case ResponseSize: - return true - default: - return false - } -} - -// Defines values for ResponseTimeAssertionType. -const ( - ResponseTimeAssertionTypeResponseTime ResponseTimeAssertionType = "response_time" -) - -// Valid indicates whether the value is a known member of the ResponseTimeAssertionType enum. -func (e ResponseTimeAssertionType) Valid() bool { - switch e { - case ResponseTimeAssertionTypeResponseTime: - return true - default: - return false - } -} - -// Defines values for ResponseTimeWarnAssertionType. -const ( - ResponseTimeWarn ResponseTimeWarnAssertionType = "response_time_warn" -) - -// Valid indicates whether the value is a known member of the ResponseTimeWarnAssertionType enum. -func (e ResponseTimeWarnAssertionType) Valid() bool { - switch e { - case ResponseTimeWarn: - return true - default: - return false - } -} - -// Defines values for ResultSummaryDtoCurrentStatus. -const ( - ResultSummaryDtoCurrentStatusDegraded ResultSummaryDtoCurrentStatus = "degraded" - ResultSummaryDtoCurrentStatusDown ResultSummaryDtoCurrentStatus = "down" - ResultSummaryDtoCurrentStatusPaused ResultSummaryDtoCurrentStatus = "paused" - ResultSummaryDtoCurrentStatusUnknown ResultSummaryDtoCurrentStatus = "unknown" - ResultSummaryDtoCurrentStatusUp ResultSummaryDtoCurrentStatus = "up" -) - -// Valid indicates whether the value is a known member of the ResultSummaryDtoCurrentStatus enum. -func (e ResultSummaryDtoCurrentStatus) Valid() bool { - switch e { - case ResultSummaryDtoCurrentStatusDegraded: - return true - case ResultSummaryDtoCurrentStatusDown: - return true - case ResultSummaryDtoCurrentStatusPaused: - return true - case ResultSummaryDtoCurrentStatusUnknown: - return true - case ResultSummaryDtoCurrentStatusUp: - return true - default: - return false - } -} - -// Defines values for ServiceSubscriptionDtoAlertSensitivity. -const ( - ALL ServiceSubscriptionDtoAlertSensitivity = "ALL" - INCIDENTSONLY ServiceSubscriptionDtoAlertSensitivity = "INCIDENTS_ONLY" - MAJORONLY ServiceSubscriptionDtoAlertSensitivity = "MAJOR_ONLY" + MemberRoleChangedMetadataOldRoleOWNER MemberRoleChangedMetadataOldRole = "OWNER" ) -// Valid indicates whether the value is a known member of the ServiceSubscriptionDtoAlertSensitivity enum. -func (e ServiceSubscriptionDtoAlertSensitivity) Valid() bool { +// Valid indicates whether the value is a known member of the MemberRoleChangedMetadataOldRole enum. +func (e MemberRoleChangedMetadataOldRole) Valid() bool { switch e { - case ALL: + case MemberRoleChangedMetadataOldRoleADMIN: return true - case INCIDENTSONLY: + case MemberRoleChangedMetadataOldRoleMEMBER: return true - case MAJORONLY: + case MemberRoleChangedMetadataOldRoleOWNER: return true default: return false } } -// Defines values for SlackChannelConfigChannelType. +// Defines values for MonitorTestRequestType. const ( - Slack SlackChannelConfigChannelType = "slack" + MonitorTestRequestTypeDNS MonitorTestRequestType = "DNS" + MonitorTestRequestTypeHEARTBEAT MonitorTestRequestType = "HEARTBEAT" + MonitorTestRequestTypeHTTP MonitorTestRequestType = "HTTP" + MonitorTestRequestTypeICMP MonitorTestRequestType = "ICMP" + MonitorTestRequestTypeMCPSERVER MonitorTestRequestType = "MCP_SERVER" + MonitorTestRequestTypeTCP MonitorTestRequestType = "TCP" ) -// Valid indicates whether the value is a known member of the SlackChannelConfigChannelType enum. -func (e SlackChannelConfigChannelType) Valid() bool { +// Valid indicates whether the value is a known member of the MonitorTestRequestType enum. +func (e MonitorTestRequestType) Valid() bool { switch e { - case Slack: + case MonitorTestRequestTypeDNS: + return true + case MonitorTestRequestTypeHEARTBEAT: + return true + case MonitorTestRequestTypeHTTP: + return true + case MonitorTestRequestTypeICMP: + return true + case MonitorTestRequestTypeMCPSERVER: + return true + case MonitorTestRequestTypeTCP: return true default: return false } } -// Defines values for SslExpiryAssertionType. +// Defines values for OpsGenieChannelConfigChannelType. const ( - SslExpiry SslExpiryAssertionType = "ssl_expiry" + OpsGenieChannelConfigChannelTypeOpsgenie OpsGenieChannelConfigChannelType = "opsgenie" ) -// Valid indicates whether the value is a known member of the SslExpiryAssertionType enum. -func (e SslExpiryAssertionType) Valid() bool { +// Valid indicates whether the value is a known member of the OpsGenieChannelConfigChannelType enum. +func (e OpsGenieChannelConfigChannelType) Valid() bool { switch e { - case SslExpiry: + case OpsGenieChannelConfigChannelTypeOpsgenie: return true default: return false } } -// Defines values for StateTransitionDetailsSource. +// Defines values for PagerDutyChannelConfigChannelType. const ( - Pipeline StateTransitionDetailsSource = "pipeline" - PublicApi StateTransitionDetailsSource = "public-api" + PagerDutyChannelConfigChannelTypePagerduty PagerDutyChannelConfigChannelType = "pagerduty" ) -// Valid indicates whether the value is a known member of the StateTransitionDetailsSource enum. -func (e StateTransitionDetailsSource) Valid() bool { +// Valid indicates whether the value is a known member of the PagerDutyChannelConfigChannelType enum. +func (e PagerDutyChannelConfigChannelType) Valid() bool { switch e { - case Pipeline: - return true - case PublicApi: + case PagerDutyChannelConfigChannelTypePagerduty: return true default: return false } } -// Defines values for StatusCodeAssertionOperator. +// Defines values for PlanInfoTier. const ( - StatusCodeAssertionOperatorContains StatusCodeAssertionOperator = "contains" - StatusCodeAssertionOperatorEquals StatusCodeAssertionOperator = "equals" - StatusCodeAssertionOperatorGreaterThan StatusCodeAssertionOperator = "greater_than" - StatusCodeAssertionOperatorLessThan StatusCodeAssertionOperator = "less_than" - StatusCodeAssertionOperatorMatches StatusCodeAssertionOperator = "matches" - StatusCodeAssertionOperatorRange StatusCodeAssertionOperator = "range" + PlanInfoTierBUSINESS PlanInfoTier = "BUSINESS" + PlanInfoTierENTERPRISE PlanInfoTier = "ENTERPRISE" + PlanInfoTierFREE PlanInfoTier = "FREE" + PlanInfoTierPRO PlanInfoTier = "PRO" + PlanInfoTierSTARTER PlanInfoTier = "STARTER" + PlanInfoTierTEAM PlanInfoTier = "TEAM" ) -// Valid indicates whether the value is a known member of the StatusCodeAssertionOperator enum. -func (e StatusCodeAssertionOperator) Valid() bool { +// Valid indicates whether the value is a known member of the PlanInfoTier enum. +func (e PlanInfoTier) Valid() bool { switch e { - case StatusCodeAssertionOperatorContains: + case PlanInfoTierBUSINESS: return true - case StatusCodeAssertionOperatorEquals: + case PlanInfoTierENTERPRISE: return true - case StatusCodeAssertionOperatorGreaterThan: + case PlanInfoTierFREE: return true - case StatusCodeAssertionOperatorLessThan: + case PlanInfoTierPRO: return true - case StatusCodeAssertionOperatorMatches: + case PlanInfoTierSTARTER: return true - case StatusCodeAssertionOperatorRange: + case PlanInfoTierTEAM: return true default: return false } } -// Defines values for StatusCodeAssertionType. +// Defines values for PublishStatusPageIncidentRequestImpact. const ( - StatusCode StatusCodeAssertionType = "status_code" + PublishStatusPageIncidentRequestImpactCRITICAL PublishStatusPageIncidentRequestImpact = "CRITICAL" + PublishStatusPageIncidentRequestImpactMAJOR PublishStatusPageIncidentRequestImpact = "MAJOR" + PublishStatusPageIncidentRequestImpactMINOR PublishStatusPageIncidentRequestImpact = "MINOR" + PublishStatusPageIncidentRequestImpactNONE PublishStatusPageIncidentRequestImpact = "NONE" ) -// Valid indicates whether the value is a known member of the StatusCodeAssertionType enum. -func (e StatusCodeAssertionType) Valid() bool { +// Valid indicates whether the value is a known member of the PublishStatusPageIncidentRequestImpact enum. +func (e PublishStatusPageIncidentRequestImpact) Valid() bool { switch e { - case StatusCode: + case PublishStatusPageIncidentRequestImpactCRITICAL: + return true + case PublishStatusPageIncidentRequestImpactMAJOR: + return true + case PublishStatusPageIncidentRequestImpactMINOR: + return true + case PublishStatusPageIncidentRequestImpactNONE: return true default: return false } } -// Defines values for StatusPageComponentDtoCurrentStatus. +// Defines values for PublishStatusPageIncidentRequestStatus. const ( - StatusPageComponentDtoCurrentStatusDEGRADEDPERFORMANCE StatusPageComponentDtoCurrentStatus = "DEGRADED_PERFORMANCE" - StatusPageComponentDtoCurrentStatusMAJOROUTAGE StatusPageComponentDtoCurrentStatus = "MAJOR_OUTAGE" - StatusPageComponentDtoCurrentStatusOPERATIONAL StatusPageComponentDtoCurrentStatus = "OPERATIONAL" - StatusPageComponentDtoCurrentStatusPARTIALOUTAGE StatusPageComponentDtoCurrentStatus = "PARTIAL_OUTAGE" - StatusPageComponentDtoCurrentStatusUNDERMAINTENANCE StatusPageComponentDtoCurrentStatus = "UNDER_MAINTENANCE" + PublishStatusPageIncidentRequestStatusIDENTIFIED PublishStatusPageIncidentRequestStatus = "IDENTIFIED" + PublishStatusPageIncidentRequestStatusINVESTIGATING PublishStatusPageIncidentRequestStatus = "INVESTIGATING" + PublishStatusPageIncidentRequestStatusMONITORING PublishStatusPageIncidentRequestStatus = "MONITORING" + PublishStatusPageIncidentRequestStatusRESOLVED PublishStatusPageIncidentRequestStatus = "RESOLVED" ) -// Valid indicates whether the value is a known member of the StatusPageComponentDtoCurrentStatus enum. -func (e StatusPageComponentDtoCurrentStatus) Valid() bool { +// Valid indicates whether the value is a known member of the PublishStatusPageIncidentRequestStatus enum. +func (e PublishStatusPageIncidentRequestStatus) Valid() bool { switch e { - case StatusPageComponentDtoCurrentStatusDEGRADEDPERFORMANCE: - return true - case StatusPageComponentDtoCurrentStatusMAJOROUTAGE: + case PublishStatusPageIncidentRequestStatusIDENTIFIED: return true - case StatusPageComponentDtoCurrentStatusOPERATIONAL: + case PublishStatusPageIncidentRequestStatusINVESTIGATING: return true - case StatusPageComponentDtoCurrentStatusPARTIALOUTAGE: + case PublishStatusPageIncidentRequestStatusMONITORING: return true - case StatusPageComponentDtoCurrentStatusUNDERMAINTENANCE: + case PublishStatusPageIncidentRequestStatusRESOLVED: return true default: return false } } -// Defines values for StatusPageComponentDtoType. +// Defines values for RedirectCountAssertionType. const ( - StatusPageComponentDtoTypeGROUP StatusPageComponentDtoType = "GROUP" - StatusPageComponentDtoTypeMONITOR StatusPageComponentDtoType = "MONITOR" - StatusPageComponentDtoTypeSTATIC StatusPageComponentDtoType = "STATIC" + RedirectCountAssertionTypeRedirectCount RedirectCountAssertionType = "redirect_count" ) -// Valid indicates whether the value is a known member of the StatusPageComponentDtoType enum. -func (e StatusPageComponentDtoType) Valid() bool { +// Valid indicates whether the value is a known member of the RedirectCountAssertionType enum. +func (e RedirectCountAssertionType) Valid() bool { switch e { - case StatusPageComponentDtoTypeGROUP: - return true - case StatusPageComponentDtoTypeMONITOR: - return true - case StatusPageComponentDtoTypeSTATIC: + case RedirectCountAssertionTypeRedirectCount: return true default: return false } } -// Defines values for StatusPageCustomDomainDtoStatus. +// Defines values for RedirectTargetAssertionOperator. const ( - ACTIVE StatusPageCustomDomainDtoStatus = "ACTIVE" - FAILED StatusPageCustomDomainDtoStatus = "FAILED" - PENDINGVERIFICATION StatusPageCustomDomainDtoStatus = "PENDING_VERIFICATION" - REMOVED StatusPageCustomDomainDtoStatus = "REMOVED" - SSLPENDING StatusPageCustomDomainDtoStatus = "SSL_PENDING" - VERIFICATIONFAILED StatusPageCustomDomainDtoStatus = "VERIFICATION_FAILED" - VERIFIED StatusPageCustomDomainDtoStatus = "VERIFIED" + RedirectTargetAssertionOperatorContains RedirectTargetAssertionOperator = "contains" + RedirectTargetAssertionOperatorEquals RedirectTargetAssertionOperator = "equals" + RedirectTargetAssertionOperatorGreaterThan RedirectTargetAssertionOperator = "greater_than" + RedirectTargetAssertionOperatorLessThan RedirectTargetAssertionOperator = "less_than" + RedirectTargetAssertionOperatorMatches RedirectTargetAssertionOperator = "matches" + RedirectTargetAssertionOperatorRange RedirectTargetAssertionOperator = "range" ) -// Valid indicates whether the value is a known member of the StatusPageCustomDomainDtoStatus enum. -func (e StatusPageCustomDomainDtoStatus) Valid() bool { +// Valid indicates whether the value is a known member of the RedirectTargetAssertionOperator enum. +func (e RedirectTargetAssertionOperator) Valid() bool { switch e { - case ACTIVE: - return true - case FAILED: + case RedirectTargetAssertionOperatorContains: return true - case PENDINGVERIFICATION: + case RedirectTargetAssertionOperatorEquals: return true - case REMOVED: + case RedirectTargetAssertionOperatorGreaterThan: return true - case SSLPENDING: + case RedirectTargetAssertionOperatorLessThan: return true - case VERIFICATIONFAILED: + case RedirectTargetAssertionOperatorMatches: return true - case VERIFIED: + case RedirectTargetAssertionOperatorRange: return true default: return false } } -// Defines values for StatusPageCustomDomainDtoVerificationMethod. +// Defines values for RedirectTargetAssertionType. const ( - StatusPageCustomDomainDtoVerificationMethodCNAME StatusPageCustomDomainDtoVerificationMethod = "CNAME" - StatusPageCustomDomainDtoVerificationMethodTXT StatusPageCustomDomainDtoVerificationMethod = "TXT" + RedirectTargetAssertionTypeRedirectTarget RedirectTargetAssertionType = "redirect_target" ) -// Valid indicates whether the value is a known member of the StatusPageCustomDomainDtoVerificationMethod enum. -func (e StatusPageCustomDomainDtoVerificationMethod) Valid() bool { +// Valid indicates whether the value is a known member of the RedirectTargetAssertionType enum. +func (e RedirectTargetAssertionType) Valid() bool { switch e { - case StatusPageCustomDomainDtoVerificationMethodCNAME: - return true - case StatusPageCustomDomainDtoVerificationMethodTXT: + case RedirectTargetAssertionTypeRedirectTarget: return true default: return false } } -// Defines values for StatusPageDtoIncidentMode. +// Defines values for RegexBodyAssertionType. const ( - StatusPageDtoIncidentModeAUTOMATIC StatusPageDtoIncidentMode = "AUTOMATIC" - StatusPageDtoIncidentModeMANUAL StatusPageDtoIncidentMode = "MANUAL" - StatusPageDtoIncidentModeREVIEW StatusPageDtoIncidentMode = "REVIEW" + RegexBodyAssertionTypeRegexBody RegexBodyAssertionType = "regex_body" ) -// Valid indicates whether the value is a known member of the StatusPageDtoIncidentMode enum. -func (e StatusPageDtoIncidentMode) Valid() bool { +// Valid indicates whether the value is a known member of the RegexBodyAssertionType enum. +func (e RegexBodyAssertionType) Valid() bool { switch e { - case StatusPageDtoIncidentModeAUTOMATIC: - return true - case StatusPageDtoIncidentModeMANUAL: - return true - case StatusPageDtoIncidentModeREVIEW: + case RegexBodyAssertionTypeRegexBody: return true default: return false } } -// Defines values for StatusPageDtoManagedBy. +// Defines values for ResponseSizeAssertionType. const ( - StatusPageDtoManagedByAPI StatusPageDtoManagedBy = "API" - StatusPageDtoManagedByCLI StatusPageDtoManagedBy = "CLI" - StatusPageDtoManagedByDASHBOARD StatusPageDtoManagedBy = "DASHBOARD" - StatusPageDtoManagedByMCP StatusPageDtoManagedBy = "MCP" - StatusPageDtoManagedByTERRAFORM StatusPageDtoManagedBy = "TERRAFORM" + ResponseSizeAssertionTypeResponseSize ResponseSizeAssertionType = "response_size" ) -// Valid indicates whether the value is a known member of the StatusPageDtoManagedBy enum. -func (e StatusPageDtoManagedBy) Valid() bool { +// Valid indicates whether the value is a known member of the ResponseSizeAssertionType enum. +func (e ResponseSizeAssertionType) Valid() bool { switch e { - case StatusPageDtoManagedByAPI: - return true - case StatusPageDtoManagedByCLI: - return true - case StatusPageDtoManagedByDASHBOARD: - return true - case StatusPageDtoManagedByMCP: - return true - case StatusPageDtoManagedByTERRAFORM: + case ResponseSizeAssertionTypeResponseSize: return true default: return false } } -// Defines values for StatusPageDtoOverallStatus. +// Defines values for ResponseTimeAssertionType. const ( - StatusPageDtoOverallStatusDEGRADEDPERFORMANCE StatusPageDtoOverallStatus = "DEGRADED_PERFORMANCE" - StatusPageDtoOverallStatusMAJOROUTAGE StatusPageDtoOverallStatus = "MAJOR_OUTAGE" - StatusPageDtoOverallStatusOPERATIONAL StatusPageDtoOverallStatus = "OPERATIONAL" - StatusPageDtoOverallStatusPARTIALOUTAGE StatusPageDtoOverallStatus = "PARTIAL_OUTAGE" - StatusPageDtoOverallStatusUNDERMAINTENANCE StatusPageDtoOverallStatus = "UNDER_MAINTENANCE" + ResponseTimeAssertionTypeResponseTime ResponseTimeAssertionType = "response_time" ) -// Valid indicates whether the value is a known member of the StatusPageDtoOverallStatus enum. -func (e StatusPageDtoOverallStatus) Valid() bool { +// Valid indicates whether the value is a known member of the ResponseTimeAssertionType enum. +func (e ResponseTimeAssertionType) Valid() bool { switch e { - case StatusPageDtoOverallStatusDEGRADEDPERFORMANCE: - return true - case StatusPageDtoOverallStatusMAJOROUTAGE: - return true - case StatusPageDtoOverallStatusOPERATIONAL: - return true - case StatusPageDtoOverallStatusPARTIALOUTAGE: - return true - case StatusPageDtoOverallStatusUNDERMAINTENANCE: + case ResponseTimeAssertionTypeResponseTime: return true default: return false } } -// Defines values for StatusPageDtoVisibility. +// Defines values for ResponseTimeWarnAssertionType. const ( - StatusPageDtoVisibilityIPRESTRICTED StatusPageDtoVisibility = "IP_RESTRICTED" - StatusPageDtoVisibilityPASSWORD StatusPageDtoVisibility = "PASSWORD" - StatusPageDtoVisibilityPUBLIC StatusPageDtoVisibility = "PUBLIC" + ResponseTimeWarnAssertionTypeResponseTimeWarn ResponseTimeWarnAssertionType = "response_time_warn" ) -// Valid indicates whether the value is a known member of the StatusPageDtoVisibility enum. -func (e StatusPageDtoVisibility) Valid() bool { +// Valid indicates whether the value is a known member of the ResponseTimeWarnAssertionType enum. +func (e ResponseTimeWarnAssertionType) Valid() bool { switch e { - case StatusPageDtoVisibilityIPRESTRICTED: - return true - case StatusPageDtoVisibilityPASSWORD: - return true - case StatusPageDtoVisibilityPUBLIC: + case ResponseTimeWarnAssertionTypeResponseTimeWarn: return true default: return false } } -// Defines values for StatusPageIncidentComponentDtoComponentStatus. +// Defines values for SlackChannelConfigChannelType. const ( - StatusPageIncidentComponentDtoComponentStatusDEGRADEDPERFORMANCE StatusPageIncidentComponentDtoComponentStatus = "DEGRADED_PERFORMANCE" - StatusPageIncidentComponentDtoComponentStatusMAJOROUTAGE StatusPageIncidentComponentDtoComponentStatus = "MAJOR_OUTAGE" - StatusPageIncidentComponentDtoComponentStatusOPERATIONAL StatusPageIncidentComponentDtoComponentStatus = "OPERATIONAL" - StatusPageIncidentComponentDtoComponentStatusPARTIALOUTAGE StatusPageIncidentComponentDtoComponentStatus = "PARTIAL_OUTAGE" - StatusPageIncidentComponentDtoComponentStatusUNDERMAINTENANCE StatusPageIncidentComponentDtoComponentStatus = "UNDER_MAINTENANCE" + SlackChannelConfigChannelTypeSlack SlackChannelConfigChannelType = "slack" ) -// Valid indicates whether the value is a known member of the StatusPageIncidentComponentDtoComponentStatus enum. -func (e StatusPageIncidentComponentDtoComponentStatus) Valid() bool { +// Valid indicates whether the value is a known member of the SlackChannelConfigChannelType enum. +func (e SlackChannelConfigChannelType) Valid() bool { switch e { - case StatusPageIncidentComponentDtoComponentStatusDEGRADEDPERFORMANCE: - return true - case StatusPageIncidentComponentDtoComponentStatusMAJOROUTAGE: - return true - case StatusPageIncidentComponentDtoComponentStatusOPERATIONAL: - return true - case StatusPageIncidentComponentDtoComponentStatusPARTIALOUTAGE: - return true - case StatusPageIncidentComponentDtoComponentStatusUNDERMAINTENANCE: + case SlackChannelConfigChannelTypeSlack: return true default: return false } } -// Defines values for StatusPageIncidentDtoImpact. +// Defines values for SslExpiryAssertionType. const ( - StatusPageIncidentDtoImpactCRITICAL StatusPageIncidentDtoImpact = "CRITICAL" - StatusPageIncidentDtoImpactMAJOR StatusPageIncidentDtoImpact = "MAJOR" - StatusPageIncidentDtoImpactMINOR StatusPageIncidentDtoImpact = "MINOR" - StatusPageIncidentDtoImpactNONE StatusPageIncidentDtoImpact = "NONE" + SslExpiryAssertionTypeSslExpiry SslExpiryAssertionType = "ssl_expiry" ) -// Valid indicates whether the value is a known member of the StatusPageIncidentDtoImpact enum. -func (e StatusPageIncidentDtoImpact) Valid() bool { +// Valid indicates whether the value is a known member of the SslExpiryAssertionType enum. +func (e SslExpiryAssertionType) Valid() bool { switch e { - case StatusPageIncidentDtoImpactCRITICAL: - return true - case StatusPageIncidentDtoImpactMAJOR: - return true - case StatusPageIncidentDtoImpactMINOR: - return true - case StatusPageIncidentDtoImpactNONE: + case SslExpiryAssertionTypeSslExpiry: return true default: return false } } -// Defines values for StatusPageIncidentDtoStatus. +// Defines values for StateTransitionDetailsSource. const ( - StatusPageIncidentDtoStatusIDENTIFIED StatusPageIncidentDtoStatus = "IDENTIFIED" - StatusPageIncidentDtoStatusINVESTIGATING StatusPageIncidentDtoStatus = "INVESTIGATING" - StatusPageIncidentDtoStatusMONITORING StatusPageIncidentDtoStatus = "MONITORING" - StatusPageIncidentDtoStatusRESOLVED StatusPageIncidentDtoStatus = "RESOLVED" + StateTransitionDetailsSourcePipeline StateTransitionDetailsSource = "pipeline" + StateTransitionDetailsSourcePublicApi StateTransitionDetailsSource = "public-api" ) -// Valid indicates whether the value is a known member of the StatusPageIncidentDtoStatus enum. -func (e StatusPageIncidentDtoStatus) Valid() bool { +// Valid indicates whether the value is a known member of the StateTransitionDetailsSource enum. +func (e StateTransitionDetailsSource) Valid() bool { switch e { - case StatusPageIncidentDtoStatusIDENTIFIED: + case StateTransitionDetailsSourcePipeline: return true - case StatusPageIncidentDtoStatusINVESTIGATING: - return true - case StatusPageIncidentDtoStatusMONITORING: - return true - case StatusPageIncidentDtoStatusRESOLVED: + case StateTransitionDetailsSourcePublicApi: return true default: return false } } -// Defines values for StatusPageIncidentUpdateDtoCreatedBy. +// Defines values for StatusCodeAssertionOperator. const ( - StatusPageIncidentUpdateDtoCreatedBySYSTEM StatusPageIncidentUpdateDtoCreatedBy = "SYSTEM" - StatusPageIncidentUpdateDtoCreatedByUSER StatusPageIncidentUpdateDtoCreatedBy = "USER" + StatusCodeAssertionOperatorContains StatusCodeAssertionOperator = "contains" + StatusCodeAssertionOperatorEquals StatusCodeAssertionOperator = "equals" + StatusCodeAssertionOperatorGreaterThan StatusCodeAssertionOperator = "greater_than" + StatusCodeAssertionOperatorLessThan StatusCodeAssertionOperator = "less_than" + StatusCodeAssertionOperatorMatches StatusCodeAssertionOperator = "matches" + StatusCodeAssertionOperatorRange StatusCodeAssertionOperator = "range" ) -// Valid indicates whether the value is a known member of the StatusPageIncidentUpdateDtoCreatedBy enum. -func (e StatusPageIncidentUpdateDtoCreatedBy) Valid() bool { +// Valid indicates whether the value is a known member of the StatusCodeAssertionOperator enum. +func (e StatusCodeAssertionOperator) Valid() bool { switch e { - case StatusPageIncidentUpdateDtoCreatedBySYSTEM: + case StatusCodeAssertionOperatorContains: + return true + case StatusCodeAssertionOperatorEquals: + return true + case StatusCodeAssertionOperatorGreaterThan: return true - case StatusPageIncidentUpdateDtoCreatedByUSER: + case StatusCodeAssertionOperatorLessThan: + return true + case StatusCodeAssertionOperatorMatches: + return true + case StatusCodeAssertionOperatorRange: return true default: return false } } -// Defines values for StatusPageIncidentUpdateDtoStatus. +// Defines values for StatusCodeAssertionType. const ( - StatusPageIncidentUpdateDtoStatusIDENTIFIED StatusPageIncidentUpdateDtoStatus = "IDENTIFIED" - StatusPageIncidentUpdateDtoStatusINVESTIGATING StatusPageIncidentUpdateDtoStatus = "INVESTIGATING" - StatusPageIncidentUpdateDtoStatusMONITORING StatusPageIncidentUpdateDtoStatus = "MONITORING" - StatusPageIncidentUpdateDtoStatusRESOLVED StatusPageIncidentUpdateDtoStatus = "RESOLVED" + StatusCodeAssertionTypeStatusCode StatusCodeAssertionType = "status_code" ) -// Valid indicates whether the value is a known member of the StatusPageIncidentUpdateDtoStatus enum. -func (e StatusPageIncidentUpdateDtoStatus) Valid() bool { +// Valid indicates whether the value is a known member of the StatusCodeAssertionType enum. +func (e StatusCodeAssertionType) Valid() bool { switch e { - case StatusPageIncidentUpdateDtoStatusIDENTIFIED: - return true - case StatusPageIncidentUpdateDtoStatusINVESTIGATING: - return true - case StatusPageIncidentUpdateDtoStatusMONITORING: - return true - case StatusPageIncidentUpdateDtoStatusRESOLVED: + case StatusCodeAssertionTypeStatusCode: return true default: return false @@ -3291,13 +1887,13 @@ func (e TcpCheckType) Valid() bool { // Defines values for TcpConnectsAssertionType. const ( - TcpConnects TcpConnectsAssertionType = "tcp_connects" + TcpConnectsAssertionTypeTcpConnects TcpConnectsAssertionType = "tcp_connects" ) // Valid indicates whether the value is a known member of the TcpConnectsAssertionType enum. func (e TcpConnectsAssertionType) Valid() bool { switch e { - case TcpConnects: + case TcpConnectsAssertionTypeTcpConnects: return true default: return false @@ -3306,13 +1902,13 @@ func (e TcpConnectsAssertionType) Valid() bool { // Defines values for TcpResponseTimeAssertionType. const ( - TcpResponseTime TcpResponseTimeAssertionType = "tcp_response_time" + TcpResponseTimeAssertionTypeTcpResponseTime TcpResponseTimeAssertionType = "tcp_response_time" ) // Valid indicates whether the value is a known member of the TcpResponseTimeAssertionType enum. func (e TcpResponseTimeAssertionType) Valid() bool { switch e { - case TcpResponseTime: + case TcpResponseTimeAssertionTypeTcpResponseTime: return true default: return false @@ -3321,13 +1917,13 @@ func (e TcpResponseTimeAssertionType) Valid() bool { // Defines values for TcpResponseTimeWarnAssertionType. const ( - TcpResponseTimeWarn TcpResponseTimeWarnAssertionType = "tcp_response_time_warn" + TcpResponseTimeWarnAssertionTypeTcpResponseTimeWarn TcpResponseTimeWarnAssertionType = "tcp_response_time_warn" ) // Valid indicates whether the value is a known member of the TcpResponseTimeWarnAssertionType enum. func (e TcpResponseTimeWarnAssertionType) Valid() bool { switch e { - case TcpResponseTimeWarn: + case TcpResponseTimeWarnAssertionTypeTcpResponseTimeWarn: return true default: return false @@ -3336,13 +1932,13 @@ func (e TcpResponseTimeWarnAssertionType) Valid() bool { // Defines values for TeamsChannelConfigChannelType. const ( - Teams TeamsChannelConfigChannelType = "teams" + TeamsChannelConfigChannelTypeTeams TeamsChannelConfigChannelType = "teams" ) // Valid indicates whether the value is a known member of the TeamsChannelConfigChannelType enum. func (e TeamsChannelConfigChannelType) Valid() bool { switch e { - case Teams: + case TeamsChannelConfigChannelTypeTeams: return true default: return false @@ -3351,22 +1947,22 @@ func (e TeamsChannelConfigChannelType) Valid() bool { // Defines values for TriggerRuleAggregationType. const ( - AllExceed TriggerRuleAggregationType = "all_exceed" - Average TriggerRuleAggregationType = "average" - Max TriggerRuleAggregationType = "max" - P95 TriggerRuleAggregationType = "p95" + TriggerRuleAggregationTypeAllExceed TriggerRuleAggregationType = "all_exceed" + TriggerRuleAggregationTypeAverage TriggerRuleAggregationType = "average" + TriggerRuleAggregationTypeMax TriggerRuleAggregationType = "max" + TriggerRuleAggregationTypeP95 TriggerRuleAggregationType = "p95" ) // Valid indicates whether the value is a known member of the TriggerRuleAggregationType enum. func (e TriggerRuleAggregationType) Valid() bool { switch e { - case AllExceed: + case TriggerRuleAggregationTypeAllExceed: return true - case Average: + case TriggerRuleAggregationTypeAverage: return true - case Max: + case TriggerRuleAggregationTypeMax: return true - case P95: + case TriggerRuleAggregationTypeP95: return true default: return false @@ -3375,16 +1971,16 @@ func (e TriggerRuleAggregationType) Valid() bool { // Defines values for TriggerRuleScope. const ( - AnyRegion TriggerRuleScope = "any_region" - PerRegion TriggerRuleScope = "per_region" + TriggerRuleScopeAnyRegion TriggerRuleScope = "any_region" + TriggerRuleScopePerRegion TriggerRuleScope = "per_region" ) // Valid indicates whether the value is a known member of the TriggerRuleScope enum. func (e TriggerRuleScope) Valid() bool { switch e { - case AnyRegion: + case TriggerRuleScopeAnyRegion: return true - case PerRegion: + case TriggerRuleScopePerRegion: return true default: return false @@ -3459,16 +2055,16 @@ func (e UpdateAlertChannelRequestManagedBy) Valid() bool { // Defines values for UpdateAssertionRequestSeverity. const ( - Fail UpdateAssertionRequestSeverity = "fail" - Warn UpdateAssertionRequestSeverity = "warn" + UpdateAssertionRequestSeverityFail UpdateAssertionRequestSeverity = "fail" + UpdateAssertionRequestSeverityWarn UpdateAssertionRequestSeverity = "warn" ) // Valid indicates whether the value is a known member of the UpdateAssertionRequestSeverity enum. func (e UpdateAssertionRequestSeverity) Valid() bool { switch e { - case Fail: + case UpdateAssertionRequestSeverityFail: return true - case Warn: + case UpdateAssertionRequestSeverityWarn: return true default: return false @@ -3504,16 +2100,16 @@ func (e UpdateMonitorRequestManagedBy) Valid() bool { // Defines values for UpdateResourceGroupRequestHealthThresholdType. const ( - COUNT UpdateResourceGroupRequestHealthThresholdType = "COUNT" - PERCENTAGE UpdateResourceGroupRequestHealthThresholdType = "PERCENTAGE" + UpdateResourceGroupRequestHealthThresholdTypeCOUNT UpdateResourceGroupRequestHealthThresholdType = "COUNT" + UpdateResourceGroupRequestHealthThresholdTypePERCENTAGE UpdateResourceGroupRequestHealthThresholdType = "PERCENTAGE" ) // Valid indicates whether the value is a known member of the UpdateResourceGroupRequestHealthThresholdType enum. func (e UpdateResourceGroupRequestHealthThresholdType) Valid() bool { switch e { - case COUNT: + case UpdateResourceGroupRequestHealthThresholdTypeCOUNT: return true - case PERCENTAGE: + case UpdateResourceGroupRequestHealthThresholdTypePERCENTAGE: return true default: return false @@ -3645,19 +2241,19 @@ func (e UpdateStatusPageRequestManagedBy) Valid() bool { // Defines values for UpdateStatusPageRequestVisibility. const ( - IPRESTRICTED UpdateStatusPageRequestVisibility = "IP_RESTRICTED" - PASSWORD UpdateStatusPageRequestVisibility = "PASSWORD" - PUBLIC UpdateStatusPageRequestVisibility = "PUBLIC" + UpdateStatusPageRequestVisibilityIPRESTRICTED UpdateStatusPageRequestVisibility = "IP_RESTRICTED" + UpdateStatusPageRequestVisibilityPASSWORD UpdateStatusPageRequestVisibility = "PASSWORD" + UpdateStatusPageRequestVisibilityPUBLIC UpdateStatusPageRequestVisibility = "PUBLIC" ) // Valid indicates whether the value is a known member of the UpdateStatusPageRequestVisibility enum. func (e UpdateStatusPageRequestVisibility) Valid() bool { switch e { - case IPRESTRICTED: + case UpdateStatusPageRequestVisibilityIPRESTRICTED: return true - case PASSWORD: + case UpdateStatusPageRequestVisibilityPASSWORD: return true - case PUBLIC: + case UpdateStatusPageRequestVisibilityPUBLIC: return true default: return false @@ -3711,13 +2307,13 @@ func (e UpdateWebhookEndpointRequestSubscribedEvents) Valid() bool { // Defines values for WebhookChannelConfigChannelType. const ( - Webhook WebhookChannelConfigChannelType = "webhook" + WebhookChannelConfigChannelTypeWebhook WebhookChannelConfigChannelType = "webhook" ) // Valid indicates whether the value is a known member of the WebhookChannelConfigChannelType enum. func (e WebhookChannelConfigChannelType) Valid() bool { switch e { - case Webhook: + case WebhookChannelConfigChannelTypeWebhook: return true default: return false @@ -3816,25 +2412,25 @@ func (e List8ParamsType) Valid() bool { // Defines values for List8ParamsManagedBy. const ( - API List8ParamsManagedBy = "API" - CLI List8ParamsManagedBy = "CLI" - DASHBOARD List8ParamsManagedBy = "DASHBOARD" - MCP List8ParamsManagedBy = "MCP" - TERRAFORM List8ParamsManagedBy = "TERRAFORM" + List8ParamsManagedByAPI List8ParamsManagedBy = "API" + List8ParamsManagedByCLI List8ParamsManagedBy = "CLI" + List8ParamsManagedByDASHBOARD List8ParamsManagedBy = "DASHBOARD" + List8ParamsManagedByMCP List8ParamsManagedBy = "MCP" + List8ParamsManagedByTERRAFORM List8ParamsManagedBy = "TERRAFORM" ) // Valid indicates whether the value is a known member of the List8ParamsManagedBy enum. func (e List8ParamsManagedBy) Valid() bool { switch e { - case API: + case List8ParamsManagedByAPI: return true - case CLI: + case List8ParamsManagedByCLI: return true - case DASHBOARD: + case List8ParamsManagedByDASHBOARD: return true - case MCP: + case List8ParamsManagedByMCP: return true - case TERRAFORM: + case List8ParamsManagedByTERRAFORM: return true default: return false @@ -4029,19 +2625,19 @@ func (e GetServiceUptimeParamsPeriod) Valid() bool { // Defines values for GetServiceUptimeParamsGranularity. const ( - Daily GetServiceUptimeParamsGranularity = "daily" - Hourly GetServiceUptimeParamsGranularity = "hourly" - Monthly GetServiceUptimeParamsGranularity = "monthly" + GetServiceUptimeParamsGranularityDaily GetServiceUptimeParamsGranularity = "daily" + GetServiceUptimeParamsGranularityHourly GetServiceUptimeParamsGranularity = "hourly" + GetServiceUptimeParamsGranularityMonthly GetServiceUptimeParamsGranularity = "monthly" ) // Valid indicates whether the value is a known member of the GetServiceUptimeParamsGranularity enum. func (e GetServiceUptimeParamsGranularity) Valid() bool { switch e { - case Daily: + case GetServiceUptimeParamsGranularityDaily: return true - case Hourly: + case GetServiceUptimeParamsGranularityHourly: return true - case Monthly: + case GetServiceUptimeParamsGranularityMonthly: return true default: return false @@ -4050,22 +2646,22 @@ func (e GetServiceUptimeParamsGranularity) Valid() bool { // Defines values for ListIncidentsParamsStatus. const ( - IDENTIFIED ListIncidentsParamsStatus = "IDENTIFIED" - INVESTIGATING ListIncidentsParamsStatus = "INVESTIGATING" - MONITORING ListIncidentsParamsStatus = "MONITORING" - RESOLVED ListIncidentsParamsStatus = "RESOLVED" + ListIncidentsParamsStatusIDENTIFIED ListIncidentsParamsStatus = "IDENTIFIED" + ListIncidentsParamsStatusINVESTIGATING ListIncidentsParamsStatus = "INVESTIGATING" + ListIncidentsParamsStatusMONITORING ListIncidentsParamsStatus = "MONITORING" + ListIncidentsParamsStatusRESOLVED ListIncidentsParamsStatus = "RESOLVED" ) // Valid indicates whether the value is a known member of the ListIncidentsParamsStatus enum. func (e ListIncidentsParamsStatus) Valid() bool { switch e { - case IDENTIFIED: + case ListIncidentsParamsStatusIDENTIFIED: return true - case INVESTIGATING: + case ListIncidentsParamsStatusINVESTIGATING: return true - case MONITORING: + case ListIncidentsParamsStatusMONITORING: return true - case RESOLVED: + case ListIncidentsParamsStatusRESOLVED: return true default: return false @@ -4159,7 +2755,7 @@ type AlertChannelDisplayConfig struct { // AlertChannelDto Alert channel with non-sensitive configuration metadata type AlertChannelDto struct { // ChannelType Channel integration type (e.g. SLACK, PAGERDUTY, EMAIL) - ChannelType AlertChannelDtoChannelType `json:"channelType"` + ChannelType string `json:"channelType"` // ConfigHash SHA-256 hash of the channel config; use for change detection ConfigHash *string `json:"configHash,omitempty"` @@ -4178,7 +2774,7 @@ type AlertChannelDto struct { LastDeliveryStatus *string `json:"lastDeliveryStatus,omitempty"` // ManagedBy Source that created/owns this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on channels created before this attribution column existed. - ManagedBy *AlertChannelDtoManagedBy `json:"managedBy,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` // Name Human-readable channel name Name string `json:"name"` @@ -4187,12 +2783,6 @@ type AlertChannelDto struct { UpdatedAt time.Time `json:"updatedAt"` } -// AlertChannelDtoChannelType Channel integration type (e.g. SLACK, PAGERDUTY, EMAIL) -type AlertChannelDtoChannelType string - -// AlertChannelDtoManagedBy Source that created/owns this channel: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on channels created before this attribution column existed. -type AlertChannelDtoManagedBy string - // AlertDeliveryDto Delivery record for a single channel within a notification dispatch type AlertDeliveryDto struct { // AttemptCount Number of delivery attempts made @@ -4218,7 +2808,7 @@ type AlertDeliveryDto struct { ErrorMessage *string `json:"errorMessage,omitempty"` // EventType Incident lifecycle event that triggered this delivery - EventType AlertDeliveryDtoEventType `json:"eventType"` + EventType string `json:"eventType"` // FireCount Fire sequence within the step: 1 = initial, 2+ = repeat re-fires FireCount int32 `json:"fireCount"` @@ -4234,18 +2824,12 @@ type AlertDeliveryDto struct { NextRetryAt *time.Time `json:"nextRetryAt,omitempty"` // Status Current delivery status - Status AlertDeliveryDtoStatus `json:"status"` + Status string `json:"status"` // StepNumber 1-based escalation step this delivery belongs to StepNumber int32 `json:"stepNumber"` } -// AlertDeliveryDtoEventType Incident lifecycle event that triggered this delivery -type AlertDeliveryDtoEventType string - -// AlertDeliveryDtoStatus Current delivery status -type AlertDeliveryDtoStatus string - // ApiKeyAuthConfig defines model for ApiKeyAuthConfig. type ApiKeyAuthConfig struct { // HeaderName HTTP header name that carries the API key @@ -4319,22 +2903,19 @@ type AssertionResultDto struct { Passed bool `json:"passed"` // Severity Assertion severity - Severity AssertionResultDtoSeverity `json:"severity"` + Severity string `json:"severity"` // Type Assertion type Type string `json:"type"` } -// AssertionResultDtoSeverity Assertion severity -type AssertionResultDtoSeverity string - // AssertionTestResultDto defines model for AssertionTestResultDto. type AssertionTestResultDto struct { // Actual Actual value observed during the test Actual *string `json:"actual,omitempty"` // AssertionType Assertion type evaluated - AssertionType AssertionTestResultDtoAssertionType `json:"assertionType"` + AssertionType string `json:"assertionType"` // Expected Expected value Expected *string `json:"expected,omitempty"` @@ -4346,15 +2927,9 @@ type AssertionTestResultDto struct { Passed bool `json:"passed"` // Severity Assertion severity: FAIL or WARN - Severity AssertionTestResultDtoSeverity `json:"severity"` + Severity string `json:"severity"` } -// AssertionTestResultDtoAssertionType Assertion type evaluated -type AssertionTestResultDtoAssertionType string - -// AssertionTestResultDtoSeverity Assertion severity: FAIL or WARN -type AssertionTestResultDtoSeverity string - // AuditEventDto defines model for AuditEventDto. type AuditEventDto struct { // Action Audit action type (e.g. monitor.created, api_key.revoked) @@ -5849,7 +4424,7 @@ type IncidentDto struct { ReopenCount int32 `json:"reopenCount"` // ResolutionReason How the incident was resolved (AUTO_RECOVERED, MANUAL, etc.) - ResolutionReason *IncidentDtoResolutionReason `json:"resolutionReason,omitempty"` + ResolutionReason *string `json:"resolutionReason,omitempty"` // ResolvedAt Timestamp when the incident was resolved ResolvedAt *time.Time `json:"resolvedAt,omitempty"` @@ -5873,19 +4448,19 @@ type IncidentDto struct { ServiceSlug *string `json:"serviceSlug,omitempty"` // Severity Severity level: DOWN, DEGRADED, or MAINTENANCE - Severity IncidentDtoSeverity `json:"severity"` + Severity string `json:"severity"` // Shortlink Short URL linking to the incident details Shortlink *string `json:"shortlink,omitempty"` // Source Incident origin: MONITOR, SERVICE, or MANUAL - Source IncidentDtoSource `json:"source"` + Source string `json:"source"` // StartedAt Timestamp when the incident was detected or created StartedAt *time.Time `json:"startedAt,omitempty"` // Status Current lifecycle status (OPEN, RESOLVED, etc.) - Status IncidentDtoStatus `json:"status"` + Status string `json:"status"` // StatusPageVisible Whether this incident is visible on the status page StatusPageVisible bool `json:"statusPageVisible"` @@ -5909,18 +4484,6 @@ type IncidentDto struct { UpdatedAt time.Time `json:"updatedAt"` } -// IncidentDtoResolutionReason How the incident was resolved (AUTO_RECOVERED, MANUAL, etc.) -type IncidentDtoResolutionReason string - -// IncidentDtoSeverity Severity level: DOWN, DEGRADED, or MAINTENANCE -type IncidentDtoSeverity string - -// IncidentDtoSource Incident origin: MONITOR, SERVICE, or MANUAL -type IncidentDtoSource string - -// IncidentDtoStatus Current lifecycle status (OPEN, RESOLVED, etc.) -type IncidentDtoStatus string - // IncidentFilterParams defines model for IncidentFilterParams. type IncidentFilterParams struct { // EnvironmentId Only return incidents whose monitor lives in this environment @@ -6066,25 +4629,16 @@ type IncidentTimelineDto struct { // IncidentUpdateDto defines model for IncidentUpdateDto. type IncidentUpdateDto struct { - Body *string `json:"body,omitempty"` - CreatedAt time.Time `json:"createdAt"` - CreatedBy *IncidentUpdateDtoCreatedBy `json:"createdBy,omitempty"` - Id openapi_types.UUID `json:"id"` - IncidentId openapi_types.UUID `json:"incidentId"` - NewStatus *IncidentUpdateDtoNewStatus `json:"newStatus,omitempty"` - NotifySubscribers bool `json:"notifySubscribers"` - OldStatus *IncidentUpdateDtoOldStatus `json:"oldStatus,omitempty"` + Body *string `json:"body,omitempty"` + CreatedAt time.Time `json:"createdAt"` + CreatedBy *string `json:"createdBy,omitempty"` + Id openapi_types.UUID `json:"id"` + IncidentId openapi_types.UUID `json:"incidentId"` + NewStatus *string `json:"newStatus,omitempty"` + NotifySubscribers bool `json:"notifySubscribers"` + OldStatus *string `json:"oldStatus,omitempty"` } -// IncidentUpdateDtoCreatedBy defines model for IncidentUpdateDto.CreatedBy. -type IncidentUpdateDtoCreatedBy string - -// IncidentUpdateDtoNewStatus defines model for IncidentUpdateDto.NewStatus. -type IncidentUpdateDtoNewStatus string - -// IncidentUpdateDtoOldStatus defines model for IncidentUpdateDto.OldStatus. -type IncidentUpdateDtoOldStatus string - // IncidentsSummaryDto Incident summary counters type IncidentsSummaryDto struct { Active int64 `json:"active"` @@ -6100,20 +4654,17 @@ type IntegrationConfigSchemaDto struct { // IntegrationDto defines model for IntegrationDto. type IntegrationDto struct { - AuthType string `json:"authType"` - ConfigSchema IntegrationConfigSchemaDto `json:"configSchema"` - Description string `json:"description"` - Lifecycle string `json:"lifecycle"` - LogoUrl string `json:"logoUrl"` - Name string `json:"name"` - SetupGuideUrl string `json:"setupGuideUrl"` - TierAvailability IntegrationDtoTierAvailability `json:"tierAvailability"` - Type string `json:"type"` + AuthType string `json:"authType"` + ConfigSchema IntegrationConfigSchemaDto `json:"configSchema"` + Description string `json:"description"` + Lifecycle string `json:"lifecycle"` + LogoUrl string `json:"logoUrl"` + Name string `json:"name"` + SetupGuideUrl string `json:"setupGuideUrl"` + TierAvailability string `json:"tierAvailability"` + Type string `json:"type"` } -// IntegrationDtoTierAvailability defines model for IntegrationDto.TierAvailability. -type IntegrationDtoTierAvailability string - // IntegrationFieldDto defines model for IntegrationFieldDto. type IntegrationFieldDto struct { Default *string `json:"default,omitempty"` @@ -6145,12 +4696,9 @@ type InviteDto struct { RevokedAt *time.Time `json:"revokedAt,omitempty"` // RoleOffered Role that will be assigned to the invitee on acceptance - RoleOffered InviteDtoRoleOffered `json:"roleOffered"` + RoleOffered string `json:"roleOffered"` } -// InviteDtoRoleOffered Role that will be assigned to the invitee on acceptance -type InviteDtoRoleOffered string - // JsonPathAssertion defines model for JsonPathAssertion. type JsonPathAssertion struct { // Expected Expected value to compare against @@ -6190,23 +4738,17 @@ type KeyInfo struct { // LinkedStatusPageIncidentDto defines model for LinkedStatusPageIncidentDto. type LinkedStatusPageIncidentDto struct { - Id openapi_types.UUID `json:"id"` - Impact LinkedStatusPageIncidentDtoImpact `json:"impact"` - PublishedAt *time.Time `json:"publishedAt,omitempty"` - Scheduled bool `json:"scheduled"` - Status LinkedStatusPageIncidentDtoStatus `json:"status"` - StatusPageId openapi_types.UUID `json:"statusPageId"` - StatusPageName string `json:"statusPageName"` - StatusPageSlug string `json:"statusPageSlug"` - Title string `json:"title"` + Id openapi_types.UUID `json:"id"` + Impact string `json:"impact"` + PublishedAt *time.Time `json:"publishedAt,omitempty"` + Scheduled bool `json:"scheduled"` + Status string `json:"status"` + StatusPageId openapi_types.UUID `json:"statusPageId"` + StatusPageName string `json:"statusPageName"` + StatusPageSlug string `json:"statusPageSlug"` + Title string `json:"title"` } -// LinkedStatusPageIncidentDtoImpact defines model for LinkedStatusPageIncidentDto.Impact. -type LinkedStatusPageIncidentDtoImpact string - -// LinkedStatusPageIncidentDtoStatus defines model for LinkedStatusPageIncidentDto.Status. -type LinkedStatusPageIncidentDtoStatus string - // MaintenanceComponentRef A component affected by a scheduled maintenance window type MaintenanceComponentRef struct { // Id Component identifier @@ -6415,21 +4957,15 @@ type MemberDto struct { Name *string `json:"name,omitempty"` // OrgRole Member role within this organization (OWNER, ADMIN, MEMBER) - OrgRole MemberDtoOrgRole `json:"orgRole"` + OrgRole string `json:"orgRole"` // Status Membership status (ACTIVE, PENDING, SUSPENDED) - Status MemberDtoStatus `json:"status"` + Status string `json:"status"` // UserId User identifier of the member UserId int32 `json:"userId"` } -// MemberDtoOrgRole Member role within this organization (OWNER, ADMIN, MEMBER) -type MemberDtoOrgRole string - -// MemberDtoStatus Membership status (ACTIVE, PENDING, SUSPENDED) -type MemberDtoStatus string - // MemberRoleChangedMetadata Role transition recorded when an organization member's role changes. type MemberRoleChangedMetadata struct { Kind MemberRoleChangedMetadataKind `json:"kind"` @@ -6452,24 +4988,18 @@ type MemberRoleChangedMetadataOldRole string // MonitorAssertionDto defines model for MonitorAssertionDto. type MonitorAssertionDto struct { - AssertionType MonitorAssertionDtoAssertionType `json:"assertionType"` - Config MonitorAssertionDto_Config `json:"config"` - Id openapi_types.UUID `json:"id"` - MonitorId openapi_types.UUID `json:"monitorId"` - Severity MonitorAssertionDtoSeverity `json:"severity"` + AssertionType string `json:"assertionType"` + Config MonitorAssertionDto_Config `json:"config"` + Id openapi_types.UUID `json:"id"` + MonitorId openapi_types.UUID `json:"monitorId"` + Severity string `json:"severity"` } -// MonitorAssertionDtoAssertionType defines model for MonitorAssertionDto.AssertionType. -type MonitorAssertionDtoAssertionType string - // MonitorAssertionDto_Config defines model for MonitorAssertionDto.Config. type MonitorAssertionDto_Config struct { union json.RawMessage } -// MonitorAssertionDtoSeverity defines model for MonitorAssertionDto.Severity. -type MonitorAssertionDtoSeverity string - // MonitorAuthConfig New authentication configuration (full replacement) type MonitorAuthConfig struct { union json.RawMessage @@ -6477,15 +5007,12 @@ type MonitorAuthConfig struct { // MonitorAuthDto defines model for MonitorAuthDto. type MonitorAuthDto struct { - AuthType MonitorAuthDtoAuthType `json:"authType"` - Config MonitorAuthDto_Config `json:"config"` - Id openapi_types.UUID `json:"id"` - MonitorId openapi_types.UUID `json:"monitorId"` + AuthType string `json:"authType"` + Config MonitorAuthDto_Config `json:"config"` + Id openapi_types.UUID `json:"id"` + MonitorId openapi_types.UUID `json:"monitorId"` } -// MonitorAuthDtoAuthType defines model for MonitorAuthDto.AuthType. -type MonitorAuthDtoAuthType string - // MonitorAuthDto_Config defines model for MonitorAuthDto.Config. type MonitorAuthDto_Config struct { union json.RawMessage @@ -6505,7 +5032,7 @@ type MonitorDto struct { CreatedAt time.Time `json:"createdAt"` // CurrentStatus Current operational state — UP, DOWN, DEGRADED, PAUSED, or UNKNOWN if no probe data yet - CurrentStatus *MonitorDtoCurrentStatus `json:"currentStatus,omitempty"` + CurrentStatus *string `json:"currentStatus,omitempty"` // Enabled Whether the monitor is active Enabled bool `json:"enabled"` @@ -6519,7 +5046,7 @@ type MonitorDto struct { IncidentPolicy *IncidentPolicyDto `json:"incidentPolicy,omitempty"` // ManagedBy Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API - ManagedBy MonitorDtoManagedBy `json:"managedBy"` + ManagedBy string `json:"managedBy"` // Name Human-readable name for this monitor Name string `json:"name"` @@ -6534,8 +5061,8 @@ type MonitorDto struct { Regions []string `json:"regions"` // Tags Tags applied to this monitor - Tags *[]TagDto `json:"tags,omitempty"` - Type MonitorDtoType `json:"type"` + Tags *[]TagDto `json:"tags,omitempty"` + Type string `json:"type"` // UpdatedAt Timestamp when the monitor was last updated UpdatedAt time.Time `json:"updatedAt"` @@ -6546,15 +5073,6 @@ type MonitorDto_Config struct { union json.RawMessage } -// MonitorDtoCurrentStatus Current operational state — UP, DOWN, DEGRADED, PAUSED, or UNKNOWN if no probe data yet -type MonitorDtoCurrentStatus string - -// MonitorDtoManagedBy Source that created/owns this monitor: DASHBOARD, CLI, TERRAFORM, MCP, or API -type MonitorDtoManagedBy string - -// MonitorDtoType defines model for MonitorDto.Type. -type MonitorDtoType string - // MonitorReference Monitors that reference this secret; null on create/update responses type MonitorReference struct { // Id Monitor identifier @@ -6606,7 +5124,7 @@ type MonitorVersionDto struct { ChangedById *int32 `json:"changedById,omitempty"` // ChangedVia Change source (DASHBOARD, CLI, API) - ChangedVia MonitorVersionDtoChangedVia `json:"changedVia"` + ChangedVia string `json:"changedVia"` // CreatedAt Timestamp when this version was recorded CreatedAt time.Time `json:"createdAt"` @@ -6624,9 +5142,6 @@ type MonitorVersionDto struct { Version int32 `json:"version"` } -// MonitorVersionDtoChangedVia Change source (DASHBOARD, CLI, API) -type MonitorVersionDtoChangedVia string - // MonitorsSummaryDto Dashboard summary counters for monitors type MonitorsSummaryDto struct { // AvgUptime24h Average uptime percentage across all monitors over last 24h @@ -6666,7 +5181,7 @@ type NotificationDispatchDto struct { AcknowledgedAt *time.Time `json:"acknowledgedAt,omitempty"` // CompletionReason Why the dispatch reached COMPLETED: EXHAUSTED (all steps ran, no ack), RESOLVED (incident resolved), NO_STEPS (policy had no steps). Null for non-terminal states. - CompletionReason *NotificationDispatchDtoCompletionReason `json:"completionReason,omitempty"` + CompletionReason *string `json:"completionReason,omitempty"` // CreatedAt Timestamp when the dispatch was created CreatedAt time.Time `json:"createdAt"` @@ -6696,7 +5211,7 @@ type NotificationDispatchDto struct { PolicyName *string `json:"policyName,omitempty"` // Status Current dispatch state - Status NotificationDispatchDtoStatus `json:"status"` + Status string `json:"status"` // TotalSteps Total number of escalation steps in the policy (null if policy has been deleted) TotalSteps *int32 `json:"totalSteps,omitempty"` @@ -6705,12 +5220,6 @@ type NotificationDispatchDto struct { UpdatedAt time.Time `json:"updatedAt"` } -// NotificationDispatchDtoCompletionReason Why the dispatch reached COMPLETED: EXHAUSTED (all steps ran, no ack), RESOLVED (incident resolved), NO_STEPS (policy had no steps). Null for non-terminal states. -type NotificationDispatchDtoCompletionReason string - -// NotificationDispatchDtoStatus Current dispatch state -type NotificationDispatchDtoStatus string - // NotificationDto In-app notification for the current user type NotificationDto struct { // Body Full notification body; null for title-only notifications @@ -7064,7 +5573,7 @@ type ResourceGroupDto struct { Health ResourceGroupHealthDto `json:"health"` // HealthThresholdType Health threshold type: COUNT or PERCENTAGE - HealthThresholdType *ResourceGroupDtoHealthThresholdType `json:"healthThresholdType,omitempty"` + HealthThresholdType *string `json:"healthThresholdType,omitempty"` // HealthThresholdValue Health threshold value HealthThresholdValue *float32 `json:"healthThresholdValue,omitempty"` @@ -7073,7 +5582,7 @@ type ResourceGroupDto struct { Id openapi_types.UUID `json:"id"` // ManagedBy Source that created/owns this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on groups created before this attribution column existed. - ManagedBy *ResourceGroupDtoManagedBy `json:"managedBy,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` // Members Member list with individual statuses; populated on detail GET only Members *[]ResourceGroupMemberDto `json:"members,omitempty"` @@ -7097,12 +5606,6 @@ type ResourceGroupDto struct { UpdatedAt time.Time `json:"updatedAt"` } -// ResourceGroupDtoHealthThresholdType Health threshold type: COUNT or PERCENTAGE -type ResourceGroupDtoHealthThresholdType string - -// ResourceGroupDtoManagedBy Source that created/owns this group: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on groups created before this attribution column existed. -type ResourceGroupDtoManagedBy string - // ResourceGroupHealthDto Aggregated health summary for a resource group type ResourceGroupHealthDto struct { // ActiveIncidents Number of members with an active incident or non-operational status @@ -7115,21 +5618,15 @@ type ResourceGroupHealthDto struct { OperationalCount int32 `json:"operationalCount"` // Status Worst-of health status across all members - Status ResourceGroupHealthDtoStatus `json:"status"` + Status string `json:"status"` // ThresholdStatus Computed group health status based on threshold: 'healthy', 'degraded', or 'down'. Null when no health threshold is configured. - ThresholdStatus *ResourceGroupHealthDtoThresholdStatus `json:"thresholdStatus,omitempty"` + ThresholdStatus *string `json:"thresholdStatus,omitempty"` // TotalMembers Total number of members in the group TotalMembers int32 `json:"totalMembers"` } -// ResourceGroupHealthDtoStatus Worst-of health status across all members -type ResourceGroupHealthDtoStatus string - -// ResourceGroupHealthDtoThresholdStatus Computed group health status based on threshold: 'healthy', 'degraded', or 'down'. Null when no health threshold is configured. -type ResourceGroupHealthDtoThresholdStatus string - // ResourceGroupMemberDto A single member of a resource group with its computed health status type ResourceGroupMemberDto struct { // AvgLatencyMs Average latency in ms (monitors only); populated when includeMetrics=true @@ -7178,7 +5675,7 @@ type ResourceGroupMemberDto struct { Slug *string `json:"slug,omitempty"` // Status Computed health status for this member - Status ResourceGroupMemberDtoStatus `json:"status"` + Status string `json:"status"` // SubscriptionId Subscription ID for the service (services only); used to link to the dependency detail page SubscriptionId *openapi_types.UUID `json:"subscriptionId,omitempty"` @@ -7187,9 +5684,6 @@ type ResourceGroupMemberDto struct { Uptime24h *float64 `json:"uptime24h,omitempty"` } -// ResourceGroupMemberDtoStatus Computed health status for this member -type ResourceGroupMemberDtoStatus string - // ResponseSizeAssertion defines model for ResponseSizeAssertion. type ResponseSizeAssertion struct { // MaxBytes Maximum response body size in bytes before the check fails @@ -7227,7 +5721,7 @@ type ResultSummaryDto struct { ChartData []ChartBucketDto `json:"chartData"` // CurrentStatus Derived current status across all regions - CurrentStatus ResultSummaryDtoCurrentStatus `json:"currentStatus"` + CurrentStatus string `json:"currentStatus"` // LatestPerRegion Latest check result per region LatestPerRegion []RegionStatusDto `json:"latestPerRegion"` @@ -7239,9 +5733,6 @@ type ResultSummaryDto struct { UptimeWindow *float64 `json:"uptimeWindow,omitempty"` } -// ResultSummaryDtoCurrentStatus Derived current status across all regions -type ResultSummaryDtoCurrentStatus string - // RetryStrategy Default retry strategy for member monitors; null clears type RetryStrategy struct { // Interval Delay between retry attempts in seconds @@ -7613,9 +6104,9 @@ type ServiceSubscriptionDto struct { AdapterType string `json:"adapterType"` // AlertSensitivity Alert sensitivity: ALL (synthetic + real incidents), INCIDENTS_ONLY (real vendor incidents, default), MAJOR_ONLY (real + DOWN severity) - AlertSensitivity ServiceSubscriptionDtoAlertSensitivity `json:"alertSensitivity"` - Category *string `json:"category,omitempty"` - Component *ServiceComponentDto `json:"component,omitempty"` + AlertSensitivity string `json:"alertSensitivity"` + Category *string `json:"category,omitempty"` + Component *ServiceComponentDto `json:"component,omitempty"` // ComponentId Subscribed component id; null for whole-service subscription ComponentId *openapi_types.UUID `json:"componentId,omitempty"` @@ -7641,9 +6132,6 @@ type ServiceSubscriptionDto struct { SubscriptionId openapi_types.UUID `json:"subscriptionId"` } -// ServiceSubscriptionDtoAlertSensitivity Alert sensitivity: ALL (synthetic + real incidents), INCIDENTS_ONLY (real vendor incidents, default), MAJOR_ONLY (real + DOWN severity) -type ServiceSubscriptionDtoAlertSensitivity string - // ServiceUptimeResponse Uptime response with per-bucket breakdown and overall percentage for the period type ServiceUptimeResponse struct { // Buckets Per-bucket breakdown ordered by time ascending @@ -8086,29 +6574,23 @@ type StatusPageBranding struct { // StatusPageComponentDto defines model for StatusPageComponentDto. type StatusPageComponentDto struct { - CreatedAt time.Time `json:"createdAt"` - CurrentStatus StatusPageComponentDtoCurrentStatus `json:"currentStatus"` - Description *string `json:"description,omitempty"` - DisplayOrder int32 `json:"displayOrder"` - ExcludeFromOverall bool `json:"excludeFromOverall"` - GroupId *openapi_types.UUID `json:"groupId,omitempty"` - Id openapi_types.UUID `json:"id"` - MonitorId *openapi_types.UUID `json:"monitorId,omitempty"` - Name string `json:"name"` - PageOrder int32 `json:"pageOrder"` - ResourceGroupId *openapi_types.UUID `json:"resourceGroupId,omitempty"` - ShowUptime bool `json:"showUptime"` - StartDate *time.Time `json:"startDate,omitempty"` - StatusPageId openapi_types.UUID `json:"statusPageId"` - Type StatusPageComponentDtoType `json:"type"` - UpdatedAt time.Time `json:"updatedAt"` -} - -// StatusPageComponentDtoCurrentStatus defines model for StatusPageComponentDto.CurrentStatus. -type StatusPageComponentDtoCurrentStatus string - -// StatusPageComponentDtoType defines model for StatusPageComponentDto.Type. -type StatusPageComponentDtoType string + CreatedAt time.Time `json:"createdAt"` + CurrentStatus string `json:"currentStatus"` + Description *string `json:"description,omitempty"` + DisplayOrder int32 `json:"displayOrder"` + ExcludeFromOverall bool `json:"excludeFromOverall"` + GroupId *openapi_types.UUID `json:"groupId,omitempty"` + Id openapi_types.UUID `json:"id"` + MonitorId *openapi_types.UUID `json:"monitorId,omitempty"` + Name string `json:"name"` + PageOrder int32 `json:"pageOrder"` + ResourceGroupId *openapi_types.UUID `json:"resourceGroupId,omitempty"` + ShowUptime bool `json:"showUptime"` + StartDate *time.Time `json:"startDate,omitempty"` + StatusPageId openapi_types.UUID `json:"statusPageId"` + Type string `json:"type"` + UpdatedAt time.Time `json:"updatedAt"` +} // StatusPageComponentGroupDto defines model for StatusPageComponentGroupDto. type StatusPageComponentGroupDto struct { @@ -8126,73 +6608,52 @@ type StatusPageComponentGroupDto struct { // StatusPageCustomDomainDto defines model for StatusPageCustomDomainDto. type StatusPageCustomDomainDto struct { - CfCustomHostnameId *string `json:"cfCustomHostnameId,omitempty"` - CfSslStatus *string `json:"cfSslStatus,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Hostname string `json:"hostname"` - Id openapi_types.UUID `json:"id"` - Primary bool `json:"primary"` - SslActiveAt *time.Time `json:"sslActiveAt,omitempty"` - Status StatusPageCustomDomainDtoStatus `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - VerificationCnameTarget string `json:"verificationCnameTarget"` - VerificationError *string `json:"verificationError,omitempty"` - VerificationMethod StatusPageCustomDomainDtoVerificationMethod `json:"verificationMethod"` - VerificationToken string `json:"verificationToken"` - VerifiedAt *time.Time `json:"verifiedAt,omitempty"` -} - -// StatusPageCustomDomainDtoStatus defines model for StatusPageCustomDomainDto.Status. -type StatusPageCustomDomainDtoStatus string - -// StatusPageCustomDomainDtoVerificationMethod defines model for StatusPageCustomDomainDto.VerificationMethod. -type StatusPageCustomDomainDtoVerificationMethod string + CfCustomHostnameId *string `json:"cfCustomHostnameId,omitempty"` + CfSslStatus *string `json:"cfSslStatus,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Hostname string `json:"hostname"` + Id openapi_types.UUID `json:"id"` + Primary bool `json:"primary"` + SslActiveAt *time.Time `json:"sslActiveAt,omitempty"` + Status string `json:"status"` + UpdatedAt time.Time `json:"updatedAt"` + VerificationCnameTarget string `json:"verificationCnameTarget"` + VerificationError *string `json:"verificationError,omitempty"` + VerificationMethod string `json:"verificationMethod"` + VerificationToken string `json:"verificationToken"` + VerifiedAt *time.Time `json:"verifiedAt,omitempty"` +} // StatusPageDto defines model for StatusPageDto. type StatusPageDto struct { // Branding Updated branding configuration; null preserves current - Branding StatusPageBranding `json:"branding"` - ComponentCount *int32 `json:"componentCount,omitempty"` - CreatedAt time.Time `json:"createdAt"` - Description *string `json:"description,omitempty"` - Enabled bool `json:"enabled"` - Id openapi_types.UUID `json:"id"` - IncidentMode StatusPageDtoIncidentMode `json:"incidentMode"` + Branding StatusPageBranding `json:"branding"` + ComponentCount *int32 `json:"componentCount,omitempty"` + CreatedAt time.Time `json:"createdAt"` + Description *string `json:"description,omitempty"` + Enabled bool `json:"enabled"` + Id openapi_types.UUID `json:"id"` + IncidentMode string `json:"incidentMode"` // ManagedBy Source that created/owns this status page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on pages created before this attribution column existed. - ManagedBy *StatusPageDtoManagedBy `json:"managedBy,omitempty"` - Name string `json:"name"` - OrganizationId int32 `json:"organizationId"` - OverallStatus *StatusPageDtoOverallStatus `json:"overallStatus,omitempty"` - Slug string `json:"slug"` - SubscriberCount *int64 `json:"subscriberCount,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility StatusPageDtoVisibility `json:"visibility"` - WorkspaceId int32 `json:"workspaceId"` + ManagedBy *string `json:"managedBy,omitempty"` + Name string `json:"name"` + OrganizationId int32 `json:"organizationId"` + OverallStatus *string `json:"overallStatus,omitempty"` + Slug string `json:"slug"` + SubscriberCount *int64 `json:"subscriberCount,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + Visibility string `json:"visibility"` + WorkspaceId int32 `json:"workspaceId"` } -// StatusPageDtoIncidentMode defines model for StatusPageDto.IncidentMode. -type StatusPageDtoIncidentMode string - -// StatusPageDtoManagedBy Source that created/owns this status page: DASHBOARD, CLI, TERRAFORM, MCP, or API. Null on pages created before this attribution column existed. -type StatusPageDtoManagedBy string - -// StatusPageDtoOverallStatus defines model for StatusPageDto.OverallStatus. -type StatusPageDtoOverallStatus string - -// StatusPageDtoVisibility defines model for StatusPageDto.Visibility. -type StatusPageDtoVisibility string - // StatusPageIncidentComponentDto defines model for StatusPageIncidentComponentDto. type StatusPageIncidentComponentDto struct { - ComponentName string `json:"componentName"` - ComponentStatus StatusPageIncidentComponentDtoComponentStatus `json:"componentStatus"` - StatusPageComponentId openapi_types.UUID `json:"statusPageComponentId"` + ComponentName string `json:"componentName"` + ComponentStatus string `json:"componentStatus"` + StatusPageComponentId openapi_types.UUID `json:"statusPageComponentId"` } -// StatusPageIncidentComponentDtoComponentStatus defines model for StatusPageIncidentComponentDto.ComponentStatus. -type StatusPageIncidentComponentDtoComponentStatus string - // StatusPageIncidentDto defines model for StatusPageIncidentDto. type StatusPageIncidentDto struct { AffectedComponents *[]StatusPageIncidentComponentDto `json:"affectedComponents,omitempty"` @@ -8200,7 +6661,7 @@ type StatusPageIncidentDto struct { CreatedAt time.Time `json:"createdAt"` CreatedByUserId *int32 `json:"createdByUserId,omitempty"` Id openapi_types.UUID `json:"id"` - Impact StatusPageIncidentDtoImpact `json:"impact"` + Impact string `json:"impact"` IncidentId *openapi_types.UUID `json:"incidentId,omitempty"` PostmortemBody *string `json:"postmortemBody,omitempty"` PostmortemUrl *string `json:"postmortemUrl,omitempty"` @@ -8210,36 +6671,24 @@ type StatusPageIncidentDto struct { ScheduledFor *time.Time `json:"scheduledFor,omitempty"` ScheduledUntil *time.Time `json:"scheduledUntil,omitempty"` StartedAt time.Time `json:"startedAt"` - Status StatusPageIncidentDtoStatus `json:"status"` + Status string `json:"status"` StatusPageId openapi_types.UUID `json:"statusPageId"` Title string `json:"title"` UpdatedAt time.Time `json:"updatedAt"` Updates *[]StatusPageIncidentUpdateDto `json:"updates,omitempty"` } -// StatusPageIncidentDtoImpact defines model for StatusPageIncidentDto.Impact. -type StatusPageIncidentDtoImpact string - -// StatusPageIncidentDtoStatus defines model for StatusPageIncidentDto.Status. -type StatusPageIncidentDtoStatus string - // StatusPageIncidentUpdateDto defines model for StatusPageIncidentUpdateDto. type StatusPageIncidentUpdateDto struct { - Body string `json:"body"` - CreatedAt time.Time `json:"createdAt"` - CreatedBy *StatusPageIncidentUpdateDtoCreatedBy `json:"createdBy,omitempty"` - CreatedByUserId *int32 `json:"createdByUserId,omitempty"` - Id openapi_types.UUID `json:"id"` - NotifySubscribers bool `json:"notifySubscribers"` - Status StatusPageIncidentUpdateDtoStatus `json:"status"` + Body string `json:"body"` + CreatedAt time.Time `json:"createdAt"` + CreatedBy *string `json:"createdBy,omitempty"` + CreatedByUserId *int32 `json:"createdByUserId,omitempty"` + Id openapi_types.UUID `json:"id"` + NotifySubscribers bool `json:"notifySubscribers"` + Status string `json:"status"` } -// StatusPageIncidentUpdateDtoCreatedBy defines model for StatusPageIncidentUpdateDto.CreatedBy. -type StatusPageIncidentUpdateDtoCreatedBy string - -// StatusPageIncidentUpdateDtoStatus defines model for StatusPageIncidentUpdateDto.Status. -type StatusPageIncidentUpdateDtoStatus string - // StatusPageSubscriberDto defines model for StatusPageSubscriberDto. type StatusPageSubscriberDto struct { Confirmed bool `json:"confirmed"` diff --git a/internal/provider/alert_channel_acc_test.go b/internal/provider/alert_channel_acc_test.go index 96bf67e..0c0ce7f 100644 --- a/internal/provider/alert_channel_acc_test.go +++ b/internal/provider/alert_channel_acc_test.go @@ -33,7 +33,7 @@ func alertChannelFixture(name, hash string) generated.AlertChannelDto { return generated.AlertChannelDto{ Id: openapi_types.UUID(id), Name: name, - ChannelType: generated.AlertChannelDtoChannelTypeSlack, + ChannelType: "slack", ConfigHash: &hashCopy, CreatedAt: time.Now(), UpdatedAt: time.Now(), diff --git a/internal/provider/datasources/datasources_test.go b/internal/provider/datasources/datasources_test.go index e52c02a..99e0b9d 100644 --- a/internal/provider/datasources/datasources_test.go +++ b/internal/provider/datasources/datasources_test.go @@ -102,7 +102,7 @@ func TestMapAlertChannelToState_PopulatesAllSurfacedFields(t *testing.T) { dto := &generated.AlertChannelDto{ Id: id, Name: "ops-slack", - ChannelType: generated.AlertChannelDtoChannelTypeSlack, + ChannelType: "slack", } var model AlertChannelDataSourceModel mapAlertChannelToState(&model, dto) @@ -112,7 +112,7 @@ func TestMapAlertChannelToState_PopulatesAllSurfacedFields(t *testing.T) { if model.Name.ValueString() != "ops-slack" { t.Errorf("Name: got %q", model.Name.ValueString()) } - if model.ChannelType.ValueString() != string(generated.AlertChannelDtoChannelTypeSlack) { + if model.ChannelType.ValueString() != string("slack") { t.Errorf("ChannelType: got %q", model.ChannelType.ValueString()) } } @@ -129,7 +129,7 @@ func TestMapMonitorToState_FullDtoRoundTripsToState(t *testing.T) { dto := &generated.MonitorDto{ Id: id, Name: "homepage", - Type: generated.MonitorDtoType("HTTP"), + Type: "HTTP", FrequencySeconds: 60, Enabled: true, Config: cfg, @@ -181,7 +181,7 @@ func TestMapMonitorToState_NilPingUrlBecomesNullNotEmpty(t *testing.T) { dto := &generated.MonitorDto{ Id: id, Name: "tcp-check", - Type: generated.MonitorDtoType("TCP"), + Type: "TCP", FrequencySeconds: 30, Enabled: false, Config: cfg, @@ -205,7 +205,7 @@ func TestMapMonitorToState_EmptyConfigBecomesNull(t *testing.T) { dto := &generated.MonitorDto{ Id: id, Name: "x", - Type: generated.MonitorDtoType("HEARTBEAT"), + Type: "HEARTBEAT", FrequencySeconds: 300, Enabled: true, Config: cfg, @@ -269,9 +269,9 @@ func TestMapStatusPageToState_PopulatesAllFieldsAndSyntheticPageURL(t *testing.T Name: "Acme Status", Slug: "acme", Description: &desc, - Visibility: generated.StatusPageDtoVisibilityPUBLIC, + Visibility: "PUBLIC", Enabled: true, - IncidentMode: generated.StatusPageDtoIncidentModeMANUAL, + IncidentMode: "MANUAL", } var model StatusPageDataSourceModel mapStatusPageToState(&model, dto) @@ -288,13 +288,13 @@ func TestMapStatusPageToState_PopulatesAllFieldsAndSyntheticPageURL(t *testing.T if model.Description.ValueString() != desc { t.Errorf("Description: %q", model.Description.ValueString()) } - if model.Visibility.ValueString() != string(generated.StatusPageDtoVisibilityPUBLIC) { + if model.Visibility.ValueString() != string("PUBLIC") { t.Error("Visibility") } if !model.Enabled.ValueBool() { t.Error("Enabled") } - if model.IncidentMode.ValueString() != string(generated.StatusPageDtoIncidentModeMANUAL) { + if model.IncidentMode.ValueString() != string("MANUAL") { t.Error("IncidentMode") } // PageURL is a *synthetic* field — the API doesn't return it, the @@ -314,9 +314,9 @@ func TestMapStatusPageToState_NilDescriptionBecomesNull(t *testing.T) { Name: "x", Slug: "x", Description: nil, - Visibility: generated.StatusPageDtoVisibilityPASSWORD, + Visibility: "PASSWORD", Enabled: false, - IncidentMode: generated.StatusPageDtoIncidentModeAUTOMATIC, + IncidentMode: "AUTOMATIC", } var model StatusPageDataSourceModel mapStatusPageToState(&model, dto) diff --git a/internal/provider/datasources/negative_datasource_test.go b/internal/provider/datasources/negative_datasource_test.go index 479448f..3349db3 100644 --- a/internal/provider/datasources/negative_datasource_test.go +++ b/internal/provider/datasources/negative_datasource_test.go @@ -71,8 +71,8 @@ func TestMatchByName_MultipleMatches_AllReturned(t *testing.T) { id1 := mustUUID(t, "11111111-1111-1111-1111-111111111111") id2 := mustUUID(t, "22222222-2222-2222-2222-222222222222") items := []generated.AlertChannelDto{ - {Id: id1, Name: "ops-slack", ChannelType: generated.AlertChannelDtoChannelTypeSlack}, - {Id: id2, Name: "ops-slack", ChannelType: generated.AlertChannelDtoChannelTypeDiscord}, + {Id: id1, Name: "ops-slack", ChannelType: "slack"}, + {Id: id2, Name: "ops-slack", ChannelType: "discord"}, } got := matchByName(items, "ops-slack", func(c generated.AlertChannelDto) string { return c.Name }) if len(got) != 2 { @@ -133,14 +133,14 @@ func TestMapAlertChannelToState_EmptyNamePreserved(t *testing.T) { dto := &generated.AlertChannelDto{ Id: id, Name: "", - ChannelType: generated.AlertChannelDtoChannelTypeWebhook, + ChannelType: "webhook", } var model AlertChannelDataSourceModel mapAlertChannelToState(&model, dto) if model.Name.ValueString() != "" { t.Errorf("Name should be empty string, got %q", model.Name.ValueString()) } - if model.ChannelType.ValueString() != string(generated.AlertChannelDtoChannelTypeWebhook) { + if model.ChannelType.ValueString() != string("webhook") { t.Errorf("ChannelType = %q", model.ChannelType.ValueString()) } } @@ -242,9 +242,9 @@ func TestMapStatusPageToState_SyntheticPageURLWithSlug(t *testing.T) { Id: id, Name: "Test", Slug: "my-company", - Visibility: generated.StatusPageDtoVisibilityPUBLIC, + Visibility: "PUBLIC", Enabled: true, - IncidentMode: generated.StatusPageDtoIncidentModeAUTOMATIC, + IncidentMode: "AUTOMATIC", } var model StatusPageDataSourceModel mapStatusPageToState(&model, dto) diff --git a/internal/provider/partial_failure_acc_test.go b/internal/provider/partial_failure_acc_test.go index 79f92af..a7ef0ee 100644 --- a/internal/provider/partial_failure_acc_test.go +++ b/internal/provider/partial_failure_acc_test.go @@ -77,12 +77,12 @@ func monitorPartialFixture(t *testing.T, id, name string, tagIDs []string) gener return generated.MonitorDto{ Id: monID, Name: name, - Type: generated.MonitorDtoType("HTTP"), + Type: "HTTP", FrequencySeconds: 60, Enabled: true, Regions: []string{"us-east"}, Config: cfg, - ManagedBy: generated.MonitorDtoManagedBy("TERRAFORM"), + ManagedBy: "TERRAFORM", OrganizationId: 1, Tags: tags, CreatedAt: time.Now(), diff --git a/internal/provider/resources/alert_channel.go b/internal/provider/resources/alert_channel.go index d8ef039..bb18cfc 100644 --- a/internal/provider/resources/alert_channel.go +++ b/internal/provider/resources/alert_channel.go @@ -155,49 +155,56 @@ func (r *AlertChannelResource) buildConfig(model *AlertChannelResourceModel) (js channelType := model.ChannelType.ValueString() // Each subtype carries its own per-discriminator enum (e.g. - // SlackChannelConfigChannelType with one value `Slack`). The discriminator - // inlining in the upstream OpenAPI preprocessor produces tagged unions — - // codegens emit one type per subtype rather than a shared enum, so - // each struct literal needs its own typed constant. + // SlackChannelConfigChannelType with one value `Slack`). The + // discriminator inlining in the upstream OpenAPI preprocessor + // produces tagged unions — codegens emit one type per subtype rather + // than a shared enum, so each struct literal needs its own typed + // constant. The switch dispatches on the raw `channelType` string + // because the parent `AlertChannelDto.channelType` typed alias was + // dropped by the spec-level Postel's-Law relaxation + // (`mini/runbooks/api-contract.md` § 3); response DTOs decode the + // channel type as plain `string`. We compare against the canonical + // subtype constants (cast to string) so a wire-format rename here + // will trip the Go compiler at the right line. var cfg any - switch generated.AlertChannelDtoChannelType(channelType) { - case generated.AlertChannelDtoChannelTypeSlack: + switch channelType { + case string(generated.SlackChannelConfigChannelTypeSlack): cfg = generated.SlackChannelConfig{ - ChannelType: generated.Slack, + ChannelType: generated.SlackChannelConfigChannelTypeSlack, WebhookUrl: model.WebhookURL.ValueString(), MentionText: stringPtrOrNil(model.MentionText), } - case generated.AlertChannelDtoChannelTypeDiscord: + case string(generated.DiscordChannelConfigChannelTypeDiscord): cfg = generated.DiscordChannelConfig{ ChannelType: generated.DiscordChannelConfigChannelTypeDiscord, WebhookUrl: model.WebhookURL.ValueString(), MentionRoleId: stringPtrOrNil(model.MentionRoleID), } - case generated.AlertChannelDtoChannelTypeEmail: + case string(generated.EmailChannelConfigChannelTypeEmail): cfg = generated.EmailChannelConfig{ ChannelType: generated.EmailChannelConfigChannelTypeEmail, Recipients: emailsFromStringList(model.Recipients), } - case generated.AlertChannelDtoChannelTypePagerduty: + case string(generated.PagerDutyChannelConfigChannelTypePagerduty): cfg = generated.PagerDutyChannelConfig{ - ChannelType: generated.Pagerduty, + ChannelType: generated.PagerDutyChannelConfigChannelTypePagerduty, RoutingKey: model.RoutingKey.ValueString(), SeverityOverride: stringPtrOrNil(model.SeverityOverride), } - case generated.AlertChannelDtoChannelTypeOpsgenie: + case string(generated.OpsGenieChannelConfigChannelTypeOpsgenie): cfg = generated.OpsGenieChannelConfig{ - ChannelType: generated.Opsgenie, + ChannelType: generated.OpsGenieChannelConfigChannelTypeOpsgenie, ApiKey: model.APIKey.ValueString(), Region: stringPtrOrNil(model.Region), } - case generated.AlertChannelDtoChannelTypeTeams: + case string(generated.TeamsChannelConfigChannelTypeTeams): cfg = generated.TeamsChannelConfig{ - ChannelType: generated.Teams, + ChannelType: generated.TeamsChannelConfigChannelTypeTeams, WebhookUrl: model.WebhookURL.ValueString(), } - case generated.AlertChannelDtoChannelTypeWebhook: + case string(generated.WebhookChannelConfigChannelTypeWebhook): cfg = generated.WebhookChannelConfig{ - ChannelType: generated.Webhook, + ChannelType: generated.WebhookChannelConfigChannelTypeWebhook, Url: model.URL.ValueString(), CustomHeaders: stringMapToPtr(model.CustomHeaders), SigningSecret: stringPtrOrNil(model.SigningSecret), diff --git a/internal/provider/resources/dependency.go b/internal/provider/resources/dependency.go index 0e42175..22b909a 100644 --- a/internal/provider/resources/dependency.go +++ b/internal/provider/resources/dependency.go @@ -61,11 +61,7 @@ func (r *DependencyResource) Schema(_ context.Context, _ resource.SchemaRequest, Optional: true, Computed: true, Description: "Alert sensitivity: ALL, INCIDENTS_ONLY, or MAJOR_ONLY (default: ALL, computed by the API)", Validators: []validator.String{ - stringvalidator.OneOf( - string(generated.ALL), - string(generated.INCIDENTSONLY), - string(generated.MAJORONLY), - ), + stringvalidator.OneOf(api.AlertSensitivities...), }, PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()}, }, diff --git a/internal/provider/resources/monitor.go b/internal/provider/resources/monitor.go index ed04cbd..14168b9 100644 --- a/internal/provider/resources/monitor.go +++ b/internal/provider/resources/monitor.go @@ -298,8 +298,8 @@ func (r *MonitorResource) Schema(_ context.Context, _ resource.SchemaRequest, re Description: "Rule scope: per_region or any_region", Validators: []validator.String{ stringvalidator.OneOf( - string(generated.PerRegion), - string(generated.AnyRegion), + string(generated.TriggerRuleScopePerRegion), + string(generated.TriggerRuleScopeAnyRegion), ), }, PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()}, @@ -333,10 +333,10 @@ func (r *MonitorResource) Schema(_ context.Context, _ resource.SchemaRequest, re Description: "Aggregation type: all_exceed, average, p95, max", Validators: []validator.String{ stringvalidator.OneOf( - string(generated.AllExceed), - string(generated.Average), - string(generated.P95), - string(generated.Max), + string(generated.TriggerRuleAggregationTypeAllExceed), + string(generated.TriggerRuleAggregationTypeAverage), + string(generated.TriggerRuleAggregationTypeP95), + string(generated.TriggerRuleAggregationTypeMax), ), }, PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()}, diff --git a/internal/provider/resources/monitor_auth.go b/internal/provider/resources/monitor_auth.go index 5013880..b9888c0 100644 --- a/internal/provider/resources/monitor_auth.go +++ b/internal/provider/resources/monitor_auth.go @@ -120,7 +120,7 @@ func buildMonitorAuthConfig(ctx context.Context, auth types.Object) (*generated. return nil, fmt.Errorf("auth.bearer.vault_secret_id: %w", err) } if err := out.FromBearerAuthConfig(generated.BearerAuthConfig{ - Type: generated.Bearer, + Type: generated.BearerAuthConfigTypeBearer, VaultSecretId: secret, }); err != nil { return nil, fmt.Errorf("auth.bearer: %w", err) @@ -135,7 +135,7 @@ func buildMonitorAuthConfig(ctx context.Context, auth types.Object) (*generated. return nil, fmt.Errorf("auth.basic.vault_secret_id: %w", err) } if err := out.FromBasicAuthConfig(generated.BasicAuthConfig{ - Type: generated.Basic, + Type: generated.BasicAuthConfigTypeBasic, VaultSecretId: secret, }); err != nil { return nil, fmt.Errorf("auth.basic: %w", err) @@ -153,7 +153,7 @@ func buildMonitorAuthConfig(ctx context.Context, auth types.Object) (*generated. return nil, fmt.Errorf("auth.header.vault_secret_id: %w", err) } if err := out.FromHeaderAuthConfig(generated.HeaderAuthConfig{ - Type: generated.Header, + Type: generated.HeaderAuthConfigTypeHeader, HeaderName: v.HeaderName.ValueString(), VaultSecretId: secret, }); err != nil { diff --git a/internal/provider/resources/monitor_test.go b/internal/provider/resources/monitor_test.go index 62826a8..aabd225 100644 --- a/internal/provider/resources/monitor_test.go +++ b/internal/provider/resources/monitor_test.go @@ -359,14 +359,14 @@ func fullyPopulatedMonitorDto(t *testing.T) *generated.MonitorDto { _ = asnCfg.UnmarshalJSON([]byte(`{"type":"status_code","expected":"200","operator":"equals"}`)) auth := generated.MonitorAuthConfig{} - if err := auth.FromBearerAuthConfig(generated.BearerAuthConfig{Type: generated.Bearer}); err != nil { + if err := auth.FromBearerAuthConfig(generated.BearerAuthConfig{Type: generated.BearerAuthConfigTypeBearer}); err != nil { t.Fatalf("auth: %v", err) } return &generated.MonitorDto{ Id: id, Name: "acme-api", - Type: generated.MonitorDtoType("HTTP"), + Type: "HTTP", FrequencySeconds: 60, Enabled: true, Regions: []string{"us-east", "eu-west"}, @@ -380,8 +380,8 @@ func fullyPopulatedMonitorDto(t *testing.T) *generated.MonitorDto { { Id: openapi_types.UUID(uuid.New()), MonitorId: id, - AssertionType: generated.MonitorAssertionDtoAssertionType("status_code"), - Severity: generated.MonitorAssertionDtoSeverity("fail"), + AssertionType: "status_code", + Severity: "fail", Config: asnCfg, }, }, diff --git a/internal/provider/resources/resource_group_test.go b/internal/provider/resources/resource_group_test.go index a2bdf7e..3282036 100644 --- a/internal/provider/resources/resource_group_test.go +++ b/internal/provider/resources/resource_group_test.go @@ -274,7 +274,7 @@ func fullyPopulatedResourceGroupDto(t *testing.T) *generated.ResourceGroupDto { envID := openapi_types.UUID(uuid.New()) desc := "backend services" freq := int32(120) - thresholdType := generated.ResourceGroupDtoHealthThresholdType("COUNT") + thresholdType := "COUNT" thresholdVal := float32(2.0) confirm := int32(30) cooldown := int32(10) diff --git a/internal/provider/resources/status_page_custom_domain.go b/internal/provider/resources/status_page_custom_domain.go index 57a86f2..5e6794f 100644 --- a/internal/provider/resources/status_page_custom_domain.go +++ b/internal/provider/resources/status_page_custom_domain.go @@ -473,16 +473,21 @@ func (r *StatusPageCustomDomainResource) mapToState(model *StatusPageCustomDomai trafficValue := dto.VerificationCnameTarget model.TrafficRecord = dnsRecordObject(trafficName, "CNAME", trafficValue) - // Verification placement depends on the method the API picked. + // Verification placement depends on the method the API picked. The + // `verificationMethod` field on `StatusPageCustomDomainDto` is + // response-shaped, so the spec-level Postel's-Law relaxation + // (`mini/runbooks/api-contract.md` § 3) drops the typed alias and + // the codegen exposes it as plain `string`. Unknown future methods + // fall through the `default` arm (CNAME placement) — which is the + // safer fallback because the traffic record already covers it. switch dto.VerificationMethod { - case generated.StatusPageCustomDomainDtoVerificationMethodTXT: + case "TXT": model.VerificationRecord = dnsRecordObject( "_devhelm-verification."+dto.Hostname, "TXT", dto.VerificationToken, ) default: - // CNAME (default) — verification record IS the traffic record. model.VerificationRecord = dnsRecordObject(trafficName, "CNAME", trafficValue) } } diff --git a/internal/provider/resources/status_page_custom_domain_test.go b/internal/provider/resources/status_page_custom_domain_test.go index ace19e5..d8cc9bc 100644 --- a/internal/provider/resources/status_page_custom_domain_test.go +++ b/internal/provider/resources/status_page_custom_domain_test.go @@ -21,8 +21,8 @@ func TestStatusPageCustomDomain_MapToState_CNAMEMethodCollapsesRecords(t *testin dto := &generated.StatusPageCustomDomainDto{ Id: openapi_types.UUID(uuid.MustParse("00000000-0000-0000-0000-000000000abc")), Hostname: "status.acme.com", - Status: generated.VERIFIED, - VerificationMethod: generated.StatusPageCustomDomainDtoVerificationMethodCNAME, + Status: "VERIFIED", + VerificationMethod: "CNAME", VerificationToken: "tok-cname-unused", VerificationCnameTarget: "acme.devhelm.io", VerifiedAt: &verifiedAt, @@ -63,8 +63,8 @@ func TestStatusPageCustomDomain_MapToState_TXTMethodSplitsRecords(t *testing.T) dto := &generated.StatusPageCustomDomainDto{ Id: openapi_types.UUID(uuid.MustParse("00000000-0000-0000-0000-000000000abc")), Hostname: "status.acme.com", - Status: generated.PENDINGVERIFICATION, - VerificationMethod: generated.StatusPageCustomDomainDtoVerificationMethodTXT, + Status: "PENDING_VERIFICATION", + VerificationMethod: "TXT", VerificationToken: "txt-token-xyz", VerificationCnameTarget: "acme.devhelm.io", VerifiedAt: nil, @@ -101,16 +101,16 @@ func TestStatusPageCustomDomain_MapToState_TXTMethodSplitsRecords(t *testing.T) func TestStatusPageCustomDomainVerification_IsVerifiedStatus(t *testing.T) { cases := []struct { - status generated.StatusPageCustomDomainDtoStatus + status string want bool }{ - {generated.VERIFIED, true}, - {generated.SSLPENDING, true}, - {generated.ACTIVE, true}, - {generated.PENDINGVERIFICATION, false}, - {generated.VERIFICATIONFAILED, false}, - {generated.FAILED, false}, - {generated.REMOVED, false}, + {"VERIFIED", true}, + {"SSL_PENDING", true}, + {"ACTIVE", true}, + {"PENDING_VERIFICATION", false}, + {"VERIFICATION_FAILED", false}, + {"FAILED", false}, + {"REMOVED", false}, } for _, tc := range cases { if got := isVerifiedStatus(tc.status); got != tc.want { diff --git a/internal/provider/resources/status_page_custom_domain_verification.go b/internal/provider/resources/status_page_custom_domain_verification.go index 13e7384..96c3973 100644 --- a/internal/provider/resources/status_page_custom_domain_verification.go +++ b/internal/provider/resources/status_page_custom_domain_verification.go @@ -242,7 +242,7 @@ func (r *StatusPageCustomDomainVerificationResource) Delete(_ context.Context, _ } func (r *StatusPageCustomDomainVerificationResource) applyDomainToState(model *StatusPageCustomDomainVerificationResourceModel, dto *generated.StatusPageCustomDomainDto) { - model.Status = types.StringValue(string(dto.Status)) + model.Status = types.StringValue(dto.Status) if dto.VerifiedAt != nil { model.VerifiedAt = types.StringValue(dto.VerifiedAt.UTC().Format(time.RFC3339)) } else { @@ -250,13 +250,25 @@ func (r *StatusPageCustomDomainVerificationResource) applyDomainToState(model *S } } +// Wire-format status values for `StatusPageCustomDomainDto.Status`. +// Sourced from the API response shape; the spec-level Postel's-Law +// relaxation (`mini/runbooks/api-contract.md` § 3) drops the typed +// alias on response-DTO enum fields, so the codegen exposes `Status` +// as `string` and unknown future statuses fall through the default +// arm of `isVerifiedStatus` (continue polling) rather than crashing. +const ( + customDomainStatusVerified = "VERIFIED" + customDomainStatusSSLPending = "SSL_PENDING" + customDomainStatusActive = "ACTIVE" +) + // isVerifiedStatus returns true for any domain status that means "the API // has confirmed ownership and we can stop polling." VERIFIED is the // immediate post-DNS state; SSL_PENDING and ACTIVE are subsequent stages // that imply verification already succeeded. -func isVerifiedStatus(s generated.StatusPageCustomDomainDtoStatus) bool { +func isVerifiedStatus(s string) bool { switch s { - case generated.VERIFIED, generated.SSLPENDING, generated.ACTIVE: + case customDomainStatusVerified, customDomainStatusSSLPending, customDomainStatusActive: return true } return false diff --git a/internal/provider/resources/status_page_test.go b/internal/provider/resources/status_page_test.go index cb915d1..4aae41c 100644 --- a/internal/provider/resources/status_page_test.go +++ b/internal/provider/resources/status_page_test.go @@ -134,9 +134,9 @@ func fullyPopulatedStatusPageDto() *generated.StatusPageDto { Name: "Acme Status", Slug: "acme", Description: &desc, - Visibility: generated.StatusPageDtoVisibilityPUBLIC, + Visibility: "PUBLIC", Enabled: true, - IncidentMode: generated.StatusPageDtoIncidentModeAUTOMATIC, + IncidentMode: "AUTOMATIC", Branding: generated.StatusPageBranding{ BrandColor: &cc, TextColor: &tc, @@ -394,7 +394,7 @@ func TestStatusPageComponent_MapToState_PopulatesEveryField(t *testing.T) { Id: id, Name: "Public API", Description: &desc, - Type: generated.StatusPageComponentDtoType("MONITOR"), + Type: "MONITOR", GroupId: &gid, MonitorId: &mid, ResourceGroupId: &rgid, // odd combo, but proves we map every field @@ -436,7 +436,7 @@ func TestStatusPageComponent_MapToState_NullsForOptionalRefs(t *testing.T) { dto := &generated.StatusPageComponentDto{ Id: openapi_types.UUID(uuid.New()), Name: "Static", - Type: generated.StatusPageComponentDtoType("STATIC"), + Type: "STATIC", DisplayOrder: 0, } model := &StatusPageComponentResourceModel{} @@ -461,7 +461,7 @@ func TestStatusPageComponent_MapToState_Idempotent(t *testing.T) { dto := &generated.StatusPageComponentDto{ Id: openapi_types.UUID(uuid.New()), Name: "x", - Type: generated.StatusPageComponentDtoType("STATIC"), + Type: "STATIC", StartDate: &startDate, } first := &StatusPageComponentResourceModel{} diff --git a/internal/provider/resources/webhook_dependency_test.go b/internal/provider/resources/webhook_dependency_test.go index 3c88401..2902743 100644 --- a/internal/provider/resources/webhook_dependency_test.go +++ b/internal/provider/resources/webhook_dependency_test.go @@ -194,7 +194,7 @@ func TestDependency_DTOReadShape(t *testing.T) { SubscriptionId: subID, Slug: "aws", Name: "Amazon Web Services", - AlertSensitivity: generated.ServiceSubscriptionDtoAlertSensitivity("INCIDENTS_ONLY"), + AlertSensitivity: "INCIDENTS_ONLY", ComponentId: &cid, } if dto.SubscriptionId.String() != subID.String() { diff --git a/internal/provider/status_page_acc_test.go b/internal/provider/status_page_acc_test.go index cc7c63b..c6b917b 100644 --- a/internal/provider/status_page_acc_test.go +++ b/internal/provider/status_page_acc_test.go @@ -29,8 +29,8 @@ func statusPageFixture() generated.StatusPageDto { Id: openapi_types.UUID(id), Name: "Initial", Slug: "initial-slug", - Visibility: generated.StatusPageDtoVisibilityPUBLIC, - IncidentMode: generated.StatusPageDtoIncidentModeAUTOMATIC, + Visibility: "PUBLIC", + IncidentMode: "AUTOMATIC", Enabled: true, Branding: generated.StatusPageBranding{}, OrganizationId: 1, diff --git a/scripts/oapi-codegen.yaml b/scripts/oapi-codegen.yaml new file mode 100644 index 0000000..32d0ce8 --- /dev/null +++ b/scripts/oapi-codegen.yaml @@ -0,0 +1,28 @@ +# oapi-codegen configuration for the DevHelm Terraform provider. +# +# Pins generation behavior so that the committed `internal/generated/types.go` +# is reproducible from the spec independent of enum-set churn. In particular: +# +# * `always-prefix-enum-values: true` forces every enum constant to be +# prefixed with its parent type name (`TriggerRuleSeverityDown` rather +# than the bare `Down`). Without this, oapi-codegen falls back to bare +# names whenever there's no collision at package level — meaning the +# constant identifier flips on any unrelated enum change. This breaks +# the forward-compat contract documented in +# `mini/runbooks/api-contract.md` § 3, since hand-written code that +# references `generated.Foo` would suddenly fail to compile when an +# unrelated DTO grows a `Foo` value of its own. +# +# * `resolve-type-name-collisions: true` lets the codegen rename +# colliding types by appending a section suffix instead of failing the +# run, which keeps `make typegen` resilient to spec evolution. +package: generated +generate: + models: true + client: false + embedded-spec: false + echo-server: false +compatibility: + always-prefix-enum-values: true +output-options: + resolve-type-name-collisions: true diff --git a/scripts/preprocess.mjs b/scripts/preprocess.mjs index a1cb93d..638d3f8 100644 --- a/scripts/preprocess.mjs +++ b/scripts/preprocess.mjs @@ -317,6 +317,75 @@ export function inlineNullableDeductionRefs(spec) { return Array.from(rewritten); } +/** + * Drop `enum` constraints from response-shape DTO properties so the + * generated Go types decode unknown future enum values as plain + * strings (Postel's Law contract — see + * `mini/runbooks/api-contract.md` § 2.2 + § 3). + * + * For oapi-codegen this means response-DTO enum fields stop generating + * a typed alias (`type FooType string` + iota constants) and stay as + * plain `string`. Read flow tolerance is preserved end-to-end while + * Plan-validating fields on Create/Update DTOs (used in Terraform + * resource schemas) keep their `stringvalidator.OneOf` because their + * Request schemas are NOT relaxed (see `runbooks/api-contract.md` § 3.3). + * + * Selection rules — match `relaxResponseEnums` post-processor: + * - Walk `components.schemas`. A schema is "response-shape" if its + * name matches `*Dto` / `*Response` / `SingleValueResponse*` / + * `TableValueResult*` / `CursorPage*`. + * - Request-shape (`*Request` / `*Params` / lowercase) — left alone. + * - Multi-value enum (length ≥ 2) on a response-shape property — + * dropped. Single-value enums (discriminator tags) — preserved. + * - Array-typed properties get the same treatment on `items.enum`. + * + * Idempotent. Returns the list of relaxed `Schema.field` paths. + */ +export function relaxResponseEnumsInSpec(spec) { + const schemas = getSchemas(spec); + const relaxed = []; + + function isResponseShape(name) { + if (/^[a-z]/.test(name)) return false; + if (/(Request|Params)$/.test(name)) return false; + return ( + /(Dto|Response)$/.test(name) || + /^(SingleValueResponse|TableValueResult|CursorPage)/.test(name) + ); + } + + function relaxProps(schemaName, properties) { + if (!properties) return; + for (const [propName, raw] of Object.entries(properties)) { + if (!isSchemaObj(raw)) continue; + if (Array.isArray(raw.enum) && raw.enum.length >= 2) { + delete raw.enum; + relaxed.push(`${schemaName}.${propName}`); + } + if (raw.items && isSchemaObj(raw.items)) { + if (Array.isArray(raw.items.enum) && raw.items.enum.length >= 2) { + delete raw.items.enum; + relaxed.push(`${schemaName}.${propName}[]`); + } + } + } + } + + for (const [schemaName, schema] of Object.entries(schemas)) { + if (!isResponseShape(schemaName)) continue; + relaxProps(schemaName, schema.properties); + if (Array.isArray(schema.allOf)) { + for (const member of schema.allOf) { + if (isSchemaObj(member)) { + relaxProps(schemaName, member.properties); + } + } + } + } + + return relaxed; +} + export function preprocessSpec(spec) { setRequiredFields(spec); setRequiredOnAllOfMembers(spec); @@ -329,7 +398,15 @@ export function preprocessSpec(spec) { // discriminator-based parents as abstract/empty ones. const inlinedNullableDeductions = inlineNullableDeductionRefs(spec); const flattened = flattenCircularOneOf(spec); - return { flattened, inlinedDiscriminators, inlinedNullableDeductions }; + // Postel's Law: drop multi-value enums on response-shape DTOs so all + // codegens (Zod, Pydantic, Go) emit tolerant readers. + const relaxedEnums = relaxResponseEnumsInSpec(spec); + return { + flattened, + inlinedDiscriminators, + inlinedNullableDeductions, + relaxedEnums, + }; } /** @@ -402,4 +479,9 @@ if (isMain) { `Inlined nullable deduction refs for: ${result.inlinedNullableDeductions.join(', ')}`, ); } + if (result.relaxedEnums && result.relaxedEnums.length > 0) { + console.log( + `Relaxed response-DTO enums (Postel's Law): ${result.relaxedEnums.length} fields`, + ); + } } diff --git a/scripts/typegen.sh b/scripts/typegen.sh index e68d378..d9e6823 100755 --- a/scripts/typegen.sh +++ b/scripts/typegen.sh @@ -66,10 +66,10 @@ $PREPROCESS_CMD "$INPUT" "$PREPROCESSED" echo "=> Generating Go types from preprocessed spec..." # Resolve oapi-codegen via the `tool` directive in go.mod so the version -# is always in lockstep with the version recorded there. +# is always in lockstep with the version recorded there. The config file +# pins enum-prefixing (see scripts/oapi-codegen.yaml). (cd "$ROOT_DIR" && go tool oapi-codegen \ - -generate types \ - -package generated \ + -config "$SCRIPT_DIR/oapi-codegen.yaml" \ -o "$OUTPUT" \ "$PREPROCESSED")