LCOV - code coverage report
Current view: top level - crypto/tron/repositories/rpc/core - any.pb.dart (source / functions) Coverage Total Hit
Test: lcov.info Lines: 44.2 % 43 19
Test Date: 2025-06-07 01:20:49 Functions: - 0 0

            Line data    Source code
       1              : //
       2              : //  Generated code. Do not modify.
       3              : //  source: google/protobuf/any.proto
       4              : //
       5              : // @dart = 2.12
       6              : 
       7              : // ignore_for_file: annotate_overrides, camel_case_types, comment_references
       8              : // ignore_for_file: constant_identifier_names, library_prefixes
       9              : // ignore_for_file: non_constant_identifier_names, prefer_final_fields
      10              : // ignore_for_file: unnecessary_import, unnecessary_this, unused_import
      11              : 
      12              : import 'dart:core' as $core;
      13              : 
      14              : import 'package:protobuf/protobuf.dart' as $pb;
      15              : import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
      16              : 
      17              : ///  `Any` contains an arbitrary serialized protocol buffer message along with a
      18              : ///  URL that describes the type of the serialized message.
      19              : ///
      20              : ///  Protobuf library provides support to pack/unpack Any values in the form
      21              : ///  of utility functions or additional generated methods of the Any type.
      22              : ///
      23              : ///  Example 1: Pack and unpack a message in C++.
      24              : ///
      25              : ///      Foo foo = ...;
      26              : ///      Any any;
      27              : ///      any.PackFrom(foo);
      28              : ///      ...
      29              : ///      if (any.UnpackTo(&foo)) {
      30              : ///        ...
      31              : ///      }
      32              : ///
      33              : ///  Example 2: Pack and unpack a message in Java.
      34              : ///
      35              : ///      Foo foo = ...;
      36              : ///      Any any = Any.pack(foo);
      37              : ///      ...
      38              : ///      if (any.is(Foo.class)) {
      39              : ///        foo = any.unpack(Foo.class);
      40              : ///      }
      41              : ///      // or ...
      42              : ///      if (any.isSameTypeAs(Foo.getDefaultInstance())) {
      43              : ///        foo = any.unpack(Foo.getDefaultInstance());
      44              : ///      }
      45              : ///
      46              : ///   Example 3: Pack and unpack a message in Python.
      47              : ///
      48              : ///      foo = Foo(...)
      49              : ///      any = Any()
      50              : ///      any.Pack(foo)
      51              : ///      ...
      52              : ///      if any.Is(Foo.DESCRIPTOR):
      53              : ///        any.Unpack(foo)
      54              : ///        ...
      55              : ///
      56              : ///   Example 4: Pack and unpack a message in Go
      57              : ///
      58              : ///       foo := &pb.Foo{...}
      59              : ///       any, err := anypb.New(foo)
      60              : ///       if err != nil {
      61              : ///         ...
      62              : ///       }
      63              : ///       ...
      64              : ///       foo := &pb.Foo{}
      65              : ///       if err := any.UnmarshalTo(foo); err != nil {
      66              : ///         ...
      67              : ///       }
      68              : ///
      69              : ///  The pack methods provided by protobuf library will by default use
      70              : ///  'type.googleapis.com/full.type.name' as the type URL and the unpack
      71              : ///  methods only use the fully qualified type name after the last '/'
      72              : ///  in the type URL, for example "foo.bar.com/x/y.z" will yield type
      73              : ///  name "y.z".
      74              : ///
      75              : ///  JSON
      76              : ///  ====
      77              : ///  The JSON representation of an `Any` value uses the regular
      78              : ///  representation of the deserialized, embedded message, with an
      79              : ///  additional field `@type` which contains the type URL. Example:
      80              : ///
      81              : ///      package google.profile;
      82              : ///      message Person {
      83              : ///        string first_name = 1;
      84              : ///        string last_name = 2;
      85              : ///      }
      86              : ///
      87              : ///      {
      88              : ///        "@type": "type.googleapis.com/google.profile.Person",
      89              : ///        "firstName": <string>,
      90              : ///        "lastName": <string>
      91              : ///      }
      92              : ///
      93              : ///  If the embedded message type is well-known and has a custom JSON
      94              : ///  representation, that representation will be embedded adding a field
      95              : ///  `value` which holds the custom JSON in addition to the `@type`
      96              : ///  field. Example (for message [google.protobuf.Duration][]):
      97              : ///
      98              : ///      {
      99              : ///        "@type": "type.googleapis.com/google.protobuf.Duration",
     100              : ///        "value": "1.212s"
     101              : ///      }
     102              : class Any extends $pb.GeneratedMessage with $mixin.AnyMixin {
     103            0 :   factory Any({
     104              :     $core.String? typeUrl,
     105              :     $core.List<$core.int>? value,
     106              :   }) {
     107            0 :     final result = create();
     108              :     if (typeUrl != null) {
     109            0 :       result.typeUrl = typeUrl;
     110              :     }
     111              :     if (value != null) {
     112            0 :       result.value = value;
     113              :     }
     114              :     return result;
     115              :   }
     116            4 :   Any._() : super();
     117            0 :   factory Any.fromBuffer($core.List<$core.int> i,
     118              :           [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
     119            0 :       create()..mergeFromBuffer(i, r);
     120            0 :   factory Any.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
     121            0 :       create()..mergeFromJson(i, r);
     122              : 
     123            6 :   static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Any',
     124              :       package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'),
     125              :       createEmptyInstance: create,
     126              :       toProto3Json: $mixin.AnyMixin.toProto3JsonHelper,
     127              :       fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper)
     128            2 :     ..aOS(1, _omitFieldNames ? '' : 'typeUrl')
     129            2 :     ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY)
     130            2 :     ..hasRequiredFields = false;
     131              : 
     132            0 :   @$core.Deprecated('Using this can add significant overhead to your binary. '
     133              :       'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
     134              :       'Will be removed in next major version')
     135            0 :   Any clone() => Any()..mergeFromMessage(this);
     136            0 :   @$core.Deprecated('Using this can add significant overhead to your binary. '
     137              :       'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
     138              :       'Will be removed in next major version')
     139              :   Any copyWith(void Function(Any) updates) =>
     140            0 :       super.copyWith((message) => updates(message as Any)) as Any;
     141              : 
     142            4 :   $pb.BuilderInfo get info_ => _i;
     143              : 
     144            2 :   @$core.pragma('dart2js:noInline')
     145            2 :   static Any create() => Any._();
     146            0 :   Any createEmptyInstance() => create();
     147            0 :   static $pb.PbList<Any> createRepeated() => $pb.PbList<Any>();
     148            0 :   @$core.pragma('dart2js:noInline')
     149            0 :   static Any getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Any>(create);
     150              :   static Any? _defaultInstance;
     151              : 
     152              :   ///  A URL/resource name that uniquely identifies the type of the serialized
     153              :   ///  protocol buffer message. This string must contain at least
     154              :   ///  one "/" character. The last segment of the URL's path must represent
     155              :   ///  the fully qualified name of the type (as in
     156              :   ///  `path/google.protobuf.Duration`). The name should be in a canonical form
     157              :   ///  (e.g., leading "." is not accepted).
     158              :   ///
     159              :   ///  In practice, teams usually precompile into the binary all types that they
     160              :   ///  expect it to use in the context of Any. However, for URLs which use the
     161              :   ///  scheme `http`, `https`, or no scheme, one can optionally set up a type
     162              :   ///  server that maps type URLs to message definitions as follows:
     163              :   ///
     164              :   ///  * If no scheme is provided, `https` is assumed.
     165              :   ///  * An HTTP GET on the URL must yield a [google.protobuf.Type][]
     166              :   ///    value in binary format, or produce an error.
     167              :   ///  * Applications are allowed to cache lookup results based on the
     168              :   ///    URL, or have them precompiled into a binary to avoid any
     169              :   ///    lookup. Therefore, binary compatibility needs to be preserved
     170              :   ///    on changes to types. (Use versioned type names to manage
     171              :   ///    breaking changes.)
     172              :   ///
     173              :   ///  Note: this functionality is not currently available in the official
     174              :   ///  protobuf release, and it is not used for type URLs beginning with
     175              :   ///  type.googleapis.com. As of May 2023, there are no widely used type server
     176              :   ///  implementations and no plans to implement one.
     177              :   ///
     178              :   ///  Schemes other than `http`, `https` (or the empty scheme) might be
     179              :   ///  used with implementation specific semantics.
     180            2 :   @$pb.TagNumber(1)
     181            2 :   $core.String get typeUrl => $_getSZ(0);
     182            1 :   @$pb.TagNumber(1)
     183              :   set typeUrl($core.String v) {
     184            1 :     $_setString(0, v);
     185              :   }
     186              : 
     187            0 :   @$pb.TagNumber(1)
     188            0 :   $core.bool hasTypeUrl() => $_has(0);
     189            0 :   @$pb.TagNumber(1)
     190            0 :   void clearTypeUrl() => clearField(1);
     191              : 
     192              :   /// Must be a valid serialized protocol buffer of the above specified type.
     193            2 :   @$pb.TagNumber(2)
     194            2 :   $core.List<$core.int> get value => $_getN(1);
     195            1 :   @$pb.TagNumber(2)
     196              :   set value($core.List<$core.int> v) {
     197            1 :     $_setBytes(1, v);
     198              :   }
     199              : 
     200            0 :   @$pb.TagNumber(2)
     201            0 :   $core.bool hasValue() => $_has(1);
     202            0 :   @$pb.TagNumber(2)
     203            0 :   void clearValue() => clearField(2);
     204              : 
     205              :   /// Creates a new [Any] encoding [message].
     206              :   ///
     207              :   /// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is
     208              :   /// the fully qualified name of the type of [message].
     209            1 :   static Any pack($pb.GeneratedMessage message,
     210              :       {$core.String typeUrlPrefix = 'type.googleapis.com'}) {
     211            1 :     final result = create();
     212            1 :     $mixin.AnyMixin.packIntoAny(result, message, typeUrlPrefix: typeUrlPrefix);
     213              :     return result;
     214              :   }
     215              : }
     216              : 
     217              : const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
     218              : const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
        

Generated by: LCOV version 2.0-1