Class: DatadogAPIClient::V1::SyntheticsAPITest

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v1/models/synthetics_api_test.rb

Overview

Object containing details about a Synthetic API test.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SyntheticsAPITest

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    attributes Model attributes in the form of hash



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 105

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAPITest` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAPITest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'config')
    self.config = attributes[:'config']
  end

  if attributes.key?(:'locations')
    if (value = attributes[:'locations']).is_a?(Array)
      self.locations = value
    end
  end

  if attributes.key?(:'message')
    self.message = attributes[:'message']
  end

  if attributes.key?(:'monitor_id')
    self.monitor_id = attributes[:'monitor_id']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'options')
    self.options = attributes[:'options']
  end

  if attributes.key?(:'public_id')
    self.public_id = attributes[:'public_id']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'subtype')
    self.subtype = attributes[:'subtype']
  end

  if attributes.key?(:'tags')
    if (value = attributes[:'tags']).is_a?(Array)
      self.tags = value
    end
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  else
    self.type = 'api'
  end
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



26
27
28
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 26

def config
  @config
end

#locationsObject

Array of locations used to run the test.



29
30
31
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 29

def locations
  @locations
end

#messageObject

Notification message associated with the test.



32
33
34
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 32

def message
  @message
end

#monitor_idObject

The associated monitor ID.



35
36
37
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 35

def monitor_id
  @monitor_id
end

#nameObject

Name of the test.



38
39
40
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 38

def name
  @name
end

#optionsObject

Returns the value of attribute options.



40
41
42
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 40

def options
  @options
end

#public_idObject

The public ID for the test.



43
44
45
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 43

def public_id
  @public_id
end

#statusObject

Returns the value of attribute status.



45
46
47
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 45

def status
  @status
end

#subtypeObject

Returns the value of attribute subtype.



47
48
49
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 47

def subtype
  @subtype
end

#tagsObject

Array of tags attached to the test.



50
51
52
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 50

def tags
  @tags
end

#typeObject

Returns the value of attribute type.



52
53
54
# File 'lib/datadog_api_client/v1/models/synthetics_api_test.rb', line 52

def type
  @type
end