Class: Google::Apis::DfareportingV2_1::AudienceSegment

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

Overview

Audience Segment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AudienceSegment

Returns a new instance of AudienceSegment.



1235
1236
1237
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 1235

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

Instance Attribute Details

#allocationFixnum

Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. Corresponds to the JSON property allocation

Returns:

  • (Fixnum)


1222
1223
1224
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 1222

def allocation
  @allocation
end

#idString

ID of this audience segment. This is a read-only, auto-generated field. Corresponds to the JSON property id

Returns:

  • (String)


1227
1228
1229
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 1227

def id
  @id
end

#nameString

Name of this audience segment. This is a required field and must be less than 65 characters long. Corresponds to the JSON property name

Returns:

  • (String)


1233
1234
1235
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 1233

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1240
1241
1242
1243
1244
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 1240

def update!(**args)
  @allocation = args[:allocation] unless args[:allocation].nil?
  @id = args[:id] unless args[:id].nil?
  @name = args[:name] unless args[:name].nil?
end