#[non_exhaustive]pub struct LogsDecoderProcessor {
pub binary_to_text_encoding: LogsDecoderProcessorBinaryToTextEncoding,
pub input_representation: LogsDecoderProcessorInputRepresentation,
pub is_enabled: Option<bool>,
pub name: Option<String>,
pub source: String,
pub target: String,
pub type_: LogsDecoderProcessorType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The decoder processor decodes any source attribute containing a base64/base16-encoded UTF-8/ASCII string back to its original value, storing the result in a target attribute.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.binary_to_text_encoding: LogsDecoderProcessorBinaryToTextEncoding
The encoding used to represent the binary data.
input_representation: LogsDecoderProcessorInputRepresentation
The original representation of input string.
is_enabled: Option<bool>
Whether the processor is enabled.
name: Option<String>
Name of the processor.
source: String
Name of the log attribute with the encoded data.
target: String
Name of the log attribute that contains the decoded data.
type_: LogsDecoderProcessorType
Type of logs decoder processor.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl LogsDecoderProcessor
impl LogsDecoderProcessor
Sourcepub fn new(
binary_to_text_encoding: LogsDecoderProcessorBinaryToTextEncoding,
input_representation: LogsDecoderProcessorInputRepresentation,
source: String,
target: String,
type_: LogsDecoderProcessorType,
) -> LogsDecoderProcessor
pub fn new( binary_to_text_encoding: LogsDecoderProcessorBinaryToTextEncoding, input_representation: LogsDecoderProcessorInputRepresentation, source: String, target: String, type_: LogsDecoderProcessorType, ) -> LogsDecoderProcessor
Examples found in repository?
examples/v1_logs-pipelines_CreateLogsPipeline_3336967838.rs (lines 17-23)
13async fn main() {
14 let body = LogsPipeline::new("testDecoderProcessor".to_string())
15 .filter(LogsFilter::new().query("source:python".to_string()))
16 .processors(vec![LogsProcessor::LogsDecoderProcessor(Box::new(
17 LogsDecoderProcessor::new(
18 LogsDecoderProcessorBinaryToTextEncoding::BASE16,
19 LogsDecoderProcessorInputRepresentation::UTF_8,
20 "encoded.field".to_string(),
21 "decoded.field".to_string(),
22 LogsDecoderProcessorType::DECODER_PROCESSOR,
23 )
24 .is_enabled(true)
25 .name("test_decoder".to_string()),
26 ))])
27 .tags(vec![]);
28 let configuration = datadog::Configuration::new();
29 let api = LogsPipelinesAPI::with_config(configuration);
30 let resp = api.create_logs_pipeline(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
Sourcepub fn is_enabled(self, value: bool) -> Self
pub fn is_enabled(self, value: bool) -> Self
Examples found in repository?
examples/v1_logs-pipelines_CreateLogsPipeline_3336967838.rs (line 24)
13async fn main() {
14 let body = LogsPipeline::new("testDecoderProcessor".to_string())
15 .filter(LogsFilter::new().query("source:python".to_string()))
16 .processors(vec![LogsProcessor::LogsDecoderProcessor(Box::new(
17 LogsDecoderProcessor::new(
18 LogsDecoderProcessorBinaryToTextEncoding::BASE16,
19 LogsDecoderProcessorInputRepresentation::UTF_8,
20 "encoded.field".to_string(),
21 "decoded.field".to_string(),
22 LogsDecoderProcessorType::DECODER_PROCESSOR,
23 )
24 .is_enabled(true)
25 .name("test_decoder".to_string()),
26 ))])
27 .tags(vec![]);
28 let configuration = datadog::Configuration::new();
29 let api = LogsPipelinesAPI::with_config(configuration);
30 let resp = api.create_logs_pipeline(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
Sourcepub fn name(self, value: String) -> Self
pub fn name(self, value: String) -> Self
Examples found in repository?
examples/v1_logs-pipelines_CreateLogsPipeline_3336967838.rs (line 25)
13async fn main() {
14 let body = LogsPipeline::new("testDecoderProcessor".to_string())
15 .filter(LogsFilter::new().query("source:python".to_string()))
16 .processors(vec![LogsProcessor::LogsDecoderProcessor(Box::new(
17 LogsDecoderProcessor::new(
18 LogsDecoderProcessorBinaryToTextEncoding::BASE16,
19 LogsDecoderProcessorInputRepresentation::UTF_8,
20 "encoded.field".to_string(),
21 "decoded.field".to_string(),
22 LogsDecoderProcessorType::DECODER_PROCESSOR,
23 )
24 .is_enabled(true)
25 .name("test_decoder".to_string()),
26 ))])
27 .tags(vec![]);
28 let configuration = datadog::Configuration::new();
29 let api = LogsPipelinesAPI::with_config(configuration);
30 let resp = api.create_logs_pipeline(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for LogsDecoderProcessor
impl Clone for LogsDecoderProcessor
Source§fn clone(&self) -> LogsDecoderProcessor
fn clone(&self) -> LogsDecoderProcessor
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 LogsDecoderProcessor
impl Debug for LogsDecoderProcessor
Source§impl<'de> Deserialize<'de> for LogsDecoderProcessor
impl<'de> Deserialize<'de> for LogsDecoderProcessor
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
Source§impl PartialEq for LogsDecoderProcessor
impl PartialEq for LogsDecoderProcessor
Source§impl Serialize for LogsDecoderProcessor
impl Serialize for LogsDecoderProcessor
impl StructuralPartialEq for LogsDecoderProcessor
Auto Trait Implementations§
impl Freeze for LogsDecoderProcessor
impl RefUnwindSafe for LogsDecoderProcessor
impl Send for LogsDecoderProcessor
impl Sync for LogsDecoderProcessor
impl Unpin for LogsDecoderProcessor
impl UnwindSafe for LogsDecoderProcessor
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