Skip to content

Commit 7f0789b

Browse files
author
Caitlin Bales
authored
Merge pull request #266 from microsoftgraph/withReferenceRequest-delete-method
With reference request delete method
2 parents d3c94d6 + 5c8a5c1 commit 7f0789b

16 files changed

+872
-0
lines changed

src/Microsoft.Graph/Requests/Generated/AdministrativeUnitWithReferenceRequest.cs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,74 @@ public async System.Threading.Tasks.Task<AdministrativeUnit> GetAsync(Cancellati
5555
return retrievedEntity;
5656
}
5757

58+
/// <summary>
59+
/// Creates the specified AdministrativeUnit using POST.
60+
/// </summary>
61+
/// <param name="administrativeUnitToCreate">The AdministrativeUnit to create.</param>
62+
/// <returns>The created AdministrativeUnit.</returns>
63+
public System.Threading.Tasks.Task<AdministrativeUnit> CreateAsync(AdministrativeUnit administrativeUnitToCreate)
64+
{
65+
return this.CreateAsync(administrativeUnitToCreate, CancellationToken.None);
66+
}
67+
68+
/// <summary>
69+
/// Creates the specified AdministrativeUnit using POST.
70+
/// </summary>
71+
/// <param name="administrativeUnitToCreate">The AdministrativeUnit to create.</param>
72+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
73+
/// <returns>The created AdministrativeUnit.</returns>
74+
public async System.Threading.Tasks.Task<AdministrativeUnit> CreateAsync(AdministrativeUnit administrativeUnitToCreate, CancellationToken cancellationToken)
75+
{
76+
this.ContentType = "application/json";
77+
this.Method = "POST";
78+
var newEntity = await this.SendAsync<AdministrativeUnit>(administrativeUnitToCreate, cancellationToken).ConfigureAwait(false);
79+
return newEntity;
80+
}
81+
82+
/// <summary>
83+
/// Updates the specified AdministrativeUnit using PATCH.
84+
/// </summary>
85+
/// <param name="administrativeUnitToUpdate">The AdministrativeUnit to update.</param>
86+
/// <returns>The updated AdministrativeUnit.</returns>
87+
public System.Threading.Tasks.Task<AdministrativeUnit> UpdateAsync(AdministrativeUnit administrativeUnitToUpdate)
88+
{
89+
return this.UpdateAsync(administrativeUnitToUpdate, CancellationToken.None);
90+
}
91+
92+
/// <summary>
93+
/// Updates the specified AdministrativeUnit using PATCH.
94+
/// </summary>
95+
/// <param name="administrativeUnitToUpdate">The AdministrativeUnit to update.</param>
96+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
97+
/// <returns>The updated AdministrativeUnit.</returns>
98+
public async System.Threading.Tasks.Task<AdministrativeUnit> UpdateAsync(AdministrativeUnit administrativeUnitToUpdate, CancellationToken cancellationToken)
99+
{
100+
this.ContentType = "application/json";
101+
this.Method = "PATCH";
102+
var updatedEntity = await this.SendAsync<AdministrativeUnit>(administrativeUnitToUpdate, cancellationToken).ConfigureAwait(false);
103+
return updatedEntity;
104+
}
105+
106+
/// <summary>
107+
/// Deletes the specified AdministrativeUnit.
108+
/// </summary>
109+
/// <returns>The task to await.</returns>
110+
public System.Threading.Tasks.Task DeleteAsync()
111+
{
112+
return this.DeleteAsync(CancellationToken.None);
113+
}
114+
115+
/// <summary>
116+
/// Deletes the specified AdministrativeUnit.
117+
/// </summary>
118+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
119+
/// <returns>The task to await.</returns>
120+
public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken)
121+
{
122+
this.Method = "DELETE";
123+
await this.SendAsync<AdministrativeUnit>(null, cancellationToken).ConfigureAwait(false);
124+
}
125+
58126
/// <summary>
59127
/// Adds the specified expand value to the request.
60128
/// </summary>

src/Microsoft.Graph/Requests/Generated/DirectoryObjectWithReferenceRequest.cs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,74 @@ public async System.Threading.Tasks.Task<DirectoryObject> GetAsync(CancellationT
5555
return retrievedEntity;
5656
}
5757

