Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ADT RequestOption extensions for less code duplication #14695

Merged
merged 1 commit into from
Sep 1, 2020
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 @@ -13,9 +13,10 @@ public class DeleteRelationshipRequestOptions extends RequestOptions {
// This class exists to be added to later if the deleteRelationship APIs get a new optional parameter in later service
// API versions and so that we don't have to expose that new optional parameter for other APIs like deleteDigitalTwin

// Need to override this method so that the returned value is of type DeleteRelationshipRequestOptions instead of type RequestOptions
@Override
public DeleteRelationshipRequestOptions setIfMatch(String ifMatch) {
this.ifMatch = ifMatch;
super.setIfMatch(ifMatch);
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ public class UpdateComponentRequestOptions extends RequestOptions {
// API versions and so that we don't have to expose that new optional parameter for other APIs like updateDigitalTwin,
// updateRelationship, etc.

// Need to override this method so that the returned value is of type UpdateComponentRequestOptions instead of type RequestOptions
@Override
public UpdateComponentRequestOptions setIfMatch(String ifMatch) {
this.ifMatch = ifMatch;
super.setIfMatch(ifMatch);
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ public class UpdateRelationshipRequestOptions extends RequestOptions {
// API versions and so that we don't have to expose that new optional parameter for other APIs like updateDigitalTwin,
// updateComponent, etc.

// Need to override this method so that the returned value is of type UpdateRelationshipRequestOptions instead of type RequestOptions
@Override
public UpdateRelationshipRequestOptions setIfMatch(String ifMatch) {
this.ifMatch = ifMatch;
super.setIfMatch(ifMatch);
return this;
}
}