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



587
588
589
# File 'generated/google/apis/surveys_v2/classes.rb', line 587

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)


573
574
575
# File 'generated/google/apis/surveys_v2/classes.rb', line 573

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)


580
581
582
# File 'generated/google/apis/surveys_v2/classes.rb', line 580

def data
  @data
end

#urlString

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

Returns:

  • (String)


585
586
587
# File 'generated/google/apis/surveys_v2/classes.rb', line 585

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



592
593
594
595
596
# File 'generated/google/apis/surveys_v2/classes.rb', line 592

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