Class: Google::Analytics::Data::V1alpha::OrderBy

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/analytics/data/v1alpha/data.rb

Overview

The sort options.

Defined Under Namespace

Classes: DimensionOrderBy, MetricOrderBy, PivotOrderBy

Instance Attribute Summary collapse

Instance Attribute Details

#desc::Boolean

Returns If true, sorts by descending order.

Returns:

  • (::Boolean)

    If true, sorts by descending order.



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'proto_docs/google/analytics/data/v1alpha/data.rb', line 331

class OrderBy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Sorts by metric values.
  # @!attribute [rw] metric_name
  #   @return [::String]
  #     A metric name in the request to order by.
  class MetricOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Sorts by dimension values.
  # @!attribute [rw] dimension_name
  #   @return [::String]
  #     A dimension name in the request to order by.
  # @!attribute [rw] order_type
  #   @return [::Google::Analytics::Data::V1alpha::OrderBy::DimensionOrderBy::OrderType]
  #     Controls the rule for dimension value ordering.
  class DimensionOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Rule to order the string dimension values by.
    module OrderType
      # Unspecified.
      ORDER_TYPE_UNSPECIFIED = 0

      # Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" <
      # "b" < "z".
      ALPHANUMERIC = 1

      # Case insensitive alphanumeric sort by lower case Unicode code point.
      # For example, "2" < "A" < "b" < "X" < "z".
      CASE_INSENSITIVE_ALPHANUMERIC = 2

      # Dimension values are converted to numbers before sorting. For example
      # in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" <
      # "25". Non-numeric dimension values all have equal ordering value below
      # all numeric values.
      NUMERIC = 3
    end
  end

  # Sorts by a pivot column group.
  # @!attribute [rw] metric_name
  #   @return [::String]
  #     In the response to order by, order rows by this column. Must be a metric
  #     name from the request.
  # @!attribute [rw] pivot_selections
  #   @return [::Array<::Google::Analytics::Data::V1alpha::OrderBy::PivotOrderBy::PivotSelection>]
  #     Used to select a dimension name and value pivot. If multiple pivot
  #     selections are given, the sort occurs on rows where all pivot selection
  #     dimension name and value pairs match the row's dimension name and value
  #     pair.
  class PivotOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A pair of dimension names and values. Rows with this dimension pivot pair
    # are ordered by the metric's value.
    #
    # For example if pivots = \\{\\{"browser", "Chrome"}} and
    # metric_name = "Sessions",
    # then the rows will be sorted based on Sessions in Chrome.
    #
    #     ---------|----------|----------------|----------|----------------
    #              |  Chrome  |    Chrome      |  Safari  |     Safari
    #     ---------|----------|----------------|----------|----------------
    #      Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions
    #     ---------|----------|----------------|----------|----------------
    #         US   |    2     |       2        |     3    |        1
    #     ---------|----------|----------------|----------|----------------
    #       Canada |    3     |       1        |     4    |        1
    #     ---------|----------|----------------|----------|----------------
    # @!attribute [rw] dimension_name
    #   @return [::String]
    #     Must be a dimension name from the request.
    # @!attribute [rw] dimension_value
    #   @return [::String]
    #     Order by only when the named dimension is this value.
    class PivotSelection
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#dimension::Google::Analytics::Data::V1alpha::OrderBy::DimensionOrderBy

Returns Sorts results by a dimension's values.

Returns:



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'proto_docs/google/analytics/data/v1alpha/data.rb', line 331

