Files
swift-sdk/Sources/Hanzo/Models/O11yO11yLogPipelineOperator.swift
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
The projection these were generated from predated the compute migration, so
they described /v1/visor — which the API serves at zero paths now.

No /v1/visor path survives here.
2026-09-05 18:55:38 -07:00

179 lines
7.8 KiB
Swift

//
// O11yO11yLogPipelineOperator.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct O11yO11yLogPipelineOperator: Sendable, Codable, ParameterConvertible, Hashable {
/** Default is the id of the processor a router falls through to. */
public var _default: String?
/** EnableFlattening flattens parsed JSON one level when true. */
public var enableFlattening: Bool?
/** EnablePaths keeps the JSON path in flattened keys when true. */
public var enablePaths: Bool?
/** Enabled turns the processor on. */
public var enabled: Bool?
/** Expr is a router route's expression. */
public var expr: String?
/** Field is the field an add/remove processor works on. */
public var field: String?
/** Fields are the fields a retain processor keeps. */
public var fields: [String]?
/** From is the source field of a move or copy. */
public var from: String?
/** ID is the processor's id, unique within the pipeline. */
public var id: String?
/** If gates the processor on an expression. */
public var _if: String?
/** Layout is a time parser's layout. */
public var layout: String?
/** LayoutType is the layout's kind, e.g. strptime, gotime, epoch. */
public var layoutType: String?
/** Mapping maps severity levels (or flattened keys) to the values that mean them. */
public var mapping: [String: [String]]?
/** Name is the processor's display name. */
public var name: String?
/** OnError says what to do when the processor fails, e.g. send, drop. */
public var onError: String?
/** OrderID is the processor's 1-based position in the pipeline. */
public var orderId: Int64?
/** Output is the id of the processor that runs next. */
public var output: String?
/** OverwriteSeverityText rewrites the severity text alongside the number when true. */
public var overwriteText: Bool?
/** ParseFrom is where a parser reads from. */
public var parseFrom: String?
/** ParseTo is where a parser writes its result. */
public var parseTo: String?
/** PathPrefix prefixes flattened keys. */
public var pathPrefix: String?
/** Pattern is a grok parser's pattern. */
public var pattern: String?
/** Regex is a regex parser's expression. */
public var regex: String?
/** Routes are a router processor's routes. */
public var routes: [O11yO11yLogPipelineRoute]?
/** SpanID says where a trace parser reads the span id from. */
public var spanId: O11yO11yLogParseFrom?
/** To is the destination field of a move or copy. */
public var to: String?
/** TraceFlags says where a trace parser reads the trace flags from. */
public var traceFlags: O11yO11yLogParseFrom?
/** TraceID says where a trace parser reads the trace id from. */
public var traceId: O11yO11yLogParseFrom?
/** Type is the processor type, e.g. grok_parser, regex_parser, json_parser, trace_parser, time_parser, severity_parser, add, remove, move, copy. */
public var type: String?
/** Value is the value an add processor writes. */
public var value: String?
public init(_default: String? = nil, enableFlattening: Bool? = nil, enablePaths: Bool? = nil, enabled: Bool? = nil, expr: String? = nil, field: String? = nil, fields: [String]? = nil, from: String? = nil, id: String? = nil, _if: String? = nil, layout: String? = nil, layoutType: String? = nil, mapping: [String: [String]]? = nil, name: String? = nil, onError: String? = nil, orderId: Int64? = nil, output: String? = nil, overwriteText: Bool? = nil, parseFrom: String? = nil, parseTo: String? = nil, pathPrefix: String? = nil, pattern: String? = nil, regex: String? = nil, routes: [O11yO11yLogPipelineRoute]? = nil, spanId: O11yO11yLogParseFrom? = nil, to: String? = nil, traceFlags: O11yO11yLogParseFrom? = nil, traceId: O11yO11yLogParseFrom? = nil, type: String? = nil, value: String? = nil) {
self._default = _default
self.enableFlattening = enableFlattening
self.enablePaths = enablePaths
self.enabled = enabled
self.expr = expr
self.field = field
self.fields = fields
self.from = from
self.id = id
self._if = _if
self.layout = layout
self.layoutType = layoutType
self.mapping = mapping
self.name = name
self.onError = onError
self.orderId = orderId
self.output = output
self.overwriteText = overwriteText
self.parseFrom = parseFrom
self.parseTo = parseTo
self.pathPrefix = pathPrefix
self.pattern = pattern
self.regex = regex
self.routes = routes
self.spanId = spanId
self.to = to
self.traceFlags = traceFlags
self.traceId = traceId
self.type = type
self.value = value
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case _default = "default"
case enableFlattening = "enable_flattening"
case enablePaths = "enable_paths"
case enabled
case expr
case field
case fields
case from
case id
case _if = "if"
case layout
case layoutType = "layout_type"
case mapping
case name
case onError = "on_error"
case orderId
case output
case overwriteText = "overwrite_text"
case parseFrom = "parse_from"
case parseTo = "parse_to"
case pathPrefix = "path_prefix"
case pattern
case regex
case routes
case spanId = "span_id"
case to
case traceFlags = "trace_flags"
case traceId = "trace_id"
case type
case value
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(_default, forKey: ._default)
try container.encodeIfPresent(enableFlattening, forKey: .enableFlattening)
try container.encodeIfPresent(enablePaths, forKey: .enablePaths)
try container.encodeIfPresent(enabled, forKey: .enabled)
try container.encodeIfPresent(expr, forKey: .expr)
try container.encodeIfPresent(field, forKey: .field)
try container.encodeIfPresent(fields, forKey: .fields)
try container.encodeIfPresent(from, forKey: .from)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(_if, forKey: ._if)
try container.encodeIfPresent(layout, forKey: .layout)
try container.encodeIfPresent(layoutType, forKey: .layoutType)
try container.encodeIfPresent(mapping, forKey: .mapping)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(onError, forKey: .onError)
try container.encodeIfPresent(orderId, forKey: .orderId)
try container.encodeIfPresent(output, forKey: .output)
try container.encodeIfPresent(overwriteText, forKey: .overwriteText)
try container.encodeIfPresent(parseFrom, forKey: .parseFrom)
try container.encodeIfPresent(parseTo, forKey: .parseTo)
try container.encodeIfPresent(pathPrefix, forKey: .pathPrefix)
try container.encodeIfPresent(pattern, forKey: .pattern)
try container.encodeIfPresent(regex, forKey: .regex)
try container.encodeIfPresent(routes, forKey: .routes)
try container.encodeIfPresent(spanId, forKey: .spanId)
try container.encodeIfPresent(to, forKey: .to)
try container.encodeIfPresent(traceFlags, forKey: .traceFlags)
try container.encodeIfPresent(traceId, forKey: .traceId)
try container.encodeIfPresent(type, forKey: .type)
try container.encodeIfPresent(value, forKey: .value)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension O11yO11yLogPipelineOperator: Identifiable {}