Skip to content

Commit e83a5b9

Browse files
committed
add option type and property
1 parent 628f97f commit e83a5b9

File tree

7 files changed

+475
-0
lines changed

7 files changed

+475
-0
lines changed

test/Typewriter.Test/Metadata/MetadataMultipleNamespaces.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@
197197
<NavigationProperty Name="sessionRef" Type="microsoft.graph2.callRecords.session" /> <!-- No ContainsTarget -->
198198
<NavigationProperty Name="photo" Type="microsoft.graph2.callRecords.photo" ContainsTarget="true" />
199199
</EntityType>
200+
<EntityType Name="option" BaseType="graph.entity" />
200201
<EntityType Name="photo" BaseType="graph.entity" HasStream="true">
201202
<Property Name="failureInfo" Type="microsoft.graph2.callRecords.failureInfo" />
203+
<Property Name="option" Type="microsoft.graph2.callRecords.option" />
202204
</EntityType>
203205
<ComplexType Name="endpoint">
204206
<Property Name="userAgent" Type="microsoft.graph2.callRecords.userAgent" />
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
6+
// <auto-generated/>
7+
8+
// Template Source: Templates\CSharp\Model\EntityType.cs.tt
9+
10+
namespace Microsoft.Graph2.CallRecords
11+
{
12+
using System;
13+
using System.Collections.Generic;
14+
using System.IO;
15+
using System.Runtime.Serialization;
16+
using Newtonsoft.Json;
17+
18+
/// <summary>
19+
/// The type Option.
20+
/// </summary>
21+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
22+
public partial class Option : Microsoft.Graph.Entity
23+
{
24+
25+
///<summary>
26+
/// The Option constructor
27+
///</summary>
28+
public Option()
29+
{
30+
this.ODataType = "microsoft.graph2.callRecords.option";
31+
}
32+
33+
}
34+
}
35+

test/Typewriter.Test/TestDataCSharp/com/Microsoft/Graph2/CallRecords/Model/Photo.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public Photo()
3636
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "failureInfo", Required = Newtonsoft.Json.Required.Default)]
3737
public FailureInfo FailureInfo { get; set; }
3838

39+
/// <summary>
40+
/// Gets or sets option.
41+
/// </summary>
42+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "option", Required = Newtonsoft.Json.Required.Default)]
43+
public Option Option { get; set; }
44+
3945
}
4046
}
4147

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
6+
// <auto-generated/>
7+
8+
// Template Source: Templates\CSharp\Requests\IEntityRequest.cs.tt
9+
10+
namespace Microsoft.Graph2.CallRecords
11+
{
12+
using System;
13+
using System.IO;
14+
using System.Net.Http;
15+
using System.Threading;
16+
using System.Linq.Expressions;
17+
18+
/// <summary>
19+
/// The interface IOptionRequest.
20+
/// </summary>
21+
public partial interface IOptionRequest : Microsoft.Graph.IBaseRequest
22+
{
23+
/// <summary>
24+
/// Creates the specified Option using POST.
25+
/// </summary>
26+
/// <param name="optionToCreate">The Option to create.</param>
27+
/// <returns>The created Option.</returns>
28+
System.Threading.Tasks.Task<Option> CreateAsync(Option optionToCreate); /// <summary>
29+
/// Creates the specified Option using POST.
30+
/// </summary>
31+
/// <param name="optionToCreate">The Option to create.</param>
32+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
33+
/// <returns>The created Option.</returns>
34+
System.Threading.Tasks.Task<Option> CreateAsync(Option optionToCreate, CancellationToken cancellationToken);
35+
36+
/// <summary>
37+
/// Deletes the specified Option.
38+
/// </summary>
39+
/// <returns>The task to await.</returns>
40+
System.Threading.Tasks.Task DeleteAsync();
41+
42+
/// <summary>
43+
/// Deletes the specified Option.
44+
/// </summary>
45+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
46+
/// <returns>The task to await.</returns>
47+
System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken);
48+
49+
/// <summary>
50+
/// Gets the specified Option.
51+
/// </summary>
52+
/// <returns>The Option.</returns>
53+
System.Threading.Tasks.Task<Option> GetAsync();
54+
55+
/// <summary>
56+
/// Gets the specified Option.
57+
/// </summary>
58+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
59+
/// <returns>The Option.</returns>
60+
System.Threading.Tasks.Task<Option> GetAsync(CancellationToken cancellationToken);
61+
62+
/// <summary>
63+
/// Updates the specified Option using PATCH.
64+
/// </summary>
65+
/// <param name="optionToUpdate">The Option to update.</param>
66+
/// <returns>The updated Option.</returns>
67+
System.Threading.Tasks.Task<Option> UpdateAsync(Option optionToUpdate);
68+
69+
/// <summary>
70+
/// Updates the specified Option using PATCH.
71+
/// </summary>
72+
/// <param name="optionToUpdate">The Option to update.</param>
73+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
74+
/// <exception cref="Microsoft.Graph.ClientException">Thrown when an object returned in a response is used for updating an object in Microsoft Graph.</exception>
75+
/// <returns>The updated Option.</returns>
76+
System.Threading.Tasks.Task<Option> UpdateAsync(Option optionToUpdate, CancellationToken cancellationToken);
77+
78+
/// <summary>
79+
/// Adds the specified expand value to the request.
80+
/// </summary>
81+
/// <param name="value">The expand value.</param>
82+
/// <returns>The request object to send.</returns>
83+
IOptionRequest Expand(string value);
84+
85+
/// <summary>
86+
/// Adds the specified expand value to the request.
87+
/// </summary>
88+
/// <param name="expandExpression">The expression from which to calculate the expand value.</param>
89+
/// <returns>The request object to send.</returns>
90+
IOptionRequest Expand(Expression<Func<Option, object>> expandExpression);
91+
92+
/// <summary>
93+
/// Adds the specified select value to the request.
94+
/// </summary>
95+
/// <param name="value">The select value.</param>
96+
/// <returns>The request object to send.</returns>
97+
IOptionRequest Select(string value);
98+
99+
/// <summary>
100+
/// Adds the specified select value to the request.
101+
/// </summary>
102+
/// <param name="selectExpression">The expression from which to calculate the select value.</param>
103+
/// <returns>The request object to send.</returns>
104+
IOptionRequest Select(Expression<Func<Option, object>> selectExpression);
105+
106+
}
107+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
6+
// <auto-generated/>
7+
8+
// Template Source: Templates\CSharp\Requests\IEntityRequestBuilder.cs.tt
9+
10+
namespace Microsoft.Graph2.CallRecords
11+
{
12+
using System;
13+
using System.Collections.Generic;
14+
using System.IO;
15+
16+
/// <summary>
17+
/// The interface IOptionRequestBuilder.
18+
/// </summary>
19+
public partial interface IOptionRequestBuilder : Microsoft.Graph.IEntityRequestBuilder
20+
{
21+
/// <summary>
22+
/// Builds the request.
23+
/// </summary>
24+
/// <returns>The built request.</returns>
25+
new IOptionRequest Request();
26+
27+
/// <summary>
28+
/// Builds the request.
29+
/// </summary>
30+
/// <param name="options">The query and header options for the request.</param>
31+
/// <returns>The built request.</returns>
32+
new IOptionRequest Request(IEnumerable<Microsoft.Graph.Option> options);
33+
34+
}
35+
}

0 commit comments

Comments
 (0)