Skip to content

Commit

Permalink
latest codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
rocktavious committed Jan 28, 2025
1 parent 7b36271 commit a87c4a7
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 17 deletions.
40 changes: 35 additions & 5 deletions enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ var AllAlertSourceStatusTypeEnum = []string{
type AlertSourceTypeEnum string

var (
AlertSourceTypeEnumDatadog AlertSourceTypeEnum = "datadog" // A Datadog alert source (aka monitor)
AlertSourceTypeEnumIncidentIo AlertSourceTypeEnum = "incident_io" // An incident.io alert source (aka service)
AlertSourceTypeEnumNewRelic AlertSourceTypeEnum = "new_relic" // A New Relic alert source (aka service)
AlertSourceTypeEnumOpsgenie AlertSourceTypeEnum = "opsgenie" // An Opsgenie alert source (aka service)
AlertSourceTypeEnumPagerduty AlertSourceTypeEnum = "pagerduty" // A PagerDuty alert source (aka service)
AlertSourceTypeEnumDatadog AlertSourceTypeEnum = "datadog" // A Datadog alert source (aka monitor)
AlertSourceTypeEnumFireHydrant AlertSourceTypeEnum = "fire_hydrant" // An FireHydrant alert source (aka service)
AlertSourceTypeEnumIncidentIo AlertSourceTypeEnum = "incident_io" // An incident.io alert source (aka service)
AlertSourceTypeEnumNewRelic AlertSourceTypeEnum = "new_relic" // A New Relic alert source (aka service)
AlertSourceTypeEnumOpsgenie AlertSourceTypeEnum = "opsgenie" // An Opsgenie alert source (aka service)
AlertSourceTypeEnumPagerduty AlertSourceTypeEnum = "pagerduty" // A PagerDuty alert source (aka service)
)

// All AlertSourceTypeEnum as []string
var AllAlertSourceTypeEnum = []string{
string(AlertSourceTypeEnumDatadog),
string(AlertSourceTypeEnumFireHydrant),
string(AlertSourceTypeEnumIncidentIo),
string(AlertSourceTypeEnumNewRelic),
string(AlertSourceTypeEnumOpsgenie),
Expand Down Expand Up @@ -835,6 +837,34 @@ var AllPropertyDisplayStatusEnum = []string{
string(PropertyDisplayStatusEnumVisible),
}

// PropertyLockedStatusEnum Values for which lock is assigned to a property definition to restrict what sources can assign values to it
type PropertyLockedStatusEnum string

var (
PropertyLockedStatusEnumUILocked PropertyLockedStatusEnum = "ui_locked" // Value assignments on the property cannot be changed through the UI
PropertyLockedStatusEnumUnlocked PropertyLockedStatusEnum = "unlocked" // There are no restrictions on what sources can assign values to the property
)

// All PropertyLockedStatusEnum as []string
var AllPropertyLockedStatusEnum = []string{
string(PropertyLockedStatusEnumUILocked),
string(PropertyLockedStatusEnumUnlocked),
}

// PropertyOwnerTypeEnum The possible entity types that a property can be assigned to
type PropertyOwnerTypeEnum string

var (
PropertyOwnerTypeEnumComponent PropertyOwnerTypeEnum = "COMPONENT" // A component
PropertyOwnerTypeEnumTeam PropertyOwnerTypeEnum = "TEAM" // A team
)

// All PropertyOwnerTypeEnum as []string
var AllPropertyOwnerTypeEnum = []string{
string(PropertyOwnerTypeEnumComponent),
string(PropertyOwnerTypeEnumTeam),
}

// RelatedResourceRelationshipTypeEnum The type of the relationship between two resources
type RelatedResourceRelationshipTypeEnum string

Expand Down
43 changes: 33 additions & 10 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,12 +652,13 @@ type ComponentTypeInput struct {

// ComponentTypePropertyDefinitionInput The input for defining a property
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)
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)
LockedStatus *PropertyLockedStatusEnum `json:"lockedStatus,omitempty" yaml:"lockedStatus,omitempty" example:"ui_locked"` // Restricts what sources are able to assign values to this property (Optional)
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
Expand Down Expand Up @@ -802,6 +803,12 @@ type FilterUpdateInput struct {
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)
}

