I'm reading our Google-Apps-User like this:
UsersResource.ListRequest userrequest = service.Users.List();
userrequest.MaxResults = 250;
userrequest.Customer = "xxxxxxx";
IList<User> gusers = userrequest.Execute().UsersValue;
foreach (var guser in gusers) { .... }
No problem so far, I get what I want except the CustomSchema fields. In the API-Explorer it's easy to set "projection" to "full" and everythin is fine, but in the C#-Code I don't get it how to do it.
If I try this:
userrequest.Projection = "FULL";
I get this hint:
UserResource.ListRequest.ProjectionEnum? ListRequest.Projection
I know for a true coder is this the solution, but I don't get it. What do I have to write to get the projection to "full"? Even in the source code from Google it's just the string (okay, I'm quite new to .Net-coding maybe I miss a lot here)
/// <summary>Restrict information returned to a set of selected fields. </summary>
[Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
public virtual System.Nullable<ProjectionEnum> Projection { get; set; }
/// <summary>Restrict information returned to a set of selected fields.</summary>
public enum ProjectionEnum
{
/// <summary>Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and
/// user)</summary>
[Google.Apis.Util.StringValueAttribute("BASIC")]
BASIC,
/// <summary>Includes all metadata fields</summary>
[Google.Apis.Util.StringValueAttribute("FULL")]
FULL,
}