private static void AddGroupAliases(MASchemaType type) { AdapterCollection <string> aliasesList = new AdapterCollection <string> { Api = "groupaliases", AttributeName = "aliases", FieldName = "aliases", PropertyName = "Aliases", SupportsPatch = true, Operation = AttributeOperation.ImportExport }; type.AttributeAdapters.Add(aliasesList); AdapterCollection <string> nonEditableAliasesList = new AdapterCollection <string> { Api = "group", AttributeName = "nonEditableAliases", FieldName = "nonEditableAliases", PropertyName = "NonEditableAliases", SupportsPatch = false, Operation = AttributeOperation.ImportOnly }; type.AttributeAdapters.Add(nonEditableAliasesList); }
private static void AddGmailSettingsAttributes(MASchemaType type, IManagementAgentParameters config) { AdapterCollection <string> delegates = new AdapterCollection <string> { AttributeType = AttributeType.Reference, FieldName = null, Operation = AttributeOperation.ImportExport, AttributeName = $"{type.Name}_{SchemaConstants.Delegate}", PropertyName = "Delegates", Api = "userdelegates", SupportsPatch = true, }; type.AttributeAdapters.Add(delegates); AdapterCollection <string> sendas = new AdapterCollection <string> { AttributeType = AttributeType.String, FieldName = null, Operation = AttributeOperation.ImportExport, AttributeName = $"{type.Name}_{SchemaConstants.SendAs}", PropertyName = "SendAs", Api = "usersendas", SupportsPatch = true, }; type.AttributeAdapters.Add(sendas); }
private static void AddTeachers(MASchemaType type) { AdapterCollection <string> teachers = new AdapterCollection <string> { AttributeType = AttributeType.Reference, FieldName = "userId", Operation = AttributeOperation.ImportExport, AttributeName = "teachers", PropertyName = "Teachers", Api = "courseteachers", SupportsPatch = true }; type.AttributeAdapters.Add(teachers); }
private static void AddGroupMembersRaw(MASchemaType type) { AdapterCollection <string> members = new AdapterCollection <string> { AttributeType = AttributeType.String, FieldName = "email", Operation = AttributeOperation.ImportExport, AttributeName = "member_raw", PropertyName = "Members", Api = "groupmembership", SupportsPatch = true, }; type.AttributeAdapters.Add(members); AdapterCollection <string> managers = new AdapterCollection <string> { AttributeType = AttributeType.String, FieldName = "email", Operation = AttributeOperation.ImportExport, AttributeName = "manager_raw", PropertyName = "Managers", Api = "groupmembership", SupportsPatch = true, }; type.AttributeAdapters.Add(managers); AdapterCollection <string> owners = new AdapterCollection <string> { AttributeType = AttributeType.String, FieldName = "email", Operation = AttributeOperation.ImportExport, AttributeName = "owner_raw", PropertyName = "Owners", Api = "groupmembership", SupportsPatch = true, }; type.AttributeAdapters.Add(owners); }
public IEnumerable <MASchemaType> GetSchemaTypes(IManagementAgentParameters config) { MASchemaType type = new MASchemaType { AttributeAdapters = new List <IAttributeAdapter>(), Name = "domain", AnchorAttributeNames = new[] { SchemaConstants.DomainName }, SupportsPatch = false, }; type.ApiInterface = new ApiInterfaceDomain(config.CustomerID, type, config); AdapterPropertyValue domainName = new AdapterPropertyValue { AttributeType = AttributeType.String, FieldName = "domainName", IsMultivalued = false, Operation = AttributeOperation.ImportOnly, AttributeName = "domainName", PropertyName = "DomainName", Api = "domain", SupportsPatch = false, IsAnchor = true }; type.AttributeAdapters.Add(domainName); AdapterPropertyValue isPrimary = new AdapterPropertyValue { AttributeType = AttributeType.Boolean, FieldName = "isPrimary", IsMultivalued = false, Operation = AttributeOperation.ImportOnly, AttributeName = "isPrimary", PropertyName = "IsPrimary", Api = "domain", SupportsPatch = false, }; type.AttributeAdapters.Add(isPrimary); AdapterPropertyValue verified = new AdapterPropertyValue { AttributeType = AttributeType.Boolean, FieldName = "verified", IsMultivalued = false, Operation = AttributeOperation.ImportOnly, AttributeName = "verified", PropertyName = "Verified", Api = "domain", SupportsPatch = false, }; type.AttributeAdapters.Add(verified); AdapterCollection <string> domainAliases = new AdapterCollection <string> { Api = "domain", AttributeName = "domainAliases", FieldName = "domainAliases", PropertyName = "DomainAliasNames", SupportsPatch = false, AttributeType = AttributeType.String, Operation = AttributeOperation.ImportOnly }; type.AttributeAdapters.Add(domainAliases); yield return(type); }