All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softlayer.api.service.survey.Question Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service.survey;

import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.Survey;
import com.softlayer.api.service.survey.Answer;
import java.util.ArrayList;
import java.util.List;

/**
 * The SoftLayer_Survey_Question data type contains general information relating to a single SoftLayer survey question. 
 *
 * @see SoftLayer_Survey_Question
 */
@ApiType("SoftLayer_Survey_Question")
public class Question extends Entity {

    /**
     * The possible answers for a survey question.
     */
    @ApiProperty
    protected List answers;

    public List getAnswers() {
        if (answers == null) {
            answers = new ArrayList();
        }
        return answers;
    }

    /**
     * The survey that a question belongs to.
     */
    @ApiProperty
    protected Survey survey;

    public Survey getSurvey() {
        return survey;
    }

    public void setSurvey(Survey survey) {
        this.survey = survey;
    }

    /**
     * A survey question's Id.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        idSpecified = true;
        this.id = id;
    }

    protected boolean idSpecified;

    public boolean isIdSpecified() {
        return idSpecified;
    }

    public void unsetId() {
        id = null;
        idSpecified = false;
    }

    /**
     * A flag indicating that a survey question requires a response.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long isRequired;

    public Long getIsRequired() {
        return isRequired;
    }

    public void setIsRequired(Long isRequired) {
        isRequiredSpecified = true;
        this.isRequired = isRequired;
    }

    protected boolean isRequiredSpecified;

    public boolean isIsRequiredSpecified() {
        return isRequiredSpecified;
    }

    public void unsetIsRequired() {
        isRequired = null;
        isRequiredSpecified = false;
    }

    /**
     * A flag indicating that a survey question can have multiple answers responded to.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long multiAnswer;

    public Long getMultiAnswer() {
        return multiAnswer;
    }

    public void setMultiAnswer(Long multiAnswer) {
        multiAnswerSpecified = true;
        this.multiAnswer = multiAnswer;
    }

    protected boolean multiAnswerSpecified;

    public boolean isMultiAnswerSpecified() {
        return multiAnswerSpecified;
    }

    public void unsetMultiAnswer() {
        multiAnswer = null;
        multiAnswerSpecified = false;
    }

    /**
     * A survey question's question.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String question;

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        questionSpecified = true;
        this.question = question;
    }

    protected boolean questionSpecified;

    public boolean isQuestionSpecified() {
        return questionSpecified;
    }

    public void unsetQuestion() {
        question = null;
        questionSpecified = false;
    }

    /**
     * A value indicating the order in when a survey question will be asked.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long questionOrder;

    public Long getQuestionOrder() {
        return questionOrder;
    }

    public void setQuestionOrder(Long questionOrder) {
        questionOrderSpecified = true;
        this.questionOrder = questionOrder;
    }

    protected boolean questionOrderSpecified;

    public boolean isQuestionOrderSpecified() {
        return questionOrderSpecified;
    }

    public void unsetQuestionOrder() {
        questionOrder = null;
        questionOrderSpecified = false;
    }

    /**
     * A survey question's associated [[SoftLayer_Survey|Survey]] Id.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long surveyId;

    public Long getSurveyId() {
        return surveyId;
    }

    public void setSurveyId(Long surveyId) {
        surveyIdSpecified = true;
        this.surveyId = surveyId;
    }

    protected boolean surveyIdSpecified;

    public boolean isSurveyIdSpecified() {
        return surveyIdSpecified;
    }

    public void unsetSurveyId() {
        surveyId = null;
        surveyIdSpecified = false;
    }

    /**
     * A count of the possible answers for a survey question.
     */
    @ApiProperty
    protected Long answerCount;

    public Long getAnswerCount() {
        return answerCount;
    }

    public void setAnswerCount(Long answerCount) {
        this.answerCount = answerCount;
    }

    public static class Mask extends com.softlayer.api.service.Entity.Mask {

        public Answer.Mask answers() {
            return withSubMask("answers", Answer.Mask.class);
        }

        public com.softlayer.api.service.Survey.Mask survey() {
            return withSubMask("survey", com.softlayer.api.service.Survey.Mask.class);
        }

        public Mask id() {
            withLocalProperty("id");
            return this;
        }

        public Mask isRequired() {
            withLocalProperty("isRequired");
            return this;
        }

        public Mask multiAnswer() {
            withLocalProperty("multiAnswer");
            return this;
        }

        public Mask question() {
            withLocalProperty("question");
            return this;
        }

        public Mask questionOrder() {
            withLocalProperty("questionOrder");
            return this;
        }

        public Mask surveyId() {
            withLocalProperty("surveyId");
            return this;
        }

        public Mask answerCount() {
            withLocalProperty("answerCount");
            return this;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy