public void CanCreateStructWithAdditionalProperties() { var s = new InputAdditionalPropertiesModelStruct(123, new Dictionary <string, object>() { { "a", "b" }, { "c", 2 } }); Assert.AreEqual(123, s.Id); Assert.AreEqual("b", s["a"]); Assert.AreEqual(2, s["c"]); }
public virtual Response WriteOnlyStruct(InputAdditionalPropertiesModelStruct createParameters, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("APClient.WriteOnlyStruct"); scope.Start(); try { return(RestClient.WriteOnlyStruct(createParameters, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response> WriteOnlyStructAsync(InputAdditionalPropertiesModelStruct createParameters, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("APClient.WriteOnlyStruct"); scope.Start(); try { return(await RestClient.WriteOnlyStructAsync(createParameters, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }