(g)ULP!
Loading...
Searching...
No Matches
GulpMappingOptions Class Reference
Inheritance diagram for GulpMappingOptions:
Collaboration diagram for GulpMappingOptions:

Public Member Functions

dict to_dict (self)
 

Static Public Member Functions

"GulpMappingOptions" from_dict (dict d)
 

Static Public Attributes

Optional agent_type
 
Optional default_event_code
 
Optional ignore_blanks
 
Optional ignore_unmapped
 
Optional mapping_id
 
dict model_config
 
Optional timestamp_dayfirst
 
Optional timestamp_utc
 
Optional timestamp_yearfirst
 

Detailed Description

GulpMappingOptions defines global options for a mapping (an array of FieldMappingEntry).

Definition at line 7 of file models.py.

Member Function Documentation

◆ from_dict()

"GulpMappingOptions" from_dict ( dict d)
static

Definition at line 74 of file models.py.

74 def from_dict(d: dict) -> "GulpMappingOptions":
75 return GulpMappingOptions(
76 agent_type=d.get("agent_type", None),
77 default_event_code=d.get("default_event_code", None),
78 mapping_id=d.get("mapping_id", None),
79 ignore_blanks=d.get("purge_blanks", True),
80 ignore_unmapped=d.get("ignore_unmapped", False),
81 timestamp_yearfirst=d.get("timestamp_yearfirst", True),
82 timestamp_dayfirst=d.get("timestamp_dayfirst", False),
83 timestamp_utc=d.get("timestamp_utc", True),
84 )
85
86

◆ to_dict()

dict to_dict ( self)

Definition at line 60 of file models.py.

60 def to_dict(self) -> dict:
61 d = {
62 "agent_type": self.agent_type,
63 "mapping_id": self.mapping_id,
64 "default_event_code": self.default_event_code,
65 "purge_blanks": self.ignore_blanks,
66 "ignore_unmapped": self.ignore_unmapped,
67 "timestamp_yearfirst": self.timestamp_yearfirst,
68 "timestamp_dayfirst": self.timestamp_dayfirst,
69 "timestamp_utc": self.timestamp_utc
70 }
71 return d
72

Member Data Documentation

◆ agent_type

Optional agent_type
static
Initial value:
= Field(
None,
description='if set, forces events fot this mapping to have "agent.type" set to this value.',
)

Definition at line 12 of file models.py.

◆ default_event_code

Optional default_event_code
static
Initial value:
= Field(
None,
description='if set, this is the "event_code" to be set for this mapping: this may be overridden by "event_code" in FieldMappingEntry when "is_timestamp": true forces generation of a new event with such "@timestamp" and, possibly, "event.code".',
)

Definition at line 17 of file models.py.

◆ ignore_blanks

Optional ignore_blanks
static
Initial value:
= Field(
True,
description="if True, remove blank (string) fields from the event (default: True).",
)

Definition at line 29 of file models.py.

◆ ignore_unmapped

Optional ignore_unmapped
static
Initial value:
= Field(
False,
description='if True, ignore(=do not set in the output document) unmapped fields. Default is False, if a field does not have a corresponding mapping entry it will be mapped as "gulp.unmapped.fieldname").',
)

Definition at line 21 of file models.py.

◆ mapping_id

Optional mapping_id
static
Initial value:
= Field(
None,
description="mapping identifier, i.e. to select this mapping via GulpPluginParams.",
)

Definition at line 25 of file models.py.

◆ model_config

dict model_config
static
Initial value:
= {
"json_schema_extra": {
"example": {
"agent_type": "my_agent_type",
"default_event_code": "my_event_code",
"mapping_id": "my_mapping_id",
"purge_blanks": True,
"timestamp_yearfirst": True,
"timestamp_dayfirst": False,
"timestamp_utc": True,
}
}
}

Definition at line 46 of file models.py.

◆ timestamp_dayfirst

Optional timestamp_dayfirst
static
Initial value:
= Field(
False,
description="to convert timestamp string, indicating if the day comes first in the timestamp string (default: False).",
)

Definition at line 37 of file models.py.

◆ timestamp_utc

Optional timestamp_utc
static
Initial value:
= Field(
True,
description="to convert timestamp string, indicating if the converted timestamp should be UTC (default: True).",
)

Definition at line 41 of file models.py.

◆ timestamp_yearfirst

Optional timestamp_yearfirst
static
Initial value:
= Field(
True,
description="to convert timestamp string, indicating if the year comes first in the timestamp string (default: True).",
)

Definition at line 33 of file models.py.


The documentation for this class was generated from the following file: