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.



272
273
274
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 272

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



255
256
257
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 255

def affected_member
  @affected_member
end

#prior_membership_roleString

Corresponds to the JSON property priorMembershipRole

Returns:

  • (String)


260
261
262
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 260

def prior_membership_role
  @prior_membership_role
end

#prior_membership_stateString

Corresponds to the JSON property priorMembershipState

Returns:

  • (String)


265
266
267
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 265

def prior_membership_state
  @prior_membership_state
end

#target_membership_roleString

Corresponds to the JSON property targetMembershipRole

Returns:

  • (String)


270
271
272
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 270

def target_membership_role
  @target_membership_role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



277
278
279
280
281
282
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 277

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