Common Plugin Models

Smarter API Manifest - Plugin.metadata

class smarter.apps.plugin.manifest.models.common.plugin.metadata.SAMPluginCommonMetadata(*, name: str, description: str | None, version: str | None, tags: List[str] | None = <factory>, annotations: List[dict[str, str | int | float | bool | ~datetime.date | ~datetime.datetime | ~decimal.Decimal | ~uuid.UUID | bytes | list | dict]] | None=<factory>, pluginClass: str)[source]

Bases: AbstractSAMMetadataBase

Smarter API Plugin Manifest - common Metadata class.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

pluginClass: str
classmethod validate_plugin_class(v)[source]

Validate the plugin class.

Return type:

str

Smarter API Manifest - Plugin.status

class smarter.apps.plugin.manifest.models.common.plugin.status.SAMPluginCommonStatus(*, recordLocator: str, created: datetime, modified: datetime, accountNumber: str, username: str)[source]

Bases: AbstractSAMStatusBase

Smarter API Plugin Manifest - Status class.

accountNumber: str
class_identifier: ClassVar[str] = 'Plugin.status'
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

username: str

Smarter API Plugin Manifest

class smarter.apps.plugin.manifest.models.common.plugin.model.SAMPluginCommon(*, apiVersion: str, kind: str, metadata: SAMPluginCommonMetadata, spec: SAMPluginCommonSpec, status: SAMPluginCommonStatus | None = None)[source]

Bases: AbstractSAMBase

Smarter API Manifest - Common Plugin Base Model

class_identifier: ClassVar[str] = 'Plugin'
metadata: SAMPluginCommonMetadata
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

spec: SAMPluginCommonSpec
status: SAMPluginCommonStatus | None