Class: Google::Apis::SurveysV2::Survey
- Inherits:
-
Object
- Object
- Google::Apis::SurveysV2::Survey
- 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
-
#audience ⇒ Google::Apis::SurveysV2::SurveyAudience
Specifications for the target audience of a survey run through the API.
-
#cost ⇒ Google::Apis::SurveysV2::SurveyCost
Message defining the cost to run a given survey through API.
-
#customer_data ⇒ String
Additional information to store on behalf of the API consumer and associate with this question.
-
#description ⇒ String
Text description of the survey.
-
#owners ⇒ Array<String>
List of email addresses for survey owners.
-
#questions ⇒ Array<Google::Apis::SurveysV2::SurveyQuestion>
List of questions defining the survey.
-
#rejection_reason ⇒ Google::Apis::SurveysV2::SurveyRejection
Message representing why the survey was rejected from review, if it was.
-
#state ⇒ String
State that the survey is in.
-
#survey_url_id ⇒ String
Unique survey ID, that is viewable in the URL of the Survey Creator UI Corresponds to the JSON property
surveyUrlId
. -
#title ⇒ String
Optional name that will be given to the survey.
-
#wanted_response_count ⇒ Fixnum
Number of responses desired for the survey.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Survey
constructor
A new instance of Survey.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
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
#audience ⇒ Google::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 |
#cost ⇒ Google::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_data ⇒ String
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.
242 243 244 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 242 def customer_data @customer_data end |
#description ⇒ String
Text description of the survey.
Corresponds to the JSON property description
247 248 249 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 247 def description @description end |
#owners ⇒ Array<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
253 254 255 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 253 def owners @owners end |
#questions ⇒ Array<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_reason ⇒ Google::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 |
#state ⇒ String
State that the survey is in.
Corresponds to the JSON property state
268 269 270 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 268 def state @state end |
#survey_url_id ⇒ String
Unique survey ID, that is viewable in the URL of the Survey Creator UI
Corresponds to the JSON property surveyUrlId
273 274 275 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 273 def survey_url_id @survey_url_id end |
#title ⇒ String
Optional name that will be given to the survey.
Corresponds to the JSON property title
278 279 280 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 278 def title @title end |
#wanted_response_count ⇒ Fixnum
Number of responses desired for the survey.
Corresponds to the JSON property wantedResponseCount
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 |