pub enum ApiTransformStep {
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: ApiFilterOp,
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
ApiTransformStep
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/ApiFilterOp"
},
"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 ApiTransformStep
impl Clone for ApiTransformStep
Source§fn clone(&self) -> ApiTransformStep
fn clone(&self) -> ApiTransformStep
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 ApiTransformStep
impl Debug for ApiTransformStep
Source§impl<'de> Deserialize<'de> for ApiTransformStep
impl<'de> Deserialize<'de> for ApiTransformStep
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 ApiTransformStep
impl RefUnwindSafe for ApiTransformStep
impl Send for ApiTransformStep
impl Sync for ApiTransformStep
impl Unpin for ApiTransformStep
impl UnsafeUnpin for ApiTransformStep
impl UnwindSafe for ApiTransformStep
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