Class: Google::Apis::LoggingV1beta3::SourceLocation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable
Defined in:
generated/google/apis/logging_v1beta3/classes.rb,
generated/google/apis/logging_v1beta3/representations.rb,
generated/google/apis/logging_v1beta3/representations.rb

Overview

Specifies a location in a source file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SourceLocation

Returns a new instance of SourceLocation



1038
1039
1040
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 1038

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

Instance Attribute Details

#fileString

Source file name. May or may not be a fully qualified name, depending on the runtime environment. Corresponds to the JSON property file

Returns:

  • (String)


1022
1023
1024
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 1022

def file
  @file
end

#function_nameString

Human-readable name of the function or method being invoked, with optional context such as the class or package name, for use in contexts such as the logs viewer where file:line number is less meaningful. This may vary by language, for example: in Java: qual.if.ied.Class.method in Go: dir/package. func in Python: function ... Corresponds to the JSON property functionName

Returns:

  • (String)


1036
1037
1038
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 1036

def function_name
  @function_name
end

#lineString

Line within the source file. Corresponds to the JSON property line

Returns:

  • (String)


1027
1028
1029
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 1027

def line
  @line
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1043
1044
1045
1046
1047
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 1043

def update!(**args)
  @file = args[:file] unless args[:file].nil?
  @line = args[:line] unless args[:line].nil?
  @function_name = args[:function_name] unless args[:function_name].nil?
end