/** * <p> * The public key. * </p> * * @param publicKey * The public key. * @return Returns a reference to this object so that method calls can be chained together. */ public KeyPair withPublicKey(String publicKey) { setPublicKey(publicKey); return this; }
if (context.testExpression("PublicKey", targetDepth)) { context.nextToken(); keyPair.setPublicKey(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * The public key. * </p> * * @param publicKey * The public key. * @return Returns a reference to this object so that method calls can be chained together. */ public KeyPair withPublicKey(String publicKey) { setPublicKey(publicKey); return this; }
public KeyPair unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } KeyPair keyPair = new KeyPair(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("PublicKey")) { keyPair.setPublicKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("PrivateKey")) { keyPair.setPrivateKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return keyPair; }
public KeyPair unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } KeyPair keyPair = new KeyPair(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("PublicKey")) { keyPair.setPublicKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("PrivateKey")) { keyPair.setPrivateKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return keyPair; }
if (context.testExpression("PublicKey", targetDepth)) { context.nextToken(); keyPair.setPublicKey(context.getUnmarshaller(String.class).unmarshall(context));