MyApp

<back to all web services

QueryJobApplicationAttachments

Talent
#![allow(
    dead_code,
    non_camel_case_types,
    non_snake_case,
    clippy::upper_case_acronyms
)]

use serde::{Deserialize, Serialize};
use serde_json::Value;
use servicestack::*;
use std::collections::HashMap;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct JobApplicationAttachment {
    pub id: i32,
    // References(typeof(JobApplication))
    #[serde(rename = "jobApplicationId")]
    pub job_application_id: i32,
    #[serde(rename = "fileName")]
    pub file_name: String,
    #[serde(rename = "filePath")]
    pub file_path: String,
    #[serde(rename = "contentType")]
    pub content_type: String,
    #[serde(rename = "contentLength")]
    pub content_length: i64,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct QueryJobApplicationAttachments {
    #[serde(flatten)]
    pub query_db: QueryDb,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct Todo {
    pub id: i64,
    pub text: String,
    #[serde(rename = "isFinished")]
    pub is_finished: bool,
}

Rust QueryJobApplicationAttachments DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsonl/reply/QueryJobApplicationAttachments HTTP/1.1 
Host: blazor-gallery.servicestack.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0,"skip":0,"take":0,"orderBy":"String","orderByDesc":"String","include":"String","fields":"String","meta":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"offset":0,"total":0,"results":[{"id":0,"jobApplicationId":0,"fileName":"String","filePath":"String","contentType":"String","contentLength":0}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}