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.



369
370
371
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 369

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)


344
345
346
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 344

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)


350
351
352
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 350

def score
  @score
end

#section_typeString

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

Returns:

  • (String)


355
356
357
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 355

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)


360
361
362
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 360

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)


367
368
369
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 367

def text_content
  @text_content
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



374
375
376
377
378
379
380
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 374

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