Common Connection Models

Smarter API Manifest - Plugin.metadata

pydantic model smarter.apps.plugin.manifest.models.common.connection.metadata.SAMConnectionCommonMetadata[source]

Bases: AbstractSAMMetadataBase

Smarter API Connection Manifest - common Metadata class.

Show JSON schema
{
   "title": "SAMConnectionCommonMetadata",
   "description": "Smarter API Connection Manifest - common Metadata class.",
   "type": "object",
   "properties": {
      "name": {
         "description": "The camelCase name of the manifest resource",
         "title": "Name",
         "type": "string"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "description": "The description for this resource. Be brief. Keep it under 255 characters.",
         "title": "Description"
      },
      "version": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "description": "The semantic version of the manifest. Example: 0.1.0",
         "title": "Version"
      },
      "tags": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "description": "The tags of the manifest. Used for generic resource categorization and search. Example: ['tag1', 'tag2']",
         "title": "Tags"
      },
      "annotations": {
         "anyOf": [
            {
               "items": {
                  "additionalProperties": {
                     "anyOf": [
                        {
                           "type": "string"
                        },
                        {
                           "type": "integer"
                        },
                        {
                           "type": "number"
                        },
                        {
                           "type": "boolean"
                        },
                        {
                           "format": "date",
                           "type": "string"
                        },
                        {
                           "format": "date-time",
                           "type": "string"
                        },
                        {
                           "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                           "type": "string"
                        },
                        {
                           "format": "uuid",
                           "type": "string"
                        },
                        {
                           "format": "binary",
                           "type": "string"
                        },
                        {
                           "items": {},
                           "type": "array"
                        },
                        {
                           "additionalProperties": true,
                           "type": "object"
                        }
                     ]
                  },
                  "type": "object"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "description": "The manifest annotations. Used for storing arbitrary metadata as\n            key-value pairs. Example: [{'smarter.sh/test-manifest/project-name': 'Scooby dooby do'}]. The\n            key should be a valid url-friendly string. The value accepts\n            multi-line string values (YAML block scalars) and various scalar types including\n            str, int, float, bool, datetime.date, datetime.datetime, decimal.Decimal, uuid.UUID, bytes, list, dict.\n            ",
         "title": "Annotations"
      }
   },
   "required": [
      "name",
      "description",
      "version"
   ]
}

Config:
  • from_attributes: bool = True

  • arbitrary_types_allowed: bool = True

  • frozen: bool = True

Fields:

Validators:

Smarter API Manifest - Plugin.status

pydantic model smarter.apps.plugin.manifest.models.common.connection.status.SAMConnectionCommonStatus[source]

Bases: AbstractSAMStatusBase

Smarter API Connection Manifest - Status class.

Show JSON schema
{
   "title": "SAMConnectionCommonStatus",
   "description": "Smarter API Connection Manifest - Status class.",
   "type": "object",
   "properties": {
      "recordLocator": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "recordLocator[String]: An optional identifier used to locate the resource record associated with this manifest. Read only.",
         "title": "Recordlocator"
      },
      "created": {
         "description": "The date in which this resource was created. Read only.",
         "format": "date-time",
         "title": "Created",
         "type": "string"
      },
      "modified": {
         "description": "The date in which this resource was most recently changed. Read only.",
         "format": "date-time",
         "title": "Modified",
         "type": "string"
      },
      "account_number": {
         "description": "Connection.status.account_number: The account owner of this Connection. Read only.",
         "title": "Account Number",
         "type": "string"
      },
      "username": {
         "description": "Connection.status.account_number: The Smarter user who created this Connection. Read only.",
         "title": "Username",
         "type": "string"
      }
   },
   "required": [
      "created",
      "modified",
      "account_number",
      "username"
   ]
}

Config:
  • from_attributes: bool = True

  • arbitrary_types_allowed: bool = True

  • frozen: bool = True

Fields:
Validators:

field account_number: str [Required]

Connection.status.account_number: The account owner of this Connection. Read only.

Validated by:
field username: str [Required]

Connection.status.account_number: The Smarter user who created this Connection. Read only.

Validated by:
class_identifier: ClassVar[str] = 'Connection.status'

Smarter API Plugin Manifest

pydantic model smarter.apps.plugin.manifest.models.common.connection.model.SAMConnectionCommon[source]

Bases: AbstractSAMBase

Smarter API Manifest - Common Connection Base Model

