Beispiel #1
0
 /// <summary>
 /// Invoke action getByIds
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// Action parameters
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GetByIdsOKResponse> GetByIdsAsync(this IDirectoryObjectsOperations operations, Body body, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetByIdsWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Users             = new UsersOperations(this);
     Applications      = new ApplicationsOperations(this);
     ServicePrincipals = new ServicePrincipalsOperations(this);
     Groups            = new GroupsOperations(this);
     DirectoryObjects  = new DirectoryObjectsOperations(this);
     ApiVersion        = "v1.0";
     BaseUri           = new System.Uri("https://graph.microsoft.com");
     AcceptLanguage    = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
Beispiel #3
0
 /// <summary>
 /// Get entities from directoryObjects
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='consistencyLevel'>
 /// Indicates the requested consistency level. Documentation URL:
 /// https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
 /// </param>
 /// <param name='top'>
 /// Show only the first n items
 /// </param>
 /// <param name='skip'>
 /// Skip the first n items
 /// </param>
 /// <param name='search'>
 /// Search items by search phrases
 /// </param>
 /// <param name='filter'>
 /// Filter items by property values
 /// </param>
 /// <param name='count'>
 /// Include count of items
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ListDirectoryObjectOKResponse> ListDirectoryObjectAsync(this IDirectoryObjectsOperations operations, string consistencyLevel = default(string), int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListDirectoryObjectWithHttpMessagesAsync(consistencyLevel, top, skip, search, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Get entities from directoryObjects
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='consistencyLevel'>
 /// Indicates the requested consistency level. Documentation URL:
 /// https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
 /// </param>
 /// <param name='top'>
 /// Show only the first n items
 /// </param>
 /// <param name='skip'>
 /// Skip the first n items
 /// </param>
 /// <param name='search'>
 /// Search items by search phrases
 /// </param>
 /// <param name='filter'>
 /// Filter items by property values
 /// </param>
 /// <param name='count'>
 /// Include count of items
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static ListDirectoryObjectOKResponse ListDirectoryObject(this IDirectoryObjectsOperations operations, string consistencyLevel = default(string), int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.ListDirectoryObjectAsync(consistencyLevel, top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
Beispiel #5
0
 /// <summary>
 /// Update entity in directoryObjects
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='directoryObjectId'>
 /// key: id of directoryObject
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateDirectoryObjectAsync(this IDirectoryObjectsOperations operations, string directoryObjectId, MicrosoftGraphDirectoryObject body, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateDirectoryObjectWithHttpMessagesAsync(directoryObjectId, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #6
0
 /// <summary>
 /// Update entity in directoryObjects
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='directoryObjectId'>
 /// key: id of directoryObject
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 public static void UpdateDirectoryObject(this IDirectoryObjectsOperations operations, string directoryObjectId, MicrosoftGraphDirectoryObject body)
 {
     operations.UpdateDirectoryObjectAsync(directoryObjectId, body).GetAwaiter().GetResult();
 }
Beispiel #7
0
 /// <summary>
 /// Get entity from directoryObjects by key
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='directoryObjectId'>
 /// key: id of directoryObject
 /// </param>
 /// <param name='consistencyLevel'>
 /// Indicates the requested consistency level. Documentation URL:
 /// https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftGraphDirectoryObject> GetDirectoryObjectAsync(this IDirectoryObjectsOperations operations, string directoryObjectId, string consistencyLevel = default(string), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetDirectoryObjectWithHttpMessagesAsync(directoryObjectId, consistencyLevel, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #8
0
 /// <summary>
 /// Get entity from directoryObjects by key
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='directoryObjectId'>
 /// key: id of directoryObject
 /// </param>
 /// <param name='consistencyLevel'>
 /// Indicates the requested consistency level. Documentation URL:
 /// https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftGraphDirectoryObject GetDirectoryObject(this IDirectoryObjectsOperations operations, string directoryObjectId, string consistencyLevel = default(string), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetDirectoryObjectAsync(directoryObjectId, consistencyLevel, select, expand).GetAwaiter().GetResult());
 }
Beispiel #9
0
 /// <summary>
 /// Delete entity from directoryObjects
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='directoryObjectId'>
 /// key: id of directoryObject
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteDirectoryObjectAsync(this IDirectoryObjectsOperations operations, string directoryObjectId, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteDirectoryObjectWithHttpMessagesAsync(directoryObjectId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #10
0
 /// <summary>
 /// Delete entity from directoryObjects
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='directoryObjectId'>
 /// key: id of directoryObject
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 public static void DeleteDirectoryObject(this IDirectoryObjectsOperations operations, string directoryObjectId, string ifMatch = default(string))
 {
     operations.DeleteDirectoryObjectAsync(directoryObjectId, ifMatch).GetAwaiter().GetResult();
 }
Beispiel #11
0
 /// <summary>
 /// Invoke action getByIds
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// Action parameters
 /// </param>
 public static GetByIdsOKResponse GetByIds(this IDirectoryObjectsOperations operations, Body body)
 {
     return(operations.GetByIdsAsync(body).GetAwaiter().GetResult());
 }
Beispiel #12
0
 /// <summary>
 /// Add new entity to directoryObjects
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftGraphDirectoryObject> CreateDirectoryObjectAsync(this IDirectoryObjectsOperations operations, MicrosoftGraphDirectoryObject body, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateDirectoryObjectWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #13
0
 /// <summary>
 /// Add new entity to directoryObjects
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 public static MicrosoftGraphDirectoryObject CreateDirectoryObject(this IDirectoryObjectsOperations operations, MicrosoftGraphDirectoryObject body)
 {
     return(operations.CreateDirectoryObjectAsync(body).GetAwaiter().GetResult());
 }