"""Schema to create relationship between a Profile and an Identity.""" from enum import Enum from marshmallow import fields, Schema, validate from marshmallow_enum import EnumField class ProfileType(Enum): """Profile type enum.""" ArtistProfile = 'ArtistProfile' AudienceProfile = 'AudienceProfile' CollaboratorsProfile = 'CollaboratorsProfile' ContentProfile = 'ContentProfile' DistributionProfile = 'DistributionProfile' LabelProfile = 'LabelProfile' PodcastProfile = 'PodcastProfile' InsightsProfile = 'InsightsProfile' OrchAdminProfile = 'OrchAdminProfile' DistroDevProfile = 'DistroDevProfile' AbacusProfile = 'AbacusProfile' PublishingProfile = 'PublishingProfile' MoneyhubProfile = 'MoneyhubProfile' DocumentsProfile = 'DocumentsProfile' Account360Profile = 'Account360Profile' class IdentityToProfile(Schema): """Profile schema. Properties: - identity_id (str): the auth0 id for identity - profile_id (int): the id for this profile - LabelProfile = vend_contact_id - ArtistProfile = auto-id - profile_type (str): the type of profile (e.g. 'ArtistProfile', 'LabelProfile') """ identity_id = fields.String(validate=validate.Length(min=22, max=36), required=True) profile_type = EnumField(ProfileType, required=True) profile_id = fields.Integer(required=True) profile_uuid = fields.String(required=False)