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.



21599
21600
21601
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21599

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

Instance Attribute Details

#emailString

Corresponds to the JSON property email

Returns:

  • (String)


21576
21577
21578
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21576

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



21587
21588
21589
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21587

def user
  @user
end

#user_gaia_idFixnum

An unobfuscated gaia ID: Corresponds to the JSON property userGaiaId

Returns:

  • (Fixnum)


21592
21593
21594
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21592

def user_gaia_id
  @user_gaia_id
end

#user_idString

An obfuscated gaia ID: Corresponds to the JSON property userId

Returns:

  • (String)


21597
21598
21599
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21597

def user_id
  @user_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



21604
21605
21606
21607
21608
21609
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21604

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