58+
/// <summary>
59+
/// Creates the specified DirectoryObject using POST.
60+
/// </summary>
61+
/// <param name="directoryObjectToCreate">The DirectoryObject to create.</param>
62+
/// <returns>The created DirectoryObject.</returns>
63+
public System.Threading.Tasks.Task<DirectoryObject> CreateAsync(DirectoryObject directoryObjectToCreate)
64+
{
65+
return this.CreateAsync(directoryObjectToCreate, CancellationToken.None);
66+
}
67+
68+
/// <summary>
69+
/// Creates the specified DirectoryObject using POST.
70+
/// </summary>
71+
/// <param name="directoryObjectToCreate">The DirectoryObject to create.</param>
72+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
73+
/// <returns>The created DirectoryObject.</returns>
74+
public async System.Threading.Tasks.Task<DirectoryObject> CreateAsync(DirectoryObject directoryObjectToCreate, CancellationToken cancellationToken)
75+
{
76+
this.ContentType = "application/json";
77+
this.Method = "POST";
78+
var newEntity = await this.SendAsync<DirectoryObject>(directoryObjectToCreate, cancellationToken).ConfigureAwait(false);
79+
return newEntity;
80+
}
81+
82+
/// <summary>
83+
/// Updates the specified DirectoryObject using PATCH.
84+
/// </summary>
85+
/// <param name="directoryObjectToUpdate">The DirectoryObject to update.</param>
86+
/// <returns>The updated DirectoryObject.</returns>
87+
public System.Threading.Tasks.Task<DirectoryObject> UpdateAsync(DirectoryObject directoryObjectToUpdate)
88+
{
89+
return this.UpdateAsync(directoryObjectToUpdate, CancellationToken.None);
90+
}
91+
92+
/// <summary>
93+
/// Updates the specified DirectoryObject using PATCH.
94+
/// </summary>
95+
/// <param name="directoryObjectToUpdate">The DirectoryObject to update.</param>
96+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
97+
/// <returns>The updated DirectoryObject.</returns>
98+
public async System.Threading.Tasks.Task<DirectoryObject> UpdateAsync(DirectoryObject directoryObjectToUpdate, CancellationToken cancellationToken)
99+
{
100+
this.ContentType = "application/json";
101+
this.Method = "PATCH";
102+
var updatedEntity = await this.SendAsync<DirectoryObject>(directoryObjectToUpdate, cancellationToken).ConfigureAwait(false);
103+
return updatedEntity;
104+
}
105+
106+
/// <summary>
107+
/// Deletes the specified DirectoryObject.
108+
/// </summary>
109+
/// <returns>The task to await.</returns>
110+
public System.Threading.Tasks.Task DeleteAsync()
111+
{
112+
return this.DeleteAsync(CancellationToken.None);
113+
}
114+
115+
/// <summary>
116+
/// Deletes the specified DirectoryObject.
117+
/// </summary>
118+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
119+
/// <returns>The task to await.</returns>
120+
public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken)
121+
{
122+
this.Method = "DELETE";
123+
await this.SendAsync<DirectoryObject>(null, cancellationToken).ConfigureAwait(false);
124+
}
125+
58126
/// <summary>
59127
/// Adds the specified expand value to the request.
60128
/// </summary>

src/Microsoft.Graph/Requests/Generated/EducationClassWithReferenceRequest.cs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,74 @@ public async System.Threading.Tasks.Task<EducationClass> GetAsync(CancellationTo
5555
return retrievedEntity;
5656
}
5757

