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



188
189
190
# File 'generated/google/apis/surveys_v2/classes.rb', line 188

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



132
133
134
# File 'generated/google/apis/surveys_v2/classes.rb', line 132

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



137
138
139
# File 'generated/google/apis/surveys_v2/classes.rb', line 137

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)


145
146
147
# File 'generated/google/apis/surveys_v2/classes.rb', line 145

def customer_data
  @customer_data
end

#descriptionString

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

Returns:

  • (String)


150
151
152
# File 'generated/google/apis/surveys_v2/classes.rb', line 150

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


156
157
158
# File 'generated/google/apis/surveys_v2/classes.rb', line 156

def owners
  @owners
end

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

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



161
162
163
# File 'generated/google/apis/surveys_v2/classes.rb', line 161

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



166
167
168
# File 'generated/google/apis/surveys_v2/classes.rb', line 166

def rejection_reason
  @rejection_reason
end

#stateString

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

Returns:

  • (String)


171
172
173
# File 'generated/google/apis/surveys_v2/classes.rb', line 171

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)


176
177
178
# File 'generated/google/apis/surveys_v2/classes.rb', line 176

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)


181
182
183
# File 'generated/google/apis/surveys_v2/classes.rb', line 181

def title
  @title
end

#wanted_response_countFixnum

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

Returns:

  • (Fixnum)


186
187
188
# File 'generated/google/apis/surveys_v2/classes.rb', line 186

def wanted_response_count
  @wanted_response_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'generated/google/apis/surveys_v2/classes.rb', line 193

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