Class: Google::Apis::SurveysV2::SurveyQuestionImage

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/surveys_v2/classes.rb,
generated/google/apis/surveys_v2/representations.rb,
generated/google/apis/surveys_v2/representations.rb

Overview

Container object for image data and alt_text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SurveyQuestionImage

Returns a new instance of SurveyQuestionImage



483
484
485
# File 'generated/google/apis/surveys_v2/classes.rb', line 483

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

Instance Attribute Details

#alt_textString

The alt text property used in image tags is required for all images. Corresponds to the JSON property altText

Returns:

  • (String)


469
470
471
# File 'generated/google/apis/surveys_v2/classes.rb', line 469

def alt_text
  @alt_text
end

#dataString

Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types. Corresponds to the JSON property data NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


476
477
478
# File 'generated/google/apis/surveys_v2/classes.rb', line 476

def data
  @data
end

#urlString

The read-only URL for the hosted images. Corresponds to the JSON property url

Returns:

  • (String)


481
482
483
# File 'generated/google/apis/surveys_v2/classes.rb', line 481

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



488
489
490
491
492
# File 'generated/google/apis/surveys_v2/classes.rb', line 488

def update!(**args)
  @alt_text = args[:alt_text] if args.key?(:alt_text)
  @data = args[:data] if args.key?(:data)
  @url = args[:url] if args.key?(:url)
end