- generate update for mail samples feature documenation

This commit is contained in:
Vincent Biret 2021-04-16 14:32:03 -04:00
Родитель 4ce7acd7cc
Коммит 45f3917dba
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 32426322EDFFB7E3
222 изменённых файлов: 6967 добавлений и 0 удалений

Просмотреть файл

@ -7,13 +7,18 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users;
namespace Graphdotnetv4 {
/// <summary>The main entry point of the SDK, exposes the configuration and the fluent API.</summary>
public class GraphClient {
public UsersRequestBuilder Users { get =>
new UsersRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "https://graph.microsoft.com/v1.0";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
}
}

Просмотреть файл

@ -4,11 +4,17 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class Attachment : Entity, IParsable<Attachment> {
/// <summary>The MIME type.</summary>
public string ContentType { get; set; }
/// <summary>true if the attachment is an inline attachment; otherwise, false.</summary>
public bool? IsInline { get; set; }
/// <summary>The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z</summary>
public string LastModifiedDateTime { get; set; }
/// <summary>The display name of the attachment. This does not need to be the actual file name.</summary>
public string Name { get; set; }
/// <summary>The length of the attachment in bytes.</summary>
public int? Size { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<Attachment, IParseNode>> DeserializeFields => new Dictionary<string, Action<Attachment, IParseNode>> {
{
"contentType", (o,n) => { o.ContentType = n.GetStringValue(); }
@ -26,6 +32,10 @@ namespace Graphdotnetv4.Users {
"size", (o,n) => { o.Size = n.GetIntValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteStringValue("contentType", ContentType);

Просмотреть файл

@ -4,8 +4,11 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class DateTimeTimeZone : IParsable<DateTimeTimeZone> {
/// <summary>A single point of time in a combined date and time representation ({date}T{time}). For example, '2019-04-16T09:00:00'.</summary>
public string DateTime { get; set; }
/// <summary>Represents a time zone, for example, 'Pacific Standard Time'. See below for possible values.</summary>
public string TimeZone { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<DateTimeTimeZone, IParseNode>> DeserializeFields => new Dictionary<string, Action<DateTimeTimeZone, IParseNode>> {
{
"dateTime", (o,n) => { o.DateTime = n.GetStringValue(); }
@ -14,6 +17,10 @@ namespace Graphdotnetv4.Users {
"timeZone", (o,n) => { o.TimeZone = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteStringValue("dateTime", DateTime);
writer.WriteStringValue("timeZone", TimeZone);

Просмотреть файл

@ -4,8 +4,11 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class EmailAddress : IParsable<EmailAddress> {
/// <summary>The email address of an entity instance.</summary>
public string Address { get; set; }
/// <summary>The display name of an entity instance.</summary>
public string Name { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<EmailAddress, IParseNode>> DeserializeFields => new Dictionary<string, Action<EmailAddress, IParseNode>> {
{
"address", (o,n) => { o.Address = n.GetStringValue(); }
@ -14,6 +17,10 @@ namespace Graphdotnetv4.Users {
"name", (o,n) => { o.Name = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteStringValue("address", Address);
writer.WriteStringValue("name", Name);

Просмотреть файл

@ -4,12 +4,18 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class Entity : IParsable<Entity> {
/// <summary>Read-only.</summary>
public string Id { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<Entity, IParseNode>> DeserializeFields => new Dictionary<string, Action<Entity, IParseNode>> {
{
"id", (o,n) => { o.Id = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteStringValue("id", Id);
}

Просмотреть файл

@ -4,8 +4,13 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class Extension : Entity, IParsable<Extension> {
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<Extension, IParseNode>> DeserializeFields => new Dictionary<string, Action<Extension, IParseNode>> {
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
}

Просмотреть файл

@ -8,6 +8,7 @@ namespace Graphdotnetv4.Users {
public DateTimeTimeZone DueDateTime { get; set; }
public FollowupFlagStatus? FlagStatus { get; set; }
public DateTimeTimeZone StartDateTime { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<FollowupFlag, IParseNode>> DeserializeFields => new Dictionary<string, Action<FollowupFlag, IParseNode>> {
{
"completedDateTime", (o,n) => { o.CompletedDateTime = n.GetObjectValue<DateTimeTimeZone>(); }
@ -22,6 +23,10 @@ namespace Graphdotnetv4.Users {
"startDateTime", (o,n) => { o.StartDateTime = n.GetObjectValue<DateTimeTimeZone>(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteObjectValue<DateTimeTimeZone>("completedDateTime", CompletedDateTime);
writer.WriteObjectValue<DateTimeTimeZone>("dueDateTime", DueDateTime);

Просмотреть файл

@ -4,12 +4,18 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users.InferenceClassification {
public class InferenceClassification : Entity, IParsable<InferenceClassification> {
/// <summary>A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.</summary>
public List<InferenceClassificationOverride> Overrides { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<InferenceClassification, IParseNode>> DeserializeFields => new Dictionary<string, Action<InferenceClassification, IParseNode>> {
{
"overrides", (o,n) => { o.Overrides = n.GetCollectionOfObjectValues<InferenceClassificationOverride>().ToList(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteCollectionOfObjectValues<InferenceClassificationOverride>("overrides", Overrides);

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.InferenceClassification {
public class InferenceClassificationOverride : Entity, IParsable<InferenceClassificationOverride> {
public InferenceClassificationType? ClassifyAs { get; set; }
public EmailAddress SenderEmailAddress { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<InferenceClassificationOverride, IParseNode>> DeserializeFields => new Dictionary<string, Action<InferenceClassificationOverride, IParseNode>> {
{
"classifyAs", (o,n) => { o.ClassifyAs = n.GetEnumValue<InferenceClassificationType>(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.InferenceClassification {
"senderEmailAddress", (o,n) => { o.SenderEmailAddress = n.GetObjectValue<EmailAddress>(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteEnumValue<InferenceClassificationType>("classifyAs", ClassifyAs);

Просмотреть файл

@ -7,16 +7,28 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.InferenceClassification.Overrides;
namespace Graphdotnetv4.Users.InferenceClassification {
/// <summary>Builds and executes requests for operations under \users\{user-id}\inferenceClassification</summary>
public class InferenceClassificationRequestBuilder {
public OverridesRequestBuilder Overrides { get =>
new OverridesRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
}
/// <summary>
/// Get inferenceClassification from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<InferenceClassification> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<InferenceClassification>(requestInfo, responseHandler);
}
/// <summary>
/// Get inferenceClassification from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +42,23 @@ namespace Graphdotnetv4.Users.InferenceClassification {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property inferenceClassification in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(InferenceClassification body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property inferenceClassification in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(InferenceClassification body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -45,12 +68,21 @@ namespace Graphdotnetv4.Users.InferenceClassification {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property inferenceClassification for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property inferenceClassification for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -59,12 +91,19 @@ namespace Graphdotnetv4.Users.InferenceClassification {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/inferenceClassification";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get inferenceClassification from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.InferenceClassification.Overrides.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\inferenceClassification\overrides\{inferenceClassificationOverride-id}</summary>
public class InferenceClassificationOverrideRequestBuilder {
/// <summary>
/// Get overrides from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<InferenceClassificationOverride> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<InferenceClassificationOverride>(requestInfo, responseHandler);
}
/// <summary>
/// Get overrides from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.InferenceClassification.Overrides.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property overrides in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(InferenceClassificationOverride body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property overrides in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(InferenceClassificationOverride body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.InferenceClassification.Overrides.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property overrides for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property overrides for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.InferenceClassification.Overrides.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get overrides from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.InferenceClassification.Overrides.Item;
namespace Graphdotnetv4.Users.InferenceClassification.Overrides {
/// <summary>Builds and executes requests for operations under \users\{user-id}\inferenceClassification\overrides</summary>
public class OverridesRequestBuilder {
/// <summary>Gets an item from the users.inferenceClassification.overrides collection</summary>
public InferenceClassificationOverrideRequestBuilder this[string position] { get {
return new InferenceClassificationOverrideRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get overrides from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<OverridesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<OverridesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get overrides from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.InferenceClassification.Overrides {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to overrides for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<InferenceClassificationOverride> PostAsync(InferenceClassificationOverride body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<InferenceClassificationOverride>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to overrides for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(InferenceClassificationOverride body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.InferenceClassification.Overrides {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/overrides";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get overrides from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.InferenceClassification.Overrides {
public class OverridesResponse : IParsable<OverridesResponse> {
public List<InferenceClassificationOverride> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<OverridesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<OverridesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<InferenceClassificationOverride>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.InferenceClassification.Overrides {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<InferenceClassificationOverride>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -4,8 +4,11 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class InternetMessageHeader : IParsable<InternetMessageHeader> {
/// <summary>Represents the key in a key-value pair.</summary>
public string Name { get; set; }
/// <summary>The value in a key-value pair.</summary>
public string Value { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<InternetMessageHeader, IParseNode>> DeserializeFields => new Dictionary<string, Action<InternetMessageHeader, IParseNode>> {
{
"name", (o,n) => { o.Name = n.GetStringValue(); }
@ -14,6 +17,10 @@ namespace Graphdotnetv4.Users {
"value", (o,n) => { o.Value = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteStringValue("name", Name);
writer.WriteStringValue("value", Value);

Просмотреть файл

@ -9,6 +9,7 @@ using Graphdotnetv4.Users.InferenceClassification;
using Graphdotnetv4.Users.MailFolders;
using Graphdotnetv4.Users.MailFolders.Messages;
namespace Graphdotnetv4.Users.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}</summary>
public class UserRequestBuilder {
public InferenceClassificationRequestBuilder InferenceClassification { get =>
new InferenceClassificationRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
@ -19,9 +20,13 @@ namespace Graphdotnetv4.Users.Item {
public MessagesRequestBuilder Messages { get =>
new MessagesRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
}
}

Просмотреть файл

@ -4,8 +4,10 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class ItemBody : IParsable<ItemBody> {
/// <summary>The content of the item.</summary>
public string Content { get; set; }
public BodyType? ContentType { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<ItemBody, IParseNode>> DeserializeFields => new Dictionary<string, Action<ItemBody, IParseNode>> {
{
"content", (o,n) => { o.Content = n.GetStringValue(); }
@ -14,6 +16,10 @@ namespace Graphdotnetv4.Users {
"contentType", (o,n) => { o.ContentType = n.GetEnumValue<BodyType>(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteStringValue("content", Content);
writer.WriteEnumValue<BodyType>("contentType", ContentType);

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Item;
namespace Graphdotnetv4.Users.MailFolders.ChildFolders {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\childFolders</summary>
public class ChildFoldersRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.childFolders collection</summary>
public MailFolderRequestBuilder this[string position] { get {
return new MailFolderRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get childFolders from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<ChildFoldersResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<ChildFoldersResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get childFolders from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.ChildFolders {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to childFolders for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MailFolder> PostAsync(MailFolder body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<MailFolder>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to childFolders for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(MailFolder body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.ChildFolders {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/childFolders";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get childFolders from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.ChildFolders {
public class ChildFoldersResponse : IParsable<ChildFoldersResponse> {
public List<MailFolder> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<ChildFoldersResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<ChildFoldersResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<MailFolder>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.ChildFolders {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<MailFolder>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.ChildFolders.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\childFolders\{mailFolder-id1}</summary>
public class MailFolderRequestBuilder {
/// <summary>
/// Get childFolders from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MailFolder> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MailFolder>(requestInfo, responseHandler);
}
/// <summary>
/// Get childFolders from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.MailFolders.ChildFolders.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property childFolders in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(MailFolder body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property childFolders in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(MailFolder body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.MailFolders.ChildFolders.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property childFolders for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property childFolders for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.MailFolders.ChildFolders.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get childFolders from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -11,6 +11,7 @@ using Graphdotnetv4.Users.MailFolders.Messages;
using Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties;
using Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties;
namespace Graphdotnetv4.Users.MailFolders.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}</summary>
public class MailFolderRequestBuilder {
public ChildFoldersRequestBuilder ChildFolders { get =>
new ChildFoldersRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
@ -27,12 +28,23 @@ namespace Graphdotnetv4.Users.MailFolders.Item {
public SingleValueExtendedPropertiesRequestBuilder SingleValueExtendedProperties { get =>
new SingleValueExtendedPropertiesRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
}
/// <summary>
/// Get mailFolders from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MailFolder> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MailFolder>(requestInfo, responseHandler);
}
/// <summary>
/// Get mailFolders from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -46,12 +58,23 @@ namespace Graphdotnetv4.Users.MailFolders.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property mailFolders in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(MailFolder body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property mailFolders in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(MailFolder body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -61,12 +84,21 @@ namespace Graphdotnetv4.Users.MailFolders.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property mailFolders for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property mailFolders for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -75,12 +107,19 @@ namespace Graphdotnetv4.Users.MailFolders.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get mailFolders from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -4,16 +4,27 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users.MailFolders {
public class MailFolder : Entity, IParsable<MailFolder> {
/// <summary>The number of immediate child mailFolders in the current mailFolder.</summary>
public int? ChildFolderCount { get; set; }
/// <summary>The mailFolder's display name.</summary>
public string DisplayName { get; set; }
/// <summary>The unique identifier for the mailFolder's parent mailFolder.</summary>
public string ParentFolderId { get; set; }
/// <summary>The number of items in the mailFolder.</summary>
public int? TotalItemCount { get; set; }
/// <summary>The number of items in the mailFolder marked as unread.</summary>
public int? UnreadItemCount { get; set; }
/// <summary>The collection of child folders in the mailFolder.</summary>
public List<MailFolder> ChildFolders { get; set; }
/// <summary>The collection of rules that apply to the user's Inbox folder.</summary>
public List<MessageRule> MessageRules { get; set; }
/// <summary>The collection of messages in the mailFolder.</summary>
public List<Message> Messages { get; set; }
/// <summary>The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable.</summary>
public List<MultiValueLegacyExtendedProperty> MultiValueExtendedProperties { get; set; }
/// <summary>The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable.</summary>
public List<SingleValueLegacyExtendedProperty> SingleValueExtendedProperties { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<MailFolder, IParseNode>> DeserializeFields => new Dictionary<string, Action<MailFolder, IParseNode>> {
{
"childFolderCount", (o,n) => { o.ChildFolderCount = n.GetIntValue(); }
@ -46,6 +57,10 @@ namespace Graphdotnetv4.Users.MailFolders {
"singleValueExtendedProperties", (o,n) => { o.SingleValueExtendedProperties = n.GetCollectionOfObjectValues<SingleValueLegacyExtendedProperty>().ToList(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteIntValue("childFolderCount", ChildFolderCount);

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Item;
namespace Graphdotnetv4.Users.MailFolders {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders</summary>
public class MailFoldersRequestBuilder {
/// <summary>Gets an item from the users.mailFolders collection</summary>
public MailFolderRequestBuilder this[string position] { get {
return new MailFolderRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get mailFolders from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MailFoldersResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MailFoldersResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get mailFolders from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to mailFolders for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MailFolder> PostAsync(MailFolder body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<MailFolder>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to mailFolders for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(MailFolder body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/mailFolders";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get mailFolders from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders {
public class MailFoldersResponse : IParsable<MailFoldersResponse> {
public List<MailFolder> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MailFoldersResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<MailFoldersResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<MailFolder>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<MailFolder>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,12 +6,18 @@ namespace Graphdotnetv4.Users.MailFolders {
public class MessageRule : Entity, IParsable<MessageRule> {
public MessageRuleActions Actions { get; set; }
public MessageRulePredicates Conditions { get; set; }
/// <summary>The display name of the rule.</summary>
public string DisplayName { get; set; }
public MessageRulePredicates Exceptions { get; set; }
/// <summary>Indicates whether the rule is in an error condition. Read-only.</summary>
public bool? HasError { get; set; }
/// <summary>Indicates whether the rule is enabled to be applied to messages.</summary>
public bool? IsEnabled { get; set; }
/// <summary>Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API.</summary>
public bool? IsReadOnly { get; set; }
/// <summary>Indicates the order in which the rule is executed, among other rules.</summary>
public int? Sequence { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<MessageRule, IParseNode>> DeserializeFields => new Dictionary<string, Action<MessageRule, IParseNode>> {
{
"actions", (o,n) => { o.Actions = n.GetObjectValue<MessageRuleActions>(); }
@ -38,6 +44,10 @@ namespace Graphdotnetv4.Users.MailFolders {
"sequence", (o,n) => { o.Sequence = n.GetIntValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteObjectValue<MessageRuleActions>("actions", Actions);

Просмотреть файл

@ -4,17 +4,28 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users.MailFolders {
public class MessageRuleActions : IParsable<MessageRuleActions> {
/// <summary>A list of categories to be assigned to a message.</summary>
public List<string> AssignCategories { get; set; }
/// <summary>The ID of a folder that a message is to be copied to.</summary>
public string CopyToFolder { get; set; }
/// <summary>Indicates whether a message should be moved to the Deleted Items folder.</summary>
public bool? Delete { get; set; }
/// <summary>The email addresses of the recipients to which a message should be forwarded as an attachment.</summary>
public List<Recipient> ForwardAsAttachmentTo { get; set; }
/// <summary>The email addresses of the recipients to which a message should be forwarded.</summary>
public List<Recipient> ForwardTo { get; set; }
/// <summary>Indicates whether a message should be marked as read.</summary>
public bool? MarkAsRead { get; set; }
public Importance? MarkImportance { get; set; }
/// <summary>The ID of the folder that a message will be moved to.</summary>
public string MoveToFolder { get; set; }
/// <summary>Indicates whether a message should be permanently deleted and not saved to the Deleted Items folder.</summary>
public bool? PermanentDelete { get; set; }
/// <summary>The email address to which a message should be redirected.</summary>
public List<Recipient> RedirectTo { get; set; }
/// <summary>Indicates whether subsequent rules should be evaluated.</summary>
public bool? StopProcessingRules { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MessageRuleActions, IParseNode>> DeserializeFields => new Dictionary<string, Action<MessageRuleActions, IParseNode>> {
{
"assignCategories", (o,n) => { o.AssignCategories = n.GetCollectionOfPrimitiveValues<string>().ToList(); }
@ -50,6 +61,10 @@ namespace Graphdotnetv4.Users.MailFolders {
"stopProcessingRules", (o,n) => { o.StopProcessingRules = n.GetBoolValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfPrimitiveValues<string>("assignCategories", AssignCategories);
writer.WriteStringValue("copyToFolder", CopyToFolder);

Просмотреть файл

@ -4,36 +4,63 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users.MailFolders {
public class MessageRulePredicates : IParsable<MessageRulePredicates> {
/// <summary>Represents the strings that should appear in the body of an incoming message in order for the condition or exception to apply.</summary>
public List<string> BodyContains { get; set; }
/// <summary>Represents the strings that should appear in the body or subject of an incoming message in order for the condition or exception to apply.</summary>
public List<string> BodyOrSubjectContains { get; set; }
/// <summary>Represents the categories that an incoming message should be labeled with in order for the condition or exception to apply.</summary>
public List<string> Categories { get; set; }
/// <summary>Represents the specific sender email addresses of an incoming message in order for the condition or exception to apply.</summary>
public List<Recipient> FromAddresses { get; set; }
/// <summary>Indicates whether an incoming message must have attachments in order for the condition or exception to apply.</summary>
public bool? HasAttachments { get; set; }
/// <summary>Represents the strings that appear in the headers of an incoming message in order for the condition or exception to apply.</summary>
public List<string> HeaderContains { get; set; }
public Importance? Importance { get; set; }
/// <summary>Indicates whether an incoming message must be an approval request in order for the condition or exception to apply.</summary>
public bool? IsApprovalRequest { get; set; }
/// <summary>Indicates whether an incoming message must be automatically forwarded in order for the condition or exception to apply.</summary>
public bool? IsAutomaticForward { get; set; }
/// <summary>Indicates whether an incoming message must be an auto reply in order for the condition or exception to apply.</summary>
public bool? IsAutomaticReply { get; set; }
/// <summary>Indicates whether an incoming message must be encrypted in order for the condition or exception to apply.</summary>
public bool? IsEncrypted { get; set; }
/// <summary>Indicates whether an incoming message must be a meeting request in order for the condition or exception to apply.</summary>
public bool? IsMeetingRequest { get; set; }
/// <summary>Indicates whether an incoming message must be a meeting response in order for the condition or exception to apply.</summary>
public bool? IsMeetingResponse { get; set; }
/// <summary>Indicates whether an incoming message must be a non-delivery report in order for the condition or exception to apply.</summary>
public bool? IsNonDeliveryReport { get; set; }
/// <summary>Indicates whether an incoming message must be permission controlled (RMS-protected) in order for the condition or exception to apply.</summary>
public bool? IsPermissionControlled { get; set; }
/// <summary>Indicates whether an incoming message must be a read receipt in order for the condition or exception to apply.</summary>
public bool? IsReadReceipt { get; set; }
/// <summary>Indicates whether an incoming message must be S/MIME-signed in order for the condition or exception to apply.</summary>
public bool? IsSigned { get; set; }
/// <summary>Indicates whether an incoming message must be a voice mail in order for the condition or exception to apply.</summary>
public bool? IsVoicemail { get; set; }
public MessageActionFlag? MessageActionFlag { get; set; }
/// <summary>Indicates whether the owner of the mailbox must not be a recipient of an incoming message in order for the condition or exception to apply.</summary>
public bool? NotSentToMe { get; set; }
/// <summary>Represents the strings that appear in either the toRecipients or ccRecipients properties of an incoming message in order for the condition or exception to apply.</summary>
public List<string> RecipientContains { get; set; }
/// <summary>Represents the strings that appear in the from property of an incoming message in order for the condition or exception to apply.</summary>
public List<string> SenderContains { get; set; }
public Sensitivity? Sensitivity { get; set; }
/// <summary>Indicates whether the owner of the mailbox must be in the ccRecipients property of an incoming message in order for the condition or exception to apply.</summary>
public bool? SentCcMe { get; set; }
/// <summary>Indicates whether the owner of the mailbox must be the only recipient in an incoming message in order for the condition or exception to apply.</summary>
public bool? SentOnlyToMe { get; set; }
/// <summary>Represents the email addresses that an incoming message must have been sent to in order for the condition or exception to apply.</summary>
public List<Recipient> SentToAddresses { get; set; }
/// <summary>Indicates whether the owner of the mailbox must be in the toRecipients property of an incoming message in order for the condition or exception to apply.</summary>
public bool? SentToMe { get; set; }
/// <summary>Indicates whether the owner of the mailbox must be in either a toRecipients or ccRecipients property of an incoming message in order for the condition or exception to apply.</summary>
public bool? SentToOrCcMe { get; set; }
/// <summary>Represents the strings that appear in the subject of an incoming message in order for the condition or exception to apply.</summary>
public List<string> SubjectContains { get; set; }
public SizeRange WithinSizeRange { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MessageRulePredicates, IParseNode>> DeserializeFields => new Dictionary<string, Action<MessageRulePredicates, IParseNode>> {
{
"bodyContains", (o,n) => { o.BodyContains = n.GetCollectionOfPrimitiveValues<string>().ToList(); }
@ -126,6 +153,10 @@ namespace Graphdotnetv4.Users.MailFolders {
"withinSizeRange", (o,n) => { o.WithinSizeRange = n.GetObjectValue<SizeRange>(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfPrimitiveValues<string>("bodyContains", BodyContains);
writer.WriteCollectionOfPrimitiveValues<string>("bodyOrSubjectContains", BodyOrSubjectContains);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.MessageRules.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messageRules\{messageRule-id}</summary>
public class MessageRuleRequestBuilder {
/// <summary>
/// Get messageRules from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MessageRule> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MessageRule>(requestInfo, responseHandler);
}
/// <summary>
/// Get messageRules from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.MailFolders.MessageRules.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property messageRules in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(MessageRule body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property messageRules in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(MessageRule body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.MailFolders.MessageRules.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property messageRules for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property messageRules for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.MailFolders.MessageRules.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get messageRules from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.MessageRules.Item;
namespace Graphdotnetv4.Users.MailFolders.MessageRules {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messageRules</summary>
public class MessageRulesRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.messageRules collection</summary>
public MessageRuleRequestBuilder this[string position] { get {
return new MessageRuleRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get messageRules from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MessageRulesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MessageRulesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get messageRules from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.MessageRules {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to messageRules for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MessageRule> PostAsync(MessageRule body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<MessageRule>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to messageRules for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(MessageRule body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.MessageRules {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/messageRules";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get messageRules from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.MessageRules {
public class MessageRulesResponse : IParsable<MessageRulesResponse> {
public List<MessageRule> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MessageRulesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<MessageRulesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<MessageRule>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.MessageRules {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<MessageRule>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.Attachments.Item;
namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\attachments</summary>
public class AttachmentsRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.messages.attachments collection</summary>
public AttachmentRequestBuilder this[string position] { get {
return new AttachmentRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get attachments from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<AttachmentsResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<AttachmentsResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get attachments from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to attachments for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Attachment> PostAsync(Attachment body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<Attachment>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to attachments for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(Attachment body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/attachments";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get attachments from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments {
public class AttachmentsResponse : IParsable<AttachmentsResponse> {
public List<Attachment> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<AttachmentsResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<AttachmentsResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<Attachment>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<Attachment>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\attachments\{attachment-id}</summary>
public class AttachmentRequestBuilder {
/// <summary>
/// Get attachments from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Attachment> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<Attachment>(requestInfo, responseHandler);
}
/// <summary>
/// Get attachments from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property attachments in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(Attachment body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property attachments in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(Attachment body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property attachments for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property attachments for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Attachments.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get attachments from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,13 +6,23 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.Messages.Content {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\$value</summary>
public class ContentRequestBuilder {
/// <summary>
/// Get media content for the navigation property messages from users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Stream> GetAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
h
);
return await HttpCore.SendPrimitiveAsync<Stream>(requestInfo, responseHandler);
}
/// <summary>
/// Get media content for the navigation property messages from users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -21,12 +31,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Content {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update media content for the navigation property messages in users
/// <param name="body">Binary request body</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PutAsync(Stream body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePutRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update media content for the navigation property messages in users
/// <param name="body">Binary request body</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePutRequestInfo(Stream body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PUT,
@ -36,9 +57,13 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Content {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/$value";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.Extensions.Item;
namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\extensions</summary>
public class ExtensionsRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.messages.extensions collection</summary>
public ExtensionRequestBuilder this[string position] { get {
return new ExtensionRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get extensions from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<ExtensionsResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<ExtensionsResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get extensions from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to extensions for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Extension> PostAsync(Extension body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<Extension>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to extensions for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(Extension body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/extensions";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get extensions from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions {
public class ExtensionsResponse : IParsable<ExtensionsResponse> {
public List<Extension> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<ExtensionsResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<ExtensionsResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<Extension>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<Extension>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\extensions\{extension-id}</summary>
public class ExtensionRequestBuilder {
/// <summary>
/// Get extensions from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Extension> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<Extension>(requestInfo, responseHandler);
}
/// <summary>
/// Get extensions from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property extensions in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(Extension body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property extensions in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(Extension body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property extensions for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property extensions for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Extensions.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get extensions from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -11,6 +11,7 @@ using Graphdotnetv4.Users.MailFolders.Messages.Extensions;
using Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties;
using Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties;
namespace Graphdotnetv4.Users.MailFolders.Messages.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}</summary>
public class MessageRequestBuilder {
public ContentRequestBuilder Content { get =>
new ContentRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
@ -27,12 +28,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Item {
public SingleValueExtendedPropertiesRequestBuilder SingleValueExtendedProperties { get =>
new SingleValueExtendedPropertiesRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
}
/// <summary>
/// Get messages from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Message> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<Message>(requestInfo, responseHandler);
}
/// <summary>
/// Get messages from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -46,12 +58,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property messages in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(Message body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property messages in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(Message body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -61,12 +84,21 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property messages for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property messages for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -75,12 +107,19 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get messages from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.Item;
namespace Graphdotnetv4.Users.MailFolders.Messages {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages</summary>
public class MessagesRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.messages collection</summary>
public MessageRequestBuilder this[string position] { get {
return new MessageRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get messages from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MessagesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MessagesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get messages from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to messages for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Message> PostAsync(Message body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<Message>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to messages for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(Message body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.Messages {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/messages";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get messages from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.Messages {
public class MessagesResponse : IParsable<MessagesResponse> {
public List<Message> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MessagesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<MessagesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<Message>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.Messages {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<Message>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\multiValueExtendedProperties\{multiValueLegacyExtendedProperty-id}</summary>
public class MultiValueLegacyExtendedPropertyRequestBuilder {
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueLegacyExtendedProperty> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MultiValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties.
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property multiValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property multiValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties.
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property multiValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property multiValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties.
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get multiValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties.Item;
namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\multiValueExtendedProperties</summary>
public class MultiValueExtendedPropertiesRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.messages.multiValueExtendedProperties collection</summary>
public MultiValueLegacyExtendedPropertyRequestBuilder this[string position] { get {
return new MultiValueLegacyExtendedPropertyRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueExtendedPropertiesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MultiValueExtendedPropertiesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to multiValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueLegacyExtendedProperty> PostAsync(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<MultiValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to multiValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/multiValueExtendedProperties";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get multiValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties
public class MultiValueExtendedPropertiesResponse : IParsable<MultiValueExtendedPropertiesResponse> {
public List<MultiValueLegacyExtendedProperty> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MultiValueExtendedPropertiesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<MultiValueExtendedPropertiesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<MultiValueLegacyExtendedProperty>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<MultiValueLegacyExtendedProperty>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\singleValueExtendedProperties\{singleValueLegacyExtendedProperty-id}</summary>
public class SingleValueLegacyExtendedPropertyRequestBuilder {
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueLegacyExtendedProperty> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<SingleValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property singleValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property singleValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property singleValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property singleValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get singleValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties.Item;
namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messages\{message-id}\singleValueExtendedProperties</summary>
public class SingleValueExtendedPropertiesRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.messages.singleValueExtendedProperties collection</summary>
public SingleValueLegacyExtendedPropertyRequestBuilder this[string position] { get {
return new SingleValueLegacyExtendedPropertyRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueExtendedPropertiesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<SingleValueExtendedPropertiesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to singleValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueLegacyExtendedProperty> PostAsync(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<SingleValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to singleValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/singleValueExtendedProperties";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get singleValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties
public class SingleValueExtendedPropertiesResponse : IParsable<SingleValueExtendedPropertiesResponse> {
public List<SingleValueLegacyExtendedProperty> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<SingleValueExtendedPropertiesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<SingleValueExtendedPropertiesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<SingleValueLegacyExtendedProperty>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<SingleValueLegacyExtendedProperty>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\multiValueExtendedProperties\{multiValueLegacyExtendedProperty-id}</summary>
public class MultiValueLegacyExtendedPropertyRequestBuilder {
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueLegacyExtendedProperty> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MultiValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property multiValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property multiValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property multiValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property multiValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get multiValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties.Item;
namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\multiValueExtendedProperties</summary>
public class MultiValueExtendedPropertiesRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.multiValueExtendedProperties collection</summary>
public MultiValueLegacyExtendedPropertyRequestBuilder this[string position] { get {
return new MultiValueLegacyExtendedPropertyRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueExtendedPropertiesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MultiValueExtendedPropertiesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to multiValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueLegacyExtendedProperty> PostAsync(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<MultiValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to multiValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/multiValueExtendedProperties";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get multiValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties {
public class MultiValueExtendedPropertiesResponse : IParsable<MultiValueExtendedPropertiesResponse> {
public List<MultiValueLegacyExtendedProperty> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MultiValueExtendedPropertiesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<MultiValueExtendedPropertiesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<MultiValueLegacyExtendedProperty>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.MultiValueExtendedProperties {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<MultiValueLegacyExtendedProperty>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\singleValueExtendedProperties\{singleValueLegacyExtendedProperty-id}</summary>
public class SingleValueLegacyExtendedPropertyRequestBuilder {
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueLegacyExtendedProperty> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<SingleValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property singleValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property singleValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property singleValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property singleValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get singleValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties.Item;
namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties {
/// <summary>Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\singleValueExtendedProperties</summary>
public class SingleValueExtendedPropertiesRequestBuilder {
/// <summary>Gets an item from the users.mailFolders.singleValueExtendedProperties collection</summary>
public SingleValueLegacyExtendedPropertyRequestBuilder this[string position] { get {
return new SingleValueLegacyExtendedPropertyRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueExtendedPropertiesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<SingleValueExtendedPropertiesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to singleValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueLegacyExtendedProperty> PostAsync(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<SingleValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to singleValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/singleValueExtendedProperties";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get singleValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties {
public class SingleValueExtendedPropertiesResponse : IParsable<SingleValueExtendedPropertiesResponse> {
public List<SingleValueLegacyExtendedProperty> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<SingleValueExtendedPropertiesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<SingleValueExtendedPropertiesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<SingleValueLegacyExtendedProperty>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.MailFolders.SingleValueExtendedProperties {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<SingleValueLegacyExtendedProperty>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -4,8 +4,11 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users.MailFolders {
public class SizeRange : IParsable<SizeRange> {
/// <summary>The maximum size (in kilobytes) that an incoming message must have in order for a condition or exception to apply.</summary>
public int? MaximumSize { get; set; }
/// <summary>The minimum size (in kilobytes) that an incoming message must have in order for a condition or exception to apply.</summary>
public int? MinimumSize { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<SizeRange, IParseNode>> DeserializeFields => new Dictionary<string, Action<SizeRange, IParseNode>> {
{
"maximumSize", (o,n) => { o.MaximumSize = n.GetIntValue(); }
@ -14,6 +17,10 @@ namespace Graphdotnetv4.Users.MailFolders {
"minimumSize", (o,n) => { o.MinimumSize = n.GetIntValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteIntValue("maximumSize", MaximumSize);
writer.WriteIntValue("minimumSize", MinimumSize);

Просмотреть файл

@ -4,36 +4,60 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class Message : OutlookItem, IParsable<Message> {
/// <summary>The Bcc: recipients for the message.</summary>
public List<Recipient> BccRecipients { get; set; }
public ItemBody Body { get; set; }
/// <summary>The first 255 characters of the message body. It is in text format. If the message contains instances of mention, this property would contain a concatenation of these mentions as well.</summary>
public string BodyPreview { get; set; }
/// <summary>The Cc: recipients for the message.</summary>
public List<Recipient> CcRecipients { get; set; }
/// <summary>The ID of the conversation the email belongs to.</summary>
public string ConversationId { get; set; }
/// <summary>Indicates the position of the message within the conversation.</summary>
public string ConversationIndex { get; set; }
public FollowupFlag Flag { get; set; }
public Recipient From { get; set; }
/// <summary>Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as <IMG src='cid:image001.jpg@01D26CD8.6C05F070'>.</summary>
public bool? HasAttachments { get; set; }
public Importance? Importance { get; set; }
public InferenceClassificationType? InferenceClassification { get; set; }
/// <summary>A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Returned only on applying a $select query option. Read-only.</summary>
public List<InternetMessageHeader> InternetMessageHeaders { get; set; }
/// <summary>The message ID in the format specified by RFC2822.</summary>
public string InternetMessageId { get; set; }
/// <summary>Indicates whether a read receipt is requested for the message.</summary>
public bool? IsDeliveryReceiptRequested { get; set; }
/// <summary>Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet.</summary>
public bool? IsDraft { get; set; }
/// <summary>Indicates whether the message has been read.</summary>
public bool? IsRead { get; set; }
/// <summary>Indicates whether a read receipt is requested for the message.</summary>
public bool? IsReadReceiptRequested { get; set; }
/// <summary>The unique identifier for the message's parent mailFolder.</summary>
public string ParentFolderId { get; set; }
/// <summary>The date and time the message was received. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.</summary>
public string ReceivedDateTime { get; set; }
/// <summary>The email addresses to use when replying.</summary>
public List<Recipient> ReplyTo { get; set; }
public Recipient Sender { get; set; }
/// <summary>The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.</summary>
public string SentDateTime { get; set; }
/// <summary>The subject of the message.</summary>
public string Subject { get; set; }
/// <summary>The To: recipients for the message.</summary>
public List<Recipient> ToRecipients { get; set; }
public ItemBody UniqueBody { get; set; }
/// <summary>The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, then the browser will show the message in the Outlook on the web review pane.The message will open in the browser if you are logged in to your mailbox via Outlook on the web. You will be prompted to login if you are not already logged in with the browser.This URL cannot be accessed from within an iFrame.</summary>
public string WebLink { get; set; }
/// <summary>The fileAttachment and itemAttachment attachments for the message.</summary>
public List<Attachment> Attachments { get; set; }
/// <summary>The collection of open extensions defined for the message. Nullable.</summary>
public List<Extension> Extensions { get; set; }
/// <summary>The collection of multi-value extended properties defined for the message. Nullable.</summary>
public List<MultiValueLegacyExtendedProperty> MultiValueExtendedProperties { get; set; }
/// <summary>The collection of single-value extended properties defined for the message. Nullable.</summary>
public List<SingleValueLegacyExtendedProperty> SingleValueExtendedProperties { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<Message, IParseNode>> DeserializeFields => new Dictionary<string, Action<Message, IParseNode>> {
{
"bccRecipients", (o,n) => { o.BccRecipients = n.GetCollectionOfObjectValues<Recipient>().ToList(); }
@ -126,6 +150,10 @@ namespace Graphdotnetv4.Users {
"singleValueExtendedProperties", (o,n) => { o.SingleValueExtendedProperties = n.GetCollectionOfObjectValues<SingleValueLegacyExtendedProperty>().ToList(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteCollectionOfObjectValues<Recipient>("bccRecipients", BccRecipients);

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.Attachments.Item;
namespace Graphdotnetv4.Users.Messages.Attachments {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\attachments</summary>
public class AttachmentsRequestBuilder {
/// <summary>Gets an item from the users.messages.attachments collection</summary>
public AttachmentRequestBuilder this[string position] { get {
return new AttachmentRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get attachments from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<AttachmentsResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<AttachmentsResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get attachments from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.Messages.Attachments {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to attachments for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Attachment> PostAsync(Attachment body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<Attachment>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to attachments for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(Attachment body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.Messages.Attachments {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/attachments";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get attachments from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.Messages.Attachments {
public class AttachmentsResponse : IParsable<AttachmentsResponse> {
public List<Attachment> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<AttachmentsResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<AttachmentsResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<Attachment>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.Messages.Attachments {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<Attachment>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Messages.Attachments.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\attachments\{attachment-id}</summary>
public class AttachmentRequestBuilder {
/// <summary>
/// Get attachments from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Attachment> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<Attachment>(requestInfo, responseHandler);
}
/// <summary>
/// Get attachments from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.Messages.Attachments.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property attachments in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(Attachment body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property attachments in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(Attachment body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.Messages.Attachments.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property attachments for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property attachments for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.Messages.Attachments.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get attachments from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,13 +6,23 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Messages.Content {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\$value</summary>
public class ContentRequestBuilder {
/// <summary>
/// Get media content for the navigation property messages from users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Stream> GetAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
h
);
return await HttpCore.SendPrimitiveAsync<Stream>(requestInfo, responseHandler);
}
/// <summary>
/// Get media content for the navigation property messages from users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -21,12 +31,23 @@ namespace Graphdotnetv4.Users.Messages.Content {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update media content for the navigation property messages in users
/// <param name="body">Binary request body</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PutAsync(Stream body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePutRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update media content for the navigation property messages in users
/// <param name="body">Binary request body</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePutRequestInfo(Stream body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PUT,
@ -36,9 +57,13 @@ namespace Graphdotnetv4.Users.Messages.Content {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/$value";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.Extensions.Item;
namespace Graphdotnetv4.Users.Messages.Extensions {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\extensions</summary>
public class ExtensionsRequestBuilder {
/// <summary>Gets an item from the users.messages.extensions collection</summary>
public ExtensionRequestBuilder this[string position] { get {
return new ExtensionRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get extensions from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<ExtensionsResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<ExtensionsResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get extensions from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.Messages.Extensions {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to extensions for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Extension> PostAsync(Extension body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<Extension>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to extensions for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(Extension body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.Messages.Extensions {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/extensions";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get extensions from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.Messages.Extensions {
public class ExtensionsResponse : IParsable<ExtensionsResponse> {
public List<Extension> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<ExtensionsResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<ExtensionsResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<Extension>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.Messages.Extensions {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<Extension>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Messages.Extensions.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\extensions\{extension-id}</summary>
public class ExtensionRequestBuilder {
/// <summary>
/// Get extensions from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Extension> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<Extension>(requestInfo, responseHandler);
}
/// <summary>
/// Get extensions from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.Messages.Extensions.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property extensions in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(Extension body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property extensions in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(Extension body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.Messages.Extensions.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property extensions for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property extensions for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.Messages.Extensions.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get extensions from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -11,6 +11,7 @@ using Graphdotnetv4.Users.MailFolders.Messages.Extensions;
using Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties;
using Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties;
namespace Graphdotnetv4.Users.Messages.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}</summary>
public class MessageRequestBuilder {
public ContentRequestBuilder Content { get =>
new ContentRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
@ -27,12 +28,23 @@ namespace Graphdotnetv4.Users.Messages.Item {
public SingleValueExtendedPropertiesRequestBuilder SingleValueExtendedProperties { get =>
new SingleValueExtendedPropertiesRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment };
}
/// <summary>
/// Get messages from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Message> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<Message>(requestInfo, responseHandler);
}
/// <summary>
/// Get messages from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -46,12 +58,23 @@ namespace Graphdotnetv4.Users.Messages.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property messages in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(Message body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property messages in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(Message body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -61,12 +84,21 @@ namespace Graphdotnetv4.Users.Messages.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property messages for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property messages for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -75,12 +107,19 @@ namespace Graphdotnetv4.Users.Messages.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get messages from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.Item;
namespace Graphdotnetv4.Users.Messages {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages</summary>
public class MessagesRequestBuilder {
/// <summary>Gets an item from the users.messages collection</summary>
public MessageRequestBuilder this[string position] { get {
return new MessageRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get messages from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MessagesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MessagesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get messages from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.Messages {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to messages for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<Message> PostAsync(Message body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<Message>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to messages for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(Message body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.Messages {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/messages";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get messages from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.Messages {
public class MessagesResponse : IParsable<MessagesResponse> {
public List<Message> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MessagesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<MessagesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<Message>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.Messages {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<Message>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\multiValueExtendedProperties\{multiValueLegacyExtendedProperty-id}</summary>
public class MultiValueLegacyExtendedPropertyRequestBuilder {
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueLegacyExtendedProperty> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MultiValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property multiValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property multiValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property multiValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property multiValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get multiValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.MultiValueExtendedProperties.Item;
namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\multiValueExtendedProperties</summary>
public class MultiValueExtendedPropertiesRequestBuilder {
/// <summary>Gets an item from the users.messages.multiValueExtendedProperties collection</summary>
public MultiValueLegacyExtendedPropertyRequestBuilder this[string position] { get {
return new MultiValueLegacyExtendedPropertyRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueExtendedPropertiesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<MultiValueExtendedPropertiesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get multiValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to multiValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<MultiValueLegacyExtendedProperty> PostAsync(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<MultiValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to multiValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(MultiValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/multiValueExtendedProperties";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get multiValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties {
public class MultiValueExtendedPropertiesResponse : IParsable<MultiValueExtendedPropertiesResponse> {
public List<MultiValueLegacyExtendedProperty> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<MultiValueExtendedPropertiesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<MultiValueExtendedPropertiesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<MultiValueLegacyExtendedProperty>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.Messages.MultiValueExtendedProperties {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<MultiValueLegacyExtendedProperty>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -6,13 +6,25 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties.Item {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\singleValueExtendedProperties\{singleValueLegacyExtendedProperty-id}</summary>
public class SingleValueLegacyExtendedPropertyRequestBuilder {
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueLegacyExtendedProperty> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<SingleValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -26,12 +38,23 @@ namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Update the navigation property singleValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task PatchAsync(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePatchRequestInfo(
body, h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Update the navigation property singleValueExtendedProperties in users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePatchRequestInfo(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.PATCH,
@ -41,12 +64,21 @@ namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Delete navigation property singleValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task DeleteAsync(Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateDeleteRequestInfo(
h
);
await HttpCore.SendNoContentAsync(requestInfo, responseHandler);
}
/// <summary>
/// Delete navigation property singleValueExtendedProperties for users
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateDeleteRequestInfo(Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.DELETE,
@ -55,12 +87,19 @@ namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties.Item {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get singleValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -7,16 +7,29 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.MailFolders.Messages.SingleValueExtendedProperties.Item;
namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties {
/// <summary>Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\singleValueExtendedProperties</summary>
public class SingleValueExtendedPropertiesRequestBuilder {
/// <summary>Gets an item from the users.messages.singleValueExtendedProperties collection</summary>
public SingleValueLegacyExtendedPropertyRequestBuilder this[string position] { get {
return new SingleValueLegacyExtendedPropertyRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueExtendedPropertiesResponse> GetAsync(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreateGetRequestInfo(
q, h
);
return await HttpCore.SendAsync<SingleValueExtendedPropertiesResponse>(requestInfo, responseHandler);
}
/// <summary>
/// Get singleValueExtendedProperties from users
/// <param name="q">Request query parameters</param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreateGetRequestInfo(Action<GetQueryParameters> q = default, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.GET,
@ -30,12 +43,23 @@ namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>
/// Create new navigation property to singleValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// <param name="responseHandler">Response handler to use in place of the default response handling provided by the core service</param>
/// </summary>
public async Task<SingleValueLegacyExtendedProperty> PostAsync(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default, IResponseHandler responseHandler = default) {
var requestInfo = CreatePostRequestInfo(
body, h
);
return await HttpCore.SendAsync<SingleValueLegacyExtendedProperty>(requestInfo, responseHandler);
}
/// <summary>
/// Create new navigation property to singleValueExtendedProperties for users
/// <param name="body"></param>
/// <param name="h">Request headers</param>
/// </summary>
public RequestInfo CreatePostRequestInfo(SingleValueLegacyExtendedProperty body, Action<IDictionary<string, string>> h = default) {
var requestInfo = new RequestInfo {
HttpMethod = HttpMethod.POST,
@ -45,18 +69,31 @@ namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties {
h?.Invoke(requestInfo.Headers);
return requestInfo;
}
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/singleValueExtendedProperties";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
/// <summary>Get singleValueExtendedProperties from users</summary>
public class GetQueryParameters : QueryParametersBase {
/// <summary>Show only the first n items</summary>
public int? Top { get; set; }
/// <summary>Skip the first n items</summary>
public int? Skip { get; set; }
/// <summary>Search items by search phrases</summary>
public string Search { get; set; }
/// <summary>Filter items by property values</summary>
public string Filter { get; set; }
/// <summary>Include count of items</summary>
public bool? Count { get; set; }
/// <summary>Order items by property values</summary>
public string[] Orderby { get; set; }
/// <summary>Select properties to be returned</summary>
public string[] Select { get; set; }
/// <summary>Expand related entities</summary>
public string[] Expand { get; set; }
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties {
public class SingleValueExtendedPropertiesResponse : IParsable<SingleValueExtendedPropertiesResponse> {
public List<SingleValueLegacyExtendedProperty> Value { get; set; }
public string NextLink { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<SingleValueExtendedPropertiesResponse, IParseNode>> DeserializeFields => new Dictionary<string, Action<SingleValueExtendedPropertiesResponse, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfObjectValues<SingleValueLegacyExtendedProperty>().ToList(); }
@ -14,6 +15,10 @@ namespace Graphdotnetv4.Users.Messages.SingleValueExtendedProperties {
"nextLink", (o,n) => { o.NextLink = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteCollectionOfObjectValues<SingleValueLegacyExtendedProperty>("value", Value);
writer.WriteStringValue("nextLink", NextLink);

Просмотреть файл

@ -4,12 +4,18 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class MultiValueLegacyExtendedProperty : Entity, IParsable<MultiValueLegacyExtendedProperty> {
/// <summary>A collection of property values.</summary>
public List<string> Value { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<MultiValueLegacyExtendedProperty, IParseNode>> DeserializeFields => new Dictionary<string, Action<MultiValueLegacyExtendedProperty, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetCollectionOfPrimitiveValues<string>().ToList(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteCollectionOfPrimitiveValues<string>("value", Value);

Просмотреть файл

@ -4,10 +4,15 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class OutlookItem : Entity, IParsable<OutlookItem> {
/// <summary>The categories associated with the item</summary>
public List<string> Categories { get; set; }
/// <summary>Identifies the version of the item. Every time the item is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only.</summary>
public string ChangeKey { get; set; }
/// <summary>The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z</summary>
public string CreatedDateTime { get; set; }
/// <summary>The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z</summary>
public string LastModifiedDateTime { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<OutlookItem, IParseNode>> DeserializeFields => new Dictionary<string, Action<OutlookItem, IParseNode>> {
{
"categories", (o,n) => { o.Categories = n.GetCollectionOfPrimitiveValues<string>().ToList(); }
@ -22,6 +27,10 @@ namespace Graphdotnetv4.Users {
"lastModifiedDateTime", (o,n) => { o.LastModifiedDateTime = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteCollectionOfPrimitiveValues<string>("categories", Categories);

Просмотреть файл

@ -5,11 +5,16 @@ using System.Linq;
namespace Graphdotnetv4.Users {
public class Recipient : IParsable<Recipient> {
public EmailAddress EmailAddress { get; set; }
/// <summary>The serialization information for the current model</summary>
public IDictionary<string, Action<Recipient, IParseNode>> DeserializeFields => new Dictionary<string, Action<Recipient, IParseNode>> {
{
"emailAddress", (o,n) => { o.EmailAddress = n.GetObjectValue<EmailAddress>(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
writer.WriteObjectValue<EmailAddress>("emailAddress", EmailAddress);
}

Просмотреть файл

@ -4,12 +4,18 @@ using System.Collections.Generic;
using System.Linq;
namespace Graphdotnetv4.Users {
public class SingleValueLegacyExtendedProperty : Entity, IParsable<SingleValueLegacyExtendedProperty> {
/// <summary>A property value.</summary>
public string Value { get; set; }
/// <summary>The serialization information for the current model</summary>
public new IDictionary<string, Action<SingleValueLegacyExtendedProperty, IParseNode>> DeserializeFields => new Dictionary<string, Action<SingleValueLegacyExtendedProperty, IParseNode>> {
{
"value", (o,n) => { o.Value = n.GetStringValue(); }
},
};
/// <summary>
/// Serialiazes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public new void Serialize(ISerializationWriter writer) {
base.Serialize(writer);
writer.WriteStringValue("value", Value);

Просмотреть файл

@ -7,13 +7,19 @@ using System.Linq;
using System.Threading.Tasks;
using Graphdotnetv4.Users.Item;
namespace Graphdotnetv4.Users {
/// <summary>Builds and executes requests for operations under \users</summary>
public class UsersRequestBuilder {
/// <summary>Gets an item from the users collection</summary>
public UserRequestBuilder this[string position] { get {
return new UserRequestBuilder { HttpCore = HttpCore, SerializerFactory = SerializerFactory, CurrentPath = CurrentPath + PathSegment + "/" + position};
} }
/// <summary>Path segment to use to build the URL for the current request builder</summary>
private string PathSegment { get; } = "/users";
/// <summary>Current path for the request</summary>
public string CurrentPath { get; set; }
/// <summary>Core service to use to execute the requests</summary>
public IHttpCore HttpCore { get; set; }
/// <summary>Factory to use to get a serializer for payload serialization</summary>
public Func<string, ISerializationWriter> SerializerFactory { get; set; }
}
}

Просмотреть файл

@ -14,6 +14,7 @@ import java.net.URISyntaxException;
import java.util.function.Function;
import java.util.Map;
import java.util.Objects;
/** The main entry point of the SDK, exposes the configuration and the fluent API. */
public class GraphClient {
@javax.annotation.Nonnull
public UsersRequestBuilder users() {
@ -21,14 +22,23 @@ public class GraphClient {
final HttpCore parentCore = httpCore;
return new UsersRequestBuilder() {{ currentPath = parentPath; httpCore = parentCore; }};
}
/** Path segment to use to build the URL for the current request builder */
@javax.annotation.Nonnull
private final String pathSegment = "https://graph.microsoft.com/v1.0";
/** Current path for the request */
@javax.annotation.Nullable
public String currentPath;
/** Core service to use to execute the requests */
@javax.annotation.Nullable
public HttpCore httpCore;
/** Factory to use to get a serializer for payload serialization */
@javax.annotation.Nullable
public Function<String, SerializationWriter> serializerFactory;
/**
* Gets an item from the users collection
* @param id Unique identifier of the item
* @return a UserRequestBuilder
*/
@javax.annotation.Nonnull
public UserRequestBuilder users(@javax.annotation.Nonnull final String id) {
Objects.requireNonNull(id);

Просмотреть файл

@ -8,16 +8,26 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class Attachment extends Entity implements Parsable {
/** The MIME type. */
@javax.annotation.Nullable
public String contentType;
/** true if the attachment is an inline attachment; otherwise, false. */
@javax.annotation.Nullable
public Boolean isInline;
/** The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z */
@javax.annotation.Nullable
public String lastModifiedDateTime;
/** The display name of the attachment. This does not need to be the actual file name. */
@javax.annotation.Nullable
public String name;
/** The length of the attachment in bytes. */
@javax.annotation.Nullable
public Integer size;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
@ -27,6 +37,10 @@ public class Attachment extends Entity implements Parsable {
writer.writeStringValue("name", name);
writer.writeIntegerValue("size", size);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -8,15 +8,26 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class DateTimeTimeZone implements Parsable {
/** A single point of time in a combined date and time representation ({date}T{time}). For example, '2019-04-16T09:00:00'. */
@javax.annotation.Nullable
public String dateTime;
/** Represents a time zone, for example, 'Pacific Standard Time'. See below for possible values. */
@javax.annotation.Nullable
public String timeZone;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("dateTime", dateTime);
writer.writeStringValue("timeZone", timeZone);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(2);

Просмотреть файл

@ -8,15 +8,26 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class EmailAddress implements Parsable {
/** The email address of an entity instance. */
@javax.annotation.Nullable
public String address;
/** The display name of an entity instance. */
@javax.annotation.Nullable
public String name;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("address", address);
writer.writeStringValue("name", name);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(2);

Просмотреть файл

@ -8,12 +8,22 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class Entity implements Parsable {
/** Read-only. */
@javax.annotation.Nullable
public String id;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("id", id);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(1);

Просмотреть файл

@ -8,10 +8,19 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class Extension extends Entity implements Parsable {
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -16,6 +16,11 @@ public class FollowupFlag implements Parsable {
public FollowupFlagStatus flagStatus;
@javax.annotation.Nullable
public DateTimeTimeZone startDateTime;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeObjectValue("completedDateTime", completedDateTime);
@ -23,6 +28,10 @@ public class FollowupFlag implements Parsable {
writer.writeEnumValue("flagStatus", flagStatus);
writer.writeObjectValue("startDateTime", startDateTime);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(4);

Просмотреть файл

@ -8,15 +8,26 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class InternetMessageHeader implements Parsable {
/** Represents the key in a key-value pair. */
@javax.annotation.Nullable
public String name;
/** The value in a key-value pair. */
@javax.annotation.Nullable
public String value;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("name", name);
writer.writeStringValue("value", value);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(2);

Просмотреть файл

@ -8,15 +8,25 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class ItemBody implements Parsable {
/** The content of the item. */
@javax.annotation.Nullable
public String content;
@javax.annotation.Nullable
public BodyType contentType;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("content", content);
writer.writeEnumValue("contentType", contentType);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(2);

Просмотреть файл

@ -9,66 +9,94 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
public class Message extends OutlookItem implements Parsable {
/** The Bcc: recipients for the message. */
@javax.annotation.Nullable
public List<Recipient> bccRecipients;
@javax.annotation.Nullable
public ItemBody body;
/** The first 255 characters of the message body. It is in text format. If the message contains instances of mention, this property would contain a concatenation of these mentions as well. */
@javax.annotation.Nullable
public String bodyPreview;
/** The Cc: recipients for the message. */
@javax.annotation.Nullable
public List<Recipient> ccRecipients;
/** The ID of the conversation the email belongs to. */
@javax.annotation.Nullable
public String conversationId;
/** Indicates the position of the message within the conversation. */
@javax.annotation.Nullable
public String conversationIndex;
@javax.annotation.Nullable
public FollowupFlag flag;
@javax.annotation.Nullable
public Recipient from;
/** Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as <IMG src='cid:image001.jpg@01D26CD8.6C05F070'>. */
@javax.annotation.Nullable
public Boolean hasAttachments;
@javax.annotation.Nullable
public Importance importance;
@javax.annotation.Nullable
public InferenceClassificationType inferenceClassification;
/** A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Returned only on applying a $select query option. Read-only. */
@javax.annotation.Nullable
public List<InternetMessageHeader> internetMessageHeaders;
/** The message ID in the format specified by RFC2822. */
@javax.annotation.Nullable
public String internetMessageId;
/** Indicates whether a read receipt is requested for the message. */
@javax.annotation.Nullable
public Boolean isDeliveryReceiptRequested;
/** Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet. */
@javax.annotation.Nullable
public Boolean isDraft;
/** Indicates whether the message has been read. */
@javax.annotation.Nullable
public Boolean isRead;
/** Indicates whether a read receipt is requested for the message. */
@javax.annotation.Nullable
public Boolean isReadReceiptRequested;
/** The unique identifier for the message's parent mailFolder. */
@javax.annotation.Nullable
public String parentFolderId;
/** The date and time the message was received. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. */
@javax.annotation.Nullable
public String receivedDateTime;
/** The email addresses to use when replying. */
@javax.annotation.Nullable
public List<Recipient> replyTo;
@javax.annotation.Nullable
public Recipient sender;
/** The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. */
@javax.annotation.Nullable
public String sentDateTime;
/** The subject of the message. */
@javax.annotation.Nullable
public String subject;
/** The To: recipients for the message. */
@javax.annotation.Nullable
public List<Recipient> toRecipients;
@javax.annotation.Nullable
public ItemBody uniqueBody;
/** The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, then the browser will show the message in the Outlook on the web review pane.The message will open in the browser if you are logged in to your mailbox via Outlook on the web. You will be prompted to login if you are not already logged in with the browser.This URL cannot be accessed from within an iFrame. */
@javax.annotation.Nullable
public String webLink;
/** The fileAttachment and itemAttachment attachments for the message. */
@javax.annotation.Nullable
public List<Attachment> attachments;
/** The collection of open extensions defined for the message. Nullable. */
@javax.annotation.Nullable
public List<Extension> extensions;
/** The collection of multi-value extended properties defined for the message. Nullable. */
@javax.annotation.Nullable
public List<MultiValueLegacyExtendedProperty> multiValueExtendedProperties;
/** The collection of single-value extended properties defined for the message. Nullable. */
@javax.annotation.Nullable
public List<SingleValueLegacyExtendedProperty> singleValueExtendedProperties;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
@ -103,6 +131,10 @@ public class Message extends OutlookItem implements Parsable {
writer.writeCollectionOfObjectValues("multiValueExtendedProperties", multiValueExtendedProperties);
writer.writeCollectionOfObjectValues("singleValueExtendedProperties", singleValueExtendedProperties);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -9,13 +9,23 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
public class MultiValueLegacyExtendedProperty extends Entity implements Parsable {
/** A collection of property values. */
@javax.annotation.Nullable
public List<String> value;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
writer.writeCollectionOfPrimitiveValues("value", value);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -9,14 +9,23 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
public class OutlookItem extends Entity implements Parsable {
/** The categories associated with the item */
@javax.annotation.Nullable
public List<String> categories;
/** Identifies the version of the item. Every time the item is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. */
@javax.annotation.Nullable
public String changeKey;
/** The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z */
@javax.annotation.Nullable
public String createdDateTime;
/** The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z */
@javax.annotation.Nullable
public String lastModifiedDateTime;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
@ -25,6 +34,10 @@ public class OutlookItem extends Entity implements Parsable {
writer.writeStringValue("createdDateTime", createdDateTime);
writer.writeStringValue("lastModifiedDateTime", lastModifiedDateTime);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -10,10 +10,19 @@ import java.util.Objects;
public class Recipient implements Parsable {
@javax.annotation.Nullable
public EmailAddress emailAddress;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeObjectValue("emailAddress", emailAddress);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(1);

Просмотреть файл

@ -8,13 +8,23 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class SingleValueLegacyExtendedProperty extends Entity implements Parsable {
/** A property value. */
@javax.annotation.Nullable
public String value;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
writer.writeStringValue("value", value);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -11,13 +11,18 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.util.function.Function;
import java.util.Map;
/** Builds and executes requests for operations under /users */
public class UsersRequestBuilder {
/** Path segment to use to build the URL for the current request builder */
@javax.annotation.Nonnull
private final String pathSegment = "/users";
/** Current path for the request */
@javax.annotation.Nullable
public String currentPath;
/** Core service to use to execute the requests */
@javax.annotation.Nullable
public HttpCore httpCore;
/** Factory to use to get a serializer for payload serialization */
@javax.annotation.Nullable
public Function<String, SerializationWriter> serializerFactory;
}

Просмотреть файл

@ -10,13 +10,23 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
public class InferenceClassification extends Entity implements Parsable {
/** A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. */
@javax.annotation.Nullable
public List<InferenceClassificationOverride> overrides;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
writer.writeCollectionOfObjectValues("overrides", overrides);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -15,12 +15,21 @@ public class InferenceClassificationOverride extends Entity implements Parsable
public InferenceClassificationType classifyAs;
@javax.annotation.Nullable
public EmailAddress senderEmailAddress;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
writer.writeEnumValue("classifyAs", classifyAs);
writer.writeObjectValue("senderEmailAddress", senderEmailAddress);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -14,6 +14,7 @@ import java.net.URISyntaxException;
import java.util.function.Function;
import java.util.Map;
import java.util.Objects;
/** Builds and executes requests for operations under /users/{user-id}/inferenceClassification */
public class InferenceClassificationRequestBuilder {
@javax.annotation.Nonnull
public OverridesRequestBuilder overrides() {
@ -21,6 +22,13 @@ public class InferenceClassificationRequestBuilder {
final HttpCore parentCore = httpCore;
return new OverridesRequestBuilder() {{ currentPath = parentPath; httpCore = parentCore; }};
}
/**
* Get inferenceClassification from users
* @param q Request query parameters
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of InferenceClassification
*/
public java.util.concurrent.CompletableFuture<InferenceClassification> get(@javax.annotation.Nullable final java.util.function.Consumer<GetQueryParameters> q, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -31,6 +39,12 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get inferenceClassification from users
* @param q Request query parameters
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<GetQueryParameters> q, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -47,6 +61,13 @@ public class InferenceClassificationRequestBuilder {
}
return requestInfo;
}
/**
* Update the navigation property inferenceClassification in users
* @param body
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> patch(@javax.annotation.Nonnull final InferenceClassification body, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
Objects.requireNonNull(body);
try {
@ -58,6 +79,12 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Update the navigation property inferenceClassification in users
* @param body
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createPatchRequestInfo(@javax.annotation.Nonnull final InferenceClassification body, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
Objects.requireNonNull(body);
@ -71,6 +98,12 @@ public class InferenceClassificationRequestBuilder {
}
return requestInfo;
}
/**
* Delete navigation property inferenceClassification for users
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> delete(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createDeleteRequestInfo(
@ -81,6 +114,11 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Delete navigation property inferenceClassification for users
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createDeleteRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -92,20 +130,33 @@ public class InferenceClassificationRequestBuilder {
}
return requestInfo;
}
/** Path segment to use to build the URL for the current request builder */
@javax.annotation.Nonnull
private final String pathSegment = "/inferenceClassification";
/** Current path for the request */
@javax.annotation.Nullable
public String currentPath;
/** Core service to use to execute the requests */
@javax.annotation.Nullable
public HttpCore httpCore;
/** Factory to use to get a serializer for payload serialization */
@javax.annotation.Nullable
public Function<String, SerializationWriter> serializerFactory;
/** Get inferenceClassification from users */
public class GetQueryParameters extends QueryParametersBase {
/** Select properties to be returned */
@javax.annotation.Nullable
public String[] select;
/** Expand related entities */
@javax.annotation.Nullable
public String[] expand;
}
/**
* Get inferenceClassification from users
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of InferenceClassification
*/
public java.util.concurrent.CompletableFuture<InferenceClassification> get(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -116,6 +167,11 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get inferenceClassification from users
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of InferenceClassification
*/
public java.util.concurrent.CompletableFuture<InferenceClassification> get(@javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -125,6 +181,12 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Update the navigation property inferenceClassification in users
* @param body
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> patch(@javax.annotation.Nonnull final InferenceClassification body, @javax.annotation.Nullable final ResponseHandler responseHandler) {
Objects.requireNonNull(body);
try {
@ -136,6 +198,11 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Delete navigation property inferenceClassification for users
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> delete(@javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createDeleteRequestInfo(
@ -145,6 +212,10 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get inferenceClassification from users
* @return a CompletableFuture of InferenceClassification
*/
public java.util.concurrent.CompletableFuture<InferenceClassification> get() {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -154,6 +225,11 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Update the navigation property inferenceClassification in users
* @param body
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> patch(@javax.annotation.Nonnull final InferenceClassification body) {
Objects.requireNonNull(body);
try {
@ -165,6 +241,10 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Delete navigation property inferenceClassification for users
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> delete() {
try {
final RequestInfo requestInfo = createDeleteRequestInfo(
@ -174,6 +254,11 @@ public class InferenceClassificationRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get inferenceClassification from users
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -185,6 +270,10 @@ public class InferenceClassificationRequestBuilder {
}
return requestInfo;
}
/**
* Get inferenceClassification from users
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo() throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -193,6 +282,11 @@ public class InferenceClassificationRequestBuilder {
}};
return requestInfo;
}
/**
* Update the navigation property inferenceClassification in users
* @param body
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createPatchRequestInfo(@javax.annotation.Nonnull final InferenceClassification body) throws URISyntaxException {
Objects.requireNonNull(body);
@ -203,6 +297,10 @@ public class InferenceClassificationRequestBuilder {
requestInfo.setJsonContentFromParsable(body, serializerFactory);
return requestInfo;
}
/**
* Delete navigation property inferenceClassification for users
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createDeleteRequestInfo() throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -211,6 +309,11 @@ public class InferenceClassificationRequestBuilder {
}};
return requestInfo;
}
/**
* Gets an item from the users.inferenceClassification.overrides collection
* @param id Unique identifier of the item
* @return a InferenceClassificationOverrideRequestBuilder
*/
@javax.annotation.Nonnull
public InferenceClassificationOverrideRequestBuilder overrides(@javax.annotation.Nonnull final String id) {
Objects.requireNonNull(id);

Просмотреть файл

@ -13,7 +13,15 @@ import java.net.URISyntaxException;
import java.util.function.Function;
import java.util.Map;
import java.util.Objects;
/** Builds and executes requests for operations under /users/{user-id}/inferenceClassification/overrides */
public class OverridesRequestBuilder {
/**
* Get overrides from users
* @param q Request query parameters
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of OverridesResponse
*/
public java.util.concurrent.CompletableFuture<OverridesResponse> get(@javax.annotation.Nullable final java.util.function.Consumer<GetQueryParameters> q, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -24,6 +32,12 @@ public class OverridesRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get overrides from users
* @param q Request query parameters
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<GetQueryParameters> q, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -40,6 +54,13 @@ public class OverridesRequestBuilder {
}
return requestInfo;
}
/**
* Create new navigation property to overrides for users
* @param body
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of InferenceClassificationOverride
*/
public java.util.concurrent.CompletableFuture<InferenceClassificationOverride> post(@javax.annotation.Nonnull final InferenceClassificationOverride body, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
Objects.requireNonNull(body);
try {
@ -51,6 +72,12 @@ public class OverridesRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Create new navigation property to overrides for users
* @param body
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createPostRequestInfo(@javax.annotation.Nonnull final InferenceClassificationOverride body, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
Objects.requireNonNull(body);
@ -64,32 +91,51 @@ public class OverridesRequestBuilder {
}
return requestInfo;
}
/** Path segment to use to build the URL for the current request builder */
@javax.annotation.Nonnull
private final String pathSegment = "/overrides";
/** Current path for the request */
@javax.annotation.Nullable
public String currentPath;
/** Core service to use to execute the requests */
@javax.annotation.Nullable
public HttpCore httpCore;
/** Factory to use to get a serializer for payload serialization */
@javax.annotation.Nullable
public Function<String, SerializationWriter> serializerFactory;
/** Get overrides from users */
public class GetQueryParameters extends QueryParametersBase {
/** Show only the first n items */
@javax.annotation.Nullable
public Integer top;
/** Skip the first n items */
@javax.annotation.Nullable
public Integer skip;
/** Search items by search phrases */
@javax.annotation.Nullable
public String search;
/** Filter items by property values */
@javax.annotation.Nullable
public String filter;
/** Include count of items */
@javax.annotation.Nullable
public Boolean count;
/** Order items by property values */
@javax.annotation.Nullable
public String[] orderby;
/** Select properties to be returned */
@javax.annotation.Nullable
public String[] select;
/** Expand related entities */
@javax.annotation.Nullable
public String[] expand;
}
/**
* Get overrides from users
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of OverridesResponse
*/
public java.util.concurrent.CompletableFuture<OverridesResponse> get(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -100,6 +146,11 @@ public class OverridesRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get overrides from users
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of OverridesResponse
*/
public java.util.concurrent.CompletableFuture<OverridesResponse> get(@javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -109,6 +160,12 @@ public class OverridesRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Create new navigation property to overrides for users
* @param body
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of InferenceClassificationOverride
*/
public java.util.concurrent.CompletableFuture<InferenceClassificationOverride> post(@javax.annotation.Nonnull final InferenceClassificationOverride body, @javax.annotation.Nullable final ResponseHandler responseHandler) {
Objects.requireNonNull(body);
try {
@ -120,6 +177,10 @@ public class OverridesRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get overrides from users
* @return a CompletableFuture of OverridesResponse
*/
public java.util.concurrent.CompletableFuture<OverridesResponse> get() {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -129,6 +190,11 @@ public class OverridesRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Create new navigation property to overrides for users
* @param body
* @return a CompletableFuture of InferenceClassificationOverride
*/
public java.util.concurrent.CompletableFuture<InferenceClassificationOverride> post(@javax.annotation.Nonnull final InferenceClassificationOverride body) {
Objects.requireNonNull(body);
try {
@ -140,6 +206,11 @@ public class OverridesRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get overrides from users
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -151,6 +222,10 @@ public class OverridesRequestBuilder {
}
return requestInfo;
}
/**
* Get overrides from users
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo() throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -159,6 +234,11 @@ public class OverridesRequestBuilder {
}};
return requestInfo;
}
/**
* Create new navigation property to overrides for users
* @param body
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createPostRequestInfo(@javax.annotation.Nonnull final InferenceClassificationOverride body) throws URISyntaxException {
Objects.requireNonNull(body);

Просмотреть файл

@ -14,11 +14,20 @@ public class OverridesResponse implements Parsable {
public List<InferenceClassificationOverride> value;
@javax.annotation.Nullable
public String nextLink;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeCollectionOfObjectValues("value", value);
writer.writeStringValue("nextLink", nextLink);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(2);

Просмотреть файл

@ -13,7 +13,15 @@ import java.net.URISyntaxException;
import java.util.function.Function;
import java.util.Map;
import java.util.Objects;
/** Builds and executes requests for operations under /users/{user-id}/inferenceClassification/overrides/{inferenceClassificationOverride-id} */
public class InferenceClassificationOverrideRequestBuilder {
/**
* Get overrides from users
* @param q Request query parameters
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of InferenceClassificationOverride
*/
public java.util.concurrent.CompletableFuture<InferenceClassificationOverride> get(@javax.annotation.Nullable final java.util.function.Consumer<GetQueryParameters> q, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -24,6 +32,12 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get overrides from users
* @param q Request query parameters
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<GetQueryParameters> q, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -40,6 +54,13 @@ public class InferenceClassificationOverrideRequestBuilder {
}
return requestInfo;
}
/**
* Update the navigation property overrides in users
* @param body
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> patch(@javax.annotation.Nonnull final InferenceClassificationOverride body, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
Objects.requireNonNull(body);
try {
@ -51,6 +72,12 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Update the navigation property overrides in users
* @param body
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createPatchRequestInfo(@javax.annotation.Nonnull final InferenceClassificationOverride body, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
Objects.requireNonNull(body);
@ -64,6 +91,12 @@ public class InferenceClassificationOverrideRequestBuilder {
}
return requestInfo;
}
/**
* Delete navigation property overrides for users
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> delete(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createDeleteRequestInfo(
@ -74,6 +107,11 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Delete navigation property overrides for users
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createDeleteRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -85,20 +123,33 @@ public class InferenceClassificationOverrideRequestBuilder {
}
return requestInfo;
}
/** Path segment to use to build the URL for the current request builder */
@javax.annotation.Nonnull
private final String pathSegment = "";
/** Current path for the request */
@javax.annotation.Nullable
public String currentPath;
/** Core service to use to execute the requests */
@javax.annotation.Nullable
public HttpCore httpCore;
/** Factory to use to get a serializer for payload serialization */
@javax.annotation.Nullable
public Function<String, SerializationWriter> serializerFactory;
/** Get overrides from users */
public class GetQueryParameters extends QueryParametersBase {
/** Select properties to be returned */
@javax.annotation.Nullable
public String[] select;
/** Expand related entities */
@javax.annotation.Nullable
public String[] expand;
}
/**
* Get overrides from users
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of InferenceClassificationOverride
*/
public java.util.concurrent.CompletableFuture<InferenceClassificationOverride> get(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -109,6 +160,11 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get overrides from users
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of InferenceClassificationOverride
*/
public java.util.concurrent.CompletableFuture<InferenceClassificationOverride> get(@javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -118,6 +174,12 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Update the navigation property overrides in users
* @param body
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> patch(@javax.annotation.Nonnull final InferenceClassificationOverride body, @javax.annotation.Nullable final ResponseHandler responseHandler) {
Objects.requireNonNull(body);
try {
@ -129,6 +191,11 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Delete navigation property overrides for users
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> delete(@javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createDeleteRequestInfo(
@ -138,6 +205,10 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get overrides from users
* @return a CompletableFuture of InferenceClassificationOverride
*/
public java.util.concurrent.CompletableFuture<InferenceClassificationOverride> get() {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -147,6 +218,11 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Update the navigation property overrides in users
* @param body
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> patch(@javax.annotation.Nonnull final InferenceClassificationOverride body) {
Objects.requireNonNull(body);
try {
@ -158,6 +234,10 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Delete navigation property overrides for users
* @return a CompletableFuture of void
*/
public java.util.concurrent.CompletableFuture<Void> delete() {
try {
final RequestInfo requestInfo = createDeleteRequestInfo(
@ -167,6 +247,11 @@ public class InferenceClassificationOverrideRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get overrides from users
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -178,6 +263,10 @@ public class InferenceClassificationOverrideRequestBuilder {
}
return requestInfo;
}
/**
* Get overrides from users
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo() throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -186,6 +275,11 @@ public class InferenceClassificationOverrideRequestBuilder {
}};
return requestInfo;
}
/**
* Update the navigation property overrides in users
* @param body
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createPatchRequestInfo(@javax.annotation.Nonnull final InferenceClassificationOverride body) throws URISyntaxException {
Objects.requireNonNull(body);
@ -196,6 +290,10 @@ public class InferenceClassificationOverrideRequestBuilder {
requestInfo.setJsonContentFromParsable(body, serializerFactory);
return requestInfo;
}
/**
* Delete navigation property overrides for users
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createDeleteRequestInfo() throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{

Просмотреть файл

@ -17,6 +17,7 @@ import java.net.URISyntaxException;
import java.util.function.Function;
import java.util.Map;
import java.util.Objects;
/** Builds and executes requests for operations under /users/{user-id} */
public class UserRequestBuilder {
@javax.annotation.Nonnull
public InferenceClassificationRequestBuilder inferenceClassification() {
@ -36,14 +37,23 @@ public class UserRequestBuilder {
final HttpCore parentCore = httpCore;
return new MessagesRequestBuilder() {{ currentPath = parentPath; httpCore = parentCore; }};
}
/** Path segment to use to build the URL for the current request builder */
@javax.annotation.Nonnull
private final String pathSegment = "";
/** Current path for the request */
@javax.annotation.Nullable
public String currentPath;
/** Core service to use to execute the requests */
@javax.annotation.Nullable
public HttpCore httpCore;
/** Factory to use to get a serializer for payload serialization */
@javax.annotation.Nullable
public Function<String, SerializationWriter> serializerFactory;
/**
* Gets an item from the users.mailFolders collection
* @param id Unique identifier of the item
* @return a MailFolderRequestBuilder
*/
@javax.annotation.Nonnull
public MailFolderRequestBuilder mailFolders(@javax.annotation.Nonnull final String id) {
Objects.requireNonNull(id);
@ -51,6 +61,11 @@ public class UserRequestBuilder {
final HttpCore parentCore = httpCore;
return new MailFolderRequestBuilder() {{ currentPath = parentPath; httpCore = parentCore; }};
}
/**
* Gets an item from the users.mailFolders.messages collection
* @param id Unique identifier of the item
* @return a MessageRequestBuilder
*/
@javax.annotation.Nonnull
public MessageRequestBuilder messages(@javax.annotation.Nonnull final String id) {
Objects.requireNonNull(id);

Просмотреть файл

@ -13,26 +13,41 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
public class MailFolder extends Entity implements Parsable {
/** The number of immediate child mailFolders in the current mailFolder. */
@javax.annotation.Nullable
public Integer childFolderCount;
/** The mailFolder's display name. */
@javax.annotation.Nullable
public String displayName;
/** The unique identifier for the mailFolder's parent mailFolder. */
@javax.annotation.Nullable
public String parentFolderId;
/** The number of items in the mailFolder. */
@javax.annotation.Nullable
public Integer totalItemCount;
/** The number of items in the mailFolder marked as unread. */
@javax.annotation.Nullable
public Integer unreadItemCount;
/** The collection of child folders in the mailFolder. */
@javax.annotation.Nullable
public List<MailFolder> childFolders;
/** The collection of rules that apply to the user's Inbox folder. */
@javax.annotation.Nullable
public List<MessageRule> messageRules;
/** The collection of messages in the mailFolder. */
@javax.annotation.Nullable
public List<Message> messages;
/** The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable. */
@javax.annotation.Nullable
public List<MultiValueLegacyExtendedProperty> multiValueExtendedProperties;
/** The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable. */
@javax.annotation.Nullable
public List<SingleValueLegacyExtendedProperty> singleValueExtendedProperties;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
@ -47,6 +62,10 @@ public class MailFolder extends Entity implements Parsable {
writer.writeCollectionOfObjectValues("multiValueExtendedProperties", multiValueExtendedProperties);
writer.writeCollectionOfObjectValues("singleValueExtendedProperties", singleValueExtendedProperties);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Просмотреть файл

@ -12,7 +12,15 @@ import java.net.URISyntaxException;
import java.util.function.Function;
import java.util.Map;
import java.util.Objects;
/** Builds and executes requests for operations under /users/{user-id}/mailFolders */
public class MailFoldersRequestBuilder {
/**
* Get mailFolders from users
* @param q Request query parameters
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of MailFoldersResponse
*/
public java.util.concurrent.CompletableFuture<MailFoldersResponse> get(@javax.annotation.Nullable final java.util.function.Consumer<GetQueryParameters> q, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -23,6 +31,12 @@ public class MailFoldersRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get mailFolders from users
* @param q Request query parameters
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<GetQueryParameters> q, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -39,6 +53,13 @@ public class MailFoldersRequestBuilder {
}
return requestInfo;
}
/**
* Create new navigation property to mailFolders for users
* @param body
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of MailFolder
*/
public java.util.concurrent.CompletableFuture<MailFolder> post(@javax.annotation.Nonnull final MailFolder body, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
Objects.requireNonNull(body);
try {
@ -50,6 +71,12 @@ public class MailFoldersRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Create new navigation property to mailFolders for users
* @param body
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createPostRequestInfo(@javax.annotation.Nonnull final MailFolder body, @javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
Objects.requireNonNull(body);
@ -63,32 +90,51 @@ public class MailFoldersRequestBuilder {
}
return requestInfo;
}
/** Path segment to use to build the URL for the current request builder */
@javax.annotation.Nonnull
private final String pathSegment = "/mailFolders";
/** Current path for the request */
@javax.annotation.Nullable
public String currentPath;
/** Core service to use to execute the requests */
@javax.annotation.Nullable
public HttpCore httpCore;
/** Factory to use to get a serializer for payload serialization */
@javax.annotation.Nullable
public Function<String, SerializationWriter> serializerFactory;
/** Get mailFolders from users */
public class GetQueryParameters extends QueryParametersBase {
/** Show only the first n items */
@javax.annotation.Nullable
public Integer top;
/** Skip the first n items */
@javax.annotation.Nullable
public Integer skip;
/** Search items by search phrases */
@javax.annotation.Nullable
public String search;
/** Filter items by property values */
@javax.annotation.Nullable
public String filter;
/** Include count of items */
@javax.annotation.Nullable
public Boolean count;
/** Order items by property values */
@javax.annotation.Nullable
public String[] orderby;
/** Select properties to be returned */
@javax.annotation.Nullable
public String[] select;
/** Expand related entities */
@javax.annotation.Nullable
public String[] expand;
}
/**
* Get mailFolders from users
* @param h Request headers
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of MailFoldersResponse
*/
public java.util.concurrent.CompletableFuture<MailFoldersResponse> get(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h, @javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -99,6 +145,11 @@ public class MailFoldersRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get mailFolders from users
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of MailFoldersResponse
*/
public java.util.concurrent.CompletableFuture<MailFoldersResponse> get(@javax.annotation.Nullable final ResponseHandler responseHandler) {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -108,6 +159,12 @@ public class MailFoldersRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Create new navigation property to mailFolders for users
* @param body
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @return a CompletableFuture of MailFolder
*/
public java.util.concurrent.CompletableFuture<MailFolder> post(@javax.annotation.Nonnull final MailFolder body, @javax.annotation.Nullable final ResponseHandler responseHandler) {
Objects.requireNonNull(body);
try {
@ -119,6 +176,10 @@ public class MailFoldersRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get mailFolders from users
* @return a CompletableFuture of MailFoldersResponse
*/
public java.util.concurrent.CompletableFuture<MailFoldersResponse> get() {
try {
final RequestInfo requestInfo = createGetRequestInfo(
@ -128,6 +189,11 @@ public class MailFoldersRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Create new navigation property to mailFolders for users
* @param body
* @return a CompletableFuture of MailFolder
*/
public java.util.concurrent.CompletableFuture<MailFolder> post(@javax.annotation.Nonnull final MailFolder body) {
Objects.requireNonNull(body);
try {
@ -139,6 +205,11 @@ public class MailFoldersRequestBuilder {
return java.util.concurrent.CompletableFuture.failedFuture(ex);
}
}
/**
* Get mailFolders from users
* @param h Request headers
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo(@javax.annotation.Nullable final java.util.function.Consumer<Map<String, String>> h) throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -150,6 +221,10 @@ public class MailFoldersRequestBuilder {
}
return requestInfo;
}
/**
* Get mailFolders from users
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createGetRequestInfo() throws URISyntaxException {
final RequestInfo requestInfo = new RequestInfo() {{
@ -158,6 +233,11 @@ public class MailFoldersRequestBuilder {
}};
return requestInfo;
}
/**
* Create new navigation property to mailFolders for users
* @param body
* @return a RequestInfo
*/
@javax.annotation.Nonnull
public RequestInfo createPostRequestInfo(@javax.annotation.Nonnull final MailFolder body) throws URISyntaxException {
Objects.requireNonNull(body);

Просмотреть файл

@ -13,11 +13,20 @@ public class MailFoldersResponse implements Parsable {
public List<MailFolder> value;
@javax.annotation.Nullable
public String nextLink;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeCollectionOfObjectValues("value", value);
writer.writeStringValue("nextLink", nextLink);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(2);

Просмотреть файл

@ -13,18 +13,28 @@ public class MessageRule extends Entity implements Parsable {
public MessageRuleActions actions;
@javax.annotation.Nullable
public MessageRulePredicates conditions;
/** The display name of the rule. */
@javax.annotation.Nullable
public String displayName;
@javax.annotation.Nullable
public MessageRulePredicates exceptions;
/** Indicates whether the rule is in an error condition. Read-only. */
@javax.annotation.Nullable
public Boolean hasError;
/** Indicates whether the rule is enabled to be applied to messages. */
@javax.annotation.Nullable
public Boolean isEnabled;
/** Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API. */
@javax.annotation.Nullable
public Boolean isReadOnly;
/** Indicates the order in which the rule is executed, among other rules. */
@javax.annotation.Nullable
public Integer sequence;
/**
* Serialiazes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
@ -37,6 +47,10 @@ public class MessageRule extends Entity implements Parsable {
writer.writeBooleanValue("isReadOnly", isReadOnly);
writer.writeIntegerValue("sequence", sequence);
}
/**
* The serialization information for the current model
* @return a Map<String, BiConsumer<T, ParseNode>>
*/
@javax.annotation.Nonnull
public <T> Map<String, BiConsumer<T, ParseNode>> getDeserializeFields() {
final Map<String, BiConsumer<T, ParseNode>> fields = new HashMap<>(super.getDeserializeFields());

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше