Class: Google::Apis::LoggingV2::LoggingQuery

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/logging_v2/classes.rb,
lib/google/apis/logging_v2/representations.rb,
lib/google/apis/logging_v2/representations.rb

Overview

Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LoggingQuery

Returns a new instance of LoggingQuery.



2764
2765
2766
# File 'lib/google/apis/logging_v2/classes.rb', line 2764

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

Instance Attribute Details

#filterString

Required. An advanced query using the Logging Query Language (https://cloud. google.com/logging/docs/view/logging-query-language). The maximum length of the filter is 20000 characters. Corresponds to the JSON property filter

Returns:

  • (String)


2747
2748
2749
# File 'lib/google/apis/logging_v2/classes.rb', line 2747

def filter
  @filter
end

#summary_field_endFixnum

Characters will be counted from the end of the string. Corresponds to the JSON property summaryFieldEnd

Returns:

  • (Fixnum)


2752
2753
2754
# File 'lib/google/apis/logging_v2/classes.rb', line 2752

def summary_field_end
  @summary_field_end
end

#summary_field_startFixnum

Characters will be counted from the start of the string. Corresponds to the JSON property summaryFieldStart

Returns:

  • (Fixnum)


2757
2758
2759
# File 'lib/google/apis/logging_v2/classes.rb', line 2757

def summary_field_start
  @summary_field_start
end

#summary_fieldsArray<Google::Apis::LoggingV2::SummaryField>

Optional. The set of summary fields to display for this saved query. Corresponds to the JSON property summaryFields



2762
2763
2764
# File 'lib/google/apis/logging_v2/classes.rb', line 2762

def summary_fields
  @summary_fields
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2769
2770
2771
2772
2773
2774
# File 'lib/google/apis/logging_v2/classes.rb', line 2769

def update!(**args)
  @filter = args[:filter] if args.key?(:filter)
  @summary_field_end = args[:summary_field_end] if args.key?(:summary_field_end)
  @summary_field_start = args[:summary_field_start] if args.key?(:summary_field_start)
  @summary_fields = args[:summary_fields] if args.key?(:summary_fields)
end