Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* Represents the metadata for long-running operations.
*/
public class LongRunningMetadata {
private ObjectSchema pollResultType;
private ObjectSchema finalResultType;
private Schema pollResultType;
private Schema finalResultType;
private Metadata pollingStrategy;
private String finalResultPropertySerializedName;

Expand All @@ -23,7 +23,7 @@ public LongRunningMetadata() {
*
* @return The poll result type.
*/
public ObjectSchema getPollResultType() {
public Schema getPollResultType() {
return pollResultType;
}

Expand All @@ -32,7 +32,7 @@ public ObjectSchema getPollResultType() {
*
* @param pollResultType The poll result type.
*/
public void setPollResultType(ObjectSchema pollResultType) {
public void setPollResultType(Schema pollResultType) {
this.pollResultType = pollResultType;
}

Expand All @@ -41,7 +41,7 @@ public void setPollResultType(ObjectSchema pollResultType) {
*
* @return The final result type.
*/
public ObjectSchema getFinalResultType() {
public Schema getFinalResultType() {
return finalResultType;
}

Expand All @@ -50,7 +50,7 @@ public ObjectSchema getFinalResultType() {
*
* @param finalResultType The final result type.
*/
public void setFinalResultType(ObjectSchema finalResultType) {
public void setFinalResultType(Schema finalResultType) {
this.finalResultType = finalResultType;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ private static PollingMetadata create(LongRunningMetadata lroMetadata, PollingSe

// Step_1: Resolve LRO poll and final result types.
//
final ObjectMapper objectMapper = Mappers.getObjectMapper();
final SchemaMapper schemaMapper = Mappers.getSchemaMapper();
final IType pollResultType;
if (pollingSettings.getPollResultType() != null) {
// For result types, the 'PollingSettings' would take precedence over 'LongRunningMetadata'
pollResultType = createTypeFromModelName(pollingSettings.getPollResultType());
} else {
pollResultType = objectMapper.map(lroMetadata.getPollResultType());
pollResultType = schemaMapper.map(lroMetadata.getPollResultType());
}

final IType finalResultType;
Expand All @@ -204,7 +204,7 @@ private static PollingMetadata create(LongRunningMetadata lroMetadata, PollingSe
if (lroMetadata.getFinalResultType() == null) {
finalResultType = PrimitiveType.VOID;
} else {
finalResultType = objectMapper.map(lroMetadata.getFinalResultType());
finalResultType = schemaMapper.map(lroMetadata.getFinalResultType());
}
}

Expand Down
Loading