diff --git a/.changes/unreleased/Refactor-20241227-103359.yaml b/.changes/unreleased/Refactor-20241227-103359.yaml new file mode 100644 index 00000000..3631eeb1 --- /dev/null +++ b/.changes/unreleased/Refactor-20241227-103359.yaml @@ -0,0 +1,3 @@ +kind: Refactor +body: 'BREAKING CHANGE: "Nullable" type now wraps some optional struct fields of API input objects. This "Nullable" type enables fields to be set to the JSON "null" value.' +time: 2024-12-27T10:33:59.906375-06:00 diff --git a/.changes/unreleased/Refactor-20250103-150158.yaml b/.changes/unreleased/Refactor-20250103-150158.yaml new file mode 100644 index 00000000..67eb3f0c --- /dev/null +++ b/.changes/unreleased/Refactor-20250103-150158.yaml @@ -0,0 +1,3 @@ +kind: Refactor +body: "enums converted from consts to vars, e.g. opslevel.RefOf(opslevel.AlertSourceTypeEnumDatadog) should now be &opslevel.AlertSourceTypeEnumDatadog" +time: 2025-01-03T15:01:58.276367-06:00 diff --git a/.changes/unreleased/Removed-20250103-151332.yaml b/.changes/unreleased/Removed-20250103-151332.yaml new file mode 100644 index 00000000..54b1428b --- /dev/null +++ b/.changes/unreleased/Removed-20250103-151332.yaml @@ -0,0 +1,3 @@ +kind: Removed +body: removed NullableString func, no longer used +time: 2025-01-03T15:13:32.484099-06:00 diff --git a/actions.go b/actions.go index bca506ca..d6e2c679 100644 --- a/actions.go +++ b/actions.go @@ -165,10 +165,10 @@ func (client *Client) CreateTriggerDefinition(input CustomActionsTriggerDefiniti } `graphql:"customActionsTriggerDefinitionCreate(input: $input)"` } if input.AccessControl == nil { - input.AccessControl = RefOf(CustomActionsTriggerDefinitionAccessControlEnumEveryone) + input.AccessControl = &CustomActionsTriggerDefinitionAccessControlEnumEveryone } if input.EntityType == nil { - input.EntityType = RefOf(CustomActionsEntityTypeEnumService) + input.EntityType = &CustomActionsEntityTypeEnumService } v := PayloadVariables{ "input": input, diff --git a/actions_test.go b/actions_test.go index 8853f542..9021bae7 100644 --- a/actions_test.go +++ b/actions_test.go @@ -20,10 +20,12 @@ func TestCreateWebhookAction(t *testing.T) { client := BestTestClient(t, "custom_actions/create_action", testRequest) // Act + jsonHeaders, err := ol.NewJSON(`{"Content-Type": "application/json"}`) + autopilot.Ok(t, err) action, err := client.CreateWebhookAction(ol.CustomActionsWebhookActionCreateInput{ Name: "Deploy Rollback", LiquidTemplate: ol.RefOf("{\"token\": \"XXX\", \"ref\":\"main\", \"action\": \"rollback\"}"), - Headers: &ol.JSON{"Content-Type": "application/json"}, + Headers: jsonHeaders, HttpMethod: ol.CustomActionsHttpMethodEnumPost, WebhookUrl: "https://gitlab.com/api/v4/projects/1/trigger/pipeline", }) @@ -71,7 +73,7 @@ func TestUpdateWebhookAction(t *testing.T) { // Act action, err := client.UpdateWebhookAction(ol.CustomActionsWebhookActionUpdateInput{ Id: *newID, - HttpMethod: ol.RefOf(ol.CustomActionsHttpMethodEnumPut), + HttpMethod: &ol.CustomActionsHttpMethodEnumPut, }) // Assert @@ -90,10 +92,12 @@ func TestUpdateWebhookAction2(t *testing.T) { client := BestTestClient(t, "custom_actions/update_action2", testRequest) // Act + jsonHeaders, err := ol.NewJSON(`{"Accept": "application/json"}`) + autopilot.Ok(t, err) action, err := client.UpdateWebhookAction(ol.CustomActionsWebhookActionUpdateInput{ Id: *newID, Description: ol.RefOf(""), - Headers: &ol.JSON{"Accept": "application/json"}, + Headers: jsonHeaders, }) // Assert @@ -130,13 +134,13 @@ func TestCreateTriggerDefinition(t *testing.T) { // Act trigger, err := client.CreateTriggerDefinition(ol.CustomActionsTriggerDefinitionCreateInput{ Name: "Deploy Rollback", - AccessControl: ol.RefOf(ol.CustomActionsTriggerDefinitionAccessControlEnumEveryone), + AccessControl: &ol.CustomActionsTriggerDefinitionAccessControlEnumEveryone, Description: ol.RefOf("Disables the Deploy Freeze"), ResponseTemplate: ol.RefOf(""), ManualInputsDefinition: ol.RefOf(""), - ActionId: newID, + ActionId: ol.RefOf(*newID), OwnerId: *newID, - FilterId: ol.NewID("987654321"), + FilterId: ol.RefOf(ol.ID("987654321")), }) // Assert autopilot.Ok(t, err) @@ -155,14 +159,14 @@ func TestCreateTriggerDefinitionWithGlobalEntityType(t *testing.T) { // Act trigger, err := client.CreateTriggerDefinition(ol.CustomActionsTriggerDefinitionCreateInput{ Name: "Deploy Rollback", - AccessControl: ol.RefOf(ol.CustomActionsTriggerDefinitionAccessControlEnumEveryone), + AccessControl: &ol.CustomActionsTriggerDefinitionAccessControlEnumEveryone, Description: ol.RefOf("Disables the Deploy Freeze"), - ActionId: newID, + ActionId: ol.RefOf(*newID), ManualInputsDefinition: ol.RefOf(""), ResponseTemplate: ol.RefOf(""), OwnerId: *newID, - FilterId: ol.NewID("987654321"), - EntityType: ol.RefOf(ol.CustomActionsEntityTypeEnumGlobal), + FilterId: ol.RefOf(ol.ID("987654321")), + EntityType: &ol.CustomActionsEntityTypeEnumGlobal, ExtendedTeamAccess: &[]ol.IdentifierInput{ *ol.NewIdentifier("example_1"), *ol.NewIdentifier("example_1"), @@ -186,12 +190,12 @@ func TestCreateTriggerDefinitionWithNullExtendedTeams(t *testing.T) { trigger, err := client.CreateTriggerDefinition(ol.CustomActionsTriggerDefinitionCreateInput{ Name: "Deploy Rollback", Description: ol.RefOf("Disables the Deploy Freeze"), - AccessControl: ol.RefOf(ol.CustomActionsTriggerDefinitionAccessControlEnumEveryone), + AccessControl: &ol.CustomActionsTriggerDefinitionAccessControlEnumEveryone, ManualInputsDefinition: ol.RefOf(""), ResponseTemplate: ol.RefOf(""), - ActionId: newID, + ActionId: ol.RefOf(*newID), OwnerId: *newID, - FilterId: ol.NewID("987654321"), + FilterId: ol.RefOf(ol.ID("987654321")), ExtendedTeamAccess: &[]ol.IdentifierInput{}, }) // Assert @@ -258,7 +262,7 @@ func TestUpdateTriggerDefinition(t *testing.T) { // Act trigger, err := client.UpdateTriggerDefinition(ol.CustomActionsTriggerDefinitionUpdateInput{ Id: *newID, - FilterId: ol.NewID(), + FilterId: ol.NewNullOf[ol.ID](), }) // Assert autopilot.Ok(t, err) diff --git a/aliases.go b/aliases.go index 1b45985a..029394b3 100644 --- a/aliases.go +++ b/aliases.go @@ -49,7 +49,7 @@ func (client *Client) CreateAliases(ownerId ID, aliases []string) ([]string, err for _, alias := range aliases { input := AliasCreateInput{ Alias: alias, - OwnerId: ownerId, + OwnerId: ID(ownerId), } result, err := client.CreateAlias(input) allErrors = errors.Join(allErrors, err) diff --git a/check.go b/check.go index 992b5a06..f3a78845 100644 --- a/check.go +++ b/check.go @@ -90,14 +90,14 @@ type CheckCreateInputProvider interface { } type CheckCreateInput struct { - Name string `json:"name" yaml:"name" mapstructure:"name"` - Enabled *bool `json:"enabled" yaml:"enabled" mapstructure:"enabled"` - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" mapstructure:"enabledOn,omitempty"` - Category ID `json:"categoryId" yaml:"categoryId" mapstructure:"categoryId"` - Level ID `json:"levelId" yaml:"levelId" mapstructure:"levelId"` - Owner *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" mapstructure:"ownerId,omitempty"` - Filter *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" mapstructure:"filterId,omitempty"` - Notes *string `json:"notes" yaml:"notes" default:"Notes on Example Check" mapstructure:"notes"` + Category ID `json:"categoryId" yaml:"categoryId" mapstructure:"categoryId"` + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" mapstructure:"enabledOn,omitempty"` + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" mapstructure:"enabled"` + Filter *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" mapstructure:"filterId,omitempty"` + Level ID `json:"levelId" yaml:"levelId" mapstructure:"levelId"` + Name string `json:"name" yaml:"name" mapstructure:"name"` + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" mapstructure:"notes,omitempty"` + Owner *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" mapstructure:"ownerId,omitempty"` } func NewCheckCreateInputTypeOf[T any](checkCreateInput CheckCreateInput) *T { @@ -113,15 +113,15 @@ type CheckUpdateInputProvider interface { } type CheckUpdateInput struct { - Id ID `json:"id" mapstructure:"id"` - Name string `json:"name,omitempty" mapstructure:"name,omitempty"` - Enabled *bool `json:"enabled,omitempty" mapstructure:"enabled,omitempty"` - EnableOn *iso8601.Time `json:"enableOn,omitempty" mapstructure:"enabledOn,omitempty"` - Category ID `json:"categoryId,omitempty" mapstructure:"categoryId,omitempty"` - Level ID `json:"levelId,omitempty" mapstructure:"levelId,omitempty"` - Owner *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" mapstructure:"ownerId,omitempty"` - Filter *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" mapstructure:"filterId,omitempty"` - Notes *string `json:"notes,omitempty" mapstructure:"notes,omitempty"` + Category *Nullable[ID] `json:"categoryId,omitempty" mapstructure:"categoryId,omitempty"` + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" mapstructure:"enabledOn,omitempty"` + Enabled *Nullable[bool] `json:"enabled,omitempty" mapstructure:"enabled,omitempty"` + Filter *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" mapstructure:"filterId,omitempty"` + Id ID `json:"id" mapstructure:"id"` + Level *Nullable[ID] `json:"levelId,omitempty" mapstructure:"levelId,omitempty"` + Name *Nullable[string] `json:"name,omitempty" mapstructure:"name,omitempty"` + Notes *Nullable[string] `json:"notes,omitempty" mapstructure:"notes,omitempty"` + Owner *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" mapstructure:"ownerId,omitempty"` } func NewCheckUpdateInputTypeOf[T any](checkUpdateInput CheckUpdateInput) *T { @@ -275,7 +275,7 @@ func (client *Client) DeleteCheck(id ID) error { } `graphql:"checkDelete(input: $input)"` } v := PayloadVariables{ - "input": CheckDeleteInput{Id: &id}, + "input": CheckDeleteInput{Id: RefOf(id)}, } err := client.Mutate(&m, v, WithName("CheckDelete")) return HandleErrors(err, m.Payload.Errors) diff --git a/check_manual.go b/check_manual.go index 490d4694..fa4284e8 100644 --- a/check_manual.go +++ b/check_manual.go @@ -24,9 +24,9 @@ func NewManualCheckFrequencyInput(startingDate string, timeScale FrequencyTimeSc func NewManualCheckFrequencyUpdateInput(startingDate string, timeScale FrequencyTimeScale, value int) *ManualCheckFrequencyUpdateInput { startingDateIso := NewISO8601Date(startingDate) return &ManualCheckFrequencyUpdateInput{ - StartingDate: &startingDateIso, + StartingDate: RefOf(startingDateIso), FrequencyTimeScale: &timeScale, - FrequencyValue: &value, + FrequencyValue: RefOf(value), } } diff --git a/check_test.go b/check_test.go index 438e1721..067c991d 100644 --- a/check_test.go +++ b/check_test.go @@ -33,7 +33,7 @@ var ( } predicateUpdateInput = &ol.PredicateUpdateInput{ - Type: ol.RefOf(ol.PredicateTypeEnumEquals), + Type: &ol.PredicateTypeEnumEquals, Value: ol.RefOf("Requests"), } @@ -44,16 +44,16 @@ var ( Enabled: ol.RefOf(true), Category: id, Level: id, - Notes: &checkNotes, + Notes: ol.RefOf(checkNotes), } checkUpdateInput = ol.CheckUpdateInput{ Id: id, - Name: "Hello World", + Name: ol.RefOf("Hello World"), Enabled: ol.RefOf(true), - Category: id, - Level: id, - Notes: &checkNotes, + Category: ol.RefOf(id), + Level: ol.RefOf(id), + Notes: ol.RefOf(checkNotes), } ) @@ -258,7 +258,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckCreateInputTypeOf[ol.CheckAlertSourceUsageCreateInput](checkCreateInput) - input.AlertSourceType = ol.RefOf(ol.AlertSourceTypeEnumDatadog) + input.AlertSourceType = &ol.AlertSourceTypeEnumDatadog input.AlertSourceNamePredicate = predicateInput return c.CreateCheckAlertSourceUsage(*input) }, @@ -274,7 +274,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckAlertSourceUsageUpdateInput](checkUpdateInput) - input.AlertSourceType = ol.RefOf(ol.AlertSourceTypeEnumDatadog) + input.AlertSourceType = &ol.AlertSourceTypeEnumDatadog input.AlertSourceNamePredicate = predicateUpdateInput return c.UpdateCheckAlertSourceUsage(*input) }, @@ -296,10 +296,10 @@ func getCheckTestCases() map[string]TmpCheckTestCase { input.IssueName = ol.RefOf("test-issue") input.IssueType = nil // API NOTE - not allowed when constraint is "exact" input.MaxAllowed = nil // API NOTE - not allowed when constraint is "exact" - input.ResolutionTime = ol.RefOf(ol.CodeIssueResolutionTimeInput{ + input.ResolutionTime = &ol.CodeIssueResolutionTimeInput{ Unit: ol.CodeIssueResolutionTimeUnitEnumDay, Value: 1, - }) + } input.Severity = nil // API NOTE - not allowed when constraint is "exact" return c.CreateCheckCodeIssue(*input) }, @@ -321,16 +321,17 @@ func getCheckTestCases() map[string]TmpCheckTestCase { "severity": []string{"sev1"}, }), body: func(c *ol.Client) (*ol.Check, error) { + maxAllowed := 1 input := ol.NewCheckUpdateInputTypeOf[ol.CheckCodeIssueUpdateInput](checkUpdateInput) input.Constraint = ol.CheckCodeIssueConstraintEnumAny input.IssueName = nil // API NOTE - not allowed when constraint is "any" - input.IssueType = ol.NewNullableFrom([]string{"big-bug", "big-error"}) - input.MaxAllowed = ol.NewNullableFrom(1) - input.ResolutionTime = ol.NewNullableFrom(ol.CodeIssueResolutionTimeInput{ + input.IssueType = ol.RefOf([]string{"big-bug", "big-error"}) + input.MaxAllowed = &maxAllowed + input.ResolutionTime = &ol.CodeIssueResolutionTimeInput{ Unit: ol.CodeIssueResolutionTimeUnitEnumWeek, Value: 1, - }) - input.Severity = ol.NewNullableFrom([]string{"sev1"}) + } + input.Severity = ol.RefOf([]string{"sev1"}) return c.UpdateCheckCodeIssue(*input) }, expectedCheck: CheckWithExtras(map[string]any{ @@ -352,16 +353,17 @@ func getCheckTestCases() map[string]TmpCheckTestCase { "severity": nil, // API NOTE - not allowed when constraint is "contains" }), body: func(c *ol.Client) (*ol.Check, error) { + maxAllowed := 1 input := ol.NewCheckUpdateInputTypeOf[ol.CheckCodeIssueUpdateInput](checkUpdateInput) input.Constraint = ol.CheckCodeIssueConstraintEnumContains input.IssueName = ol.RefOf("code-issue-updated") - input.IssueType = ol.NewNullOf[[]string]() - input.MaxAllowed = ol.NewNullableFrom(1) - input.ResolutionTime = ol.NewNullableFrom(ol.CodeIssueResolutionTimeInput{ + input.IssueType = ol.RefOf(([]string)(nil)) + input.MaxAllowed = &maxAllowed + input.ResolutionTime = &ol.CodeIssueResolutionTimeInput{ Unit: ol.CodeIssueResolutionTimeUnitEnumWeek, Value: 1, - }) - input.Severity = ol.NewNullOf[[]string]() + } + input.Severity = ol.RefOf(([]string)(nil)) return c.UpdateCheckCodeIssue(*input) }, expectedCheck: CheckWithExtras(map[string]any{ @@ -403,8 +405,9 @@ func getCheckTestCases() map[string]TmpCheckTestCase { "UpdateHasRecentDeploy": { fixture: BuildUpdateRequest("HasRecentDeploy", map[string]any{"days": 5}), body: func(c *ol.Client) (*ol.Check, error) { + maxAllowed := 5 input := ol.NewCheckUpdateInputTypeOf[ol.CheckHasRecentDeployUpdateInput](checkUpdateInput) - input.Days = ol.RefOf(5) + input.Days = &maxAllowed return c.UpdateCheckHasRecentDeploy(*input) }, expectedCheck: CheckWithExtras(map[string]any{"days": 5}), @@ -433,8 +436,8 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckHasDocumentationUpdateInput](checkUpdateInput) - input.DocumentType = ol.RefOf(ol.HasDocumentationTypeEnumAPI) - input.DocumentSubtype = ol.RefOf(ol.HasDocumentationSubtypeEnumOpenapi) + input.DocumentType = &ol.HasDocumentationTypeEnumAPI + input.DocumentSubtype = &ol.HasDocumentationSubtypeEnumOpenapi return c.UpdateCheckHasDocumentation(*input) }, expectedCheck: CheckWithExtras(map[string]any{ @@ -499,7 +502,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { input.ServiceSelector = ol.RefOf(".metadata.name") input.SuccessCondition = ol.RefOf(".metadata.name") input.ResultMessage = ol.RefOf("#Hello World") - input.IntegrationId = &id + input.IntegrationId = ol.RefOf(id) input.PassPending = ol.RefOf(false) return c.UpdateCheckCustomEvent(*input) }, @@ -518,13 +521,13 @@ func getCheckTestCases() map[string]TmpCheckTestCase { "passPending": false, "serviceSelector": ".metadata.name", "successCondition": ".metadata.name", - "resultMessage": "", + "resultMessage": ol.RefOf(""), "integrationId": id, }, map[string]any{ "passPending": false, "serviceSelector": ".metadata.name", "successCondition": ".metadata.name", - "resultMessage": "", + "resultMessage": ol.RefOf(""), "integration": ol.IntegrationId{ Id: id, }, @@ -534,7 +537,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { input.ServiceSelector = ol.RefOf(".metadata.name") input.SuccessCondition = ol.RefOf(".metadata.name") input.ResultMessage = ol.RefOf("") - input.IntegrationId = &id + input.IntegrationId = ol.RefOf(id) input.PassPending = ol.RefOf(false) return c.UpdateCheckCustomEvent(*input) }, @@ -542,7 +545,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { "passPending": false, "serviceSelector": ".metadata.name", "successCondition": ".metadata.name", - "resultMessage": "", + "resultMessage": ol.RefOf(""), "integration": ol.IntegrationId{ Id: id, }, @@ -555,7 +558,11 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckCreateInputTypeOf[ol.CheckManualCreateInput](checkCreateInput) - input.UpdateFrequency = ol.NewManualCheckFrequencyInput("2021-07-26T20:22:44.427Z", ol.FrequencyTimeScaleWeek, 1) + input.UpdateFrequency = ol.NewManualCheckFrequencyInput( + "2021-07-26T20:22:44.427Z", + ol.FrequencyTimeScaleWeek, + 1, + ) return c.CreateCheckManual(*input) }, expectedCheck: CheckWithExtras(map[string]any{ @@ -569,7 +576,11 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckManualUpdateInput](checkUpdateInput) - input.UpdateFrequency = ol.NewManualCheckFrequencyUpdateInput("2021-07-26T20:22:44.427Z", ol.FrequencyTimeScaleWeek, 1) + input.UpdateFrequency = ol.NewManualCheckFrequencyUpdateInput( + "2021-07-26T20:22:44.427Z", + ol.FrequencyTimeScaleWeek, + 1, + ) return c.UpdateCheckManual(*input) }, expectedCheck: CheckWithExtras(map[string]any{ @@ -608,7 +619,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckRepositoryFileUpdateInput](checkUpdateInput) input.DirectorySearch = ol.RefOf(true) - input.FilePaths = &[]string{"/src", "/test", "/foo/bar"} + input.FilePaths = ol.RefOf([]string{"/src", "/test", "/foo/bar"}) input.FileContentsPredicate = predicateUpdateInput input.UseAbsoluteRoot = ol.RefOf(false) return c.UpdateCheckRepositoryFile(*input) @@ -648,7 +659,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckRepositoryGrepUpdateInput](checkUpdateInput) input.DirectorySearch = ol.RefOf(true) - input.FilePaths = &[]string{"go.mod", "**/go.mod"} + input.FilePaths = ol.RefOf([]string{"go.mod", "**/go.mod"}) input.FileContentsPredicate = predicateUpdateInput return c.UpdateCheckRepositoryGrep(*input) }, @@ -667,7 +678,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckRepositoryGrepUpdateInput](checkUpdateInput) input.DirectorySearch = ol.RefOf(false) - input.FilePaths = &[]string{"**/go.mod"} + input.FilePaths = ol.RefOf([]string{"**/go.mod"}) input.FileContentsPredicate = predicateUpdateInput return c.UpdateCheckRepositoryGrep(*input) }, @@ -700,7 +711,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckCreateInputTypeOf[ol.CheckRepositorySearchCreateInput](checkCreateInput) - input.FileExtensions = &[]string{"sbt", "py"} + input.FileExtensions = ol.RefOf([]string{"sbt", "py"}) input.FileContentsPredicate = *predicateInput return c.CreateCheckRepositorySearch(*input) }, @@ -716,7 +727,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckRepositorySearchUpdateInput](checkUpdateInput) - input.FileExtensions = &[]string{"sbt", "py"} + input.FileExtensions = ol.RefOf([]string{"sbt", "py"}) input.FileContentsPredicate = predicateUpdateInput return c.UpdateCheckRepositorySearch(*input) }, @@ -843,7 +854,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckServicePropertyUpdateInput](checkUpdateInput) - input.ServiceProperty = ol.RefOf(ol.ServicePropertyTypeEnumFramework) + input.ServiceProperty = &ol.ServicePropertyTypeEnumFramework input.PropertyValuePredicate = predicateUpdateInput return c.UpdateCheckServiceProperty(*input) }, @@ -928,7 +939,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckToolUsageUpdateInput](checkUpdateInput) - input.ToolCategory = ol.RefOf(ol.ToolCategoryMetrics) + input.ToolCategory = &ol.ToolCategoryMetrics input.ToolNamePredicate = predicateUpdateInput input.ToolUrlPredicate = predicateUpdateInput input.EnvironmentPredicate = predicateUpdateInput @@ -949,7 +960,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckToolUsageUpdateInput](checkUpdateInput) - input.ToolCategory = ol.RefOf(ol.ToolCategoryMetrics) + input.ToolCategory = &ol.ToolCategoryMetrics input.ToolUrlPredicate = &ol.PredicateUpdateInput{} input.EnvironmentPredicate = &ol.PredicateUpdateInput{} return c.UpdateCheckToolUsage(*input) @@ -975,7 +986,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { input.PackageName = "cult" input.PackageNameIsRegex = ol.RefOf(false) input.PackageConstraint = ol.PackageConstraintEnumDoesNotExist - input.MissingPackageResult = ol.RefOf(ol.CheckResultStatusEnumPassed) + input.MissingPackageResult = &ol.CheckResultStatusEnumPassed input.VersionConstraintPredicate = predicateInput return c.CreateCheckPackageVersion(*input) }, @@ -995,7 +1006,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckPackageVersionUpdateInput](checkUpdateInput) - input.PackageManager = ol.RefOf(ol.PackageManagerEnumCargo) + input.PackageManager = &ol.PackageManagerEnumCargo input.VersionConstraintPredicate = predicateUpdateInput return c.UpdateCheckPackageVersion(*input) }, @@ -1011,7 +1022,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }), body: func(c *ol.Client) (*ol.Check, error) { input := ol.NewCheckUpdateInputTypeOf[ol.CheckPackageVersionUpdateInput](checkUpdateInput) - input.PackageManager = ol.RefOf(ol.PackageManagerEnumCargo) + input.PackageManager = &ol.PackageManagerEnumCargo input.VersionConstraintPredicate = &ol.PredicateUpdateInput{} return c.UpdateCheckPackageVersion(*input) }, @@ -1061,7 +1072,7 @@ func TestCanUpdateFilterToNull(t *testing.T) { CategoryId: ol.RefOf(id), Enabled: ol.RefOf(true), LevelId: ol.RefOf(id), - FilterId: ol.NewID(), + FilterId: ol.NewNullOf[ol.ID](), Notes: ol.RefOf("Hello World Check"), }) // Assert @@ -1183,17 +1194,15 @@ func TestJsonUnmarshalCreateCheckToolUsage(t *testing.T) { } }` output := ol.CheckToolUsageCreateInput{ - Name: "Example", - Notes: ol.RefOf("Example Notes"), - EnvironmentPredicate: &ol.PredicateInput{ - Type: ol.PredicateTypeEnum("exists"), - }, + Name: "Example", + Notes: ol.RefOf("Example Notes"), + EnvironmentPredicate: &ol.PredicateInput{Type: ol.PredicateTypeEnumExists}, ToolNamePredicate: &ol.PredicateInput{ - Type: ol.PredicateTypeEnum("contains"), + Type: ol.PredicateTypeEnumContains, Value: ol.RefOf("go"), }, ToolUrlPredicate: &ol.PredicateInput{ - Type: ol.PredicateTypeEnum("starts_with"), + Type: ol.PredicateTypeEnumStartsWith, Value: ol.RefOf("https"), }, } @@ -1241,17 +1250,15 @@ func TestJsonUnmarshalUpdateCheckToolUsage(t *testing.T) { } }` output := ol.CheckToolUsageUpdateInput{ - Name: ol.RefOf("Example"), - Notes: ol.RefOf("Updated Notes"), - EnvironmentPredicate: &ol.PredicateUpdateInput{ - Type: ol.RefOf(ol.PredicateTypeEnum("exists")), - }, + Name: ol.RefOf("Example"), + Notes: ol.RefOf("Updated Notes"), + EnvironmentPredicate: &ol.PredicateUpdateInput{Type: &ol.PredicateTypeEnumExists}, ToolNamePredicate: &ol.PredicateUpdateInput{ - Type: ol.RefOf(ol.PredicateTypeEnum("contains")), + Type: &ol.PredicateTypeEnumContains, Value: ol.RefOf("go"), }, ToolUrlPredicate: &ol.PredicateUpdateInput{ - Type: ol.RefOf(ol.PredicateTypeEnum("starts_with")), + Type: &ol.PredicateTypeEnumStartsWith, Value: ol.RefOf("https"), }, } diff --git a/common.go b/common.go index 0607428d..aa2b8c36 100644 --- a/common.go +++ b/common.go @@ -24,9 +24,9 @@ type PayloadVariables map[string]interface{} func (pv *PayloadVariables) WithoutDeactivedUsers() *PayloadVariables { omitDeactivedUsersFilter := UsersFilterInput{ Key: UsersFilterEnumDeactivatedAt, - Type: RefOf(BasicTypeEnumEquals), + Type: &BasicTypeEnumEquals, } - (*pv)["filter"] = RefOf([]UsersFilterInput{omitDeactivedUsersFilter}) + (*pv)["filter"] = &[]UsersFilterInput{omitDeactivedUsersFilter} return pv } @@ -49,12 +49,12 @@ func NullString() *string { return output } -func RefOf[T any](v T) *T { - return &v +func RefOf[T NullableConstraint](value T) *Nullable[T] { + return NewNullableFrom(value) } -func RefTo[T any](v T) *T { - return &v +func RefTo[T NullableConstraint](value T) *Nullable[T] { + return NewNullableFrom(value) } func HandleErrors(err error, errs []OpsLevelErrors) error { diff --git a/document.go b/document.go index 2bb6de00..80316aab 100644 --- a/document.go +++ b/document.go @@ -26,11 +26,11 @@ func (client *Client) ServiceApiDocSettingsUpdate(service string, docPath string } v := PayloadVariables{ "service": *NewIdentifier(service), - "docPath": NullString(), + "docPath": (*string)(nil), "docSource": docSource, } if docPath != "" { - v["docPath"] = RefOf(docPath) + v["docPath"] = &docPath } err := client.Mutate(&m, v, WithName("ServiceApiDocSettingsUpdate")) return &m.Payload.Service, HandleErrors(err, m.Payload.Errors) diff --git a/document_test.go b/document_test.go index 5153901e..ff080af8 100644 --- a/document_test.go +++ b/document_test.go @@ -18,8 +18,7 @@ func TestServiceApiDocSettingsUpdate(t *testing.T) { client := BestTestClient(t, "service/api_doc_settings_update", testRequest) // Act - docSource := ol.ApiDocumentSourceEnumPull - result, err := client.ServiceApiDocSettingsUpdate("service_alias", "/src/swagger.json", &docSource) + result, err := client.ServiceApiDocSettingsUpdate("service_alias", "/src/swagger.json", &ol.ApiDocumentSourceEnumPull) // Assert autopilot.Ok(t, err) autopilot.Equals(t, id1, result.Id) @@ -56,8 +55,7 @@ func TestServiceApiDocSettingsUpdateDocPathNull(t *testing.T) { client := BestTestClient(t, "service/api_doc_settings_update_doc_path_null", testRequest) // Act - docSource := ol.ApiDocumentSourceEnumPull - result, err := client.ServiceApiDocSettingsUpdate("service_alias", "", &docSource) + result, err := client.ServiceApiDocSettingsUpdate("service_alias", "", &ol.ApiDocumentSourceEnumPull) // Assert autopilot.Ok(t, err) autopilot.Equals(t, id1, result.Id) diff --git a/domain_test.go b/domain_test.go index 79ed179b..7ebfee2b 100644 --- a/domain_test.go +++ b/domain_test.go @@ -13,7 +13,7 @@ func TestDomainCreate(t *testing.T) { ol.DomainInput{ Name: ol.RefOf("platform-test"), Description: ol.RefOf("Domain created for testing."), - OwnerId: &id1, + OwnerId: ol.RefOf(id1), Note: ol.RefOf("additional note about platform-test domain"), }) @@ -271,7 +271,7 @@ func TestDomainUpdate(t *testing.T) { ol.DomainInput{ Name: ol.RefOf("platform-test-4"), Description: ol.RefOf("Domain created for testing."), - OwnerId: &id3, + OwnerId: ol.RefOf(id3), Note: ol.RefOf("Please delete me"), }) diff --git a/filters_test.go b/filters_test.go index dce59309..99ab99ba 100644 --- a/filters_test.go +++ b/filters_test.go @@ -20,7 +20,7 @@ func TestCreateFilter(t *testing.T) { // Act result, err := client.CreateFilter(ol.FilterCreateInput{ Name: "Kubernetes", - Connective: ol.RefOf(ol.ConnectiveEnumAnd), + Connective: &ol.ConnectiveEnumAnd, Predicates: &[]ol.FilterPredicateInput{{ Key: ol.PredicateKeyEnumTierIndex, Type: ol.PredicateTypeEnumEquals, @@ -46,7 +46,7 @@ func TestCreateFilterNested(t *testing.T) { // Act result, err := client.CreateFilter(ol.FilterCreateInput{ Name: "Self deployed or Rails", - Connective: ol.RefOf(ol.ConnectiveEnumOr), + Connective: &ol.ConnectiveEnumOr, Predicates: &[]ol.FilterPredicateInput{ { Key: ol.PredicateKeyEnumFilterID, @@ -169,7 +169,7 @@ func TestUpdateFilterNested(t *testing.T) { result, err := client.UpdateFilter(ol.FilterUpdateInput{ Id: "Z2lkOi8vb3BzbGV2ZWwvRmlsdGVyLzIzNDY", Name: ol.RefOf("Tier 1-2 not deployed by us"), - Connective: ol.RefOf(ol.ConnectiveEnumAnd), + Connective: &ol.ConnectiveEnumAnd, Predicates: &[]ol.FilterPredicateInput{ { Key: ol.PredicateKeyEnumFilterID, @@ -233,11 +233,12 @@ func TestUpdateFilterCaseSensitiveTrue(t *testing.T) { CaseSensitive: ol.RefOf(true), }}, }) + isTrue := true // Assert autopilot.Equals(t, nil, err) autopilot.Equals(t, "Tier 1 Services", result.Name) autopilot.Equals(t, ol.PredicateKeyEnumTierIndex, result.Predicates[0].Key) - autopilot.Equals(t, ol.RefOf(true), result.Predicates[0].CaseSensitive) + autopilot.Equals(t, &isTrue, result.Predicates[0].CaseSensitive) } func TestUpdateFilterCaseSensitiveFalse(t *testing.T) { @@ -278,11 +279,13 @@ func TestUpdateFilterCaseSensitiveFalse(t *testing.T) { CaseSensitive: ol.RefOf(false), }}, }) + isFalse := false + // Assert autopilot.Equals(t, nil, err) autopilot.Equals(t, "Tier 1 Services", result.Name) autopilot.Equals(t, ol.PredicateKeyEnumTierIndex, result.Predicates[0].Key) - autopilot.Equals(t, ol.RefOf(false), result.Predicates[0].CaseSensitive) + autopilot.Equals(t, &isFalse, result.Predicates[0].CaseSensitive) } func TestDeleteFilter(t *testing.T) { diff --git a/gen.go b/gen.go index 657aa845..f831904c 100644 --- a/gen.go +++ b/gen.go @@ -26,13 +26,12 @@ import ( ) const ( - connectionFile string = "connection.go" - inputObjectFile string = "input.go" - interfacesFile string = "interfaces.go" - objectFile string = "object.go" - queryFile string = "query.go" - mutationFile string = "mutation.go" - payloadFile string = "payload.go" + connectionFile string = "connection.go" + interfacesFile string = "interfaces.go" + objectFile string = "object.go" + queryFile string = "query.go" + mutationFile string = "mutation.go" + payloadFile string = "payload.go" // scalarFile string = "scalar.go" // NOTE: probably not useful // unionFile string = "union.go" // NOTE: probably not useful ) @@ -110,6 +109,46 @@ var stringTypeSuffixes = []string{ "yaml", } +var enumExamples = map[string]string{} + +var listExamples = map[string]string{ + "channels": "[]", + "checkIds": "['Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk', 'Z2lkOi8vc2VydmljZS85ODc2NTQzMjE']", + "checkIdsToCopy": "[]", + "checksToPromote": "[]", + "contacts": "[]", + "daysOfWeek": "[]", + "dependsOn": "[]", + "dependencyOf": "[]", + "extendedTeamAccess": "[]", + "fileExtensions": "['go', 'py', 'rb']", + "filePaths": "['/usr/local/bin', '/home/opslevel']", + "issueType": "['bug', 'error']", + "members": "[]", + "ownershipTagKeys": "['tag_key1', 'tag_key2']", + "predicates": "[]", + "properties": "[]", + "regionOverride": "['us-east-1', 'eu-west-1']", + "reminderTypes": "[]", + "severity": "['sev1', 'sev2']", + "tags": "[]", + "teamIds": "[]", + "teams": "[]", + "users": "[]", +} + +var scalarExamples = map[string]string{ + "Boolean": "false", + "Float": "4.2069", + "ID": "Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk", + "ISO8601DateTime": "2025-01-05T01:00:00.000Z", + "Int": "3", + "JSON": `{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}`, + "JSONSchema": `SCHEMA_TBD`, + "JsonString": "JSON_TBD", + "String": "example_value", +} + var knownTypeMappings = map[string]string{ "data": "JSON", "deletedmembers": "User", @@ -207,7 +246,34 @@ func main() { } schema := graphql.MustParseSchema(graphqlSchema, nil, opts...) schemaAst := schema.ASTSchema() + populateEnumExamples(schemaAst.Enums) + + inputObjects := map[string]*types.InputObject{} + objects := map[string]*types.ObjectTypeDefinition{} + enums := map[string]*types.EnumTypeDefinition{} + interfaces := map[string]*types.InterfaceTypeDefinition{} + unions := map[string]*types.Union{} + scalars := map[string]*types.ScalarTypeDefinition{} + for name, graphqlType := range schemaAst.Types { + switch v := graphqlType.(type) { + case *types.EnumTypeDefinition: + enums[name] = v + case *types.InputObject: + inputObjects[name] = v + case *types.InterfaceTypeDefinition: + interfaces[name] = v + case *types.ObjectTypeDefinition: + objects[name] = v + case *types.ScalarTypeDefinition: + scalars[name] = v + case *types.Union: + unions[name] = v + default: + panic(fmt.Errorf("Unknown GraphQL type: %v", v)) + } + } genEnums(schemaAst.Enums) + genInputObjects(inputObjects) err := run() if err != nil { @@ -215,6 +281,21 @@ func main() { } } +func populateEnumExamples(schemaEnums []*types.EnumTypeDefinition) { + for _, enum := range schemaEnums { + enumExamples[enum.Name] = enum.EnumValuesDefinition[0].EnumValue + } +} + +func sortedMapKeys[T any](schemaMap map[string]T) []string { + sortedNames := make([]string, 0, len(schemaMap)) + for k := range schemaMap { + sortedNames = append(sortedNames, k) + } + slices.Sort(sortedNames) + return sortedNames +} + func genEnums(schemaEnums []*types.EnumTypeDefinition) { var buf bytes.Buffer @@ -237,6 +318,31 @@ func genEnums(schemaEnums []*types.EnumTypeDefinition) { } } +func genInputObjects(inputObjects map[string]*types.InputObject) { + var buf bytes.Buffer + buf.WriteString(header + "\n\nimport \"github.com/relvacode/iso8601\"\n") + + tmpl := template.New("inputs") + tmpl.Funcs(sprig.TxtFuncMap()) + tmpl.Funcs(templFuncMap) + template.Must(tmpl.ParseFiles("./templates/inputObjects.tpl")) + + for _, inputObjectName := range sortedMapKeys(inputObjects) { + // Skip campaign objects until tested later on + if strings.Contains(inputObjectName, "Campaign") || strings.Contains(inputObjectName, "Group") { + continue + } + if err := tmpl.ExecuteTemplate(&buf, "inputs", inputObjects[inputObjectName]); err != nil { + panic(err) + } + } + fmt.Println("writing input.go") + err := os.WriteFile("input.go", buf.Bytes(), 0o644) + if err != nil { + panic(err) + } +} + func getRootSchema() (*GraphQLSchema, error) { visibility, ok := os.LookupEnv("GRAPHQL_VISIBILITY") if !ok { @@ -290,8 +396,6 @@ func run() error { switch filename { case connectionFile: subSchema = objectSchema - case inputObjectFile: - subSchema = inputObjectSchema case interfacesFile: subSchema = interfaceSchema case objectFile: @@ -409,40 +513,6 @@ var templates = map[string]*template.Template{ } {{- end }} `), - inputObjectFile: t(header + ` -import "github.com/relvacode/iso8601" - -{{range .Types | sortByName}}{{if and (eq .Kind "INPUT_OBJECT") (not (internal .Name))}} -{{ if and (not (hasPrefix "Campaign" .Name)) (not (hasPrefix "Group" .Name)) -}} -{{template "input_object" .}} -{{end}}{{end}}{{end}} - -{{- define "input_object" -}} -{{ template "type_comment_description" . }} -type {{.Name}} struct { {{range .InputFields }} - {{.Name | title}} {{if ne .Type.Kind "NON_NULL"}}*{{end -}} - {{- if isListType .Name }}[]{{ end -}} - {{- if and (hasSuffix "Id" .Name) (ne .Name "externalId") }}ID - {{- else if hasSuffix "Access" .Name }}IdentifierInput - {{- else if eq .Name "predicates" }}FilterPredicateInput - {{- else if eq .Name "tags" }}TagInput - {{- else if eq .Name "members" }}TeamMembershipUserInput - {{- else if eq .Name "contacts" }}ContactInput - {{- else if eq .Type.Name "UserRole" }}UserRole - {{- else if .Type.Name }}{{ template "converted_type" .Type }} - {{- else }}{{ .Type.OfType.OfTypeName | convertPayloadType }}{{ end -}} ` + "`" + - `json:"{{.Name | lowerFirst }}{{if ne .Type.Kind "NON_NULL"}},omitempty{{end}}"` + - ` yaml:"{{.Name | lowerFirst }}{{if ne .Type.Kind "NON_NULL"}},omitempty{{end}}"` + ` - - {{- if and (not (hasSuffix "Input" .Type.Name)) (not (hasSuffix "Input" .Type.OfType.OfTypeName)) }} example:" - {{- if isListType .Name }}[{{ end -}} - {{ example_tag_value . }} - {{- if isListType .Name }}]{{ end -}}"{{- end}}` + - "`" + `{{ template "field_comment_description" . }} {{if eq .Type.Kind "NON_NULL"}}(Required.){{else}}(Optional.){{end}} - {{- end}} -} -{{- end -}} -`), interfacesFile: t(header + ` import "github.com/relvacode/iso8601" @@ -891,6 +961,144 @@ func renameMutation(s string) string { return s } +func fieldCommentDescription(fieldType *types.InputValueDefinition) string { + oneLineDescription := strings.ReplaceAll(fieldType.Desc, "\n", " ") + if _, ok := fieldType.Type.(*types.NonNull); ok { + return fmt.Sprintf(" // %s (Required.)", oneLineDescription) + } + return fmt.Sprintf(" // %s (Optional.)", oneLineDescription) +} + +func exampleStructTag(field *types.InputValueDefinition) string { + var exampleValue string + var unwrappedType types.Type + + if field.Name.Name == "externalId" { + return fmt.Sprintf(` example:"%s"`, scalarExamples["ID"]) + } + if nonNullType, ok := field.Type.(*types.NonNull); ok { + unwrappedType = nonNullType.OfType + } else { + unwrappedType = field.Type + } + + switch fieldType := unwrappedType.(type) { + case *types.EnumTypeDefinition: + if enumValue, ok := enumExamples[strings.TrimSuffix(fieldType.String(), "!")]; ok { + exampleValue = enumValue + } else { + exampleValue = "ENUM_TODO" + } + case *types.InputObject: + return "" // omit 'example' struct tag, implicit nested tag is used + case *types.ScalarTypeDefinition: + if scalarValue, ok := scalarExamples[strings.TrimSuffix(fieldType.String(), "!")]; ok { + exampleValue = scalarValue + } else { + exampleValue = "SCALAR_TODO" + } + case *types.List: + if listValue, ok := listExamples[field.Name.Name]; ok { + exampleValue = listValue + } else { + exampleValue = "LIST_TODO" + } + case *types.TypeName: + exampleValue = "TYPENAME_TODO" + default: + exampleValue = "UNKNOWN_TODO" + } + + return fmt.Sprintf(` example:"%s"`, exampleValue) +} + +func yamlStructTag(fieldType *types.InputValueDefinition) string { + jsonStructTag := jsonStructTag(fieldType) + return strings.Replace(jsonStructTag, "json", "yaml", 1) +} + +func jsonStructTag(fieldType *types.InputValueDefinition) string { + fieldName := fieldType.Name.Name + if isNullable(fieldType.Type) { + return fmt.Sprintf(`json:"%s,omitempty"`, fieldName) + } + return fmt.Sprintf(`json:"%s"`, fieldName) +} + +func wrapWithNullable(graphqlType string) string { + return "*Nullable[" + graphqlType + "]" +} + +func graphqlTypeToGolang(graphqlType string) string { + isRequired := strings.HasSuffix(graphqlType, "!") + convertedType := strings.TrimSuffix(graphqlType, "!") + + // GraphQL type to Go type: [String] -> *[]string + isSlice := strings.HasPrefix(convertedType, "[") && strings.HasSuffix(convertedType, "]") + if isSlice { + convertedType = strings.TrimPrefix(convertedType, "[") + convertedType = strings.TrimSuffix(convertedType, "]") + convertedType = strings.TrimSuffix(convertedType, "!") + } + + switch convertedType { + case "Boolean": + convertedType = "bool" + case "Float": + convertedType = "float64" + case "Int": + convertedType = "int" + if isSlice { + convertedType = "[]" + convertedType + } + if !isRequired { + convertedType = "*" + convertedType + } + return convertedType + case "ISO8601DateTime": + convertedType = "iso8601.Time" + case "String": + convertedType = "string" + if isSlice { + convertedType = "[]" + convertedType + if isRequired { + return convertedType + } else { + return wrapWithNullable(convertedType) + } + } + case "ID": + convertedType = "ID" + default: + if isSlice { + convertedType = "[]" + convertedType + } + if !isRequired { + convertedType = "*" + convertedType + } + return convertedType + } + + if isSlice { + convertedType = "[]" + convertedType + } + if isRequired { + return convertedType + } + if isSlice { + return "*" + convertedType + } + return wrapWithNullable(convertedType) +} + +func getFieldTypeNew(fieldType types.Type) string { + return graphqlTypeToGolang(fieldType.String()) +} + +func isNullable(fieldType types.Type) bool { + return fieldType.Kind() != "NON_NULL" +} + func isPlural(s string) bool { value := strings.ToLower(s) // Examples: "alias", "address", "status", "levels" @@ -964,7 +1172,7 @@ var templFuncMap = template.FuncMap{ "check_fragments": fragmentsForCheck, "custom_actions_ext_action_fragments": fragmentsForCustomActionsExtAction, "integration_fragments": fragmentsForIntegration, - "get_field_type": getFieldType, + "get_field_type": getFieldTypeOld, "get_input_field_type": getInputFieldType, "add_special_fields": addSpecialFields, "add_special_interfaces_fields": addSpecialInterfacesFields, @@ -974,8 +1182,13 @@ var templFuncMap = template.FuncMap{ "skip_object_field": skipObjectField, "skip_query": skipQuery, "skip_interface_field": skipInterfaceField, - "example_tag_value": getExampleValue, "isListType": isPlural, + "getFieldTypeForInputObject": getFieldTypeNew, + "exampleStructTag": exampleStructTag, + "jsonStructTag": jsonStructTag, + "yamlStructTag": yamlStructTag, + "fieldCommentDescription": fieldCommentDescription, + "isTypeNullable": isNullable, "renameMutation": renameMutation, "renameMutationReturnType": renameMutationReturnType, "convertPayloadType": convertPayloadType, @@ -1190,7 +1403,7 @@ func getInputFieldType(inputField GraphQLField) string { return "string" } -func getFieldType(objectName string, inputField GraphQLField) string { +func getFieldTypeOld(objectName string, inputField GraphQLField) string { lowercaseFieldName := strings.ToLower(inputField.Name) switch { case "type" == lowercaseFieldName: @@ -1373,131 +1586,3 @@ func getFieldType(objectName string, inputField GraphQLField) string { return getInputFieldType(inputField) } - -func getExampleValueByFieldName(inputField GraphQLInputValue) string { - mapFieldTypeToExampleValue := map[string]string{ - "DocumentSubtype": "openapi", - "Address": "support@company.com", - "Id": "Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk", - "Definition": "example_definition", - "Template": `{\"token\": \"XXX\", \"ref\":\"main\", \"action\": \"rollback\"}`, - "Name": "example_name", - "Language": "example_language", - "Alias": "example_alias", - "Description": "example_description", - "Email": "first.last@domain.com", - "Data": "example_data", - "Note": "example_note", - "IamRole": "example_role", - "DisplayType": "example_type", - "HttpMethod": "GET", - "Notes": "example_notes", - "Value": "example_value", - "Product": "example_product", - "Framework": "example_framework", - "Url": "john.doe@example.com", - "BaseDirectory": "/home/opslevel.yaml", - "ExternalUrl": "https://google.com", - "Responsibilities": "example description of responsibilities", - "Environment": "environment that tool belongs to", - "Arg": "example_arg", - "Extensions": "'go', 'py', 'rb'", - "Paths": "'/usr/local/bin', '/home/opslevel'", - "Ids": "'Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk', 'Z2lkOi8vc2VydmljZS85ODc2NTQzMjE'", - "TagKeys": "'tag_key1', 'tag_key2'", - "Selector": "example_selector", - "Condition": "example_condition", - "Message": "example_message", - "RequireContactMethod": "false", - "Identifier": "example_identifier", - "DocumentType": "api", - } - for k, v := range mapFieldTypeToExampleValue { - if k == inputField.Name || - strings.ToLower(k[:1])+k[1:] == inputField.Name || - strings.HasSuffix(inputField.Name, k) { - return v - } - } - return "" -} - -func getExampleValueByFieldType(inputField GraphQLInputValue) string { - mapFieldTypeToExampleValue := map[string]string{ - "Time": "2024-01-05T01:00:00.000Z", - "FrequencyTimeScale": "week", - "ContactType": "slack", - "AlertSourceTypeEnum": "pagerduty", - "AliasOwnerTypeEnum": "scorecard", - "BasicTypeEnum": "does_not_equal", - "ConnectiveEnum": "or", - "CustomActionsEntityTypeEnum": "GLOBAL", - "CustomActionsHttpMethodEnum": "GET", - "CustomActionsTriggerDefinitionAccessControlEnum": "service_owners", - "RelationshipTypeEnum": "depends_on", - "PredicateKeyEnum": "filter_id", - "PredicateTypeEnum": "satisfies_jq_expression", - "ServicePropertyTypeEnum": "language", - "UsersFilterEnum": "last_sign_in_at", - "UserRole": "admin", - "ToolCategory": "api_documentation", - } - for k, v := range mapFieldTypeToExampleValue { - if inputFieldMatchesType(inputField, k) { - return v - } - } - return "" -} - -func inputFieldMatchesType(inputField GraphQLInputValue, fieldType string) bool { - if fieldType == inputField.Type.Name || - fieldType == inputField.Type.OfType.OfTypeName || - strings.ToLower(fieldType) == inputField.Type.Name || - strings.HasSuffix(inputField.Type.Name, fieldType) || - strings.HasSuffix(inputField.Type.OfType.OfTypeName, fieldType) { - return true - } - return false -} - -func inputFieldNameMatchesName(inputField GraphQLInputValue, fieldName string) bool { - if fieldName == inputField.Name || - strings.ToLower(fieldName[:1])+fieldName[1:] == inputField.Name || - strings.HasSuffix(inputField.Name, fieldName) { - return true - } - return false -} - -func getExampleValue(inputField GraphQLInputValue) string { - switch { - case inputFieldMatchesType(inputField, "Boolean"): - return "false" - case inputFieldMatchesType(inputField, "Int"): - return "3" - case inputFieldMatchesType(inputField, "JSON"): - return `{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}` - } - - if valueByName := getExampleValueByFieldName(inputField); valueByName != "" { - return valueByName - } - if valueByType := getExampleValueByFieldType(inputField); valueByType != "" { - return valueByType - } - - switch { - case inputFieldNameMatchesName(inputField, "Role"): - return "example_role" - case inputFieldNameMatchesName(inputField, "Key"): - return "XXX_example_key_XXX" - case inputFieldNameMatchesName(inputField, "Type"): - return "example_type" - case inputFieldNameMatchesName(inputField, "Method"): - return "example_method" - case inputFieldMatchesType(inputField, "Enum"): - return "NEW_ENUM_SET_DEFAULT" - } - return "" -} diff --git a/infra.go b/infra.go index d959c35c..0ee32ef5 100644 --- a/infra.go +++ b/infra.go @@ -131,10 +131,10 @@ func (client *Client) CreateInfrastructure(input InfraInput) (*InfrastructureRes Data: input.Data, } if input.Owner != nil { - i.OwnerId = input.Owner + i.OwnerId = RefOf(*input.Owner) } if input.Provider != nil { - i.ProviderResourceType = &input.Provider.Type + i.ProviderResourceType = RefOf(input.Provider.Type) i.ProviderData = &InfrastructureResourceProviderDataInput{ AccountName: input.Provider.Account, ExternalUrl: RefOf(input.Provider.URL), @@ -230,10 +230,10 @@ func (client *Client) UpdateInfrastructure(identifier string, input InfraInput) Schema: &InfrastructureResourceSchemaInput{Type: input.Schema}, } if input.Owner != nil { - i.OwnerId = input.Owner + i.OwnerId = RefOf(*input.Owner) } if input.Provider != nil { - i.ProviderResourceType = &input.Provider.Type + i.ProviderResourceType = RefOf(input.Provider.Type) i.ProviderData = &InfrastructureResourceProviderDataInput{ AccountName: input.Provider.Account, ExternalUrl: RefOf(input.Provider.URL), diff --git a/input.go b/input.go index 5abedea7..935d0451 100644 --- a/input.go +++ b/input.go @@ -6,15 +6,15 @@ import "github.com/relvacode/iso8601" // AlertSourceExternalIdentifier specifies the input needed to find an alert source with external information. type AlertSourceExternalIdentifier struct { - Type AlertSourceTypeEnum `json:"type" yaml:"type" example:"pagerduty"` // The type of the alert. (Required.) ExternalId string `json:"externalId" yaml:"externalId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The external id of the alert. (Required.) + Type AlertSourceTypeEnum `json:"type" yaml:"type" example:"datadog"` // The type of the alert. (Required.) } // AlertSourceServiceCreateInput specifies the input used for attaching an alert source to a service. type AlertSourceServiceCreateInput struct { - Service IdentifierInput `json:"service" yaml:"service"` // The service that the alert source will be attached to. (Required.) - AlertSourceId *ID `json:"alertSourceId,omitempty" yaml:"alertSourceId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Specifies the input needed to find an alert source with external information. (Optional.) - AlertSourceExternalIdentifier *AlertSourceExternalIdentifier `json:"alertSourceExternalIdentifier,omitempty" yaml:"alertSourceExternalIdentifier,omitempty" example:"example_identifier"` // Specifies the input needed to find an alert source with external information. (Optional.) + AlertSourceExternalIdentifier *AlertSourceExternalIdentifier `json:"alertSourceExternalIdentifier,omitempty" yaml:"alertSourceExternalIdentifier,omitempty"` // Specifies the input needed to find an alert source with external information. (Optional.) + AlertSourceId *Nullable[ID] `json:"alertSourceId,omitempty" yaml:"alertSourceId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Specifies the input needed to find an alert source with external information. (Optional.) + Service IdentifierInput `json:"service" yaml:"service"` // The service that the alert source will be attached to. (Required.) } // AlertSourceServiceDeleteInput specifies the input fields used in the `alertSourceServiceDelete` mutation. @@ -24,41 +24,41 @@ type AlertSourceServiceDeleteInput struct { // AliasCreateInput represents the input for the `aliasCreate` mutation. type AliasCreateInput struct { - Alias string `json:"alias" yaml:"alias" example:"example_alias"` // The alias you wish to create. (Required.) - OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the resource you want to create the alias on. Services, teams, groups, systems, and domains are supported. (Required.) + Alias string `json:"alias" yaml:"alias" example:"example_value"` // The alias you wish to create. (Required.) + OwnerId ID `json:"ownerId" yaml:"ownerId" example:"example_value"` // The ID of the resource you want to create the alias on. Services, teams, groups, systems, and domains are supported. (Required.) } // AliasDeleteInput represents the input for the `aliasDelete` mutation. type AliasDeleteInput struct { - Alias string `json:"alias" yaml:"alias" example:"example_alias"` // The alias you wish to delete. (Required.) - OwnerType AliasOwnerTypeEnum `json:"ownerType" yaml:"ownerType" example:"scorecard"` // The resource the alias you wish to delete belongs to. (Required.) + Alias string `json:"alias" yaml:"alias" example:"example_value"` // The alias you wish to delete. (Required.) + OwnerType AliasOwnerTypeEnum `json:"ownerType" yaml:"ownerType" example:"domain"` // The resource the alias you wish to delete belongs to. (Required.) } // AwsIntegrationInput specifies the input fields used to create and update an AWS integration. type AwsIntegrationInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name of the integration. (Optional.) - IamRole *string `json:"iamRole,omitempty" yaml:"iamRole,omitempty" example:"example_role"` // The IAM role OpsLevel uses in order to access the AWS account. (Optional.) - ExternalId *string `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The External ID defined in the trust relationship to ensure OpsLevel is the only third party assuming this role (See https:/docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html for more details). (Optional.) - OwnershipTagKeys *[]string `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) - AwsTagsOverrideOwnership *bool `json:"awsTagsOverrideOwnership,omitempty" yaml:"awsTagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from AWS to override ownership set in OpsLevel directly. (Optional.) - RegionOverride *[]string `json:"regionOverride,omitempty" yaml:"regionOverride,omitempty" example:"['us-east-1', 'eu-west-1']"` // Overrides the AWS region(s) that will be synchronized by this integration. (Optional.) + AwsTagsOverrideOwnership *Nullable[bool] `json:"awsTagsOverrideOwnership,omitempty" yaml:"awsTagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from AWS to override ownership set in OpsLevel directly. (Optional.) + ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The External ID defined in the trust relationship to ensure OpsLevel is the only third party assuming this role (See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html for more details). (Optional.) + IamRole *Nullable[string] `json:"iamRole,omitempty" yaml:"iamRole,omitempty" example:"example_value"` // The IAM role OpsLevel uses in order to access the AWS account. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) + OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) + RegionOverride *Nullable[[]string] `json:"regionOverride,omitempty" yaml:"regionOverride,omitempty" example:"['us-east-1', 'eu-west-1']"` // Overrides the AWS region(s) that will be synchronized by this integration. (Optional.) } // AzureResourcesIntegrationInput specifies the input fields used to create and update an Azure resources integration. type AzureResourcesIntegrationInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name of the integration. (Optional.) - OwnershipTagKeys *[]string `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) - TenantId *string `json:"tenantId,omitempty" yaml:"tenantId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The tenant OpsLevel uses to access the Azure account. (Optional.) - SubscriptionId *string `json:"subscriptionId,omitempty" yaml:"subscriptionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The subscription OpsLevel uses to access the Azure account. (Optional.) - ClientId *string `json:"clientId,omitempty" yaml:"clientId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The client OpsLevel uses to access the Azure account. (Optional.) - ClientSecret *string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty" example:""` // The client secret OpsLevel uses to access the Azure account. (Optional.) - TagsOverrideOwnership *bool `json:"tagsOverrideOwnership,omitempty" yaml:"tagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from Azure to override ownership set in OpsLevel directly. (Optional.) + ClientId *Nullable[string] `json:"clientId,omitempty" yaml:"clientId,omitempty" example:"example_value"` // The client OpsLevel uses to access the Azure account. (Optional.) + ClientSecret *Nullable[string] `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty" example:"example_value"` // The client secret OpsLevel uses to access the Azure account. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) + OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) + SubscriptionId *Nullable[string] `json:"subscriptionId,omitempty" yaml:"subscriptionId,omitempty" example:"example_value"` // The subscription OpsLevel uses to access the Azure account. (Optional.) + TagsOverrideOwnership *Nullable[bool] `json:"tagsOverrideOwnership,omitempty" yaml:"tagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from Azure to override ownership set in OpsLevel directly. (Optional.) + TenantId *Nullable[string] `json:"tenantId,omitempty" yaml:"tenantId,omitempty" example:"example_value"` // The tenant OpsLevel uses to access the Azure account. (Optional.) } // CategoryCreateInput specifies the input fields used to create a category. type CategoryCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the category. (Required.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description of the category. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the category. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the category. (Required.) } // CategoryDeleteInput specifies the input fields used to delete a category. @@ -68,586 +68,609 @@ type CategoryDeleteInput struct { // CategoryUpdateInput specifies the input fields used to update a category. type CategoryUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category to be updated. (Required.) - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the category. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description of the category. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the category. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category to be updated. (Required.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the category. (Optional.) } // CheckAlertSourceUsageCreateInput specifies the input fields used to create an alert source usage check. type CheckAlertSourceUsageCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"pagerduty"` // The type of the alert source. (Optional.) - AlertSourceNamePredicate *PredicateInput `json:"alertSourceNamePredicate,omitempty" yaml:"alertSourceNamePredicate,omitempty"` // The condition that the alert source name should satisfy to be evaluated. (Optional.) + AlertSourceNamePredicate *PredicateInput `json:"alertSourceNamePredicate,omitempty" yaml:"alertSourceNamePredicate,omitempty"` // The condition that the alert source name should satisfy to be evaluated. (Optional.) + AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"datadog"` // The type of the alert source. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckAlertSourceUsageUpdateInput specifies the input fields used to update an alert source usage check. type CheckAlertSourceUsageUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"pagerduty"` // The type of the alert source. (Optional.) - AlertSourceNamePredicate *PredicateUpdateInput `json:"alertSourceNamePredicate,omitempty" yaml:"alertSourceNamePredicate,omitempty"` // The condition that the alert source name should satisfy to be evaluated. (Optional.) + AlertSourceNamePredicate *PredicateUpdateInput `json:"alertSourceNamePredicate,omitempty" yaml:"alertSourceNamePredicate,omitempty"` // The condition that the alert source name should satisfy to be evaluated. (Optional.) + AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"datadog"` // The type of the alert source. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckCodeIssueCreateInput specifies the input fields used to create a code issue check. type CheckCodeIssueCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + Constraint CheckCodeIssueConstraintEnum `json:"constraint" yaml:"constraint" example:"any"` // The type of constraint used in evaluation the code issues check. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + IssueName *Nullable[string] `json:"issueName,omitempty" yaml:"issueName,omitempty" example:"example_value"` // The issue name used for code issue lookup. (Optional.) + IssueType *Nullable[[]string] `json:"issueType,omitempty" yaml:"issueType,omitempty" example:"['bug', 'error']"` // The type of code issue to consider. (Optional.) LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Constraint CheckCodeIssueConstraintEnum `json:"constraint" yaml:"constraint" example:"contains"` // The type of constraint used in evaluation the code issues check. (Required.) - IssueName *string `json:"issueName,omitempty" yaml:"issueName,omitempty" example:"example_name"` // The issue name used for code issue lookup. (Optional.) - ResolutionTime *CodeIssueResolutionTimeInput `json:"resolutionTime,omitempty" yaml:"resolutionTime,omitempty"` // The resolution time recommended by the reporting source of the code issue. (Optional.) MaxAllowed *int `json:"maxAllowed,omitempty" yaml:"maxAllowed,omitempty" example:"3"` // The threshold count of code issues beyond which the check starts failing. (Optional.) - IssueType *[]string `json:"issueType,omitempty" yaml:"issueType,omitempty" example:"['bug', 'error']"` // The type of code issue to consider. (Optional.) - Severity *[]string `json:"severity,omitempty" yaml:"severity,omitempty" example:"['sev1', 'sev2']"` // The severity levels of the issue. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + ResolutionTime *CodeIssueResolutionTimeInput `json:"resolutionTime,omitempty" yaml:"resolutionTime,omitempty"` // The resolution time recommended by the reporting source of the code issue. (Optional.) + Severity *Nullable[[]string] `json:"severity,omitempty" yaml:"severity,omitempty" example:"['sev1', 'sev2']"` // The severity levels of the issue. (Optional.) } // CheckCodeIssueUpdateInput specifies the input fields used to update an exasting code issue check. type CheckCodeIssueUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - Constraint CheckCodeIssueConstraintEnum `json:"constraint" yaml:"constraint" example:"NEW_ENUM_SET_DEFAULT"` // The type of constraint used in evaluation the code issues check. (Required.) - IssueName *string `json:"issueName,omitempty" yaml:"issueName,omitempty" example:"example_name"` // The issue name used for code issue lookup. (Optional.) - ResolutionTime *Nullable[CodeIssueResolutionTimeInput] `json:"resolutionTime,omitempty" yaml:"resolutionTime,omitempty"` // The resolution time recommended by the reporting source of the code issue. (Optional.) - MaxAllowed *Nullable[int] `json:"maxAllowed,omitempty" yaml:"maxAllowed,omitempty" example:"3"` // The threshold count of code issues beyond which the check starts failing. (Optional.) - IssueType *Nullable[[]string] `json:"issueType,omitempty" yaml:"issueType,omitempty" example:"['bug', 'error']"` // The type of code issue to consider. (Optional.) - Severity *Nullable[[]string] `json:"severity,omitempty" yaml:"severity,omitempty" example:"['sev1', 'sev2']"` // The severity levels of the issue. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + Constraint CheckCodeIssueConstraintEnum `json:"constraint" yaml:"constraint" example:"any"` // The type of constraint used in evaluation the code issues check. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + IssueName *Nullable[string] `json:"issueName,omitempty" yaml:"issueName,omitempty" example:"example_value"` // The issue name used for code issue lookup. (Optional.) + IssueType *Nullable[[]string] `json:"issueType,omitempty" yaml:"issueType,omitempty" example:"['bug', 'error']"` // The type of code issue to consider. (Optional.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + MaxAllowed *int `json:"maxAllowed,omitempty" yaml:"maxAllowed,omitempty" example:"3"` // The threshold count of code issues beyond which the check starts failing. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) + ResolutionTime *CodeIssueResolutionTimeInput `json:"resolutionTime,omitempty" yaml:"resolutionTime,omitempty"` // The resolution time recommended by the reporting source of the code issue. (Optional.) + Severity *Nullable[[]string] `json:"severity,omitempty" yaml:"severity,omitempty" example:"['sev1', 'sev2']"` // The severity levels of the issue. (Optional.) +} + +// CheckCopyInput represents information about the check(s) that are to be copied. +type CheckCopyInput struct { + CheckIds []ID `json:"checkIds" yaml:"checkIds" example:"['Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk', 'Z2lkOi8vc2VydmljZS85ODc2NTQzMjE']"` // The IDs of the checks to be copied. (Required.) + Move *Nullable[bool] `json:"move,omitempty" yaml:"move,omitempty" example:"false"` // If set to true, the original checks will be deleted after being successfully copied. (Optional.) + TargetCategoryId ID `json:"targetCategoryId" yaml:"targetCategoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the category to which the checks are copied. Belongs to either the rubric or a scorecard. (Required.) + TargetLevelId *Nullable[ID] `json:"targetLevelId,omitempty" yaml:"targetLevelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the level which the copied checks are associated with. (Optional.) } // CheckCustomEventCreateInput represents creates a custom event check. type CheckCustomEventCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - ServiceSelector string `json:"serviceSelector" yaml:"serviceSelector" example:"example_selector"` // A jq expression that will be ran against your payload. This will parse out the service identifier. [More info about jq](https:/jqplay.org/). (Required.) - SuccessCondition string `json:"successCondition" yaml:"successCondition" example:"example_condition"` // A jq expression that will be ran against your payload. A truthy value will result in the check passing. [More info about jq](https:/jqplay.org/). (Required.) - ResultMessage *string `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" example:"example_message"` // The check result message template. It is compiled with Liquid and formatted in Markdown. [More info about liquid templates](https:/docs.opslevel.com/docs/checks/payload-checks/#liquid-templating). (Optional.) - PassPending *bool `json:"passPending,omitempty" yaml:"passPending,omitempty" example:"false"` // True if this check should pass by default. Otherwise the default 'pending' state counts as a failure. (Optional.) - IntegrationId ID `json:"integrationId" yaml:"integrationId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The integration id this check will use. (Required.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + IntegrationId ID `json:"integrationId" yaml:"integrationId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The integration id this check will use. (Required.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + PassPending *Nullable[bool] `json:"passPending,omitempty" yaml:"passPending,omitempty" example:"false"` // True if this check should pass by default. Otherwise the default 'pending' state counts as a failure. (Optional.) + ResultMessage *Nullable[string] `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" example:"example_value"` // The check result message template. It is compiled with Liquid and formatted in Markdown. [More info about liquid templates](https://docs.opslevel.com/docs/checks/payload-checks/#liquid-templating). (Optional.) + ServiceSelector string `json:"serviceSelector" yaml:"serviceSelector" example:"example_value"` // A jq expression that will be ran against your payload. This will parse out the service identifier. [More info about jq](https://jqplay.org/). (Required.) + SuccessCondition string `json:"successCondition" yaml:"successCondition" example:"example_value"` // A jq expression that will be ran against your payload. A truthy value will result in the check passing. [More info about jq](https://jqplay.org/). (Required.) } // CheckCustomEventUpdateInput specifies the input fields used to update a custom event check. type CheckCustomEventUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - ServiceSelector *string `json:"serviceSelector,omitempty" yaml:"serviceSelector,omitempty" example:"example_selector"` // A jq expression that will be ran against your payload. This will parse out the service identifier. [More info about jq](https:/jqplay.org/). (Optional.) - SuccessCondition *string `json:"successCondition,omitempty" yaml:"successCondition,omitempty" example:"example_condition"` // A jq expression that will be ran against your payload. A truthy value will result in the check passing. [More info about jq](https:/jqplay.org/). (Optional.) - ResultMessage *string `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" example:"example_message"` // The check result message template. It is compiled with Liquid and formatted in Markdown. [More info about liquid templates](https:/docs.opslevel.com/docs/checks/payload-checks/#liquid-templating). (Optional.) - PassPending *bool `json:"passPending,omitempty" yaml:"passPending,omitempty" example:"false"` // True if this check should pass by default. Otherwise the default 'pending' state counts as a failure. (Optional.) - IntegrationId *ID `json:"integrationId,omitempty" yaml:"integrationId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The integration id this check will use. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + IntegrationId *Nullable[ID] `json:"integrationId,omitempty" yaml:"integrationId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The integration id this check will use. (Optional.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) + PassPending *Nullable[bool] `json:"passPending,omitempty" yaml:"passPending,omitempty" example:"false"` // True if this check should pass by default. Otherwise the default 'pending' state counts as a failure. (Optional.) + ResultMessage *Nullable[string] `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" example:"example_value"` // The check result message template. It is compiled with Liquid and formatted in Markdown. [More info about liquid templates](https://docs.opslevel.com/docs/checks/payload-checks/#liquid-templating). (Optional.) + ServiceSelector *Nullable[string] `json:"serviceSelector,omitempty" yaml:"serviceSelector,omitempty" example:"example_value"` // A jq expression that will be ran against your payload. This will parse out the service identifier. [More info about jq](https://jqplay.org/). (Optional.) + SuccessCondition *Nullable[string] `json:"successCondition,omitempty" yaml:"successCondition,omitempty" example:"example_value"` // A jq expression that will be ran against your payload. A truthy value will result in the check passing. [More info about jq](https://jqplay.org/). (Optional.) } // CheckDeleteInput specifies the input fields used to delete a check. type CheckDeleteInput struct { - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be deleted. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be deleted. (Optional.) } // CheckGitBranchProtectionCreateInput specifies the input fields used to create a branch protection check. type CheckGitBranchProtectionCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckGitBranchProtectionUpdateInput specifies the input fields used to update a branch protection check. type CheckGitBranchProtectionUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckHasDocumentationCreateInput specifies the input fields used to create a documentation check. type CheckHasDocumentationCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - DocumentType HasDocumentationTypeEnum `json:"documentType" yaml:"documentType" example:"api"` // The type of the document. (Required.) DocumentSubtype HasDocumentationSubtypeEnum `json:"documentSubtype" yaml:"documentSubtype" example:"openapi"` // The subtype of the document. (Required.) + DocumentType HasDocumentationTypeEnum `json:"documentType" yaml:"documentType" example:"api"` // The type of the document. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckHasDocumentationUpdateInput specifies the input fields used to update a documentation check. type CheckHasDocumentationUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - DocumentType *HasDocumentationTypeEnum `json:"documentType,omitempty" yaml:"documentType,omitempty" example:"api"` // The type of the document. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) DocumentSubtype *HasDocumentationSubtypeEnum `json:"documentSubtype,omitempty" yaml:"documentSubtype,omitempty" example:"openapi"` // The subtype of the document. (Optional.) + DocumentType *HasDocumentationTypeEnum `json:"documentType,omitempty" yaml:"documentType,omitempty" example:"api"` // The type of the document. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckHasRecentDeployCreateInput specifies the input fields used to create a recent deploys check. type CheckHasRecentDeployCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Days int `json:"days" yaml:"days" example:"3"` // The number of days to check since the last deploy. (Required.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + Days int `json:"days" yaml:"days" example:"3"` // The number of days to check since the last deploy. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckHasRecentDeployUpdateInput specifies the input fields used to update a has recent deploy check. type CheckHasRecentDeployUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - Days *int `json:"days,omitempty" yaml:"days,omitempty" example:"3"` // The number of days to check since the last deploy. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + Days *int `json:"days,omitempty" yaml:"days,omitempty" example:"3"` // The number of days to check since the last deploy. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckManualCreateInput specifies the input fields used to create a manual check. type CheckManualCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) UpdateFrequency *ManualCheckFrequencyInput `json:"updateFrequency,omitempty" yaml:"updateFrequency,omitempty"` // Defines the minimum frequency of the updates. (Optional.) UpdateRequiresComment bool `json:"updateRequiresComment" yaml:"updateRequiresComment" example:"false"` // Whether the check requires a comment or not. (Required.) } // CheckManualUpdateInput specifies the input fields used to update a manual check. type CheckManualUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) UpdateFrequency *ManualCheckFrequencyUpdateInput `json:"updateFrequency,omitempty" yaml:"updateFrequency,omitempty"` // Defines the minimum frequency of the updates. (Optional.) - UpdateRequiresComment *bool `json:"updateRequiresComment,omitempty" yaml:"updateRequiresComment,omitempty" example:"false"` // Whether the check requires a comment or not. (Optional.) + UpdateRequiresComment *Nullable[bool] `json:"updateRequiresComment,omitempty" yaml:"updateRequiresComment,omitempty" example:"false"` // Whether the check requires a comment or not. (Optional.) } // CheckPackageVersionCreateInput represents information about the package version check to be created. type CheckPackageVersionCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - PackageManager PackageManagerEnum `json:"packageManager" yaml:"packageManager" example:"golang"` // The package manager (ecosystem) this package relates to. (Required.) - PackageName string `json:"packageName" yaml:"packageName" example:"example_name"` // The name of the package to be checked. (Required.) - PackageNameIsRegex *bool `json:"packageNameIsRegex,omitempty" yaml:"packageNameIsRegex,omitempty" example:"false"` // Whether or not the value in the package name field is a regular expression. (Optional.) - PackageConstraint PackageConstraintEnum `json:"packageConstraint" yaml:"packageConstraint" example:"matches_version"` // The package constraint the service is to be checked for. (Required.) - MissingPackageResult *CheckResultStatusEnum `json:"missingPackageResult,omitempty" yaml:"missingPackageResult,omitempty" example:"passed"` // The check result if the package isn't being used by a service. (Optional.) - VersionConstraintPredicate *PredicateInput `json:"versionConstraintPredicate,omitempty" yaml:"versionConstraintPredicate,omitempty"` // The predicate that describes the version constraint the package must satisfy. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + MissingPackageResult *CheckResultStatusEnum `json:"missingPackageResult,omitempty" yaml:"missingPackageResult,omitempty" example:"failed"` // The check result if the package isn't being used by a service. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + PackageConstraint PackageConstraintEnum `json:"packageConstraint" yaml:"packageConstraint" example:"does_not_exist"` // The package constraint the service is to be checked for. (Required.) + PackageManager PackageManagerEnum `json:"packageManager" yaml:"packageManager" example:"alpm"` // The package manager (ecosystem) this package relates to. (Required.) + PackageName string `json:"packageName" yaml:"packageName" example:"example_value"` // The name of the package to be checked. (Required.) + PackageNameIsRegex *Nullable[bool] `json:"packageNameIsRegex,omitempty" yaml:"packageNameIsRegex,omitempty" example:"false"` // Whether or not the value in the package name field is a regular expression. (Optional.) + VersionConstraintPredicate *PredicateInput `json:"versionConstraintPredicate,omitempty" yaml:"versionConstraintPredicate,omitempty"` // The predicate that describes the version constraint the package must satisfy. (Optional.) } // CheckPackageVersionUpdateInput represents information about the package version check to be updated. type CheckPackageVersionUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - PackageManager *PackageManagerEnum `json:"packageManager,omitempty" yaml:"packageManager,omitempty" example:"docker"` // The package manager (ecosystem) this package relates to. (Optional.) - PackageName *string `json:"packageName,omitempty" yaml:"packageName,omitempty" example:"example_name"` // The name of the package to be checked. (Optional.) - PackageNameIsRegex *bool `json:"packageNameIsRegex,omitempty" yaml:"packageNameIsRegex,omitempty" example:"false"` // Whether or not the value in the package name field is a regular expression. (Optional.) - PackageConstraint *PackageConstraintEnum `json:"packageConstraint,omitempty" yaml:"packageConstraint,omitempty" example:"matches_version"` // The package constraint the service is to be checked for. (Optional.) - MissingPackageResult *Nullable[CheckResultStatusEnum] `json:"missingPackageResult,omitempty" yaml:"missingPackageResult,omitempty" example:"failed"` // The check result if the package isn't being used by a service. (Optional.) - VersionConstraintPredicate *PredicateUpdateInput `json:"versionConstraintPredicate,omitempty" yaml:"versionConstraintPredicate,omitempty"` // The predicate that describes the version constraint the package must satisfy. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + MissingPackageResult *CheckResultStatusEnum `json:"missingPackageResult,omitempty" yaml:"missingPackageResult,omitempty" example:"failed"` // The check result if the package isn't being used by a service. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) + PackageConstraint *PackageConstraintEnum `json:"packageConstraint,omitempty" yaml:"packageConstraint,omitempty" example:"does_not_exist"` // The package constraint the service is to be checked for. (Optional.) + PackageManager *PackageManagerEnum `json:"packageManager,omitempty" yaml:"packageManager,omitempty" example:"alpm"` // The package manager (ecosystem) this package relates to. (Optional.) + PackageName *Nullable[string] `json:"packageName,omitempty" yaml:"packageName,omitempty" example:"example_value"` // The name of the package to be checked. (Optional.) + PackageNameIsRegex *Nullable[bool] `json:"packageNameIsRegex,omitempty" yaml:"packageNameIsRegex,omitempty" example:"false"` // Whether or not the value in the package name field is a regular expression. (Optional.) + VersionConstraintPredicate *PredicateUpdateInput `json:"versionConstraintPredicate,omitempty" yaml:"versionConstraintPredicate,omitempty"` // The predicate that describes the version constraint the package must satisfy. (Optional.) } // CheckRepositoryFileCreateInput specifies the input fields used to create a repo file check. type CheckRepositoryFileCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - DirectorySearch *bool `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) - FilePaths []string `json:"filePaths" yaml:"filePaths" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Required.) - FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) - UseAbsoluteRoot *bool `json:"useAbsoluteRoot,omitempty" yaml:"useAbsoluteRoot,omitempty" example:"false"` // Whether the checks looks at the absolute root of a repo or the relative root (the directory specified when attached a repo to a service). (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) + FilePaths []string `json:"filePaths" yaml:"filePaths" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Required.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + UseAbsoluteRoot *Nullable[bool] `json:"useAbsoluteRoot,omitempty" yaml:"useAbsoluteRoot,omitempty" example:"false"` // Whether the checks looks at the absolute root of a repo or the relative root (the directory specified when attached a repo to a service). (Optional.) } // CheckRepositoryFileUpdateInput specifies the input fields used to update a repo file check. type CheckRepositoryFileUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - DirectorySearch *bool `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) - FilePaths *[]string `json:"filePaths,omitempty" yaml:"filePaths,omitempty" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Optional.) - FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) - UseAbsoluteRoot *bool `json:"useAbsoluteRoot,omitempty" yaml:"useAbsoluteRoot,omitempty" example:"false"` // Whether the checks looks at the absolute root of a repo or the relative root (the directory specified when attached a repo to a service). (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) + FilePaths *Nullable[[]string] `json:"filePaths,omitempty" yaml:"filePaths,omitempty" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) + UseAbsoluteRoot *Nullable[bool] `json:"useAbsoluteRoot,omitempty" yaml:"useAbsoluteRoot,omitempty" example:"false"` // Whether the checks looks at the absolute root of a repo or the relative root (the directory specified when attached a repo to a service). (Optional.) } // CheckRepositoryGrepCreateInput specifies the input fields used to create a repo grep check. type CheckRepositoryGrepCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - DirectorySearch *bool `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) - FilePaths []string `json:"filePaths" yaml:"filePaths" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Required.) - FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"` // Condition to match the file content. (Required.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"` // Condition to match the file content. (Required.) + FilePaths []string `json:"filePaths" yaml:"filePaths" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Required.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckRepositoryGrepUpdateInput specifies the input fields used to update a repo file check. type CheckRepositoryGrepUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - DirectorySearch *bool `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) - FilePaths *[]string `json:"filePaths,omitempty" yaml:"filePaths,omitempty" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Optional.) - FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) + FilePaths *Nullable[[]string] `json:"filePaths,omitempty" yaml:"filePaths,omitempty" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckRepositoryIntegratedCreateInput specifies the input fields used to create a repository integrated check. type CheckRepositoryIntegratedCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckRepositoryIntegratedUpdateInput specifies the input fields used to update a repository integrated check. type CheckRepositoryIntegratedUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckRepositorySearchCreateInput specifies the input fields used to create a repo search check. type CheckRepositorySearchCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - FileExtensions *[]string `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" example:"['go', 'py', 'rb']"` // Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: `['py', 'rb']`. (Optional.) - FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"` // Condition to match the text content. (Required.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"` // Condition to match the text content. (Required.) + FileExtensions *Nullable[[]string] `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" example:"['go', 'py', 'rb']"` // Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: `['py', 'rb']`. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckRepositorySearchUpdateInput specifies the input fields used to update a repo search check. type CheckRepositorySearchUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - FileExtensions *[]string `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" example:"['go', 'py', 'rb']"` // Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: `['py', 'rb']`. (Optional.) - FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the text content. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the text content. (Optional.) + FileExtensions *Nullable[[]string] `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" example:"['go', 'py', 'rb']"` // Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: `['py', 'rb']`. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckServiceConfigurationCreateInput specifies the input fields used to create a configuration check. type CheckServiceConfigurationCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckServiceConfigurationUpdateInput specifies the input fields used to update a configuration check. type CheckServiceConfigurationUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckServiceDependencyCreateInput specifies the input fields used to create a service dependency check. type CheckServiceDependencyCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) } // CheckServiceDependencyUpdateInput specifies the input fields used to update a service dependency check. type CheckServiceDependencyUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) } // CheckServiceOwnershipCreateInput specifies the input fields used to create an ownership check. type CheckServiceOwnershipCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - RequireContactMethod *bool `json:"requireContactMethod,omitempty" yaml:"requireContactMethod,omitempty" example:"false"` // Whether to require a contact method for a service owner or not. (Optional.) - ContactMethod *string `json:"contactMethod,omitempty" yaml:"contactMethod,omitempty" example:"example_method"` // The type of contact method that an owner should provide. (Optional.) - TagKey *string `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"XXX_example_key_XXX"` // The tag key that should exist for a service owner. (Optional.) - TagPredicate *PredicateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + ContactMethod *Nullable[string] `json:"contactMethod,omitempty" yaml:"contactMethod,omitempty" example:"example_value"` // The type of contact method that an owner should provide (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + RequireContactMethod *Nullable[bool] `json:"requireContactMethod,omitempty" yaml:"requireContactMethod,omitempty" example:"false"` // Whether to require a contact method for a service owner or not (Optional.) + TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key that should exist for a service owner. (Optional.) + TagPredicate *PredicateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) } // CheckServiceOwnershipUpdateInput specifies the input fields used to update an ownership check. type CheckServiceOwnershipUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - RequireContactMethod *bool `json:"requireContactMethod,omitempty" yaml:"requireContactMethod,omitempty" example:"false"` // Whether to require a contact method for a service owner or not. (Optional.) - ContactMethod *string `json:"contactMethod,omitempty" yaml:"contactMethod,omitempty" example:"example_method"` // The type of contact method that an owner should provide. (Optional.) - TagKey *string `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"XXX_example_key_XXX"` // The tag key that should exist for a service owner. (Optional.) - TagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + ContactMethod *Nullable[string] `json:"contactMethod,omitempty" yaml:"contactMethod,omitempty" example:"example_value"` // The type of contact method that an owner should provide (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) + RequireContactMethod *Nullable[bool] `json:"requireContactMethod,omitempty" yaml:"requireContactMethod,omitempty" example:"false"` // Whether to require a contact method for a service owner or not (Optional.) + TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key that should exist for a service owner. (Optional.) + TagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) } // CheckServicePropertyCreateInput specifies the input fields used to create a service property check. type CheckServicePropertyCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + ComponentType *IdentifierInput `json:"componentType,omitempty" yaml:"componentType,omitempty"` // The Component Type that a custom property belongs to. Defaults to Service properties if not provided. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - ServiceProperty ServicePropertyTypeEnum `json:"serviceProperty" yaml:"serviceProperty" example:"language"` // The property of the service that the check will verify. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) PropertyDefinition *IdentifierInput `json:"propertyDefinition,omitempty" yaml:"propertyDefinition,omitempty"` // The secondary key of the property that the check will verify (e.g. the specific custom property). (Optional.) PropertyValuePredicate *PredicateInput `json:"propertyValuePredicate,omitempty" yaml:"propertyValuePredicate,omitempty"` // The condition that should be satisfied by the service property value. (Optional.) + ServiceProperty ServicePropertyTypeEnum `json:"serviceProperty" yaml:"serviceProperty" example:"custom_property"` // The property of the service that the check will verify. (Required.) } // CheckServicePropertyUpdateInput specifies the input fields used to update a service property check. type CheckServicePropertyUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + ComponentType *IdentifierInput `json:"componentType,omitempty" yaml:"componentType,omitempty"` // The Component Type that a custom property belongs to. Defaults to Service properties if not provided. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - ServiceProperty *ServicePropertyTypeEnum `json:"serviceProperty,omitempty" yaml:"serviceProperty,omitempty" example:"language"` // The property of the service that the check will verify. (Optional.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) PropertyDefinition *IdentifierInput `json:"propertyDefinition,omitempty" yaml:"propertyDefinition,omitempty"` // The secondary key of the property that the check will verify (e.g. the specific custom property). (Optional.) PropertyValuePredicate *PredicateUpdateInput `json:"propertyValuePredicate,omitempty" yaml:"propertyValuePredicate,omitempty"` // The condition that should be satisfied by the service property value. (Optional.) + ServiceProperty *ServicePropertyTypeEnum `json:"serviceProperty,omitempty" yaml:"serviceProperty,omitempty" example:"custom_property"` // The property of the service that the check will verify. (Optional.) } // CheckTagDefinedCreateInput specifies the input fields used to create a tag check. type CheckTagDefinedCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - TagKey string `json:"tagKey" yaml:"tagKey" example:"XXX_example_key_XXX"` // The tag key where the tag predicate should be applied. (Required.) - TagPredicate *PredicateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + TagKey string `json:"tagKey" yaml:"tagKey" example:"example_value"` // The tag key where the tag predicate should be applied. (Required.) + TagPredicate *PredicateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) } // CheckTagDefinedUpdateInput specifies the input fields used to update a tag defined check. type CheckTagDefinedUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - TagKey *string `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"XXX_example_key_XXX"` // The tag key where the tag predicate should be applied. (Optional.) - TagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) + TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key where the tag predicate should be applied. (Optional.) + TagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) } // CheckToPromoteInput specifies the input fields used to promote a campaign check to the rubric. type CheckToPromoteInput struct { - CheckId ID `json:"checkId" yaml:"checkId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the check to be promoted to the rubric. (Required.) CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the category that the promoted check will be linked to. (Required.) + CheckId ID `json:"checkId" yaml:"checkId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the check to be promoted to the rubric. (Required.) LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the level that the promoted check will be linked to. (Required.) } // CheckToolUsageCreateInput specifies the input fields used to create a tool usage check. type CheckToolUsageCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the check. (Required.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - ToolCategory ToolCategory `json:"toolCategory" yaml:"toolCategory" example:"api_documentation"` // The category that the tool belongs to. (Required.) - ToolNamePredicate *PredicateInput `json:"toolNamePredicate,omitempty" yaml:"toolNamePredicate,omitempty"` // The condition that the tool name should satisfy to be evaluated. (Optional.) - ToolUrlPredicate *PredicateInput `json:"toolUrlPredicate,omitempty" yaml:"toolUrlPredicate,omitempty"` // The condition that the tool url should satisfy to be evaluated. (Optional.) - EnvironmentPredicate *PredicateInput `json:"environmentPredicate,omitempty" yaml:"environmentPredicate,omitempty"` // The condition that the environment should satisfy to be evaluated. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + EnvironmentPredicate *PredicateInput `json:"environmentPredicate,omitempty" yaml:"environmentPredicate,omitempty"` // The condition that the environment should satisfy to be evaluated. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + ToolCategory ToolCategory `json:"toolCategory" yaml:"toolCategory" example:"admin"` // The category that the tool belongs to. (Required.) + ToolNamePredicate *PredicateInput `json:"toolNamePredicate,omitempty" yaml:"toolNamePredicate,omitempty"` // The condition that the tool name should satisfy to be evaluated. (Optional.) + ToolUrlPredicate *PredicateInput `json:"toolUrlPredicate,omitempty" yaml:"toolUrlPredicate,omitempty"` // The condition that the tool url should satisfy to be evaluated. (Optional.) } // CheckToolUsageUpdateInput specifies the input fields used to update a tool usage check. type CheckToolUsageUpdateInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the check. (Optional.) - CategoryId *ID `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - LevelId *ID `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnableOn *iso8601.Time `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Additional information about the check. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - ToolCategory *ToolCategory `json:"toolCategory,omitempty" yaml:"toolCategory,omitempty" example:"api_documentation"` // The category that the tool belongs to. (Optional.) - ToolNamePredicate *PredicateUpdateInput `json:"toolNamePredicate,omitempty" yaml:"toolNamePredicate,omitempty"` // The condition that the tool name should satisfy to be evaluated. (Optional.) - ToolUrlPredicate *PredicateUpdateInput `json:"toolUrlPredicate,omitempty" yaml:"toolUrlPredicate,omitempty"` // The condition that the tool url should satisfy to be evaluated. (Optional.) - EnvironmentPredicate *PredicateUpdateInput `json:"environmentPredicate,omitempty" yaml:"environmentPredicate,omitempty"` // The condition that the environment should satisfy to be evaluated. (Optional.) -} - -// ChecksCopyToCampaignInput specifies the input fields used to copy selected rubric checks to an existing campaign. -type ChecksCopyToCampaignInput struct { - CampaignId ID `json:"campaignId" yaml:"campaignId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the existing campaign. (Required.) - CheckIds []string `json:"checkIds" yaml:"checkIds" example:"['Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk', 'Z2lkOi8vc2VydmljZS85ODc2NTQzMjE']"` // The IDs of the existing rubric checks to be copied. (Required.) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) + EnvironmentPredicate *PredicateUpdateInput `json:"environmentPredicate,omitempty" yaml:"environmentPredicate,omitempty"` // The condition that the environment should satisfy to be evaluated. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) + ToolCategory *ToolCategory `json:"toolCategory,omitempty" yaml:"toolCategory,omitempty" example:"admin"` // The category that the tool belongs to. (Optional.) + ToolNamePredicate *PredicateUpdateInput `json:"toolNamePredicate,omitempty" yaml:"toolNamePredicate,omitempty"` // The condition that the tool name should satisfy to be evaluated. (Optional.) + ToolUrlPredicate *PredicateUpdateInput `json:"toolUrlPredicate,omitempty" yaml:"toolUrlPredicate,omitempty"` // The condition that the tool url should satisfy to be evaluated. (Optional.) } // CodeIssueResolutionTimeInput represents the allowed threshold for how long an issue has been detected before the check starts failing. type CodeIssueResolutionTimeInput struct { - Unit CodeIssueResolutionTimeUnitEnum `json:"unit" yaml:"unit" example:"day"` // . (Required.) - Value int `json:"value" yaml:"value" example:"3"` // . (Required.) + Unit CodeIssueResolutionTimeUnitEnum `json:"unit" yaml:"unit" example:"day"` // (Required.) + Value int `json:"value" yaml:"value" example:"3"` // (Required.) +} + +// ComponentTypeInput specifies the input fields used to create a component type. +type ComponentTypeInput struct { + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The unique alias of the component type. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The unique alias of the component type. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The unique name of the component type. (Optional.) + Properties *[]ComponentTypePropertyDefinitionInput `json:"properties,omitempty" yaml:"properties,omitempty" example:"[]"` // A list of property definitions for the component type. (Optional.) +} + +// ComponentTypePropertyDefinitionInput represents the input for defining a property on a component type. +type ComponentTypePropertyDefinitionInput struct { + Alias string `json:"alias" yaml:"alias" example:"example_value"` // The human-friendly, unique identifier for the resource. (Required.) + AllowedInConfigFiles bool `json:"allowedInConfigFiles" yaml:"allowedInConfigFiles" example:"false"` // Whether or not the property is allowed to be set in opslevel.yml config files. (Required.) + Description string `json:"description" yaml:"description" example:"example_value"` // The description of the property definition. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The name of the property definition. (Required.) + PropertyDisplayStatus PropertyDisplayStatusEnum `json:"propertyDisplayStatus" yaml:"propertyDisplayStatus" example:"hidden"` // The display status of the custom property on service pages. (Required.) + Schema JSONSchema `json:"schema" yaml:"schema" example:"SCHEMA_TBD"` // The schema of the property definition. (Required.) } // ContactCreateInput specifies the input fields used to create a contact. type ContactCreateInput struct { - Type ContactType `json:"type" yaml:"type" example:"slack"` // The method of contact [email, slack, slack_handle, web]. (Required.) - DisplayName *string `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_name"` // The name shown in the UI for the contact. (Optional.) - Address string `json:"address" yaml:"address" example:"support@company.com"` // The contact address. Examples: support@company.com for type `email`, https:/opslevel.com for type `web`. (Required.) - TeamAlias *string `json:"teamAlias,omitempty" yaml:"teamAlias,omitempty" example:"example_alias"` // The alias of the team the contact belongs to. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of this contact. (Optional.) - DisplayType *string `json:"displayType,omitempty" yaml:"displayType,omitempty" example:"example_type"` // The type shown in the UI for the contact. (Optional.) - ExternalId *string `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The remote identifier of the contact method. (Optional.) + Address string `json:"address" yaml:"address" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web`. (Required.) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact. (Optional.) + DisplayType *Nullable[string] `json:"displayType,omitempty" yaml:"displayType,omitempty" example:"example_value"` // The type shown in the UI for the contact. (Optional.) + ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The remote identifier of the contact method. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of this contact. (Optional.) + TeamAlias *Nullable[string] `json:"teamAlias,omitempty" yaml:"teamAlias,omitempty" example:"example_value"` // The alias of the team the contact belongs to. (Optional.) + TeamId *Nullable[ID] `json:"teamId,omitempty" yaml:"teamId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team the contact belongs to. (Optional.) + Type ContactType `json:"type" yaml:"type" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams]. (Required.) } // ContactDeleteInput specifies the input fields used to delete a contact. @@ -657,73 +680,73 @@ type ContactDeleteInput struct { // ContactInput specifies the input fields used to create a contact. type ContactInput struct { - Type ContactType `json:"type" yaml:"type" example:"slack"` // The method of contact [email, slack, slack_handle, web]. (Required.) - Address string `json:"address" yaml:"address" example:"support@company.com"` // The contact address. Examples: support@company.com for type `email`, https:/opslevel.com for type `web`. (Required.) - DisplayName *string `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_name"` // The name shown in the UI for the contact. (Optional.) + Address string `json:"address" yaml:"address" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web`. (Required.) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact. (Optional.) + Type ContactType `json:"type" yaml:"type" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams]. (Required.) } // ContactUpdateInput specifies the input fields used to update a contact. type ContactUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The unique identifier for the contact. (Required.) - Type *ContactType `json:"type,omitempty" yaml:"type,omitempty" example:"slack"` // The method of contact [email, slack, slack_handle, web]. (Optional.) - Address *string `json:"address,omitempty" yaml:"address,omitempty" example:"support@company.com"` // The contact address. Examples: support@company.com for type `email`, https:/opslevel.com for type `web`. (Optional.) - DisplayName *string `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_name"` // The name shown in the UI for the contact. (Optional.) - DisplayType *string `json:"displayType,omitempty" yaml:"displayType,omitempty" example:"example_type"` // The type shown in the UI for the contact. (Optional.) - ExternalId *string `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The remote identifier of the contact method. (Optional.) - MakeDefault *bool `json:"makeDefault,omitempty" yaml:"makeDefault,omitempty" example:"false"` // Makes the contact the default for the given type. Only available for team contacts. (Optional.) + Address *Nullable[string] `json:"address,omitempty" yaml:"address,omitempty" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web`. (Optional.) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact. (Optional.) + DisplayType *Nullable[string] `json:"displayType,omitempty" yaml:"displayType,omitempty" example:"example_value"` // The type shown in the UI for the contact. (Optional.) + ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The remote identifier of the contact method. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The unique identifier for the contact. (Required.) + MakeDefault *Nullable[bool] `json:"makeDefault,omitempty" yaml:"makeDefault,omitempty" example:"false"` // Makes the contact the default for the given type. Only available for team contacts. (Optional.) + Type *ContactType `json:"type,omitempty" yaml:"type,omitempty" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams]. (Optional.) } // CustomActionsTriggerDefinitionCreateInput specifies the input fields used in the `customActionsTriggerDefinitionCreate` mutation. type CustomActionsTriggerDefinitionCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The name of the Trigger Definition. (Required.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description of what the Trigger Definition will do, supports Markdown. (Optional.) - OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The owner of the Trigger Definition. (Required.) - ActionId *ID `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The filter that will determine which services apply to the Trigger Definition. (Optional.) - ManualInputsDefinition *string `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty" example:"example_definition"` // The YAML definition of custom inputs for the Trigger Definition. (Optional.) - Published *bool `json:"published,omitempty" yaml:"published,omitempty" example:"false"` // The published state of the action; true if the definition is ready for use; false if it is a draft. (Optional.) - AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"service_owners"` // The set of users that should be able to use the trigger definition. (Optional.) - ResponseTemplate *string `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty" example:"{\"token\": \"XXX\", \"ref\":\"main\", \"action\": \"rollback\"}"` // The liquid template used to parse the response from the External Action. (Optional.) - EntityType *CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty" example:"GLOBAL"` // The entity type to associate with the Trigger Definition. (Optional.) - ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" example:"[]"` // The set of additional teams who can invoke this Trigger Definition. (Optional.) + AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"admins"` // The set of users that should be able to use the trigger definition. (Optional.) + ActionId *Nullable[ID] `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of what the Trigger Definition will do, supports Markdown. (Optional.) + EntityType *CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty" example:"GLOBAL"` // The entity type to associate with the Trigger Definition. (Optional.) + ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" example:"[]"` // The set of additional teams who can invoke this Trigger Definition. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The filter that will determine which services apply to the Trigger Definition. (Optional.) + ManualInputsDefinition *Nullable[string] `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty" example:"example_value"` // The YAML definition of custom inputs for the Trigger Definition. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The name of the Trigger Definition. (Required.) + OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The owner of the Trigger Definition. (Required.) + Published *Nullable[bool] `json:"published,omitempty" yaml:"published,omitempty" example:"false"` // The published state of the action; true if the definition is ready for use; false if it is a draft. (Optional.) + ResponseTemplate *Nullable[string] `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty" example:"example_value"` // The liquid template used to parse the response from the External Action. (Optional.) } // CustomActionsTriggerDefinitionUpdateInput specifies the input fields used in the `customActionsTriggerDefinitionUpdate` mutation. type CustomActionsTriggerDefinitionUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the trigger definition. (Required.) - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name of the Trigger Definition. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description of what the Trigger Definition will do, support Markdown. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The owner of the Trigger Definition. (Optional.) - ActionId *ID `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition. (Optional.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The filter that will determine which services apply to the Trigger Definition. (Optional.) - Action *CustomActionsWebhookActionUpdateInput `json:"action,omitempty" yaml:"action,omitempty"` // The details for the action to update for the Trigger Definition. (Optional.) - ManualInputsDefinition *string `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty" example:"example_definition"` // The YAML definition of custom inputs for the Trigger Definition. (Optional.) - Published *bool `json:"published,omitempty" yaml:"published,omitempty" example:"false"` // The published state of the action; true if the definition is ready for use; false if it is a draft. (Optional.) - AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"service_owners"` // The set of users that should be able to use the trigger definition. (Optional.) - ResponseTemplate *string `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty" example:"{\"token\": \"XXX\", \"ref\":\"main\", \"action\": \"rollback\"}"` // The liquid template used to parse the response from the External Action. (Optional.) - EntityType *CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty" example:"GLOBAL"` // The entity type to associate with the Trigger Definition. (Optional.) - ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" example:"[]"` // The set of additional teams who can invoke this Trigger Definition. (Optional.) + AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"admins"` // The set of users that should be able to use the trigger definition. (Optional.) + Action *CustomActionsWebhookActionUpdateInput `json:"action,omitempty" yaml:"action,omitempty"` // The details for the action to update for the Trigger Definition. (Optional.) + ActionId *Nullable[ID] `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of what the Trigger Definition will do, support Markdown. (Optional.) + EntityType *CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty" example:"GLOBAL"` // The entity type to associate with the Trigger Definition. (Optional.) + ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" example:"[]"` // The set of additional teams who can invoke this Trigger Definition. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The filter that will determine which services apply to the Trigger Definition. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the trigger definition. (Required.) + ManualInputsDefinition *Nullable[string] `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty" example:"example_value"` // The YAML definition of custom inputs for the Trigger Definition. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the Trigger Definition. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The owner of the Trigger Definition. (Optional.) + Published *Nullable[bool] `json:"published,omitempty" yaml:"published,omitempty" example:"false"` // The published state of the action; true if the definition is ready for use; false if it is a draft. (Optional.) + ResponseTemplate *Nullable[string] `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty" example:"example_value"` // The liquid template used to parse the response from the External Action. (Optional.) } // CustomActionsWebhookActionCreateInput specifies the input fields used in the `customActionsWebhookActionCreate` mutation. type CustomActionsWebhookActionCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The name that gets assigned to the Webhook Action you're creating. (Required.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description that gets assigned to the Webhook Action you're creating. (Optional.) - LiquidTemplate *string `json:"liquidTemplate,omitempty" yaml:"liquidTemplate,omitempty" example:"{\"token\": \"XXX\", \"ref\":\"main\", \"action\": \"rollback\"}"` // Template that can be used to generate a Webhook payload. (Optional.) - WebhookUrl string `json:"webhookUrl" yaml:"webhookUrl" example:"john.doe@example.com"` // The URL that you wish to send the Webhook to when triggered. (Required.) - HttpMethod CustomActionsHttpMethodEnum `json:"httpMethod" yaml:"httpMethod" example:"GET"` // HTTP used when the Webhook is triggered. Either POST or PUT. (Required.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description that gets assigned to the Webhook Action you're creating. (Optional.) Headers *JSON `json:"headers,omitempty" yaml:"headers,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // HTTP headers be passed along with your Webhook when triggered. (Optional.) + HttpMethod CustomActionsHttpMethodEnum `json:"httpMethod" yaml:"httpMethod" example:"DELETE"` // HTTP used when the Webhook is triggered. Either POST or PUT. (Required.) + LiquidTemplate *Nullable[string] `json:"liquidTemplate,omitempty" yaml:"liquidTemplate,omitempty" example:"example_value"` // Template that can be used to generate a Webhook payload. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The name that gets assigned to the Webhook Action you're creating. (Required.) + WebhookUrl string `json:"webhookUrl" yaml:"webhookUrl" example:"example_value"` // The URL that you wish to send the Webhook to when triggered. (Required.) } // CustomActionsWebhookActionUpdateInput represents inputs that specify the details of a Webhook Action you wish to update. type CustomActionsWebhookActionUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the Webhook Action you wish to update. (Required.) - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name that gets assigned to the Webhook Action you're creating. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description that gets assigned to the Webhook Action you're creating. (Optional.) - LiquidTemplate *string `json:"liquidTemplate,omitempty" yaml:"liquidTemplate,omitempty" example:"{\"token\": \"XXX\", \"ref\":\"main\", \"action\": \"rollback\"}"` // Template that can be used to generate a Webhook payload. (Optional.) - WebhookUrl *string `json:"webhookUrl,omitempty" yaml:"webhookUrl,omitempty" example:"john.doe@example.com"` // The URL that you wish to send the Webhook too when triggered. (Optional.) - HttpMethod *CustomActionsHttpMethodEnum `json:"httpMethod,omitempty" yaml:"httpMethod,omitempty" example:"GET"` // HTTP used when the Webhook is triggered. Either POST or PUT. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description that gets assigned to the Webhook Action you're creating. (Optional.) Headers *JSON `json:"headers,omitempty" yaml:"headers,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // HTTP headers be passed along with your Webhook when triggered. (Optional.) + HttpMethod *CustomActionsHttpMethodEnum `json:"httpMethod,omitempty" yaml:"httpMethod,omitempty" example:"DELETE"` // HTTP used when the Webhook is triggered. Either POST or PUT. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the Webhook Action you wish to update. (Required.) + LiquidTemplate *Nullable[string] `json:"liquidTemplate,omitempty" yaml:"liquidTemplate,omitempty" example:"example_value"` // Template that can be used to generate a Webhook payload. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name that gets assigned to the Webhook Action you're creating. (Optional.) + WebhookUrl *Nullable[string] `json:"webhookUrl,omitempty" yaml:"webhookUrl,omitempty" example:"example_value"` // The URL that you wish to send the Webhook too when triggered. (Optional.) } // DeleteInput specifies the input fields used to delete an entity. @@ -733,22 +756,22 @@ type DeleteInput struct { // DomainInput specifies the input fields for a domain. type DomainInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name for the domain. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description for the domain. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the domain. (Optional.) - Note *string `json:"note,omitempty" yaml:"note,omitempty" example:"example_note"` // Additional information about the domain. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description for the domain. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name for the domain. (Optional.) + Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Additional information about the domain. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the domain. (Optional.) } -// EventIntegrationInput represents . +// EventIntegrationInput type EventIntegrationInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name of the event integration. (Optional.) - Type EventIntegrationEnum `json:"type" yaml:"type" example:"example_type"` // The type of event integration to create. (Required.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the event integration. (Optional.) + Type EventIntegrationEnum `json:"type" yaml:"type" example:"apiDoc"` // The type of event integration to create. (Required.) } -// EventIntegrationUpdateInput represents . +// EventIntegrationUpdateInput type EventIntegrationUpdateInput struct { Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the event integration to update. (Required.) - Name string `json:"name" yaml:"name" example:"example_name"` // The name of the event integration. (Required.) + Name string `json:"name" yaml:"name" example:"example_value"` // The name of the event integration. (Required.) } // ExternalUuidMutationInput specifies the input used for modifying a resource's external UUID. @@ -758,69 +781,69 @@ type ExternalUuidMutationInput struct { // FilterCreateInput specifies the input fields used to create a filter. type FilterCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the filter. (Required.) - Predicates *[]FilterPredicateInput `json:"predicates,omitempty" yaml:"predicates,omitempty" example:"[]"` // The list of predicates used to select which services apply to the filter. (Optional.) - Connective *ConnectiveEnum `json:"connective,omitempty" yaml:"connective,omitempty" example:"or"` // The logical operator to be used in conjunction with predicates. (Optional.) + Connective *ConnectiveEnum `json:"connective,omitempty" yaml:"connective,omitempty" example:"and"` // The logical operator to be used in conjunction with predicates. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the filter. (Required.) + Predicates *[]FilterPredicateInput `json:"predicates,omitempty" yaml:"predicates,omitempty" example:"[]"` // The list of predicates used to select which services apply to the filter. (Optional.) } // FilterPredicateInput represents a condition that should be satisfied. type FilterPredicateInput struct { - Type PredicateTypeEnum `json:"type" yaml:"type" example:"satisfies_jq_expression"` // The condition type used by the predicate. (Required.) - Value *string `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) - Key PredicateKeyEnum `json:"key" yaml:"key" example:"filter_id"` // The condition key used by the predicate. (Required.) - KeyData *string `json:"keyData,omitempty" yaml:"keyData,omitempty" example:"example_data"` // Additional data used by the predicate. This field is used by predicates with key = 'tags' to specify the tag key. For example, to create a predicate for services containing the tag 'db:mysql', set keyData = 'db' and value = 'mysql'. (Optional.) - CaseSensitive *bool `json:"caseSensitive,omitempty" yaml:"caseSensitive,omitempty" example:"false"` // . (Optional.) + CaseSensitive *Nullable[bool] `json:"caseSensitive,omitempty" yaml:"caseSensitive,omitempty" example:"false"` // (Optional.) + Key PredicateKeyEnum `json:"key" yaml:"key" example:"aliases"` // The condition key used by the predicate. (Required.) + KeyData *Nullable[string] `json:"keyData,omitempty" yaml:"keyData,omitempty" example:"example_value"` // Additional data used by the predicate. This field is used by predicates with key = 'tags' to specify the tag key. For example, to create a predicate for services containing the tag 'db:mysql', set keyData = 'db' and value = 'mysql'. (Optional.) + Type PredicateTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The condition type used by the predicate. (Required.) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) } // FilterUpdateInput specifies the input fields used to update a filter. type FilterUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter. (Required.) - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the filter. (Optional.) - Predicates *[]FilterPredicateInput `json:"predicates,omitempty" yaml:"predicates,omitempty" example:"[]"` // The list of predicates used to select which services apply to the filter. All existing predicates will be replaced by these predicates. (Optional.) - Connective *ConnectiveEnum `json:"connective,omitempty" yaml:"connective,omitempty" example:"or"` // The logical operator to be used in conjunction with predicates. (Optional.) + Connective *ConnectiveEnum `json:"connective,omitempty" yaml:"connective,omitempty" example:"and"` // The logical operator to be used in conjunction with predicates. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter. (Required.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the filter. (Optional.) + Predicates *[]FilterPredicateInput `json:"predicates,omitempty" yaml:"predicates,omitempty" example:"[]"` // The list of predicates used to select which services apply to the filter. All existing predicates will be replaced by these predicates. (Optional.) } // GoogleCloudIntegrationInput specifies the input fields used to create and update a Google Cloud integration. type GoogleCloudIntegrationInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name of the integration. (Optional.) - OwnershipTagKeys *[]string `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) - PrivateKey *string `json:"privateKey,omitempty" yaml:"privateKey,omitempty" example:"XXX_example_key_XXX"` // The private key for the service account that OpsLevel uses to access the Google Cloud account. (Optional.) - ClientEmail *string `json:"clientEmail,omitempty" yaml:"clientEmail,omitempty" example:"first.last@domain.com"` // The service account email OpsLevel uses to access the Google Cloud account. (Optional.) - TagsOverrideOwnership *bool `json:"tagsOverrideOwnership,omitempty" yaml:"tagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from Google Cloud to override ownership set in OpsLevel directly. (Optional.) + ClientEmail *Nullable[string] `json:"clientEmail,omitempty" yaml:"clientEmail,omitempty" example:"example_value"` // The service account email OpsLevel uses to access the Google Cloud account. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) + OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) + PrivateKey *Nullable[string] `json:"privateKey,omitempty" yaml:"privateKey,omitempty" example:"example_value"` // The private key for the service account that OpsLevel uses to access the Google Cloud account. (Optional.) + TagsOverrideOwnership *Nullable[bool] `json:"tagsOverrideOwnership,omitempty" yaml:"tagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from Google Cloud to override ownership set in OpsLevel directly. (Optional.) } // IdentifierInput specifies the input fields used to identify a resource. type IdentifierInput struct { + Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The human-friendly, unique identifier for the resource. (Optional.) Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource. (Optional.) - Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_alias"` // The human-friendly, unique identifier for the resource. (Optional.) } // InfrastructureResourceInput specifies the input fields for a infrastructure resource. type InfrastructureResourceInput struct { - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the infrastructure_resource. (Optional.) Data *JSON `json:"data,omitempty" yaml:"data,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // The data for the infrastructure_resource. (Optional.) - Schema *InfrastructureResourceSchemaInput `json:"schema,omitempty" yaml:"schema,omitempty"` // The schema for the infrastructure_resource that determines its type. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the infrastructure_resource. (Optional.) ProviderData *InfrastructureResourceProviderDataInput `json:"providerData,omitempty" yaml:"providerData,omitempty"` // Data about the provider of the infrastructure resource. (Optional.) - ProviderResourceType *string `json:"providerResourceType,omitempty" yaml:"providerResourceType,omitempty" example:"example_type"` // The type of the infrastructure resource in its provider. (Optional.) + ProviderResourceType *Nullable[string] `json:"providerResourceType,omitempty" yaml:"providerResourceType,omitempty" example:"example_value"` // The type of the infrastructure resource in its provider. (Optional.) + Schema *InfrastructureResourceSchemaInput `json:"schema,omitempty" yaml:"schema,omitempty"` // The schema for the infrastructure_resource that determines its type. (Optional.) } // InfrastructureResourceProviderDataInput specifies the input fields for data about an infrastructure resource's provider. type InfrastructureResourceProviderDataInput struct { - AccountName string `json:"accountName" yaml:"accountName" example:"example_name"` // The account name of the provider. (Required.) - ExternalUrl *string `json:"externalUrl,omitempty" yaml:"externalUrl,omitempty" example:"john.doe@example.com"` // The external URL of the infrastructure resource in its provider. (Optional.) - ProviderName *string `json:"providerName,omitempty" yaml:"providerName,omitempty" example:"example_name"` // The name of the provider (e.g. AWS, GCP, Azure). (Optional.) + AccountName string `json:"accountName" yaml:"accountName" example:"example_value"` // The account name of the provider. (Required.) + ExternalUrl *Nullable[string] `json:"externalUrl,omitempty" yaml:"externalUrl,omitempty" example:"example_value"` // The external URL of the infrastructure resource in its provider. (Optional.) + ProviderName *Nullable[string] `json:"providerName,omitempty" yaml:"providerName,omitempty" example:"example_value"` // The name of the provider (e.g. AWS, GCP, Azure). (Optional.) } // InfrastructureResourceSchemaInput specifies the schema for an infrastructure resource. type InfrastructureResourceSchemaInput struct { - Type string `json:"type" yaml:"type" example:"example_type"` // The type of the infrastructure resource. (Required.) + Type string `json:"type" yaml:"type" example:"example_value"` // The type of the infrastructure resource. (Required.) } // LevelCreateInput specifies the input fields used to create a level. The new level will be added as the highest level (greatest level index). type LevelCreateInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the level. (Required.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description of the level. (Optional.) - Index *int `json:"index,omitempty" yaml:"index,omitempty" example:"3"` // an integer allowing this level to be inserted between others. Must be unique per Rubric. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the level. (Optional.) + Index *int `json:"index,omitempty" yaml:"index,omitempty" example:"3"` // an integer allowing this level to be inserted between others. Must be unique per Rubric. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the level. (Required.) } // LevelDeleteInput specifies the input fields used to delete a level. @@ -830,198 +853,246 @@ type LevelDeleteInput struct { // LevelUpdateInput specifies the input fields used to update a level. type LevelUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level to be updated. (Required.) - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the level. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description of the level. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the level. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level to be updated. (Required.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the level. (Optional.) } // ManualCheckFrequencyInput represents defines a frequency for the check update. type ManualCheckFrequencyInput struct { - StartingDate iso8601.Time `json:"startingDate" yaml:"startingDate" example:"2024-01-05T01:00:00.000Z"` // The date that the check will start to evaluate. (Required.) - FrequencyTimeScale FrequencyTimeScale `json:"frequencyTimeScale" yaml:"frequencyTimeScale" example:"week"` // The time scale type for the frequency. (Required.) + FrequencyTimeScale FrequencyTimeScale `json:"frequencyTimeScale" yaml:"frequencyTimeScale" example:"day"` // The time scale type for the frequency. (Required.) FrequencyValue int `json:"frequencyValue" yaml:"frequencyValue" example:"3"` // The value to be used together with the frequency scale. (Required.) + StartingDate iso8601.Time `json:"startingDate" yaml:"startingDate" example:"2025-01-05T01:00:00.000Z"` // The date that the check will start to evaluate. (Required.) } // ManualCheckFrequencyUpdateInput represents defines a frequency for the check update. type ManualCheckFrequencyUpdateInput struct { - StartingDate *iso8601.Time `json:"startingDate,omitempty" yaml:"startingDate,omitempty" example:"2024-01-05T01:00:00.000Z"` // The date that the check will start to evaluate. (Optional.) - FrequencyTimeScale *FrequencyTimeScale `json:"frequencyTimeScale,omitempty" yaml:"frequencyTimeScale,omitempty" example:"week"` // The time scale type for the frequency. (Optional.) - FrequencyValue *int `json:"frequencyValue,omitempty" yaml:"frequencyValue,omitempty" example:"3"` // The value to be used together with the frequency scale. (Optional.) + FrequencyTimeScale *FrequencyTimeScale `json:"frequencyTimeScale,omitempty" yaml:"frequencyTimeScale,omitempty" example:"day"` // The time scale type for the frequency. (Optional.) + FrequencyValue *Nullable[int] `json:"frequencyValue,omitempty" yaml:"frequencyValue,omitempty" example:"3"` // The value to be used together with the frequency scale. (Optional.) + StartingDate *Nullable[iso8601.Time] `json:"startingDate,omitempty" yaml:"startingDate,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date that the check will start to evaluate. (Optional.) } // MemberInput represents input for specifying members on a group. type MemberInput struct { - Email string `json:"email" yaml:"email" example:"first.last@domain.com"` // The user's email. (Required.) + Email string `json:"email" yaml:"email" example:"example_value"` // The user's email. (Required.) } -// NewRelicIntegrationAccountsInput represents . +// NewRelicIntegrationAccountsInput type NewRelicIntegrationAccountsInput struct { - ApiKey string `json:"apiKey" yaml:"apiKey" example:"XXX_example_key_XXX"` // The API Key for the New Relic API. (Required.) - BaseUrl string `json:"baseUrl" yaml:"baseUrl" example:"john.doe@example.com"` // The API URL for New Relic API. (Required.) + ApiKey string `json:"apiKey" yaml:"apiKey" example:"example_value"` // The API Key for the New Relic API. (Required.) + BaseUrl string `json:"baseUrl" yaml:"baseUrl" example:"example_value"` // The API URL for New Relic API. (Required.) } -// NewRelicIntegrationInput represents . +// NewRelicIntegrationInput type NewRelicIntegrationInput struct { - ApiKey *string `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"XXX_example_key_XXX"` // The API Key for the New Relic API. (Optional.) - BaseUrl *string `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty" example:"john.doe@example.com"` // The API URL for New Relic API. (Optional.) + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the New Relic API. (Optional.) + BaseUrl *Nullable[string] `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty" example:"example_value"` // The API URL for New Relic API. (Optional.) +} + +// OctopusDeployIntegrationInput specifies the input fields used to create and update an Octopus Deploy integration. +type OctopusDeployIntegrationInput struct { + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the Octopus Deploy API. (Optional.) + InstanceUrl *Nullable[string] `json:"instanceUrl,omitempty" yaml:"instanceUrl,omitempty" example:"example_value"` // The URL the Octopus Deploy instance if hosted on. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) +} + +// PayloadFilterInput represents input to be used to filter types. +type PayloadFilterInput struct { + Arg *Nullable[string] `json:"arg,omitempty" yaml:"arg,omitempty" example:"example_value"` // Value to be filtered. (Optional.) + Key PayloadFilterEnum `json:"key" yaml:"key" example:"integration_id"` // Field to be filtered. (Required.) + Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // Type of operation to be applied to value on the field. (Optional.) } // PredicateInput represents a condition that should be satisfied. type PredicateInput struct { - Type PredicateTypeEnum `json:"type" yaml:"type" example:"satisfies_jq_expression"` // The condition type used by the predicate. (Required.) - Value *string `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) + Type PredicateTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The condition type used by the predicate. (Required.) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) } // PredicateUpdateInput represents a condition that should be satisfied. type PredicateUpdateInput struct { - Type *PredicateTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"satisfies_jq_expression"` // The condition type used by the predicate. (Optional.) - Value *string `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) + Type *PredicateTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"belongs_to"` // The condition type used by the predicate. (Optional.) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) } // PropertyDefinitionInput represents the input for defining a property. type PropertyDefinitionInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name of the property definition. (Optional.) - Schema *JSONSchema `json:"schema,omitempty" yaml:"schema,omitempty" example:""` // The schema of the property definition. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description of the property definition. (Optional.) + AllowedInConfigFiles *Nullable[bool] `json:"allowedInConfigFiles,omitempty" yaml:"allowedInConfigFiles,omitempty" example:"false"` // Whether or not the property is allowed to be set in opslevel.yml config files. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the property definition. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the property definition. (Optional.) PropertyDisplayStatus *PropertyDisplayStatusEnum `json:"propertyDisplayStatus,omitempty" yaml:"propertyDisplayStatus,omitempty" example:"hidden"` // The display status of the custom property on service pages. (Optional.) - AllowedInConfigFiles *bool `json:"allowedInConfigFiles,omitempty" yaml:"allowedInConfigFiles,omitempty" example:"true"` // Whether or not the property is allowed to be set in opslevel.yml config files. (Optional.) + Schema *JSONSchema `json:"schema,omitempty" yaml:"schema,omitempty" example:"SCHEMA_TBD"` // The schema of the property definition. (Optional.) } // PropertyInput represents the input for setting a property. type PropertyInput struct { - Owner IdentifierInput `json:"owner" yaml:"owner"` // The entity that the property has been assigned to. (Required.) Definition IdentifierInput `json:"definition" yaml:"definition"` // The definition of the property. (Required.) - Value JsonString `json:"value" yaml:"value" example:"example_value"` // The value of the property. (Required.) - RunValidation *bool `json:"runValidation,omitempty" yaml:"runValidation,omitempty" example:"false"` // Validate the property value against the schema. On by default. (Optional.) + Owner IdentifierInput `json:"owner" yaml:"owner"` // The entity that the property has been assigned to. (Required.) + RunValidation *Nullable[bool] `json:"runValidation,omitempty" yaml:"runValidation,omitempty" example:"false"` // Validate the property value against the schema. On by default. (Optional.) + Value JsonString `json:"value" yaml:"value" example:"JSON_TBD"` // The value of the property. (Required.) } // RelationshipDefinition represents a source, target and relationship type specifying a relationship between two resources. type RelationshipDefinition struct { Source IdentifierInput `json:"source" yaml:"source"` // The resource that is the source of the relationship. alias is ambiguous in this context and is not supported. Please supply an id. (Required.) Target IdentifierInput `json:"target" yaml:"target"` // The resource that is the target of the relationship. alias is ambiguous in this context and is not supported. Please supply an id. (Required.) - Type RelationshipTypeEnum `json:"type" yaml:"type" example:"depends_on"` // The type of the relationship between source and target. (Required.) + Type RelationshipTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The type of the relationship between source and target. (Required.) } // RepositoryUpdateInput specifies the input fields used to update a repository. type RepositoryUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the repository to be updated. (Required.) - Visible *bool `json:"visible,omitempty" yaml:"visible,omitempty" example:"false"` // Indicates if the repository is visible. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The team that owns the repository. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the repository to be updated. (Required.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The team that owns the repository. (Optional.) + Visible *Nullable[bool] `json:"visible,omitempty" yaml:"visible,omitempty" example:"false"` // Indicates if the repository is visible. (Optional.) } // ScorecardInput represents input used to create scorecards. type ScorecardInput struct { - Name string `json:"name" yaml:"name" example:"example_name"` // Name of the scorecard. (Required.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // Description of the scorecard. (Optional.) - OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Owner of the scorecard. Can currently be a team or a group. (Required.) - FilterId *ID `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Filter used by the scorecard to restrict services. (Optional.) - AffectsOverallServiceLevels *bool `json:"affectsOverallServiceLevels,omitempty" yaml:"affectsOverallServiceLevels,omitempty" example:"false"` // . (Optional.) + AffectsOverallServiceLevels *Nullable[bool] `json:"affectsOverallServiceLevels,omitempty" yaml:"affectsOverallServiceLevels,omitempty" example:"false"` // (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // Description of the scorecard. (Optional.) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Filter used by the scorecard to restrict services. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // Name of the scorecard. (Required.) + OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Owner of the scorecard. Can currently be a team or a group. (Required.) } // SecretInput represents arguments for secret operations. type SecretInput struct { - Value *string `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // A sensitive value. (Optional.) - Owner *IdentifierInput `json:"owner,omitempty" yaml:"owner,omitempty"` // The owner of this secret. (Optional.) + Owner *IdentifierInput `json:"owner,omitempty" yaml:"owner,omitempty"` // The owner of this secret. (Optional.) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // A sensitive value. (Optional.) } // ServiceCreateInput specifies the input fields used in the `serviceCreate` mutation. type ServiceCreateInput struct { - Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service. (Optional.) - Name string `json:"name" yaml:"name" example:"example_name"` // The display name of the service. (Required.) - Product *string `json:"product,omitempty" yaml:"product,omitempty" example:"example_product"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // A brief description of the service. (Optional.) - Language *string `json:"language,omitempty" yaml:"language,omitempty" example:"example_language"` // The primary programming language that the service is written in. (Optional.) - Framework *string `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_framework"` // The primary software development framework that the service uses. (Optional.) - TierAlias *string `json:"tierAlias,omitempty" yaml:"tier,omitempty" example:"example_alias"` // The software tier that the service belongs to. (Optional.) - OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"owner,omitempty"` // The owner for this service. (Optional.) - LifecycleAlias *string `json:"lifecycleAlias,omitempty" yaml:"lifecycle,omitempty" example:"example_alias"` // The lifecycle stage of the service. (Optional.) - SkipAliasesValidation *bool `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows for the creation of a service with invalid aliases. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // A brief description of the service. (Optional.) + Framework *Nullable[string] `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_value"` // The primary software development framework that the service uses. (Optional.) + Language *Nullable[string] `json:"language,omitempty" yaml:"language,omitempty" example:"example_value"` // The primary programming language that the service is written in. (Optional.) + LifecycleAlias *Nullable[string] `json:"lifecycleAlias,omitempty" yaml:"lifecycleAlias,omitempty" example:"example_value"` // The lifecycle stage of the service. (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the service. (Required.) + OwnerAlias *Nullable[string] `json:"ownerAlias,omitempty" yaml:"ownerAlias,omitempty" example:"example_value"` // The team that owns the service. (Optional.) + OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"ownerInput,omitempty"` // The owner for this service. (Optional.) + Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service. (Optional.) + Product *Nullable[string] `json:"product,omitempty" yaml:"product,omitempty" example:"example_value"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product. (Optional.) + SkipAliasesValidation *Nullable[bool] `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows for the creation of a service with invalid aliases. (Optional.) + TierAlias *Nullable[string] `json:"tierAlias,omitempty" yaml:"tierAlias,omitempty" example:"example_value"` // The software tier that the service belongs to. (Optional.) + Type *IdentifierInput `json:"type,omitempty" yaml:"type,omitempty"` // The type of the component. (Optional.) } // ServiceDeleteInput specifies the input fields used in the `serviceDelete` mutation. type ServiceDeleteInput struct { - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be deleted. (Optional.) - Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_alias"` // The alias of the service to be deleted. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the service to be deleted. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be deleted. (Optional.) } // ServiceDependencyCreateInput specifies the input fields used for creating a service dependency. type ServiceDependencyCreateInput struct { - DependencyKey ServiceDependencyKey `json:"dependencyKey" yaml:"dependencyKey" example:"XXX_example_key_XXX"` // A source, destination pair specifying a dependency between services. (Required.) - Notes *string `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_notes"` // Notes for service dependency. (Optional.) + DependencyKey ServiceDependencyKey `json:"dependencyKey" yaml:"dependencyKey"` // A source, destination pair specifying a dependency between services. (Required.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Notes for service dependency. (Optional.) } // ServiceDependencyKey represents a source, destination pair specifying a dependency between services. type ServiceDependencyKey struct { - SourceIdentifier *IdentifierInput `json:"sourceIdentifier,omitempty" yaml:"sourceIdentifier,omitempty"` // The ID or alias identifier of the service with the dependency. (Optional.) - DestinationIdentifier *IdentifierInput `json:"destinationIdentifier,omitempty" yaml:"destinationIdentifier,omitempty"` // The ID or alias identifier of the service that is depended upon. (Optional.) + Destination *Nullable[ID] `json:"destination,omitempty" yaml:"destination,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service that is depended upon. (Optional.) + DestinationIdentifier *IdentifierInput `json:"destinationIdentifier,omitempty" yaml:"destinationIdentifier,omitempty"` // The ID or alias identifier of the service that is depended upon. (Optional.) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Notes about the dependency edge (Optional.) + Source *Nullable[ID] `json:"source,omitempty" yaml:"source,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service with the dependency. (Optional.) + SourceIdentifier *IdentifierInput `json:"sourceIdentifier,omitempty" yaml:"sourceIdentifier,omitempty"` // The ID or alias identifier of the service with the dependency. (Optional.) +} + +// ServiceLevelNotificationsUpdateInput specifies the input fields used to update service level notification settings. +type ServiceLevelNotificationsUpdateInput struct { + EnableSlackNotifications *Nullable[bool] `json:"enableSlackNotifications,omitempty" yaml:"enableSlackNotifications,omitempty" example:"false"` // Whether or not to enable receiving slack notifications on service level changes. (Optional.) } // ServiceNoteUpdateInput specifies the input fields used in the `serviceNoteUpdate` mutation. type ServiceNoteUpdateInput struct { - Service IdentifierInput `json:"service" yaml:"service"` // The identifier for the service. (Required.) - Note *string `json:"note,omitempty" yaml:"note,omitempty" example:"example_note"` // Note about the service. (Optional.) + Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Note about the service. (Optional.) + Service IdentifierInput `json:"service" yaml:"service"` // The identifier for the service. (Required.) } // ServiceRepositoryCreateInput specifies the input fields used in the `serviceRepositoryCreate` mutation. type ServiceRepositoryCreateInput struct { - Service IdentifierInput `json:"service" yaml:"service"` // The identifier for the service. (Required.) - Repository IdentifierInput `json:"repository" yaml:"repository"` // The identifier for the repository. (Required.) - BaseDirectory *string `json:"baseDirectory,omitempty" yaml:"baseDirectory,omitempty" example:"/home/opslevel.yaml"` // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes. (Optional.) - DisplayName *string `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_name"` // The name displayed in the UI for the service repository. (Optional.) + BaseDirectory *Nullable[string] `json:"baseDirectory,omitempty" yaml:"baseDirectory,omitempty" example:"example_value"` // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes. (Optional.) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name displayed in the UI for the service repository. (Optional.) + Repository IdentifierInput `json:"repository" yaml:"repository"` // The identifier for the repository. (Required.) + Service IdentifierInput `json:"service" yaml:"service"` // The identifier for the service. (Required.) } // ServiceRepositoryUpdateInput specifies the input fields used to update a service repository. type ServiceRepositoryUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service repository to be updated. (Required.) - BaseDirectory *string `json:"baseDirectory,omitempty" yaml:"baseDirectory,omitempty" example:"/home/opslevel.yaml"` // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes. (Optional.) - DisplayName *string `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_name"` // The name displayed in the UI for the service repository. (Optional.) + BaseDirectory *Nullable[string] `json:"baseDirectory,omitempty" yaml:"baseDirectory,omitempty" example:"example_value"` // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes. (Optional.) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name displayed in the UI for the service repository. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service repository to be updated. (Required.) } -// DEPRECATED: use ServiceUpdateInputV2 +// ServiceUpdateInput specifies the input fields used in the `serviceUpdate` mutation. type ServiceUpdateInput struct { - Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service. (Optional.) - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be updated. (Optional.) - Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_alias"` // The alias of the service to be updated. (Optional.) - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the service. (Optional.) - Product *string `json:"product,omitempty" yaml:"product,omitempty" example:"example_product"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // A brief description of the service. (Optional.) - Language *string `json:"language,omitempty" yaml:"language,omitempty" example:"example_language"` // The primary programming language that the service is written in. (Optional.) - Framework *string `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_framework"` // The primary software development framework that the service uses. (Optional.) - TierAlias *string `json:"tierAlias,omitempty" yaml:"tier,omitempty" example:"example_alias"` // The software tier that the service belongs to. (Optional.) - OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"owner,omitempty"` // The owner for the service. (Optional.) - LifecycleAlias *string `json:"lifecycleAlias,omitempty" yaml:"lifecycle,omitempty" example:"example_alias"` // The lifecycle stage of the service. (Optional.) - SkipAliasesValidation *bool `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows updating a service with invalid aliases. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the service to be updated. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // A brief description of the service. (Optional.) + Framework *Nullable[string] `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_value"` // The primary software development framework that the service uses. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be updated. (Optional.) + Language *Nullable[string] `json:"language,omitempty" yaml:"language,omitempty" example:"example_value"` // The primary programming language that the service is written in. (Optional.) + LifecycleAlias *Nullable[string] `json:"lifecycleAlias,omitempty" yaml:"lifecycleAlias,omitempty" example:"example_value"` // The lifecycle stage of the service. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the service. (Optional.) + OwnerAlias *Nullable[string] `json:"ownerAlias,omitempty" yaml:"ownerAlias,omitempty" example:"example_value"` // The team that owns the service. (Optional.) + OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"ownerInput,omitempty"` // The owner for the service. (Optional.) + Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service. (Optional.) + Product *Nullable[string] `json:"product,omitempty" yaml:"product,omitempty" example:"example_value"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product. (Optional.) + SkipAliasesValidation *Nullable[bool] `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows updating a service with invalid aliases. (Optional.) + TierAlias *Nullable[string] `json:"tierAlias,omitempty" yaml:"tierAlias,omitempty" example:"example_value"` // The software tier that the service belongs to. (Optional.) + Type *IdentifierInput `json:"type,omitempty" yaml:"type,omitempty"` // The type of the component. (Optional.) +} + +// SnykIntegrationInput specifies the input fields used to create and update a Snyk integration. +type SnykIntegrationInput struct { + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the Snyk API (Optional.) + GroupId *Nullable[string] `json:"groupId,omitempty" yaml:"groupId,omitempty" example:"example_value"` // The group ID for the Snyk API (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) + Region *SnykIntegrationRegionEnum `json:"region,omitempty" yaml:"region,omitempty" example:"AU"` // The region in which your data is hosted. (Optional.) +} + +// SonarqubeCloudIntegrationInput specifies the input fields used to create and update a SonarQube Cloud integration. +type SonarqubeCloudIntegrationInput struct { + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the SonarQube Cloud API. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) + OrganizationKey *Nullable[string] `json:"organizationKey,omitempty" yaml:"organizationKey,omitempty" example:"example_value"` // The Organization Key for the SonarQube Cloud organization. (Optional.) +} + +// SonarqubeIntegrationInput specifies the input fields used to create and update a SonarQube integration. +type SonarqubeIntegrationInput struct { + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the SonarQube API (Optional.) + BaseUrl *Nullable[string] `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty" example:"example_value"` // The base URL for the SonarQube instance (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) } // SystemInput specifies the input fields for a system. type SystemInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name for the system. (Optional.) - Description *string `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // The description for the system. (Optional.) - OwnerId *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the system. (Optional.) - Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent domain for the system. (Optional.) - Note *string `json:"note,omitempty" yaml:"note,omitempty" example:"example_note"` // Additional information about the system. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description for the system. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name for the system. (Optional.) + Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Additional information about the system. (Optional.) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the system. (Optional.) + Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent domain for the system. (Optional.) } // TagArgs represents arguments used to query with a certain tag. type TagArgs struct { - Key *string `json:"key,omitempty" yaml:"key,omitempty" example:"XXX_example_key_XXX"` // The key of a tag. (Optional.) - Value *string `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The value of a tag. (Optional.) + Key *Nullable[string] `json:"key,omitempty" yaml:"key,omitempty" example:"example_value"` // The key of a tag. (Optional.) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The value of a tag. (Optional.) } // TagAssignInput specifies the input fields used to assign tags. type TagAssignInput struct { - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource that the tags will be assigned to. (Optional.) - Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_alias"` // The alias of the resource that tags will be added to. (Optional.) - Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"example_type"` // The type of resource `alias` refers to, if `alias` is provided. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the resource that tags will be added to. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource that the tags will be assigned to. (Optional.) Tags []TagInput `json:"tags" yaml:"tags" example:"[]"` // The desired tags to assign to the resource. (Required.) + Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"Domain"` // The type of resource `alias` refers to, if `alias` is provided. (Optional.) } // TagCreateInput specifies the input fields used to create a tag. type TagCreateInput struct { - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource that this tag will be added to. (Optional.) - Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_alias"` // The alias of the resource that this tag will be added to. (Optional.) - Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"example_type"` // The type of resource `alias` refers to, if `alias` is provided. (Optional.) - Key string `json:"key" yaml:"key" example:"XXX_example_key_XXX"` // The tag's key. (Required.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the resource that this tag will be added to. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource that this tag will be added to. (Optional.) + Key string `json:"key" yaml:"key" example:"example_value"` // The tag's key. (Required.) + Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"Domain"` // The type of resource `alias` refers to, if `alias` is provided. (Optional.) Value string `json:"value" yaml:"value" example:"example_value"` // The tag's value. (Required.) } @@ -1032,70 +1103,80 @@ type TagDeleteInput struct { // TagInput specifies the basic input fields used to construct a tag. type TagInput struct { - Key string `json:"key" yaml:"key" example:"XXX_example_key_XXX"` // The tag's key. (Required.) - Value string `json:"value" yaml:"value" example:"example_value"` // The tag's value. (Required.) + Key string `json:"key" yaml:"key" example:"example_value"` // The tag's key. (Required.) + Value string `json:"value" yaml:"value" example:"example_value"` // The tag's value. (Required.) +} + +// TagRelationshipKeysAssignInput represents the input for the `tagRelationshipKeysAssign` mutation. +type TagRelationshipKeysAssignInput struct { + BelongsTo *Nullable[string] `json:"belongsTo,omitempty" yaml:"belongsTo,omitempty" example:"example_value"` // (Optional.) + DependencyOf *Nullable[[]string] `json:"dependencyOf,omitempty" yaml:"dependencyOf,omitempty" example:"[]"` // (Optional.) + DependsOn *Nullable[[]string] `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty" example:"[]"` // (Optional.) } // TagUpdateInput specifies the input fields used to update a tag. type TagUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tag to be updated. (Required.) - Key *string `json:"key,omitempty" yaml:"key,omitempty" example:"XXX_example_key_XXX"` // The tag's key. (Optional.) - Value *string `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The tag's value. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tag to be updated. (Required.) + Key *Nullable[string] `json:"key,omitempty" yaml:"key,omitempty" example:"example_value"` // The tag's key. (Optional.) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The tag's value. (Optional.) } // TeamCreateInput specifies the input fields used to create a team. type TeamCreateInput struct { - Responsibilities *string `json:"responsibilities,omitempty" yaml:"responsibilities,omitempty" example:"example description of responsibilities"` // A description of what the team is responsible for. (Optional.) - Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to. (Optional.) - Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel. (Optional.) - ParentTeam *IdentifierInput `json:"parentTeam,omitempty" yaml:"parentTeam,omitempty"` // The parent team. (Optional.) - Name string `json:"name" yaml:"name" example:"example_name"` // The team's display name. (Required.) - Contacts *[]ContactInput `json:"contacts,omitempty" yaml:"contacts,omitempty" example:"[]"` // The contacts for the team. (Optional.) + Contacts *[]ContactInput `json:"contacts,omitempty" yaml:"contacts,omitempty" example:"[]"` // The contacts for the team. (Optional.) + Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to. (Optional.) + ManagerEmail *Nullable[string] `json:"managerEmail,omitempty" yaml:"managerEmail,omitempty" example:"example_value"` // The email of the user who manages the team. (Optional.) + Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel (Optional.) + Name string `json:"name" yaml:"name" example:"example_value"` // The team's display name. (Required.) + ParentTeam *IdentifierInput `json:"parentTeam,omitempty" yaml:"parentTeam,omitempty"` // The parent team. (Optional.) + Responsibilities *Nullable[string] `json:"responsibilities,omitempty" yaml:"responsibilities,omitempty" example:"example_value"` // A description of what the team is responsible for. (Optional.) } // TeamDeleteInput specifies the input fields used to delete a team. type TeamDeleteInput struct { - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team to be deleted. (Optional.) - Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_alias"` // The alias of the team to be deleted. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the team to be deleted. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team to be deleted. (Optional.) } // TeamMembershipCreateInput represents input for adding members to a team. type TeamMembershipCreateInput struct { - TeamId ID `json:"teamId" yaml:"teamId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the team to add members. (Required.) - Members []TeamMembershipUserInput `json:"members" yaml:"members" example:"[]"` // A set of emails that identify users in OpsLevel. (Required.) + Members []TeamMembershipUserInput `json:"members" yaml:"members" example:"[]"` // A set of emails that identify users in OpsLevel (Required.) + TeamId ID `json:"teamId" yaml:"teamId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the team to add members (Required.) } // TeamMembershipDeleteInput represents input for removing members from a team. type TeamMembershipDeleteInput struct { - TeamId ID `json:"teamId" yaml:"teamId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the team to remove members from. (Required.) - Members []TeamMembershipUserInput `json:"members" yaml:"members" example:"[]"` // A set of emails that identify users in OpsLevel. (Required.) + Members []TeamMembershipUserInput `json:"members" yaml:"members" example:"[]"` // A set of emails that identify users in OpsLevel (Required.) + TeamId ID `json:"teamId" yaml:"teamId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the team to remove members from (Required.) } // TeamMembershipUserInput represents input for specifying members on a team. type TeamMembershipUserInput struct { - User *UserIdentifierInput `json:"user,omitempty" yaml:"user,omitempty"` // The email address or ID of the user to add to a team. (Optional.) - Role *string `json:"role,omitempty" yaml:"role,omitempty" example:"example_role"` // The type of relationship this membership implies. (Optional.) + Email *Nullable[string] `json:"email,omitempty" yaml:"email,omitempty" example:"example_value"` // The user's email. (Optional.) + Role *Nullable[string] `json:"role,omitempty" yaml:"role,omitempty" example:"example_value"` // The type of relationship this membership implies. (Optional.) + User *UserIdentifierInput `json:"user,omitempty" yaml:"user,omitempty"` // The email address or ID of the user to add to a team. (Optional.) } // TeamUpdateInput specifies the input fields used to update a team. type TeamUpdateInput struct { - Responsibilities *string `json:"responsibilities,omitempty" yaml:"responsibilities,omitempty" example:"example description of responsibilities"` // A description of what the team is responsible for. (Optional.) - Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to. (Optional.) - Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel. (Optional.) - ParentTeam *IdentifierInput `json:"parentTeam,omitempty" yaml:"parentTeam,omitempty"` // The parent team. (Optional.) - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team to be updated. (Optional.) - Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_alias"` // The alias of the team to be updated. (Optional.) - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The team's display name. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the team to be updated. (Optional.) + Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team to be updated. (Optional.) + ManagerEmail *Nullable[string] `json:"managerEmail,omitempty" yaml:"managerEmail,omitempty" example:"example_value"` // The email of the user who manages the team. (Optional.) + Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The team's display name. (Optional.) + ParentTeam *IdentifierInput `json:"parentTeam,omitempty" yaml:"parentTeam,omitempty"` // The parent team. (Optional.) + Responsibilities *Nullable[string] `json:"responsibilities,omitempty" yaml:"responsibilities,omitempty" example:"example_value"` // A description of what the team is responsible for. (Optional.) } // ToolCreateInput specifies the input fields used to create a tool. type ToolCreateInput struct { - Category ToolCategory `json:"category" yaml:"category" example:"api_documentation"` // The category that the tool belongs to. (Required.) - DisplayName string `json:"displayName" yaml:"displayName" example:"example_name"` // The display name of the tool. (Required.) - Url string `json:"url" yaml:"url" example:"john.doe@example.com"` // The URL of the tool. (Required.) - Environment *string `json:"environment,omitempty" yaml:"environment,omitempty" example:"environment that tool belongs to"` // The environment that the tool belongs to. (Optional.) - ServiceId *ID `json:"serviceId,omitempty" yaml:"serviceId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service the tool will be assigned to. (Optional.) - ServiceAlias *string `json:"serviceAlias,omitempty" yaml:"serviceAlias,omitempty" example:"example_alias"` // The alias of the service the tool will be assigned to. (Optional.) + Category ToolCategory `json:"category" yaml:"category" example:"admin"` // The category that the tool belongs to. (Required.) + DisplayName string `json:"displayName" yaml:"displayName" example:"example_value"` // The display name of the tool. (Required.) + Environment *Nullable[string] `json:"environment,omitempty" yaml:"environment,omitempty" example:"example_value"` // The environment that the tool belongs to. (Optional.) + ServiceAlias *Nullable[string] `json:"serviceAlias,omitempty" yaml:"serviceAlias,omitempty" example:"example_value"` // The alias of the service the tool will be assigned to. (Optional.) + ServiceId *Nullable[ID] `json:"serviceId,omitempty" yaml:"serviceId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service the tool will be assigned to. (Optional.) + Url string `json:"url" yaml:"url" example:"example_value"` // The URL of the tool. (Required.) } // ToolDeleteInput specifies the input fields used to delete a tool. @@ -1105,29 +1186,35 @@ type ToolDeleteInput struct { // ToolUpdateInput specifies the input fields used to update a tool. type ToolUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tool to be updated. (Required.) - Category *ToolCategory `json:"category,omitempty" yaml:"category,omitempty" example:"api_documentation"` // The category that the tool belongs to. (Optional.) - DisplayName *string `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_name"` // The display name of the tool. (Optional.) - Url *string `json:"url,omitempty" yaml:"url,omitempty" example:"john.doe@example.com"` // The URL of the tool. (Optional.) - Environment *string `json:"environment,omitempty" yaml:"environment,omitempty" example:"environment that tool belongs to"` // The environment that the tool belongs to. (Optional.) + Category *ToolCategory `json:"category,omitempty" yaml:"category,omitempty" example:"admin"` // The category that the tool belongs to. (Optional.) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The display name of the tool. (Optional.) + Environment *Nullable[string] `json:"environment,omitempty" yaml:"environment,omitempty" example:"example_value"` // The environment that the tool belongs to. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tool to be updated. (Required.) + Url *Nullable[string] `json:"url,omitempty" yaml:"url,omitempty" example:"example_value"` // The URL of the tool. (Optional.) } // UserIdentifierInput specifies the input fields used to identify a user. Exactly one field should be provided. type UserIdentifierInput struct { - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the user. (Optional.) - Email *string `json:"email,omitempty" yaml:"email,omitempty" example:"first.last@domain.com"` // The email address of the user. (Optional.) + Email *Nullable[string] `json:"email,omitempty" yaml:"email,omitempty" example:"example_value"` // The email address of the user. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the user. (Optional.) } // UserInput specifies the input fields used to create and update a user. type UserInput struct { - Name *string `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The name of the user. (Optional.) - Role *UserRole `json:"role,omitempty" yaml:"role,omitempty" example:"admin"` // The access role (e.g. user vs admin) of the user. (Optional.) - SkipWelcomeEmail *bool `json:"skipWelcomeEmail,omitempty" yaml:"skipWelcomeEmail,omitempty" example:"false"` // Don't send an email welcoming the user to OpsLevel. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the user. (Optional.) + Role *UserRole `json:"role,omitempty" yaml:"role,omitempty" example:"admin"` // The access role (e.g. user vs admin) of the user. (Optional.) + SkipWelcomeEmail *Nullable[bool] `json:"skipWelcomeEmail,omitempty" yaml:"skipWelcomeEmail,omitempty" example:"false"` // Don't send an email welcoming the user to OpsLevel. (Optional.) } // UsersFilterInput represents the input for filtering users. type UsersFilterInput struct { - Key UsersFilterEnum `json:"key" yaml:"key" example:"last_sign_in_at"` // Field to be filtered. (Required.) - Arg *string `json:"arg,omitempty" yaml:"arg,omitempty" example:"example_arg"` // Value to be filtered. (Optional.) - Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // The operation applied to value on the field. (Optional.) + Arg *Nullable[string] `json:"arg,omitempty" yaml:"arg,omitempty" example:"example_value"` // Value to be filtered. (Optional.) + Key UsersFilterEnum `json:"key" yaml:"key" example:"deactivated_at"` // Field to be filtered. (Required.) + Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // The operation applied to value on the field. (Optional.) +} + +// UsersInviteInput specifies the input fields used in the `usersInvite` mutation. +type UsersInviteInput struct { + Scope *UsersInviteScopeEnum `json:"scope,omitempty" yaml:"scope,omitempty" example:"pending"` // A classification of users to invite. (Optional.) + Users *[]UserIdentifierInput `json:"users,omitempty" yaml:"users,omitempty" example:"[]"` // A list of individual users to invite. (Optional.) } diff --git a/integration.go b/integration.go index 10a36a9a..40fd1359 100644 --- a/integration.go +++ b/integration.go @@ -55,12 +55,12 @@ type IntegrationConnection struct { } type AWSIntegrationInput struct { - Name *string `json:"name,omitempty"` - IAMRole *string `json:"iamRole,omitempty"` - ExternalID *string `json:"externalId,omitempty"` - OwnershipTagOverride *bool `json:"awsTagsOverrideOwnership,omitempty"` - OwnershipTagKeys []string `json:"ownershipTagKeys"` - RegionOverride *[]string `json:"regionOverride,omitempty"` + ExternalID *Nullable[string] `json:"externalId,omitempty"` + IAMRole *Nullable[string] `json:"iamRole,omitempty"` + Name *Nullable[string] `json:"name,omitempty"` + OwnershipTagKeys []string `json:"ownershipTagKeys"` + OwnershipTagOverride *Nullable[bool] `json:"awsTagsOverrideOwnership,omitempty"` + RegionOverride *[]string `json:"regionOverride,omitempty"` } func (awsIntegrationInput AWSIntegrationInput) GetGraphQLType() string { return "AwsIntegrationInput" } diff --git a/integration_test.go b/integration_test.go index 40a31857..fcf1bdf9 100644 --- a/integration_test.go +++ b/integration_test.go @@ -39,7 +39,7 @@ func TestCreateAWSIntegration(t *testing.T) { result, err := client.CreateIntegrationAWS(opslevel.AWSIntegrationInput{ IAMRole: opslevel.RefOf("arn:aws:iam::XXXX:role/aws-integration-role"), ExternalID: opslevel.RefOf("123456789"), - RegionOverride: opslevel.RefOf([]string{"us-east-1"}), + RegionOverride: &[]string{"us-east-1"}, }) // Assert autopilot.Equals(t, nil, err) diff --git a/level_test.go b/level_test.go index 7f287e1e..ff4d39b1 100644 --- a/level_test.go +++ b/level_test.go @@ -16,10 +16,11 @@ func TestCreateRubricLevels(t *testing.T) { client := BestTestClient(t, "rubric/level_create", testRequest) // Act + index := 4 result, _ := client.CreateLevel(ol.LevelCreateInput{ Name: "Kyle", Description: ol.RefOf("Created By Kyle"), - Index: ol.RefOf(4), + Index: &index, }) // Assert autopilot.Equals(t, "kyle", result.Alias) diff --git a/new_input.go b/new_input.go deleted file mode 100644 index 1b36518f..00000000 --- a/new_input.go +++ /dev/null @@ -1,57 +0,0 @@ -package opslevel - -// ServiceUpdater exists for backwards compatability between ServiceUpdateInput and ServiceUpdateInputV2 -type ServiceUpdater interface { - updatesService() // exists only to restrict which types qualify as a ServiceUpdater -} - -func (inputType ServiceUpdateInput) updatesService() {} - -func (inputType ServiceUpdateInputV2) updatesService() {} - -// ServiceUpdateInputV2 enables setting string fields like Description, Framework, LifecycleAlias, TierAlias to `null` -type ServiceUpdateInputV2 struct { - Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service. (Optional.) - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be updated. (Optional.) - Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_alias"` // The alias of the service to be updated. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_name"` // The display name of the service. (Optional.) - Product *Nullable[string] `json:"product,omitempty" yaml:"product,omitempty" example:"example_product"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product. (Optional.) - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_description"` // A brief description of the service. (Optional.) - Language *Nullable[string] `json:"language,omitempty" yaml:"language,omitempty" example:"example_language"` // The primary programming language that the service is written in. (Optional.) - Framework *Nullable[string] `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_framework"` // The primary software development framework that the service uses. (Optional.) - TierAlias *Nullable[string] `json:"tierAlias,omitempty" yaml:"tier,omitempty" example:"example_alias"` // The software tier that the service belongs to. (Optional.) - OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"owner,omitempty"` // The owner for the service. (Optional.) - LifecycleAlias *Nullable[string] `json:"lifecycleAlias,omitempty" yaml:"lifecycle,omitempty" example:"example_alias"` // The lifecycle stage of the service. (Optional.) - SkipAliasesValidation *bool `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows updating a service with invalid aliases. (Optional.) -} - -func (inputType ServiceUpdateInputV2) GetGraphQLType() string { - return "ServiceUpdateInput" -} - -func ConvertServiceUpdateInput(input ServiceUpdateInput) ServiceUpdateInputV2 { - return ServiceUpdateInputV2{ - Alias: NullableString(input.Alias), - Description: NullableString(input.Description), - Framework: NullableString(input.Framework), - Id: input.Id, - Language: NullableString(input.Language), - LifecycleAlias: NullableString(input.LifecycleAlias), - Name: NullableString(input.Name), - OwnerInput: input.OwnerInput, - Parent: input.Parent, - SkipAliasesValidation: input.SkipAliasesValidation, - Product: NullableString(input.Product), - TierAlias: NullableString(input.TierAlias), - } -} - -func NullableString(value *string) *Nullable[string] { - if value == nil { - return nil - } - if *value == "" { - return NewNull() - } - return NewNullableFrom(*value) -} diff --git a/predicate.go b/predicate.go index b34852a1..929e4cc5 100644 --- a/predicate.go +++ b/predicate.go @@ -46,7 +46,7 @@ func (p *PredicateUpdateInput) MarshalJSON() ([]byte, error) { } if p.Value != nil { - m["value"] = *p.Value + m["value"] = p.Value.Value } return json.Marshal(m) diff --git a/predicate_test.go b/predicate_test.go index f1f9d215..2e645762 100644 --- a/predicate_test.go +++ b/predicate_test.go @@ -22,9 +22,7 @@ func TestJsonMarshalPredicateUpdateInputNull(t *testing.T) { func TestJsonMarshalPredicateUpdateInputNoValue(t *testing.T) { // Arrange predicateNoValue := `{"type":"exists"}` - outputNoValue := &ol.PredicateUpdateInput{ - Type: ol.RefOf(ol.PredicateTypeEnum("exists")), - } + outputNoValue := &ol.PredicateUpdateInput{Type: &ol.PredicateTypeEnumExists} // Act marshalledNullPredicate, err := json.Marshal(outputNoValue) autopilot.Ok(t, err) @@ -35,7 +33,7 @@ func TestJsonMarshalPredicateUpdateInputWithValue(t *testing.T) { // Arrange predicateWithValue := `{"type":"contains","value":"go"}` outputWithValue := &ol.PredicateUpdateInput{ - Type: ol.RefOf(ol.PredicateTypeEnum("contains")), + Type: &ol.PredicateTypeEnumContains, Value: ol.RefOf("go"), } // Act diff --git a/property_test.go b/property_test.go index eb10772b..211b2d58 100644 --- a/property_test.go +++ b/property_test.go @@ -19,14 +19,14 @@ func TestCreatePropertyDefinition(t *testing.T) { schemaAsJSON, schemaAsJSONErr := ol.NewJSON(schemaString) autopilot.Ok(t, schemaErr) autopilot.Ok(t, schemaAsJSONErr) - expectedPropertyDefinition := autopilot.Register[ol.PropertyDefinition]("expected_property_definition", ol.PropertyDefinition{ + expectedPropertyDefinition := autopilot.Register("expected_property_definition", ol.PropertyDefinition{ Aliases: []string{"my_prop"}, AllowedInConfigFiles: true, Id: "XXX", Name: "my-prop", Schema: *schemaAsJSON, }) - propertyDefinitionInput := autopilot.Register[ol.PropertyDefinitionInput]("property_definition_input", ol.PropertyDefinitionInput{ + propertyDefinitionInput := autopilot.Register("property_definition_input", ol.PropertyDefinitionInput{ AllowedInConfigFiles: ol.RefOf(true), Name: ol.RefOf("my-prop"), Schema: schema, @@ -53,7 +53,7 @@ func TestUpdatePropertyDefinition(t *testing.T) { schemaAsJSON, schemaAsJSONErr := ol.NewJSON(schemaString2) autopilot.Ok(t, schemaErr) autopilot.Ok(t, schemaAsJSONErr) - expectedPropertyDefinition := autopilot.Register[ol.PropertyDefinition]("expected_property_definition", ol.PropertyDefinition{ + expectedPropertyDefinition := autopilot.Register("expected_property_definition", ol.PropertyDefinition{ Aliases: []string{"my_prop"}, AllowedInConfigFiles: false, Description: "this description was added", @@ -62,10 +62,10 @@ func TestUpdatePropertyDefinition(t *testing.T) { PropertyDisplayStatus: ol.PropertyDisplayStatusEnumHidden, Schema: *schemaAsJSON, }) - propertyDefinitionInput := autopilot.Register[ol.PropertyDefinitionInput]("property_definition_input", ol.PropertyDefinitionInput{ + propertyDefinitionInput := autopilot.Register("property_definition_input", ol.PropertyDefinitionInput{ AllowedInConfigFiles: ol.RefOf(false), Description: ol.RefOf("this description was added"), - PropertyDisplayStatus: ol.RefOf(ol.PropertyDisplayStatusEnumHidden), + PropertyDisplayStatus: &ol.PropertyDisplayStatusEnumHidden, Schema: schema, }) testRequest := autopilot.NewTestRequest( @@ -104,7 +104,7 @@ func TestGetPropertyDefinition(t *testing.T) { // Arrange schema, schemaErr := ol.NewJSON(schemaString) autopilot.Ok(t, schemaErr) - expectedPropertyDefinition := autopilot.Register[ol.PropertyDefinition]("expected_property_definition", + expectedPropertyDefinition := autopilot.Register("expected_property_definition", ol.PropertyDefinition{ Aliases: []string{"my_prop"}, AllowedInConfigFiles: true, @@ -141,7 +141,7 @@ func TestListPropertyDefinitions(t *testing.T) { autopilot.Ok(t, schemaPage1Err) autopilot.Ok(t, schemaPage2Err) autopilot.Ok(t, schemaPage3Err) - expectedPropDefsPageOne := autopilot.Register[[]ol.PropertyDefinition]("property_definitions", []ol.PropertyDefinition{ + expectedPropDefsPageOne := autopilot.Register("property_definitions", []ol.PropertyDefinition{ { AllowedInConfigFiles: true, Aliases: []string{"prop1"}, @@ -157,7 +157,7 @@ func TestListPropertyDefinitions(t *testing.T) { Schema: *schemaPage2, }, }) - expectedPropDefPageTwo := autopilot.Register[ol.PropertyDefinition]("property_definition_3", ol.PropertyDefinition{ + expectedPropDefPageTwo := autopilot.Register("property_definition_3", ol.PropertyDefinition{ AllowedInConfigFiles: true, Aliases: []string{"prop3"}, Id: "XXX", @@ -320,7 +320,7 @@ func TestGetServiceProperties(t *testing.T) { value1 := ol.JsonString("true") value2 := ol.JsonString("false") value3 := ol.JsonString("\"Hello World!\"") - expectedPropsPageOne := autopilot.Register[[]ol.Property]("service_properties", []ol.Property{ + expectedPropsPageOne := autopilot.Register("service_properties", []ol.Property{ { Locked: true, Definition: ol.PropertyDefinitionId{ @@ -340,7 +340,7 @@ func TestGetServiceProperties(t *testing.T) { Value: &value2, }, }) - expectedPropsPageTwo := autopilot.Register[[]ol.Property]("service_properties_3", []ol.Property{ + expectedPropsPageTwo := autopilot.Register("service_properties_3", []ol.Property{ { Locked: true, Definition: ol.PropertyDefinitionId{ diff --git a/repository_test.go b/repository_test.go index 7cc0aa4e..1d532175 100644 --- a/repository_test.go +++ b/repository_test.go @@ -170,7 +170,7 @@ func TestUpdateRepository(t *testing.T) { // Act resp, err := client.UpdateRepository(ol.RepositoryUpdateInput{ Id: id1, - OwnerId: ol.NewID(string(id1)), + OwnerId: ol.RefOf(ol.ID(string(id1))), }) // Assert autopilot.Ok(t, err) @@ -207,7 +207,7 @@ func TestRepositoryUpdateOwnerNull(t *testing.T) { // Act resp, err := client.UpdateRepository(ol.RepositoryUpdateInput{ Id: *ol.NewID(string(id1)), - OwnerId: ol.NewID(""), + OwnerId: ol.NewNullOf[ol.ID](), }) // Assert autopilot.Ok(t, err) diff --git a/scalar.go b/scalar.go index 689e942c..9cc9fe4b 100644 --- a/scalar.go +++ b/scalar.go @@ -38,7 +38,7 @@ func (identifierInput IdentifierInput) MarshalJSON() ([]byte, error) { } var out string if identifierInput.Id != nil { - out = fmt.Sprintf(`{"id":"%s"}`, string(*identifierInput.Id)) + out = fmt.Sprintf(`{"id":"%s"}`, *identifierInput.Id) } else { out = fmt.Sprintf(`{"alias":"%s"}`, *identifierInput.Alias) } @@ -53,7 +53,7 @@ func NewIdentifier(value ...string) *IdentifierInput { } } return &IdentifierInput{ - Alias: RefOf(value[0]), + Alias: &value[0], } } var output IdentifierInput @@ -94,6 +94,11 @@ func (nullable Nullable[T]) MarshalJSON() ([]byte, error) { return json.Marshal(nullable.Value) } +func (nullable *Nullable[T]) UnmarshalJSON(data []byte) error { + stuff := json.Unmarshal(data, &nullable.Value) + return stuff +} + // NewNull returns a Nullable string that will always marshal into `null`, can be used to unset fields func NewNull[T string]() *Nullable[T] { return NewNullOf[T]() diff --git a/scorecards_test.go b/scorecards_test.go index 19e1a631..63e24552 100644 --- a/scorecards_test.go +++ b/scorecards_test.go @@ -27,9 +27,9 @@ func TestCreateScorecard(t *testing.T) { client := BestTestClient(t, "scorecards/create_scorecard", testRequest) sc, err := client.CreateScorecard(ol.ScorecardInput{ Name: name, - Description: &description, + Description: ol.RefOf(description), OwnerId: *fakeOwnerId, - FilterId: fakeFilterId, + FilterId: ol.RefOf(*fakeFilterId), AffectsOverallServiceLevels: ol.RefOf(true), }) @@ -53,9 +53,9 @@ func TestCreateScorecardDoesNotAffectServiceLevels(t *testing.T) { client := BestTestClient(t, "scorecards/create_scorecard_not_affects_service_levels", testRequest) sc, err := client.CreateScorecard(ol.ScorecardInput{ Name: name, - Description: &description, + Description: ol.RefOf(description), OwnerId: *fakeOwnerId, - FilterId: fakeFilterId, + FilterId: ol.RefOf(*fakeFilterId), AffectsOverallServiceLevels: ol.RefOf(false), }) @@ -79,10 +79,10 @@ func TestUpdateScorecard(t *testing.T) { client := BestTestClient(t, "scorecards/update_scorecard", testRequest) sc, err := client.UpdateScorecard(scorecardId, ol.ScorecardInput{ - Description: &description, + Description: ol.RefOf(description), Name: name, OwnerId: *newOwnerId, - FilterId: newFilterId, + FilterId: ol.RefOf(*newFilterId), }) autopilot.Ok(t, err) diff --git a/service.go b/service.go index 62b4abfa..a5ab8896 100644 --- a/service.go +++ b/service.go @@ -704,7 +704,7 @@ func (client *Client) ListServicesWithTier(tier string, variables *PayloadVariab return &q.Account.Services, nil } -func (client *Client) UpdateService(input ServiceUpdater) (*Service, error) { +func (client *Client) UpdateService(input ServiceUpdateInput) (*Service, error) { var m struct { Payload struct { Service Service @@ -745,9 +745,9 @@ func (client *Client) UpdateServiceNote(input ServiceNoteUpdateInput) (*Service, func (client *Client) DeleteService(identifier string) error { input := ServiceDeleteInput{} if IsID(identifier) { - input.Id = NewID(identifier) + input.Id = RefOf(ID(identifier)) } else { - input.Alias = &identifier + input.Alias = RefOf(identifier) } var m struct { diff --git a/service_test.go b/service_test.go index 25f2ce1b..dc9602a5 100644 --- a/service_test.go +++ b/service_test.go @@ -267,7 +267,7 @@ func TestCreateServiceWithNote(t *testing.T) { }) note := "Foo note" service, noteErr := client.UpdateServiceNote(ol.ServiceNoteUpdateInput{ - Service: ol.IdentifierInput{Id: ol.RefOf(service.Id)}, + Service: *ol.NewIdentifier(string(service.Id)), Note: ol.RefOf(note), }) // Assert @@ -298,13 +298,13 @@ func TestCreateServiceWithParentSystem(t *testing.T) { func TestUpdateService(t *testing.T) { addVars := `{"input":{"description": "The quick brown fox", "framework": "django", "id": "123456789", "lifecycleAlias": "pre-alpha", "name": "Hello World", "parent": {"alias": "some_system"}, "tierAlias": "tier_4"}}` - delVars := `{"input":{"description": null, "framework": null, "id": "123456789", "lifecycleAlias": null, "parent": null, "tierAlias": null}}` + // delVars := `{"input":{"description": null, "framework": null, "id": "123456789", "lifecycleAlias": null, "parent": null, "tierAlias": null}}` delVarsV1DoesNotWorkExceptOnParent := `{"input":{"id": "123456789", "parent": null}}` zeroVars := `{"input":{"description": "", "framework": "", "id": "123456789"}}` type TestCase struct { Name string Vars string - Input ol.ServiceUpdater + Input ol.ServiceUpdateInput } testCases := []TestCase{ { @@ -312,7 +312,7 @@ func TestUpdateService(t *testing.T) { Vars: addVars, Input: ol.ServiceUpdateInput{ Parent: ol.NewIdentifier("some_system"), - Id: ol.NewID("123456789"), + Id: ol.RefOf(ol.ID("123456789")), Name: ol.RefOf("Hello World"), Description: ol.RefOf("The quick brown fox"), Framework: ol.RefOf("django"), @@ -320,61 +320,61 @@ func TestUpdateService(t *testing.T) { LifecycleAlias: ol.RefOf("pre-alpha"), }, }, - { - Name: "add fields v2", - Vars: addVars, - Input: ol.ServiceUpdateInputV2{ - Parent: ol.NewIdentifier("some_system"), - Id: ol.NewID("123456789"), - Name: ol.NewNullableFrom("Hello World"), - Description: ol.NewNullableFrom("The quick brown fox"), - Framework: ol.NewNullableFrom("django"), - TierAlias: ol.NewNullableFrom("tier_4"), - LifecycleAlias: ol.NewNullableFrom("pre-alpha"), - }, - }, + // { + // Name: "add fields v2", + // Vars: addVars, + // Input: ol.ServiceUpdateInputV2{ + // Parent: ol.NewIdentifier("some_system"), + // Id: ol.NewID("123456789"), + // Name: ol.RefOf("Hello World"), + // Description: ol.RefOf("The quick brown fox"), + // Framework: ol.RefOf("django"), + // TierAlias: ol.RefOf("tier_4"), + // LifecycleAlias: ol.RefOf("pre-alpha"), + // }, + // }, { Name: "unset fields v1 - does not work except on parent", Vars: delVarsV1DoesNotWorkExceptOnParent, Input: ol.ServiceUpdateInput{ - Parent: ol.NewIdentifier(), - Id: ol.NewID("123456789"), + Parent: &ol.IdentifierInput{}, + Id: ol.RefOf(ol.ID("123456789")), Description: nil, Framework: nil, TierAlias: nil, LifecycleAlias: nil, }, }, - { - Name: "unset fields v2 - works on all including parent", - Vars: delVars, - Input: ol.ServiceUpdateInputV2{ - Parent: ol.NewIdentifier(), - Id: ol.NewID("123456789"), - Description: ol.NewNull(), - Framework: ol.NewNull(), - TierAlias: ol.NewNull(), - LifecycleAlias: ol.NewNull(), - }, - }, + // { + // Name: "unset fields v2 - works on all including parent", + // Vars: delVars, + // Input: ol.ServiceUpdateInputV2{ + // Parent: ol.NewIdentifier(), + // Id: ol.NewID("123456789"), + // Description: ol.NewNull(), + // Framework: ol.NewNull(), + // TierAlias: ol.NewNull(), + // LifecycleAlias: ol.NewNull(), + // }, + // }, { Name: "set fields to zero value v1", Vars: zeroVars, Input: ol.ServiceUpdateInput{ - Id: ol.NewID("123456789"), + Id: ol.RefOf(ol.ID("123456789")), Description: ol.RefOf(""), Framework: ol.RefOf(""), }, }, - { - Name: "set fields to zero value v2", - Vars: zeroVars, - Input: ol.ServiceUpdateInputV2{ - Id: ol.NewID("123456789"), - Description: ol.NewNullableFrom(""), - Framework: ol.NewNullableFrom(""), - }, - }, + // { + // Name: "set fields to zero value v2", + // Vars: zeroVars, + // Input: ol.ServiceUpdateInputV2{ + // Id: ol.RefOf(ol.ID("123456789")), + // Description: ol.NewNull(), + // Framework: ol.NewNull(), + // }, + // }, } for i, testCase := range testCases { diff --git a/system_test.go b/system_test.go index 0ddfd31c..722cd8a8 100644 --- a/system_test.go +++ b/system_test.go @@ -18,7 +18,7 @@ func TestSystemCreate(t *testing.T) { input := ol.SystemInput{ Name: ol.RefOf("PlatformSystem3"), Description: ol.RefOf("creating this for testing purposes"), - OwnerId: &id4, + OwnerId: ol.RefOf(id4), Note: ol.RefOf("hello world"), } // Act @@ -179,7 +179,7 @@ func TestSystemUpdate(t *testing.T) { input := ol.SystemInput{ Name: ol.RefOf("PlatformSystem1"), Description: ol.RefOf("Yolo!"), - OwnerId: &id4, + OwnerId: ol.RefOf(id4), Note: ol.RefOf("Please delete me"), } // Act diff --git a/tags.go b/tags.go index 9d3a0219..9f106232 100644 --- a/tags.go +++ b/tags.go @@ -104,9 +104,9 @@ func (client *Client) AssignTagsWithTagInputs(identifier string, tags []TagInput Tags: tags, } if IsID(identifier) { - input.Id = NewID(identifier) + input.Id = RefOf(ID(identifier)) } else { - input.Alias = &identifier + input.Alias = RefOf(identifier) } return client.AssignTag(input) } @@ -150,9 +150,9 @@ func (client *Client) CreateTags(identifier string, tags map[string]string) ([]T Value: value, } if IsID(identifier) { - input.Id = NewID(identifier) + input.Id = RefOf(ID(identifier)) } else { - input.Alias = &identifier + input.Alias = RefOf(identifier) } newTag, err := client.CreateTag(input) if err != nil { @@ -188,7 +188,7 @@ func (client *Client) UpdateTag(input TagUpdateInput) (*Tag, error) { Errors []OpsLevelErrors } `graphql:"tagUpdate(input: $input)"` } - if err := ValidateTagKey(*input.Key); err != nil { + if err := ValidateTagKey(input.Key.Value); err != nil { return nil, err } v := PayloadVariables{ @@ -222,9 +222,10 @@ func (client *Client) ReconcileTags(resourceType TaggableResourceInterface, tags toCreate, toDelete := reconcileTags(tagConnection.Nodes, tagsDesired) for _, tag := range toCreate { + taggableResourceType := resourceType.ResourceType() _, err := client.CreateTag(TagCreateInput{ Id: RefOf(resourceType.ResourceId()), - Type: RefOf(resourceType.ResourceType()), + Type: &taggableResourceType, Key: tag.Key, Value: tag.Value, }) diff --git a/team.go b/team.go index 79ae3ca2..df15f767 100644 --- a/team.go +++ b/team.go @@ -191,7 +191,7 @@ func (team *Team) GetTags(client *Client, variables *PayloadVariables) (*TagConn } // Add unique tags only for _, tagNode := range q.Account.Team.Tags.Nodes { - if !slices.Contains[[]Tag, Tag](team.Tags.Nodes, tagNode) { + if !slices.Contains(team.Tags.Nodes, tagNode) { team.Tags.Nodes = append(team.Tags.Nodes, tagNode) } } @@ -211,36 +211,40 @@ func (team *Team) GetAliases() []string { return team.Aliases } -func CreateContactSlack(channel string, name *string) ContactInput { - return ContactInput{ +func CreateContactSlack(channel string, name *Nullable[string]) ContactInput { + contactInput := ContactInput{ Type: ContactTypeSlack, - DisplayName: name, Address: channel, + DisplayName: name, } + return contactInput } -func CreateContactSlackHandle(channel string, name *string) ContactInput { - return ContactInput{ +func CreateContactSlackHandle(channel string, name *Nullable[string]) ContactInput { + contactInput := ContactInput{ Type: ContactTypeSlackHandle, - DisplayName: name, Address: channel, + DisplayName: name, } + return contactInput } -func CreateContactEmail(email string, name *string) ContactInput { - return ContactInput{ +func CreateContactEmail(email string, name *Nullable[string]) ContactInput { + contactInput := ContactInput{ Type: ContactTypeEmail, - DisplayName: name, Address: email, + DisplayName: name, } + return contactInput } -func CreateContactWeb(address string, name *string) ContactInput { - return ContactInput{ +func CreateContactWeb(address string, name *Nullable[string]) ContactInput { + contactInput := ContactInput{ Type: ContactTypeWeb, - DisplayName: name, Address: address, + DisplayName: name, } + return contactInput } func (team *Team) HasTag(key string, value string) bool { @@ -301,9 +305,9 @@ func (client *Client) AddContact(team string, contact ContactInput) (*Contact, e Address: contact.Address, } if IsID(team) { - contactInput.OwnerId = NewID(team) + contactInput.OwnerId = RefOf(ID(team)) } else { - contactInput.TeamAlias = &team + contactInput.TeamAlias = RefOf(team) } v := PayloadVariables{ @@ -455,7 +459,7 @@ func (client *Client) UpdateContact(id ID, contact ContactInput) (*Contact, erro input := ContactUpdateInput{ Id: id, DisplayName: contact.DisplayName, - Address: &contact.Address, + Address: RefOf(contact.Address), } if contact.Type == "" { input.Type = nil @@ -472,9 +476,9 @@ func (client *Client) UpdateContact(id ID, contact ContactInput) (*Contact, erro func (client *Client) DeleteTeam(identifier string) error { input := TeamDeleteInput{} if IsID(identifier) { - input.Id = NewID(identifier) + input.Id = RefOf(ID(identifier)) } else { - input.Alias = &identifier + input.Alias = RefOf(identifier) } var m struct { diff --git a/team_test.go b/team_test.go index ee1b6223..949ec254 100644 --- a/team_test.go +++ b/team_test.go @@ -79,13 +79,13 @@ func getTestRequestWithAlias() autopilot.TestRequest { func TestCreateTeam(t *testing.T) { // Arrange - contacts := autopilot.Register[[]ol.ContactInput]("contact_input_slice", + contacts := autopilot.Register("contact_input_slice", []ol.ContactInput{ - ol.CreateContactSlackHandle("@mozzie", ol.NullString()), + ol.CreateContactSlackHandle("@mozzie", ol.RefOf("")), ol.CreateContactWeb("https://example.com", ol.RefOf("Homepage")), }, ) - input := autopilot.Register[ol.TeamCreateInput]("team_create_input", + input := autopilot.Register("team_create_input", ol.TeamCreateInput{ Name: "Example", Responsibilities: ol.RefOf("Foo & bar"), @@ -577,7 +577,7 @@ func TestUpdateTeam(t *testing.T) { // Arrange input := autopilot.Register[ol.TeamUpdateInput]("team_update_input", ol.TeamUpdateInput{ - Id: &id1, + Id: ol.RefOf(id1), Responsibilities: ol.RefOf("Foo & bar"), ParentTeam: ol.NewIdentifier("parent_team"), }, @@ -687,7 +687,7 @@ func TestTeamAddMembership(t *testing.T) { team, _ := clientWithAlias.GetTeamWithAlias("example") newMembership := ol.TeamMembershipUserInput{ Role: ol.RefOf("user"), - User: &ol.UserIdentifierInput{Id: &id1, Email: ol.RefOf("kyle@opslevel.com")}, + User: &ol.UserIdentifierInput{Id: ol.RefOf(id1), Email: ol.RefOf("kyle@opslevel.com")}, } result, err := clientWithTeamId.AddMemberships(&team.TeamId, newMembership) // Assert @@ -719,7 +719,7 @@ func TestTeamRemoveMembership(t *testing.T) { team, _ := client1.GetTeamWithAlias("example") membershipToDelete := ol.TeamMembershipUserInput{ Role: ol.RefOf("user"), - User: &ol.UserIdentifierInput{Id: &id1, Email: ol.RefOf("kyle@opslevel.com")}, + User: &ol.UserIdentifierInput{Id: ol.RefOf(id1), Email: ol.RefOf("kyle@opslevel.com")}, } result, err := client2.RemoveMemberships(&team.TeamId, membershipToDelete) @@ -753,7 +753,7 @@ func TestTeamUpdateContact(t *testing.T) { autopilot.Register[ol.ContactUpdateInput]("contact_update_input_slack", ol.ContactUpdateInput{ Id: id1, - DisplayName: ol.RefOf(*input.DisplayName), + DisplayName: input.DisplayName, Address: ol.RefOf(input.Address), Type: &input.Type, }) @@ -778,7 +778,7 @@ func TestTeamUpdateContactWithTypeNil(t *testing.T) { autopilot.Register[ol.ContactUpdateInput]("contact_update_input", ol.ContactUpdateInput{ Id: id2, - DisplayName: ol.RefOf(*input.DisplayName), + DisplayName: input.DisplayName, Address: ol.RefOf(input.Address), }) testRequest := autopilot.NewTestRequest( diff --git a/templates/inputObjects.tpl b/templates/inputObjects.tpl new file mode 100644 index 00000000..9a21da27 --- /dev/null +++ b/templates/inputObjects.tpl @@ -0,0 +1,17 @@ +{{- define "inputs" }} +// {{ .Name }} {{ clean .Desc | endSentence }} +type {{ .Name }} struct { {{ range .Values }} + {{ title .Name.Name }} {{ if and (eq $.Name "AliasCreateInput") (eq .Name.Name "ownerId") }}ID + {{- else if and (eq $.Name "CheckPackageVersionUpdateInput") (eq .Name.Name "versionConstraintPredicate") }}*PredicateUpdateInput + {{- else if and (eq $.Name "ManualCheckFrequencyUpdateInput") (eq .Name.Name "frequencyValue") }}*Nullable[int] + {{- else if eq $.Name "IdentifierInput" }} + {{- if eq .Type.String "String" }}*string + {{- else }}*ID + {{- end }} + {{- else }}{{ getFieldTypeForInputObject .Type }} + {{- end }} ` + {{- jsonStructTag . }} {{ yamlStructTag . }} + {{- exampleStructTag . }}` {{ fieldCommentDescription . }} + {{- end }} +} +{{- end -}} diff --git a/user.go b/user.go index 4d30d866..d8af4ab9 100644 --- a/user.go +++ b/user.go @@ -36,7 +36,7 @@ func (user *User) ResourceType() TaggableResource { func NewUserIdentifier(value string) *UserIdentifierInput { if IsID(value) { return &UserIdentifierInput{ - Id: NewID(value), + Id: RefOf(ID(value)), } } return &UserIdentifierInput{ @@ -122,7 +122,7 @@ func (client *Client) InviteUser(email string, input UserInput, sendInvite bool) v := PayloadVariables{ "email": email, "input": input, - "forceSendInvite": RefOf(sendInvite), + "forceSendInvite": &sendInvite, } err := client.Mutate(&m, v, WithName("UserInvite")) return &m.Payload.User, HandleErrors(err, m.Payload.Errors) diff --git a/user_test.go b/user_test.go index c926e998..95967536 100644 --- a/user_test.go +++ b/user_test.go @@ -40,7 +40,7 @@ func TestInviteUserSkipSendInvite(t *testing.T) { client := BestTestClient(t, "user/invite_skip_send_invite", testRequest) userInput := ol.UserInput{ Name: ol.RefOf("Kyle Rockman"), - Role: ol.RefOf(ol.UserRoleTeamMember), + Role: &ol.UserRoleTeamMember, SkipWelcomeEmail: ol.RefOf(false), } // Act @@ -166,7 +166,7 @@ func TestUpdateUser(t *testing.T) { client := BestTestClient(t, "user/update", testRequest) // Act result, err := client.UpdateUser("kyle@opslevel.com", ol.UserInput{ - Role: ol.RefOf(ol.UserRoleAdmin), + Role: &ol.UserRoleAdmin, SkipWelcomeEmail: ol.RefOf(false), }) // Assert