def METHOD_NAME(self) -> ComputeResource:
    ssh_key_value = None
    if self.ssh_settings and self.ssh_settings.ssh_private_key_file:
        ssh_key_value = Path(self.ssh_settings.ssh_private_key_file).read_text(encoding=DefaultOpenEncoding.READ)
    credentials = VirtualMachineSshCredentials(
        username=self.ssh_settings.admin_username if self.ssh_settings else None,
        password=self.ssh_settings.admin_password if self.ssh_settings else None,
        public_key_data=self.public_key_data,
        private_key_data=ssh_key_value,
    )
    properties = VirtualMachineSchemaProperties(
        ssh_port=self.ssh_settings.ssh_port, administrator_account=credentials
    )
    vm_compute = VMResource(
        properties=properties,
        resource_id=self.resource_id,
        description=self.description,
    )
    resource = ComputeResource(name=self.name, location=self.location, tags=self.tags, properties=vm_compute)
    return resource