// FireHydrantIntegrationInput A FireHydrant integration input
type FireHydrantIntegrationInput struct {
ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the FireHydrant API (Optional)
Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name for the FireHydrant integration (Optional)
}

// GoogleCloudIntegrationInput Specifies the input fields used to create and update a Google Cloud integration
type GoogleCloudIntegrationInput struct {
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)
Expand Down Expand Up @@ -918,17 +925,19 @@ type PredicateUpdateInput struct {
type PropertyDefinitionInput struct {
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)
LockedStatus *PropertyLockedStatusEnum `json:"lockedStatus,omitempty" yaml:"lockedStatus,omitempty" example:"ui_locked"` // Restricts what sources are able to assign values to this property (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)
Schema *JSONSchema `json:"schema,omitempty" yaml:"schema,omitempty" example:"SCHEMA_TBD"` // The schema of the property definition (Optional)
}

// PropertyInput The input for setting a property
type PropertyInput struct {
Definition IdentifierInput `json:"definition" yaml:"definition"` // The definition of the property (Required)
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)
Definition IdentifierInput `json:"definition" yaml:"definition"` // The definition of the property (Required)
Owner IdentifierInput `json:"owner" yaml:"owner"` // The entity that the property has been assigned to (Required)
OwnerType *PropertyOwnerTypeEnum `json:"ownerType,omitempty" yaml:"ownerType,omitempty" example:"COMPONENT"` // The type of the entity that the property has been assigned to. Defaults to `COMPONENT` if alias is provided for `owner` and `definition` (Optional)
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 A source, target and relationship type specifying a relationship between two resources
Expand Down Expand Up @@ -1156,6 +1165,20 @@ 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)
}

// TeamPropertyDefinitionInput The input for defining a property
type TeamPropertyDefinitionInput struct {
Alias string `json:"alias" yaml:"alias" example:"example_value"` // The human-friendly, unique identifier for the resource (Required)
Description string `json:"description" yaml:"description" example:"example_value"` // The description of the property definition (Required)
LockedStatus *PropertyLockedStatusEnum `json:"lockedStatus,omitempty" yaml:"lockedStatus,omitempty" example:"ui_locked"` // Restricts what sources are able to assign values to this property (Optional)
Name string `json:"name" yaml:"name" example:"example_value"` // The name of the property definition (Required)
Schema JSONSchema `json:"schema" yaml:"schema" example:"SCHEMA_TBD"` // The schema of the property definition (Required)
}

// TeamPropertyDefinitionsAssignInput Specifies the input fields used to define properties that apply to teams
type TeamPropertyDefinitionsAssignInput struct {
Properties []TeamPropertyDefinitionInput `json:"properties" yaml:"properties" example:"[]"` // A list of property definitions (Required)
}

// TeamUpdateInput Specifies the input fields used to update a team
type TeamUpdateInput struct {
Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the team to be updated (Optional)
Expand Down
16 changes: 14 additions & 2 deletions object.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ type CommonWeaknessEnumeration struct {

// ComponentTypeId Information about a particular component type
type ComponentTypeId struct {
Id ID // The id of the component type.
Alias string // The human-friendly, unique identifier of the component type.
Id ID // The id of the component type.
Aliases []string // A list of human-friendly, unique identifiers of the component type.
}

// ComponentType Information about a particular component type
Expand Down Expand Up @@ -423,6 +423,18 @@ type TeamMembership struct {
User UserId // User for the membership (Required)
}

// TeamPropertyDefinition The definition of a property
type TeamPropertyDefinition struct {
Alias string // The human-friendly, unique identifier of the property definition (Required)
Description string // The description of the property definition (Required)
DisplaySubtype PropertyDefinitionDisplayTypeEnum // The secondary inferred type of the schema (Optional)
DisplayType PropertyDefinitionDisplayTypeEnum // The primary inferred type of the schema (Required)
Id ID // The id of the property definition (Required)
LockedStatus PropertyLockedStatusEnum // Restricts what sources are able to assign values to this property (Required)
Name string // The name of the property definition (Required)
Schema JSONSchema `scalar:"true"` // The schema of the property definition (Required)
}

// Tier A tier measures how critical or important a service is to your business
type Tier struct {
Alias string // The human-friendly, unique identifier for the tier (Optional)
Expand Down

0 comments on commit a87c4a7

Please sign in to comment.