public static Group fromProtobuf()

in src/main/java/org/apache/skywalking/banyandb/v1/client/metadata/Group.java [91:110]


    public static Group fromProtobuf(BanyandbCommon.Group group) {
        Catalog catalog = Catalog.UNSPECIFIED;
        switch (group.getCatalog()) {
            case CATALOG_STREAM:
                catalog = Catalog.STREAM;
                break;
            case CATALOG_MEASURE:
                catalog = Catalog.MEASURE;
                break;
        }
        BanyandbCommon.ResourceOpts opts = group.getResourceOpts();
        return new AutoValue_Group(null,
                group.getMetadata().getName(),
                TimeUtils.parseTimestamp(group.getUpdatedAt()),
                catalog,
                opts == null ? 0 : opts.getShardNum(),
                opts == null ? null : IntervalRule.fromProtobuf(opts.getBlockInterval()),
                opts == null ? null : IntervalRule.fromProtobuf(opts.getSegmentInterval()),
                opts == null ? null : IntervalRule.fromProtobuf(opts.getTtl()));
    }