Show JSON schema
{
   "title": "SAMConnectionCommon",
   "description": "Smarter API Manifest - Common Connection Base Model",
   "type": "object",
   "properties": {
      "apiVersion": {
         "description": "apiVersion[String]: Required. The API version of the AbstractSAMBase.",
         "title": "Apiversion",
         "type": "string"
      },
      "kind": {
         "description": "kind[String]: Required. The kind of resource described by the manifest.",
         "title": "Kind",
         "type": "string"
      },
      "metadata": {
         "$ref": "#/$defs/SAMConnectionCommonMetadata",
         "description": "Connection.metadata[obj]: Required, the Connection metadata."
      },
      "spec": {
         "$ref": "#/$defs/AbstractSAMSpecBase"
      },
      "status": {
         "anyOf": [
            {
               "$ref": "#/$defs/SAMConnectionCommonStatus"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Connection.status[obj]: Optional, Read-only. Stateful status information about the Connection."
      }
   },
   "$defs": {
      "AbstractSAMSpecBase": {
         "description": "Pydantic Spec base class. Expected to be subclassed by specific manifest classes.",
         "properties": {},
         "title": "AbstractSAMSpecBase",
         "type": "object"
      },
      "SAMConnectionCommonMetadata": {
         "description": "Smarter API Connection Manifest - common Metadata class.",
         "properties": {
            "name": {
               "description": "The camelCase name of the manifest resource",
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "description": "The description for this resource. Be brief. Keep it under 255 characters.",
               "title": "Description"
            },
            "version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "description": "The semantic version of the manifest. Example: 0.1.0",
               "title": "Version"
            },
            "tags": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "description": "The tags of the manifest. Used for generic resource categorization and search. Example: ['tag1', 'tag2']",
               "title": "Tags"
            },
            "annotations": {
               "anyOf": [
                  {
                     "items": {
                        "additionalProperties": {
                           "anyOf": [
                              {
                                 "type": "string"
                              },
                              {
                                 "type": "integer"
                              },
                              {
                                 "type": "number"
                              },
                              {
                                 "type": "boolean"
                              },
                              {
                                 "format": "date",
                                 "type": "string"
                              },
                              {
                                 "format": "date-time",
                                 "type": "string"
                              },
                              {
                                 "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                                 "type": "string"
                              },
                              {
                                 "format": "uuid",
                                 "type": "string"
                              },
                              {
                                 "format": "binary",
                                 "type": "string"
                              },
                              {
                                 "items": {},
                                 "type": "array"
                              },
                              {
                                 "additionalProperties": true,
                                 "type": "object"
                              }
                           ]
                        },
                        "type": "object"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "description": "The manifest annotations. Used for storing arbitrary metadata as\n            key-value pairs. Example: [{'smarter.sh/test-manifest/project-name': 'Scooby dooby do'}]. The\n            key should be a valid url-friendly string. The value accepts\n            multi-line string values (YAML block scalars) and various scalar types including\n            str, int, float, bool, datetime.date, datetime.datetime, decimal.Decimal, uuid.UUID, bytes, list, dict.\n            ",
               "title": "Annotations"
            }
         },
         "required": [
            "name",
            "description",
            "version"
         ],
         "title": "SAMConnectionCommonMetadata",
         "type": "object"
      },
      "SAMConnectionCommonStatus": {
         "description": "Smarter API Connection Manifest - Status class.",
         "properties": {
            "recordLocator": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "recordLocator[String]: An optional identifier used to locate the resource record associated with this manifest. Read only.",
               "title": "Recordlocator"
            },
            "created": {
               "description": "The date in which this resource was created. Read only.",
               "format": "date-time",
               "title": "Created",
               "type": "string"
            },
            "modified": {
               "description": "The date in which this resource was most recently changed. Read only.",
               "format": "date-time",
               "title": "Modified",
               "type": "string"
            },
            "account_number": {
               "description": "Connection.status.account_number: The account owner of this Connection. Read only.",
               "title": "Account Number",
               "type": "string"
            },
            "username": {
               "description": "Connection.status.account_number: The Smarter user who created this Connection. Read only.",
               "title": "Username",
               "type": "string"
            }
         },
         "required": [
            "created",
            "modified",
            "account_number",
            "username"
         ],
         "title": "SAMConnectionCommonStatus",
         "type": "object"
      }
   },
   "required": [
      "apiVersion",
      "kind",
      "metadata"
   ]
}

Config:
  • from_attributes: bool = True

  • arbitrary_types_allowed: bool = True

  • frozen: bool = True

Fields:
Validators:
field metadata: SAMConnectionCommonMetadata [Required]

Connection.metadata[obj]: Required, the Connection metadata.

Validated by:
field status: Optional[SAMConnectionCommonStatus] = None

Connection.status[obj]: Optional, Read-only. Stateful status information about the Connection.

Validated by:
class_identifier: ClassVar[str] = 'Connection'