58+
/// <summary>
59+
/// Creates the specified EducationClass using POST.
60+
/// </summary>
61+
/// <param name="educationClassToCreate">The EducationClass to create.</param>
62+
/// <returns>The created EducationClass.</returns>
63+
public System.Threading.Tasks.Task<EducationClass> CreateAsync(EducationClass educationClassToCreate)
64+
{
65+
return this.CreateAsync(educationClassToCreate, CancellationToken.None);
66+
}
67+
68+
/// <summary>
69+
/// Creates the specified EducationClass using POST.
70+
/// </summary>
71+
/// <param name="educationClassToCreate">The EducationClass to create.</param>
72+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
73+
/// <returns>The created EducationClass.</returns>
74+
public async System.Threading.Tasks.Task<EducationClass> CreateAsync(EducationClass educationClassToCreate, CancellationToken cancellationToken)
75+
{
76+
this.ContentType = "application/json";
77+
this.Method = "POST";
78+
var newEntity = await this.SendAsync<EducationClass>(educationClassToCreate, cancellationToken).ConfigureAwait(false);
79+
return newEntity;
80+
}
81+
82+
/// <summary>
83+
/// Updates the specified EducationClass using PATCH.
84+
/// </summary>
85+
/// <param name="educationClassToUpdate">The EducationClass to update.</param>
86+
/// <returns>The updated EducationClass.</returns>
87+
public System.Threading.Tasks.Task<EducationClass> UpdateAsync(EducationClass educationClassToUpdate)
88+
{
89+
return this.UpdateAsync(educationClassToUpdate, CancellationToken.None);
90+
}
91+
92+
/// <summary>
93+
/// Updates the specified EducationClass using PATCH.
94+
/// </summary>
95+
/// <param name="educationClassToUpdate">The EducationClass to update.</param>
96+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
97+
/// <returns>The updated EducationClass.</returns>
98+
public async System.Threading.Tasks.Task<EducationClass> UpdateAsync(EducationClass educationClassToUpdate, CancellationToken cancellationToken)
99+
{
100+
this.ContentType = "application/json";
101+
this.Method = "PATCH";
102+
var updatedEntity = await this.SendAsync<EducationClass>(educationClassToUpdate, cancellationToken).ConfigureAwait(false);
103+
return updatedEntity;
104+
}
105+
106+
/// <summary>
107+
/// Deletes the specified EducationClass.
108+
/// </summary>
109+
/// <returns>The task to await.</returns>
110+
public System.Threading.Tasks.Task DeleteAsync()
111+
{
112+
return this.DeleteAsync(CancellationToken.None);
113+
}
114+
115+
/// <summary>
116+
/// Deletes the specified EducationClass.
117+
/// </summary>
118+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
119+
/// <returns>The task to await.</returns>
120+
public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken)
121+
{
122+
this.Method = "DELETE";
123+
await this.SendAsync<EducationClass>(null, cancellationToken).ConfigureAwait(false);
124+
}
125+
58126
/// <summary>
59127
/// Adds the specified expand value to the request.
60128
/// </summary>

src/Microsoft.Graph/Requests/Generated/EducationSchoolWithReferenceRequest.cs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,74 @@ public async System.Threading.Tasks.Task<EducationSchool> GetAsync(CancellationT
5555
return retrievedEntity;
5656
}
5757

58+
/// <summary>
59+
/// Creates the specified EducationSchool using POST.
60+
/// </summary>
61+
/// <param name="educationSchoolToCreate">The EducationSchool to create.</param>
62+
/// <returns>The created EducationSchool.</returns>
63+
public System.Threading.Tasks.Task<EducationSchool> CreateAsync(EducationSchool educationSchoolToCreate)
64+
{
65+
return this.CreateAsync(educationSchoolToCreate, CancellationToken.None);
66+
}
67+
68+
/// <summary>
69+
/// Creates the specified EducationSchool using POST.
70+
/// </summary>
71+
/// <param name="educationSchoolToCreate">The EducationSchool to create.</param>
72+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
73+
/// <returns>The created EducationSchool.</returns>
74+
public async System.Threading.Tasks.Task<EducationSchool> CreateAsync(EducationSchool educationSchoolToCreate, CancellationToken cancellationToken)
75+
{
76+
this.ContentType = "application/json";
77+
this.Method = "POST";
78+
var newEntity = await this.SendAsync<EducationSchool>(educationSchoolToCreate, cancellationToken).ConfigureAwait(false);
79+
return newEntity;
80+
}
81+
82+
/// <summary>
83+
/// Updates the specified EducationSchool using PATCH.
84+
/// </summary>
85+
/// <param name="educationSchoolToUpdate">The EducationSchool to update.</param>
86+
/// <returns>The updated EducationSchool.</returns>
87+
public System.Threading.Tasks.Task<EducationSchool> UpdateAsync(EducationSchool educationSchoolToUpdate)
88+
{
89+
return this.UpdateAsync(educationSchoolToUpdate, CancellationToken.None);
90+
}
91+
92+
/// <summary>
93+
/// Updates the specified EducationSchool using PATCH.
94+
/// </summary>
95+
/// <param name="educationSchoolToUpdate">The EducationSchool to update.</param>
96+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
97+
/// <returns>The updated EducationSchool.</returns>
98+
public async System.Threading.Tasks.Task<EducationSchool> UpdateAsync(EducationSchool educationSchoolToUpdate, CancellationToken cancellationToken)
99+
{
100+
this.ContentType = "application/json";
101+
this.Method = "PATCH";
102+
var updatedEntity = await this.SendAsync<EducationSchool>(educationSchoolToUpdate, cancellationToken).ConfigureAwait(false);
103+
return updatedEntity;
104+
}
105+
106+
/// <summary>
107+
/// Deletes the specified EducationSchool.
108+
/// </summary>
109+
/// <returns>The task to await.</returns>
110+
public System.Threading.Tasks.Task DeleteAsync()
111+
{
112+
return this.DeleteAsync(CancellationToken.None);
113+
}
114+
115+
/// <summary>
116+
/// Deletes the specified EducationSchool.
117+
/// </summary>
118+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
119+
/// <returns>The task to await.</returns>
120+
public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken)
121+
{
122+
this.Method = "DELETE";
123+
await this.SendAsync<EducationSchool>(null, cancellationToken).ConfigureAwait(false);
124+
}
125+
58126
/// <summary>
59127
/// Adds the specified expand value to the request.
60128
/// </summary>

