Skip to content
Merged
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
namespace Azure.MixedReality.ObjectAnchors.Conversion
{
public static partial class AOAFrontEndAPIsModelFactory
{
public static Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionProperties AssetConversionProperties(string clientErrorDetails = null, string serverErrorDetails = null, Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode errorCode = default(Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode), System.Guid? jobIdInternal = default(System.Guid?), string outputModelUriString = null, Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionStatus? conversionStatus = default(Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionStatus?), string assetFileTypeString = null, string inputAssetUriString = null, System.Guid? accountIdInternal = default(System.Guid?), Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionConfiguration conversionConfiguration = null) { throw null; }
public static Azure.MixedReality.ObjectAnchors.Conversion.AssetUploadUriResult AssetUploadUriResult(string uploadUriString = null) { throw null; }
}
public partial class AssetConversionConfiguration
{
internal AssetConversionConfiguration() { }
Expand Down Expand Up @@ -50,7 +45,7 @@ internal AssetConversionProperties() { }
public string ClientErrorDetails { get { throw null; } }
public Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionConfiguration ConversionConfiguration { get { throw null; } }
public Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionStatus? ConversionStatus { get { throw null; } }
public Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode ErrorCode { get { throw null; } }
public Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode ErrorCode { get { throw null; } }
public Azure.MixedReality.ObjectAnchors.Conversion.AssetFileType InputAssetFileType { get { throw null; } }
public System.Uri InputAssetUri { get { throw null; } }
public System.Guid JobId { get { throw null; } set { } }
Expand Down Expand Up @@ -102,6 +97,36 @@ public partial class AssetUploadUriResult
internal AssetUploadUriResult() { }
public System.Uri UploadUri { get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ConversionErrorCode : System.IEquatable<Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode>
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public ConversionErrorCode(string value) { throw null; }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode AssetCannotBeConverted { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode AssetDimensionsOutOfBounds { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode AssetSizeTooLarge { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode InvalidAssetUri { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode InvalidFaceVertices { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode InvalidGravity { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode InvalidJobId { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode InvalidScale { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode NoError { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode ServiceError { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode TooManyRigPoses { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode Unknown { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode ZeroFaces { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode ZeroTrajectoriesGenerated { get { throw null; } }
public bool Equals(Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool Equals(object obj) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override int GetHashCode() { throw null; }
public static bool operator ==(Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode left, Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode right) { throw null; }
public static implicit operator Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode (string value) { throw null; }
public static bool operator !=(Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode left, Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode right) { throw null; }
public override string ToString() { throw null; }
}
public partial class ObjectAnchorsConversionClient
{
protected ObjectAnchorsConversionClient() { }
Expand All @@ -111,6 +136,7 @@ public ObjectAnchorsConversionClient(System.Guid accountId, string accountDomain
public ObjectAnchorsConversionClient(System.Guid accountId, string accountDomain, Azure.Core.TokenCredential credential, Azure.MixedReality.ObjectAnchors.Conversion.ObjectAnchorsConversionClientOptions options = null) { }
public string AccountDomain { get { throw null; } }
public System.Guid AccountId { get { throw null; } }
public System.Collections.Generic.IEnumerable<Azure.MixedReality.ObjectAnchors.Conversion.AssetFileType> SupportedAssetFileTypes { get { throw null; } }
public virtual Azure.Response<Azure.MixedReality.ObjectAnchors.Conversion.AssetUploadUriResult> GetAssetUploadUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.MixedReality.ObjectAnchors.Conversion.AssetUploadUriResult>> GetAssetUploadUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionOperation StartAssetConversion(Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand All @@ -130,7 +156,7 @@ public enum ServiceVersion
public static partial class ObjectAnchorsConversionModelFactory
{
public static Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionConfiguration AssetConversionConfiguration(System.Numerics.Vector3 assetDimensions, System.Numerics.Vector3 boundingBoxCenter, System.Numerics.Vector3 gravity, System.Collections.Generic.IReadOnlyList<int> keyFrameIndexes, System.Collections.Generic.IReadOnlyList<Azure.MixedReality.ObjectAnchors.Conversion.TrajectoryPose> groundTruthTrajectoryCameraPoses, System.Numerics.Quaternion principalAxis, float scale, System.Numerics.Vector4 supportingPlane, System.Collections.Generic.IReadOnlyList<Azure.MixedReality.ObjectAnchors.Conversion.TrajectoryPose> testTrajectoryCameraPoses) { throw null; }
public static Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionProperties AssetConversionProperties(string clientErrorDetails, string serverErrorDetails, Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode conversionErrorCode, System.Guid? jobId, System.Uri outputModelUri, Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionStatus? assetConversionStatus, Azure.MixedReality.ObjectAnchors.Conversion.AssetFileType assetFileType, System.Uri uploadedInputAssetUri, System.Guid? accountId, Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionConfiguration assetConversionConfiguration) { throw null; }
public static Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionProperties AssetConversionProperties(string clientErrorDetails, string serverErrorDetails, Azure.MixedReality.ObjectAnchors.Conversion.ConversionErrorCode conversionErrorCode, System.Guid? jobId, System.Uri outputModelUri, Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionStatus? assetConversionStatus, Azure.MixedReality.ObjectAnchors.Conversion.AssetFileType assetFileType, System.Uri uploadedInputAssetUri, System.Guid? accountId, Azure.MixedReality.ObjectAnchors.Conversion.AssetConversionConfiguration assetConversionConfiguration) { throw null; }
public static Azure.MixedReality.ObjectAnchors.Conversion.AssetUploadUriResult GetAssetUploadUriResult(System.Uri uploadedInputAssetUri) { throw null; }
public static Azure.MixedReality.ObjectAnchors.Conversion.TrajectoryPose TrajectoryPose(System.Numerics.Quaternion rotation, System.Numerics.Vector3 translation) { throw null; }
}
Expand All @@ -147,37 +173,13 @@ public static partial class ObjectAnchorsConversionModelFactory
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override int GetHashCode() { throw null; }
}
}
namespace Azure.MixedReality.ObjectAnchors.Conversion.Models
{
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ConversionErrorCode : System.IEquatable<Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode>
public partial class UnsupportedAssetFileTypeException : System.Exception, System.Runtime.Serialization.ISerializable
Comment thread
jastenze marked this conversation as resolved.
Outdated
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public ConversionErrorCode(string value) { throw null; }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode AssetCannotBeConverted { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode AssetDimensionsOutOfBounds { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode AssetSizeTooLarge { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode InvalidAssetUri { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode InvalidFaceVertices { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode InvalidGravity { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode InvalidJobId { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode InvalidScale { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode NoError { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode ServiceError { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode TooManyRigPoses { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode Unknown { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode ZeroFaces { get { throw null; } }
public static Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode ZeroTrajectoriesGenerated { get { throw null; } }
public bool Equals(Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool Equals(object obj) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override int GetHashCode() { throw null; }
public static bool operator ==(Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode left, Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode right) { throw null; }
public static implicit operator Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode (string value) { throw null; }
public static bool operator !=(Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode left, Azure.MixedReality.ObjectAnchors.Conversion.Models.ConversionErrorCode right) { throw null; }
public override string ToString() { throw null; }
public UnsupportedAssetFileTypeException() { }
protected UnsupportedAssetFileTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public UnsupportedAssetFileTypeException(string message) { }
public UnsupportedAssetFileTypeException(string message, System.Exception inner) { }
public Azure.MixedReality.ObjectAnchors.Conversion.AssetFileType AttemptedFileType { get { throw null; } }
public System.Collections.Generic.IEnumerable<Azure.MixedReality.ObjectAnchors.Conversion.AssetFileType> SupportedAssetFileTypes { get { throw null; } }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
Comment thread
JoshLove-msft marked this conversation as resolved.
Outdated

namespace Azure.MixedReality.ObjectAnchors.Conversion
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using Azure.MixedReality.ObjectAnchors.Conversion.Models;

namespace Azure.MixedReality.ObjectAnchors.Conversion
{
/// <summary> Model factory for read-only models. </summary>
internal static partial class AOAFrontEndAPIsModelFactory
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;

namespace Azure.MixedReality.ObjectAnchors.Conversion
{
/// <summary> The ConversionErrorCode. </summary>
[CodeGenModel("ConversionErrorCode")]
public readonly partial struct ConversionErrorCode
{
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
using Azure.Core.Pipeline;
using Azure.MixedReality.Authentication;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;

namespace Azure.MixedReality.ObjectAnchors.Conversion
{
Expand All @@ -20,6 +22,11 @@ public class ObjectAnchorsConversionClient
/// </summary>
public Guid AccountId { get; }

/// <summary>
/// The list of supported asset file types
/// </summary>
public IEnumerable<AssetFileType> SupportedAssetFileTypes { get; }
Comment thread
JoshLove-msft marked this conversation as resolved.
Outdated

/// <summary>
/// The Account Domain to be used by the Client
/// </summary>
Expand Down Expand Up @@ -81,6 +88,7 @@ public ObjectAnchorsConversionClient(Guid accountId, string accountDomain, Token
Uri serviceEndpoint = options.ServiceEndpoint ?? ConstructObjectAnchorsEndpointUrl(accountDomain);

AccountId = accountId;
SupportedAssetFileTypes = options.SupportedAssetFileTypes;
_clientDiagnostics = new ClientDiagnostics(options);
_pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(mrTokenCredential, GetDefaultScope(serviceEndpoint)));
_getBlobUploadEndpointRestClient = new BlobUploadEndpointRestClient(_clientDiagnostics, _pipeline, serviceEndpoint, options.Version);
Expand Down Expand Up @@ -109,6 +117,11 @@ public virtual AssetConversionOperation StartAssetConversion(AssetConversionOpti
scope.Start();
try
{
if (!SupportedAssetFileTypes.Contains(options.InputAssetFileType))
Comment thread
JoshLove-msft marked this conversation as resolved.
{
throw new UnsupportedAssetFileTypeException(options.InputAssetFileType, SupportedAssetFileTypes);
}

AssetConversionProperties properties = new AssetConversionProperties
{
InputAssetFileType = options.InputAssetFileType,
Expand Down Expand Up @@ -138,6 +151,11 @@ public virtual async Task<AssetConversionOperation> StartAssetConversionAsync(As
scope.Start();
try
{
if (!SupportedAssetFileTypes.Contains(options.InputAssetFileType))
{
throw new UnsupportedAssetFileTypeException(options.InputAssetFileType, SupportedAssetFileTypes);
}

AssetConversionProperties properties = new AssetConversionProperties
{
InputAssetFileType = options.InputAssetFileType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Licensed under the MIT License.

using System;
using System.Collections;
using System.Collections.Generic;
using Azure.Core;
using Azure.MixedReality.Authentication;

Expand All @@ -16,6 +18,11 @@ public class ObjectAnchorsConversionClientOptions : ClientOptions
{
internal string Version { get; }

/// <summary>
/// Gets the list of supported asset file types
/// </summary>
internal IEnumerable<AssetFileType> SupportedAssetFileTypes { get; }
Comment thread
JoshLove-msft marked this conversation as resolved.
Outdated

/// <summary>
/// Gets the authentication endpoint.
/// </summary>
Expand All @@ -42,6 +49,19 @@ public ObjectAnchorsConversionClientOptions(ServiceVersion version = ServiceVers
ServiceVersion.V0_2_preview_0 => "0.2-preview.0",
_ => throw new ArgumentException($"The service version {version} is not supported by this library.", nameof(version))
};

SupportedAssetFileTypes = version switch
{
ServiceVersion.V0_2_preview_0 => new AssetFileType[]
{
AssetFileType.Fbx,
AssetFileType.Glb,
AssetFileType.Gltf,
AssetFileType.Obj,
AssetFileType.Ply
},
_ => throw new InvalidOperationException()
};
}

/// <summary>
Expand Down
Loading