sift_py.report_templates.config
1from __future__ import annotations 2 3from datetime import datetime 4from typing import Any, List, Optional 5 6from pydantic import BaseModel, ConfigDict 7from typing_extensions import NotRequired, TypedDict 8 9from sift_py._internal.convert.json import AsJson 10 11 12class ReportTemplateConfig(BaseModel, AsJson): 13 """ 14 Configuration for a report template. 15 16 - `name`: Name of the report template. 17 - `template_client_key`: Unique client key to identify the report template. 18 - `organization_id`: Organization ID that the report template belongs to. 19 - `tags`: Tags to associate with the report template. 20 - `description`: Description of the report template. 21 - `rule_client_keys`: List of rule client keys associated with the report template. 22 - `archived_date`: Date when the report template was archived. Setting this field 23 will archive the report template, and unsetting it will unarchive the report template. 24 - `archived`: True if the report template is archived, False otherwise. 25 """ 26 27 model_config = ConfigDict(arbitrary_types_allowed=True) 28 29 name: str 30 template_client_key: Optional[str] = None 31 template_id: Optional[str] = None 32 tags: Optional[List[str]] = None 33 description: Optional[str] = None 34 rule_client_keys: List[str] = [] 35 archived_date: Optional[datetime] = None 36 archived: bool = False 37 38 def as_json(self) -> Any: 39 return self.model_dump_json() 40 41 42class ReportTemplateUpdate(TypedDict): 43 """ 44 Represents a dictionary for updating properties of a report template. All fields are optional 45 and only the provided fields will be updated. 46 47 - `name`: Updated name of the report template. 48 - `template_client_key`: Updated unique client key to identify the report template. 49 - `organization_id`: Updated organization ID that the report template belongs to. 50 - `tags`: Updated tags to associate with the report template. 51 - `description`: Updated description of the report template. 52 - `rule_client_keys`: Updated list of rule client keys associated with the report template. 53 - `archived`: True if the report template is archived, False otherwise. 54 """ 55 56 name: NotRequired[str] 57 template_client_key: NotRequired[str] 58 tags: NotRequired[List[str]] 59 description: NotRequired[str] 60 rule_client_keys: NotRequired[List[str]] 61 archived: NotRequired[bool]
13class ReportTemplateConfig(BaseModel, AsJson): 14 """ 15 Configuration for a report template. 16 17 - `name`: Name of the report template. 18 - `template_client_key`: Unique client key to identify the report template. 19 - `organization_id`: Organization ID that the report template belongs to. 20 - `tags`: Tags to associate with the report template. 21 - `description`: Description of the report template. 22 - `rule_client_keys`: List of rule client keys associated with the report template. 23 - `archived_date`: Date when the report template was archived. Setting this field 24 will archive the report template, and unsetting it will unarchive the report template. 25 - `archived`: True if the report template is archived, False otherwise. 26 """ 27 28 model_config = ConfigDict(arbitrary_types_allowed=True) 29 30 name: str 31 template_client_key: Optional[str] = None 32 template_id: Optional[str] = None 33 tags: Optional[List[str]] = None 34 description: Optional[str] = None 35 rule_client_keys: List[str] = [] 36 archived_date: Optional[datetime] = None 37 archived: bool = False 38 39 def as_json(self) -> Any: 40 return self.model_dump_json()
Configuration for a report template.
name
: Name of the report template.template_client_key
: Unique client key to identify the report template.organization_id
: Organization ID that the report template belongs to.tags
: Tags to associate with the report template.description
: Description of the report template.rule_client_keys
: List of rule client keys associated with the report template.archived_date
: Date when the report template was archived. Setting this field will archive the report template, and unsetting it will unarchive the report template.archived
: True if the report template is archived, False otherwise.
model_config =
{'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict
][pydantic.config.ConfigDict].
model_fields: ClassVar[Dict[str, pydantic.fields.FieldInfo]] =
{'name': FieldInfo(annotation=str, required=True), 'template_client_key': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'template_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'tags': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'rule_client_keys': FieldInfo(annotation=List[str], required=False, default=[]), 'archived_date': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None), 'archived': FieldInfo(annotation=bool, required=False, default=False)}
Metadata about the fields defined on the model,
mapping of field names to [FieldInfo
][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__
from Pydantic V1.
model_computed_fields: ClassVar[Dict[str, pydantic.fields.ComputedFieldInfo]] =
{}
A dictionary of computed field names and their corresponding ComputedFieldInfo
objects.
Inherited Members
- pydantic.main.BaseModel
- BaseModel
- model_extra
- model_fields_set
- model_construct
- model_copy
- model_dump
- model_dump_json
- model_json_schema
- model_parametrized_name
- model_post_init
- model_rebuild
- model_validate
- model_validate_json
- model_validate_strings
- dict
- json
- parse_obj
- parse_raw
- parse_file
- from_orm
- construct
- copy
- schema
- schema_json
- validate
- update_forward_refs
class
ReportTemplateUpdate(typing_extensions.TypedDict):
43class ReportTemplateUpdate(TypedDict): 44 """ 45 Represents a dictionary for updating properties of a report template. All fields are optional 46 and only the provided fields will be updated. 47 48 - `name`: Updated name of the report template. 49 - `template_client_key`: Updated unique client key to identify the report template. 50 - `organization_id`: Updated organization ID that the report template belongs to. 51 - `tags`: Updated tags to associate with the report template. 52 - `description`: Updated description of the report template. 53 - `rule_client_keys`: Updated list of rule client keys associated with the report template. 54 - `archived`: True if the report template is archived, False otherwise. 55 """ 56 57 name: NotRequired[str] 58 template_client_key: NotRequired[str] 59 tags: NotRequired[List[str]] 60 description: NotRequired[str] 61 rule_client_keys: NotRequired[List[str]] 62 archived: NotRequired[bool]
Represents a dictionary for updating properties of a report template. All fields are optional and only the provided fields will be updated.
name
: Updated name of the report template.template_client_key
: Updated unique client key to identify the report template.organization_id
: Updated organization ID that the report template belongs to.tags
: Updated tags to associate with the report template.description
: Updated description of the report template.rule_client_keys
: Updated list of rule client keys associated with the report template.archived
: True if the report template is archived, False otherwise.