Class: Google::Apis::AnalyticsreportingV4::Segment

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/analyticsreporting_v4/classes.rb,
generated/google/apis/analyticsreporting_v4/representations.rb,
generated/google/apis/analyticsreporting_v4/representations.rb

Overview

The segment definition, if the report needs to be segmented. A Segment is a subset of the Analytics data. For example, of the entire set of users, one Segment might be users from a particular country or city.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Segment

Returns a new instance of Segment



1179
1180
1181
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1179

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dynamic_segmentGoogle::Apis::AnalyticsreportingV4::DynamicSegment

Dynamic segment definition for defining the segment within the request. A segment can select users, sessions or both. Corresponds to the JSON property dynamicSegment



1172
1173
1174
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1172

def dynamic_segment
  @dynamic_segment
end

#segment_idString

The segment ID of a built-in or custom segment, for example gaid::-3. Corresponds to the JSON property segmentId

Returns:

  • (String)


1177
1178
1179
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1177

def segment_id
  @segment_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1184
1185
1186
1187
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 1184

def update!(**args)
  @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment)
  @segment_id = args[:segment_id] if args.key?(:segment_id)
end