Skip to content

SystemSIPDeviceTypeFileAddRequest22V2

Bases: OCIRequest

Request to add a sip device type file. The response is either SuccessResponse or ErrorResponse.

The following logic applies to these elements:
  macInCert
  macInNonRequestURI
  The two elements are mutually exclusive.
  When both are set to true, the command fails.

Attributes:

device_type (str):

file_format (str):

remote_file_format (str):

file_category (str):

file_customization (str):

file_source (str):

upload_file (Optional[FileResource]):

use_http_digest_authentication (bool):

mac_based_file_authentication (bool):

user_name_password_file_authentication (bool):

bearer_file_authentication (bool):

mac_in_non_request_uri (bool):

mac_in_cert (bool):

mac_format_in_non_request_uri (Optional[str]):

allow_http (bool):

allow_https (bool):

allow_tftp (bool):

enable_caching (bool):

allow_upload_from_device (bool):

default_extended_file_capture_mode (Optional[bool]):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class SystemSIPDeviceTypeFileAddRequest22V2(OCIRequest):
    """Request to add a sip device type file.
        The response is either SuccessResponse or ErrorResponse.

        The following logic applies to these elements:
          macInCert
          macInNonRequestURI
          The two elements are mutually exclusive.
          When both are set to true, the command fails.

    Attributes:

        device_type (str):

        file_format (str):

        remote_file_format (str):

        file_category (str):

        file_customization (str):

        file_source (str):

        upload_file (Optional[FileResource]):

        use_http_digest_authentication (bool):

        mac_based_file_authentication (bool):

        user_name_password_file_authentication (bool):

        bearer_file_authentication (bool):

        mac_in_non_request_uri (bool):

        mac_in_cert (bool):

        mac_format_in_non_request_uri (Optional[str]):

        allow_http (bool):

        allow_https (bool):

        allow_tftp (bool):

        enable_caching (bool):

        allow_upload_from_device (bool):

        default_extended_file_capture_mode (Optional[bool]):

    """

    device_type: str = field(metadata={"alias": "deviceType"})

    file_format: str = field(metadata={"alias": "fileFormat"})

    remote_file_format: str = field(metadata={"alias": "remoteFileFormat"})

    file_category: str = field(metadata={"alias": "fileCategory"})

    file_customization: str = field(metadata={"alias": "fileCustomization"})

    file_source: str = field(metadata={"alias": "fileSource"})

    upload_file: Optional[FileResource] = field(
        default=None, metadata={"alias": "uploadFile"}
    )

    use_http_digest_authentication: bool = field(
        metadata={"alias": "useHttpDigestAuthentication"}
    )

    mac_based_file_authentication: bool = field(
        metadata={"alias": "macBasedFileAuthentication"}
    )

    user_name_password_file_authentication: bool = field(
        metadata={"alias": "userNamePasswordFileAuthentication"}
    )

    bearer_file_authentication: bool = field(
        metadata={"alias": "bearerFileAuthentication"}
    )

    mac_in_non_request_uri: bool = field(metadata={"alias": "macInNonRequestURI"})

    mac_in_cert: bool = field(metadata={"alias": "macInCert"})

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

    allow_http: bool = field(metadata={"alias": "allowHttp"})

    allow_https: bool = field(metadata={"alias": "allowHttps"})

    allow_tftp: bool = field(metadata={"alias": "allowTftp"})

    enable_caching: bool = field(metadata={"alias": "enableCaching"})

    allow_upload_from_device: bool = field(metadata={"alias": "allowUploadFromDevice"})

    default_extended_file_capture_mode: Optional[bool] = field(
        default=None, metadata={"alias": "defaultExtendedFileCaptureMode"}
    )

Responses

Bases: OCIResponse

Source code in src/mercury_ocip_fast/commands/base_command.py
class SuccessResponse(OCIResponse):
    pass

Bases: OCIResponse

Source code in src/mercury_ocip_fast/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip_fast.client import Client
from mercury_ocip_fast.commands import SystemSIPDeviceTypeFileAddRequest22V2

client = Client()

command = SystemSIPDeviceTypeFileAddRequest22V2(
    device_type=...,
    file_format=...,
    remote_file_format=...,
    file_category=...,
    file_customization=...,
    file_source=...,
    upload_file=...,
    use_http_digest_authentication=...,
    mac_based_file_authentication=...,
    user_name_password_file_authentication=...,
    bearer_file_authentication=...,
    mac_in_non_request_uri=...,
    mac_in_cert=...,
    mac_format_in_non_request_uri=...,
    allow_http=...,
    allow_https=...,
    allow_tftp=...,
    enable_caching=...,
    allow_upload_from_device=...,
    default_extended_file_capture_mode=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("SystemSIPDeviceTypeFileAddRequest22V2",
    device_type=...,
    file_format=...,
    remote_file_format=...,
    file_category=...,
    file_customization=...,
    file_source=...,
    upload_file=...,
    use_http_digest_authentication=...,
    mac_based_file_authentication=...,
    user_name_password_file_authentication=...,
    bearer_file_authentication=...,
    mac_in_non_request_uri=...,
    mac_in_cert=...,
    mac_format_in_non_request_uri=...,
    allow_http=...,
    allow_https=...,
    allow_tftp=...,
    enable_caching=...,
    allow_upload_from_device=...,
    default_extended_file_capture_mode=...,
)

print(response)