private static void UnmarshallResult(XmlUnmarshallerContext context, CreateApplicationVersionResponse 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("ApplicationVersion", targetDepth)) { response.ApplicationVersion = ApplicationVersionDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateApplicationVersionResponse response = new CreateApplicationVersionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("CreateApplicationVersionResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
/// <summary> /// <para>Creates an application version for the specified application.</para> <para><b>NOTE:</b>Once you create an application version with a /// specified Amazon S3 bucket and key location, you cannot change that Amazon S3 location. If you change the Amazon S3 location, you receive an /// exception when you attempt to launch an environment from the application version. </para> /// </summary> /// /// <param name="createApplicationVersionRequest">Container for the necessary parameters to execute the CreateApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateApplicationVersion service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="TooManyApplicationsException"/> /// <exception cref="TooManyApplicationVersionsException"/> public CreateApplicationVersionResponse CreateApplicationVersion(CreateApplicationVersionRequest createApplicationVersionRequest) { IRequest <CreateApplicationVersionRequest> request = new CreateApplicationVersionRequestMarshaller().Marshall(createApplicationVersionRequest); CreateApplicationVersionResponse response = Invoke <CreateApplicationVersionRequest, CreateApplicationVersionResponse> (request, this.signer, CreateApplicationVersionResponseUnmarshaller.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) { CreateApplicationVersionResponse response = new CreateApplicationVersionResponse(); 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("creationTime", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("parameterDefinitions", targetDepth)) { var unmarshaller = new ListUnmarshaller <ParameterDefinition, ParameterDefinitionUnmarshaller>(ParameterDefinitionUnmarshaller.Instance); response.ParameterDefinitions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("semanticVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SemanticVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sourceCodeUrl", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SourceCodeUrl = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("templateUrl", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TemplateUrl = unmarshaller.Unmarshall(context); continue; } } return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateApplicationVersionResponse response = new CreateApplicationVersionResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("CreateApplicationVersionResult", 2)) { response.CreateApplicationVersionResult = CreateApplicationVersionResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }