Skip to content
  •  
  •  
  •  

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;

namespace Azure.ResourceManager.DevCenter
{
public partial class DevCenterPoolResource
{
/// <summary>
/// Gets a schedule resource.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterScheduleResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scheduleName"> The name of the schedule that uniquely identifies it. </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="scheduleName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="scheduleName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public virtual async Task<Response<DevCenterScheduleResource>> GetDevCenterScheduleAsync(string scheduleName, int? top = null, CancellationToken cancellationToken = default)
{
return await GetDevCenterScheduleAsync(scheduleName, cancellationToken).ConfigureAwait(false);
}

/// <summary>
/// Gets a schedule resource.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterScheduleResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scheduleName"> The name of the schedule that uniquely identifies it. </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="scheduleName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="scheduleName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public virtual Response<DevCenterScheduleResource> GetDevCenterSchedule(string scheduleName, int? top = null, CancellationToken cancellationToken = default)
{
return GetDevCenterSchedule(scheduleName, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System.Threading;
using Autorest.CSharp.Core;
using Azure.Core;

namespace Azure.ResourceManager.DevCenter
{
// Due to the breaking change that caused a change in the return type, the method name has been renamed and the required method for the API has been added back.
public partial class DevCenterResource
{
/// <summary>
/// Lists images for a devcenter.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/images</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Images_ListByDevCenter</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterImageResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="DevCenterImageResource"/> that may take multiple service requests to iterate over. </returns>
public virtual AsyncPageable<DevCenterImageResource> GetImagesAsync(int? top = null, CancellationToken cancellationToken = default)
{
HttpMessage FirstPageRequest(int? pageSizeHint) => _imagesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top);
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _imagesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top);
return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevCenterImageResource(Client, DevCenterImageData.DeserializeDevCenterImageData(e)), _imagesClientDiagnostics, Pipeline, "DevCenterResource.GetImages", "value", "nextLink", cancellationToken);
}

/// <summary>
/// Lists images for a devcenter.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/images</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Images_ListByDevCenter</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterImageResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="DevCenterImageResource"/> that may take multiple service requests to iterate over. </returns>
public virtual Pageable<DevCenterImageResource> GetImages(int? top = null, CancellationToken cancellationToken = default)
{
HttpMessage FirstPageRequest(int? pageSizeHint) => _imagesRestClient.CreateListByDevCenterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top);
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _imagesRestClient.CreateListByDevCenterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top);
return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevCenterImageResource(Client, DevCenterImageData.DeserializeDevCenterImageData(e)), _imagesClientDiagnostics, Pipeline, "DevCenterResource.GetImages", "value", "nextLink", cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Threading;
using System.Threading.Tasks;

namespace Azure.ResourceManager.DevCenter
{
public partial class DevCenterScheduleCollection
{
/// <summary>
/// Gets a schedule resource.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterScheduleResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scheduleName"> The name of the schedule that uniquely identifies it. </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="scheduleName"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="scheduleName"/> is null. </exception>
public virtual async Task<Response<DevCenterScheduleResource>> GetAsync(string scheduleName, int? top, CancellationToken cancellationToken = default)
{
return await GetAsync(scheduleName, cancellationToken).ConfigureAwait(false);
}

/// <summary>
/// Gets a schedule resource.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterScheduleResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scheduleName"> The name of the schedule that uniquely identifies it. </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="scheduleName"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="scheduleName"/> is null. </exception>
public virtual Response<DevCenterScheduleResource> Get(string scheduleName, int? top, CancellationToken cancellationToken = default)
{
return Get(scheduleName, cancellationToken);
}

/// <summary>
/// Checks to see if the resource exists in azure.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterScheduleResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scheduleName"> The name of the schedule that uniquely identifies it. </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="scheduleName"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="scheduleName"/> is null. </exception>
public virtual async Task<Response<bool>> ExistsAsync(string scheduleName, int? top, CancellationToken cancellationToken = default)
{
return await ExistsAsync(scheduleName, cancellationToken).ConfigureAwait(false);
}

/// <summary>
/// Checks to see if the resource exists in azure.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterScheduleResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scheduleName"> The name of the schedule that uniquely identifies it. </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="scheduleName"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="scheduleName"/> is null. </exception>
public virtual Response<bool> Exists(string scheduleName, int? top, CancellationToken cancellationToken = default)
{
return Exists(scheduleName, cancellationToken);
}

/// <summary>
/// Tries to get details for this resource from the service.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterScheduleResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scheduleName"> The name of the schedule that uniquely identifies it. </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="scheduleName"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="scheduleName"/> is null. </exception>
public virtual async Task<NullableResponse<DevCenterScheduleResource>> GetIfExistsAsync(string scheduleName, int? top, CancellationToken cancellationToken = default)
{
return await GetIfExistsAsync(scheduleName, cancellationToken).ConfigureAwait(false);
}

/// <summary>
/// Tries to get details for this resource from the service.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2023-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="DevCenterScheduleResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="scheduleName"> The name of the schedule that uniquely identifies it. </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="scheduleName"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="scheduleName"/> is null. </exception>
public virtual NullableResponse<DevCenterScheduleResource> GetIfExists(string scheduleName, int? top, CancellationToken cancellationToken = default)
{
return GetIfExists(scheduleName, cancellationToken);
}
}
}
Loading
Loading