Class: Google::Apis::GamesV1::ContentHash

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/games_v1/classes.rb,
generated/google/apis/games_v1/representations.rb,
generated/google/apis/games_v1/representations.rb

Overview

Hash-like weak identifier of uploaded content bytes (saved game data blob, or cover image). Consistent per player per application per hash version. Within the context of a single player/application, it's guaranteed that two identical blobs coming from two different uploads will have the same content hash. It's extremely likely, though not guaranteed, that if two content hashes are equal, the blobs are identical.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ContentHash

Returns a new instance of ContentHash.



666
667
668
# File 'generated/google/apis/games_v1/classes.rb', line 666

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#digestString

Hash-like digest of the content. Corresponds to the JSON property digest

Returns:

  • (String)


659
660
661
# File 'generated/google/apis/games_v1/classes.rb', line 659

def digest
  @digest
end

#versionFixnum

Version of the Hash encoding algorithm to hash the content. Corresponds to the JSON property version

Returns:

  • (Fixnum)


664
665
666
# File 'generated/google/apis/games_v1/classes.rb', line 664

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



671
672
673
674
# File 'generated/google/apis/games_v1/classes.rb', line 671

def update!(**args)
  @digest = args[:digest] if args.key?(:digest)
  @version = args[:version] if args.key?(:version)
end