Class: Google::Apis::CloudsearchV1::UserMentionData

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

Person metadata, for USER_MENTION segments. Should always contain at least one of user_gaia_id, user_id, email or user. The exact set of populated fields may differ depending on the context and the level in the serving stack; for example, emails will be elided on the viewing path. But as a general rule, a proto having any one of the four is valid, subject to the standard constraints of the applied annotations -- that is, communication between servers and clients will ignore jspb.ignore fields, and communication between servers and other servers (or between servers and storage) will ignore client_only fields. For more on the annotations, see the comments in social/common/ segment_annotations.proto

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UserMentionData

Returns a new instance of UserMentionData.



21805
21806
21807
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21805

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

Instance Attribute Details

#emailString

Corresponds to the JSON property email

Returns:

  • (String)


21782
21783
21784
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21782

def email
  @email
end

#userGoogle::Apis::CloudsearchV1::PrincipalProto

A Principal represents something to which permissions are assigned, often but not always a user or group of some kind. It is most appropriate for use in ACLs and authorization checks. Callers should prefer to use the wrapper classes in google3/security/credentials/public/principal.h google3/java/com/ google/security/credentials/Principal.java google3/security/credentials/go/ principal.go unless direct proto access is essential. If you update this protocol buffer, please update the wrapper classes as well. LINT.IfChange Corresponds to the JSON property user



21793
21794
21795
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21793

def user
  @user
end

#user_gaia_idFixnum

An unobfuscated gaia ID: Corresponds to the JSON property userGaiaId

Returns:

  • (Fixnum)


21798
21799
21800
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21798

def user_gaia_id
  @user_gaia_id
end

#user_idString

An obfuscated gaia ID: Corresponds to the JSON property userId

Returns:

  • (String)


21803
21804
21805
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21803

def user_id
  @user_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



21810
21811
21812
21813
21814
21815
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21810

def update!(**args)
  @email = args[:email] if args.key?(:email)
  @user = args[:user] if args.key?(:user)
  @user_gaia_id = args[:user_gaia_id] if args.key?(:user_gaia_id)
  @user_id = args[:user_id] if args.key?(:user_id)
end