All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Adds an endpoint to interact with the Tesla API via a command proxy. This includes fetching vehicle information and configuring telemetry settings. It introduces new models to represent the Tesla API responses and request structures.
33 lines
841 B
C#
33 lines
841 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace ProofOfConcept.Models;
|
|
|
|
public sealed class TelemetryConfigRequest
|
|
{
|
|
[JsonPropertyName("vins")]
|
|
public List<string> Vins { get; set; } = new();
|
|
|
|
[JsonPropertyName("config")]
|
|
public TelemetryConfig Config { get; set; } = new();
|
|
}
|
|
|
|
public sealed class TelemetryConfig
|
|
{
|
|
[JsonPropertyName("hostname")]
|
|
public string Hostname { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("port")]
|
|
public int Port { get; set; }
|
|
|
|
[JsonPropertyName("ca")]
|
|
public string CertificateAuthority { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("fields")]
|
|
public Dictionary<string, TelemetryFieldConfig> Fields { get; set; } = new();
|
|
}
|
|
|
|
public sealed class TelemetryFieldConfig
|
|
{
|
|
[JsonPropertyName("interval_seconds")]
|
|
public int IntervalSeconds { get; set; }
|
|
} |