diff --git a/object.go b/object.go index 8966b592..4ce3dcb3 100644 --- a/object.go +++ b/object.go @@ -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 @@ -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) diff --git a/testdata/templates/component_type.tpl b/testdata/templates/component_type.tpl index 4e0fef2c..f1634019 100644 --- a/testdata/templates/component_type.tpl +++ b/testdata/templates/component_type.tpl @@ -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" }} { @@ -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}} @@ -45,4 +58,4 @@ "name": "PhBird" } } -{{end}} \ No newline at end of file +{{end}}