code: public static final SegmentId decode(final Segment segment) {
          Preconditions.checkNotNull(segment, "segment");
          return createSegmentId(segment.getScope(), segment.getStreamName(), segment.getSegmentId());
      }
docs: Decodes segment and returns an instance of SegmentId.
  
  @param segment The segment.
  @return Instance of SegmentId.