Skip to content

Commit

Permalink
Merge pull request #5824 from peterwurzinger/fix-sample/4475
Browse files Browse the repository at this point in the history
Fix sample/4475
  • Loading branch information
andrueastman authored Jun 4, 2024
2 parents e778d25 + f946b3b commit 5f7c7c4
Show file tree
Hide file tree
Showing 86 changed files with 1,926 additions and 1,772 deletions.
11 changes: 6 additions & 5 deletions msgraph-mail/dotnet/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
using System.Linq;
using System.Threading.Tasks;
using System;
namespace Graphdotnetv4 {
namespace Graphdotnetv4
{
/// <summary>
/// The main entry point of the SDK, exposes the configuration and the fluent API.
/// </summary>
public class ApiClient : BaseRequestBuilder
public class ApiClient : BaseRequestBuilder
{
/// <summary>The users property</summary>
public UsersRequestBuilder Users
public Graphdotnetv4.Users.UsersRequestBuilder Users
{
get => new UsersRequestBuilder(PathParameters, RequestAdapter);
get => new Graphdotnetv4.Users.UsersRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new <see cref="ApiClient"/> and sets the default values.
/// Instantiates a new <see cref="Graphdotnetv4.ApiClient"/> and sets the default values.
/// </summary>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public ApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary<string, object>())
Expand Down
23 changes: 13 additions & 10 deletions msgraph-mail/dotnet/Models/Attachment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
using System.IO;
using System.Linq;
using System;
namespace Graphdotnetv4.Models {
public class Attachment : Entity, IParsable
namespace Graphdotnetv4.Models
{
#pragma warning disable CS1591
public class Attachment : Graphdotnetv4.Models.Entity, IParsable
#pragma warning restore CS1591
{
/// <summary>The MIME type.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -32,12 +35,12 @@ public class Attachment : Entity, IParsable
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="Attachment"/></returns>
/// <returns>A <see cref="Graphdotnetv4.Models.Attachment"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static new Attachment CreateFromDiscriminatorValue(IParseNode parseNode)
public static new Graphdotnetv4.Models.Attachment CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new Attachment();
return new Graphdotnetv4.Models.Attachment();
}
/// <summary>
/// The deserialization information for the current model
Expand All @@ -47,11 +50,11 @@ public override IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>(base.GetFieldDeserializers())
{
{"contentType", n => { ContentType = n.GetStringValue(); } },
{"isInline", n => { IsInline = n.GetBoolValue(); } },
{"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{"size", n => { Size = n.GetIntValue(); } },
{ "contentType", n => { ContentType = n.GetStringValue(); } },
{ "isInline", n => { IsInline = n.GetBoolValue(); } },
{ "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } },
{ "name", n => { Name = n.GetStringValue(); } },
{ "size", n => { Size = n.GetIntValue(); } },
};
}
/// <summary>
Expand Down
25 changes: 14 additions & 11 deletions msgraph-mail/dotnet/Models/AttachmentCollectionResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
using System.IO;
using System.Linq;
using System;
namespace Graphdotnetv4.Models {
public class AttachmentCollectionResponse : IAdditionalDataHolder, IParsable
namespace Graphdotnetv4.Models
{
#pragma warning disable CS1591
public class AttachmentCollectionResponse : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
Expand All @@ -20,13 +23,13 @@ public class AttachmentCollectionResponse : IAdditionalDataHolder, IParsable
/// <summary>The value property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<Attachment>? Value { get; set; }
public List<Graphdotnetv4.Models.Attachment>? Value { get; set; }
#nullable restore
#else
public List<Attachment> Value { get; set; }
public List<Graphdotnetv4.Models.Attachment> Value { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="AttachmentCollectionResponse"/> and sets the default values.
/// Instantiates a new <see cref="Graphdotnetv4.Models.AttachmentCollectionResponse"/> and sets the default values.
/// </summary>
public AttachmentCollectionResponse()
{
Expand All @@ -35,12 +38,12 @@ public AttachmentCollectionResponse()
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="AttachmentCollectionResponse"/></returns>
/// <returns>A <see cref="Graphdotnetv4.Models.AttachmentCollectionResponse"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static AttachmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode)
public static Graphdotnetv4.Models.AttachmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new AttachmentCollectionResponse();
return new Graphdotnetv4.Models.AttachmentCollectionResponse();
}
/// <summary>
/// The deserialization information for the current model
Expand All @@ -50,8 +53,8 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } },
{"value", n => { Value = n.GetCollectionOfObjectValues<Attachment>(Attachment.CreateFromDiscriminatorValue)?.ToList(); } },
{ "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } },
{ "value", n => { Value = n.GetCollectionOfObjectValues<Graphdotnetv4.Models.Attachment>(Graphdotnetv4.Models.Attachment.CreateFromDiscriminatorValue)?.ToList(); } },
};
}
/// <summary>
Expand All @@ -62,7 +65,7 @@ public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("@odata.nextLink", OdataNextLink);
writer.WriteCollectionOfObjectValues<Attachment>("value", Value);
writer.WriteCollectionOfObjectValues<Graphdotnetv4.Models.Attachment>("value", Value);
writer.WriteAdditionalData(AdditionalData);
}
}
Expand Down
9 changes: 8 additions & 1 deletion msgraph-mail/dotnet/Models/BodyType.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace Graphdotnetv4.Models {
namespace Graphdotnetv4.Models
{
#pragma warning disable CS1591
public enum BodyType
#pragma warning restore CS1591
{
[EnumMember(Value = "text")]
#pragma warning disable CS1591
Text,
#pragma warning restore CS1591
[EnumMember(Value = "html")]
#pragma warning disable CS1591
Html,
#pragma warning restore CS1591
}
}
19 changes: 11 additions & 8 deletions msgraph-mail/dotnet/Models/DateTimeTimeZone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
using System.IO;
using System.Linq;
using System;
namespace Graphdotnetv4.Models {
public class DateTimeTimeZone : IAdditionalDataHolder, IParsable
namespace Graphdotnetv4.Models
{
#pragma warning disable CS1591
public class DateTimeTimeZone : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
Expand All @@ -26,7 +29,7 @@ public class DateTimeTimeZone : IAdditionalDataHolder, IParsable
public string TimeZone { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="DateTimeTimeZone"/> and sets the default values.
/// Instantiates a new <see cref="Graphdotnetv4.Models.DateTimeTimeZone"/> and sets the default values.
/// </summary>
public DateTimeTimeZone()
{
Expand All @@ -35,12 +38,12 @@ public DateTimeTimeZone()
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="DateTimeTimeZone"/></returns>
/// <returns>A <see cref="Graphdotnetv4.Models.DateTimeTimeZone"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static DateTimeTimeZone CreateFromDiscriminatorValue(IParseNode parseNode)
public static Graphdotnetv4.Models.DateTimeTimeZone CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new DateTimeTimeZone();
return new Graphdotnetv4.Models.DateTimeTimeZone();
}
/// <summary>
/// The deserialization information for the current model
Expand All @@ -50,8 +53,8 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"dateTime", n => { DateTime = n.GetStringValue(); } },
{"timeZone", n => { TimeZone = n.GetStringValue(); } },
{ "dateTime", n => { DateTime = n.GetStringValue(); } },
{ "timeZone", n => { TimeZone = n.GetStringValue(); } },
};
}
/// <summary>
Expand Down
19 changes: 11 additions & 8 deletions msgraph-mail/dotnet/Models/EmailAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
using System.IO;
using System.Linq;
using System;
namespace Graphdotnetv4.Models {
public class EmailAddress : IAdditionalDataHolder, IParsable
namespace Graphdotnetv4.Models
{
#pragma warning disable CS1591
public class EmailAddress : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
Expand All @@ -26,7 +29,7 @@ public class EmailAddress : IAdditionalDataHolder, IParsable
public string Name { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="EmailAddress"/> and sets the default values.
/// Instantiates a new <see cref="Graphdotnetv4.Models.EmailAddress"/> and sets the default values.
/// </summary>
public EmailAddress()
{
Expand All @@ -35,12 +38,12 @@ public EmailAddress()
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="EmailAddress"/></returns>
/// <returns>A <see cref="Graphdotnetv4.Models.EmailAddress"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static EmailAddress CreateFromDiscriminatorValue(IParseNode parseNode)
public static Graphdotnetv4.Models.EmailAddress CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new EmailAddress();
return new Graphdotnetv4.Models.EmailAddress();
}
/// <summary>
/// The deserialization information for the current model
Expand All @@ -50,8 +53,8 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"address", n => { Address = n.GetStringValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{ "address", n => { Address = n.GetStringValue(); } },
{ "name", n => { Name = n.GetStringValue(); } },
};
}
/// <summary>
Expand Down
17 changes: 10 additions & 7 deletions msgraph-mail/dotnet/Models/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
using System.IO;
using System.Linq;
using System;
namespace Graphdotnetv4.Models {
public class Entity : IAdditionalDataHolder, IParsable
namespace Graphdotnetv4.Models
{
#pragma warning disable CS1591
public class Entity : IAdditionalDataHolder, IParsable
#pragma warning restore CS1591
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
Expand All @@ -18,7 +21,7 @@ public class Entity : IAdditionalDataHolder, IParsable
public string Id { get; set; }
#endif
/// <summary>
/// Instantiates a new <see cref="Entity"/> and sets the default values.
/// Instantiates a new <see cref="Graphdotnetv4.Models.Entity"/> and sets the default values.
/// </summary>
public Entity()
{
Expand All @@ -27,12 +30,12 @@ public Entity()
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="Entity"/></returns>
/// <returns>A <see cref="Graphdotnetv4.Models.Entity"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static Entity CreateFromDiscriminatorValue(IParseNode parseNode)
public static Graphdotnetv4.Models.Entity CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new Entity();
return new Graphdotnetv4.Models.Entity();
}
/// <summary>
/// The deserialization information for the current model
Expand All @@ -42,7 +45,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"id", n => { Id = n.GetStringValue(); } },
{ "id", n => { Id = n.GetStringValue(); } },
};
}
/// <summary>
Expand Down
13 changes: 8 additions & 5 deletions msgraph-mail/dotnet/Models/Extension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@
using System.IO;
using System.Linq;
using System;
namespace Graphdotnetv4.Models {
public class Extension : Entity, IParsable
namespace Graphdotnetv4.Models
{
#pragma warning disable CS1591
public class Extension : Graphdotnetv4.Models.Entity, IParsable
#pragma warning restore CS1591
{
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="Extension"/></returns>
/// <returns>A <see cref="Graphdotnetv4.Models.Extension"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static new Extension CreateFromDiscriminatorValue(IParseNode parseNode)
public static new Graphdotnetv4.Models.Extension CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new Extension();
return new Graphdotnetv4.Models.Extension();
}
/// <summary>
/// The deserialization information for the current model
Expand Down
Loading

0 comments on commit 5f7c7c4

Please sign in to comment.