Class: Google::Apis::AnalyticsreportingV4::DynamicSegment

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

Dynamic segment definition for defining the segment within the request. A segment can select users, sessions or both.

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) ⇒ DynamicSegment

Returns a new instance of DynamicSegment



356
357
358
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 356

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

Instance Attribute Details

#nameString

The name of the dynamic segment. Corresponds to the JSON property name

Returns:

  • (String)


342
343
344
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 342

def name
  @name
end

#session_segmentGoogle::Apis::AnalyticsreportingV4::SegmentDefinition

SegmentDefinition defines the segment to be a set of SegmentFilters which are combined together with a logical AND operation. Corresponds to the JSON property sessionSegment



348
349
350
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 348

def session_segment
  @session_segment
end

#user_segmentGoogle::Apis::AnalyticsreportingV4::SegmentDefinition

SegmentDefinition defines the segment to be a set of SegmentFilters which are combined together with a logical AND operation. Corresponds to the JSON property userSegment



354
355
356
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 354

def user_segment
  @user_segment
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



361
362
363
364
365
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 361

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @session_segment = args[:session_segment] if args.key?(:session_segment)
  @user_segment = args[:user_segment] if args.key?(:user_segment)
end