class OrderBy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Sorts by metric values.
  # @!attribute [rw] metric_name
  #   @return [::String]
  #     A metric name in the request to order by.
  class MetricOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Sorts by dimension values.
  # @!attribute [rw] dimension_name
  #   @return [::String]
  #     A dimension name in the request to order by.
  # @!attribute [rw] order_type
  #   @return [::Google::Analytics::Data::V1alpha::OrderBy::DimensionOrderBy::OrderType]
  #     Controls the rule for dimension value ordering.
  class DimensionOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Rule to order the string dimension values by.
    module OrderType
      # Unspecified.
      ORDER_TYPE_UNSPECIFIED = 0

      # Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" <
      # "b" < "z".
      ALPHANUMERIC = 1

      # Case insensitive alphanumeric sort by lower case Unicode code point.
      # For example, "2" < "A" < "b" < "X" < "z".
      CASE_INSENSITIVE_ALPHANUMERIC = 2

      # Dimension values are converted to numbers before sorting. For example
      # in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" <
      # "25". Non-numeric dimension values all have equal ordering value below
      # all numeric values.
      NUMERIC = 3
    end
  end

  # Sorts by a pivot column group.
  # @!attribute [rw] metric_name
  #   @return [::String]
  #     In the response to order by, order rows by this column. Must be a metric
  #     name from the request.
  # @!attribute [rw] pivot_selections
  #   @return [::Array<::Google::Analytics::Data::V1alpha::OrderBy::PivotOrderBy::PivotSelection>]
  #     Used to select a dimension name and value pivot. If multiple pivot
  #     selections are given, the sort occurs on rows where all pivot selection
  #     dimension name and value pairs match the row's dimension name and value
  #     pair.
  class PivotOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A pair of dimension names and values. Rows with this dimension pivot pair
    # are ordered by the metric's value.
    #
    # For example if pivots = \\{\\{"browser", "Chrome"}} and
    # metric_name = "Sessions",
    # then the rows will be sorted based on Sessions in Chrome.
    #
    #     ---------|----------|----------------|----------|----------------
    #              |  Chrome  |    Chrome      |  Safari  |     Safari
    #     ---------|----------|----------------|----------|----------------
    #      Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions
    #     ---------|----------|----------------|----------|----------------
    #         US   |    2     |       2        |     3    |        1
    #     ---------|----------|----------------|----------|----------------
    #       Canada |    3     |       1        |     4    |        1
    #     ---------|----------|----------------|----------|----------------
    # @!attribute [rw] dimension_name
    #   @return [::String]
    #     Must be a dimension name from the request.
    # @!attribute [rw] dimension_value
    #   @return [::String]
    #     Order by only when the named dimension is this value.
    class PivotSelection
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#metric::Google::Analytics::Data::V1alpha::OrderBy::MetricOrderBy

Returns Sorts results by a metric's values.

Returns:



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'proto_docs/google/analytics/data/v1alpha/data.rb', line 331

class OrderBy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Sorts by metric values.
  # @!attribute [rw] metric_name
  #   @return [::String]
  #     A metric name in the request to order by.
  class MetricOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Sorts by dimension values.
  # @!attribute [rw] dimension_name
  #   @return [::String]
  #     A dimension name in the request to order by.
  # @!attribute [rw] order_type
  #   @return [::Google::Analytics::Data::V1alpha::OrderBy::DimensionOrderBy::OrderType]
  #     Controls the rule for dimension value ordering.
  class DimensionOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Rule to order the string dimension values by.
    module OrderType
      # Unspecified.
      ORDER_TYPE_UNSPECIFIED = 0

      # Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" <
      # "b" < "z".
      ALPHANUMERIC = 1

      # Case insensitive alphanumeric sort by lower case Unicode code point.
      # For example, "2" < "A" < "b" < "X" < "z".
      CASE_INSENSITIVE_ALPHANUMERIC = 2

      # Dimension values are converted to numbers before sorting. For example
      # in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" <
      # "25". Non-numeric dimension values all have equal ordering value below
      # all numeric values.
      NUMERIC = 3
    end
  end

  # Sorts by a pivot column group.
  # @!attribute [rw] metric_name
  #   @return [::String]
  #     In the response to order by, order rows by this column. Must be a metric
  #     name from the request.
  # @!attribute [rw] pivot_selections
  #   @return [::Array<::Google::Analytics::Data::V1alpha::OrderBy::PivotOrderBy::PivotSelection>]
  #     Used to select a dimension name and value pivot. If multiple pivot
  #     selections are given, the sort occurs on rows where all pivot selection
  #     dimension name and value pairs match the row's dimension name and value
  #     pair.
  class PivotOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A pair of dimension names and values. Rows with this dimension pivot pair
    # are ordered by the metric's value.
    #
    # For example if pivots = \\{\\{"browser", "Chrome"}} and
    # metric_name = "Sessions",
    # then the rows will be sorted based on Sessions in Chrome.
    #
    #     ---------|----------|----------------|----------|----------------
    #              |  Chrome  |    Chrome      |  Safari  |     Safari
    #     ---------|----------|----------------|----------|----------------
    #      Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions
    #     ---------|----------|----------------|----------|----------------
    #         US   |    2     |       2        |     3    |        1
    #     ---------|----------|----------------|----------|----------------
    #       Canada |    3     |       1        |     4    |        1
    #     ---------|----------|----------------|----------|----------------
    # @!attribute [rw] dimension_name
    #   @return [::String]
    #     Must be a dimension name from the request.
    # @!attribute [rw] dimension_value
    #   @return [::String]
    #     Order by only when the named dimension is this value.
    class PivotSelection
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#pivot::Google::Analytics::Data::V1alpha::OrderBy::PivotOrderBy

