Skip to content

ExtendedMediaFileLevelResource20

Bases: OCIType

Represents either an existing file for the application server to use, or the contents of a file to transfer and an URL.

Attributes:

file (Optional[Nillable[AnnouncementFileLevelKey]]):

url (Optional[Nillable[str]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class ExtendedMediaFileLevelResource20(OCIType):
    """Represents either an existing file for the application server to use, or
          the contents of a file to transfer and an URL.

    Attributes:

        file (Optional[Nillable[AnnouncementFileLevelKey]]):

        url (Optional[Nillable[str]]):

    """

    file: Optional[Nillable[AnnouncementFileLevelKey]] = field(
        default=None, metadata={"alias": "file"}
    )

    url: Optional[Nillable[str]] = field(default=None, metadata={"alias": "url"})

    def __post_init__(self):
        nillable_fields = ["file", "url"]
        for field_name in nillable_fields:
            value = getattr(self, field_name)
            if value == "" or value == "None":
                object.__setattr__(self, field_name, OCINil)