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

Returns a new instance of Segment



4911
4912
4913
# File 'generated/google/apis/analytics_v3/classes.rb', line 4911

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

Instance Attribute Details

#createdDateTime

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

Returns:

  • (DateTime)


4869
4870
4871
# File 'generated/google/apis/analytics_v3/classes.rb', line 4869

def created
  @created
end

#definitionString

Segment definition. Corresponds to the JSON property definition

Returns:

  • (String)


4874
4875
4876
# File 'generated/google/apis/analytics_v3/classes.rb', line 4874

def definition
  @definition
end

#idString

Segment ID. Corresponds to the JSON property id

Returns:

  • (String)


4879
4880
4881
# File 'generated/google/apis/analytics_v3/classes.rb', line 4879

def id
  @id
end

#kindString

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

Returns:

  • (String)


4884
4885
4886
# File 'generated/google/apis/analytics_v3/classes.rb', line 4884

def kind
  @kind
end

#nameString

Segment name. Corresponds to the JSON property name

Returns:

  • (String)


4889
4890
4891
# File 'generated/google/apis/analytics_v3/classes.rb', line 4889

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

Returns:

  • (String)


4894
4895
4896
# File 'generated/google/apis/analytics_v3/classes.rb', line 4894

def segment_id
  @segment_id
end

Link for this segment. Corresponds to the JSON property selfLink

Returns:

  • (String)


4899
4900
4901
# File 'generated/google/apis/analytics_v3/classes.rb', line 4899

def self_link
  @self_link
end

#typeString

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

Returns:

  • (String)


4904
4905
4906
# File 'generated/google/apis/analytics_v3/classes.rb', line 4904

def type
  @type
end

#updatedDateTime

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

Returns:

  • (DateTime)


4909
4910
4911
# File 'generated/google/apis/analytics_v3/classes.rb', line 4909

def updated
  @updated
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
# File 'generated/google/apis/analytics_v3/classes.rb', line 4916

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