Class: Google::Apis::CloudsearchV1::GoogleDocsResultInfo

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb

Overview

A message containing information about a specific result. This information is passed to the scorer and beyond; in particular, GWS relies on it to format the result in the UI. Split from GoogleDocsMetadata in case we later want to reuse the message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleDocsResultInfo

Returns a new instance of GoogleDocsResultInfo.



8973
8974
8975
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8973

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

Instance Attribute Details

#attachment_sha1String

The SHA1 hash of the object in Drive, if any. Corresponds to the JSON property attachmentSha1

Returns:

  • (String)


8940
8941
8942
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8940

def attachment_sha1
  @attachment_sha1
end

#cosmo_idGoogle::Apis::CloudsearchV1::Id

Identifies a particular object, including both Users and DirEntries. This Id is unique across the entire server instance, such as the production or qa instance. Corresponds to the JSON property cosmoId



8947
8948
8949
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8947

def cosmo_id
  @cosmo_id
end

#cosmo_name_spaceFixnum

For Cosmo objects, the Cosmo namespace the object was in. This allows downstream clients to identify whether a document was created in Writely or Kix, Presently or Punch, or whether it was uploaded from GDrive. See storage_cosmo.Id.NAME_SPACE for a list of all Cosmo name spaces. Corresponds to the JSON property cosmoNameSpace

Returns:

  • (Fixnum)


8955
8956
8957
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8955

def cosmo_name_space
  @cosmo_name_space
end

#encrypted_idString

The encrypted (user-visible) id of this object. Knowing the id is sufficient to create a canonical URL for this document. Corresponds to the JSON property encryptedId

Returns:

  • (String)


8961
8962
8963
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8961

def encrypted_id
  @encrypted_id
end

#mime_typeString

The mimetype of the document. Corresponds to the JSON property mimeType

Returns:

  • (String)


8966
8967
8968
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8966

def mime_type
  @mime_type
end

#share_scopeGoogle::Apis::CloudsearchV1::ShareScope

The visibility indicator in the UI will be based upon this. Corresponds to the JSON property shareScope



8971
8972
8973
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8971

def share_scope
  @share_scope
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8978
8979
8980
8981
8982
8983
8984
8985
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8978

def update!(**args)
  @attachment_sha1 = args[:attachment_sha1] if args.key?(:attachment_sha1)
  @cosmo_id = args[:cosmo_id] if args.key?(:cosmo_id)
  @cosmo_name_space = args[:cosmo_name_space] if args.key?(:cosmo_name_space)
  @encrypted_id = args[:encrypted_id] if args.key?(:encrypted_id)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
  @share_scope = args[:share_scope] if args.key?(:share_scope)
end