Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Azure.Core;
using Azure.ResourceManager.Models;

namespace Azure.ResourceManager.EdgeOrder.Models
{
public static partial class ArmEdgeOrderModelFactory
{
/// <summary> Initializes a new instance of <see cref="Models.EdgeOrderItemDetails"/>. </summary>
/// <param name="productDetails"> Unique identifier for configuration. </param>
/// <param name="orderItemType"> Order item type. </param>
/// <param name="currentStage"> Current Order item Status. </param>
/// <param name="orderItemStageHistory"> Order item status history. </param>
/// <param name="preferences"> Customer notification Preferences. </param>
/// <param name="forwardShippingDetails"> Forward Package Shipping details. </param>
/// <param name="reverseShippingDetails"> Reverse Package Shipping details. </param>
/// <param name="notificationEmailList"> Additional notification email list. </param>
/// <param name="cancellationReason"> Cancellation reason. </param>
/// <param name="cancellationStatus"> Describes whether the order item is cancellable or not. </param>
/// <param name="deletionStatus"> Describes whether the order item is deletable or not. </param>
/// <param name="returnReason"> Return reason. </param>
/// <param name="returnStatus"> Describes whether the order item is returnable or not. </param>
/// <param name="firstOrDefaultManagementResourceProviderNamespace"> Parent RP details - this returns only the first or default parent RP from the entire list. </param>
/// <param name="managementRPDetailsList"> List of parent RP details supported for configuration. </param>
/// <param name="error"> Top level error for the job. </param>
/// <returns> A new <see cref="Models.EdgeOrderItemDetails"/> instance for mocking. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static EdgeOrderItemDetails EdgeOrderItemDetails(ProductDetails productDetails = null, OrderItemType orderItemType = default, EdgeOrderStageDetails currentStage = null, IEnumerable<EdgeOrderStageDetails> orderItemStageHistory = null, OrderItemPreferences preferences = null, ForwardShippingDetails forwardShippingDetails = null, ReverseShippingDetails reverseShippingDetails = null, IEnumerable<string> notificationEmailList = null, string cancellationReason = null, OrderItemCancellationStatus? cancellationStatus = null, EdgeOrderActionStatus? deletionStatus = null, string returnReason = null, OrderItemReturnStatus? returnStatus = null, string firstOrDefaultManagementResourceProviderNamespace = null, IEnumerable<ResourceProviderDetails> managementRPDetailsList = null, ResponseError error = null)
{
orderItemStageHistory ??= new List<EdgeOrderStageDetails>();
notificationEmailList ??= new List<string>();
managementRPDetailsList ??= new List<ResourceProviderDetails>();

return new EdgeOrderItemDetails(
productDetails,
orderItemType,
null,
null,
currentStage,
orderItemStageHistory?.ToList(),
preferences,
forwardShippingDetails,
reverseShippingDetails,
notificationEmailList?.ToList(),
cancellationReason,
cancellationStatus,
deletionStatus,
returnReason,
returnStatus,
managementRPDetailsList?.ToList(),
error,
serializedAdditionalRawData: null);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using Autorest.CSharp.Core;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager.Resources;

[assembly: CodeGenSuppressType(nameof(IEnumerator))]
[assembly: CodeGenSuppressType(nameof(IEnumerator<Azure.ResourceManager.EdgeOrder.EdgeOrderAddressResource>))]
[assembly: CodeGenSuppressType(nameof(IAsyncEnumerator<Azure.ResourceManager.EdgeOrder.EdgeOrderAddressResource>))]
namespace Azure.ResourceManager.EdgeOrder
{
public partial class EdgeOrderAddressCollection
{
/// <summary>
/// Lists all the addresses available under the given resource group.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>ListAddressesAtResourceGroupLevel</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2021-12-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="EdgeOrderAddressResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="filter"> $filter is supported to filter based on shipping address properties. Filter supports only equals operation. </param>
/// <param name="skipToken"> $skipToken is supported on Get list of addresses, which provides the next page in the list of address. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="EdgeOrderAddressResource"/> that may take multiple service requests to iterate over. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual AsyncPageable<EdgeOrderAddressResource> GetAllAsync(string filter = null, string skipToken = null, CancellationToken cancellationToken = default)
{
return GetAllAsync(filter, skipToken, null, cancellationToken);
}

/// <summary>
/// Lists all the addresses available under the given resource group.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>ListAddressesAtResourceGroupLevel</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2021-12-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="EdgeOrderAddressResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="filter"> $filter is supported to filter based on shipping address properties. Filter supports only equals operation. </param>
/// <param name="skipToken"> $skipToken is supported on Get list of addresses, which provides the next page in the list of address. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="EdgeOrderAddressResource"/> that may take multiple service requests to iterate over. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual Pageable<EdgeOrderAddressResource> GetAll(string filter = null, string skipToken = null, CancellationToken cancellationToken = default)
{
return GetAll(filter, skipToken, null, cancellationToken);
}

IEnumerator<EdgeOrderAddressResource> IEnumerable<EdgeOrderAddressResource>.GetEnumerator()
{
return GetAll(null, null, null).GetEnumerator();
}

IEnumerator IEnumerable.GetEnumerator()
{
return GetAll(null, null, null).GetEnumerator();
}

IAsyncEnumerator<EdgeOrderAddressResource> IAsyncEnumerable<EdgeOrderAddressResource>.GetAsyncEnumerator(CancellationToken cancellationToken)
{
return GetAllAsync(null, null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.EdgeOrder.Models;
using Azure.ResourceManager.Models;

namespace Azure.ResourceManager.EdgeOrder
{
public partial class EdgeOrderAddressData
{
/// <summary> Initializes a new instance of <see cref="EdgeOrderAddressData"/>. </summary>
/// <param name="location"> The location. </param>
/// <param name="contactDetails"> Contact details for the address. </param>
/// <exception cref="ArgumentNullException"> <paramref name="contactDetails"/> is null. </exception>
public EdgeOrderAddressData(AzureLocation location, EdgeOrderAddressContactDetails contactDetails) : base(location)
{
Argument.AssertNotNull(contactDetails, nameof(contactDetails));

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

#nullable disable

using System;
using System.Collections.Generic;
using System.ComponentModel;
using Azure.Core;
using Azure.ResourceManager.EdgeOrder.Models;
using Azure.ResourceManager.Models;

namespace Azure.ResourceManager.EdgeOrder
{
public partial class EdgeOrderData
{
/// <summary> Initializes a new instance of <see cref="EdgeOrderData"/>. </summary>
public EdgeOrderData()
{
OrderStageHistory = new ChangeTrackingList<EdgeOrderStageDetails>();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using Autorest.CSharp.Core;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager.Resources;

[assembly: CodeGenSuppressType(nameof(IEnumerator))]
[assembly: CodeGenSuppressType(nameof(IEnumerator<Azure.ResourceManager.EdgeOrder.EdgeOrderItemResource>))]
[assembly: CodeGenSuppressType(nameof(IAsyncEnumerator<Azure.ResourceManager.EdgeOrder.EdgeOrderItemResource>))]
namespace Azure.ResourceManager.EdgeOrder
{
public partial class EdgeOrderItemCollection
{
/// <summary>
/// Lists order item at resource group level.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>ListOrderItemsAtResourceGroupLevel</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2021-12-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="EdgeOrderItemResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="filter"> $filter is supported to filter based on order id. Filter supports only equals operation. </param>
/// <param name="expand"> $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. </param>
/// <param name="skipToken"> $skipToken is supported on Get list of order items, which provides the next page in the list of order items. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="EdgeOrderItemResource"/> that may take multiple service requests to iterate over. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual AsyncPageable<EdgeOrderItemResource> GetAllAsync(string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default)
{
return GetAllAsync(filter, expand, skipToken, null, cancellationToken);
}

/// <summary>
/// Lists order item at resource group level.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>ListOrderItemsAtResourceGroupLevel</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2021-12-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="EdgeOrderItemResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="filter"> $filter is supported to filter based on order id. Filter supports only equals operation. </param>
/// <param name="expand"> $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. </param>
/// <param name="skipToken"> $skipToken is supported on Get list of order items, which provides the next page in the list of order items. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="EdgeOrderItemResource"/> that may take multiple service requests to iterate over. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual Pageable<EdgeOrderItemResource> GetAll(string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default)
{
return GetAll(filter, expand, skipToken, null, cancellationToken);
}

IEnumerator<EdgeOrderItemResource> IEnumerable<EdgeOrderItemResource>.GetEnumerator()
{
return GetAll(null, null, null, null).GetEnumerator();
}

IEnumerator IEnumerable.GetEnumerator()
{
return GetAll(null, null, null, null).GetEnumerator();
}

IAsyncEnumerator<EdgeOrderItemResource> IAsyncEnumerable<EdgeOrderItemResource>.GetAsyncEnumerator(CancellationToken cancellationToken)
{
return GetAllAsync(null, null, null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.EdgeOrder.Models;
using Azure.ResourceManager.Models;

namespace Azure.ResourceManager.EdgeOrder
{
public partial class EdgeOrderItemData
{
/// <summary> Initializes a new instance of <see cref="EdgeOrderItemData"/>. </summary>
/// <param name="location"> The location. </param>
/// <param name="orderItemDetails"> Represents order item details. </param>
/// <param name="addressDetails"> Represents shipping and return address for order item. </param>
/// <param name="orderId"> Id of the order to which order item belongs to. </param>
/// <exception cref="ArgumentNullException"> <paramref name="orderItemDetails"/>, <paramref name="addressDetails"/> or <paramref name="orderId"/> is null. </exception>
public EdgeOrderItemData(AzureLocation location, EdgeOrderItemDetails orderItemDetails, EdgeOrderItemAddressDetails addressDetails, ResourceIdentifier orderId) : base(location)
{
Argument.AssertNotNull(orderItemDetails, nameof(orderItemDetails));
Argument.AssertNotNull(addressDetails, nameof(addressDetails));
Argument.AssertNotNull(orderId, nameof(orderId));

OrderItemDetails = orderItemDetails;
AddressDetails = addressDetails;
OrderId = orderId;
}
}
}
Loading
Loading