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
170 changes: 170 additions & 0 deletions output/csharp/src/Seam/Api/DailyProgramsThermostats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,176 @@ public DailyProgramsThermostats(ISeamClient seam)
_seam = seam;
}

[DataContract(Name = "createRequest_request")]
public class CreateRequest
{
[JsonConstructorAttribute]
protected CreateRequest() { }

public CreateRequest(
string deviceId = default,
string name = default,
List<CreateRequestPeriods> periods = default
)
{
DeviceId = deviceId;
Name = name;
Periods = periods;
}

[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)]
public string DeviceId { get; set; }

[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)]
public string Name { get; set; }

[DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)]
public List<CreateRequestPeriods> Periods { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);

StringWriter stringWriter = new StringWriter(
new StringBuilder(256),
System.Globalization.CultureInfo.InvariantCulture
);
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
{
jsonTextWriter.IndentChar = ' ';
jsonTextWriter.Indentation = 2;
jsonTextWriter.Formatting = Formatting.Indented;
jsonSerializer.Serialize(jsonTextWriter, this, null);
}

return stringWriter.ToString();
}
}

[DataContract(Name = "createRequestPeriods_model")]
public class CreateRequestPeriods
{
[JsonConstructorAttribute]
protected CreateRequestPeriods() { }

public CreateRequestPeriods(
string climatePresetKey = default,
string startsAtTime = default
)
{
ClimatePresetKey = climatePresetKey;
StartsAtTime = startsAtTime;
}

[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)]
public string ClimatePresetKey { get; set; }

[DataMember(Name = "starts_at_time", IsRequired = true, EmitDefaultValue = false)]
public string StartsAtTime { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);

StringWriter stringWriter = new StringWriter(
new StringBuilder(256),
System.Globalization.CultureInfo.InvariantCulture
);
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
{
jsonTextWriter.IndentChar = ' ';
jsonTextWriter.Indentation = 2;
jsonTextWriter.Formatting = Formatting.Indented;
jsonSerializer.Serialize(jsonTextWriter, this, null);
}

return stringWriter.ToString();
}
}

[DataContract(Name = "createResponse_response")]
public class CreateResponse
{
[JsonConstructorAttribute]
protected CreateResponse() { }

public CreateResponse(ThermostatDailyProgram thermostatDailyProgram = default)
{
ThermostatDailyProgram = thermostatDailyProgram;
}

[DataMember(
Name = "thermostat_daily_program",
IsRequired = false,
EmitDefaultValue = false
)]
public ThermostatDailyProgram ThermostatDailyProgram { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);

StringWriter stringWriter = new StringWriter(
new StringBuilder(256),
System.Globalization.CultureInfo.InvariantCulture
);
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
{
jsonTextWriter.IndentChar = ' ';
jsonTextWriter.Indentation = 2;
jsonTextWriter.Formatting = Formatting.Indented;
jsonSerializer.Serialize(jsonTextWriter, this, null);
}

return stringWriter.ToString();
}
}

public ThermostatDailyProgram Create(CreateRequest request)
{
var requestOptions = new RequestOptions();
requestOptions.Data = request;
return _seam
.Post<CreateResponse>("/thermostats/daily_programs/create", requestOptions)
.Data.ThermostatDailyProgram;
}

public ThermostatDailyProgram Create(
string deviceId = default,
string name = default,
List<CreateRequestPeriods> periods = default
)
{
return Create(new CreateRequest(deviceId: deviceId, name: name, periods: periods));
}

public async Task<ThermostatDailyProgram> CreateAsync(CreateRequest request)
{
var requestOptions = new RequestOptions();
requestOptions.Data = request;
return (
await _seam.PostAsync<CreateResponse>(
"/thermostats/daily_programs/create",
requestOptions
)
)
.Data
.ThermostatDailyProgram;
}

public async Task<ThermostatDailyProgram> CreateAsync(
string deviceId = default,
string name = default,
List<CreateRequestPeriods> periods = default
)
{
return (
await CreateAsync(
new CreateRequest(deviceId: deviceId, name: name, periods: periods)
)
);
}

