Packages

Surveys API client library. Creates and conducts surveys, lists the surveys that an authenticated user owns, and retrieves survey results and information about specified surveys.

Current section

Files

Jump to
google_api_surveys lib google_api surveys v2 model survey.ex
Raw

lib/google_api/surveys/v2/model/survey.ex

# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule GoogleApi.Surveys.V2.Model.Survey do
@moduledoc """
Representation of an individual survey object.
## Attributes
- audience (SurveyAudience): Targeting-criteria message containing demographic information Defaults to: `null`.
- cost (SurveyCost): Cost to run the survey and collect the necessary number of responses. Defaults to: `null`.
- customerData (binary()): 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. Defaults to: `null`.
- description (String.t): Text description of the survey. Defaults to: `null`.
- owners ([String.t]): List of email addresses for survey owners. Must contain at least the address of the user making the API call. Defaults to: `null`.
- questions ([SurveyQuestion]): List of questions defining the survey. Defaults to: `null`.
- rejectionReason (SurveyRejection): Reason for the survey being rejected. Only present if the survey state is rejected. Defaults to: `null`.
- state (String.t): State that the survey is in. Defaults to: `null`.
- surveyUrlId (String.t): Unique survey ID, that is viewable in the URL of the Survey Creator UI Defaults to: `null`.
- title (String.t): Optional name that will be given to the survey. Defaults to: `null`.
- wantedResponseCount (integer()): Number of responses desired for the survey. Defaults to: `null`.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:audience => GoogleApi.Surveys.V2.Model.SurveyAudience.t(),
:cost => GoogleApi.Surveys.V2.Model.SurveyCost.t(),
:customerData => any(),
:description => any(),
:owners => list(any()),
:questions => list(GoogleApi.Surveys.V2.Model.SurveyQuestion.t()),
:rejectionReason => GoogleApi.Surveys.V2.Model.SurveyRejection.t(),
:state => any(),
:surveyUrlId => any(),
:title => any(),
:wantedResponseCount => any()
}
field(:audience, as: GoogleApi.Surveys.V2.Model.SurveyAudience)
field(:cost, as: GoogleApi.Surveys.V2.Model.SurveyCost)
field(:customerData)
field(:description)
field(:owners, type: :list)
field(:questions, as: GoogleApi.Surveys.V2.Model.SurveyQuestion, type: :list)
field(:rejectionReason, as: GoogleApi.Surveys.V2.Model.SurveyRejection)
field(:state)
field(:surveyUrlId)
field(:title)
field(:wantedResponseCount)
end
defimpl Poison.Decoder, for: GoogleApi.Surveys.V2.Model.Survey do
def decode(value, options) do
GoogleApi.Surveys.V2.Model.Survey.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Surveys.V2.Model.Survey do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end