fmn.api.api_models module¶
- class fmn.api.api_models.Artifact(*, type: ArtifactType, name: str)[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: ArtifactType¶
- class fmn.api.api_models.ArtifactOptionsGroup(*, label: str, options: list[Option[Artifact]])[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.ArtifactsFollowedTrackingRule(*, name: Literal['artifacts-followed'], params: list[dict[Literal['name', 'type'], str]])[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.BaseModel[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.Destination(*, protocol: str, address: str)[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.Filters(*, applications: list[str] = [], excluded_applications: list[str] = [], severities: list[str] = [], topic: str | None = None, my_actions: bool = False)[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.GenerationRule(*, id: int | None = None, destinations: list[Destination], filters: Filters)[source]¶
Bases:
BaseModel- destinations: list[Destination]¶
- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.ListParamTrackingRule(*, name: Literal['artifacts-owned', 'artifacts-group-owned', 'users-followed'], params: list[str])[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.NewRule(*, name: str | None = None, disabled: bool = False, tracking_rule: ListParamTrackingRule | NoParamTrackingRule | ArtifactsFollowedTrackingRule, generation_rules: list[GenerationRule])[source]¶
Bases:
BaseModel- generation_rules: list[GenerationRule]¶
- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- tracking_rule: Annotated[ListParamTrackingRule | NoParamTrackingRule | ArtifactsFollowedTrackingRule, FieldInfo(annotation=NoneType, required=True, discriminator='name')]¶
- class fmn.api.api_models.NoParamTrackingRule(*, name: Literal['related-events'], params: str | None = None)[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.Option(*, label: str, value: T)[source]¶
-
- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: T¶
- class fmn.api.api_models.Rule(*, name: str | None = None, disabled: bool = False, tracking_rule: ListParamTrackingRule | NoParamTrackingRule | ArtifactsFollowedTrackingRule, generation_rules: list[GenerationRule], id: int, user: User, generated_last_week: int = 0)[source]¶
Bases:
NewRule- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class fmn.api.api_models.RulePatch(*, disabled: bool | None = None)[source]¶
Bases:
BaseModel- model_config = {'from_attributes': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].