/ src / settings-ui / Settings.UI.Library / AIServiceTypeMetadata.cs
AIServiceTypeMetadata.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System;
 6  using System.Collections.Generic;
 7  using System.Linq;
 8  
 9  namespace Microsoft.PowerToys.Settings.UI.Library
10  {
11      /// <summary>
12      /// Metadata information for an AI service type.
13      /// </summary>
14      public class AIServiceTypeMetadata
15      {
16          public AIServiceType ServiceType { get; init; }
17  
18          public string DisplayName { get; init; }
19  
20          public string IconPath { get; init; }
21  
22          public bool IsOnlineService { get; init; }
23  
24          public bool IsAvailableInUI { get; init; } = true;
25  
26          public bool IsLocalModel { get; init; }
27  
28          public string LegalDescription { get; init; }
29  
30          public string TermsLabel { get; init; }
31  
32          public Uri TermsUri { get; init; }
33  
34          public string PrivacyLabel { get; init; }
35  
36          public Uri PrivacyUri { get; init; }
37  
38          public bool HasLegalInfo => !string.IsNullOrWhiteSpace(LegalDescription);
39  
40          public bool HasTermsLink => TermsUri is not null && !string.IsNullOrEmpty(TermsLabel);
41  
42          public bool HasPrivacyLink => PrivacyUri is not null && !string.IsNullOrEmpty(PrivacyLabel);
43      }
44  }