Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -24,7 +24,8 @@ public static partial class ArmSelfHelpModelFactory
[EditorBrowsable(EditorBrowsableState.Never)]
public static SelfHelpSolutionMetadata SelfHelpSolutionMetadata(ResourceIdentifier id, string name, ResourceType resourceType, ResourceManager.Models.SystemData systemData, string solutionId, string solutionType, string description, IEnumerable<IList<string>> requiredParameterSets)
{
return new SelfHelpSolutionMetadata(id, name, resourceType, systemData, default, serializedAdditionalRawData: null);
throw new NotImplementedException();
//return new SelfHelpSolutionMetadata(id, name, resourceType, systemData, default, serializedAdditionalRawData: null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ namespace Azure.ResourceManager.SelfHelp.Mocking
{
public partial class MockableSelfHelpArmClient : ArmResource
{
private ClientDiagnostics _discoverySolutionClientDiagnostics;
private DiscoverySolutionRestOperations _discoverySolutionRestClient;
//private ClientDiagnostics _discoverySolutionClientDiagnostics;
//private DiscoverySolution _discoverySolutionRestClient;

private ClientDiagnostics DiscoverySolutionClientDiagnostics => _discoverySolutionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private DiscoverySolutionRestOperations DiscoverySolutionRestClient => _discoverySolutionRestClient ??= new DiscoverySolutionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
//private ClientDiagnostics DiscoverySolutionClientDiagnostics => _discoverySolutionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SelfHelp", ProviderConstants.DefaultProviderNamespace, Diagnostics);

/// <summary>
/// Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.&lt;br/&gt; Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions. We will do our best to return the most effective solutions based on the type of inputs, in the request URL &lt;br/&gt;&lt;br/&gt; Mandatory input : problemClassificationId (Use the [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) &lt;br/&gt;Optional input: resourceUri OR resource Type &lt;br/&gt;&lt;br/&gt; &lt;b&gt;Note: &lt;/b&gt; ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API.
Expand All @@ -43,11 +42,7 @@ public partial class MockableSelfHelpArmClient : ArmResource
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual Pageable<SelfHelpSolutionMetadata> GetSelfHelpDiscoverySolutions(ResourceIdentifier scope, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(scope, nameof(scope));

HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionRestClient.CreateDiscoverSolutionsRequest(filter, skiptoken);
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DiscoverySolutionRestClient.CreateDiscoverSolutionsNextPageRequest(nextLink, filter, skiptoken);
return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SelfHelpSolutionMetadata.DeserializeSelfHelpSolutionMetadata(e), DiscoverySolutionClientDiagnostics, Pipeline, "MockableSelfHelpArmClient.GetSelfHelpDiscoverySolutions", "value", "nextLink", cancellationToken);
throw new NotImplementedException();
}

/// <summary>
Expand All @@ -74,11 +69,7 @@ public virtual Pageable<SelfHelpSolutionMetadata> GetSelfHelpDiscoverySolutions(
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual AsyncPageable<SelfHelpSolutionMetadata> GetSelfHelpDiscoverySolutionsAsync(ResourceIdentifier scope, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(scope, nameof(scope));

HttpMessage FirstPageRequest(int? pageSizeHint) => DiscoverySolutionRestClient.CreateDiscoverSolutionsRequest(filter, skiptoken);
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DiscoverySolutionRestClient.CreateDiscoverSolutionsNextPageRequest(nextLink, filter, skiptoken);
return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SelfHelpSolutionMetadata.DeserializeSelfHelpSolutionMetadata(e), DiscoverySolutionClientDiagnostics, Pipeline, "MockableSelfHelpArmClient.GetSelfHelpDiscoverySolutions", "value", "nextLink", cancellationToken);
throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ internal static SelfHelpSolutionMetadata DeserializeSelfHelpSolutionMetadata(Jso
List<SolutionMetadataProperties> array = new List<SolutionMetadataProperties>();
foreach (var item in property0.Value.EnumerateArray())
{
array.Add(SolutionMetadataProperties.DeserializeSolutionMetadataProperties(item));
array.Add(SolutionMetadataProperties.DeserializeSolutionMetadataProperties(item, default));
}
solutions = array;
continue;
Expand Down
Loading
Loading