|
| 1 | +=begin |
| 2 | +#Datadog API V1 Collection |
| 3 | +
|
| 4 | +#Collection of all Datadog Public endpoints. |
| 5 | +
|
| 6 | +The version of the OpenAPI document: 1.0 |
| 7 | +Contact: support@datadoghq.com |
| 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::V1 |
| 20 | + # Object containing details about your Synthetic test, without test steps. |
| 21 | + class SyntheticsTestDetailsWithoutSteps |
| 22 | + include BaseGenericModel |
| 23 | + |
| 24 | + # Configuration object for a Synthetic test. |
| 25 | + attr_accessor :config |
| 26 | + |
| 27 | + # Object describing the creator of the shared element. |
| 28 | + attr_accessor :creator |
| 29 | + |
| 30 | + # Array of locations used to run the test. |
| 31 | + attr_accessor :locations |
| 32 | + |
| 33 | + # Notification message associated with the test. |
| 34 | + attr_accessor :message |
| 35 | + |
| 36 | + # The associated monitor ID. |
| 37 | + attr_accessor :monitor_id |
| 38 | + |
| 39 | + # Name of the test. |
| 40 | + attr_accessor :name |
| 41 | + |
| 42 | + # Object describing the extra options for a Synthetic test. |
| 43 | + attr_accessor :options |
| 44 | + |
| 45 | + # The test public ID. |
| 46 | + attr_accessor :public_id |
| 47 | + |
| 48 | + # Define whether you want to start (`live`) or pause (`paused`) a |
| 49 | + # Synthetic test. |
| 50 | + attr_accessor :status |
| 51 | + |
| 52 | + # The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, |
| 53 | + # `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. |
| 54 | + attr_accessor :subtype |
| 55 | + |
| 56 | + # Array of tags attached to the test. |
| 57 | + attr_accessor :tags |
| 58 | + |
| 59 | + # Type of the Synthetic test, either `api` or `browser`. |
| 60 | + attr_accessor :type |
| 61 | + |
| 62 | + attr_accessor :additional_properties |
| 63 | + |
| 64 | + # Attribute mapping from ruby-style variable name to JSON key. |
| 65 | + # @!visibility private |
| 66 | + def self.attribute_map |
| 67 | + { |
| 68 | + :'config' => :'config', |
| 69 | + :'creator' => :'creator', |
| 70 | + :'locations' => :'locations', |
| 71 | + :'message' => :'message', |
| 72 | + :'monitor_id' => :'monitor_id', |
| 73 | + :'name' => :'name', |
| 74 | + :'options' => :'options', |
| 75 | + :'public_id' => :'public_id', |
| 76 | + :'status' => :'status', |
| 77 | + :'subtype' => :'subtype', |
| 78 | + :'tags' => :'tags', |
| 79 | + :'type' => :'type' |
| 80 | + } |
| 81 | + end |
| 82 | + |
| 83 | + # Attribute type mapping. |
| 84 | + # @!visibility private |
| 85 | + def self.openapi_types |
| 86 | + { |
| 87 | + :'config' => :'SyntheticsTestConfig', |
| 88 | + :'creator' => :'Creator', |
| 89 | + :'locations' => :'Array<String>', |
| 90 | + :'message' => :'String', |
| 91 | + :'monitor_id' => :'Integer', |
| 92 | + :'name' => :'String', |
| 93 | + :'options' => :'SyntheticsTestOptions', |
| 94 | + :'public_id' => :'String', |
| 95 | + :'status' => :'SyntheticsTestPauseStatus', |
| 96 | + :'subtype' => :'SyntheticsTestDetailsSubType', |
| 97 | + :'tags' => :'Array<String>', |
| 98 | + :'type' => :'SyntheticsTestDetailsType' |
| 99 | + } |
| 100 | + end |
| 101 | + |
| 102 | + # Initializes the object |
| 103 | + # @param attributes [Hash] Model attributes in the form of hash |
| 104 | + # @!visibility private |
| 105 | + def initialize(attributes = {}) |
| 106 | + if (!attributes.is_a?(Hash)) |
| 107 | + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestDetailsWithoutSteps` initialize method" |
| 108 | + end |
| 109 | + |
| 110 | + self.additional_properties = {} |
| 111 | + # check to see if the attribute exists and convert string to symbol for hash key |
| 112 | + attributes = attributes.each_with_object({}) { |(k, v), h| |
| 113 | + if (!self.class.attribute_map.key?(k.to_sym)) |
| 114 | + self.additional_properties[k.to_sym] = v |
| 115 | + else |
| 116 | + h[k.to_sym] = v |
| 117 | + end |
| 118 | + } |
| 119 | + |
| 120 | + if attributes.key?(:'config') |
| 121 | + self.config = attributes[:'config'] |
| 122 | + end |
| 123 | + |
| 124 | + if attributes.key?(:'creator') |
| 125 | + self.creator = attributes[:'creator'] |
| 126 | + end |
| 127 | + |
| 128 | + if attributes.key?(:'locations') |
| 129 | + if (value = attributes[:'locations']).is_a?(Array) |
| 130 | + self.locations = value |
| 131 | + end |
| 132 | + end |
| 133 | + |
| 134 | + if attributes.key?(:'message') |
| 135 | + self.message = attributes[:'message'] |
| 136 | + end |
| 137 | + |
| 138 | + if attributes.key?(:'monitor_id') |
| 139 | + self.monitor_id = attributes[:'monitor_id'] |
| 140 | + end |
| 141 | + |
| 142 | + if attributes.key?(:'name') |
| 143 | + self.name = attributes[:'name'] |
| 144 | + end |
| 145 | + |
| 146 | + if attributes.key?(:'options') |
| 147 | + self.options = attributes[:'options'] |
| 148 | + end |
| 149 | + |
| 150 | + if attributes.key?(:'public_id') |
| 151 | + self.public_id = attributes[:'public_id'] |
| 152 | + end |
| 153 | + |
| 154 | + if attributes.key?(:'status') |
| 155 | + self.status = attributes[:'status'] |
| 156 | + end |
| 157 | + |
| 158 | + if attributes.key?(:'subtype') |
| 159 | + self.subtype = attributes[:'subtype'] |
| 160 | + end |
| 161 | + |
| 162 | + if attributes.key?(:'tags') |
| 163 | + if (value = attributes[:'tags']).is_a?(Array) |
| 164 | + self.tags = value |
| 165 | + end |
| 166 | + end |
| 167 | + |
| 168 | + if attributes.key?(:'type') |
| 169 | + self.type = attributes[:'type'] |
| 170 | + end |
| 171 | + end |
| 172 | + |
| 173 | + # Returns the object in the form of hash, with additionalProperties support. |
| 174 | + # @return [Hash] Returns the object in the form of hash |
| 175 | + # @!visibility private |
| 176 | + def to_hash |
| 177 | + hash = {} |
| 178 | + self.class.attribute_map.each_pair do |attr, param| |
| 179 | + value = self.send(attr) |
| 180 | + if value.nil? |
| 181 | + is_nullable = self.class.openapi_nullable.include?(attr) |
| 182 | + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) |
| 183 | + end |
| 184 | + |
| 185 | + hash[param] = _to_hash(value) |
| 186 | + end |
| 187 | + self.additional_properties.each_pair do |attr, value| |
| 188 | + hash[attr] = value |
| 189 | + end |
| 190 | + hash |
| 191 | + end |
| 192 | + |
| 193 | + # Checks equality by comparing each attribute. |
| 194 | + # @param o [Object] Object to be compared |
| 195 | + # @!visibility private |
| 196 | + def ==(o) |
| 197 | + return true if self.equal?(o) |
| 198 | + self.class == o.class && |
| 199 | + config == o.config && |
| 200 | + creator == o.creator && |
| 201 | + locations == o.locations && |
| 202 | + message == o.message && |
| 203 | + monitor_id == o.monitor_id && |
| 204 | + name == o.name && |
| 205 | + options == o.options && |
| 206 | + public_id == o.public_id && |
| 207 | + status == o.status && |
| 208 | + subtype == o.subtype && |
| 209 | + tags == o.tags && |
| 210 | + type == o.type && |
| 211 | + additional_properties == o.additional_properties |
| 212 | + end |
| 213 | + |
| 214 | + # Calculates hash code according to all attributes. |
| 215 | + # @return [Integer] Hash code |
| 216 | + # @!visibility private |
| 217 | + def hash |
| 218 | + [config, creator, locations, message, monitor_id, name, options, public_id, status, subtype, tags, type, additional_properties].hash |
| 219 | + end |
| 220 | + end |
| 221 | +end |
0 commit comments