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

Update survey proto to support data sharing agreement #1940

Merged
merged 10 commits into from
Aug 8, 2024
24 changes: 24 additions & 0 deletions proto/src/google/ground/v1beta1/survey.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ message Survey {

// Required. User id of the survey owner.
string owner_id = 5;

// Properties related to data sharing consent.
message DataSharingConsent {
nwkotto marked this conversation as resolved.
Show resolved Hide resolved
// Type of data sharing consent agreement the user will see.
DataSharingConsentType type = 1;

// Text of custom data sharing consent terms.
string custom_text = 2;
}

// Defines how data sharing consent agreemnent is displayed to users.
DataSharing dataSharingConsent = 6;
nwkotto marked this conversation as resolved.
Show resolved Hide resolved
}

// Defines a user's role in a survey.
Expand All @@ -53,3 +65,15 @@ enum Role {
// User may also manage the survey, update locations of interest, etc.
SURVEY_ORGANIZER = 3;
}

// Defines the type of data sharing consent agreement the user can see.
enum DataSharingConsentType {
nwkotto marked this conversation as resolved.
Show resolved Hide resolved
// Data will only be shared with survey organizers.
PRIVATE = 0;

// Survey organizers can share data with no constraints.
PUBLIC = 1;

// Terms are defined by survey organizers.
CUSTOM = 2;
}