Skip to content

Commit

Permalink
Updated generated code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
jansenbe committed Jun 9, 2021
1 parent 34b4a89 commit b74bac7
Show file tree
Hide file tree
Showing 45 changed files with 878 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using PnP.Core.Services;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// CommentsAPI class, write your custom code here
/// </summary>
[SharePointType("Microsoft.SharePoint.Comments.CommentsAPI", Uri = "_api/xxx", LinqGet = "_api/xxx")]
internal partial class CommentsAPI : BaseDataModel<ICommentsAPI>, ICommentsAPI
{
#region Construction
public CommentsAPI()
{
}
#endregion

#region Properties
#region New properties

public string Id4a81de82eeb94d6080ea5bf63e27023a { get => GetValue<string>(); set => SetValue(value); }

#endregion

#endregion

#region Extension methods
#endregion
}
}
60 changes: 60 additions & 0 deletions src/generated/Microsoft.SharePoint.Comments/Internal/comment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System;
using PnP.Core.Services;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// comment class, write your custom code here
/// </summary>
[SharePointType("Microsoft.SharePoint.Comments.comment", Uri = "_api/xxx", LinqGet = "_api/xxx")]
internal partial class comment : BaseDataModel<Icomment>, Icomment
{
#region Construction
public comment()
{
}
#endregion

#region Properties
#region New properties

public DateTime CreatedDate { get => GetValue<DateTime>(); set => SetValue(value); }

public string Id { get => GetValue<string>(); set => SetValue(value); }

public bool IsLikedByUser { get => GetValue<bool>(); set => SetValue(value); }

public bool IsReply { get => GetValue<bool>(); set => SetValue(value); }

public int ItemId { get => GetValue<int>(); set => SetValue(value); }

public int LikeCount { get => GetValue<int>(); set => SetValue(value); }

public Guid ListId { get => GetValue<Guid>(); set => SetValue(value); }

public string ParentId { get => GetValue<string>(); set => SetValue(value); }

public string RelativeCreatedDate { get => GetValue<string>(); set => SetValue(value); }

public int ReplyCount { get => GetValue<int>(); set => SetValue(value); }

public string Text { get => GetValue<string>(); set => SetValue(value); }

public IuserEntityCollection LikedBy { get => GetModelCollectionValue<IuserEntityCollection>(); }


public IcommentCollection Replies { get => GetModelCollectionValue<IcommentCollection>(); }


#endregion

[KeyProperty(nameof(Id))]
public override object Key { get => Id; set => Id = value.ToString(); }


#endregion

#region Extension methods
#endregion
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using PnP.Core.QueryModel;
using PnP.Core.Services;
using System;
using System.Linq;
using System.Threading.Tasks;

namespace PnP.Core.Model.SharePoint
{
internal partial class commentCollection : QueryableDataModelCollection<Icomment>, IcommentCollection
{
public commentCollection(PnPContext context, IDataModelParent parent, string memberName) : base(context, parent, memberName)
{
PnPContext = context;
Parent = parent;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using PnP.Core.QueryModel;
using PnP.Core.Services;
using System;
using System.Linq;
using System.Threading.Tasks;

namespace PnP.Core.Model.SharePoint
{
internal partial class userEntityCollection : QueryableDataModelCollection<IuserEntity>, IuserEntityCollection
{
public userEntityCollection(PnPContext context, IDataModelParent parent, string memberName) : base(context, parent, memberName)
{
PnPContext = context;
Parent = parent;
}
}
}
22 changes: 22 additions & 0 deletions src/generated/Microsoft.SharePoint.Comments/Public/ICommentsAPI.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// Public interface to define a CommentsAPI object
/// </summary>
[ConcreteType(typeof(CommentsAPI))]
public interface ICommentsAPI : IDataModel<ICommentsAPI>, IDataModelGet<ICommentsAPI>, IDataModelUpdate, IDataModelDelete
{

#region New properties

/// <summary>
/// To update...
/// </summary>
public string Id4a81de82eeb94d6080ea5bf63e27023a { get; set; }

#endregion

}
}
82 changes: 82 additions & 0 deletions src/generated/Microsoft.SharePoint.Comments/Public/Icomment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// Public interface to define a comment object
/// </summary>
[ConcreteType(typeof(comment))]
public interface Icomment : IDataModel<Icomment>, IDataModelGet<Icomment>, IDataModelUpdate, IDataModelDelete
{

#region New properties

/// <summary>
/// To update...
/// </summary>
public DateTime CreatedDate { get; set; }

/// <summary>
/// To update...
/// </summary>
public string Id { get; set; }

/// <summary>
/// To update...
/// </summary>
public bool IsLikedByUser { get; set; }

/// <summary>
/// To update...
/// </summary>
public bool IsReply { get; set; }

/// <summary>
/// To update...
/// </summary>
public int ItemId { get; set; }

/// <summary>
/// To update...
/// </summary>
public int LikeCount { get; set; }

/// <summary>
/// To update...
/// </summary>
public Guid ListId { get; set; }

/// <summary>
/// To update...
/// </summary>
public string ParentId { get; set; }

/// <summary>
/// To update...
/// </summary>
public string RelativeCreatedDate { get; set; }

/// <summary>
/// To update...
/// </summary>
public int ReplyCount { get; set; }

/// <summary>
/// To update...
/// </summary>
public string Text { get; set; }

/// <summary>
/// To update...
/// </summary>
public IuserEntityCollection LikedBy { get; }

/// <summary>
/// To update...
/// </summary>
public IcommentCollection Replies { get; }

#endregion

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using PnP.Core.Services;
using System.Linq;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// Public interface to define a collection of comment objects
/// </summary>
[ConcreteType(typeof(commentCollection))]
public interface IcommentCollection : IQueryable<Icomment>, IDataModelCollection<Icomment>
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using PnP.Core.Services;
using System.Linq;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// Public interface to define a collection of userEntity objects
/// </summary>
[ConcreteType(typeof(userEntityCollection))]
public interface IuserEntityCollection : IQueryable<IuserEntity>, IDataModelCollection<IuserEntity>
{
}
}
30 changes: 30 additions & 0 deletions src/generated/Microsoft.SharePoint.Likes/Internal/LikesAPI.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using PnP.Core.Services;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// LikesAPI class, write your custom code here
/// </summary>
[SharePointType("Microsoft.SharePoint.Likes.LikesAPI", Uri = "_api/xxx", LinqGet = "_api/xxx")]
internal partial class LikesAPI : BaseDataModel<ILikesAPI>, ILikesAPI
{
#region Construction
public LikesAPI()
{
}
#endregion

#region Properties
#region New properties

public string Id4a81de82eeb94d6080ea5bf63e27023a { get => GetValue<string>(); set => SetValue(value); }

#endregion

#endregion

#region Extension methods
#endregion
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using PnP.Core.Services;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// likedByInformation class, write your custom code here
/// </summary>
[SharePointType("Microsoft.SharePoint.Likes.likedByInformation", Uri = "_api/xxx", LinqGet = "_api/xxx")]
internal partial class likedByInformation : BaseDataModel<IlikedByInformation>, IlikedByInformation
{
#region Construction
public likedByInformation()
{
}
#endregion

#region Properties
#region New properties

public bool IsLikedByUser { get => GetValue<bool>(); set => SetValue(value); }

public IuserEntityCollection LikedBy { get => GetModelCollectionValue<IuserEntityCollection>(); }


#endregion

#endregion

#region Extension methods
#endregion
}
}
42 changes: 42 additions & 0 deletions src/generated/Microsoft.SharePoint.Likes/Internal/userEntity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using PnP.Core.Services;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// userEntity class, write your custom code here
/// </summary>
[SharePointType("Microsoft.SharePoint.Likes.userEntity", Uri = "_api/xxx", LinqGet = "_api/xxx")]
internal partial class userEntity : BaseDataModel<IuserEntity>, IuserEntity
{
#region Construction
public userEntity()
{
}
#endregion

#region Properties
#region New properties

public DateTime CreationDate { get => GetValue<DateTime>(); set => SetValue(value); }

public string Email { get => GetValue<string>(); set => SetValue(value); }

public int Id { get => GetValue<int>(); set => SetValue(value); }

public string LoginName { get => GetValue<string>(); set => SetValue(value); }

public string Name { get => GetValue<string>(); set => SetValue(value); }

#endregion

[KeyProperty(nameof(Id))]
public override object Key { get => Id; set => Id = (int)value; }


#endregion

#region Extension methods
#endregion
}
}
22 changes: 22 additions & 0 deletions src/generated/Microsoft.SharePoint.Likes/Public/ILikesAPI.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;

namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// Public interface to define a LikesAPI object
/// </summary>
[ConcreteType(typeof(LikesAPI))]
public interface ILikesAPI : IDataModel<ILikesAPI>, IDataModelGet<ILikesAPI>, IDataModelUpdate, IDataModelDelete
{

#region New properties

/// <summary>
/// To update...
/// </summary>
public string Id4a81de82eeb94d6080ea5bf63e27023a { get; set; }

#endregion

}
}
Loading

0 comments on commit b74bac7

Please sign in to comment.