-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
PersonalizerRankMultiSlotOptions.cs
75 lines (70 loc) · 3.55 KB
/
PersonalizerRankMultiSlotOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using Azure.Core;
namespace Azure.AI.Personalizer
{
/// <summary> The MultiSlotRankRequest. </summary>
public partial class PersonalizerRankMultiSlotOptions
{
/// <summary> Initializes a new instance of PersonalizerRankMultiSlotOptions. </summary>
/// <param name="actions">
/// The set of actions the Personalizer service can pick from.
/// The set should not contain more than 50 actions.
/// The order of the actions does not affect the rank result but the order
/// should match the sequence your application would have used to display them.
/// The first item in the array will be used as Baseline item in Offline Evaluations.
/// </param>
/// <param name="slots">
/// The set of slots the Personalizer service should select actions for.
/// The set should not contain more than 50 slots.
/// </param>
/// <exception cref="ArgumentNullException"> <paramref name="actions"/> or <paramref name="slots"/> is null. </exception>
public PersonalizerRankMultiSlotOptions(IEnumerable<PersonalizerRankableAction> actions, IEnumerable<PersonalizerSlotOptions> slots)
{
if (actions == null)
{
throw new ArgumentNullException(nameof(actions));
}
if (slots == null)
{
throw new ArgumentNullException(nameof(slots));
}
ContextFeatures = new ChangeTrackingList<object>();
Actions = actions.ToList();
Slots = slots.ToList();
}
/// <summary>
/// The set of actions the Personalizer service can pick from.
/// The set should not contain more than 50 actions.
/// The order of the actions does not affect the rank result but the order
/// should match the sequence your application would have used to display them.
/// The first item in the array will be used as Baseline item in Offline Evaluations.
/// </summary>
public IList<PersonalizerRankableAction> Actions { get; }
/// <summary>
/// The set of slots the Personalizer service should select actions for.
/// The set should not contain more than 50 slots.
/// </summary>
public IList<PersonalizerSlotOptions> Slots { get; }
/// <summary>
/// Optionally pass an eventId that uniquely identifies this Rank event.
/// If null, the service generates a unique eventId. The eventId will be used for
/// associating this request with its reward, as well as seeding the pseudo-random
/// generator when making a Personalizer call.
/// </summary>
public string EventId { get; set; }
/// <summary>
/// Send false if it is certain the rewardActionId in rank results will be shown to the user, therefore
/// Personalizer will expect a Reward call, otherwise it will assign the default
/// Reward to the event. Send true if it is possible the user will not see the action specified in the rank results,
/// (e.g. because the page is rendering later, or the Rank results may be overridden by code further downstream).
/// You must call the Activate Event API if the event output is shown to users, otherwise Rewards will be ignored.
/// </summary>
public bool? DeferActivation { get; set; }
}
}