Returns Sorts results by a metric's values within a pivot column group.

Returns:



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'proto_docs/google/analytics/data/v1alpha/data.rb', line 331

class OrderBy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Sorts by metric values.
  # @!attribute [rw] metric_name
  #   @return [::String]
  #     A metric name in the request to order by.
  class MetricOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Sorts by dimension values.
  # @!attribute [rw] dimension_name
  #   @return [::String]
  #     A dimension name in the request to order by.
  # @!attribute [rw] order_type
  #   @return [::Google::Analytics::Data::V1alpha::OrderBy::DimensionOrderBy::OrderType]
  #     Controls the rule for dimension value ordering.
  class DimensionOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Rule to order the string dimension values by.
    module OrderType
      # Unspecified.
      ORDER_TYPE_UNSPECIFIED = 0

      # Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" <
      # "b" < "z".
      ALPHANUMERIC = 1

      # Case insensitive alphanumeric sort by lower case Unicode code point.
      # For example, "2" < "A" < "b" < "X" < "z".
      CASE_INSENSITIVE_ALPHANUMERIC = 2

      # Dimension values are converted to numbers before sorting. For example
      # in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" <
      # "25". Non-numeric dimension values all have equal ordering value below
      # all numeric values.
      NUMERIC = 3
    end
  end

  # Sorts by a pivot column group.
  # @!attribute [rw] metric_name
  #   @return [::String]
  #     In the response to order by, order rows by this column. Must be a metric
  #     name from the request.
  # @!attribute [rw] pivot_selections
  #   @return [::Array<::Google::Analytics::Data::V1alpha::OrderBy::PivotOrderBy::PivotSelection>]
  #     Used to select a dimension name and value pivot. If multiple pivot
  #     selections are given, the sort occurs on rows where all pivot selection
  #     dimension name and value pairs match the row's dimension name and value
  #     pair.
  class PivotOrderBy
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A pair of dimension names and values. Rows with this dimension pivot pair
    # are ordered by the metric's value.
    #
    # For example if pivots = \\{\\{"browser", "Chrome"}} and
    # metric_name = "Sessions",
    # then the rows will be sorted based on Sessions in Chrome.
    #
    #     ---------|----------|----------------|----------|----------------
    #              |  Chrome  |    Chrome      |  Safari  |     Safari
    #     ---------|----------|----------------|----------|----------------
    #      Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions
    #     ---------|----------|----------------|----------|----------------
    #         US   |    2     |       2        |     3    |        1
    #     ---------|----------|----------------|----------|----------------
    #       Canada |    3     |       1        |     4    |        1
    #     ---------|----------|----------------|----------|----------------
    # @!attribute [rw] dimension_name
    #   @return [::String]
    #     Must be a dimension name from the request.
    # @!attribute [rw] dimension_value
    #   @return [::String]
    #     Order by only when the named dimension is this value.
    class PivotSelection
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end