lib/ff/ruby/server/generated/lib/openapi_client/models/segment.rb in ff-ruby-server-sdk-1.2.1 vs lib/ff/ruby/server/generated/lib/openapi_client/models/segment.rb in ff-ruby-server-sdk-1.3.1
- old
+ new
@@ -12,32 +12,42 @@
require 'date'
require 'time'
module OpenapiClient
+ # A Target Group (Segment) response
class Segment
- # Unique identifier for the segment.
+ # Unique identifier for the target group.
attr_accessor :identifier
- # Name of the segment.
+ # Name of the target group.
attr_accessor :name
+ # The environment this target group belongs to
attr_accessor :environment
+ # Tags for this target group
attr_accessor :tags
+ # A list of Targets who belong to this target group
attr_accessor :included
+ # A list of Targets who are excluded from this target group
attr_accessor :excluded
- # An array of rules that can cause a user to be included in this segment.
attr_accessor :rules
+ # An array of rules that can cause a user to be included in this segment.
+ attr_accessor :serving_rules
+
+ # The data and time in milliseconds when the group was created
attr_accessor :created_at
+ # The data and time in milliseconds when the group was last modified
attr_accessor :modified_at
+ # The version of this group. Each time it is modified the version is incremented
attr_accessor :version
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
@@ -46,10 +56,11 @@
:'environment' => :'environment',
:'tags' => :'tags',
:'included' => :'included',
:'excluded' => :'excluded',
:'rules' => :'rules',
+ :'serving_rules' => :'servingRules',
:'created_at' => :'createdAt',
:'modified_at' => :'modifiedAt',
:'version' => :'version'
}
end
@@ -67,10 +78,11 @@
:'environment' => :'String',
:'tags' => :'Array<Tag>',
:'included' => :'Array<Target>',
:'excluded' => :'Array<Target>',
:'rules' => :'Array<Clause>',
+ :'serving_rules' => :'Array<GroupServingRule>',
:'created_at' => :'Integer',
:'modified_at' => :'Integer',
:'version' => :'Integer'
}
end
@@ -130,10 +142,16 @@
if (value = attributes[:'rules']).is_a?(Array)
self.rules = value
end
end
+ if attributes.key?(:'serving_rules')
+ if (value = attributes[:'serving_rules']).is_a?(Array)
+ self.serving_rules = value
+ end
+ end
+
if attributes.key?(:'created_at')
self.created_at = attributes[:'created_at']
end
if attributes.key?(:'modified_at')
@@ -178,10 +196,11 @@
environment == o.environment &&
tags == o.tags &&
included == o.included &&
excluded == o.excluded &&
rules == o.rules &&
+ serving_rules == o.serving_rules &&
created_at == o.created_at &&
modified_at == o.modified_at &&
version == o.version
end
@@ -192,10 +211,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [identifier, name, environment, tags, included, excluded, rules, created_at, modified_at, version].hash
+ [identifier, name, environment, tags, included, excluded, rules, serving_rules, created_at, modified_at, version].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself