Skip to content
Merged
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 @@ -1141,7 +1141,7 @@ internal AssetsOperations(AzureMediaServicesClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<AssetContainerSas>> ListContainerSasWithHttpMessagesAsync(string resourceGroupName, string accountName, string assetName, string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<AssetContainerSas>> ListContainerSasWithHttpMessagesAsync(string resourceGroupName, string accountName, string assetName, AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public static Asset Update(this IAssetsOperations operations, string resourceGro
/// The SAS URL expiration time. This must be less than 24 hours from the
/// current time.
/// </param>
public static AssetContainerSas ListContainerSas(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?))
public static AssetContainerSas ListContainerSas(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?))
{
return operations.ListContainerSasAsync(resourceGroupName, accountName, assetName, permissions, expiryTime).GetAwaiter().GetResult();
}
Expand Down Expand Up @@ -357,7 +357,7 @@ public static Asset Update(this IAssetsOperations operations, string resourceGro
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<AssetContainerSas> ListContainerSasAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?), CancellationToken cancellationToken = default(CancellationToken))
public static async Task<AssetContainerSas> ListContainerSasAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListContainerSasWithHttpMessagesAsync(resourceGroupName, accountName, assetName, permissions, expiryTime, null, cancellationToken).ConfigureAwait(false))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public partial interface IAssetsOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<AssetContainerSas>> ListContainerSasWithHttpMessagesAsync(string resourceGroupName, string accountName, string assetName, string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<AssetContainerSas>> ListContainerSasWithHttpMessagesAsync(string resourceGroupName, string accountName, string assetName, AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets the Asset storage key
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions src/SDKs/Media/Management.Media/Generated/Models/AacAudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public AacAudio()
/// <param name="profile">The encoding profile to be used when encoding
/// audio with AAC. Possible values include: 'AacLc', 'HeAacV1',
/// 'HeAacV2'</param>
public AacAudio(string label = default(string), int? channels = default(int?), int? samplingRate = default(int?), int? bitrate = default(int?), string profile = default(string))
public AacAudio(string label = default(string), int? channels = default(int?), int? samplingRate = default(int?), int? bitrate = default(int?), AacAudioProfile? profile = default(AacAudioProfile?))
: base(label, channels, samplingRate, bitrate)
{
Profile = profile;
Expand All @@ -57,7 +57,7 @@ public AacAudio()
/// with AAC. Possible values include: 'AacLc', 'HeAacV1', 'HeAacV2'
/// </summary>
[JsonProperty(PropertyName = "profile")]
public string Profile { get; set; }
public AacAudioProfile? Profile { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,110 @@

namespace Microsoft.Azure.Management.Media.Models
{
using Newtonsoft.Json;

/// <summary>
/// Defines values for AacAudioProfile.
/// </summary>
public static class AacAudioProfile
/// <summary>
/// Determine base value for a given allowed value if exists, else return
/// the value itself
/// </summary>
[JsonConverter(typeof(AacAudioProfileConverter))]
public struct AacAudioProfile : System.IEquatable<AacAudioProfile>
{
private AacAudioProfile(string underlyingValue)
{
UnderlyingValue=underlyingValue;
}

/// <summary>
/// Specifies that the output audio is to be encoded into AAC Low
/// Complexity profile (AAC-LC).
/// </summary>
public const string AacLc = "AacLc";
public static readonly AacAudioProfile AacLc = "AacLc";

/// <summary>
/// Specifies that the output audio is to be encoded into HE-AAC v1
/// profile.
/// </summary>
public const string HeAacV1 = "HeAacV1";
public static readonly AacAudioProfile HeAacV1 = "HeAacV1";

/// <summary>
/// Specifies that the output audio is to be encoded into HE-AAC v2
/// profile.
/// </summary>
public const string HeAacV2 = "HeAacV2";
public static readonly AacAudioProfile HeAacV2 = "HeAacV2";


/// <summary>
/// Underlying value of enum AacAudioProfile
/// </summary>
private readonly string UnderlyingValue;

/// <summary>
/// Returns string representation for AacAudioProfile
/// </summary>
public override string ToString()
{
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
/// Compares enums of type AacAudioProfile
/// </summary>
public bool Equals(AacAudioProfile e)
{
return UnderlyingValue.Equals(e.UnderlyingValue);
}

/// <summary>
/// Implicit operator to convert string to AacAudioProfile
/// </summary>
public static implicit operator AacAudioProfile(string value)
{
return new AacAudioProfile(value);
}

/// <summary>
/// Implicit operator to convert AacAudioProfile to string
/// </summary>
public static implicit operator string(AacAudioProfile e)
{
return e.UnderlyingValue;
}

/// <summary>
/// Overriding == operator for enum AacAudioProfile
/// </summary>
public static bool operator == (AacAudioProfile e1, AacAudioProfile e2)
{
return e2.Equals(e1);
}

/// <summary>
/// Overriding != operator for enum AacAudioProfile
/// </summary>
public static bool operator != (AacAudioProfile e1, AacAudioProfile e2)
{
return !e2.Equals(e1);
}

/// <summary>
/// Overrides Equals operator for AacAudioProfile
/// </summary>
public override bool Equals(object obj)
{
return obj is AacAudioProfile && Equals((AacAudioProfile)obj);
}

/// <summary>
/// Returns for hashCode AacAudioProfile
/// </summary>
public override int GetHashCode()
{
return UnderlyingValue.GetHashCode();
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Media.Models
{
using Newtonsoft.Json;

using System.Reflection;

/// <summary>
/// Defines values for AacAudioProfile.
/// </summary>
public sealed class AacAudioProfileConverter : JsonConverter
{

/// <summary>
/// Returns if objectType can be converted to AacAudioProfile by the
/// converter.
/// </summary>
public override bool CanConvert(System.Type objectType)
{
return typeof(AacAudioProfile).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
}

/// <summary>
/// Overrides ReadJson and converts token to AacAudioProfile.
/// </summary>
public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
{
if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
{
return null;
}
return (AacAudioProfile)serializer.Deserialize<string>(reader);
}

/// <summary>
/// Overriding WriteJson for AacAudioProfile for serialization.
/// </summary>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteValue(value.ToString());
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,96 @@

namespace Microsoft.Azure.Management.Media.Models
{
using Newtonsoft.Json;

/// <summary>
/// Defines values for AnalysisResolution.
/// </summary>
public static class AnalysisResolution
/// <summary>
/// Determine base value for a given allowed value if exists, else return
/// the value itself
/// </summary>
[JsonConverter(typeof(AnalysisResolutionConverter))]
public struct AnalysisResolution : System.IEquatable<AnalysisResolution>
{
public const string SourceResolution = "SourceResolution";
public const string StandardDefinition = "StandardDefinition";
private AnalysisResolution(string underlyingValue)
{
UnderlyingValue=underlyingValue;
}

public static readonly AnalysisResolution SourceResolution = "SourceResolution";

public static readonly AnalysisResolution StandardDefinition = "StandardDefinition";


/// <summary>
/// Underlying value of enum AnalysisResolution
/// </summary>
private readonly string UnderlyingValue;

/// <summary>
/// Returns string representation for AnalysisResolution
/// </summary>
public override string ToString()
{
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
/// Compares enums of type AnalysisResolution
/// </summary>
public bool Equals(AnalysisResolution e)
{
return UnderlyingValue.Equals(e.UnderlyingValue);
}

/// <summary>
/// Implicit operator to convert string to AnalysisResolution
/// </summary>
public static implicit operator AnalysisResolution(string value)
{
return new AnalysisResolution(value);
}

/// <summary>
/// Implicit operator to convert AnalysisResolution to string
/// </summary>
public static implicit operator string(AnalysisResolution e)
{
return e.UnderlyingValue;
}

/// <summary>
/// Overriding == operator for enum AnalysisResolution
/// </summary>
public static bool operator == (AnalysisResolution e1, AnalysisResolution e2)
{
return e2.Equals(e1);
}

/// <summary>
/// Overriding != operator for enum AnalysisResolution
/// </summary>
public static bool operator != (AnalysisResolution e1, AnalysisResolution e2)
{
return !e2.Equals(e1);
}

/// <summary>
/// Overrides Equals operator for AnalysisResolution
/// </summary>
public override bool Equals(object obj)
{
return obj is AnalysisResolution && Equals((AnalysisResolution)obj);
}

/// <summary>
/// Returns for hashCode AnalysisResolution
/// </summary>
public override int GetHashCode()
{
return UnderlyingValue.GetHashCode();
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Media.Models
{
using Newtonsoft.Json;

using System.Reflection;

/// <summary>
/// Defines values for AnalysisResolution.
/// </summary>
public sealed class AnalysisResolutionConverter : JsonConverter
{

/// <summary>
/// Returns if objectType can be converted to AnalysisResolution by the
/// converter.
/// </summary>
public override bool CanConvert(System.Type objectType)
{
return typeof(AnalysisResolution).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
}

/// <summary>
/// Overrides ReadJson and converts token to AnalysisResolution.
/// </summary>
public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
{
if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
{
return null;
}
return (AnalysisResolution)serializer.Deserialize<string>(reader);
}

/// <summary>
/// Overriding WriteJson for AnalysisResolution for serialization.
/// </summary>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteValue(value.ToString());
}

}
}
4 changes: 2 additions & 2 deletions src/SDKs/Media/Management.Media/Generated/Models/Asset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public Asset()
/// <param name="storageEncryptionFormat">The Asset encryption format.
/// One of None or MediaStorageEncryption. Possible values include:
/// 'None', 'MediaStorageClientEncryption'</param>
public Asset(string id = default(string), string name = default(string), string type = default(string), System.Guid assetId = default(System.Guid), System.DateTime created = default(System.DateTime), System.DateTime lastModified = default(System.DateTime), string alternateId = default(string), string description = default(string), string container = default(string), string storageAccountName = default(string), string storageEncryptionFormat = default(string))
public Asset(string id = default(string), string name = default(string), string type = default(string), System.Guid assetId = default(System.Guid), System.DateTime created = default(System.DateTime), System.DateTime lastModified = default(System.DateTime), string alternateId = default(string), string description = default(string), string container = default(string), string storageAccountName = default(string), AssetStorageEncryptionFormat storageEncryptionFormat = default(AssetStorageEncryptionFormat))
: base(id, name, type)
{
AssetId = assetId;
Expand Down Expand Up @@ -116,7 +116,7 @@ public Asset()
/// 'MediaStorageClientEncryption'
/// </summary>
[JsonProperty(PropertyName = "properties.storageEncryptionFormat")]
public string StorageEncryptionFormat { get; private set; }
public AssetStorageEncryptionFormat StorageEncryptionFormat { get; private set; }

}
}
Loading