Class: Google::Apis::SurveysV2::Survey

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

Representation of an individual survey object.

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

Returns a new instance of Survey



285
286
287
# File 'generated/google/apis/surveys_v2/classes.rb', line 285

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

Instance Attribute Details

#audienceGoogle::Apis::SurveysV2::SurveyAudience

Specifications for the target audience of a survey run through the API. Corresponds to the JSON property audience



229
230
231
# File 'generated/google/apis/surveys_v2/classes.rb', line 229

def audience
  @audience
end

#costGoogle::Apis::SurveysV2::SurveyCost

Message defining the cost to run a given survey through API. Corresponds to the JSON property cost



234
235
236
# File 'generated/google/apis/surveys_v2/classes.rb', line 234

def cost
  @cost
end

#customer_dataString

Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes. Corresponds to the JSON property customerData NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


242
243
244
# File 'generated/google/apis/surveys_v2/classes.rb', line 242

def customer_data
  @customer_data
end

#descriptionString

Text description of the survey. Corresponds to the JSON property description

Returns:

  • (String)


247
248
249
# File 'generated/google/apis/surveys_v2/classes.rb', line 247

def description
  @description
end

#ownersArray<String>

List of email addresses for survey owners. Must contain at least the address of the user making the API call. Corresponds to the JSON property owners

Returns:

  • (Array<String>)


253
254
255
# File 'generated/google/apis/surveys_v2/classes.rb', line 253

def owners
  @owners
end

#questionsArray<Google::Apis::SurveysV2::SurveyQuestion>

List of questions defining the survey. Corresponds to the JSON property questions



258
259
260
# File 'generated/google/apis/surveys_v2/classes.rb', line 258

def questions
  @questions
end

#rejection_reasonGoogle::Apis::SurveysV2::SurveyRejection

Message representing why the survey was rejected from review, if it was. Corresponds to the JSON property rejectionReason



263
264
265
# File 'generated/google/apis/surveys_v2/classes.rb', line 263

def rejection_reason
  @rejection_reason
end

#stateString

State that the survey is in. Corresponds to the JSON property state

Returns:

  • (String)


268
269
270
# File 'generated/google/apis/surveys_v2/classes.rb', line 268

def state
  @state
end

#survey_url_idString

Unique survey ID, that is viewable in the URL of the Survey Creator UI Corresponds to the JSON property surveyUrlId

Returns:

  • (String)


273
274
275
# File 'generated/google/apis/surveys_v2/classes.rb', line 273

def survey_url_id
  @survey_url_id
end

#titleString

Optional name that will be given to the survey. Corresponds to the JSON property title

Returns:

  • (String)


278
279
280
# File 'generated/google/apis/surveys_v2/classes.rb', line 278

def title
  @title
end

#wanted_response_countFixnum

Number of responses desired for the survey. Corresponds to the JSON property wantedResponseCount

Returns:

  • (Fixnum)


283
284
285
# File 'generated/google/apis/surveys_v2/classes.rb', line 283

def wanted_response_count
  @wanted_response_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'generated/google/apis/surveys_v2/classes.rb', line 290

def update!(**args)
  @audience = args[:audience] if args.key?(:audience)
  @cost = args[:cost] if args.key?(:cost)
  @customer_data = args[:customer_data] if args.key?(:customer_data)
  @description = args[:description] if args.key?(:description)
  @owners = args[:owners] if args.key?(:owners)
  @questions = args[:questions] if args.key?(:questions)
  @rejection_reason = args[:rejection_reason] if args.key?(:rejection_reason)
  @state = args[:state] if args.key?(:state)
  @survey_url_id = args[:survey_url_id] if args.key?(:survey_url_id)
  @title = args[:title] if args.key?(:title)
  @wanted_response_count = args[:wanted_response_count] if args.key?(:wanted_response_count)
end