Class: Google::Analytics::Data::V1beta::OrderBy

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

Overview

Order bys define how rows will be sorted in the response. For example, ordering rows by descending event count is one ordering, and ordering rows by the event name string is a different ordering.

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.



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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'proto_docs/google/analytics/data/v1beta/data.rb', line 393

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::V1beta::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::V1beta::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::V1beta::OrderBy::DimensionOrderBy

Returns Sorts results by a dimension's values.

Returns:



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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'proto_docs/google/analytics/data/v1beta/data.rb', line 393

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::V1beta::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::V1beta::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::V1beta::OrderBy::MetricOrderBy

Returns Sorts results by a metric's values.

Returns:



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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'proto_docs/google/analytics/data/v1beta/data.rb', line 393

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::V1beta::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::V1beta::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::V1beta::OrderBy::PivotOrderBy

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

Returns:



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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'proto_docs/google/analytics/data/v1beta/data.rb', line 393

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::V1beta::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::V1beta::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