Class: Google::Apis::ChecksV1alpha::PolicyDataTypeAnnotation

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

Returns a new instance of PolicyDataTypeAnnotation.



276
277
278
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 276

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

Instance Attribute Details

#data_typeString

Type of the data mentioned in the policy. Corresponds to the JSON property dataType

Returns:

  • (String)


251
252
253
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 251

def data_type
  @data_type
end

#end_offsetFixnum

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

Returns:

  • (Fixnum)


256
257
258
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 256

def end_offset
  @end_offset
end

#scoreFloat

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

Returns:

  • (Float)


262
263
264
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 262

def score
  @score
end

#start_offsetFixnum

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

Returns:

  • (Fixnum)


267
268
269
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 267

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)


274
275
276
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 274

def text_content
  @text_content
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



281
282
283
284
285
286
287
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 281

def update!(**args)
  @data_type = args[:data_type] if args.key?(:data_type)
  @end_offset = args[:end_offset] if args.key?(:end_offset)
  @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