Class: Google::Apis::ChecksV1alpha::PolicySectionAnnotation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PolicySectionAnnotation

Returns a new instance of PolicySectionAnnotation.



1499
1500
1501
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 1499

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

Instance Attribute Details

#end_offsetFixnum

Byte offsets for the end of the section inside the full text. Corresponds to the JSON property endOffset

Returns:

  • (Fixnum)


1476
1477
1478
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 1476

def end_offset
  @end_offset
end

#scoreFloat

Score given by the model representing how confident it was regarding this text_content being of section_type. Corresponds to the JSON property score

Returns:

  • (Float)


1482
1483
1484
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 1482

def score
  @score
end

#section_typeString

Detected type of the high-level topic in the policy. Corresponds to the JSON property sectionType

Returns:

  • (String)


1487
1488
1489
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 1487

def section_type
  @section_type
end

#start_offsetFixnum

Byte offsets for the start of the section inside the full text. Corresponds to the JSON property startOffset

Returns:

  • (Fixnum)


1492
1493
1494
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 1492

def start_offset
  @start_offset
end

#text_contentString

Actual text content in the section. Corresponds to the JSON property textContent

Returns:

  • (String)


1497
1498
1499
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 1497

def text_content
  @text_content
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1504
1505
1506
1507
1508
1509
1510
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 1504

def update!(**args)
  @end_offset = args[:end_offset] if args.key?(:end_offset)
  @score = args[:score] if args.key?(:score)
  @section_type = args[:section_type] if args.key?(:section_type)
  @start_offset = args[:start_offset] if args.key?(:start_offset)
  @text_content = args[:text_content] if args.key?(:text_content)
end