diff --git a/onelens_backend_client_v2/models.py b/onelens_backend_client_v2/models.py index 97a506e5..54d29dcf 100644 --- a/onelens_backend_client_v2/models.py +++ b/onelens_backend_client_v2/models.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: -# timestamp: 2024-11-20T05:08:03+00:00 +# timestamp: 2024-11-20T08:32:28+00:00 from __future__ import annotations @@ -21,10 +21,22 @@ ) +class APIEnableMetricsResponse(BaseModel): + success: Optional[bool] = Field( + None, description="Whether the operation was successful", title="Success" + ) + + class APIUpdateFeatureStatusEnabledRequest(BaseModel): id: UUID4 = Field(..., title="Id") +class APIUpdateMetricsControlResponse(BaseModel): + success: Optional[bool] = Field( + None, description="Whether the operation was successful", title="Success" + ) + + class ActivatePolicyTemplateRequest(BaseModel): id: UUID4 = Field( ..., description="The unique identifier of the policy template.", title="Id" @@ -35,6 +47,19 @@ class ActivatePolicyTemplateResponse(BaseModel): pass +class ActivityLogFormat(BaseModel): + title: str = Field( + ..., + description="Dynamic title for the activity log entry. Example: 'Ticket closed due to modification'", + title="Title", + ) + note: Optional[str] = Field( + None, + description="Optional note providing additional context about the activity", + title="Note", + ) + + class AgentType(str, Enum): TEST_WORKFLOW = "TEST_WORKFLOW" CLOUD_DATA_ANALYST = "CLOUD_DATA_ANALYST" @@ -515,6 +540,7 @@ class ConnectionStatus(str, Enum): class ConnectionType(str, Enum): MAIN = "MAIN" REPLICA = "REPLICA" + CLICKHOUSE = "CLICKHOUSE" class CostAnalyzerGraphRequest(BaseModel): @@ -844,6 +870,12 @@ class Direction(str, Enum): desc = "desc" +class DisableMetricsResponse(BaseModel): + success: Optional[bool] = Field( + None, description="Whether the operation was successful", title="Success" + ) + + class DisableTenantAnomalySettingsRequest(BaseModel): tenant_id: UUID4 = Field( ..., description="The id of the tenant.", title="Tenant Id" @@ -941,6 +973,15 @@ class FeatureConfig(BaseModel): None, title="Enable Metrics For Days" ) threshold_percentage: Optional[int] = Field(None, title="Threshold Percentage") + look_back_days_for_metrics: Optional[int] = Field( + None, title="Look Back Days For Metrics" + ) + minimum_data_points_for_metrics: Optional[int] = Field( + None, title="Minimum Data Points For Metrics" + ) + reactivate_disabled_metrics_after_days: Optional[int] = Field( + None, title="Reactivate Disabled Metrics After Days" + ) class FeatureStore(BaseModel): @@ -1000,6 +1041,10 @@ class GetAllParentNodesRequest(BaseModel): ) +class GetAllTenantConnectionsRequest(BaseModel): + connection_type: ConnectionType = Field(..., description="Type of the connection") + + class GetAllThreadsFilters(BaseModel): user_ids: Optional[List[UUID4]] = Field( None, description="Unique identifiers of the users", title="User Ids" @@ -1105,6 +1150,25 @@ class GetPolicyTicketsExportToResponseType(BaseModel): ) +class GetPolicyTicketsForNotificationRequest(BaseModel): + tenant_id: UUID4 = Field( + ..., description="The unique identifier of the tenant", title="Tenant Id" + ) + ticket_ids: Optional[List[UUID]] = Field( + [], description="List of ticket ids", title="Ticket Ids" + ) + can_get_org_cost_center: Optional[bool] = Field( + False, + description="Flag to check if the org cost center can be fetched", + title="Can Get Org Cost Center", + ) + get_only_ticket_data: Optional[bool] = Field( + False, + description="Flag to check if the ticket data can be fetched", + title="Get Only Ticket Data", + ) + + class GetRecommendationTicketRequest(BaseModel): ticket_id: UUID4 = Field(..., description="Ticket ID", title="Ticket Id") tenant_id: UUID4 = Field( @@ -1177,6 +1241,31 @@ class GetServiceAndResourceTypeResponse(BaseModel): ) +class GetSinglePolicyTicketForNotificationResponse(BaseModel): + ticket: Dict[str, Any] = Field(..., title="Ticket") + resource: Optional[Dict[str, Any]] = Field( + None, description="Resource data of the ticket", title="Resource" + ) + policy: Optional[Dict[str, Any]] = Field( + None, description="Policy data of the ticket", title="Policy" + ) + recommendation: Optional[Dict[str, Any]] = Field( + None, description="Recommendation data of the ticket", title="Recommendation" + ) + cost: Optional[Dict[str, Any]] = Field( + None, description="Cost data of the ticket", title="Cost" + ) + resource_cost_center: Optional[List[UUID]] = Field( + None, description="List of cost center ids", title="Resource Cost Center" + ) + anomaly_cost: Optional[Dict[str, Any]] = Field( + None, description="Anomaly cost impact of the ticket", title="Anomaly Cost" + ) + org_cost_center: Optional[Dict[str, Any]] = Field( + None, description="List of cost center ids", title="Org Cost Center" + ) + + class GetSinglePolicyViolationsResponse(BaseModel): policy_id: UUID = Field( ..., description="The unique identifier of the policy", title="Policy Id" @@ -1200,6 +1289,24 @@ class GetSinglePolicyViolationsResponse(BaseModel): ) +class GetSingleTenantTicketAuditResponse(BaseModel): + trigger_id: UUID4 = Field( + ..., description="The unique identifier of the trigger", title="Trigger Id" + ) + ticket_id: UUID4 = Field( + ..., description="The unique identifier of the ticket", title="Ticket Id" + ) + created_at: datetime = Field( + ..., description="Creation datetime of the ticket", title="Created At" + ) + id: UUID4 = Field(..., description="The unique identifier of the audit", title="Id") + op: str = Field(..., description="The operation performed", title="Op") + record: Dict[str, Any] = Field(..., description="The new record", title="Record") + old_record: Dict[str, Any] = Field( + ..., description="The old record", title="Old Record" + ) + + class GetStateRequest(BaseModel): tenant_id: Optional[UUID4] = Field( None, description="Unique identifier of the tenant", title="Tenant Id" @@ -1404,6 +1511,13 @@ class LastRunAtUpdateItem(BaseModel): ) +class LinkDetails(BaseModel): + link: str = Field(..., description="The link URL", title="Link") + linkText: str = Field( + ..., description="The text to display for the link", title="Linktext" + ) + + class MarkViewAsDefaultRequest(BaseModel): id: UUID4 = Field( ..., description="Unique identifier for the saved view", title="Id" @@ -1435,6 +1549,18 @@ class MessagePartType(str, Enum): WIDGET = "WIDGET" +class MetricFeatureTheme(str, Enum): + METRICS_ENABLED = "METRICS_ENABLED" + MEMORY_METRICS_NOT_ENABLED = "MEMORY_METRICS_NOT_ENABLED" + METRICS_INTEGRATION_ENABLED = "METRICS_INTEGRATION_ENABLED" + METRICS_STOPPED = "METRICS_STOPPED" + METRICS_FETCH_ERROR = "METRICS_FETCH_ERROR" + + +class MetricName(str, Enum): + mem_used_percent = "mem_used_percent" + + class MetricsAggregationType(str, Enum): p99_maximum = "p99_maximum" p95_maximum = "p95_maximum" @@ -1451,6 +1577,28 @@ class MetricsAggregationType(str, Enum): minimum = "minimum" +class MetricsControlStatus(str, Enum): + REQUESTED = "REQUESTED" + ENABLED = "ENABLED" + DISABLED = "DISABLED" + ABORTED = "ABORTED" + APPROVED = "APPROVED" + CANCELLED = "CANCELLED" + COMPLETED = "COMPLETED" + FAILED = "FAILED" + INPROGRESS = "INPROGRESS" + PENDING = "PENDING" + PROCESSING = "PROCESSING" + RUNBOOKINPROGRESS = "RUNBOOKINPROGRESS" + RUNNING = "RUNNING" + SCHEDULED = "SCHEDULED" + SUBMITTED_TO_CUSTOMER = "SUBMITTED_TO_CUSTOMER" + SUCCEEDED = "SUCCEEDED" + SUCCESS = "SUCCESS" + TERMINATED = "TERMINATED" + TIMED_OUT = "TIMED_OUT" + + class MetricsValueUnit(BaseModel): value: int = Field(..., description="The value of the metric.", title="Value") unit: Optional[str] = Field( @@ -2664,6 +2812,15 @@ class TenantState(str, Enum): INACTIVE = "INACTIVE" +class TenantTicketAuditFilters(BaseModel): + trigger_ids: Optional[List[UUID]] = Field( + None, description="The unique identifier of the trigger", title="Trigger Ids" + ) + ticket_ids: Optional[List[UUID]] = Field( + None, description="List of ticket ids", title="Ticket Ids" + ) + + class TenantTicketsStatsMetrics(str, Enum): SUM_SAVINGS = "SUM_SAVINGS" DISTINCT_ENTITY_COUNT = "DISTINCT_ENTITY_COUNT" @@ -2707,6 +2864,23 @@ class TenantVerifyResponse(BaseModel): accounts: Dict[str, Any] = Field(..., description="accounts", title="Accounts") +class TenantsList(BaseModel): + tenant_id: UUID4 = Field( + ..., description="Unique identifier for the tenant", title="Tenant Id" + ) + tenant_name: str = Field(..., description="Name of the tenant", title="Tenant Name") + status: str = Field(..., description="Status of the tenant", title="Status") + short_id: str = Field(..., description="Short id of the tenant", title="Short Id") + account_count: Optional[int] = Field( + None, description="Account count of the tenant", title="Account Count" + ) + region: str = Field(..., description="Region of the tenant", title="Region") + timezone: str = Field(..., description="Timezone of the tenant", title="Timezone") + created_at: Optional[datetime] = Field( + ..., description="Created at of the tenant", title="Created At" + ) + + class Thread(BaseModel): id: Optional[UUID4] = Field( None, description="Unique identifier of the thread", title="Id" @@ -3105,6 +3279,70 @@ class UpdateTenantTicketResponse(BaseModel): pass +class UpdateTenantTicketStatusMetadataRequest(BaseModel): + id: str = Field( + ..., description="The unique identifier of the status metadata", title="Id" + ) + display_name: Optional[str] = Field( + None, description="Display name for the status", title="Display Name" + ) + activity_log_format: Optional[ActivityLogFormat] = Field( + None, description="JSON containing title and note format templates" + ) + display_priority: Optional[int] = Field( + None, description="Priority for display ordering", title="Display Priority" + ) + state: Optional[TicketState] = Field(None, description="State of the ticket status") + is_active: Optional[bool] = Field( + None, description="Whether the status is active", title="Is Active" + ) + updated_by: UUID4 = Field( + ..., + description="UUID of the user who last updated this status metadata", + title="Updated By", + ) + tenant_id: UUID4 = Field( + ..., description="The unique identifier of the tenant", title="Tenant Id" + ) + + +class UpdateTenantTicketStatusMetadataResponse(BaseModel): + id: str = Field( + ..., description="The unique identifier of the status metadata", title="Id" + ) + display_name: str = Field( + ..., description="Display name for the status", title="Display Name" + ) + activity_log_format: ActivityLogFormat = Field( + ..., description="JSON containing title and note format templates" + ) + display_priority: Optional[int] = Field( + 0, description="Priority for display ordering", title="Display Priority" + ) + state: Optional[TicketState] = Field( + "OPEN", description="State of the ticket status" + ) + is_active: Optional[bool] = Field( + True, description="Whether the status is active", title="Is Active" + ) + created_by: UUID4 = Field( + ..., + description="UUID of the user who created this status metadata", + title="Created By", + ) + updated_by: UUID4 = Field( + ..., + description="UUID of the user who last updated this status metadata", + title="Updated By", + ) + created_at: datetime = Field( + ..., description="Datetime of metadata creation", title="Created At" + ) + updated_at: datetime = Field( + ..., description="Datetime of metadata updation", title="Updated At" + ) + + class UpdateTenantTicketsAPIRequest(BaseModel): updated_ticket_details: List[UpdateTenantTicketRequestMixin] = Field( ..., @@ -3183,6 +3421,21 @@ class ValidationError(BaseModel): type: str = Field(..., title="Error Type") +class ViolationAttributesDetails(BaseModel): + key: str = Field(..., description="violation attribute key", title="Key") + display_name: str = Field( + ..., description="violation attribute display name", title="Display Name" + ) + value: str = Field(..., description="violation attribute value", title="Value") + theme: str = Field(..., description="violation attribute theme", title="Theme") + status: str = Field(..., description="violation attribute status", title="Status") + tool_tip_message: str = Field( + ..., + description="violation attribute tool tip message", + title="Tool Tip Message", + ) + + class OnelensDomainUtilitiesRepositoriesDynamicFiltersOperator(str, Enum): between = "between" contains = "contains" @@ -3328,6 +3581,32 @@ class OnelensModelsServiceInterfacesUtilitiesDataRetrieverServiceTimeDimension( ) +class APIEnableMetricsRequest(BaseModel): + resource_ids: List[UUID] = Field( + ..., + description="The unique identifiers of the resources", + min_length=1, + title="Resource Ids", + ) + metric_name: MetricName = Field(..., description="The name of the metric") + entity_id: str = Field(..., description="The entity id", title="Entity Id") + metrics_validity_period_days: int = Field( + ..., + description="Number of days the metrics collection will remain enabled", + title="Metrics Validity Period Days", + ) + look_back_days_for_metrics: int = Field( + ..., + description="Number of days to look back for metrics", + title="Look Back Days For Metrics", + ) + minimum_data_points_for_metrics: int = Field( + ..., + description="Minimum number of data points required for metrics", + title="Minimum Data Points For Metrics", + ) + + class APIGetFeaturesByFiltersRequest(BaseModel): scope: Optional[TenantFeatureScope] = Field( None, description="Scope of the feature" @@ -3343,6 +3622,33 @@ class APIGetFeaturesByFiltersRequest(BaseModel): ) +class APIMetricsControlFilter(BaseModel): + resource_ids: Optional[List[UUID]] = Field( + None, + description="The unique identifiers of the resources", + title="Resource Ids", + ) + metric_name: Optional[MetricName] = Field( + None, description="The name of the metric" + ) + status: Optional[MetricsControlStatus] = Field( + None, description="The status of the metric control" + ) + entity_id: Optional[str] = Field( + None, description="The entity id", title="Entity Id" + ) + + +class APIUpdateMetricsControlRequest(BaseModel): + resource_ids: List[UUID] = Field( + ..., description="The unique identifiers of the resources", title="Resource Ids" + ) + metric_name: MetricName = Field(..., description="The name of the metric") + status: MetricsControlStatus = Field( + ..., description="The status of the metric control" + ) + + class ActionType(BaseModel): service: Union[AwsService, GcpService] = Field( ..., description="Service AWS etc.", title="Service" @@ -3528,9 +3834,7 @@ class BulkUpdateTenantTicketsAPIRequest(BaseModel): assigned_to: Optional[str] = Field( None, description="Assignee of the ticket", title="Assigned To" ) - comment: Optional[str] = Field( - None, description="Comment of the ticket", title="Comment" - ) + note: Optional[str] = Field(None, description="Comment of the ticket", title="Note") class BulkUpdateTenantTicketsRequest(BaseModel): @@ -3546,9 +3850,7 @@ class BulkUpdateTenantTicketsRequest(BaseModel): assigned_to: Optional[str] = Field( None, description="Assignee of the ticket", title="Assigned To" ) - comment: Optional[str] = Field( - None, description="Comment of the ticket", title="Comment" - ) + note: Optional[str] = Field(None, description="Comment of the ticket", title="Note") tenant_id: UUID4 = Field( ..., description="The unique identifier of the tenant", title="Tenant Id" ) @@ -3567,9 +3869,7 @@ class BulkUpdateTenantTicketsRequestMixin(BaseModel): assigned_to: Optional[str] = Field( None, description="Assignee of the ticket", title="Assigned To" ) - comment: Optional[str] = Field( - None, description="Comment of the ticket", title="Comment" - ) + note: Optional[str] = Field(None, description="Comment of the ticket", title="Note") class BulkUpdateTenantTicketsResponse(BaseModel): @@ -3968,6 +4268,72 @@ class CreateTenantTicketRequestMixin(BaseModel): ) +class CreateTenantTicketStatusMetadataRequest(BaseModel): + id: str = Field( + ..., description="The unique identifier of the status metadata", title="Id" + ) + display_name: str = Field( + ..., description="Display name for the status", title="Display Name" + ) + activity_log_format: ActivityLogFormat = Field( + ..., description="JSON containing title and note format templates" + ) + display_priority: Optional[int] = Field( + 0, description="Priority for display ordering", title="Display Priority" + ) + state: Optional[TicketState] = Field( + "OPEN", description="State of the ticket status" + ) + is_active: Optional[bool] = Field( + True, description="Whether the status is active", title="Is Active" + ) + created_by: UUID4 = Field( + ..., + description="UUID of the user who created this status metadata", + title="Created By", + ) + tenant_id: UUID4 = Field( + ..., description="The unique identifier of the tenant", title="Tenant Id" + ) + + +class CreateTenantTicketStatusMetadataResponse(BaseModel): + id: str = Field( + ..., description="The unique identifier of the status metadata", title="Id" + ) + display_name: str = Field( + ..., description="Display name for the status", title="Display Name" + ) + activity_log_format: ActivityLogFormat = Field( + ..., description="JSON containing title and note format templates" + ) + display_priority: Optional[int] = Field( + 0, description="Priority for display ordering", title="Display Priority" + ) + state: Optional[TicketState] = Field( + "OPEN", description="State of the ticket status" + ) + is_active: Optional[bool] = Field( + True, description="Whether the status is active", title="Is Active" + ) + created_by: UUID4 = Field( + ..., + description="UUID of the user who created this status metadata", + title="Created By", + ) + updated_by: UUID4 = Field( + ..., + description="UUID of the user who last updated this status metadata", + title="Updated By", + ) + created_at: datetime = Field( + ..., description="Datetime of metadata creation", title="Created At" + ) + updated_at: datetime = Field( + ..., description="Datetime of metadata updation", title="Updated At" + ) + + class CreateTenantTicketsAPIRequest(BaseModel): new_ticket_details: List[CreateTenantTicketRequestMixin] = Field( ..., @@ -4237,6 +4603,20 @@ class DataRetrieverResponse(BaseModel): error: Optional[str] = Field(None, description="Error of query", title="Error") +class DisableMetricsRequest(BaseModel): + tenant_id: Optional[UUID4] = Field( + None, description="The unique identifier of the tenant", title="Tenant Id" + ) + user_id: Optional[UUID4] = Field( + None, description="The unique identifier of the user", title="User Id" + ) + user_role: Optional[UserRole] = Field(None, description="The role of the user") + node_ids: Optional[List[UUID4]] = Field( + None, description="The unique identifiers of the nodes", title="Node Ids" + ) + metric_name: MetricName = Field(..., description="The name of the metric") + + class DisableTenantAnomalySettingsResponse(BaseModel): config_overrides: Optional[AnomalyLogicOperation] = Field( None, description="The config overrides for the tenant anomaly." @@ -4326,6 +4706,42 @@ class DisableTenantUserResponse(BaseModel): id: UUID4 = Field(..., description="PK in the tenant users table", title="Id") +class EnableMetricsRequest(BaseModel): + resource_ids: List[UUID] = Field( + ..., + description="The unique identifiers of the resources", + min_length=1, + title="Resource Ids", + ) + metric_name: MetricName = Field(..., description="The name of the metric") + entity_id: str = Field(..., description="The entity id", title="Entity Id") + metrics_validity_period_days: int = Field( + ..., + description="Number of days the metrics collection will remain enabled", + title="Metrics Validity Period Days", + ) + look_back_days_for_metrics: int = Field( + ..., + description="Number of days to look back for metrics", + title="Look Back Days For Metrics", + ) + minimum_data_points_for_metrics: int = Field( + ..., + description="Minimum number of data points required for metrics", + title="Minimum Data Points For Metrics", + ) + tenant_id: Optional[UUID4] = Field( + None, description="The unique identifier of the tenant", title="Tenant Id" + ) + user_id: Optional[UUID4] = Field( + None, description="The unique identifier of the user", title="User Id" + ) + user_role: Optional[UserRole] = Field(None, description="The role of the user") + node_ids: Optional[List[UUID4]] = Field( + None, description="The unique identifiers of the nodes", title="Node Ids" + ) + + class EnableTenantAnomalySettingsResponse(BaseModel): config_overrides: Optional[AnomalyLogicOperation] = Field( None, description="The config overrides for the tenant anomaly." @@ -4523,6 +4939,10 @@ class GetAllResourceCatalogsResponse(BaseModel): ) +class GetAllTenantConnectionsResponse(BaseModel): + tenant: List[GetTenantConnectionResponse] = Field(..., title="Tenant") + + class GetAllTenantEmbedAppsLinksResponse(BaseModel): pagination: PaginationFields = Field(..., description="Pagination fields.") links: List[TenantEmbedAppsLinksWithUser] = Field( @@ -4577,6 +4997,22 @@ class GetCloudMetadataRequest(BaseModel): ) +class GetFeaturesByFiltersRequest(BaseModel): + scope: Optional[TenantFeatureScope] = Field( + None, description="Scope of the feature" + ) + entity_id: Optional[List[str]] = Field( + None, description="List of entity IDs for the feature", title="Entity Id" + ) + feature_name: Optional[str] = Field( + None, description="Name of the feature", title="Feature Name" + ) + is_enabled: Optional[bool] = Field( + None, description="Whether the feature is enabled", title="Is Enabled" + ) + tenant_id: UUID4 = Field(..., title="Tenant Id") + + class GetHierarchyFilters(BaseModel): state: Optional[HierarchyState] = Field( "ACTIVE", description="Filter by state(ACTIVE, INACTIVE, DRAFT)" @@ -4665,6 +5101,45 @@ class GetLeafNodesRequest(BaseModel): ) +class GetMetricsControlStatusRequest(BaseModel): + resource_ids: Optional[List[UUID]] = Field( + None, + description="The unique identifiers of the resources", + title="Resource Ids", + ) + metric_name: Optional[MetricName] = Field( + None, description="The name of the metric" + ) + status: Optional[MetricsControlStatus] = Field( + None, description="The status of the metric control" + ) + entity_id: Optional[str] = Field( + None, description="The entity id", title="Entity Id" + ) + tenant_id: Optional[UUID4] = Field( + None, description="The unique identifier of the tenant", title="Tenant Id" + ) + user_id: Optional[UUID4] = Field( + None, description="The unique identifier of the user", title="User Id" + ) + user_role: Optional[UserRole] = Field(None, description="The role of the user") + node_ids: Optional[List[UUID4]] = Field( + None, description="The unique identifiers of the nodes", title="Node Ids" + ) + + +class GetMetricsControlWebhookRequest(BaseModel): + id: UUID = Field( + ..., description="The unique identifier of the metrics control", title="Id" + ) + tenant_id: UUID = Field( + ..., description="The unique identifier of the tenant", title="Tenant Id" + ) + status: MetricsControlStatus = Field( + ..., description="The status of the change manager request" + ) + + class GetMetricsResponse(BaseModel): metrics: List[OnelensModelsServiceInterfacesTenantDataMetricsServiceMetric] = Field( ..., title="Metrics" @@ -4783,6 +5258,12 @@ class GetPolicyTicketStatsResponse(BaseModel): ) +class GetPolicyTicketsForNotificationResponse(BaseModel): + data: List[GetSinglePolicyTicketForNotificationResponse] = Field( + ..., description="List of tickets", title="Data" + ) + + class GetRecommendationTicket(BaseModel): recommendation_unit_id: str = Field( ..., description="Recommendation Unit ID", title="Recommendation Unit Id" @@ -4913,6 +5394,13 @@ class GetSinglePolicyTicketByPolicyIdResponse(BaseModel): violation_attributes: Optional[Dict[str, Any]] = Field( None, description="Attributes of the violation", title="Violation Attributes" ) + violation_attributes_details: Optional[Dict[str, ViolationAttributesDetails]] = ( + Field( + None, + description="Details of the violation attributes", + title="Violation Attributes Details", + ) + ) entity_id: Optional[UUID] = Field( None, description="The id of the resource experiencing policy violation.", @@ -5105,6 +5593,23 @@ class GetTenantPoliciesRequest(BaseModel): ) +class GetTenantTicketsAuditRequest(BaseModel): + tenant_id: UUID4 = Field( + ..., description="The unique identifier of the tenant", title="Tenant Id" + ) + filters: TenantTicketAuditFilters = Field(..., description="Filters to be applied") + pagination_params: PaginationParams = Field( + ..., description="Pagination parameters" + ) + + +class GetTenantTicketsAuditResponse(BaseModel): + data: List[GetSingleTenantTicketAuditResponse] = Field( + ..., description="List of tickets", title="Data" + ) + pagination: PaginationFields = Field(..., description="Pagination fields") + + class GetTenantUserProfileResponse(BaseModel): model_config = ConfigDict( extra="forbid", @@ -5191,6 +5696,10 @@ class GetTenantUsersWithoutUserContextResponse(BaseModel): ) +class GetTenantsListResponse(BaseModel): + tenants: List[TenantsList] = Field(..., title="Tenants") + + class GetTenantsRequest(BaseModel): filters: Optional[TenantFilters] = Field( {}, description="Filters to apply to the policy templates." @@ -5375,6 +5884,44 @@ class MetricChartFilters(BaseModel): ) +class MetricFeature(BaseModel): + metric_name: str = Field(..., description="Name of the metric", title="Metric Name") + enabled: bool = Field( + ..., description="Whether the metric is enabled", title="Enabled" + ) + status: str = Field(..., description="Status of the metric", title="Status") + title: str = Field(..., description="Title of the metric", title="Title") + description: str = Field( + ..., description="Description of the metric", title="Description" + ) + linkDetails: LinkDetails = Field(..., description="Link details for the metric") + theme: MetricFeatureTheme = Field(..., description="Theme for the metric") + + +class MetricsControlResponse(BaseModel): + resource_id: UUID = Field( + ..., description="The unique identifier of the resource", title="Resource Id" + ) + metric_name: MetricName = Field(..., description="The name of the metric") + status: MetricsControlStatus = Field( + ..., description="The status of the metric control" + ) + requested_on: datetime = Field( + ..., + description="The date and time when the metric control was requested", + title="Requested On", + ) + expires_on: datetime = Field( + ..., + description="The date and time when the metric control expires", + title="Expires On", + ) + entity_id: str = Field(..., description="The entity id", title="Entity Id") + attributes: Optional[Dict[str, Any]] = Field( + None, description="The attributes of the metric control", title="Attributes" + ) + + class MetricsLookBackPeriod(BaseModel): value_from: str = Field( ..., description="value from for the look back.", title="Value From" @@ -5821,6 +6368,11 @@ class ResponseGetTenantUserProfileResponse(BaseModel): message: Optional[str] = Field(None, title="Message") +class ResponseGetTenantsListResponse(BaseModel): + data: GetTenantsListResponse + message: Optional[str] = Field(None, title="Message") + + class ResponseGetUsersNodesCategories(BaseModel): data: GetUsersNodesCategories message: Optional[str] = Field(None, title="Message") @@ -6188,7 +6740,7 @@ class TenantTicket(BaseModel): ticket_alias: Optional[int] = Field( None, description="the numeric ticket alias of the ticket", title="Ticket Alias" ) - trigger_id: UUID = Field( + trigger_id: UUID4 = Field( ..., description="The unique identifier of the trigger that created the ticket", title="Trigger Id", @@ -6225,6 +6777,58 @@ class TenantTicketFilters(BaseModel): ) +class TenantTicketStatusMetadata(BaseModel): + id: str = Field( + ..., description="The unique identifier of the status metadata", title="Id" + ) + display_name: str = Field( + ..., description="Display name for the status", title="Display Name" + ) + activity_log_format: ActivityLogFormat = Field( + ..., description="JSON containing title and note format templates" + ) + display_priority: Optional[int] = Field( + 0, description="Priority for display ordering", title="Display Priority" + ) + state: Optional[TicketState] = Field( + "OPEN", description="State of the ticket status" + ) + is_active: Optional[bool] = Field( + True, description="Whether the status is active", title="Is Active" + ) + created_by: UUID4 = Field( + ..., + description="UUID of the user who created this status metadata", + title="Created By", + ) + updated_by: UUID4 = Field( + ..., + description="UUID of the user who last updated this status metadata", + title="Updated By", + ) + created_at: datetime = Field( + ..., description="Datetime of metadata creation", title="Created At" + ) + updated_at: datetime = Field( + ..., description="Datetime of metadata updation", title="Updated At" + ) + + +class TenantTicketStatusMetadataApiResponse(BaseModel): + id: str = Field( + ..., description="The unique identifier of the status metadata", title="Id" + ) + display_name: str = Field( + ..., description="Display name for the status", title="Display Name" + ) + display_priority: Optional[int] = Field( + 0, description="Priority for display ordering", title="Display Priority" + ) + state: Optional[TicketState] = Field( + "OPEN", description="State of the ticket status" + ) + + class TenantTicketWithTicketAlias(BaseModel): created_at: datetime = Field( ..., description="Datetime of ticket creation", title="Created At" @@ -6294,7 +6898,7 @@ class TenantTicketWithTicketAlias(BaseModel): description="the # included ticket alias of the ticket", title="Ticket Alias", ) - trigger_id: UUID = Field( + trigger_id: UUID4 = Field( ..., description="The unique identifier of the trigger that created the ticket", title="Trigger Id", @@ -6502,6 +7106,26 @@ class UpdateHierarchyNodeResponse(BaseModel): ) +class UpdateMetricsControlRequest(BaseModel): + resource_ids: List[UUID] = Field( + ..., description="The unique identifiers of the resources", title="Resource Ids" + ) + metric_name: MetricName = Field(..., description="The name of the metric") + status: MetricsControlStatus = Field( + ..., description="The status of the metric control" + ) + tenant_id: Optional[UUID4] = Field( + None, description="The unique identifier of the tenant", title="Tenant Id" + ) + user_id: Optional[UUID4] = Field( + None, description="The unique identifier of the user", title="User Id" + ) + user_role: Optional[UserRole] = Field(None, description="The role of the user") + node_ids: Optional[List[UUID4]] = Field( + None, description="The unique identifiers of the nodes", title="Node Ids" + ) + + class UpdateTenantUserBySystemRequest(BaseModel): last_login: Optional[datetime] = Field( None, description="Last login of the user", title="Last Login" @@ -7130,6 +7754,12 @@ class CreateTenantProviderResponse(BaseModel): state: TenantProviderState = Field(..., description="state") +class FeaturesPolicyResponse(BaseModel): + metrics: Optional[List[MetricFeature]] = Field( + None, description="List of metrics", title="Metrics" + ) + + class GenerateSQLRequest(BaseModel): query: str = Field(..., description="User query", title="Query") tenant_id: UUID4 = Field( @@ -7140,6 +7770,9 @@ class GenerateSQLRequest(BaseModel): selected_tables: List[TableMetadata] = Field( ..., description="Selected tables", title="Selected Tables" ) + metric_names: Optional[List[str]] = Field( + ..., description="List of metric names required", title="Metric Names" + ) class GetAllParentNodesResponse(BaseModel): @@ -7368,6 +8001,14 @@ class GetMappedResourcesRequest(BaseModel): ) +class GetMetricsControlStatusResponse(BaseModel): + metrics_control_entities: List[MetricsControlResponse] = Field( + ..., + description="The statuses of the metrics control", + title="Metrics Control Entities", + ) + + class GetMetricsCountAPIRequest(BaseModel): node_id: Optional[UUID4] = Field( None, description="The id of the node to be validated.", title="Node Id" @@ -7856,6 +8497,33 @@ class GetTenantProvidersResponse(BaseModel): attributes_data: Optional[Dict[str, Any]] = Field(..., title="Attributes Data") +class GetTenantTicketStatusMetadataApiRequest(BaseModel): + filters: Optional[ + List[OnelensDomainUtilitiesRepositoriesDynamicFiltersFilterCriteria] + ] = Field([], description="List of filter criteria to apply", title="Filters") + + +class GetTenantTicketStatusMetadataApiResponse(BaseModel): + status_metadata: List[TenantTicketStatusMetadataApiResponse] = Field( + ..., description="List of status metadata entries", title="Status Metadata" + ) + + +class GetTenantTicketStatusMetadataRequest(BaseModel): + filters: Optional[ + List[OnelensDomainUtilitiesRepositoriesDynamicFiltersFilterCriteria] + ] = Field([], description="List of filter criteria to apply", title="Filters") + tenant_id: UUID4 = Field( + ..., description="The unique identifier of the tenant", title="Tenant Id" + ) + + +class GetTenantTicketStatusMetadataResponse(BaseModel): + status_metadata: List[TenantTicketStatusMetadata] = Field( + ..., description="List of status metadata entries", title="Status Metadata" + ) + + class GetTenantTicketsAPIRequest(BaseModel): pagination: Optional[PaginationParams] = Field( {"page": 1, "page_size": 10}, @@ -8301,6 +8969,11 @@ class ResponseGetTenantProvidersResponse(BaseModel): message: Optional[str] = Field(None, title="Message") +class ResponseGetTenantTicketStatusMetadataApiResponse(BaseModel): + data: GetTenantTicketStatusMetadataApiResponse + message: Optional[str] = Field(None, title="Message") + + class ResponseGetTenantTicketsResponse(BaseModel): data: GetTenantTicketsResponse message: Optional[str] = Field(None, title="Message") @@ -8366,6 +9039,9 @@ class SelectTablesResponse(BaseModel): selected_tables: List[TableMetadata] = Field( ..., description="Selected tables", title="Selected Tables" ) + metric_names: Optional[List[str]] = Field( + [], description="list of available metrics", title="Metric Names" + ) error: Optional[Dict[str, Any]] = Field( None, description="Error message if any", title="Error" ) @@ -9302,6 +9978,9 @@ class GetTenantPoliciesWithSettingsResponse(BaseModel): class GetTenantPolicyByIdResponse(BaseModel): + features: Optional[FeaturesPolicyResponse] = Field( + None, description="Features configuration" + ) parent_ptp_id: UUID4 = Field( ..., description="The id of the parent policy template pack.", @@ -9487,6 +10166,9 @@ class GetTicketByIdPolicyDetailsResponse(BaseModel): account_details: Dict[str, Any] = Field( ..., description="The account details", title="Account Details" ) + features: Optional[FeaturesPolicyResponse] = Field( + None, description="Features configuration" + ) class PolicyTemplate(BaseModel): diff --git a/onelens_backend_client_v2/rpc/__init__.py b/onelens_backend_client_v2/rpc/__init__.py index 25161636..4e4cf066 100644 --- a/onelens_backend_client_v2/rpc/__init__.py +++ b/onelens_backend_client_v2/rpc/__init__.py @@ -118,6 +118,18 @@ FeatureServiceRpcHandler, ) +from onelens_backend_client_v2.rpc.ticket_status_metadata_service_rpc_handler import ( + TicketStatusMetadataServiceRpcHandler, +) + +from onelens_backend_client_v2.rpc.metrics_control_service_rpc_handler import ( + MetricsControlServiceRpcHandler, +) + +from onelens_backend_client_v2.rpc.tenant_ticket_audit_service_rpc_handler import ( + TenantTicketAuditServiceRpcHandler, +) + __all__ = [ "TenantVerifyServiceRpcHandler", @@ -150,4 +162,7 @@ "NaviraConversationServiceRpcHandler", "NaviraResourceExplorerServiceRpcHandler", "FeatureServiceRpcHandler", + "TicketStatusMetadataServiceRpcHandler", + "MetricsControlServiceRpcHandler", + "TenantTicketAuditServiceRpcHandler", ] diff --git a/onelens_backend_client_v2/rpc/feature_service_rpc_handler.py b/onelens_backend_client_v2/rpc/feature_service_rpc_handler.py index 73313f3d..3d428bdd 100644 --- a/onelens_backend_client_v2/rpc/feature_service_rpc_handler.py +++ b/onelens_backend_client_v2/rpc/feature_service_rpc_handler.py @@ -11,7 +11,7 @@ from onelens_backend_client_v2.models import GetAllFeaturesResponse -from onelens_backend_client_v2.models import APIGetFeaturesByFiltersRequest +from onelens_backend_client_v2.models import GetFeaturesByFiltersRequest from onelens_backend_client_v2.models import GetFeaturesByFiltersResponse @@ -164,7 +164,7 @@ def _get_all_serialize( @validate_call def get_features_by_filters( self, - request: APIGetFeaturesByFiltersRequest, + request: GetFeaturesByFiltersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -182,7 +182,7 @@ def get_features_by_filters( :param request: (required) - :type request: APIGetFeaturesByFiltersRequest + :type request: GetFeaturesByFiltersRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -228,7 +228,7 @@ def get_features_by_filters( def _get_features_by_filters_serialize( self, - request: APIGetFeaturesByFiltersRequest, + request: GetFeaturesByFiltersRequest, _request_auth, _content_type, _headers, diff --git a/onelens_backend_client_v2/rpc/metrics_control_service_rpc_handler.py b/onelens_backend_client_v2/rpc/metrics_control_service_rpc_handler.py index a282813e..3b450407 100644 --- a/onelens_backend_client_v2/rpc/metrics_control_service_rpc_handler.py +++ b/onelens_backend_client_v2/rpc/metrics_control_service_rpc_handler.py @@ -5,6 +5,12 @@ from typing_extensions import Annotated +from onelens_backend_client_v2.models import DisableMetricsRequest + + +from onelens_backend_client_v2.models import DisableMetricsResponse + + from onelens_backend_client_v2.models import EnableMetricsRequest @@ -37,6 +43,127 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call + def disable_metric( + self, + request: DisableMetricsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DisableMetricsResponse: + """Disable Metric + + + + :param request: (required) + :type request: DisableMetricsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._disable_metric_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "DisableMetricsResponse", + "422": "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _disable_metric_serialize( + self, + request: DisableMetricsRequest, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the body parameter + if request is not None: + _body_params = request + + # set the HTTP header `Accept` + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/rpc/metrics_control_service/disable_metric", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call def enable_metrics( self, diff --git a/onelens_backend_client_v2/rpc/tenant_connection_service_rpc_handler.py b/onelens_backend_client_v2/rpc/tenant_connection_service_rpc_handler.py index 10469eaa..b46f4f86 100644 --- a/onelens_backend_client_v2/rpc/tenant_connection_service_rpc_handler.py +++ b/onelens_backend_client_v2/rpc/tenant_connection_service_rpc_handler.py @@ -11,6 +11,12 @@ from onelens_backend_client_v2.models import GetTenantConnectionResponse +from onelens_backend_client_v2.models import GetAllTenantConnectionsRequest + + +from onelens_backend_client_v2.models import GetAllTenantConnectionsResponse + + from onelens_backend_client_v2.models import GetTenantConnectionRequest @@ -152,6 +158,127 @@ def _create_tenant_connection_serialize( _request_auth=_request_auth, ) + @validate_call + def get_all_tenant_connections( + self, + request: GetAllTenantConnectionsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetAllTenantConnectionsResponse: + """Get All Tenant Connections + + + + :param request: (required) + :type request: GetAllTenantConnectionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_all_tenant_connections_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetAllTenantConnectionsResponse", + "422": "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_all_tenant_connections_serialize( + self, + request: GetAllTenantConnectionsRequest, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the body parameter + if request is not None: + _body_params = request + + # set the HTTP header `Accept` + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/rpc/tenant_connection_service/get_all_tenant_connections", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call def get_tenant_connection( self, diff --git a/onelens_backend_client_v2/rpc/tenant_ticket_service_rpc_handler.py b/onelens_backend_client_v2/rpc/tenant_ticket_service_rpc_handler.py index 7c756160..7853c5e6 100644 --- a/onelens_backend_client_v2/rpc/tenant_ticket_service_rpc_handler.py +++ b/onelens_backend_client_v2/rpc/tenant_ticket_service_rpc_handler.py @@ -29,6 +29,12 @@ from onelens_backend_client_v2.models import GetAllPolicyViolationsResponse +from onelens_backend_client_v2.models import GetPolicyTicketsForNotificationRequest + + +from onelens_backend_client_v2.models import GetPolicyTicketsForNotificationResponse + + from onelens_backend_client_v2.models import GetPolicyTicketStatsRequest @@ -569,6 +575,127 @@ def _get_all_policy_violations_serialize( _request_auth=_request_auth, ) + @validate_call + def get_policy_ticket_for_notification( + self, + request: GetPolicyTicketsForNotificationRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetPolicyTicketsForNotificationResponse: + """Get Policy Ticket For Notification + + + + :param request: (required) + :type request: GetPolicyTicketsForNotificationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_policy_ticket_for_notification_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetPolicyTicketsForNotificationResponse", + "422": "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_policy_ticket_for_notification_serialize( + self, + request: GetPolicyTicketsForNotificationRequest, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the body parameter + if request is not None: + _body_params = request + + # set the HTTP header `Accept` + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/rpc/tenant_ticket_service/get_policy_ticket_for_notification", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call def get_policy_ticket_stats( self,