Class: Google::Apis::AnalyticsV3::Segment

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

Overview

JSON template for an Analytics segment.

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


4692
4693
4694
# File 'generated/google/apis/analytics_v3/classes.rb', line 4692

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

Instance Attribute Details

#createdDateTime

Time the segment was created. Corresponds to the JSON property created


4650
4651
4652
# File 'generated/google/apis/analytics_v3/classes.rb', line 4650

def created
  @created
end

#definitionString

Segment definition. Corresponds to the JSON property definition


4655
4656
4657
# File 'generated/google/apis/analytics_v3/classes.rb', line 4655

def definition
  @definition
end

#idString

Segment ID. Corresponds to the JSON property id


4660
4661
4662
# File 'generated/google/apis/analytics_v3/classes.rb', line 4660

def id
  @id
end

#kindString

Resource type for Analytics segment. Corresponds to the JSON property kind


4665
4666
4667
# File 'generated/google/apis/analytics_v3/classes.rb', line 4665

def kind
  @kind
end

#nameString

Segment name. Corresponds to the JSON property name


4670
4671
4672
# File 'generated/google/apis/analytics_v3/classes.rb', line 4670

def name
  @name
end

#segment_idString

Segment ID. Can be used with the 'segment' parameter in Core Reporting API. Corresponds to the JSON property segmentId


4675
4676
4677
# File 'generated/google/apis/analytics_v3/classes.rb', line 4675

def segment_id
  @segment_id
end

Link for this segment. Corresponds to the JSON property selfLink


4680
4681
4682
# File 'generated/google/apis/analytics_v3/classes.rb', line 4680

def self_link
  @self_link
end

#typeString

Type for a segment. Possible values are "BUILT_IN" or "CUSTOM". Corresponds to the JSON property type


4685
4686
4687
# File 'generated/google/apis/analytics_v3/classes.rb', line 4685

def type
  @type
end

#updatedDateTime

Time the segment was last modified. Corresponds to the JSON property updated


4690
4691
4692
# File 'generated/google/apis/analytics_v3/classes.rb', line 4690

def updated
  @updated
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
# File 'generated/google/apis/analytics_v3/classes.rb', line 4697

def update!(**args)
  @created = args[:created] if args.key?(:created)
  @definition = args[:definition] if args.key?(:definition)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @segment_id = args[:segment_id] if args.key?(:segment_id)
  @self_link = args[:self_link] if args.key?(:self_link)
  @type = args[:type] if args.key?(:type)
  @updated = args[:updated] if args.key?(:updated)
end