Class: Google::Apis::CloudsearchV1::AffectedMembership

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

Earlier we used to populate just the affected_members list and inferred the new membership state (roles didn't exist back then) from the Type. go/dynamite- finra required backend to know the previous membership state to reconstruct membership history. The proper solution involved cleaning up up Type enum, but it was used in many, many places. This was added as a stop-gap solution to unblock FINRA without breaking everything. Later role update and target audience update started relying on this to communicate information to clients about what transition happened. So this is now required to be populated and should be in sync with affected_members for new messages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AffectedMembership

Returns a new instance of AffectedMembership.



317
318
319
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 317

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

Instance Attribute Details

#affected_memberGoogle::Apis::CloudsearchV1::MemberId

Eventually this can be updated to a oneOf User, Space (for nested spaces), Bots or Service, as and when these use cases come up. Corresponds to the JSON property affectedMember



300
301
302
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 300

def affected_member
  @affected_member
end

#prior_membership_roleString

Corresponds to the JSON property priorMembershipRole

Returns:

  • (String)


305
306
307
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 305

def prior_membership_role
  @prior_membership_role
end

#prior_membership_stateString

Corresponds to the JSON property priorMembershipState

Returns:

  • (String)


310
311
312
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 310

def prior_membership_state
  @prior_membership_state
end

#target_membership_roleString

Corresponds to the JSON property targetMembershipRole

Returns:

  • (String)


315
316
317
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 315

def target_membership_role
  @target_membership_role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



322
323
324
325
326
327
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 322

def update!(**args)
  @affected_member = args[:affected_member] if args.key?(:affected_member)
  @prior_membership_role = args[:prior_membership_role] if args.key?(:prior_membership_role)
  @prior_membership_state = args[:prior_membership_state] if args.key?(:prior_membership_state)
  @target_membership_role = args[:target_membership_role] if args.key?(:target_membership_role)
end