Class: Google::Apis::ChecksV1alpha::GoogleChecksRepoScanV1alphaCodeAttribution

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

Overview

Source code attribution.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleChecksRepoScanV1alphaCodeAttribution

Returns a new instance of GoogleChecksRepoScanV1alphaCodeAttribution.



334
335
336
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 334

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

Instance Attribute Details

#code_excerptString

Optional. Code excerpt where the source was detected along with surrounding code. Corresponds to the JSON property codeExcerpt

Returns:

  • (String)


317
318
319
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 317

def code_excerpt
  @code_excerpt
end

#line_numberFixnum

Required. Line number (1-based). Corresponds to the JSON property lineNumber

Returns:

  • (Fixnum)


322
323
324
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 322

def line_number
  @line_number
end

#pathString

Required. Path of the file. Corresponds to the JSON property path

Returns:

  • (String)


327
328
329
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 327

def path
  @path
end

#start_line_numberFixnum

Optional. Start line number of the code excerpt (1-based). Corresponds to the JSON property startLineNumber

Returns:

  • (Fixnum)


332
333
334
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 332

def start_line_number
  @start_line_number
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



339
340
341
342
343
344
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 339

def update!(**args)
  @code_excerpt = args[:code_excerpt] if args.key?(:code_excerpt)
  @line_number = args[:line_number] if args.key?(:line_number)
  @path = args[:path] if args.key?(:path)
  @start_line_number = args[:start_line_number] if args.key?(:start_line_number)
end