src/Microsoft.Graph/Requests/Generated/EducationUserWithReferenceRequest.cs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,74 @@ public async System.Threading.Tasks.Task<EducationUser> GetAsync(CancellationTok
5555
return retrievedEntity;
5656
}
5757

58+
/// <summary>
59+
/// Creates the specified EducationUser using POST.
60+
/// </summary>
61+
/// <param name="educationUserToCreate">The EducationUser to create.</param>
62+
/// <returns>The created EducationUser.</returns>
63+
public System.Threading.Tasks.Task<EducationUser> CreateAsync(EducationUser educationUserToCreate)
64+
{
65+
return this.CreateAsync(educationUserToCreate, CancellationToken.None);
66+
}
67+
68+
/// <summary>
69+
/// Creates the specified EducationUser using POST.
70+
/// </summary>
71+
/// <param name="educationUserToCreate">The EducationUser to create.</param>
72+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
73+
/// <returns>The created EducationUser.</returns>
74+
public async System.Threading.Tasks.Task<EducationUser> CreateAsync(EducationUser educationUserToCreate, CancellationToken cancellationToken)
75+
{
76+
this.ContentType = "application/json";
77+
this.Method = "POST";
78+
var newEntity = await this.SendAsync<EducationUser>(educationUserToCreate, cancellationToken).ConfigureAwait(false);
79+
return newEntity;
80+
}
81+
82+
/// <summary>
83+
/// Updates the specified EducationUser using PATCH.
84+
/// </summary>
85+
/// <param name="educationUserToUpdate">The EducationUser to update.</param>
86+
/// <returns>The updated EducationUser.</returns>
87+
public System.Threading.Tasks.Task<EducationUser> UpdateAsync(EducationUser educationUserToUpdate)
88+
{
89+
return this.UpdateAsync(educationUserToUpdate, CancellationToken.None);
90+
}
91+
92+
/// <summary>
93+
/// Updates the specified EducationUser using PATCH.
94+
/// </summary>
95+
/// <param name="educationUserToUpdate">The EducationUser to update.</param>
96+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
97+
/// <returns>The updated EducationUser.</returns>
98+
public async System.Threading.Tasks.Task<EducationUser> UpdateAsync(EducationUser educationUserToUpdate, CancellationToken cancellationToken)
99+
{
100+
this.ContentType = "application/json";
101+
this.Method = "PATCH";
102+
var updatedEntity = await this.SendAsync<EducationUser>(educationUserToUpdate, cancellationToken).ConfigureAwait(false);
103+
return updatedEntity;
104+
}
105+
106+
/// <summary>
107+
/// Deletes the specified EducationUser.
108+
/// </summary>
109+
/// <returns>The task to await.</returns>
110+
public System.Threading.Tasks.Task DeleteAsync()
111+
{
112+
return this.DeleteAsync(CancellationToken.None);
113+
}
114+
115+
/// <summary>
116+
/// Deletes the specified EducationUser.
117+
/// </summary>
118+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
119+
/// <returns>The task to await.</returns>
120+
public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken)
121+
{
122+
this.Method = "DELETE";
123+
await this.SendAsync<EducationUser>(null, cancellationToken).ConfigureAwait(false);
124+
}
125+
58126
/// <summary>
59127
/// Adds the specified expand value to the request.
60128
/// </summary>

0 commit comments

Comments
 (0)