/// <summary> /// Initializes a new instance of the <see cref="NewSimpleChoiceRequest" /> class. /// </summary> /// <param name="responses">responses (required).</param> /// <param name="choiceType">choiceType (required).</param> /// <param name="applicationId">applicationId (required).</param> /// <param name="applicationFeatureId">applicationFeatureId (required).</param> /// <param name="title">title (required).</param> /// <param name="imageItemId">imageItemId.</param> /// <param name="backgroundImageItemId">backgroundImageItemId.</param> /// <param name="audioItemId">audioItemId.</param> /// <param name="videoItemId">videoItemId.</param> /// <param name="followUpId">followUpId.</param> /// <param name="repromptId">repromptId.</param> /// <param name="mediaResponseContainerId">mediaResponseContainerId.</param> /// <param name="displayTextOverride">displayTextOverride.</param> /// <param name="displayTitleOverride">displayTitleOverride.</param> /// <param name="languageIds">languageIds.</param> public NewSimpleChoiceRequest(List <NewSimpleChoiceResponseRequest> responses = default(List <NewSimpleChoiceResponseRequest>), SimpleChoiceType choiceType = default(SimpleChoiceType), string applicationId = default(string), string applicationFeatureId = default(string), string title = default(string), string imageItemId = default(string), string backgroundImageItemId = default(string), string audioItemId = default(string), string videoItemId = default(string), string followUpId = default(string), string repromptId = default(string), string mediaResponseContainerId = default(string), string displayTextOverride = default(string), string displayTitleOverride = default(string), List <string> languageIds = default(List <string>)) { // to ensure "responses" is required (not null) if (responses == null) { throw new InvalidDataException("responses is a required property for NewSimpleChoiceRequest and cannot be null"); } else { this.Responses = responses; } // to ensure "choiceType" is required (not null) if (choiceType == null) { throw new InvalidDataException("choiceType is a required property for NewSimpleChoiceRequest and cannot be null"); } else { this.ChoiceType = choiceType; } // to ensure "applicationId" is required (not null) if (applicationId == null) { throw new InvalidDataException("applicationId is a required property for NewSimpleChoiceRequest and cannot be null"); } else { this.ApplicationId = applicationId; } // to ensure "applicationFeatureId" is required (not null) if (applicationFeatureId == null) { throw new InvalidDataException("applicationFeatureId is a required property for NewSimpleChoiceRequest and cannot be null"); } else { this.ApplicationFeatureId = applicationFeatureId; } // to ensure "title" is required (not null) if (title == null) { throw new InvalidDataException("title is a required property for NewSimpleChoiceRequest and cannot be null"); } else { this.Title = title; } this.ImageItemId = imageItemId; this.BackgroundImageItemId = backgroundImageItemId; this.AudioItemId = audioItemId; this.VideoItemId = videoItemId; this.FollowUpId = followUpId; this.RepromptId = repromptId; this.MediaResponseContainerId = mediaResponseContainerId; this.DisplayTextOverride = displayTextOverride; this.DisplayTitleOverride = displayTitleOverride; this.LanguageIds = languageIds; }
public void T1_SimpleChoice() { var obj = new SimpleChoiceType() { Tic = "tic", Tac = "tac" }; Assert.IsNull(obj.Tic); Assert.AreEqual("tac", obj.Tac); Assert.IsNull(obj.Toc); obj.Tic = "tic"; Assert.AreEqual("tic", obj.Tic); Assert.IsNull(obj.Tac); Assert.IsNull(obj.Toc); obj.Toc = "toc"; Assert.IsNull(obj.Tic); Assert.IsNull(obj.Tac); Assert.AreEqual("toc", obj.Toc); }