pub enum ApiTransformStepDef {
Show 15 variants
Rename {
from: String,
to: String,
},
Set {
field: String,
value: Value,
},
Upper {
field: String,
},
Lower {
field: String,
},
Remove {
field: String,
},
Copy {
from: String,
to: String,
},
Default {
field: String,
value: Value,
},
Filter {
field: String,
op: ApiFilterOpDef,
value: Option<Value>,
},
MapValue {
field: String,
mapping: Map<String, Value>,
},
Truncate {
field: String,
max_len: u64,
},
Nest {
fields: Vec<String>,
into: String,
},
Flatten {
field: String,
},
Hash {
field: String,
},
Coalesce {
fields: Vec<String>,
into: String,
},
SchemaFilter {
allow: Option<Vec<String>>,
deny: Option<Vec<String>>,
field: String,
},
}Expand description
ApiTransformStepDef
JSON schema
{
"oneOf": [
{
"type": "object",
"required": [
"from",
"to",
"type"
],
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"rename"
]
}
}
},
{
"type": "object",
"required": [
"field",
"type",
"value"
],
"properties": {
"field": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"set"
]
},
"value": {}
}
},
{
"type": "object",
"required": [
"field",
"type"
],
"properties": {
"field": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"upper"
]
}
}
},
{
"type": "object",
"required": [
"field",
"type"
],
"properties": {
"field": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"lower"
]
}
}
},
{
"type": "object",
"required": [
"field",
"type"
],
"properties": {
"field": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"remove"
]
}
}
},
{
"type": "object",
"required": [
"from",
"to",
"type"
],
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"copy"
]
}
}
},
{
"type": "object",
"required": [
"field",
"type",
"value"
],
"properties": {
"field": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"default"
]
},
"value": {}
}
},
{
"type": "object",
"required": [
"field",
"op",
"type"
],
"properties": {
"field": {
"type": "string"
},
"op": {
"$ref": "#/components/schemas/ApiFilterOpDef"
},
"type": {
"type": "string",
"enum": [
"filter"
]
},
"value": {}
}
},
{
"type": "object",
"required": [
"field",
"mapping",
"type"
],
"properties": {
"field": {
"type": "string"
},
"mapping": {
"type": "object",
"additionalProperties": {}
},
"type": {
"type": "string",
"enum": [
"map_value"
]
}
}
},
{
"type": "object",
"required": [
"field",
"max_len",
"type"
],
"properties": {
"field": {
"type": "string"
},
"max_len": {
"type": "integer",
"minimum": 0.0
},
"type": {
"type": "string",
"enum": [
"truncate"
]
}
}
},
{
"type": "object",
"required": [
"fields",
"into",
"type"
],
"properties": {
"fields": {
"type": "array",
"items": {
"type": "string"
}
},
"into": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"nest"
]
}
}
},
{
"type": "object",
"required": [
"field",
"type"
],
"properties": {
"field": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"flatten"
]
}
}
},
{
"type": "object",
"required": [
"field",
"type"
],
"properties": {
"field": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"hash"
]
}
}
},
{
"type": "object",
"required": [
"fields",
"into",
"type"
],
"properties": {
"fields": {
"type": "array",
"items": {
"type": "string"
}
},
"into": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"coalesce"
]
}
}
},
{
"type": "object",
"required": [
"field",
"type"
],
"properties": {
"allow": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"deny": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"field": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"schema_filter"
]
}
}
}
]
}Variants§
Rename
Set
Upper
Lower
Remove
Copy
Default
Filter
MapValue
Truncate
Nest
Flatten
Hash
Coalesce
SchemaFilter
Trait Implementations§
Source§impl Clone for ApiTransformStepDef
impl Clone for ApiTransformStepDef
Source§fn clone(&self) -> ApiTransformStepDef
fn clone(&self) -> ApiTransformStepDef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiTransformStepDef
impl Debug for ApiTransformStepDef
Source§impl<'de> Deserialize<'de> for ApiTransformStepDef
impl<'de> Deserialize<'de> for ApiTransformStepDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ApiTransformStepDef
impl RefUnwindSafe for ApiTransformStepDef
impl Send for ApiTransformStepDef
impl Sync for ApiTransformStepDef
impl Unpin for ApiTransformStepDef
impl UnsafeUnpin for ApiTransformStepDef
impl UnwindSafe for ApiTransformStepDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more