Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions object.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,14 @@ type ComponentTypeId struct {
// ComponentType Information about a particular component type
type ComponentType struct {
ComponentTypeId
Description string // The description of the component type (Optional)
Href string // The relative path to link to the component type (Required)
Icon ComponentTypeIcon // The icon associated with the component type (Required)
IsDefault bool // Whether or not the component type is the default (Required)
Name string // The name of the component type (Required)
Timestamps Timestamps // When the component type was created and updated (Required)
Properties *PropertyDefinitionConnection `graphql:"-"`
Description string // The description of the component type (Optional)
Href string // The relative path to link to the component type (Required)
Icon ComponentTypeIcon // The icon associated with the component type (Required)
IsDefault bool // Whether or not the component type is the default (Required)
Name string // The name of the component type (Required)
OwnerRelationship OwnerRelationshipType // The owner relationship for this component type (Required)
Timestamps Timestamps // When the component type was created and updated (Required)
Properties *PropertyDefinitionConnection `graphql:"-"`
}

// ComponentTypeIcon The icon for a component type
Expand Down Expand Up @@ -391,6 +392,11 @@ type ManualCheckFrequency struct {
StartingDate iso8601.Time // The date that the check will start to evaluate (Required)
}

// OwnerRelationshipType The owner relationship for a component type
type OwnerRelationshipType struct {
ManagementRules []RelationshipDefinitionManagementRule // The management rules for the owner relationship (Required)
}

// Predicate A condition used to select services
type Predicate struct {
Type PredicateTypeEnum // Type of operation to be used in the condition (Required)
Expand Down
17 changes: 15 additions & 2 deletions testdata/templates/component_type.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- define "component_type_graphql" }}
{id,aliases,description,href,icon{color,name},isDefault,name,timestamps{createdAt,updatedAt}}
{id,aliases,description,href,icon{color,name},isDefault,name,ownerRelationship{managementRules{operator,sourceProperty,sourcePropertyBuiltin,targetCategory,targetProperty,targetPropertyBuiltin,targetType}},timestamps{createdAt,updatedAt}}
{{end}}
{{- define "component_type_1_response" }}
{
Expand All @@ -13,6 +13,19 @@
"icon": {
"color": "#FFFFFF",
"name": "PhBird"
},
"ownerRelationship": {
"managementRules": [
{
"operator": "EQUALS",
"sourceProperty": "tag_key_eq:owner",
"sourcePropertyBuiltin": true,
"targetCategory": null,
"targetProperty": "name",
"targetPropertyBuiltin": true,
"targetType": "team"
}
]
}
}
{{end}}
Expand Down Expand Up @@ -45,4 +58,4 @@
"name": "PhBird"
}
}
{{end}}
{{end}}
Loading