API Connection Model

Smarter API Connection Manifest Constants

Smarter API Manifest - ApiConnection.spec

class smarter.apps.connection.manifest.models.api_connection.spec.ApiConnection(*, baseUrl: str, apiKey: str | None = None, authMethod: str = 'none', timeout: Annotated[int, Ge(ge=1)] = 30, proxyProtocol: str | None = None, proxyHost: str | None = None, proxyPort: int | None = None, proxyUsername: str | None = None, proxyPassword: str | None = None)[source]

Bases: SmarterBasePydanticModel

Smarter API - generic API Connection class.

apiKey: str | None
authMethod: str
baseUrl: str
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.

proxyHost: str | None
proxyPassword: str | None
proxyPort: int | None
proxyProtocol: str | None
proxyUsername: str | None
timeout: int
classmethod validate_api_key(v)[source]
classmethod validate_auth_method(v)[source]
classmethod validate_proxy_host(v)[source]
classmethod validate_proxy_password(v)[source]
classmethod validate_proxy_port(v)[source]
classmethod validate_proxy_protocol(v)[source]
classmethod validate_proxy_username(v)[source]
classmethod validate_root_domain(v)[source]
classmethod validate_timeout(v)[source]
class smarter.apps.connection.manifest.models.api_connection.spec.SAMApiConnectionSpec(*, connection: ApiConnection)[source]

Bases: AbstractSAMSpecBase

Smarter API Api Connection Manifest ApiConnection.spec

class_identifier: ClassVar[str] = 'ApiConnection.spec'
connection: ApiConnection
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.

Smarter Connection Manifest

class smarter.apps.connection.manifest.models.api_connection.model.SAMApiConnection(*, apiVersion: str, kind: str, metadata: SAMConnectionCommonMetadata, spec: SAMApiConnectionSpec, status: SAMConnectionCommonStatus | None = None)[source]

Bases: SAMConnectionCommon

Smarter API Connection Manifest - ApiConnection Model

class_identifier: ClassVar[str] = 'ApiConnection'
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: SAMApiConnectionSpec