Skip to content

Commit

Permalink
Updated policy model
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Dec 3, 2024
1 parent 3c21c48 commit 8a65cc1
Showing 1 changed file with 172 additions and 1 deletion.
173 changes: 172 additions & 1 deletion onelens_backend_client_v2/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: <stdin>
# timestamp: 2024-11-29T09:24:03+00:00
# timestamp: 2024-12-03T05:28:12+00:00

from __future__ import annotations

Expand Down Expand Up @@ -473,6 +473,16 @@ class ChangeReason(str, Enum):
USAGE_AMOUNT_CHANGE = "USAGE_AMOUNT_CHANGE"


class ChangeType(str, Enum):
CONFIG_CHANGES = "CONFIG_CHANGES"
DECOMMISSIONING = "DECOMMISSIONING"
SCALING = "SCALING"
SCHEDULING = "SCHEDULING"
APPLICATION_CHANGES = "APPLICATION_CHANGES"
UPGRADE = "UPGRADE"
MIGRATION = "MIGRATION"


class CloudAccountMetadata(BaseModel):
ol_id: UUID = Field(
..., description="The id of the cloud account metadata.", title="Ol Id"
Expand Down Expand Up @@ -2826,6 +2836,13 @@ class ResponseResourceHierarchyMappingResponse(BaseModel):
message: Optional[str] = Field(None, title="Message")


class Risk(str, Enum):
LOWEST = "LOWEST"
LOW = "LOW"
MEDIUM = "MEDIUM"
HIGH = "HIGH"


class RuleType(str, Enum):
SQL = "SQL"
PYTHON = "PYTHON"
Expand Down Expand Up @@ -2884,6 +2901,20 @@ class StorageLensConfig(BaseModel):
region: Optional[str] = Field(None, title="Region")


class Subcategory(str, Enum):
RIGHTSIZING = "RIGHTSIZING"
UNUSED_RESOURCES = "UNUSED_RESOURCES"
LOW_COST_MIGRATIONS = "LOW_COST_MIGRATIONS"
SCHEDULING = "SCHEDULING"
MODERNIZATION = "MODERNIZATION"
GRAVITON = "GRAVITON"
LENGTHY_RETENTION_PERIOD = "LENGTHY_RETENTION_PERIOD"
DELETING_ABORTED_UPLOADS = "DELETING_ABORTED_UPLOADS"
MIGRATE_TO_GP3 = "MIGRATE_TO_GP3"
SHIFT_TO_AMD = "SHIFT_TO_AMD"
STORAGE_TIER_TRANSITIONS = "STORAGE_TIER_TRANSITIONS"


class SyncActionTypeFromRepoRequest(BaseModel):
alias: str = Field(
...,
Expand Down Expand Up @@ -3098,6 +3129,20 @@ class TenantPolicyFilters(BaseModel):
execution_types: Optional[List[PolicyExecutionType]] = Field(
[], description="Filter by execution type.", title="Execution Types"
)
risk_levels: Optional[List[Risk]] = Field(
[], description="Filter by risk level.", title="Risk Levels"
)
cost_saving_categories: Optional[List[Subcategory]] = Field(
[],
description="Filter by cost saving category.",
title="Cost Saving Categories",
)
change_types: Optional[List[ChangeType]] = Field(
[], description="Filter by change type.", title="Change Types"
)
effort_levels: Optional[List[Effort]] = Field(
[], description="Filter by effort level.", title="Effort Levels"
)


class TenantPolicyState(str, Enum):
Expand Down Expand Up @@ -6216,6 +6261,16 @@ class GetSinglePolicyTicketByPolicyIdResponse(BaseModel):
node_ids: Optional[List[UUID4]] = Field(
None, description="List of node ids", title="Node Ids"
)
category: Optional[str] = Field(
None, description="Policy category", title="Category"
)
risk: Optional[str] = Field(None, description="Risk level", title="Risk")
subcategory: Optional[str] = Field(
None, description="Subcategory", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="Change type", title="Change Type"
)


class GetTenantByIDResponse(BaseModel):
Expand Down Expand Up @@ -6324,6 +6379,10 @@ class GetTenantPoliciesAPIRequest(BaseModel):
"providers": [],
"services": [],
"execution_types": [],
"risk_levels": [],
"cost_saving_categories": [],
"change_types": [],
"effort_levels": [],
}
),
description="Filters to apply to the tenant policies.",
Expand All @@ -6343,6 +6402,10 @@ class GetTenantPoliciesRequest(BaseModel):
"providers": [],
"services": [],
"execution_types": [],
"risk_levels": [],
"cost_saving_categories": [],
"change_types": [],
"effort_levels": [],
}
),
description="Filters to apply to the tenant policies.",
Expand Down Expand Up @@ -10157,6 +10220,18 @@ class TenantPolicy(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the tenant policy.", title="Id"
)
Expand Down Expand Up @@ -10218,6 +10293,18 @@ class TenantPolicyForPolicyWithSetting(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the tenant policy.", title="Id"
)
Expand Down Expand Up @@ -10280,6 +10367,18 @@ class TenantPolicyWithPolicyDisplayAlias(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the tenant policy.", title="Id"
)
Expand Down Expand Up @@ -10394,6 +10493,18 @@ class UpdatePolicyTemplateResponse(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the policy template.", title="Id"
)
Expand Down Expand Up @@ -10604,6 +10715,18 @@ class CreatePolicyTemplateResponse(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the policy template.", title="Id"
)
Expand Down Expand Up @@ -10913,6 +11036,18 @@ class GetPolicyTemplateByAliasResponse(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the policy template.", title="Id"
)
Expand Down Expand Up @@ -10974,6 +11109,18 @@ class GetPolicyTemplateByIDResponse(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the policy template.", title="Id"
)
Expand Down Expand Up @@ -11055,6 +11202,18 @@ class GetTenantPolicyByIdResponse(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the tenant policy.", title="Id"
)
Expand Down Expand Up @@ -11243,6 +11402,18 @@ class PolicyTemplate(BaseModel):
provider: Provider = Field(
..., description="The cloud provider of the policy template."
)
risk: Optional[str] = Field(
None, description="The risk of the policy template.", title="Risk"
)
subcategory: Optional[str] = Field(
None, description="The subcategory of the policy template.", title="Subcategory"
)
change_type: Optional[str] = Field(
None, description="The change type of the policy template.", title="Change Type"
)
effort: Optional[str] = Field(
None, description="The effort of the policy template.", title="Effort"
)
id: UUID4 = Field(
..., description="The unique identifier of the policy template.", title="Id"
)
Expand Down

0 comments on commit 8a65cc1

Please sign in to comment.