diff --git a/MK.IO/Account/AccountOperations.cs b/MK.IO/Account/AccountOperations.cs
new file mode 100644
index 0000000..445e11a
--- /dev/null
+++ b/MK.IO/Account/AccountOperations.cs
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+namespace MK.IO
+{
+ ///
+ /// REST Client for MKIO
+ /// https://io.mediakind.com
+ ///
+ ///
+ internal class AccountOperations : IAccountOperations
+ {
+ //
+ // subscription operations
+ //
+ private const string _accountProfileApiUrl = "api/profile/";
+ private const string _accountStatsApiUrl = "api/ams/{0}/stats/";
+ private const string _accountApiUrl = "api/accounts/{0}/";
+ private const string _accountSubscriptionsUrl = _accountApiUrl + "subscriptions/";
+ private const string _accountSubscriptionUrl = _accountSubscriptionsUrl + "{1}";
+ private const string _locationsApiUrl = "api/locations/";
+
+ ///
+ /// Gets a reference to the AzureMediaServicesClient
+ ///
+ private MKIOClient Client { get; set; }
+
+ ///
+ /// Initializes a new instance of the SubscriptionOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal AccountOperations(MKIOClient client)
+ {
+ Client = client ?? throw new ArgumentNullException(nameof(client));
+ }
+
+ ///
+ public AccountStats GetSubscriptionStats()
+ {
+ var task = Task.Run(async () => await GetSubscriptionStatsAsync());
+ return task.GetAwaiter().GetResult();
+ }
+
+ ///
+ public async Task GetSubscriptionStatsAsync()
+ {
+ var url = Client.GenerateApiUrl(_accountStatsApiUrl);
+ string responseContent = await Client.GetObjectContentAsync(url);
+ return AccountStats.FromJson(responseContent);
+ }
+
+ ///
+ public UserInfo GetUserProfile()
+ {
+ var task = Task.Run(async () => await GetUserProfileAsync());
+ return task.GetAwaiter().GetResult();
+ }
+
+ ///
+ public async Task GetUserProfileAsync()
+ {
+ string responseContent = await Client.GetObjectContentAsync(Client._baseUrl + _accountProfileApiUrl);
+ return AccountProfile.FromJson(responseContent).Spec;
+ }
+
+ ///
+ public List ListAllSubscriptions()
+ {
+ var task = Task.Run(async () => await ListAllSubscriptionsAsync());
+ return task.GetAwaiter().GetResult();
+ }
+
+ ///
+ public async Task> ListAllSubscriptionsAsync()
+ {
+ string responseContent = await Client.GetObjectContentAsync(GenerateAccountApiUrl(_accountSubscriptionsUrl));
+ return SubscriptionListResponseSchema.FromJson(responseContent).Items;
+ }
+
+ ///
+ public SubscriptionResponseSchema GetSubscription()
+ {
+ var task = Task.Run(async () => await GetSubscriptionAsync());
+ return task.GetAwaiter().GetResult();
+ }
+
+ ///
+ public async Task GetSubscriptionAsync()
+ {
+ string responseContent = await Client.GetObjectContentAsync(GenerateSubscriptionApiUrl(_accountSubscriptionUrl));
+ return SubscriptionResponseSchema.FromJson(responseContent);
+ }
+
+ ///
+ public List ListAllLocations()
+ {
+ var task = Task.Run(async () => await ListAllLocationsAsync());
+ return task.GetAwaiter().GetResult();
+ }
+
+ ///
+ public async Task> ListAllLocationsAsync()
+ {
+ string responseContent = await Client.GetObjectContentAsync(Client._baseUrl + _locationsApiUrl);
+ return LocationListResponseSchema.FromJson(responseContent).Items;
+ }
+
+
+ internal string GenerateAccountApiUrl(string urlPath)
+ {
+ return Client._baseUrl + string.Format(urlPath, Client.GetCustomerId());
+ }
+
+ internal string GenerateSubscriptionApiUrl(string urlPath)
+ {
+ return Client._baseUrl + string.Format(urlPath, Client.GetCustomerId(), Client.GetSubscriptionId());
+ }
+ }
+}
\ No newline at end of file
diff --git a/MK.IO/Account/IAccountOperations.cs b/MK.IO/Account/IAccountOperations.cs
new file mode 100644
index 0000000..0e48392
--- /dev/null
+++ b/MK.IO/Account/IAccountOperations.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+namespace MK.IO
+{
+ public interface IAccountOperations
+ {
+ ///
+ /// Get statistics for the current MK/IO subscription.
+ ///
+ ///
+ AccountStats GetSubscriptionStats();
+
+ ///
+ /// Get statistics for the current MK/IO subscription.
+ ///
+ ///
+ Task GetSubscriptionStatsAsync();
+
+ ///
+ /// Get user profile information.
+ ///
+ ///
+ UserInfo GetUserProfile();
+
+ ///
+ /// Get user profile information.
+ ///
+ ///
+ Task GetUserProfileAsync();
+
+ ///
+ /// Get the list of all MK/IO subscriptions for the account.
+ ///
+ ///
+ List ListAllSubscriptions();
+
+ ///
+ /// Get the list of all MK/IO subscriptions for the account.
+ ///
+ ///
+ Task> ListAllSubscriptionsAsync();
+
+ ///
+ /// Get the current MK/IO subscription.
+ ///
+ ///
+ SubscriptionResponseSchema GetSubscription();
+
+ ///
+ /// Get the current MK/IO subscription.
+ ///
+ ///
+ Task GetSubscriptionAsync();
+
+ ///
+ /// List all possible locations for MK/IO (Ids and names).
+ ///
+ ///
+ List ListAllLocations();
+
+ ///
+ /// List all possible locations for MK/IO (Ids and names).
+ ///
+ ///
+ Task> ListAllLocationsAsync();
+ }
+}
\ No newline at end of file
diff --git a/MK.IO/Subscription/Models/AccountProfile.cs b/MK.IO/Account/Models/AccountProfile.cs
similarity index 100%
rename from MK.IO/Subscription/Models/AccountProfile.cs
rename to MK.IO/Account/Models/AccountProfile.cs
diff --git a/MK.IO/Subscription/Models/AccountStats.cs b/MK.IO/Account/Models/AccountStats.cs
similarity index 100%
rename from MK.IO/Subscription/Models/AccountStats.cs
rename to MK.IO/Account/Models/AccountStats.cs
diff --git a/MK.IO/Account/Models/LocationListResponseSchema.cs b/MK.IO/Account/Models/LocationListResponseSchema.cs
new file mode 100644
index 0000000..6759491
--- /dev/null
+++ b/MK.IO/Account/Models/LocationListResponseSchema.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using Newtonsoft.Json;
+
+namespace MK.IO
+{
+ public partial class LocationListResponseSchema
+ {
+ public static LocationListResponseSchema FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json, ConverterLE.Settings);
+ }
+
+ public string ToJson()
+ {
+ return JsonConvert.SerializeObject(this, ConverterLE.Settings);
+ }
+
+
+ [JsonProperty("kind")]
+ public string Kind { get; set; }
+
+ [JsonProperty("items")]
+ public List Items { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MK.IO/Account/Models/LocationResponseSchema.cs b/MK.IO/Account/Models/LocationResponseSchema.cs
new file mode 100644
index 0000000..6b6d826
--- /dev/null
+++ b/MK.IO/Account/Models/LocationResponseSchema.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using Newtonsoft.Json;
+
+namespace MK.IO
+{
+ public partial class LocationResponseSchema
+ {
+ public static LocationResponseSchema FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json, ConverterLE.Settings);
+ }
+
+ public string ToJson()
+ {
+ return JsonConvert.SerializeObject(this, ConverterLE.Settings);
+ }
+
+
+ [JsonProperty("metadata")]
+ public MetadataLocation Metadata { get; set; }
+ }
+
+
+ public class MetadataLocation
+ {
+ [JsonProperty("id")]
+ public Guid Id { get; set; }
+
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ [JsonProperty("displayName")]
+ public string DisplayName { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MK.IO/Account/Models/SubscriptionListResponseSchema.cs b/MK.IO/Account/Models/SubscriptionListResponseSchema.cs
new file mode 100644
index 0000000..b0b0f22
--- /dev/null
+++ b/MK.IO/Account/Models/SubscriptionListResponseSchema.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using Newtonsoft.Json;
+
+namespace MK.IO
+{
+ public partial class SubscriptionListResponseSchema
+ {
+ public static SubscriptionListResponseSchema FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json, ConverterLE.Settings);
+ }
+
+ public string ToJson()
+ {
+ return JsonConvert.SerializeObject(this, ConverterLE.Settings);
+ }
+
+
+ [JsonProperty("kind")]
+ public string Kind { get; set; }
+
+ [JsonProperty("items")]
+ public List Items { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MK.IO/Account/Models/SubscriptionResponseSchema.cs b/MK.IO/Account/Models/SubscriptionResponseSchema.cs
new file mode 100644
index 0000000..637ccdb
--- /dev/null
+++ b/MK.IO/Account/Models/SubscriptionResponseSchema.cs
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using Newtonsoft.Json;
+
+namespace MK.IO
+{
+
+ public class SubscriptionResponseSchema
+ {
+ public static SubscriptionResponseSchema FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json, ConverterLE.Settings);
+ }
+
+ public string ToJson()
+ {
+ return JsonConvert.SerializeObject(this, ConverterLE.Settings);
+ }
+
+ [JsonProperty("metadata")]
+ public MetadataSubscription Metadata { get; set; }
+
+ [JsonProperty("spec")]
+ public SubscriptionSchema Spec { get; set; }
+ }
+
+ public class MetadataSubscription
+ {
+ [JsonProperty("id")]
+ public Guid Id { get; set; }
+
+ [JsonProperty("created")]
+ public DateTime Created { get; set; }
+
+ [JsonProperty("updated")]
+ public DateTime Updated { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MK.IO/Account/Models/SubscriptionSchema.cs b/MK.IO/Account/Models/SubscriptionSchema.cs
new file mode 100644
index 0000000..ab3fb9b
--- /dev/null
+++ b/MK.IO/Account/Models/SubscriptionSchema.cs
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using Newtonsoft.Json;
+
+namespace MK.IO
+{
+ public class SubscriptionSchema
+ {
+ [JsonProperty("customerId")]
+ public Guid CustomerId { get; set; }
+
+ [JsonProperty("createdById")]
+ public Guid CreatedById { get; set; }
+
+ [JsonProperty("locationId")]
+ public Guid LocationId { get; set; }
+
+ [JsonProperty("azureSubscriptionName")]
+ public string AzureSubscriptionName { get; set; }
+
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ [JsonProperty("isActive")]
+ public bool IsActive { get; set; }
+
+ [JsonProperty("projectSubscriptionId")]
+ public Guid ProjectSubscriptionId { get; set; }
+
+ [JsonProperty("productPublicationId")]
+ public Guid ProductPublicationId { get; set; }
+
+ [JsonProperty("azureSubscriptionStatus")]
+ public string AzureSubscriptionStatus { get; set; }
+
+ [JsonProperty("azureSubscriptionId")]
+ public Guid AzureSubscriptionId { get; set; }
+
+ [JsonProperty("azureSubscriptionOfferId")]
+ public string AzureSubscriptionOfferId { get; set; }
+
+ [JsonProperty("azureSubscriptionPlanId")]
+ public string AzureSubscriptionPlanId { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MK.IO/AccountFilter/AccountFiltersOperations.cs b/MK.IO/AccountFilter/AccountFiltersOperations.cs
index e3e5e6e..3d39c43 100644
--- a/MK.IO/AccountFilter/AccountFiltersOperations.cs
+++ b/MK.IO/AccountFilter/AccountFiltersOperations.cs
@@ -39,7 +39,7 @@ public async Task> ListAsync()
{
var url = Client.GenerateApiUrl(_accountFiltersApiUrl);
string responseContent = await Client.GetObjectContentAsync(url);
- return JsonConvert.DeserializeObject(responseContent, ConverterLE.Settings).Filters;
+ return JsonConvert.DeserializeObject(responseContent, ConverterLE.Settings).Value;
}
///
diff --git a/MK.IO/Asset/AssetsOperations.cs b/MK.IO/Asset/AssetsOperations.cs
index b93b004..aa6e3d6 100644
--- a/MK.IO/Asset/AssetsOperations.cs
+++ b/MK.IO/Asset/AssetsOperations.cs
@@ -160,7 +160,7 @@ public List ListStreamingLocators(string assetName)
public async Task> ListStreamingLocatorsAsync(string assetName)
{
var url = Client.GenerateApiUrl(_assetListStreamingLocatorsApiUrl, assetName);
- string responseContent = await Client.GetObjectContentAsync(url);
+ string responseContent = await Client.GetObjectPostContentAsync(url);
return AssetListStreamingLocators.FromJson(responseContent).StreamingLocators;
}
diff --git a/MK.IO/AssetFilter/AssetFiltersOperations.cs b/MK.IO/AssetFilter/AssetFiltersOperations.cs
index c120544..e0ae9f3 100644
--- a/MK.IO/AssetFilter/AssetFiltersOperations.cs
+++ b/MK.IO/AssetFilter/AssetFiltersOperations.cs
@@ -42,7 +42,7 @@ public async Task> ListAsync(string assetName)
{
var url = Client.GenerateApiUrl(_assetFiltersApiUrl, assetName);
string responseContent = await Client.GetObjectContentAsync(url);
- return JsonConvert.DeserializeObject(responseContent, ConverterLE.Settings).Filters;
+ return JsonConvert.DeserializeObject(responseContent, ConverterLE.Settings).Value;
}
///
diff --git a/MK.IO/ContentKeyPolicy/Models/ContentKeyPolicyConfigurationFairPlay.cs b/MK.IO/ContentKeyPolicy/Models/ContentKeyPolicyConfigurationFairPlay.cs
index 1222024..dae67fc 100644
--- a/MK.IO/ContentKeyPolicy/Models/ContentKeyPolicyConfigurationFairPlay.cs
+++ b/MK.IO/ContentKeyPolicy/Models/ContentKeyPolicyConfigurationFairPlay.cs
@@ -8,7 +8,7 @@ namespace MK.IO
public class ContentKeyPolicyConfigurationFairPlay : ContentKeyPolicyConfiguration
{
- public ContentKeyPolicyConfigurationFairPlay(string ask, string fairPlayPfx, string fairPlayPfxPassword, int rentalDuration, string rentalAndLeaseKeyType)
+ public ContentKeyPolicyConfigurationFairPlay(string ask, string fairPlayPfx, string fairPlayPfxPassword, long rentalDuration, string rentalAndLeaseKeyType)
{
Ask = ask;
FairPlayPfx = fairPlayPfx;
@@ -27,7 +27,7 @@ public ContentKeyPolicyConfigurationFairPlay(string ask, string fairPlayPfx, str
public string FairPlayPfx { get; set; }
[JsonProperty("rentalDuration")]
- public int RentalDuration { get; set; }
+ public long RentalDuration { get; set; }
[JsonProperty("fairPlayPfxPassword")]
public string FairPlayPfxPassword { get; set; }
diff --git a/MK.IO/CsharpDotNet2/Model/AbsoluteClipTime.cs b/MK.IO/CsharpDotNet2/Model/AbsoluteClipTime.cs
index d70b546..4f1e328 100644
--- a/MK.IO/CsharpDotNet2/Model/AbsoluteClipTime.cs
+++ b/MK.IO/CsharpDotNet2/Model/AbsoluteClipTime.cs
@@ -15,9 +15,9 @@ public class AbsoluteClipTime
/// The discriminator for derived types.
///
/// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
///
/// The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S for 30 seconds.
@@ -36,7 +36,7 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class AbsoluteClipTime {\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" Time: ").Append(Time).Append("\n");
sb.Append("}\n");
return sb.ToString();
diff --git a/MK.IO/CsharpDotNet2/Model/AccountFilterListResponseSchema.cs b/MK.IO/CsharpDotNet2/Model/AccountFilterListResponseSchema.cs
index 27db603..7917c99 100644
--- a/MK.IO/CsharpDotNet2/Model/AccountFilterListResponseSchema.cs
+++ b/MK.IO/CsharpDotNet2/Model/AccountFilterListResponseSchema.cs
@@ -15,9 +15,9 @@ public class AccountFilterListResponseSchema
/// A list of account filters
///
/// A list of account filters
- [DataMember(Name = "filters", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "filters")]
- public List Filters { get; set; }
+ [DataMember(Name = "value", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "value")]
+ public List Value { get; set; }
///
@@ -28,7 +28,7 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class AccountFilterListResponseSchema {\n");
- sb.Append(" Value: ").Append(Filters).Append("\n");
+ sb.Append(" Value: ").Append(Value).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/AssetFilterListResponseSchema.cs b/MK.IO/CsharpDotNet2/Model/AssetFilterListResponseSchema.cs
index c9fb955..78bd6db 100644
--- a/MK.IO/CsharpDotNet2/Model/AssetFilterListResponseSchema.cs
+++ b/MK.IO/CsharpDotNet2/Model/AssetFilterListResponseSchema.cs
@@ -15,9 +15,9 @@ public class AssetFilterListResponseSchema
/// A list of asset filters
///
/// A list of asset filters
- [DataMember(Name = "filters", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "filters")]
- public List Filters { get; set; }
+ [DataMember(Name = "value", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "value")]
+ public List Value { get; set; }
///
@@ -28,7 +28,7 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class AssetFilterListResponseSchema {\n");
- sb.Append(" Value: ").Append(Filters).Append("\n");
+ sb.Append(" Value: ").Append(Value).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/AssetProperties.cs b/MK.IO/CsharpDotNet2/Model/AssetProperties.cs
index 2d1a66b..c88a774 100644
--- a/MK.IO/CsharpDotNet2/Model/AssetProperties.cs
+++ b/MK.IO/CsharpDotNet2/Model/AssetProperties.cs
@@ -35,6 +35,14 @@ public class AssetProperties
[JsonProperty(PropertyName = "container")]
public string Container { get; set; }
+ ///
+ /// This field defines the deletion policy for the underlying storage container. This determines the behavior when an asset record is deleted. There are two options, 'DELETE', and 'PRESERVE'. A deletion policy of 'DELETE' will result in the associated storage container and all its contents being removed from storage. A deletion policy of 'PRESERVE' will leave the content in-place in your storage account. If left blank, the default behavior of the system will be to PRESERVE content. Once set by the user, this value can be modified, but not un-set.
+ ///
+ /// This field defines the deletion policy for the underlying storage container. This determines the behavior when an asset record is deleted. There are two options, 'DELETE', and 'PRESERVE'. A deletion policy of 'DELETE' will result in the associated storage container and all its contents being removed from storage. A deletion policy of 'PRESERVE' will leave the content in-place in your storage account. If left blank, the default behavior of the system will be to PRESERVE content. Once set by the user, this value can be modified, but not un-set.
+ [DataMember(Name = "containerDeletionPolicy", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "containerDeletionPolicy")]
+ public string ContainerDeletionPolicy { get; set; }
+
///
/// The Asset description.
///
@@ -79,6 +87,7 @@ public override string ToString()
sb.Append(" AlternateId: ").Append(AlternateId).Append("\n");
sb.Append(" AssetId: ").Append(AssetId).Append("\n");
sb.Append(" Container: ").Append(Container).Append("\n");
+ sb.Append(" ContainerDeletionPolicy: ").Append(ContainerDeletionPolicy).Append("\n");
sb.Append(" Description: ").Append(Description).Append("\n");
sb.Append(" EncryptionScope: ").Append(EncryptionScope).Append("\n");
sb.Append(" StorageAccountName: ").Append(StorageAccountName).Append("\n");
diff --git a/MK.IO/CsharpDotNet2/Model/AssetStorageDataSpecSchema.cs b/MK.IO/CsharpDotNet2/Model/AssetStorageDataSpecSchema.cs
index a64b93d..77648d0 100644
--- a/MK.IO/CsharpDotNet2/Model/AssetStorageDataSpecSchema.cs
+++ b/MK.IO/CsharpDotNet2/Model/AssetStorageDataSpecSchema.cs
@@ -35,15 +35,17 @@ public class AssetStorageDataSpecSchema
public ExceptionsSchema Exceptions { get; set; }
///
- /// Gets or Sets Files
+ /// A list of files in the storage container. This only represents files present at the top-level of the container.
///
+ /// A list of files in the storage container. This only represents files present at the top-level of the container.
[DataMember(Name = "files", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "files")]
public List Files { get; set; }
///
- /// Gets or Sets Folders
+ /// A list of folders in the storage container.
///
+ /// A list of folders in the storage container.
[DataMember(Name = "folders", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "folders")]
public List Folders { get; set; }
diff --git a/MK.IO/CsharpDotNet2/Model/AudioAnalyzerPreset.cs b/MK.IO/CsharpDotNet2/Model/AudioAnalyzerPreset.cs
index 1396e24..d9c664a 100644
--- a/MK.IO/CsharpDotNet2/Model/AudioAnalyzerPreset.cs
+++ b/MK.IO/CsharpDotNet2/Model/AudioAnalyzerPreset.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class AudioAnalyzerPreset
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US')
///
@@ -35,14 +43,6 @@ public class AudioAnalyzerPreset
[JsonProperty(PropertyName = "mode")]
public string Mode { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// Get the string presentation of the object
@@ -52,10 +52,10 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class AudioAnalyzerPreset {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" AudioLanguage: ").Append(AudioLanguage).Append("\n");
sb.Append(" ExperimentalOptions: ").Append(ExperimentalOptions).Append("\n");
sb.Append(" Mode: ").Append(Mode).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/AudioTrackDescriptor.cs b/MK.IO/CsharpDotNet2/Model/AudioTrackDescriptor.cs
index 3aa2ed3..d945a0d 100644
--- a/MK.IO/CsharpDotNet2/Model/AudioTrackDescriptor.cs
+++ b/MK.IO/CsharpDotNet2/Model/AudioTrackDescriptor.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class AudioTrackDescriptor
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// Optional designation for single channel audio tracks.
///
@@ -19,14 +27,6 @@ public class AudioTrackDescriptor
[JsonProperty(PropertyName = "channelMapping")]
public string ChannelMapping { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// Get the string presentation of the object
@@ -36,8 +36,8 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class AudioTrackDescriptor {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" ChannelMapping: ").Append(ChannelMapping).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/FromAllInputFile.cs b/MK.IO/CsharpDotNet2/Model/FromAllInputFile.cs
index 870b354..9ff0399 100644
--- a/MK.IO/CsharpDotNet2/Model/FromAllInputFile.cs
+++ b/MK.IO/CsharpDotNet2/Model/FromAllInputFile.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class FromAllInputFile
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
///
@@ -19,14 +27,6 @@ public class FromAllInputFile
[JsonProperty(PropertyName = "includedTracks")]
public List IncludedTracks { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// Get the string presentation of the object
@@ -36,8 +36,8 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class FromAllInputFile {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" IncludedTracks: ").Append(IncludedTracks).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/FromEachInputFile.cs b/MK.IO/CsharpDotNet2/Model/FromEachInputFile.cs
index 40aa0c8..2b84a32 100644
--- a/MK.IO/CsharpDotNet2/Model/FromEachInputFile.cs
+++ b/MK.IO/CsharpDotNet2/Model/FromEachInputFile.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class FromEachInputFile
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// The list of TrackDescriptors which define the metadata and selection of tracks in the input.
///
@@ -19,14 +27,6 @@ public class FromEachInputFile
[JsonProperty(PropertyName = "includedTracks")]
public List IncludedTracks { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// Get the string presentation of the object
@@ -36,8 +36,8 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class FromEachInputFile {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" IncludedTracks: ").Append(IncludedTracks).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/InputFile.cs b/MK.IO/CsharpDotNet2/Model/InputFile.cs
index c52d77e..cd8ddd0 100644
--- a/MK.IO/CsharpDotNet2/Model/InputFile.cs
+++ b/MK.IO/CsharpDotNet2/Model/InputFile.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class InputFile
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// Name of the file that this input definition applies to.
///
@@ -27,14 +35,6 @@ public class InputFile
[JsonProperty(PropertyName = "includedTracks")]
public List IncludedTracks { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// Get the string presentation of the object
@@ -44,9 +44,9 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class InputFile {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" Filename: ").Append(Filename).Append("\n");
sb.Append(" IncludedTracks: ").Append(IncludedTracks).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/JobOutputAsset.cs b/MK.IO/CsharpDotNet2/Model/JobOutputAsset.cs
index f4b54f2..549c087 100644
--- a/MK.IO/CsharpDotNet2/Model/JobOutputAsset.cs
+++ b/MK.IO/CsharpDotNet2/Model/JobOutputAsset.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class JobOutputAsset
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// The name of the input Asset
///
@@ -42,14 +50,6 @@ public class JobOutputAsset
[JsonProperty(PropertyName = "label")]
public string Label { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// If the JobOutput is in a Processing state, this contains the Job completion percentage. The value is an estimate and not intended to be used to predict Job completion times.
///
@@ -83,11 +83,11 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class JobOutputAsset {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" AssetName: ").Append(AssetName).Append("\n");
sb.Append(" EndTime: ").Append(EndTime).Append("\n");
sb.Append(" Error: ").Append(Error).Append("\n");
sb.Append(" Label: ").Append(Label).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append(" Progress: ").Append(Progress).Append("\n");
sb.Append(" StartTime: ").Append(StartTime).Append("\n");
sb.Append(" State: ").Append(State).Append("\n");
diff --git a/MK.IO/CsharpDotNet2/Model/LiveEventProperties.cs b/MK.IO/CsharpDotNet2/Model/LiveEventProperties.cs
index 15666b9..7cae715 100644
--- a/MK.IO/CsharpDotNet2/Model/LiveEventProperties.cs
+++ b/MK.IO/CsharpDotNet2/Model/LiveEventProperties.cs
@@ -72,9 +72,9 @@ public class LiveEventProperties
public LiveEventPreview Preview { get; set; }
///
- /// The current provisioning state of the resource. One of 'inProgress', 'succeeded', or 'failed'
+ /// The current provisioning state of the resource. One of 'InProgress', 'Succeeded', or 'Failed'
///
- /// The current provisioning state of the resource. One of 'inProgress', 'succeeded', or 'failed'
+ /// The current provisioning state of the resource. One of 'InProgress', 'Succeeded', or 'Failed'
[DataMember(Name = "provisioningState", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "provisioningState")]
public string ProvisioningState { get; set; }
diff --git a/MK.IO/CsharpDotNet2/Model/SelectAudioTrackByAttribute.cs b/MK.IO/CsharpDotNet2/Model/SelectAudioTrackByAttribute.cs
index d9c2553..1cb35ac 100644
--- a/MK.IO/CsharpDotNet2/Model/SelectAudioTrackByAttribute.cs
+++ b/MK.IO/CsharpDotNet2/Model/SelectAudioTrackByAttribute.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class SelectAudioTrackByAttribute
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// The TrackAttribute to filter the tracks by.
///
@@ -43,14 +51,6 @@ public class SelectAudioTrackByAttribute
[JsonProperty(PropertyName = "filterValue")]
public string FilterValue { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// Get the string presentation of the object
@@ -60,11 +60,11 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class SelectAudioTrackByAttribute {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" Attribute: ").Append(Attribute).Append("\n");
sb.Append(" ChannelMapping: ").Append(ChannelMapping).Append("\n");
sb.Append(" Filter: ").Append(Filter).Append("\n");
sb.Append(" FilterValue: ").Append(FilterValue).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/SelectAudioTrackById.cs b/MK.IO/CsharpDotNet2/Model/SelectAudioTrackById.cs
index 93914ef..25b551c 100644
--- a/MK.IO/CsharpDotNet2/Model/SelectAudioTrackById.cs
+++ b/MK.IO/CsharpDotNet2/Model/SelectAudioTrackById.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class SelectAudioTrackById
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// Optional designation for single channel audio tracks.
///
@@ -19,14 +27,6 @@ public class SelectAudioTrackById
[JsonProperty(PropertyName = "channelMapping")]
public string ChannelMapping { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// Track indentifer to select
///
@@ -44,8 +44,8 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class SelectAudioTrackById {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" ChannelMapping: ").Append(ChannelMapping).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append(" TrackId: ").Append(TrackId).Append("\n");
sb.Append("}\n");
return sb.ToString();
diff --git a/MK.IO/CsharpDotNet2/Model/SelectVideoTrackByAttribute.cs b/MK.IO/CsharpDotNet2/Model/SelectVideoTrackByAttribute.cs
index 59bf575..bc2b5e7 100644
--- a/MK.IO/CsharpDotNet2/Model/SelectVideoTrackByAttribute.cs
+++ b/MK.IO/CsharpDotNet2/Model/SelectVideoTrackByAttribute.cs
@@ -11,6 +11,14 @@ namespace MK.IO.Models
[DataContract]
public class SelectVideoTrackByAttribute
{
+ ///
+ /// The discriminator for derived types.
+ ///
+ /// The discriminator for derived types.
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
+
///
/// The TrackAttribute to filter the tracks by.
///
@@ -35,14 +43,6 @@ public class SelectVideoTrackByAttribute
[JsonProperty(PropertyName = "filterValue")]
public string FilterValue { get; set; }
- ///
- /// The discriminator for derived types.
- ///
- /// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
-
///
/// Get the string presentation of the object
@@ -52,10 +52,10 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class SelectVideoTrackByAttribute {\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" Attribute: ").Append(Attribute).Append("\n");
sb.Append(" Filter: ").Append(Filter).Append("\n");
sb.Append(" FilterValue: ").Append(FilterValue).Append("\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/CsharpDotNet2/Model/SelectVideoTrackById.cs b/MK.IO/CsharpDotNet2/Model/SelectVideoTrackById.cs
index 33cc4e6..ddc021a 100644
--- a/MK.IO/CsharpDotNet2/Model/SelectVideoTrackById.cs
+++ b/MK.IO/CsharpDotNet2/Model/SelectVideoTrackById.cs
@@ -15,9 +15,9 @@ public class SelectVideoTrackById
/// The discriminator for derived types.
///
/// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
///
/// Track indentifer to select
@@ -36,7 +36,7 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class SelectVideoTrackById {\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" TrackId: ").Append(TrackId).Append("\n");
sb.Append("}\n");
return sb.ToString();
diff --git a/MK.IO/CsharpDotNet2/Model/StreamingEndpointProperties.cs b/MK.IO/CsharpDotNet2/Model/StreamingEndpointProperties.cs
index 76493f7..24a02b0 100644
--- a/MK.IO/CsharpDotNet2/Model/StreamingEndpointProperties.cs
+++ b/MK.IO/CsharpDotNet2/Model/StreamingEndpointProperties.cs
@@ -98,9 +98,9 @@ public class StreamingEndpointProperties
public int? MaxCacheAge { get; set; }
///
- /// The provisioning state of the streaming endpoint. Set by the system. One of inProgress,Succeeded,Failed.
+ /// The provisioning state of the streaming endpoint. Set by the system. One of InProgress,Succeeded,Failed.
///
- /// The provisioning state of the streaming endpoint. Set by the system. One of inProgress,Succeeded,Failed.
+ /// The provisioning state of the streaming endpoint. Set by the system. One of InProgress,Succeeded,Failed.
[DataMember(Name = "provisioningState", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "provisioningState")]
public string ProvisioningState { get; set; }
diff --git a/MK.IO/CsharpDotNet2/Model/UtcClipTime.cs b/MK.IO/CsharpDotNet2/Model/UtcClipTime.cs
index e11501f..efe7b3f 100644
--- a/MK.IO/CsharpDotNet2/Model/UtcClipTime.cs
+++ b/MK.IO/CsharpDotNet2/Model/UtcClipTime.cs
@@ -15,9 +15,9 @@ public class UtcClipTime
/// The discriminator for derived types.
///
/// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
///
/// The time position on the timeline of the input media based on Utc time.
@@ -36,7 +36,7 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class UtcClipTime {\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append(" Time: ").Append(Time).Append("\n");
sb.Append("}\n");
return sb.ToString();
diff --git a/MK.IO/CsharpDotNet2/Model/VideoTrackDescriptor.cs b/MK.IO/CsharpDotNet2/Model/VideoTrackDescriptor.cs
index e575388..dd6de01 100644
--- a/MK.IO/CsharpDotNet2/Model/VideoTrackDescriptor.cs
+++ b/MK.IO/CsharpDotNet2/Model/VideoTrackDescriptor.cs
@@ -15,9 +15,9 @@ public class VideoTrackDescriptor
/// The discriminator for derived types.
///
/// The discriminator for derived types.
- [DataMember(Name = "odatatype", EmitDefaultValue = false)]
- [JsonProperty(PropertyName = "odatatype")]
- public string Odatatype { get; set; }
+ [DataMember(Name = "@odata.type", EmitDefaultValue = false)]
+ [JsonProperty(PropertyName = "@odata.type")]
+ public string OdataType { get; set; }
///
@@ -28,7 +28,7 @@ public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class VideoTrackDescriptor {\n");
- sb.Append(" Odatatype: ").Append(Odatatype).Append("\n");
+ sb.Append(" OdataType: ").Append(OdataType).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
diff --git a/MK.IO/IMKIOClient.cs b/MK.IO/IMKIOClient.cs
index 69536f2..3c6aa21 100644
--- a/MK.IO/IMKIOClient.cs
+++ b/MK.IO/IMKIOClient.cs
@@ -15,7 +15,7 @@ public interface IMKIOClient
///
/// Gets the ISubscriptionOperations.
///
- ISubscriptionOperations Subscription { get; }
+ IAccountOperations Account { get; }
///
/// Gets the IAssetsOperations.
diff --git a/MK.IO/Job/JobsOperations.cs b/MK.IO/Job/JobsOperations.cs
index adb9798..d08130a 100644
--- a/MK.IO/Job/JobsOperations.cs
+++ b/MK.IO/Job/JobsOperations.cs
@@ -100,7 +100,7 @@ public async Task CreateAsync(string transformName, string jobName, J
// fix to make sure Odattype is set as we use the generated class
foreach (var o in properties.Outputs)
{
- o.Odatatype = "#Microsoft.Media.JobOutputAsset";
+ o.OdataType = "#Microsoft.Media.JobOutputAsset";
}
var content = new JobSchema { Properties = properties };
diff --git a/MK.IO/LiveEvent/LiveEventsOperations.cs b/MK.IO/LiveEvent/LiveEventsOperations.cs
index bbc7e95..1afb3f2 100644
--- a/MK.IO/LiveEvent/LiveEventsOperations.cs
+++ b/MK.IO/LiveEvent/LiveEventsOperations.cs
@@ -95,7 +95,7 @@ public async Task CreateAsync(string liveEventName, string loca
return await CreateOrUpdateAsync(liveEventName, location, properties, tags, Client.CreateObjectAsync);
}
- internal async Task CreateOrUpdateAsync(string liveEventName, string location, LiveEventProperties properties, Dictionary tags, Func> func)
+ internal async Task CreateOrUpdateAsync(string liveEventName, string location, LiveEventProperties properties, Dictionary tags, Func> func)
{
var url = Client.GenerateApiUrl(_liveEventApiUrl, liveEventName);
tags ??= new Dictionary();
diff --git a/MK.IO/MK.IO.csproj b/MK.IO/MK.IO.csproj
index 606abb8..5a4e2e6 100644
--- a/MK.IO/MK.IO.csproj
+++ b/MK.IO/MK.IO.csproj
@@ -10,11 +10,11 @@
A client library for MediaKind MK/IO.
LICENSE.txt
README.md
- 1.0.3
+ 1.0.4
https://github.com/xpouyat/MK.IO
https://github.com/xpouyat/MK.IO/blob/master/README.md
- 1.0.3.0
- 1.0.3.0
+ 1.0.4.0
+ 1.0.4.0
A client library for MediaKind MK/IO.
True
snupkg
diff --git a/MK.IO/MKIOClient.cs b/MK.IO/MKIOClient.cs
index 505f8cc..c32c36d 100644
--- a/MK.IO/MKIOClient.cs
+++ b/MK.IO/MKIOClient.cs
@@ -35,7 +35,7 @@ internal Guid GetSubscriptionId()
{
if (default == _subscriptionId)
{
- _subscriptionId = Subscription.GetStats().Extra.SubscriptionId;
+ _subscriptionId = Account.GetSubscriptionStats().Extra.SubscriptionId;
}
return _subscriptionId;
}
@@ -45,7 +45,7 @@ internal Guid GetCustomerId()
{
if (default == _customerId)
{
- _customerId = Subscription.GetUserInfo().CustomerId;
+ _customerId = Account.GetUserProfile().CustomerId;
}
return _customerId;
}
@@ -65,7 +65,7 @@ public MKIOClient(string MKIOSubscriptionName, string MKIOtoken)
private void Initialize()
{
- Subscription = new SubscriptionOperations(this);
+ Account = new AccountOperations(this);
StorageAccounts = new StorageAccountsOperations(this);
Assets = new AssetsOperations(this);
LiveEvents = new LiveEventsOperations(this);
@@ -80,7 +80,7 @@ private void Initialize()
}
///
- public virtual ISubscriptionOperations Subscription { get; private set; }
+ public virtual IAccountOperations Account { get; private set; }
///
public virtual IStorageAccountsOperations StorageAccounts { get; private set; }
diff --git a/MK.IO/Script/notes.md b/MK.IO/Script/notes.md
index 40c2870..e8572fe 100644
--- a/MK.IO/Script/notes.md
+++ b/MK.IO/Script/notes.md
@@ -2,11 +2,8 @@ Classes generated from Swagger.
Namespace changed with ps1 script.
-In AssetStorageDataSpecSchema.cs, Folders and Files properties were changed to List<>.
-
In TransformOutput.cs, public OneOfTransformOutputPreset Preset { get; set; } changed to public EncoderPreset Preset { get; set; }
In JobProperties.cs, public OneOfJobPropertiesInput Input { get; set; } changed to public JobInput Input { get; set; }
In JobProperties.cs, public OneOfJobPropertiesInput Input { get; set; } changed to public JobInput Input { get; set; }
-In AccountFilterListResponseSchema and AssetFilterListResponseSchema, Value changed to Filters
-Deleted : OneOfTransformOutputPreset.cs, BuiltInStandardEncoderPreset.cs, JobInputAsset.cs, JobInputHttp.cs, ContentKeyPolicyOption
\ No newline at end of file
+Deleted : OneOfTransformOutputPreset.cs, BuiltInStandardEncoderPreset.cs, JobInputAsset.cs, JobInputHttp.cs, ContentKeyPolicyOption
diff --git a/MK.IO/Subscription/ISubscriptionOperations.cs b/MK.IO/Subscription/ISubscriptionOperations.cs
deleted file mode 100644
index c8930fe..0000000
--- a/MK.IO/Subscription/ISubscriptionOperations.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-namespace MK.IO
-{
- public interface ISubscriptionOperations
- {
- ///
- /// Get statistics for the subscription.
- ///
- ///
- AccountStats GetStats();
-
- ///
- /// Get statistics for the subscription.
- ///
- ///
- Task GetStatsAsync();
-
- ///
- /// Get user information.
- ///
- ///
- UserInfo GetUserInfo();
-
- ///
- /// Get user information.
- ///
- ///
- Task GetUserInfoAsync();
- }
-}
\ No newline at end of file
diff --git a/MK.IO/Subscription/SubscriptionOperations.cs b/MK.IO/Subscription/SubscriptionOperations.cs
deleted file mode 100644
index 32282f0..0000000
--- a/MK.IO/Subscription/SubscriptionOperations.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-namespace MK.IO
-{
- ///
- /// REST Client for MKIO
- /// https://io.mediakind.com
- ///
- ///
- internal class SubscriptionOperations : ISubscriptionOperations
- {
- //
- // subscription operations
- //
- private const string _accountProfileApiUrl = "api/profile";
- private const string _accountStatsApiUrl = "api/ams/{0}/stats";
-
- ///
- /// Gets a reference to the AzureMediaServicesClient
- ///
- private MKIOClient Client { get; set; }
-
- ///
- /// Initializes a new instance of the SubscriptionOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal SubscriptionOperations(MKIOClient client)
- {
- Client = client ?? throw new ArgumentNullException(nameof(client));
- }
-
- ///
- public AccountStats GetStats()
- {
- var task = Task.Run(async () => await GetStatsAsync());
- return task.GetAwaiter().GetResult();
- }
-
- ///
- public async Task GetStatsAsync()
- {
- var url = Client.GenerateApiUrl(_accountStatsApiUrl);
- string responseContent = await Client.GetObjectContentAsync(url);
- return AccountStats.FromJson(responseContent);
- }
-
- ///
- public UserInfo GetUserInfo()
- {
- var task = Task.Run(async () => await GetUserInfoAsync());
- return task.GetAwaiter().GetResult();
- }
-
- ///
- public async Task GetUserInfoAsync()
- {
- string responseContent = await Client.GetObjectContentAsync(Client._baseUrl + _accountProfileApiUrl);
- return AccountProfile.FromJson(responseContent).Spec;
- }
- }
-}
\ No newline at end of file
diff --git a/README.md b/README.md
index c572cf5..3cc43dd 100644
--- a/README.md
+++ b/README.md
@@ -50,10 +50,11 @@ using MK.IO.Models;
var client = new MKIOClient("mkiosubscriptionname", "mkiotoken");
-var profile = client.Subscription.GetUserInfo();
+// get user profile info
+var profile = client.Account.GetUserProfile();
// Get subscription stats
-var stats = client.Subscription.GetStats();
+var stats = client.Account.GetSubscriptionStats();
// *****************
// asset operations
diff --git a/Sample/Program.cs b/Sample/Program.cs
index fc72531..d029c41 100644
--- a/Sample/Program.cs
+++ b/Sample/Program.cs
@@ -47,7 +47,7 @@ static async Task MainAsync()
try
{
- var profile = client.Subscription.GetUserInfo();
+ var profile = client.Account.GetUserProfile();
}
catch (ApiException ex)
{
@@ -55,9 +55,43 @@ static async Task MainAsync()
Environment.Exit(0);
}
-
// Get subscription stats
- //var stats = client.Subscription.GetStats();
+ var stats = client.Account.GetSubscriptionStats();
+
+ var subs = await client.Account.ListAllSubscriptionsAsync();
+ var sub = await client.Account.GetSubscriptionAsync();
+ var locs = await client.Account.ListAllLocationsAsync();
+
+
+
+ // *****************
+ // asset operations
+ // *****************
+
+ // list assets
+ //var mkioAssets = client.Assets.List("name desc", 4);
+
+
+ var mkioAssetsResult = client.Assets.ListAsPage("name desc", 4);
+ do
+ {
+ mkioAssetsResult = client.Assets.ListAsPageNext(mkioAssetsResult.NextPageLink);
+ } while (mkioAssetsResult.NextPageLink != null);
+
+
+ var specc = client.Assets.ListTracksAndDirListing("copy-ef2058b692-copy");
+
+ // get streaming locators for asset
+ var locatorsAsset = client.Assets.ListStreamingLocators("uploaded-c9c6146a98-CustomPreset-AutoFit-57653ac7b8-autofit");
+
+ // get asset
+ var mkasset = client.Assets.Get("copy-152b839997");
+
+ // create asset
+ // var newasset = client.Assets.CreateOrUpdate("copy-ef2058b692-copy", "asset-2346d605-b4d6-4958-a80b-b4943b602ea8", "amsxpfrstorage", "description of asset copy");
+
+ // delete asset
+ // client.Assets.Delete("asset-33adc1873f");
// *********************
@@ -75,7 +109,6 @@ static async Task MainAsync()
});
-
// ***************
// job operations
// ***************
@@ -414,35 +447,7 @@ static async Task MainAsync()
- // *****************
- // asset operations
- // *****************
-
- // list assets
- //var mkioAssets = client.Assets.List("name desc", 4);
-
-
- var mkioAssetsResult = client.Assets.ListAsPage("name desc", 4);
- do
- {
- mkioAssetsResult = client.Assets.ListAsPageNext(mkioAssetsResult.NextPageLink);
- } while (mkioAssetsResult.NextPageLink != null);
-
-
- var specc = client.Assets.ListTracksAndDirListing("copy-ef2058b692-copy");
-
- // get streaming locators for asset
- var locatorsAsset = client.Assets.ListStreamingLocators("copy-1b510ee166-copy-d32391984a");
-
- // get asset
- var mkasset = client.Assets.Get("copy-152b839997");
-
- // create asset
- // var newasset = client.Assets.CreateOrUpdate("copy-ef2058b692-copy", "asset-2346d605-b4d6-4958-a80b-b4943b602ea8", "amsxpfrstorage", "description of asset copy");
-
- // delete asset
- // client.Assets.Delete("asset-33adc1873f");
-
+
// ******************************