/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteEnvironmentResponse response = new DeleteEnvironmentResponse(); return(response); }
public DeleteEnvironmentResponse DeleteEnvironment(string environmentId) { if (string.IsNullOrEmpty(environmentId)) { throw new ArgumentNullException(nameof(environmentId)); } if (string.IsNullOrEmpty(VersionDate)) { throw new ArgumentNullException("versionDate cannot be null. Use 'DISCOVERY_VERSION_DATE_2016_12_01'"); } DeleteEnvironmentResponse result = null; try { result = this.Client.WithAuthentication(this.UserName, this.Password) .DeleteAsync($"{this.Endpoint}/v1/environments/{environmentId}") .WithArgument("version", VersionDate) .As <DeleteEnvironmentResponse>() .Result; } catch (AggregateException ae) { throw ae.Flatten(); } return(result); }
private void OnDeleteEnvironment(DeleteEnvironmentResponse resp, Dictionary <string, object> customData) { Log.Debug("ExampleDiscovery.OnDeleteEnvironment()", "Discovery - DeleteEnvironment Response: deleted:{0}", customData["json"].ToString()); _createdEnvironmentID = default(string); _deleteEnvironmentTested = true; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteEnvironmentResponse response = new DeleteEnvironmentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("environment", targetDepth)) { var unmarshaller = EnvironmentUnmarshaller.Instance; response.Environment = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteEnvironmentResponse response = new DeleteEnvironmentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnvironmentId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EnvironmentId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastUpdatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.State = unmarshaller.Unmarshall(context); continue; } } return(response); }