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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


# Microsoft Azure SDK for .NET
## All PRs should be opened against master branch. This branch is being retired and will be deleted.

### Microsoft Azure SDK for .NET
----------
The Microsoft Azure SDK for .NET allows you to build applications
that take advantage of scalable cloud computing resources.
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public partial class FaceClient : ServiceClient<FaceClient>, IFaceClient
/// </summary>
public virtual ILargeFaceListOperations LargeFaceList { get; private set; }

/// <summary>
/// Gets the ISnapshotOperations.
/// </summary>
public virtual ISnapshotOperations Snapshot { get; private set; }

/// <summary>
/// Initializes a new instance of the FaceClient class.
/// </summary>
Expand Down Expand Up @@ -179,6 +184,7 @@ private void Initialize()
LargePersonGroupPerson = new LargePersonGroupPerson(this);
LargePersonGroup = new LargePersonGroupOperations(this);
LargeFaceList = new LargeFaceListOperations(this);
Snapshot = new SnapshotOperations(this);
BaseUri = "{Endpoint}/face/v1.0";
SerializationSettings = new JsonSerializerSettings
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ public FaceListOperations(FaceClient client)
}

/// <summary>
/// Delete an existing face from a face list (given by a persisitedFaceId and a
/// Delete an existing face from a face list (given by a persistedFaceId and a
/// faceListId). Persisted image related to the face will also be deleted.
/// </summary>
/// <param name='faceListId'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static partial class FaceListOperationsExtensions
}

/// <summary>
/// Delete an existing face from a face list (given by a persisitedFaceId and a
/// Delete an existing face from a face list (given by a persistedFaceId and a
/// faceListId). Persisted image related to the face will also be deleted.
/// </summary>
/// <param name='operations'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,10 @@ public partial interface IFaceClient : System.IDisposable
/// </summary>
ILargeFaceListOperations LargeFaceList { get; }

