Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30324,6 +30324,7 @@ components:
- $ref: '#/components/schemas/ObservabilityPipelineSocketDestination'
- $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination'
- $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination'
- $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestination'
ObservabilityPipelineConfigProcessorItem:
description: A processor for the pipeline.
oneOf:
Expand Down Expand Up @@ -31385,6 +31386,65 @@ components:
type: string
x-enum-varnames:
- GOOGLE_CLOUD_STORAGE
ObservabilityPipelineGooglePubSubDestination:
description: The `google_pubsub` destination publishes logs to a Google Cloud
Pub/Sub topic.
properties:
auth:
$ref: '#/components/schemas/ObservabilityPipelineGcpAuth'
encoding:
$ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestinationEncoding'
id:
description: The unique identifier for this component.
example: google-pubsub-destination
type: string
inputs:
description: A list of component IDs whose output is used as the `input`
for this component.
example:
- filter-processor
items:
type: string
type: array
project:
description: The GCP project ID that owns the Pub/Sub topic.
example: my-gcp-project
type: string
tls:
$ref: '#/components/schemas/ObservabilityPipelineTls'
topic:
description: The Pub/Sub topic name to publish logs to.
example: logs-subscription
type: string
type:
$ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestinationType'
required:
- id
- type
- inputs
- encoding
- project
- topic
type: object
ObservabilityPipelineGooglePubSubDestinationEncoding:
description: Encoding format for log events.
enum:
- json
- raw_message
example: json
type: string
x-enum-varnames:
- JSON
- RAW_MESSAGE
ObservabilityPipelineGooglePubSubDestinationType:
default: google_pubsub
description: The destination type. The value should always be `google_pubsub`.
enum:
- google_pubsub
example: google_pubsub
type: string
x-enum-varnames:
- GOOGLE_PUBSUB
ObservabilityPipelineGooglePubSubSource:
description: The `google_pubsub` source ingests logs from a Google Cloud Pub/Sub
subscription.
Expand Down
3 changes: 3 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2866,6 +2866,9 @@ def overrides
"v2.observability_pipeline_google_cloud_storage_destination_acl" => "ObservabilityPipelineGoogleCloudStorageDestinationAcl",
"v2.observability_pipeline_google_cloud_storage_destination_storage_class" => "ObservabilityPipelineGoogleCloudStorageDestinationStorageClass",
"v2.observability_pipeline_google_cloud_storage_destination_type" => "ObservabilityPipelineGoogleCloudStorageDestinationType",
"v2.observability_pipeline_google_pub_sub_destination" => "ObservabilityPipelineGooglePubSubDestination",
"v2.observability_pipeline_google_pub_sub_destination_encoding" => "ObservabilityPipelineGooglePubSubDestinationEncoding",
"v2.observability_pipeline_google_pub_sub_destination_type" => "ObservabilityPipelineGooglePubSubDestinationType",
"v2.observability_pipeline_google_pub_sub_source" => "ObservabilityPipelineGooglePubSubSource",
"v2.observability_pipeline_google_pub_sub_source_type" => "ObservabilityPipelineGooglePubSubSourceType",
"v2.observability_pipeline_http_client_source" => "ObservabilityPipelineHttpClientSource",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def openapi_one_of
:'ObservabilityPipelineAmazonOpenSearchDestination',
:'ObservabilityPipelineSocketDestination',
:'ObservabilityPipelineAmazonSecurityLakeDestination',
:'ObservabilityPipelineCrowdStrikeNextGenSiemDestination'
:'ObservabilityPipelineCrowdStrikeNextGenSiemDestination',
:'ObservabilityPipelineGooglePubSubDestination'
]
end
# Builds the object
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: [email protected]
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V2
# The `google_pubsub` destination publishes logs to a Google Cloud Pub/Sub topic.
class ObservabilityPipelineGooglePubSubDestination
include BaseGenericModel

# GCP credentials used to authenticate with Google Cloud Storage.
#
attr_accessor :auth

# Encoding format for log events.
attr_reader :encoding

# The unique identifier for this component.
attr_reader :id

# A list of component IDs whose output is used as the `input` for this component.
attr_reader :inputs

# The GCP project ID that owns the Pub/Sub topic.
attr_reader :project

# Configuration for enabling TLS encryption between the pipeline component and external services.
attr_accessor :tls

# The Pub/Sub topic name to publish logs to.
attr_reader :topic

# The destination type. The value should always be `google_pubsub`.
attr_reader :type

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'auth' => :'auth',
:'encoding' => :'encoding',
:'id' => :'id',
:'inputs' => :'inputs',
:'project' => :'project',
:'tls' => :'tls',
:'topic' => :'topic',
:'type' => :'type'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'auth' => :'ObservabilityPipelineGcpAuth',
:'encoding' => :'ObservabilityPipelineGooglePubSubDestinationEncoding',
:'id' => :'String',
:'inputs' => :'Array<String>',
:'project' => :'String',
:'tls' => :'ObservabilityPipelineTls',
:'topic' => :'String',
:'type' => :'ObservabilityPipelineGooglePubSubDestinationType'
}
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineGooglePubSubDestination` initialize method"
end

self.additional_properties = {}
# 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))
self.additional_properties[k.to_sym] = v
else
h[k.to_sym] = v
end
}

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

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

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

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

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

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

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

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

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
# @!visibility private
def valid?
return false if @encoding.nil?
return false if @id.nil?
return false if @inputs.nil?
return false if @project.nil?
return false if @topic.nil?
return false if @type.nil?
true
end

# Custom attribute writer method with validation
# @param encoding [Object] Object to be assigned
# @!visibility private
def encoding=(encoding)
if encoding.nil?
fail ArgumentError, 'invalid value for "encoding", encoding cannot be nil.'
end
@encoding = encoding
end

# Custom attribute writer method with validation
# @param id [Object] Object to be assigned
# @!visibility private
def id=(id)
if id.nil?
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
end
@id = id
end

# Custom attribute writer method with validation
# @param inputs [Object] Object to be assigned
# @!visibility private
def inputs=(inputs)
if inputs.nil?
fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.'
end
@inputs = inputs
end

# Custom attribute writer method with validation
# @param project [Object] Object to be assigned
# @!visibility private
def project=(project)
if project.nil?
fail ArgumentError, 'invalid value for "project", project cannot be nil.'
end
@project = project
end

# Custom attribute writer method with validation
# @param topic [Object] Object to be assigned
# @!visibility private
def topic=(topic)
if topic.nil?
fail ArgumentError, 'invalid value for "topic", topic cannot be nil.'
end
@topic = topic
end

# Custom attribute writer method with validation
# @param type [Object] Object to be assigned
# @!visibility private
def type=(type)
if type.nil?
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
end
@type = type
end

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end

hash[param] = _to_hash(value)
end
self.additional_properties.each_pair do |attr, value|
hash[attr] = value
end
hash
end

# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
auth == o.auth &&
encoding == o.encoding &&
id == o.id &&
inputs == o.inputs &&
project == o.project &&
tls == o.tls &&
topic == o.topic &&
type == o.type &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[auth, encoding, id, inputs, project, tls, topic, type, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: [email protected]
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V2
# Encoding format for log events.
class ObservabilityPipelineGooglePubSubDestinationEncoding
include BaseEnumModel

JSON = "json".freeze
RAW_MESSAGE = "raw_message".freeze
end
end
Loading
Loading