<commit_before>require 'date'

module MMS

  class Resource::RestoreJob < Resource

    attr_accessor :name
    attr_accessor :cluster

    attr_accessor :snapshot_id
    attr_accessor :created
    attr_accessor :status_name
    attr_accessor :point_in_time
    attr_accessor :delivery_method_name
    attr_accessor :delivery_status_name
    attr_accessor :delivery_url

    def initialize(id, cluster_id, group_id, data = nil)
      @cluster = MMS::Resource::Cluster.new cluster_id, group_id

      super id, data
    end
<commit_msg>Added snapshot_source_name() on restore_job resource<commit_after>require 'date'

module MMS

  class Resource::RestoreJob < Resource

    attr_accessor :name
    attr_accessor :cluster

    attr_accessor :snapshot_id
    attr_accessor :created
    attr_accessor :status_name
    attr_accessor :point_in_time
    attr_accessor :delivery_method_name
    attr_accessor :delivery_status_name
    attr_accessor :delivery_url

    def initialize(id, cluster_id, group_id, data = nil)
      @cluster = MMS::Resource::Cluster.new cluster_id, group_id

      super id, data
    end

    def snapshot_source_name
      snapshot = @cluster.group.findSnapshot(@snapshot_id)
      snapshot.source_name unless snapshot.nil?
    end

{'fraction_non_alphanumeric': 0.06060606060606061, 'fraction_numerical': 0.0, 'mean_word_length': 3.960474308300395, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1340517', 'n_tokens_mistral': 400, 'n_tokens_neox': 393, 'n_words': 90}