/// <summary>
/// Gets the ISnapshotOperations.
/// </summary>
ISnapshotOperations Snapshot { get; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public partial interface IFaceListOperations
Task<HttpOperationResponse<IList<FaceList>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Delete an existing face from a face list (given by a
/// persisitedFaceId and a faceListId). Persisted image related to the
/// persistedFaceId and a faceListId). Persisted image related to the
/// face will also be deleted.
/// </summary>
/// <param name='faceListId'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public partial interface ILargeFaceListOperations
Task<HttpOperationResponse> TrainWithHttpMessagesAsync(string largeFaceListId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Delete an existing face from a large face list (given by a
/// persisitedFaceId and a largeFaceListId). Persisted image related to
/// persistedFaceId and a largeFaceListId). Persisted image related to
/// the face will also be deleted.
/// </summary>
/// <param name='largeFaceListId'>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ public LargeFaceListOperations(FaceClient client)
}

/// <summary>
/// Delete an existing face from a large face list (given by a persisitedFaceId
/// Delete an existing face from a large face list (given by a persistedFaceId
/// and a largeFaceListId). Persisted image related to the face will also be
/// deleted.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static partial class LargeFaceListOperationsExtensions
}

/// <summary>
/// Delete an existing face from a large face list (given by a persisitedFaceId
/// Delete an existing face from a large face list (given by a persistedFaceId
/// and a largeFaceListId). Persisted image related to the face will also be
/// deleted.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// <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.CognitiveServices.Vision.Face.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Request body for applying snapshot operation.
/// </summary>
public partial class ApplySnapshotRequest
{
/// <summary>
/// Initializes a new instance of the ApplySnapshotRequest class.
/// </summary>
public ApplySnapshotRequest()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ApplySnapshotRequest class.
/// </summary>
/// <param name="objectId">User specified target object id to be
/// created from the snapshot.</param>
/// <param name="mode">Snapshot applying mode. Currently only CreateNew
/// is supported, which means the apply operation will fail if target
/// subscription already contains an object of same type and using the
/// same objectId. Users can specify the "objectId" in request body to
/// avoid such conflicts. Possible values include: 'CreateNew'</param>
public ApplySnapshotRequest(string objectId, SnapshotApplyMode mode = default(SnapshotApplyMode))
{
ObjectId = objectId;
Mode = mode;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets user specified target object id to be created from the
/// snapshot.
/// </summary>
[JsonProperty(PropertyName = "objectId")]
public string ObjectId { get; set; }

/// <summary>
/// Gets or sets snapshot applying mode. Currently only CreateNew is
/// supported, which means the apply operation will fail if target
/// subscription already contains an object of same type and using the
/// same objectId. Users can specify the "objectId" in request body to
/// avoid such conflicts. Possible values include: 'CreateNew'
/// </summary>
[JsonProperty(PropertyName = "mode")]
public SnapshotApplyMode Mode { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (ObjectId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ObjectId");
}
if (ObjectId != null)
{
if (ObjectId.Length > 64)
{
throw new ValidationException(ValidationRules.MaxLength, "ObjectId", 64);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(ObjectId, "^[a-z0-9-_]+$"))
{
throw new ValidationException(ValidationRules.Pattern, "ObjectId", "^[a-z0-9-_]+$");
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
// <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.CognitiveServices.Vision.Face.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Operation status object. Operation refers to the asynchronous backend
/// task including taking a snapshot and applying a snapshot.
/// </summary>
public partial class OperationStatus
{
/// <summary>
/// Initializes a new instance of the OperationStatus class.
/// </summary>
public OperationStatus()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the OperationStatus class.
/// </summary>
/// <param name="status">Operation status: notstarted, running,
/// succeeded, failed. If the operation is requested and waiting to
/// perform, the status is notstarted. If the operation is ongoing in
/// backend, the status is running. Status succeeded means the
/// operation is completed successfully, specifically for snapshot
/// taking operation, it illustrates the snapshot is well taken and
/// ready to apply, and for snapshot applying operation, it presents
/// the target object has finished creating by the snapshot and ready
/// to be used. Status failed is often caused by editing the source
/// object while taking the snapshot or editing the target object while
/// applying the snapshot before completion, see the field "message" to
/// check the failure reason. Possible values include: 'notstarted',
/// 'running', 'succeeded', 'failed'</param>
/// <param name="createdTime">A combined UTC date and time string that
/// describes the time when the operation (take or apply a snapshot) is
/// requested. E.g. 2018-12-25T11:41:02.2331413Z.</param>
/// <param name="lastActionTime">A combined UTC date and time string
/// that describes the last time the operation (take or apply a
/// snapshot) is actively migrating data. The lastActionTime will keep
/// increasing until the operation finishes. E.g.
/// 2018-12-25T11:51:27.8705696Z.</param>
/// <param name="resourceLocation">When the operation succeeds
/// successfully, for snapshot taking operation the snapshot id will be
/// included in this field, and for snapshot applying operation, the
/// path to get the target object will be returned in this
/// field.</param>
/// <param name="message">Show failure message when operation fails
/// (omitted when operation succeeds).</param>
public OperationStatus(OperationStatusType status, System.DateTime createdTime, System.DateTime? lastActionTime = default(System.DateTime?), string resourceLocation = default(string), string message = default(string))
{
Status = status;
CreatedTime = createdTime;
LastActionTime = lastActionTime;
ResourceLocation = resourceLocation;
Message = message;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets operation status: notstarted, running, succeeded,
/// failed. If the operation is requested and waiting to perform, the
/// status is notstarted. If the operation is ongoing in backend, the
/// status is running. Status succeeded means the operation is
/// completed successfully, specifically for snapshot taking operation,
/// it illustrates the snapshot is well taken and ready to apply, and
/// for snapshot applying operation, it presents the target object has
/// finished creating by the snapshot and ready to be used. Status
/// failed is often caused by editing the source object while taking
/// the snapshot or editing the target object while applying the
/// snapshot before completion, see the field "message" to check the
/// failure reason. Possible values include: 'notstarted', 'running',
/// 'succeeded', 'failed'
/// </summary>
[JsonProperty(PropertyName = "status")]
public OperationStatusType Status { get; set; }

/// <summary>
/// Gets or sets a combined UTC date and time string that describes the
/// time when the operation (take or apply a snapshot) is requested.
/// E.g. 2018-12-25T11:41:02.2331413Z.
/// </summary>
[JsonProperty(PropertyName = "createdTime")]
public System.DateTime CreatedTime { get; set; }

/// <summary>
/// Gets or sets a combined UTC date and time string that describes the
/// last time the operation (take or apply a snapshot) is actively
/// migrating data. The lastActionTime will keep increasing until the
/// operation finishes. E.g. 2018-12-25T11:51:27.8705696Z.
/// </summary>
[JsonProperty(PropertyName = "lastActionTime")]
public System.DateTime? LastActionTime { get; set; }

/// <summary>
/// Gets or sets when the operation succeeds successfully, for snapshot
/// taking operation the snapshot id will be included in this field,
/// and for snapshot applying operation, the path to get the target
/// object will be returned in this field.
/// </summary>
[JsonProperty(PropertyName = "resourceLocation")]
public string ResourceLocation { get; set; }

/// <summary>
/// Gets or sets show failure message when operation fails (omitted
/// when operation succeeds).
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
}
}
}
Loading