Skip to content

Instantly share code, notes, and snippets.

@ezequielpereira
Last active August 23, 2020 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezequielpereira/c1dfcaae99856f42ee9a94e3669973ab to your computer and use it in GitHub Desktop.
Save ezequielpereira/c1dfcaae99856f42ee9a94e3669973ab to your computer and use it in GitHub Desktop.
Protobuf definition used to reverse engineer the dogfood Type Provider in Google Cloud Deployment Manager
syntax = "proto3";
enum OperationStatus {
UNKNOWN_STATUS_0 = 0;
UNKNOWN_STATUS_1 = 1;
UNKNOWN_STATUS_2 = 2;
DONE = 3;
}
message Operation {
int64 id = 1;
string name = 3;
string operation_type = 6;
string target_link = 7;
int64 target_id = 8;
OperationStatus status = 9;
string user = 11;
int32 progress = 12;
string insert_time = 13;
string start_time = 14;
string end_time = 15;
string self_link = 20;
}
enum OwnershipKind {
UNKNOWN = 0; // If specified, sets the field to USER
USER = 1; // Default if this field is specified
GOOGLE = 2;
}
enum CredentialType {
UNKNOWN_CREDENTIAL_TYPE = 0;
OAUTH = 1;
GAIAMINT = 2;
ENDUSERCREDS = 3;
TYPE_CREDENTIAL = 4;
}
enum Transport {
UNKNOWN_TRANSPORT_TYPE = 0;
GSLB = 1;
HARPOON = 2;
}
enum DeleteIntent {
CREATE_OR_ACQUIRE = 0; // Seems to be the only available one
}
message GoogleOptions {
string gslb_target = 1;
bool inject_project = 2;
string descriptor_url_server_spec = 3;
OwnershipKind ownership_kind = 4;
CredentialType credential_type = 5;
Transport transport = 6;
DeleteIntent delete_intent = 7;
bool is_local_provider = 8;
}
enum Location {
UNKNOWN_LOC_0 = 0;
UNKNOWN_LOC_1 = 1;
UNKNOWN_LOC_2 = 2;
UNKNOWN_LOC_3 = 3;
HEADER = 4;
}
message InputMapping {
string field_name = 1;
string method_match = 2;
string value = 3;
Location location = 4;
string python_value = 5;
}
message Options {
repeated InputMapping input_mappings = 2;
}
message TypeProvider {
string name = 1;
int64 id = 2;
string insert_time = 3;
string description = 4;
string self_link = 5;
Operation operation = 6;
string descriptor_url = 8;
Options options = 10;
GoogleOptions google_options = 12;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment