com.google.protobuf.FeatureSetKt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobuf-kotlin-lite Show documentation
Show all versions of protobuf-kotlin-lite Show documentation
Kotlin lite Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an
efficient yet extensible format.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/protobuf/descriptor.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.protobuf;
@kotlin.jvm.JvmName("-initializefeatureSet")
public inline fun featureSet(block: com.google.protobuf.FeatureSetKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.FeatureSet =
com.google.protobuf.FeatureSetKt.Dsl._create(com.google.protobuf.DescriptorProtos.FeatureSet.newBuilder()).apply { block() }._build()
/**
* Protobuf type `google.protobuf.FeatureSet`
*/
public object FeatureSetKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.protobuf.DescriptorProtos.FeatureSet.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.protobuf.DescriptorProtos.FeatureSet.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.protobuf.DescriptorProtos.FeatureSet = _builder.build()
/**
* `optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [json_name = "fieldPresence", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public var fieldPresence: com.google.protobuf.DescriptorProtos.FeatureSet.FieldPresence
@JvmName("getFieldPresence")
get() = _builder.fieldPresence
@JvmName("setFieldPresence")
set(value) {
_builder.fieldPresence = value
}
/**
* `optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [json_name = "fieldPresence", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public fun clearFieldPresence() {
_builder.clearFieldPresence()
}
/**
* `optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [json_name = "fieldPresence", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
* @return Whether the fieldPresence field is set.
*/
public fun hasFieldPresence(): kotlin.Boolean {
return _builder.hasFieldPresence()
}
/**
* `optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [json_name = "enumType", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public var enumType: com.google.protobuf.DescriptorProtos.FeatureSet.EnumType
@JvmName("getEnumType")
get() = _builder.enumType
@JvmName("setEnumType")
set(value) {
_builder.enumType = value
}
/**
* `optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [json_name = "enumType", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public fun clearEnumType() {
_builder.clearEnumType()
}
/**
* `optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [json_name = "enumType", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
* @return Whether the enumType field is set.
*/
public fun hasEnumType(): kotlin.Boolean {
return _builder.hasEnumType()
}
/**
* `optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [json_name = "repeatedFieldEncoding", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public var repeatedFieldEncoding: com.google.protobuf.DescriptorProtos.FeatureSet.RepeatedFieldEncoding
@JvmName("getRepeatedFieldEncoding")
get() = _builder.repeatedFieldEncoding
@JvmName("setRepeatedFieldEncoding")
set(value) {
_builder.repeatedFieldEncoding = value
}
/**
* `optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [json_name = "repeatedFieldEncoding", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public fun clearRepeatedFieldEncoding() {
_builder.clearRepeatedFieldEncoding()
}
/**
* `optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [json_name = "repeatedFieldEncoding", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
* @return Whether the repeatedFieldEncoding field is set.
*/
public fun hasRepeatedFieldEncoding(): kotlin.Boolean {
return _builder.hasRepeatedFieldEncoding()
}
/**
* `optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [json_name = "utf8Validation", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public var utf8Validation: com.google.protobuf.DescriptorProtos.FeatureSet.Utf8Validation
@JvmName("getUtf8Validation")
get() = _builder.utf8Validation
@JvmName("setUtf8Validation")
set(value) {
_builder.utf8Validation = value
}
/**
* `optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [json_name = "utf8Validation", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public fun clearUtf8Validation() {
_builder.clearUtf8Validation()
}
/**
* `optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [json_name = "utf8Validation", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
* @return Whether the utf8Validation field is set.
*/
public fun hasUtf8Validation(): kotlin.Boolean {
return _builder.hasUtf8Validation()
}
/**
* `optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [json_name = "messageEncoding", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public var messageEncoding: com.google.protobuf.DescriptorProtos.FeatureSet.MessageEncoding
@JvmName("getMessageEncoding")
get() = _builder.messageEncoding
@JvmName("setMessageEncoding")
set(value) {
_builder.messageEncoding = value
}
/**
* `optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [json_name = "messageEncoding", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public fun clearMessageEncoding() {
_builder.clearMessageEncoding()
}
/**
* `optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [json_name = "messageEncoding", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
* @return Whether the messageEncoding field is set.
*/
public fun hasMessageEncoding(): kotlin.Boolean {
return _builder.hasMessageEncoding()
}
/**
* `optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [json_name = "jsonFormat", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public var jsonFormat: com.google.protobuf.DescriptorProtos.FeatureSet.JsonFormat
@JvmName("getJsonFormat")
get() = _builder.jsonFormat
@JvmName("setJsonFormat")
set(value) {
_builder.jsonFormat = value
}
/**
* `optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [json_name = "jsonFormat", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
*/
public fun clearJsonFormat() {
_builder.clearJsonFormat()
}
/**
* `optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [json_name = "jsonFormat", retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { ... }`
* @return Whether the jsonFormat field is set.
*/
public fun hasJsonFormat(): kotlin.Boolean {
return _builder.hasJsonFormat()
}
@Suppress("UNCHECKED_CAST")
@kotlin.jvm.JvmSynthetic
public operator fun get(extension: com.google.protobuf.ExtensionLite): T {
return if (extension.isRepeated) {
get(extension as com.google.protobuf.ExtensionLite>) as T
} else {
_builder.getExtension(extension)
}
}
@kotlin.jvm.JvmSynthetic
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@kotlin.jvm.JvmName("-getRepeatedExtension")
public operator fun get(
extension: com.google.protobuf.ExtensionLite>
): com.google.protobuf.kotlin.ExtensionList {
return com.google.protobuf.kotlin.ExtensionList(extension, _builder.getExtension(extension))
}
@kotlin.jvm.JvmSynthetic
public operator fun contains(extension: com.google.protobuf.ExtensionLite): Boolean {
return _builder.hasExtension(extension)
}
@kotlin.jvm.JvmSynthetic
public fun clear(extension: com.google.protobuf.ExtensionLite) {
_builder.clearExtension(extension)
}
@kotlin.jvm.JvmSynthetic
public fun setExtension(extension: com.google.protobuf.ExtensionLite, value: T) {
_builder.setExtension(extension, value)
}
@kotlin.jvm.JvmSynthetic
@Suppress("NOTHING_TO_INLINE")
public inline operator fun > set(
extension: com.google.protobuf.ExtensionLite,
value: T
) {
setExtension(extension, value)
}
@kotlin.jvm.JvmSynthetic
@Suppress("NOTHING_TO_INLINE")
public inline operator fun set(
extension: com.google.protobuf.ExtensionLite,
value: com.google.protobuf.ByteString
) {
setExtension(extension, value)
}
@kotlin.jvm.JvmSynthetic
@Suppress("NOTHING_TO_INLINE")
public inline operator fun set(
extension: com.google.protobuf.ExtensionLite,
value: T
) {
setExtension(extension, value)
}
@kotlin.jvm.JvmSynthetic
public fun com.google.protobuf.kotlin.ExtensionList.add(value: E) {
_builder.addExtension(this.extension, value)
}
@kotlin.jvm.JvmSynthetic
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.ExtensionList.plusAssign(value: E) {
add(value)
}
@kotlin.jvm.JvmSynthetic
public fun com.google.protobuf.kotlin.ExtensionList.addAll(values: Iterable) {
for (value in values) {
add(value)
}
}
@kotlin.jvm.JvmSynthetic
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.ExtensionList.plusAssign(values: Iterable) {
addAll(values)
}
@kotlin.jvm.JvmSynthetic
public operator fun com.google.protobuf.kotlin.ExtensionList.set(index: Int, value: E) {
_builder.setExtension(this.extension, index, value)
}
@kotlin.jvm.JvmSynthetic
@Suppress("NOTHING_TO_INLINE")
public inline fun com.google.protobuf.kotlin.ExtensionList<*, com.google.protobuf.DescriptorProtos.FeatureSet>.clear() {
clear(extension)
}
}
}
public inline fun com.google.protobuf.DescriptorProtos.FeatureSet.copy(block: `com.google.protobuf`.FeatureSetKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.FeatureSet =
`com.google.protobuf`.FeatureSetKt.Dsl._create(this.toBuilder()).apply { block() }._build()