Add public modifier

pull/10599/head
Deanna Garcia 2 years ago
parent 6cf8108271
commit b6a3f6eb98
  1. 22
      src/google/protobuf/compiler/java/enum_field.cc
  2. 22
      src/google/protobuf/compiler/java/enum_field_lite.cc
  3. 12
      src/google/protobuf/compiler/java/map_field.cc
  4. 14
      src/google/protobuf/compiler/java/map_field_lite.cc
  5. 38
      src/google/protobuf/compiler/java/message.cc
  6. 24
      src/google/protobuf/compiler/java/message_field.cc
  7. 24
      src/google/protobuf/compiler/java/message_field_lite.cc
  8. 40
      src/google/protobuf/compiler/java/message_lite.cc
  9. 22
      src/google/protobuf/compiler/java/primitive_field.cc
  10. 22
      src/google/protobuf/compiler/java/primitive_field_lite.cc
  11. 22
      src/google/protobuf/compiler/java/string_field.cc
  12. 22
      src/google/protobuf/compiler/java/string_field_lite.cc

@ -276,7 +276,7 @@ void ImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const { io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$ var $kt_name$: $kt_type$\n" "$kt_deprecation$public var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n" " get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@ -299,7 +299,7 @@ void ImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"fun ${$clear$kt_capitalized_name$$}$() {\n" "public fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -308,7 +308,7 @@ void ImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n" "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n" " return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n"); "}\n");
} }
@ -1085,12 +1085,12 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$public val $kt_name$: "
"com.google.protobuf.kotlin.DslList" "com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -1103,7 +1103,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n" "add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@ -1115,7 +1115,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n" "plusAssign(value: $kt_type$) {\n"
" add(value)\n" " add(value)\n"
@ -1126,7 +1126,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n" "addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@ -1139,7 +1139,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n" "plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n" " addAll(values)\n"
@ -1151,7 +1151,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
"operator fun com.google.protobuf.kotlin.DslList" "public operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n" "set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@ -1162,7 +1162,7 @@ void RepeatedImmutableEnumFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n" "clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

@ -311,7 +311,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const { io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$var $kt_name$: $kt_type$\n" "$kt_deprecation$public var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n" " get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@ -334,7 +334,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"fun ${$clear$kt_capitalized_name$$}$() {\n" "public fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -343,7 +343,7 @@ void ImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n" "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n" " return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n"); "}\n");
} }
@ -870,12 +870,12 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$ public val $kt_name$: "
"com.google.protobuf.kotlin.DslList" "com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -888,7 +888,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n" "add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@ -900,7 +900,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n" "plusAssign(value: $kt_type$) {\n"
" add(value)\n" " add(value)\n"
@ -911,7 +911,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n" "addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@ -924,7 +924,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n" "plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n" " addAll(values)\n"
@ -936,7 +936,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
"operator fun com.google.protobuf.kotlin.DslList" "public operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n" "set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@ -947,7 +947,7 @@ void RepeatedImmutableEnumFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n" "clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

