Skip to content
Open
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
7 changes: 1 addition & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37791,18 +37791,13 @@ components:
example: 10.0
format: double
type: number
rate:
description: Number of events to sample (1 in N).
example: 10
format: int64
minimum: 1
type: integer
type:
$ref: '#/components/schemas/ObservabilityPipelineSampleProcessorType'
required:
- id
- type
- include
- percentage
- enabled
type: object
ObservabilityPipelineSampleProcessorType:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ class ObservabilityPipelineSampleProcessor
attr_reader :include

# The percentage of logs to sample.
attr_accessor :percentage

# Number of events to sample (1 in N).
attr_reader :rate
attr_reader :percentage

# The processor type. The value should always be `sample`.
attr_reader :type
Expand All @@ -53,7 +50,6 @@ def self.attribute_map
:'id' => :'id',
:'include' => :'include',
:'percentage' => :'percentage',
:'rate' => :'rate',
:'type' => :'type'
}
end
Expand All @@ -67,7 +63,6 @@ def self.openapi_types
:'id' => :'String',
:'include' => :'String',
:'percentage' => :'Float',
:'rate' => :'Integer',
:'type' => :'ObservabilityPipelineSampleProcessorType'
}
end
Expand Down Expand Up @@ -110,10 +105,6 @@ def initialize(attributes = {})
self.percentage = attributes[:'percentage']
end

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

if attributes.key?(:'type')
self.type = attributes[:'type']
end
Expand All @@ -126,7 +117,7 @@ def valid?
return false if @enabled.nil?
return false if @id.nil?
return false if @include.nil?
return false if !@rate.nil? && @rate < 1
return false if @percentage.nil?
return false if @type.nil?
true
end
Expand Down Expand Up @@ -162,13 +153,13 @@ def include=(include)
end

# Custom attribute writer method with validation
# @param rate [Object] Object to be assigned
# @param percentage [Object] Object to be assigned
# @!visibility private
def rate=(rate)
if !rate.nil? && rate < 1
fail ArgumentError, 'invalid value for "rate", must be greater than or equal to 1.'
def percentage=(percentage)
if percentage.nil?
fail ArgumentError, 'invalid value for "percentage", percentage cannot be nil.'
end
@rate = rate
@percentage = percentage
end

# Custom attribute writer method with validation
Expand Down Expand Up @@ -212,7 +203,6 @@ def ==(o)
id == o.id &&
include == o.include &&
percentage == o.percentage &&
rate == o.rate &&
type == o.type &&
additional_properties == o.additional_properties
end
Expand All @@ -221,7 +211,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[display_name, enabled, id, include, percentage, rate, type, additional_properties].hash
[display_name, enabled, id, include, percentage, type, additional_properties].hash
end
end
end
Loading