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

[BEAM-7274] Add DynamicMessage Schema support #10502

Merged
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 @@ -118,8 +118,13 @@ public FieldType getBaseType() {
}

/** Create a {@link Value} specifying which field to set and the value to set. */
public <T> Value createValue(String caseType, T value) {
return createValue(getCaseEnumType().valueOf(caseType), value);
public <T> Value createValue(String caseValue, T value) {
return createValue(getCaseEnumType().valueOf(caseValue), value);
}

/** Create a {@link Value} specifying which field to set and the value to set. */
public <T> Value createValue(int caseValue, T value) {
return createValue(getCaseEnumType().valueOf(caseValue), value);
}

/** Create a {@link Value} specifying which field to set and the value to set. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ private void indexDescriptorByName() {
.values()
.forEach(
fileDescriptor -> {
fileDescriptor
.getMessageTypes()
.forEach(
descriptor -> {
descriptorMap.put(descriptor.getFullName(), descriptor);
});
fileDescriptor.getMessageTypes().forEach(this::indexDescriptor);
});
}

private void indexDescriptor(Descriptors.Descriptor descriptor) {
descriptorMap.put(descriptor.getFullName(), descriptor);
descriptor.getNestedTypes().forEach(this::indexDescriptor);
}

private void indexOptionsByNumber(Collection<Descriptors.FileDescriptor> fileDescriptors) {
fieldOptionMap = new HashMap<>();
fileOptionMap = new HashMap<>();
Expand Down
Loading