/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateEnvironmentResponse response = new CreateEnvironmentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("CreateEnvironmentResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } 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) { CreateEnvironmentResponse response = new CreateEnvironmentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("environmentArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EnvironmentArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("environmentId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EnvironmentId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("environmentUrl", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EnvironmentUrl = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// <para> Launches an environment for the specified application using the specified configuration. </para> /// </summary> /// /// <param name="createEnvironmentRequest">Container for the necessary parameters to execute the CreateEnvironment service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateEnvironment service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="TooManyEnvironmentsException"/> public CreateEnvironmentResponse CreateEnvironment(CreateEnvironmentRequest createEnvironmentRequest) { IRequest <CreateEnvironmentRequest> request = new CreateEnvironmentRequestMarshaller().Marshall(createEnvironmentRequest); CreateEnvironmentResponse response = Invoke <CreateEnvironmentRequest, CreateEnvironmentResponse> (request, this.signer, CreateEnvironmentResponseUnmarshaller.GetInstance()); 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) { CreateEnvironmentResponse response = new CreateEnvironmentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ApplicationId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ApplicationId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Monitors", targetDepth)) { var unmarshaller = new ListUnmarshaller <Monitor, MonitorUnmarshaller>(MonitorUnmarshaller.Instance); response.Monitors = 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); }
public static CreateEnvironmentResponse Unmarshall(UnmarshallerContext _ctx) { CreateEnvironmentResponse createEnvironmentResponse = new CreateEnvironmentResponse(); createEnvironmentResponse.HttpResponse = _ctx.HttpResponse; createEnvironmentResponse.Code = _ctx.IntegerValue("CreateEnvironment.Code"); createEnvironmentResponse.RequestId = _ctx.StringValue("CreateEnvironment.RequestId"); createEnvironmentResponse.ErrMsg = _ctx.StringValue("CreateEnvironment.ErrMsg"); CreateEnvironmentResponse.CreateEnvironment_Result result = new CreateEnvironmentResponse.CreateEnvironment_Result(); result.AppEnvId = _ctx.LongValue("CreateEnvironment.Result.AppEnvId"); createEnvironmentResponse.Result = result; return(createEnvironmentResponse); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateEnvironmentResponse response = new CreateEnvironmentResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("CreateEnvironmentResult", 2)) { response.CreateEnvironmentResult = CreateEnvironmentResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, CreateEnvironmentResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AbortableOperationInProgress", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.AbortableOperationInProgress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ApplicationName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ApplicationName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CNAME", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CNAME = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DateCreated", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.DateCreated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DateUpdated", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.DateUpdated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndpointURL", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EndpointURL = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnvironmentArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EnvironmentArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnvironmentId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EnvironmentId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnvironmentLinks/member", targetDepth)) { var unmarshaller = EnvironmentLinkUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.EnvironmentLinks.Add(item); continue; } if (context.TestExpression("EnvironmentName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EnvironmentName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Health", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Health = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HealthStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HealthStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PlatformArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PlatformArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Resources", targetDepth)) { var unmarshaller = EnvironmentResourcesDescriptionUnmarshaller.Instance; response.Resources = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SolutionStackName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SolutionStackName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TemplateName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TemplateName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tier", targetDepth)) { var unmarshaller = EnvironmentTierUnmarshaller.Instance; response.Tier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VersionLabel", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VersionLabel = unmarshaller.Unmarshall(context); continue; } } } return; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateEnvironmentResponse response = new CreateEnvironmentResponse(); 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("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = 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("NetworkFabricType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NetworkFabricType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OwnerAccountId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OwnerAccountId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, CreateEnvironmentResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("EnvironmentName", targetDepth)) { response.EnvironmentName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EnvironmentId", targetDepth)) { response.EnvironmentId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ApplicationName", targetDepth)) { response.ApplicationName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VersionLabel", targetDepth)) { response.VersionLabel = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SolutionStackName", targetDepth)) { response.SolutionStackName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TemplateName", targetDepth)) { response.TemplateName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { response.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EndpointURL", targetDepth)) { response.EndpointURL = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CNAME", targetDepth)) { response.CNAME = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DateCreated", targetDepth)) { response.DateCreated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DateUpdated", targetDepth)) { response.DateUpdated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { response.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Health", targetDepth)) { response.Health = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Resources", targetDepth)) { response.Resources = EnvironmentResourcesDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Tier", targetDepth)) { response.Tier = EnvironmentTierUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }