Vous pouvez spécifier les propriétés suivantes lorsque vous créez un virtualEventRegistrationCustomQuestion.
Propriété
Type
Description
answerChoices
String collection
Choix des réponses lorsque answerInputType est singleChoice ou multiChoice.
answerInputType
virtualEventRegistrationQuestionAnswerInputType
Type d’entrée de la réponse à la question d’inscription. Les valeurs prises en charge sont text, multilineText, multiChoicesingleChoice, , booleanet unknownFutureValue.
displayName
Chaîne
Nom d’affichage de la question d’inscription.
isRequired
Valeur booléenne
Indique si une réponse à la question est requise. La valeur par défaut est false.
Vous pouvez spécifier la propriété suivante lorsque vous créez un virtualEventRegistrationPredefinedQuestion.
Propriété
Type
Description
étiquette
virtualEventRegistrationPredefinedQuestionLabel
Étiquette de la question d’inscription prédéfinie. Les valeurs d’étiquette suivantes acceptent une seule ligne de texte : street, city, state, postalCode, countryOrRegion, industryjobTitle, , organization, et unknownFutureValue.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new VirtualEventRegistrationCustomQuestion
{
OdataType = "#microsoft.graph.virtualEventRegistrationCustomQuestion",
DisplayName = "What's your job position?",
AnswerInputType = VirtualEventRegistrationQuestionAnswerInputType.MultiChoice,
AnswerChoices = new List<string>
{
"Software Engineer",
"Engineer Manager",
"Product Manager",
},
};
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.VirtualEvents.Webinars["{virtualEventWebinar-id}"].RegistrationConfiguration.Questions.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewVirtualEventRegistrationQuestionBase()
displayName := "What's your job position?"
requestBody.SetDisplayName(&displayName)
answerInputType := graphmodels.MULTICHOICE_VIRTUALEVENTREGISTRATIONQUESTIONANSWERINPUTTYPE
requestBody.SetAnswerInputType(&answerInputType)
answerChoices := []string {
"Software Engineer",
"Engineer Manager",
"Product Manager",
}
requestBody.SetAnswerChoices(answerChoices)
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=go
questions, err := graphClient.Solutions().VirtualEvents().Webinars().ByVirtualEventWebinarId("virtualEventWebinar-id").RegistrationConfiguration().Questions().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
VirtualEventRegistrationCustomQuestion virtualEventRegistrationQuestionBase = new VirtualEventRegistrationCustomQuestion();
virtualEventRegistrationQuestionBase.setOdataType("#microsoft.graph.virtualEventRegistrationCustomQuestion");
virtualEventRegistrationQuestionBase.setDisplayName("What's your job position?");
virtualEventRegistrationQuestionBase.setAnswerInputType(VirtualEventRegistrationQuestionAnswerInputType.MultiChoice);
LinkedList<String> answerChoices = new LinkedList<String>();
answerChoices.add("Software Engineer");
answerChoices.add("Engineer Manager");
answerChoices.add("Product Manager");
virtualEventRegistrationQuestionBase.setAnswerChoices(answerChoices);
VirtualEventRegistrationQuestionBase result = graphClient.solutions().virtualEvents().webinars().byVirtualEventWebinarId("{virtualEventWebinar-id}").registrationConfiguration().questions().post(virtualEventRegistrationQuestionBase);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.virtual_event_registration_custom_question import VirtualEventRegistrationCustomQuestion
from msgraph.generated.models.virtual_event_registration_question_answer_input_type import VirtualEventRegistrationQuestionAnswerInputType
# To initialize your graph_client, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = VirtualEventRegistrationCustomQuestion(
odata_type = "#microsoft.graph.virtualEventRegistrationCustomQuestion",
display_name = "What's your job position?",
answer_input_type = VirtualEventRegistrationQuestionAnswerInputType.MultiChoice,
answer_choices = [
"Software Engineer",
"Engineer Manager",
"Product Manager",
],
)
result = await graph_client.solutions.virtual_events.webinars.by_virtual_event_webinar_id('virtualEventWebinar-id').registration_configuration.questions.post(request_body)
POST https://graph.microsoft.com/v1.0/solutions/virtualEvents/webinars/f4b39f1c-520e-4e75-805a-4b0f2016a0c6@a1a56d21-a8a6-4a6b-97f8-ced53d30f143/registrationConfiguration/questions
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.VirtualEvents.Webinars["{virtualEventWebinar-id}"].RegistrationConfiguration.Questions.PostAsync(null);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=go
questions, err := graphClient.Solutions().VirtualEvents().Webinars().ByVirtualEventWebinarId("virtualEventWebinar-id").RegistrationConfiguration().Questions().Post(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
VirtualEventRegistrationQuestionBase result = graphClient.solutions().virtualEvents().webinars().byVirtualEventWebinarId("{virtualEventWebinar-id}").registrationConfiguration().questions().post(null);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.solutions.virtual_events.webinars.by_virtual_event_webinar_id('virtualEventWebinar-id').registration_configuration.questions.post(None)