All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.protobuf.FieldDescriptorProtoKt.kt Maven / Gradle / Ivy

//Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/descriptor.proto

package com.google.protobuf;

@kotlin.jvm.JvmName("-initializefieldDescriptorProto")
inline fun fieldDescriptorProto(block: com.google.protobuf.FieldDescriptorProtoKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.FieldDescriptorProto =
  com.google.protobuf.FieldDescriptorProtoKt.Dsl._create(com.google.protobuf.DescriptorProtos.FieldDescriptorProto.newBuilder()).apply { block() }._build()
object FieldDescriptorProtoKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  class Dsl private constructor(
    private val _builder: com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Builder
  ) {
    companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): com.google.protobuf.DescriptorProtos.FieldDescriptorProto = _builder.build()

    /**
     * optional string name = 1;
     */
    var name: kotlin.String
      @JvmName("getName")
      get() = _builder.getName()
      @JvmName("setName")
      set(value) {
        _builder.setName(value)
      }
    /**
     * optional string name = 1;
     */
    fun clearName() {
      _builder.clearName()
    }
    /**
     * optional string name = 1;
     * @return Whether the name field is set.
     */
    fun hasName(): kotlin.Boolean {
      return _builder.hasName()
    }

    /**
     * optional int32 number = 3;
     */
    var number: kotlin.Int
      @JvmName("getNumber")
      get() = _builder.getNumber()
      @JvmName("setNumber")
      set(value) {
        _builder.setNumber(value)
      }
    /**
     * optional int32 number = 3;
     */
    fun clearNumber() {
      _builder.clearNumber()
    }
    /**
     * optional int32 number = 3;
     * @return Whether the number field is set.
     */
    fun hasNumber(): kotlin.Boolean {
      return _builder.hasNumber()
    }

    /**
     * optional .google.protobuf.FieldDescriptorProto.Label label = 4;
     */
     var label: com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Label
      @JvmName("getLabel")
      get() = _builder.getLabel()
      @JvmName("setLabel")
      set(value) {
        _builder.setLabel(value)
      }
    /**
     * optional .google.protobuf.FieldDescriptorProto.Label label = 4;
     */
    fun clearLabel() {
      _builder.clearLabel()
    }
    /**
     * optional .google.protobuf.FieldDescriptorProto.Label label = 4;
     * @return Whether the label field is set.
     */
    fun hasLabel(): kotlin.Boolean {
      return _builder.hasLabel()
    }

    /**
     * 
     * If type_name is set, this need not be set.  If both this and type_name
     * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
     * 
* * optional .google.protobuf.FieldDescriptorProto.Type type = 5; */ var type: com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type @JvmName("getType") get() = _builder.getType() @JvmName("setType") set(value) { _builder.setType(value) } /** *
     * If type_name is set, this need not be set.  If both this and type_name
     * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
     * 
* * optional .google.protobuf.FieldDescriptorProto.Type type = 5; */ fun clearType() { _builder.clearType() } /** *
     * If type_name is set, this need not be set.  If both this and type_name
     * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
     * 
* * optional .google.protobuf.FieldDescriptorProto.Type type = 5; * @return Whether the type field is set. */ fun hasType(): kotlin.Boolean { return _builder.hasType() } /** *
     * For message and enum types, this is the name of the type.  If the name
     * starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
     * rules are used to find the type (i.e. first the nested types within this
     * message are searched, then within the parent, on up to the root
     * namespace).
     * 
* * optional string type_name = 6; */ var typeName: kotlin.String @JvmName("getTypeName") get() = _builder.getTypeName() @JvmName("setTypeName") set(value) { _builder.setTypeName(value) } /** *
     * For message and enum types, this is the name of the type.  If the name
     * starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
     * rules are used to find the type (i.e. first the nested types within this
     * message are searched, then within the parent, on up to the root
     * namespace).
     * 
* * optional string type_name = 6; */ fun clearTypeName() { _builder.clearTypeName() } /** *
     * For message and enum types, this is the name of the type.  If the name
     * starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
     * rules are used to find the type (i.e. first the nested types within this
     * message are searched, then within the parent, on up to the root
     * namespace).
     * 
* * optional string type_name = 6; * @return Whether the typeName field is set. */ fun hasTypeName(): kotlin.Boolean { return _builder.hasTypeName() } /** *
     * For extensions, this is the name of the type being extended.  It is
     * resolved in the same manner as type_name.
     * 
* * optional string extendee = 2; */ var extendee: kotlin.String @JvmName("getExtendee") get() = _builder.getExtendee() @JvmName("setExtendee") set(value) { _builder.setExtendee(value) } /** *
     * For extensions, this is the name of the type being extended.  It is
     * resolved in the same manner as type_name.
     * 
* * optional string extendee = 2; */ fun clearExtendee() { _builder.clearExtendee() } /** *
     * For extensions, this is the name of the type being extended.  It is
     * resolved in the same manner as type_name.
     * 
* * optional string extendee = 2; * @return Whether the extendee field is set. */ fun hasExtendee(): kotlin.Boolean { return _builder.hasExtendee() } /** *
     * For numeric types, contains the original text representation of the value.
     * For booleans, "true" or "false".
     * For strings, contains the default text contents (not escaped in any way).
     * For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
     * 
* * optional string default_value = 7; */ var defaultValue: kotlin.String @JvmName("getDefaultValue") get() = _builder.getDefaultValue() @JvmName("setDefaultValue") set(value) { _builder.setDefaultValue(value) } /** *
     * For numeric types, contains the original text representation of the value.
     * For booleans, "true" or "false".
     * For strings, contains the default text contents (not escaped in any way).
     * For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
     * 
* * optional string default_value = 7; */ fun clearDefaultValue() { _builder.clearDefaultValue() } /** *
     * For numeric types, contains the original text representation of the value.
     * For booleans, "true" or "false".
     * For strings, contains the default text contents (not escaped in any way).
     * For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
     * 
* * optional string default_value = 7; * @return Whether the defaultValue field is set. */ fun hasDefaultValue(): kotlin.Boolean { return _builder.hasDefaultValue() } /** *
     * If set, gives the index of a oneof in the containing type's oneof_decl
     * list.  This field is a member of that oneof.
     * 
* * optional int32 oneof_index = 9; */ var oneofIndex: kotlin.Int @JvmName("getOneofIndex") get() = _builder.getOneofIndex() @JvmName("setOneofIndex") set(value) { _builder.setOneofIndex(value) } /** *
     * If set, gives the index of a oneof in the containing type's oneof_decl
     * list.  This field is a member of that oneof.
     * 
* * optional int32 oneof_index = 9; */ fun clearOneofIndex() { _builder.clearOneofIndex() } /** *
     * If set, gives the index of a oneof in the containing type's oneof_decl
     * list.  This field is a member of that oneof.
     * 
* * optional int32 oneof_index = 9; * @return Whether the oneofIndex field is set. */ fun hasOneofIndex(): kotlin.Boolean { return _builder.hasOneofIndex() } /** *
     * JSON name of this field. The value is set by protocol compiler. If the
     * user has set a "json_name" option on this field, that option's value
     * will be used. Otherwise, it's deduced from the field's name by converting
     * it to camelCase.
     * 
* * optional string json_name = 10; */ var jsonName: kotlin.String @JvmName("getJsonName") get() = _builder.getJsonName() @JvmName("setJsonName") set(value) { _builder.setJsonName(value) } /** *
     * JSON name of this field. The value is set by protocol compiler. If the
     * user has set a "json_name" option on this field, that option's value
     * will be used. Otherwise, it's deduced from the field's name by converting
     * it to camelCase.
     * 
* * optional string json_name = 10; */ fun clearJsonName() { _builder.clearJsonName() } /** *
     * JSON name of this field. The value is set by protocol compiler. If the
     * user has set a "json_name" option on this field, that option's value
     * will be used. Otherwise, it's deduced from the field's name by converting
     * it to camelCase.
     * 
* * optional string json_name = 10; * @return Whether the jsonName field is set. */ fun hasJsonName(): kotlin.Boolean { return _builder.hasJsonName() } /** * optional .google.protobuf.FieldOptions options = 8; */ var options: com.google.protobuf.DescriptorProtos.FieldOptions @JvmName("getOptions") get() = _builder.getOptions() @JvmName("setOptions") set(value) { _builder.setOptions(value) } /** * optional .google.protobuf.FieldOptions options = 8; */ fun clearOptions() { _builder.clearOptions() } /** * optional .google.protobuf.FieldOptions options = 8; * @return Whether the options field is set. */ fun hasOptions(): kotlin.Boolean { return _builder.hasOptions() } val FieldDescriptorProtoKt.Dsl.optionsOrNull: com.google.protobuf.DescriptorProtos.FieldOptions? get() = _builder.optionsOrNull /** *
     * If true, this is a proto3 "optional". When a proto3 field is optional, it
     * tracks presence regardless of field type.
     * When proto3_optional is true, this field must be belong to a oneof to
     * signal to old proto3 clients that presence is tracked for this field. This
     * oneof is known as a "synthetic" oneof, and this field must be its sole
     * member (each proto3 optional field gets its own synthetic oneof). Synthetic
     * oneofs exist in the descriptor only, and do not generate any API. Synthetic
     * oneofs must be ordered after all "real" oneofs.
     * For message fields, proto3_optional doesn't create any semantic change,
     * since non-repeated message fields always track presence. However it still
     * indicates the semantic detail of whether the user wrote "optional" or not.
     * This can be useful for round-tripping the .proto file. For consistency we
     * give message fields a synthetic oneof also, even though it is not required
     * to track presence. This is especially important because the parser can't
     * tell if a field is a message or an enum, so it must always create a
     * synthetic oneof.
     * Proto2 optional fields do not set this flag, because they already indicate
     * optional with `LABEL_OPTIONAL`.
     * 
* * optional bool proto3_optional = 17; */ var proto3Optional: kotlin.Boolean @JvmName("getProto3Optional") get() = _builder.getProto3Optional() @JvmName("setProto3Optional") set(value) { _builder.setProto3Optional(value) } /** *
     * If true, this is a proto3 "optional". When a proto3 field is optional, it
     * tracks presence regardless of field type.
     * When proto3_optional is true, this field must be belong to a oneof to
     * signal to old proto3 clients that presence is tracked for this field. This
     * oneof is known as a "synthetic" oneof, and this field must be its sole
     * member (each proto3 optional field gets its own synthetic oneof). Synthetic
     * oneofs exist in the descriptor only, and do not generate any API. Synthetic
     * oneofs must be ordered after all "real" oneofs.
     * For message fields, proto3_optional doesn't create any semantic change,
     * since non-repeated message fields always track presence. However it still
     * indicates the semantic detail of whether the user wrote "optional" or not.
     * This can be useful for round-tripping the .proto file. For consistency we
     * give message fields a synthetic oneof also, even though it is not required
     * to track presence. This is especially important because the parser can't
     * tell if a field is a message or an enum, so it must always create a
     * synthetic oneof.
     * Proto2 optional fields do not set this flag, because they already indicate
     * optional with `LABEL_OPTIONAL`.
     * 
* * optional bool proto3_optional = 17; */ fun clearProto3Optional() { _builder.clearProto3Optional() } /** *
     * If true, this is a proto3 "optional". When a proto3 field is optional, it
     * tracks presence regardless of field type.
     * When proto3_optional is true, this field must be belong to a oneof to
     * signal to old proto3 clients that presence is tracked for this field. This
     * oneof is known as a "synthetic" oneof, and this field must be its sole
     * member (each proto3 optional field gets its own synthetic oneof). Synthetic
     * oneofs exist in the descriptor only, and do not generate any API. Synthetic
     * oneofs must be ordered after all "real" oneofs.
     * For message fields, proto3_optional doesn't create any semantic change,
     * since non-repeated message fields always track presence. However it still
     * indicates the semantic detail of whether the user wrote "optional" or not.
     * This can be useful for round-tripping the .proto file. For consistency we
     * give message fields a synthetic oneof also, even though it is not required
     * to track presence. This is especially important because the parser can't
     * tell if a field is a message or an enum, so it must always create a
     * synthetic oneof.
     * Proto2 optional fields do not set this flag, because they already indicate
     * optional with `LABEL_OPTIONAL`.
     * 
* * optional bool proto3_optional = 17; * @return Whether the proto3Optional field is set. */ fun hasProto3Optional(): kotlin.Boolean { return _builder.hasProto3Optional() } } } @kotlin.jvm.JvmSynthetic inline fun com.google.protobuf.DescriptorProtos.FieldDescriptorProto.copy(block: com.google.protobuf.FieldDescriptorProtoKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.FieldDescriptorProto = com.google.protobuf.FieldDescriptorProtoKt.Dsl._create(this.toBuilder()).apply { block() }._build() val com.google.protobuf.DescriptorProtos.FieldDescriptorProtoOrBuilder.optionsOrNull: com.google.protobuf.DescriptorProtos.FieldOptions? get() = if (hasOptions()) getOptions() else null




© 2015 - 2025 Weber Informatics LLC | Privacy Policy