@ -727,13 +727,13 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$ public val $kt_name$: "
"com.google.protobuf.kotlin.DslMap" "com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -746,7 +746,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
printer->Print( printer->Print(
variables_, variables_,
"@JvmName(\"put$kt_capitalized_name$\")\n" "@JvmName(\"put$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslMap" "public fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .put(key: $kt_key_type$, value: $kt_value_type$) {\n" " .put(key: $kt_key_type$, value: $kt_value_type$) {\n"
" $kt_dsl_builder$.${$put$capitalized_name$$}$(key, value)\n" " $kt_dsl_builder$.${$put$capitalized_name$$}$(key, value)\n"
@ -758,7 +758,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"set$kt_capitalized_name$\")\n" "@JvmName(\"set$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslMap" "public inline operator fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .set(key: $kt_key_type$, value: $kt_value_type$) {\n" " .set(key: $kt_key_type$, value: $kt_value_type$) {\n"
" put(key, value)\n" " put(key, value)\n"
@ -769,7 +769,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"remove$kt_capitalized_name$\")\n" "@JvmName(\"remove$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslMap" "public fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .remove(key: $kt_key_type$) {\n" " .remove(key: $kt_key_type$) {\n"
" $kt_dsl_builder$.${$remove$capitalized_name$$}$(key)\n" " $kt_dsl_builder$.${$remove$capitalized_name$$}$(key)\n"
@ -780,7 +780,7 @@ void ImmutableMapFieldGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"putAll$kt_capitalized_name$\")\n" "@JvmName(\"putAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslMap" "public fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .putAll(map: kotlin.collections.Map<$kt_key_type$, $kt_value_type$>) " " .putAll(map: kotlin.collections.Map<$kt_key_type$, $kt_value_type$>) "
"{\n" "{\n"

@ -871,13 +871,13 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$ public val $kt_name$: "
"com.google.protobuf.kotlin.DslMap" "com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -890,7 +890,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print( printer->Print(
variables_, variables_,
"@JvmName(\"put$kt_capitalized_name$\")\n" "@JvmName(\"put$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslMap" "public fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .put(key: $kt_key_type$, value: $kt_value_type$) {\n" " .put(key: $kt_key_type$, value: $kt_value_type$) {\n"
" $kt_dsl_builder$.${$put$capitalized_name$$}$(key, value)\n" " $kt_dsl_builder$.${$put$capitalized_name$$}$(key, value)\n"
@ -902,7 +902,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"set$kt_capitalized_name$\")\n" "@JvmName(\"set$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslMap" "public inline operator fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .set(key: $kt_key_type$, value: $kt_value_type$) {\n" " .set(key: $kt_key_type$, value: $kt_value_type$) {\n"
" put(key, value)\n" " put(key, value)\n"
@ -913,7 +913,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"remove$kt_capitalized_name$\")\n" "@JvmName(\"remove$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslMap" "public fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .remove(key: $kt_key_type$) {\n" " .remove(key: $kt_key_type$) {\n"
" $kt_dsl_builder$.${$remove$capitalized_name$$}$(key)\n" " $kt_dsl_builder$.${$remove$capitalized_name$$}$(key)\n"
@ -924,7 +924,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"putAll$kt_capitalized_name$\")\n" "@JvmName(\"putAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslMap" "public fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .putAll(map: kotlin.collections.Map<$kt_key_type$, $kt_value_type$>) " " .putAll(map: kotlin.collections.Map<$kt_key_type$, $kt_value_type$>) "
"{\n" "{\n"
@ -936,7 +936,7 @@ void ImmutableMapFieldLiteGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@JvmName(\"clear$kt_capitalized_name$\")\n" "@JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslMap" "public fun com.google.protobuf.kotlin.DslMap"
"<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_key_type$, $kt_value_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" .clear() {\n" " .clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

@ -1409,10 +1409,10 @@ void ImmutableMessageGenerator::GenerateKotlinDsl(io::Printer* printer) const {
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"@com.google.protobuf.kotlin.ProtoDslMarker\n"); "@com.google.protobuf.kotlin.ProtoDslMarker\n");
printer->Print( printer->Print(
"class Dsl private constructor(\n" "public class Dsl private constructor(\n"
" private val _builder: $message$.Builder\n" " private val _builder: $message$.Builder\n"
") {\n" ") {\n"
" companion object {\n" " public companion object {\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
" @kotlin.PublishedApi\n" " @kotlin.PublishedApi\n"
" internal fun _create(builder: $message$.Builder): Dsl = " " internal fun _create(builder: $message$.Builder): Dsl = "
@ -1435,10 +1435,10 @@ void ImmutableMessageGenerator::GenerateKotlinDsl(io::Printer* printer) const {
for (auto oneof : oneofs_) { for (auto oneof : oneofs_) {
printer->Print( printer->Print(
"val $oneof_name$Case: $message$.$oneof_capitalized_name$Case\n" "public val $oneof_name$Case: $message$.$oneof_capitalized_name$Case\n"
" @JvmName(\"get$oneof_capitalized_name$Case\")\n" " @JvmName(\"get$oneof_capitalized_name$Case\")\n"
" get() = _builder.get$oneof_capitalized_name$Case()\n\n" " get() = _builder.get$oneof_capitalized_name$Case()\n\n"
"fun clear$oneof_capitalized_name$() {\n" "public fun clear$oneof_capitalized_name$() {\n"
" _builder.clear$oneof_capitalized_name$()\n" " _builder.clear$oneof_capitalized_name$()\n"
"}\n", "}\n",
"oneof_name", context_->GetOneofGeneratorInfo(oneof)->name, "oneof_name", context_->GetOneofGeneratorInfo(oneof)->name,
@ -1466,7 +1466,7 @@ void ImmutableMessageGenerator::GenerateKotlinMembers(
} }
printer->Print( printer->Print(
"inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> " "public inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): " "kotlin.Unit): "
"$message$ " "$message$ "
"=\n" "=\n"
@ -1480,7 +1480,7 @@ void ImmutableMessageGenerator::GenerateKotlinMembers(
EscapeKotlinKeywords(name_resolver_->GetClassName(descriptor_, true))); EscapeKotlinKeywords(name_resolver_->GetClassName(descriptor_, true)));
WriteMessageDocComment(printer, descriptor_, /* kdoc */ true); WriteMessageDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print("object $name$Kt {\n", "name", descriptor_->name()); printer->Print("public object $name$Kt {\n", "name", descriptor_->name());
printer->Indent(); printer->Indent();
GenerateKotlinDsl(printer); GenerateKotlinDsl(printer);
for (int i = 0; i < descriptor_->nested_type_count(); i++) { for (int i = 0; i < descriptor_->nested_type_count(); i++) {
@ -1501,7 +1501,7 @@ void ImmutableMessageGenerator::GenerateTopLevelKotlinMembers(
} }
printer->Print( printer->Print(
"inline fun $message$.copy(block: $message_kt$.Dsl.() -> " "public inline fun $message$.copy(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): $message$ =\n" "kotlin.Unit): $message$ =\n"
" $message_kt$.Dsl._create(this.toBuilder()).apply { block() " " $message_kt$.Dsl._create(this.toBuilder()).apply { block() "
"}._build()\n\n", "}._build()\n\n",
@ -1546,7 +1546,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@Suppress(\"UNCHECKED_CAST\")\n" "@Suppress(\"UNCHECKED_CAST\")\n"
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"operator fun <T : kotlin.Any> get(extension: " "public operator fun <T : kotlin.Any> get(extension: "
"com.google.protobuf.ExtensionLite<$message$, T>): T {\n" "com.google.protobuf.ExtensionLite<$message$, T>): T {\n"
" return if (extension.isRepeated) {\n" " return if (extension.isRepeated) {\n"
" get(extension as com.google.protobuf.ExtensionLite<$message$, " " get(extension as com.google.protobuf.ExtensionLite<$message$, "
@ -1562,7 +1562,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"@kotlin.jvm.JvmName(\"-getRepeatedExtension\")\n" "@kotlin.jvm.JvmName(\"-getRepeatedExtension\")\n"
"operator fun <E : kotlin.Any> get(\n" "public operator fun <E : kotlin.Any> get(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, List<E>>\n" " extension: com.google.protobuf.ExtensionLite<$message$, List<E>>\n"
"): com.google.protobuf.kotlin.ExtensionList<E, $message$> {\n" "): com.google.protobuf.kotlin.ExtensionList<E, $message$> {\n"
" return com.google.protobuf.kotlin.ExtensionList(extension, " " return com.google.protobuf.kotlin.ExtensionList(extension, "
@ -1572,7 +1572,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"operator fun contains(extension: " "public operator fun contains(extension: "
"com.google.protobuf.ExtensionLite<$message$, *>): " "com.google.protobuf.ExtensionLite<$message$, *>): "
"Boolean {\n" "Boolean {\n"
" return _builder.hasExtension(extension)\n" " return _builder.hasExtension(extension)\n"
@ -1581,7 +1581,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"fun clear(extension: " "public fun clear(extension: "
"com.google.protobuf.ExtensionLite<$message$, *>) " "com.google.protobuf.ExtensionLite<$message$, *>) "
"{\n" "{\n"
" _builder.clearExtension(extension)\n" " _builder.clearExtension(extension)\n"
@ -1601,7 +1601,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun <T : Comparable<T>> set(\n" "public inline operator fun <T : Comparable<T>> set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, T>,\n" " extension: com.google.protobuf.ExtensionLite<$message$, T>,\n"
" value: T\n" " value: T\n"
") {\n" ") {\n"
@ -1612,7 +1612,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun set(\n" "public inline operator fun set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, " " extension: com.google.protobuf.ExtensionLite<$message$, "
"com.google.protobuf.ByteString>,\n" "com.google.protobuf.ByteString>,\n"
" value: com.google.protobuf.ByteString\n" " value: com.google.protobuf.ByteString\n"
@ -1634,7 +1634,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"fun <E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, " "public fun <E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.add(value: E) {\n" "$message$>.add(value: E) {\n"
" _builder.addExtension(this.extension, value)\n" " _builder.addExtension(this.extension, value)\n"
"}\n\n", "}\n\n",
@ -1643,7 +1643,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun <E : kotlin.Any> " "public inline operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, " "com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.plusAssign" "$message$>.plusAssign"
"(value: E) {\n" "(value: E) {\n"
@ -1653,7 +1653,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"fun <E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, " "public fun <E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.addAll(values: Iterable<E>) {\n" "$message$>.addAll(values: Iterable<E>) {\n"
" for (value in values) {\n" " for (value in values) {\n"
" add(value)\n" " add(value)\n"
@ -1664,7 +1664,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun <E : kotlin.Any> " "public inline operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, " "com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.plusAssign(values: " "$message$>.plusAssign(values: "
"Iterable<E>) {\n" "Iterable<E>) {\n"
@ -1674,7 +1674,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"operator fun <E : kotlin.Any> " "public operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, " "com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.set(index: Int, value: " "$message$>.set(index: Int, value: "
"E) {\n" "E) {\n"
@ -1685,7 +1685,7 @@ void ImmutableMessageGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline fun com.google.protobuf.kotlin.ExtensionList<*, " "public inline fun com.google.protobuf.kotlin.ExtensionList<*, "
"$message$>.clear() {\n" "$message$>.clear() {\n"
" clear(extension)\n" " clear(extension)\n"
"}\n\n", "}\n\n",

@ -426,7 +426,7 @@ void ImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const { io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$var $kt_name$: $kt_type$\n" "$kt_deprecation$public var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n" " get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@ -437,7 +437,7 @@ void ImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"fun ${$clear$kt_capitalized_name$$}$() {\n" "public fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -445,7 +445,7 @@ void ImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n" "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n" " return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -455,7 +455,7 @@ void ImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
void ImmutableMessageFieldGenerator::GenerateKotlinOrNull(io::Printer* printer) const { void ImmutableMessageFieldGenerator::GenerateKotlinOrNull(io::Printer* printer) const {
if (descriptor_->has_optional_keyword()) { if (descriptor_->has_optional_keyword()) {
printer->Print(variables_, printer->Print(variables_,
"val $classname$Kt.Dsl.$name$OrNull: $kt_type$?\n" "public val $classname$Kt.Dsl.$name$OrNull: $kt_type$?\n"
" get() = $kt_dsl_builder$.$name$OrNull\n"); " get() = $kt_dsl_builder$.$name$OrNull\n");
} }
} }
@ -1425,12 +1425,12 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$ public val $kt_name$: "
"com.google.protobuf.kotlin.DslList" "com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -1443,7 +1443,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n" "add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@ -1455,7 +1455,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n" "plusAssign(value: $kt_type$) {\n"
" add(value)\n" " add(value)\n"
@ -1466,7 +1466,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n" "addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@ -1479,7 +1479,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n" "plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n" " addAll(values)\n"
@ -1491,7 +1491,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
"operator fun com.google.protobuf.kotlin.DslList" "public operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n" "set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@ -1502,7 +1502,7 @@ void RepeatedImmutableMessageFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n" "clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

@ -293,7 +293,7 @@ void ImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const { io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$var $kt_name$: $kt_type$\n" "$kt_deprecation$public var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n" " get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@ -304,7 +304,7 @@ void ImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"fun ${$clear$kt_capitalized_name$$}$() {\n" "public fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -312,7 +312,7 @@ void ImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n" "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n" " return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n"); "}\n");
GenerateKotlinOrNull(printer); GenerateKotlinOrNull(printer);
@ -321,7 +321,7 @@ void ImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
void ImmutableMessageFieldLiteGenerator::GenerateKotlinOrNull(io::Printer* printer) const { void ImmutableMessageFieldLiteGenerator::GenerateKotlinOrNull(io::Printer* printer) const {
if (descriptor_->has_optional_keyword()) { if (descriptor_->has_optional_keyword()) {
printer->Print(variables_, printer->Print(variables_,
"val $classname$Kt.Dsl.$name$OrNull: $kt_type$?\n" "public val $classname$Kt.Dsl.$name$OrNull: $kt_type$?\n"
" get() = $kt_dsl_builder$.$name$OrNull\n"); " get() = $kt_dsl_builder$.$name$OrNull\n");
} }
} }
@ -819,12 +819,12 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$ public val $kt_name$: "
"com.google.protobuf.kotlin.DslList" "com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -837,7 +837,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n" "add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@ -849,7 +849,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n" "plusAssign(value: $kt_type$) {\n"
" add(value)\n" " add(value)\n"
@ -860,7 +860,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n" "addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@ -873,7 +873,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n" "plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n" " addAll(values)\n"
@ -885,7 +885,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
"operator fun com.google.protobuf.kotlin.DslList" "public operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n" "set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@ -896,7 +896,7 @@ void RepeatedImmutableMessageFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n" "clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

@ -746,10 +746,10 @@ void ImmutableMessageLiteGenerator::GenerateKotlinDsl(
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"@com.google.protobuf.kotlin.ProtoDslMarker\n"); "@com.google.protobuf.kotlin.ProtoDslMarker\n");
printer->Print( printer->Print(
"class Dsl private constructor(\n" "public class Dsl private constructor(\n"
" private val _builder: $message$.Builder\n" " private val _builder: $message$.Builder\n"
") {\n" ") {\n"
" companion object {\n" " public companion object {\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
" @kotlin.PublishedApi\n" " @kotlin.PublishedApi\n"
" internal fun _create(builder: $message$.Builder): Dsl = " " internal fun _create(builder: $message$.Builder): Dsl = "
@ -772,10 +772,10 @@ void ImmutableMessageLiteGenerator::GenerateKotlinDsl(
for (auto oneof : oneofs_) { for (auto oneof : oneofs_) {
printer->Print( printer->Print(
"val $oneof_name$Case: $message$.$oneof_capitalized_name$Case\n" "public val $oneof_name$Case: $message$.$oneof_capitalized_name$Case\n"
" @JvmName(\"get$oneof_capitalized_name$Case\")\n" " @JvmName(\"get$oneof_capitalized_name$Case\")\n"
" get() = _builder.get$oneof_capitalized_name$Case()\n\n" " get() = _builder.get$oneof_capitalized_name$Case()\n\n"
"fun clear$oneof_capitalized_name$() {\n" "public fun clear$oneof_capitalized_name$() {\n"
" _builder.clear$oneof_capitalized_name$()\n" " _builder.clear$oneof_capitalized_name$()\n"
"}\n", "}\n",
"oneof_name", context_->GetOneofGeneratorInfo(oneof)->name, "oneof_name", context_->GetOneofGeneratorInfo(oneof)->name,
@ -802,7 +802,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinMembers(
printer->Print("@com.google.errorprone.annotations.CheckReturnValue\n"); printer->Print("@com.google.errorprone.annotations.CheckReturnValue\n");
} }
printer->Print( printer->Print(
"inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> " "public inline fun $camelcase_name$(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): $message$ =\n" "kotlin.Unit): $message$ =\n"
" $message_kt$.Dsl._create($message$.newBuilder()).apply { block() " " $message_kt$.Dsl._create($message$.newBuilder()).apply { block() "
"}._build()\n", "}._build()\n",
@ -814,7 +814,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinMembers(
EscapeKotlinKeywords(name_resolver_->GetClassName(descriptor_, true))); EscapeKotlinKeywords(name_resolver_->GetClassName(descriptor_, true)));
WriteMessageDocComment(printer, descriptor_, /* kdoc */ true); WriteMessageDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print("object $name$Kt {\n", "name", descriptor_->name()); printer->Print("public object $name$Kt {\n", "name", descriptor_->name());
printer->Indent(); printer->Indent();
GenerateKotlinDsl(printer); GenerateKotlinDsl(printer);
for (int i = 0; i < descriptor_->nested_type_count(); i++) { for (int i = 0; i < descriptor_->nested_type_count(); i++) {
@ -832,7 +832,7 @@ void ImmutableMessageLiteGenerator::GenerateTopLevelKotlinMembers(
printer->Print("@com.google.errorprone.annotations.CheckReturnValue\n"); printer->Print("@com.google.errorprone.annotations.CheckReturnValue\n");
} }
printer->Print( printer->Print(
"inline fun $message$.copy(block: $message_kt$.Dsl.() -> " "public inline fun $message$.copy(block: $message_kt$.Dsl.() -> "
"kotlin.Unit): $message$ =\n" "kotlin.Unit): $message$ =\n"
" $message_kt$.Dsl._create(this.toBuilder()).apply { block() " " $message_kt$.Dsl._create(this.toBuilder()).apply { block() "
"}._build()\n\n", "}._build()\n\n",
@ -879,7 +879,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@Suppress(\"UNCHECKED_CAST\")\n" "@Suppress(\"UNCHECKED_CAST\")\n"
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"operator fun <T : kotlin.Any> get(extension: " "public operator fun <T : kotlin.Any> get(extension: "
"com.google.protobuf.ExtensionLite<$message$, T>): T {\n" "com.google.protobuf.ExtensionLite<$message$, T>): T {\n"
" return if (extension.isRepeated) {\n" " return if (extension.isRepeated) {\n"
" get(extension as com.google.protobuf.ExtensionLite<$message$, " " get(extension as com.google.protobuf.ExtensionLite<$message$, "
@ -895,7 +895,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"@kotlin.jvm.JvmName(\"-getRepeatedExtension\")\n" "@kotlin.jvm.JvmName(\"-getRepeatedExtension\")\n"
"operator fun <E : kotlin.Any> get(\n" "public operator fun <E : kotlin.Any> get(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, List<E>>\n" " extension: com.google.protobuf.ExtensionLite<$message$, List<E>>\n"
"): com.google.protobuf.kotlin.ExtensionList<E, $message$> {\n" "): com.google.protobuf.kotlin.ExtensionList<E, $message$> {\n"
" return com.google.protobuf.kotlin.ExtensionList(extension, " " return com.google.protobuf.kotlin.ExtensionList(extension, "
@ -905,7 +905,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"operator fun contains(extension: " "public operator fun contains(extension: "
"com.google.protobuf.ExtensionLite<$message$, *>): " "com.google.protobuf.ExtensionLite<$message$, *>): "
"Boolean {\n" "Boolean {\n"
" return _builder.hasExtension(extension)\n" " return _builder.hasExtension(extension)\n"
@ -914,7 +914,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"fun clear(extension: " "public fun clear(extension: "
"com.google.protobuf.ExtensionLite<$message$, *>) " "com.google.protobuf.ExtensionLite<$message$, *>) "
"{\n" "{\n"
" _builder.clearExtension(extension)\n" " _builder.clearExtension(extension)\n"
@ -934,7 +934,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun <T : Comparable<T>> set(\n" "public inline operator fun <T : Comparable<T>> set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, T>,\n" " extension: com.google.protobuf.ExtensionLite<$message$, T>,\n"
" value: T\n" " value: T\n"
") {\n" ") {\n"
@ -945,7 +945,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun set(\n" "public inline operator fun set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, " " extension: com.google.protobuf.ExtensionLite<$message$, "
"com.google.protobuf.ByteString>,\n" "com.google.protobuf.ByteString>,\n"
" value: com.google.protobuf.ByteString\n" " value: com.google.protobuf.ByteString\n"
@ -957,7 +957,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun <T : com.google.protobuf.MessageLite> set(\n" "public inline operator fun <T : com.google.protobuf.MessageLite> set(\n"
" extension: com.google.protobuf.ExtensionLite<$message$, T>,\n" " extension: com.google.protobuf.ExtensionLite<$message$, T>,\n"
" value: T\n" " value: T\n"
") {\n" ") {\n"
@ -967,7 +967,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"fun<E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, " "public fun<E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.add(value: E) {\n" "$message$>.add(value: E) {\n"
" _builder.addExtension(this.extension, value)\n" " _builder.addExtension(this.extension, value)\n"
"}\n\n", "}\n\n",
@ -976,7 +976,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun <E : kotlin.Any> " "public inline operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, " "com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.plusAssign" "$message$>.plusAssign"
"(value: E) {\n" "(value: E) {\n"
@ -986,7 +986,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"fun<E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, " "public fun<E : kotlin.Any> com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.addAll(values: Iterable<E>) {\n" "$message$>.addAll(values: Iterable<E>) {\n"
" for (value in values) {\n" " for (value in values) {\n"
" add(value)\n" " add(value)\n"
@ -997,7 +997,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun <E : kotlin.Any> " "public inline operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, " "com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.plusAssign(values: " "$message$>.plusAssign(values: "
"Iterable<E>) {\n" "Iterable<E>) {\n"
@ -1007,7 +1007,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"operator fun <E : kotlin.Any> " "public operator fun <E : kotlin.Any> "
"com.google.protobuf.kotlin.ExtensionList<E, " "com.google.protobuf.kotlin.ExtensionList<E, "
"$message$>.set(index: Int, value: " "$message$>.set(index: Int, value: "
"E) {\n" "E) {\n"
@ -1018,7 +1018,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinExtensions(
printer->Print( printer->Print(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline fun com.google.protobuf.kotlin.ExtensionList<*, " "public inline fun com.google.protobuf.kotlin.ExtensionList<*, "
"$message$>.clear() {\n" "$message$>.clear() {\n"
" clear(extension)\n" " clear(extension)\n"
"}\n\n", "}\n\n",

@ -324,7 +324,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const { io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$var $kt_name$: $kt_type$\n" "$kt_deprecation$public var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n" " get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@ -335,7 +335,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"fun ${$clear$kt_capitalized_name$$}$() {\n" "public fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -344,7 +344,7 @@ void ImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n" "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n" " return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n"); "}\n");
} }
@ -854,12 +854,12 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$ public val $kt_name$: "
"com.google.protobuf.kotlin.DslList" "com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -872,7 +872,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n" "add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@ -884,7 +884,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n" "plusAssign(value: $kt_type$) {\n"
" add(value)\n" " add(value)\n"
@ -895,7 +895,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n" "addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@ -908,7 +908,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n" "plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n" " addAll(values)\n"
@ -920,7 +920,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
"operator fun com.google.protobuf.kotlin.DslList" "public operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n" "set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@ -931,7 +931,7 @@ void RepeatedImmutablePrimitiveFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n" "clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

@ -344,7 +344,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const { io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_); WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$var $kt_name$: $kt_type$\n" "$kt_deprecation$public var $kt_name$: $kt_type$\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n" " get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@ -355,7 +355,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"fun ${$clear$kt_capitalized_name$$}$() {\n" "public fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -364,7 +364,7 @@ void ImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n" "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n" " return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n"); "}\n");
} }
@ -691,12 +691,12 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
WriteFieldDocComment(printer, descriptor_); WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$ public val $kt_name$: "
"com.google.protobuf.kotlin.DslList" "com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -709,7 +709,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: $kt_type$) {\n" "add(value: $kt_type$) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@ -721,7 +721,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: $kt_type$) {\n" "plusAssign(value: $kt_type$) {\n"
" add(value)\n" " add(value)\n"
@ -732,7 +732,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n" "addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@ -745,7 +745,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n" "plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n"
" addAll(values)\n" " addAll(values)\n"
@ -757,7 +757,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
"operator fun com.google.protobuf.kotlin.DslList" "public operator fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: $kt_type$) {\n" "set(index: kotlin.Int, value: $kt_type$) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@ -768,7 +768,7 @@ void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n" "clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

@ -383,7 +383,7 @@ void ImmutableStringFieldGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const { io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$var $kt_name$: kotlin.String\n" "$kt_deprecation$public var $kt_name$: kotlin.String\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n" " get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@ -394,7 +394,7 @@ void ImmutableStringFieldGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"fun ${$clear$kt_capitalized_name$$}$() {\n" "public fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -403,7 +403,7 @@ void ImmutableStringFieldGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n" "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n" " return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n"); "}\n");
} }
@ -968,14 +968,14 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
// property for List<String> // property for List<String>
WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER, WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$public val $kt_name$: "
"com.google.protobuf.kotlin.DslList" "com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>\n" "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>\n"
" @kotlin.jvm.JvmSynthetic\n" " @kotlin.jvm.JvmSynthetic\n"
@ -989,7 +989,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: kotlin.String) {\n" "add(value: kotlin.String) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@ -1002,7 +1002,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: kotlin.String) {\n" "plusAssign(value: kotlin.String) {\n"
" add(value)\n" " add(value)\n"
@ -1015,7 +1015,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<kotlin.String>) {\n" "addAll(values: kotlin.collections.Iterable<kotlin.String>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@ -1029,7 +1029,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<kotlin.String>) {\n" "plusAssign(values: kotlin.collections.Iterable<kotlin.String>) {\n"
" addAll(values)\n" " addAll(values)\n"
@ -1042,7 +1042,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
"operator fun com.google.protobuf.kotlin.DslList" "public operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: kotlin.String) {\n" "set(index: kotlin.Int, value: kotlin.String) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@ -1053,7 +1053,7 @@ void RepeatedImmutableStringFieldGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n" "clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

@ -342,7 +342,7 @@ void ImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
io::Printer* printer) const { io::Printer* printer) const {
WriteFieldDocComment(printer, descriptor_, /* kdoc */ true); WriteFieldDocComment(printer, descriptor_, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"$kt_deprecation$var $kt_name$: kotlin.String\n" "$kt_deprecation$public var $kt_name$: kotlin.String\n"
" @JvmName(\"${$get$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$get$kt_capitalized_name$$}$\")\n"
" get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n" " get() = $kt_dsl_builder$.${$get$capitalized_name$$}$()\n"
" @JvmName(\"${$set$kt_capitalized_name$$}$\")\n" " @JvmName(\"${$set$kt_capitalized_name$$}$\")\n"
@ -353,7 +353,7 @@ void ImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, WriteFieldAccessorDocComment(printer, descriptor_, CLEARER,
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print(variables_, printer->Print(variables_,
"fun ${$clear$kt_capitalized_name$$}$() {\n" "public fun ${$clear$kt_capitalized_name$$}$() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"
"}\n"); "}\n");
@ -362,7 +362,7 @@ void ImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n" "public fun ${$has$kt_capitalized_name$$}$(): kotlin.Boolean {\n"
" return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n" " return $kt_dsl_builder$.${$has$capitalized_name$$}$()\n"
"}\n"); "}\n");
} }
@ -788,7 +788,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
" */\n" " */\n"
"@kotlin.OptIn" "@kotlin.OptIn"
"(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n"
"class ${$$kt_capitalized_name$Proxy$}$ private constructor()" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()"
" : com.google.protobuf.kotlin.DslProxy()\n"); " : com.google.protobuf.kotlin.DslProxy()\n");
// property for List<String> // property for List<String>
@ -796,7 +796,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
/* builder */ false, /* kdoc */ true); /* builder */ false, /* kdoc */ true);
printer->Print( printer->Print(
variables_, variables_,
"$kt_deprecation$ val $kt_name$: " "$kt_deprecation$public val $kt_name$: "
"com.google.protobuf.kotlin.DslList" "com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>\n" "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>\n"
"@kotlin.OptIn" "@kotlin.OptIn"
@ -811,7 +811,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"add(value: kotlin.String) {\n" "add(value: kotlin.String) {\n"
" $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n"
@ -824,7 +824,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(value: kotlin.String) {\n" "plusAssign(value: kotlin.String) {\n"
" add(value)\n" " add(value)\n"
@ -837,7 +837,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"addAll(values: kotlin.collections.Iterable<kotlin.String>) {\n" "addAll(values: kotlin.collections.Iterable<kotlin.String>) {\n"
" $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n"
@ -851,7 +851,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n"
"@Suppress(\"NOTHING_TO_INLINE\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n"
"inline operator fun com.google.protobuf.kotlin.DslList" "public inline operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"plusAssign(values: kotlin.collections.Iterable<kotlin.String>) {\n" "plusAssign(values: kotlin.collections.Iterable<kotlin.String>) {\n"
" addAll(values)\n" " addAll(values)\n"
@ -864,7 +864,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
variables_, variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n"
"operator fun com.google.protobuf.kotlin.DslList" "public operator fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"set(index: kotlin.Int, value: kotlin.String) {\n" "set(index: kotlin.Int, value: kotlin.String) {\n"
" $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n"
@ -875,7 +875,7 @@ void RepeatedImmutableStringFieldLiteGenerator::GenerateKotlinDslMembers(
printer->Print(variables_, printer->Print(variables_,
"@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmSynthetic\n"
"@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n"
"fun com.google.protobuf.kotlin.DslList" "public fun com.google.protobuf.kotlin.DslList"
"<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>." "<kotlin.String, ${$$kt_capitalized_name$Proxy$}$>."
"clear() {\n" "clear() {\n"
" $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n"

Loading…
Cancel
Save