Class: DatadogAPIClient::V1::WebhooksIntegrationUpdateRequest

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

Overview

Update request of a Webhooks integration object. *All properties are optional.*

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ WebhooksIntegrationUpdateRequest

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb', line 80

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WebhooksIntegrationUpdateRequest` 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::WebhooksIntegrationUpdateRequest`. 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?(:'custom_headers')
    self.custom_headers = attributes[:'custom_headers']
  end

  if attributes.key?(:'encode_as')
    self.encode_as = attributes[:'encode_as']
  else
    self.encode_as = 'json'
  end

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

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

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

Instance Attribute Details

#custom_headersObject

If ‘null`, uses no header. If given a JSON payload, these will be headers attached to your webhook.



27
28
29
# File 'lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb', line 27

def custom_headers
  @custom_headers
end

#encode_asObject

Returns the value of attribute encode_as.



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

def encode_as
  @encode_as
end

#nameObject

The name of the webhook. It corresponds with ‘<WEBHOOK_NAME>`. Learn more on how to use it in [monitor notifications](docs.datadoghq.com/monitors/notify).



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

def name
  @name
end

#payloadObject

If ‘null`, uses the default payload. If given a JSON payload, the webhook returns the payload specified by the given payload. [Webhooks variable usage](docs.datadoghq.com/integrations/webhooks/#usage).



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

def payload
  @payload
end

#urlObject

URL of the webhook.



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

def url
  @url
end