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.



442
443
444
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 442

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)


417
418
419
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 417

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)


423
424
425
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 423

def score
  @score
end

#section_typeString

Type of the high-level category in the policy. Corresponds to the JSON property sectionType

Returns:

  • (String)


428
429
430
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 428

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)


433
434
435
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 433

def start_offset
  @start_offset
end

#text_contentString

Actual text content in the section. This makes it much easier to consume the information. NOTE: This field might contain HTML and does not guarantee a SafeHtml security contract go/safehtmltypecontracts#safehtml. Corresponds to the JSON property textContent

Returns:

  • (String)


440
441
442
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 440

def text_content
  @text_content
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



447
448
449
450
451
452
453
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 447

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