Class: Google::Apis::AnalyticsV3::CustomMetrics

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

A custom metric collection lists Analytics custom metrics to which the user has access. Each resource in the collection corresponds to a single Analytics custom metric.

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

Returns a new instance of CustomMetrics.


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

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

Instance Attribute Details

#itemsArray<Google::Apis::AnalyticsV3::CustomMetric>

Collection of custom metrics. Corresponds to the JSON property items


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

def items
  @items
end

#items_per_pageFixnum

The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. Corresponds to the JSON property itemsPerPage

Returns:

  • (Fixnum)

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

def items_per_page
  @items_per_page
end

#kindString

Collection type. Corresponds to the JSON property kind

Returns:

  • (String)

1194
1195
1196
# File 'generated/google/apis/analytics_v3/classes.rb', line 1194

def kind
  @kind
end

Link to next page for this custom metric collection. Corresponds to the JSON property nextLink

Returns:

  • (String)

1199
1200
1201
# File 'generated/google/apis/analytics_v3/classes.rb', line 1199

def next_link
  @next_link
end

Link to previous page for this custom metric collection. Corresponds to the JSON property previousLink

Returns:

  • (String)

1204
1205
1206
# File 'generated/google/apis/analytics_v3/classes.rb', line 1204

def previous_link
  @previous_link
end

#start_indexFixnum

The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)

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

def start_index
  @start_index
end

#total_resultsFixnum

The total number of results for the query, regardless of the number of results in the response. Corresponds to the JSON property totalResults

Returns:

  • (Fixnum)

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

def total_results
  @total_results
end

#usernameString

Email ID of the authenticated user Corresponds to the JSON property username

Returns:

  • (String)

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

def username
  @username
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
# File 'generated/google/apis/analytics_v3/classes.rb', line 1228

def update!(**args)
  @items = args[:items] if args.key?(:items)
  @items_per_page = args[:items_per_page] if args.key?(:items_per_page)
  @kind = args[:kind] if args.key?(:kind)
  @next_link = args[:next_link] if args.key?(:next_link)
  @previous_link = args[:previous_link] if args.key?(:previous_link)
  @start_index = args[:start_index] if args.key?(:start_index)
  @total_results = args[:total_results] if args.key?(:total_results)
  @username = args[:username] if args.key?(:username)
end