-
Notifications
You must be signed in to change notification settings - Fork 450
/
TeamMemberPolicies.cs
183 lines (160 loc) · 7.41 KB
/
TeamMemberPolicies.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// <auto-generated>
// Auto-generated by StoneAPI, do not modify.
// </auto-generated>
namespace Dropbox.Api.TeamPolicies
{
using sys = System;
using col = System.Collections.Generic;
using re = System.Text.RegularExpressions;
using enc = Dropbox.Api.Stone;
/// <summary>
/// <para>Policies governing team members.</para>
/// </summary>
public class TeamMemberPolicies
{
#pragma warning disable 108
/// <summary>
/// <para>The encoder instance.</para>
/// </summary>
internal static enc.StructEncoder<TeamMemberPolicies> Encoder = new TeamMemberPoliciesEncoder();
/// <summary>
/// <para>The decoder instance.</para>
/// </summary>
internal static enc.StructDecoder<TeamMemberPolicies> Decoder = new TeamMemberPoliciesDecoder();
/// <summary>
/// <para>Initializes a new instance of the <see cref="TeamMemberPolicies" />
/// class.</para>
/// </summary>
/// <param name="sharing">Policies governing sharing.</param>
/// <param name="emmState">This describes the Enterprise Mobility Management (EMM)
/// state for this team. This information can be used to understand if an organization
/// is integrating with a third-party EMM vendor to further manage and apply
/// restrictions upon the team's Dropbox usage on mobile devices. This is a new feature
/// and in the future we'll be adding more new fields and additional
/// documentation.</param>
/// <param name="officeAddin">The admin policy around the Dropbox Office Add-In for
/// this team.</param>
/// <param name="suggestMembersPolicy">The team policy on if teammembers are allowed to
/// suggest users for admins to invite to the team.</param>
public TeamMemberPolicies(TeamSharingPolicies sharing,
EmmState emmState,
OfficeAddInPolicy officeAddin,
SuggestMembersPolicy suggestMembersPolicy)
{
if (sharing == null)
{
throw new sys.ArgumentNullException("sharing");
}
if (emmState == null)
{
throw new sys.ArgumentNullException("emmState");
}
if (officeAddin == null)
{
throw new sys.ArgumentNullException("officeAddin");
}
if (suggestMembersPolicy == null)
{
throw new sys.ArgumentNullException("suggestMembersPolicy");
}
this.Sharing = sharing;
this.EmmState = emmState;
this.OfficeAddin = officeAddin;
this.SuggestMembersPolicy = suggestMembersPolicy;
}
/// <summary>
/// <para>Initializes a new instance of the <see cref="TeamMemberPolicies" />
/// class.</para>
/// </summary>
/// <remarks>This is to construct an instance of the object when
/// deserializing.</remarks>
[sys.ComponentModel.EditorBrowsable(sys.ComponentModel.EditorBrowsableState.Never)]
public TeamMemberPolicies()
{
}
/// <summary>
/// <para>Policies governing sharing.</para>
/// </summary>
public TeamSharingPolicies Sharing { get; protected set; }
/// <summary>
/// <para>This describes the Enterprise Mobility Management (EMM) state for this team.
/// This information can be used to understand if an organization is integrating with a
/// third-party EMM vendor to further manage and apply restrictions upon the team's
/// Dropbox usage on mobile devices. This is a new feature and in the future we'll be
/// adding more new fields and additional documentation.</para>
/// </summary>
public EmmState EmmState { get; protected set; }
/// <summary>
/// <para>The admin policy around the Dropbox Office Add-In for this team.</para>
/// </summary>
public OfficeAddInPolicy OfficeAddin { get; protected set; }
/// <summary>
/// <para>The team policy on if teammembers are allowed to suggest users for admins to
/// invite to the team.</para>
/// </summary>
public SuggestMembersPolicy SuggestMembersPolicy { get; protected set; }
#region Encoder class
/// <summary>
/// <para>Encoder for <see cref="TeamMemberPolicies" />.</para>
/// </summary>
private class TeamMemberPoliciesEncoder : enc.StructEncoder<TeamMemberPolicies>
{
/// <summary>
/// <para>Encode fields of given value.</para>
/// </summary>
/// <param name="value">The value.</param>
/// <param name="writer">The writer.</param>
public override void EncodeFields(TeamMemberPolicies value, enc.IJsonWriter writer)
{
WriteProperty("sharing", value.Sharing, writer, global::Dropbox.Api.TeamPolicies.TeamSharingPolicies.Encoder);
WriteProperty("emm_state", value.EmmState, writer, global::Dropbox.Api.TeamPolicies.EmmState.Encoder);
WriteProperty("office_addin", value.OfficeAddin, writer, global::Dropbox.Api.TeamPolicies.OfficeAddInPolicy.Encoder);
WriteProperty("suggest_members_policy", value.SuggestMembersPolicy, writer, global::Dropbox.Api.TeamPolicies.SuggestMembersPolicy.Encoder);
}
}
#endregion
#region Decoder class
/// <summary>
/// <para>Decoder for <see cref="TeamMemberPolicies" />.</para>
/// </summary>
private class TeamMemberPoliciesDecoder : enc.StructDecoder<TeamMemberPolicies>
{
/// <summary>
/// <para>Create a new instance of type <see cref="TeamMemberPolicies" />.</para>
/// </summary>
/// <returns>The struct instance.</returns>
protected override TeamMemberPolicies Create()
{
return new TeamMemberPolicies();
}
/// <summary>
/// <para>Set given field.</para>
/// </summary>
/// <param name="value">The field value.</param>
/// <param name="fieldName">The field name.</param>
/// <param name="reader">The json reader.</param>
protected override void SetField(TeamMemberPolicies value, string fieldName, enc.IJsonReader reader)
{
switch (fieldName)
{
case "sharing":
value.Sharing = global::Dropbox.Api.TeamPolicies.TeamSharingPolicies.Decoder.Decode(reader);
break;
case "emm_state":
value.EmmState = global::Dropbox.Api.TeamPolicies.EmmState.Decoder.Decode(reader);
break;
case "office_addin":
value.OfficeAddin = global::Dropbox.Api.TeamPolicies.OfficeAddInPolicy.Decoder.Decode(reader);
break;
case "suggest_members_policy":
value.SuggestMembersPolicy = global::Dropbox.Api.TeamPolicies.SuggestMembersPolicy.Decoder.Decode(reader);
break;
default:
reader.Skip();
break;
}
}
}
#endregion
}
}