Class: Google::Apis::AnalyticsV3::CustomMetric

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 Analytics Custom Metric.

Defined Under Namespace

Classes: ParentLink

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

Returns a new instance of CustomMetric



1244
1245
1246
# File 'generated/google/apis/analytics_v3/classes.rb', line 1244

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

Instance Attribute Details

#account_idString

Account ID. Corresponds to the JSON property accountId

Returns:

  • (String)


1169
1170
1171
# File 'generated/google/apis/analytics_v3/classes.rb', line 1169

def 
  @account_id
end

#activeBoolean Also known as: active?

Boolean indicating whether the custom metric is active. Corresponds to the JSON property active

Returns:

  • (Boolean)


1174
1175
1176
# File 'generated/google/apis/analytics_v3/classes.rb', line 1174

def active
  @active
end

#createdDateTime

Time the custom metric was created. Corresponds to the JSON property created

Returns:

  • (DateTime)


1180
1181
1182
# File 'generated/google/apis/analytics_v3/classes.rb', line 1180

def created
  @created
end

#idString

Custom metric ID. Corresponds to the JSON property id

Returns:

  • (String)


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

def id
  @id
end

#indexFixnum

Index of the custom metric. Corresponds to the JSON property index

Returns:

  • (Fixnum)


1190
1191
1192
# File 'generated/google/apis/analytics_v3/classes.rb', line 1190

def index
  @index
end

#kindString

Kind value for a custom metric. Set to "analytics#customMetric". It is a read- only field. Corresponds to the JSON property kind

Returns:

  • (String)


1196
1197
1198
# File 'generated/google/apis/analytics_v3/classes.rb', line 1196

def kind
  @kind
end

#max_valueString

Max value of custom metric. Corresponds to the JSON property max_value

Returns:

  • (String)


1201
1202
1203
# File 'generated/google/apis/analytics_v3/classes.rb', line 1201

def max_value
  @max_value
end

#min_valueString

Min value of custom metric. Corresponds to the JSON property min_value

Returns:

  • (String)


1206
1207
1208
# File 'generated/google/apis/analytics_v3/classes.rb', line 1206

def min_value
  @min_value
end

#nameString

Name of the custom metric. Corresponds to the JSON property name

Returns:

  • (String)


1211
1212
1213
# File 'generated/google/apis/analytics_v3/classes.rb', line 1211

def name
  @name
end

Parent link for the custom metric. Points to the property to which the custom metric belongs. Corresponds to the JSON property parentLink



1217
1218
1219
# File 'generated/google/apis/analytics_v3/classes.rb', line 1217

def parent_link
  @parent_link
end

#scopeString

Scope of the custom metric: HIT or PRODUCT. Corresponds to the JSON property scope

Returns:

  • (String)


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

def scope
  @scope
end

Link for the custom metric Corresponds to the JSON property selfLink

Returns:

  • (String)


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

def self_link
  @self_link
end

#typeString

Data type of custom metric. Corresponds to the JSON property type

Returns:

  • (String)


1232
1233
1234
# File 'generated/google/apis/analytics_v3/classes.rb', line 1232

def type
  @type
end

#updatedDateTime

Time the custom metric was last modified. Corresponds to the JSON property updated

Returns:

  • (DateTime)


1237
1238
1239
# File 'generated/google/apis/analytics_v3/classes.rb', line 1237

def updated
  @updated
end

#web_property_idString

Property ID. Corresponds to the JSON property webPropertyId

Returns:

  • (String)


1242
1243
1244
# File 'generated/google/apis/analytics_v3/classes.rb', line 1242

def web_property_id
  @web_property_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'generated/google/apis/analytics_v3/classes.rb', line 1249

def update!(**args)
  @account_id = args[:account_id] if args.key?(:account_id)
  @active = args[:active] if args.key?(:active)
  @created = args[:created] if args.key?(:created)
  @id = args[:id] if args.key?(:id)
  @index = args[:index] if args.key?(:index)
  @kind = args[:kind] if args.key?(:kind)
  @max_value = args[:max_value] if args.key?(:max_value)
  @min_value = args[:min_value] if args.key?(:min_value)
  @name = args[:name] if args.key?(:name)
  @parent_link = args[:parent_link] if args.key?(:parent_link)
  @scope = args[:scope] if args.key?(:scope)
  @self_link = args[:self_link] if args.key?(:self_link)
  @type = args[:type] if args.key?(:type)
  @updated = args[:updated] if args.key?(:updated)
  @web_property_id = args[:web_property_id] if args.key?(:web_property_id)
end