Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/api v152 #264

Merged
merged 11 commits into from
Jan 14, 2025
7 changes: 7 additions & 0 deletions Meraki.Api/Data/ConfigTemplateSwitchProfilePort.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,11 @@ public class ConfigTemplateSwitchProfilePort : NamedItem
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "module")]
public SwitchPortModule? Module { get; set; }

/// <summary>
/// Stackwise Virtual settings for the port
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "stackwiseVirtual")]
public SwitchPortStackwiseVirtual? StackwiseVirtual { get; set; }
}
99 changes: 99 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateDevice.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Device
/// </summary>
[DataContract]
public class FloorPlansAutoLocateDevice
{
/// <summary>
/// MAC Address
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "mac")]
public string? Mac { get; set; }

/// <summary>
/// Model
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "model")]
public string Model { get; set; } = string.Empty;

/// <summary>
/// Device Name
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "name")]
public string Name { get; set; } = string.Empty;

/// <summary>
/// Device Serial Number
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "serial")]
public string Serial { get; set; } = string.Empty;

/// <summary>
/// Device Status
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "status")]
public string Status { get; set; } = string.Empty;

/// <summary>
/// The type of auto locate position. Possible values: 'user', 'gnss', and 'calculated'
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "type")]
public string Type { get; set; } = string.Empty;

/// <summary>
/// Whether or not this auto locate position is an anchor
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "isAnchor")]
public bool InAnchor { get; set; }

/// <summary>
/// Latitude
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "lat")]
public string Lat { get; set; } = string.Empty;

/// <summary>
/// Longitude
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "lng")]
public string Lng { get; set; } = string.Empty;

/// <summary>
/// Tags
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "tags")]
public List<string> Tags { get; set; } = [];

/// <summary>
/// The auto locate position for this device
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "autoLocate")]
public GeoLocation AutoLocate { get; set; } = new();

/// <summary>
/// The assigned floor plan for this device
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "floorPlan")]
public FloorPlansAutoLocateDeviceFloorPlan FloorPlan { get; set; } = new();

/// <summary>
/// Network info
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "network")]
public FloorPlansAutoLocateDeviceNetwork Network { get; set; } = new();
}
30 changes: 30 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateDeviceFloorPlan.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Device Floor Plan
/// </summary>
[DataContract]
public class FloorPlansAutoLocateDeviceFloorPlan
{
/// <summary>
/// Floor plan ID
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "id")]
public string Id { get; set; } = string.Empty;

/// <summary>
/// Floor plan name - This property name is in line with the documentation despite not looking correct
/// This property has also been added as 'name' to avoid expected deserialisation errors in the future.
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "status")]
public string Status { get; set; } = string.Empty;

/// <summary>
/// Floor plan name
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "name")]
public string Name { get; set; } = string.Empty;
}
15 changes: 15 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateDeviceNetwork.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Device Network
/// </summary>
[DataContract]
public class FloorPlansAutoLocateDeviceNetwork
{
/// <summary>
/// ID for the network containing this device
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "id")]
public string Id { get; set; } = string.Empty;
}
14 changes: 14 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateJobsRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Jobs Request
/// </summary>
[DataContract]
public class FloorPlansAutoLocateJobsRequest
{
/// <summary>
/// The list of auto locate jobs to be scheduled. Up to 100 jobs can be provided in a request.
/// </summary>
[DataMember(Name = "jobs")]
public List<FloorPlansAutoLocateJobsRequestJob> Jobs { get; set; } = new();
}
28 changes: 28 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateJobsRequestJob.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Jobs Request Job
/// </summary>
[DataContract]
public class FloorPlansAutoLocateJobsRequestJob
{
/// <summary>
/// The ID of the floor plan to run auto locate for
/// </summary>
[DataMember(Name = "floorPlanId")]
public string FloorPlanId { get; set; } = string.Empty;

/// <summary>
/// Timestamp in ISO8601 format which indicates when the auto locate job should be run. If omitted, the auto locate job will start immediately.
/// </summary>
[DataMember(Name = "scheduledAt")]
public DateTime ScheduledAt { get; set; }

/// <summary>
/// The types of location data that should be refreshed for this job.
/// The list must either contain both 'gnss' and 'ranging' or be empty,
/// as we currently only support refreshing both 'gnss' and 'ranging', or neither.
/// </summary>
[DataMember(Name = "refresh")]
public List<string> Refresh { get; set; } = [];
}
15 changes: 15 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateJobsResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Jobs Response
/// </summary>
[DataContract]
public class FloorPlansAutoLocateJobsResponse
{
/// <summary>
/// The newly created jobs
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "jobs")]
public List<FloorPlansAutoLocateJobsResponseJob> Jobs { get; set; } = new();
}
71 changes: 71 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateJobsResponseJob.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Jobs Response Job
/// </summary>
[DataContract]
public class FloorPlansAutoLocateJobsResponseJob
{
/// <summary>
/// The ID of the floor plan to run auto locate for
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "floorPlanId")]
public string FloorPlanId { get; set; } = string.Empty;

