public ListPipelinesResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListPipelinesResult listPipelinesResult = new ListPipelinesResult();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("pipelines", targetDepth)) {
          context.nextToken();
          listPipelinesResult.setPipelines(
              new ListUnmarshaller<PipelineSummary>(PipelineSummaryJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
        if (context.testExpression("nextToken", targetDepth)) {
          context.nextToken();
          listPipelinesResult.setNextToken(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return listPipelinesResult;
  }
コード例 #2
0
  public PipelineSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    PipelineSummary pipelineSummary = new PipelineSummary();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("name", targetDepth)) {
          context.nextToken();
          pipelineSummary.setName(context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("version", targetDepth)) {
          context.nextToken();
          pipelineSummary.setVersion(context.getUnmarshaller(Integer.class).unmarshall(context));
        }
        if (context.testExpression("created", targetDepth)) {
          context.nextToken();
          pipelineSummary.setCreated(
              context.getUnmarshaller(java.util.Date.class).unmarshall(context));
        }
        if (context.testExpression("updated", targetDepth)) {
          context.nextToken();
          pipelineSummary.setUpdated(
              context.getUnmarshaller(java.util.Date.class).unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return pipelineSummary;
  }
コード例 #3
0
  public ActionType unmarshall(JsonUnmarshallerContext context) throws Exception {
    ActionType actionType = new ActionType();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("id", targetDepth)) {
          context.nextToken();
          actionType.setId(ActionTypeIdJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("settings", targetDepth)) {
          context.nextToken();
          actionType.setSettings(
              ActionTypeSettingsJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("actionConfigurationProperties", targetDepth)) {
          context.nextToken();
          actionType.setActionConfigurationProperties(
              new ListUnmarshaller<ActionConfigurationProperty>(
                      ActionConfigurationPropertyJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
        if (context.testExpression("inputArtifactDetails", targetDepth)) {
          context.nextToken();
          actionType.setInputArtifactDetails(
              ArtifactDetailsJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("outputArtifactDetails", targetDepth)) {
          context.nextToken();
          actionType.setOutputArtifactDetails(
              ArtifactDetailsJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return actionType;
  }
コード例 #4
0
  public ActionContext unmarshall(JsonUnmarshallerContext context) throws Exception {
    ActionContext actionContext = new ActionContext();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("name", targetDepth)) {
          context.nextToken();
          actionContext.setName(context.getUnmarshaller(String.class).unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return actionContext;
  }
コード例 #5
0
  public Job unmarshall(JsonUnmarshallerContext context) throws Exception {
    Job job = new Job();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("id", targetDepth)) {
          context.nextToken();
          job.setId(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("data", targetDepth)) {
          context.nextToken();
          job.setData(JobDataJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("nonce", targetDepth)) {
          context.nextToken();
          job.setNonce(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("accountId", targetDepth)) {
          context.nextToken();
          job.setAccountId(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return job;
  }
  public ActionTypeSettings unmarshall(JsonUnmarshallerContext context) throws Exception {
    ActionTypeSettings actionTypeSettings = new ActionTypeSettings();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("thirdPartyConfigurationUrl", targetDepth)) {
          context.nextToken();
          actionTypeSettings.setThirdPartyConfigurationUrl(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("entityUrlTemplate", targetDepth)) {
          context.nextToken();
          actionTypeSettings.setEntityUrlTemplate(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("executionUrlTemplate", targetDepth)) {
          context.nextToken();
          actionTypeSettings.setExecutionUrlTemplate(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("revisionUrlTemplate", targetDepth)) {
          context.nextToken();
          actionTypeSettings.setRevisionUrlTemplate(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return actionTypeSettings;
  }