[DataContract(Name = "deleteRequest_request")]
public class DeleteRequest
{
Expand Down
176 changes: 176 additions & 0 deletions output/csharp/src/Seam/Api/EnrollmentAutomationsUserIdentities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,182 @@ public async Task<EnrollmentAutomation> GetAsync(string enrollmentAutomationId =
return (await GetAsync(new GetRequest(enrollmentAutomationId: enrollmentAutomationId)));
}

[DataContract(Name = "launchRequest_request")]
public class LaunchRequest
{
[JsonConstructorAttribute]
protected LaunchRequest() { }

public LaunchRequest(
string? acsCredentialPoolId = default,
bool? createCredentialManagerUser = default,
string credentialManagerAcsSystemId = default,
string? credentialManagerAcsUserId = default,
string userIdentityId = default
)
{
AcsCredentialPoolId = acsCredentialPoolId;
CreateCredentialManagerUser = createCredentialManagerUser;
CredentialManagerAcsSystemId = credentialManagerAcsSystemId;
CredentialManagerAcsUserId = credentialManagerAcsUserId;
UserIdentityId = userIdentityId;
}

[DataMember(
Name = "acs_credential_pool_id",
IsRequired = false,
EmitDefaultValue = false
)]
public string? AcsCredentialPoolId { get; set; }

[DataMember(
Name = "create_credential_manager_user",
IsRequired = false,
EmitDefaultValue = false
)]
public bool? CreateCredentialManagerUser { get; set; }

[DataMember(
Name = "credential_manager_acs_system_id",
IsRequired = true,
EmitDefaultValue = false
)]
public string CredentialManagerAcsSystemId { get; set; }

[DataMember(
Name = "credential_manager_acs_user_id",
IsRequired = false,
EmitDefaultValue = false
)]
public string? CredentialManagerAcsUserId { get; set; }

[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)]
public string UserIdentityId { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);

StringWriter stringWriter = new StringWriter(
new StringBuilder(256),
System.Globalization.CultureInfo.InvariantCulture
);
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
{
jsonTextWriter.IndentChar = ' ';
jsonTextWriter.Indentation = 2;
jsonTextWriter.Formatting = Formatting.Indented;
jsonSerializer.Serialize(jsonTextWriter, this, null);
}

return stringWriter.ToString();
}
}

[DataContract(Name = "launchResponse_response")]
public class LaunchResponse
{
[JsonConstructorAttribute]
protected LaunchResponse() { }

public LaunchResponse(EnrollmentAutomation enrollmentAutomation = default)
{
EnrollmentAutomation = enrollmentAutomation;
}

[DataMember(
Name = "enrollment_automation",
IsRequired = false,
EmitDefaultValue = false
)]
public EnrollmentAutomation EnrollmentAutomation { get; set; }

public override string ToString()
{
JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null);

StringWriter stringWriter = new StringWriter(
new StringBuilder(256),
System.Globalization.CultureInfo.InvariantCulture
);
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter))
{
jsonTextWriter.IndentChar = ' ';
jsonTextWriter.Indentation = 2;
jsonTextWriter.Formatting = Formatting.Indented;
jsonSerializer.Serialize(jsonTextWriter, this, null);
}

return stringWriter.ToString();
}
}

public EnrollmentAutomation Launch(LaunchRequest request)
{
var requestOptions = new RequestOptions();
requestOptions.Data = request;
return _seam
.Post<LaunchResponse>(
"/user_identities/enrollment_automations/launch",
requestOptions
)
.Data.EnrollmentAutomation;
}

public EnrollmentAutomation Launch(
string? acsCredentialPoolId = default,
bool? createCredentialManagerUser = default,
string credentialManagerAcsSystemId = default,
string? credentialManagerAcsUserId = default,
string userIdentityId = default
)
{
return Launch(
new LaunchRequest(
acsCredentialPoolId: acsCredentialPoolId,
createCredentialManagerUser: createCredentialManagerUser,
credentialManagerAcsSystemId: credentialManagerAcsSystemId,
credentialManagerAcsUserId: credentialManagerAcsUserId,
userIdentityId: userIdentityId
)
);
}

public async Task<EnrollmentAutomation> LaunchAsync(LaunchRequest request)
{
var requestOptions = new RequestOptions();
requestOptions.Data = request;
return (
await _seam.PostAsync<LaunchResponse>(
"/user_identities/enrollment_automations/launch",
requestOptions
)
)
.Data
.EnrollmentAutomation;
}

public async Task<EnrollmentAutomation> LaunchAsync(
string? acsCredentialPoolId = default,
bool? createCredentialManagerUser = default,
string credentialManagerAcsSystemId = default,
string? credentialManagerAcsUserId = default,
string userIdentityId = default
)
{
return (
await LaunchAsync(
new LaunchRequest(
acsCredentialPoolId: acsCredentialPoolId,
createCredentialManagerUser: createCredentialManagerUser,
credentialManagerAcsSystemId: credentialManagerAcsSystemId,
credentialManagerAcsUserId: credentialManagerAcsUserId,
userIdentityId: userIdentityId
)
)
);
}

[DataContract(Name = "listRequest_request")]
public class ListRequest
{
Expand Down
Loading
Loading