|
| 1 | +=begin |
| 2 | +#Datadog API V2 Collection |
| 3 | +
|
| 4 | +#Collection of all Datadog Public endpoints. |
| 5 | +
|
| 6 | +The version of the OpenAPI document: 1.0 |
| 7 | + |
| 8 | +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator |
| 9 | +
|
| 10 | + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 11 | + This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 12 | + Copyright 2020-Present Datadog, Inc. |
| 13 | +
|
| 14 | +=end |
| 15 | + |
| 16 | +require 'date' |
| 17 | +require 'time' |
| 18 | + |
| 19 | +module DatadogAPIClient::V2 |
| 20 | + # The `crowdstrike_next_gen_siem` destination forwards logs to CrowdStrike Next Gen SIEM. |
| 21 | + class ObservabilityPipelineCrowdStrikeNextGenSiemDestination |
| 22 | + include BaseGenericModel |
| 23 | + |
| 24 | + # Compression configuration for log events. |
| 25 | + attr_accessor :compression |
| 26 | + |
| 27 | + # Encoding format for log events. |
| 28 | + attr_reader :encoding |
| 29 | + |
| 30 | + # The unique identifier for this component. |
| 31 | + attr_reader :id |
| 32 | + |
| 33 | + # A list of component IDs whose output is used as the `input` for this component. |
| 34 | + attr_reader :inputs |
| 35 | + |
| 36 | + # Configuration for enabling TLS encryption between the pipeline component and external services. |
| 37 | + attr_accessor :tls |
| 38 | + |
| 39 | + # The destination type. The value should always be `crowdstrike_next_gen_siem`. |
| 40 | + attr_reader :type |
| 41 | + |
| 42 | + attr_accessor :additional_properties |
| 43 | + |
| 44 | + # Attribute mapping from ruby-style variable name to JSON key. |
| 45 | + # @!visibility private |
| 46 | + def self.attribute_map |
| 47 | + { |
| 48 | + :'compression' => :'compression', |
| 49 | + :'encoding' => :'encoding', |
| 50 | + :'id' => :'id', |
| 51 | + :'inputs' => :'inputs', |
| 52 | + :'tls' => :'tls', |
| 53 | + :'type' => :'type' |
| 54 | + } |
| 55 | + end |
| 56 | + |
| 57 | + # Attribute type mapping. |
| 58 | + # @!visibility private |
| 59 | + def self.openapi_types |
| 60 | + { |
| 61 | + :'compression' => :'ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression', |
| 62 | + :'encoding' => :'ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding', |
| 63 | + :'id' => :'String', |
| 64 | + :'inputs' => :'Array<String>', |
| 65 | + :'tls' => :'ObservabilityPipelineTls', |
| 66 | + :'type' => :'ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType' |
| 67 | + } |
| 68 | + end |
| 69 | + |
| 70 | + # Initializes the object |
| 71 | + # @param attributes [Hash] Model attributes in the form of hash |
| 72 | + # @!visibility private |
| 73 | + def initialize(attributes = {}) |
| 74 | + if (!attributes.is_a?(Hash)) |
| 75 | + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineCrowdStrikeNextGenSiemDestination` initialize method" |
| 76 | + end |
| 77 | + |
| 78 | + self.additional_properties = {} |
| 79 | + # check to see if the attribute exists and convert string to symbol for hash key |
| 80 | + attributes = attributes.each_with_object({}) { |(k, v), h| |
| 81 | + if (!self.class.attribute_map.key?(k.to_sym)) |
| 82 | + self.additional_properties[k.to_sym] = v |
| 83 | + else |
| 84 | + h[k.to_sym] = v |
| 85 | + end |
| 86 | + } |
| 87 | + |
| 88 | + if attributes.key?(:'compression') |
| 89 | + self.compression = attributes[:'compression'] |
| 90 | + end |
| 91 | + |
| 92 | + if attributes.key?(:'encoding') |
| 93 | + self.encoding = attributes[:'encoding'] |
| 94 | + end |
| 95 | + |
| 96 | + if attributes.key?(:'id') |
| 97 | + self.id = attributes[:'id'] |
| 98 | + end |
| 99 | + |
| 100 | + if attributes.key?(:'inputs') |
| 101 | + if (value = attributes[:'inputs']).is_a?(Array) |
| 102 | + self.inputs = value |
| 103 | + end |
| 104 | + end |
| 105 | + |
| 106 | + if attributes.key?(:'tls') |
| 107 | + self.tls = attributes[:'tls'] |
| 108 | + end |
| 109 | + |
| 110 | + if attributes.key?(:'type') |
| 111 | + self.type = attributes[:'type'] |
| 112 | + end |
| 113 | + end |
| 114 | + |
| 115 | + # Check to see if the all the properties in the model are valid |
| 116 | + # @return true if the model is valid |
| 117 | + # @!visibility private |
| 118 | + def valid? |
| 119 | + return false if @encoding.nil? |
| 120 | + return false if @id.nil? |
| 121 | + return false if @inputs.nil? |
| 122 | + return false if @type.nil? |
| 123 | + true |
| 124 | + end |
| 125 | + |
| 126 | + # Custom attribute writer method with validation |
| 127 | + # @param encoding [Object] Object to be assigned |
| 128 | + # @!visibility private |
| 129 | + def encoding=(encoding) |
| 130 | + if encoding.nil? |
| 131 | + fail ArgumentError, 'invalid value for "encoding", encoding cannot be nil.' |
| 132 | + end |
| 133 | + @encoding = encoding |
| 134 | + end |
| 135 | + |
| 136 | + # Custom attribute writer method with validation |
| 137 | + # @param id [Object] Object to be assigned |
| 138 | + # @!visibility private |
| 139 | + def id=(id) |
| 140 | + if id.nil? |
| 141 | + fail ArgumentError, 'invalid value for "id", id cannot be nil.' |
| 142 | + end |
| 143 | + @id = id |
| 144 | + end |
| 145 | + |
| 146 | + # Custom attribute writer method with validation |
| 147 | + # @param inputs [Object] Object to be assigned |
| 148 | + # @!visibility private |
| 149 | + def inputs=(inputs) |
| 150 | + if inputs.nil? |
| 151 | + fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' |
| 152 | + end |
| 153 | + @inputs = inputs |
| 154 | + end |
| 155 | + |
| 156 | + # Custom attribute writer method with validation |
| 157 | + # @param type [Object] Object to be assigned |
| 158 | + # @!visibility private |
| 159 | + def type=(type) |
| 160 | + if type.nil? |
| 161 | + fail ArgumentError, 'invalid value for "type", type cannot be nil.' |
| 162 | + end |
| 163 | + @type = type |
| 164 | + end |
| 165 | + |
| 166 | + # Returns the object in the form of hash, with additionalProperties support. |
| 167 | + # @return [Hash] Returns the object in the form of hash |
| 168 | + # @!visibility private |
| 169 | + def to_hash |
| 170 | + hash = {} |
| 171 | + self.class.attribute_map.each_pair do |attr, param| |
| 172 | + value = self.send(attr) |
| 173 | + if value.nil? |
| 174 | + is_nullable = self.class.openapi_nullable.include?(attr) |
| 175 | + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) |
| 176 | + end |
| 177 | + |
| 178 | + hash[param] = _to_hash(value) |
| 179 | + end |
| 180 | + self.additional_properties.each_pair do |attr, value| |
| 181 | + hash[attr] = value |
| 182 | + end |
| 183 | + hash |
| 184 | + end |
| 185 | + |
| 186 | + # Checks equality by comparing each attribute. |
| 187 | + # @param o [Object] Object to be compared |
| 188 | + # @!visibility private |
| 189 | + def ==(o) |
| 190 | + return true if self.equal?(o) |
| 191 | + self.class == o.class && |
| 192 | + compression == o.compression && |
| 193 | + encoding == o.encoding && |
| 194 | + id == o.id && |
| 195 | + inputs == o.inputs && |
| 196 | + tls == o.tls && |
| 197 | + type == o.type && |
| 198 | + additional_properties == o.additional_properties |
| 199 | + end |
| 200 | + |
| 201 | + # Calculates hash code according to all attributes. |
| 202 | + # @return [Integer] Hash code |
| 203 | + # @!visibility private |
| 204 | + def hash |
| 205 | + [compression, encoding, id, inputs, tls, type, additional_properties].hash |
| 206 | + end |
| 207 | + end |
| 208 | +end |
0 commit comments