/// <summary>
/// Auto locate job ID
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "id")]
public string Id { get; set; } = string.Empty;

/// <summary>
/// Network ID
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "networkId")]
public string NetworkId { get; set; } = string.Empty;

/// <summary>
/// Scheduled start time for auto locate job
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "scheduledAt")]
public DateTime ScheduledAt { get; set; }

/// <summary>
/// Auto locate job status. Possible values: 'scheduled', 'in progress', 'canceling', 'error', 'finished', 'published', 'canceled'
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "status")]
public string Status { get; set; } = string.Empty;

/// <summary>
/// Auto locate job progress information
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "completed")]
public FloorPlansAutoLocateJobsResponseJobCompleted Completed { get; set; } = new();

/// <summary>
/// GNSS (e.g. GPS) status and progress information
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "gnss")]
public FloorPlansAutoLocateJobsResponseJobGnss Gnss { get; set; } = new();

/// <summary>
/// Ranging status and progress information
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "ranging")]
public FloorPlansAutoLocateJobsResponseJobRanging Ranging { get; set; } = new();

/// <summary>
/// List of errors that occurred during a failed run of auto locate
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "errors")]
public List<FloorPlansAutoLocateJobsResponseJobError> Errors { get; set; } = [];
}
16 changes: 16 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateJobsResponseJobCompleted.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Jobs Response Job Completed
/// </summary>
[DataContract]
public class FloorPlansAutoLocateJobsResponseJobCompleted
{
/// <summary>
/// Approximate auto locate job completion percentage
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "percentage")]
public int Percentage { get; set; }

}

Check warning on line 16 in Meraki.Api/Data/FloorPlanAutoLocateJobsResponseJobCompleted.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Consecutive braces must not have blank line between them (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide2002)
22 changes: 22 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateJobsResponseJobError.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Jobs Response Job Error
/// </summary>
[DataContract]
public class FloorPlansAutoLocateJobsResponseJobError
{
/// <summary>
/// The step of the auto locate process when the error occurred. Possible values: 'gnss', 'ranging', 'positioning'
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "source")]
public string Source { get; set; } = string.Empty;

/// <summary>
/// The type of error that occurred. Possible values: 'failure', 'no neighbors', 'missing anchors', 'wrong anchors', 'calculation failure', 'scheduling failure'
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "type")]
public string Type { get; set; } = string.Empty;
}
22 changes: 22 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateJobsResponseJobGnss.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Jobs Response Job Gnss
/// </summary>
[DataContract]
public class FloorPlansAutoLocateJobsResponseJobGnss
{
/// <summary>
/// GNSS status. Possible values: 'scheduled', 'in progress', 'error', 'finished', 'not applicable', 'canceled'
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "status")]
public string Status { get; set; } = string.Empty;

/// <summary>
/// Progress information for the GNSS acquisition process
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "completed")]
public FloorPlansAutoLocateJobsResponseJobCompleted Completed { get; set; } = new();
}
22 changes: 22 additions & 0 deletions Meraki.Api/Data/FloorPlanAutoLocateJobsResponseJobRanging.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Meraki.Api.Data;

/// <summary>
/// Floor Plan Auto Locate Jobs Response Job Ranging
/// </summary>
[DataContract]
public class FloorPlansAutoLocateJobsResponseJobRanging
{
/// <summary>
/// Ranging status. Possible values: 'scheduled', 'in progress', 'error', 'finished', 'no neighbors'
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "status")]
public string Status { get; set; } = string.Empty;

/// <summary>
/// Progress information for the ranging process
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "completed")]
public FloorPlansAutoLocateJobsResponseJobCompleted Completed { get; set; } = new();
}
15 changes: 15 additions & 0 deletions Meraki.Api/Data/FloorPlanBatchDevicesUpdateRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Meraki.Api.Data;

/// <summary>
/// FloorPlanBatchDevicesUpdateRequest
/// </summary>
[DataContract]
public class FloorPlanBatchDevicesUpdateRequest
{
/// <summary>
/// List of floorplan assignments to update. Up to 100 floor plan assignments can be provided in a request.
/// </summary>
[DataMember(Name = "assignments")]
public List<FloorPlanBatchDevicesUpdateRequestAssignment> Assignments { get; set; } = new();

}
Loading
Loading