Class: Google::Apis::ChecksV1alpha::PolicyPurposeOfUseAnnotation

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) ⇒ PolicyPurposeOfUseAnnotation

Returns a new instance of PolicyPurposeOfUseAnnotation.



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

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

Instance Attribute Details

#end_offsetFixnum

Byte offsets for the end of the purpose of use sentence inside the full text. Corresponds to the JSON property endOffset

Returns:

  • (Fixnum)


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

def end_offset
  @end_offset
end

#purpose_of_useString

Purpose of use mentioned in the policy. Corresponds to the JSON property purposeOfUse

Returns:

  • (String)


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

def purpose_of_use
  @purpose_of_use
end

#scoreFloat

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

Returns:

  • (Float)


362
363
364
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 362

def score
  @score
end

#start_offsetFixnum

Byte offsets for the start of the purpose of use sentence inside the full text. Corresponds to the JSON property startOffset

Returns:

  • (Fixnum)


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

def start_offset
  @start_offset
end

#text_contentString

The bytes of actual text content in the sentence that mentions the purpose of use. 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)


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

def text_content
  @text_content
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



382
383
384
385
386
387
388
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 382

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