Hi, 

When I print a proto class object it also includes values corresponding to 
the enums contained in it. e/g - 

message License {
  string license_name = 1;
  PrimaryLinkType primary_link_type = 4;
}

enum PrimaryLinkType {
  UNSPECIFIED = 0;
  SCRAPE_DIRECTLY = 1;
  SCRAPE_FROM_LOCAL_COPY = 2;
  SHOW_LINK_ONLY = 3;
  NEEDS_INTERVENTION = 4;
}

Now when I do this in my Kotlin program - 

val license = License
            .newBuilder()
            .setLicenseName("Some Licenses")
            .setPrimaryLinkType(PrimaryLinkType.SCRAPE_DIRECTLY)
            .build()
println(license)

Output - 

license_name: "Some License"
primary_link_type: SCRAPE_DIRECTLY
primary_link_value: 1


I don't want primary_link_value in the output, is there any way to 
configure it to not include value in the output?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/e9ecea04-a1c8-48f7-b54b-9e26777fec7an%40googlegroups.com.

Reply via email to