public static string AsString(this SharingLinkTypeOptions option) { switch (option) { case SharingLinkTypeOptions.View: return("view"); case SharingLinkTypeOptions.Edit: return("edit"); case SharingLinkTypeOptions.Embed: return("embed"); default: throw new ArgumentOutOfRangeException(nameof(option), $"Unknown {option.GetType().Name} type supplied."); } }
public CreateSharingLinkRequest(SharingLinkTypeOptions type, SharingLinkScopeOptions scope) { Type = type.AsString(); Scope = scope.AsString(); }