コード例 #1
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

    if (obj instanceof GetStagesRequest == false) return false;
    GetStagesRequest other = (GetStagesRequest) obj;
    if (other.getRestApiId() == null ^ this.getRestApiId() == null) return false;
    if (other.getRestApiId() != null && other.getRestApiId().equals(this.getRestApiId()) == false)
      return false;
    if (other.getDeploymentId() == null ^ this.getDeploymentId() == null) return false;
    if (other.getDeploymentId() != null
        && other.getDeploymentId().equals(this.getDeploymentId()) == false) return false;
    return true;
  }
コード例 #2
0
  public Request<GetStagesRequest> marshall(GetStagesRequest getStagesRequest) {

    if (getStagesRequest == null) {
      throw new SdkClientException("Invalid argument passed to marshall(...)");
    }

    Request<GetStagesRequest> request =
        new DefaultRequest<GetStagesRequest>(getStagesRequest, "AmazonApiGateway");

    request.setHttpMethod(HttpMethodName.GET);

    String uriResourcePath = "/restapis/{restapi_id}/stages";

    uriResourcePath =
        com.amazonaws.transform.PathMarshallers.NON_GREEDY.marshall(
            uriResourcePath, "restapi_id", getStagesRequest.getRestApiId());
    request.setResourcePath(uriResourcePath);

    if (getStagesRequest.getDeploymentId() != null) {
      request.addParameter(
          "deploymentId", StringUtils.fromString(getStagesRequest.getDeploymentId()));
    }

    request.setContent(new ByteArrayInputStream(new byte[0]));
    if (!request.getHeaders().containsKey("Content-Type")) {
      request.addHeader("Content-Type", protocolFactory.getContentType());
    }

    return request;
  }