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.



253
254
255
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 253

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



236
237
238
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 236

def affected_member
  @affected_member
end

#prior_membership_roleString

Corresponds to the JSON property priorMembershipRole

Returns:

  • (String)


241
242
243
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 241

def prior_membership_role
  @prior_membership_role
end

#prior_membership_stateString

Corresponds to the JSON property priorMembershipState

Returns:

  • (String)


246
247
248
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 246

def prior_membership_state
  @prior_membership_state
end

#target_membership_roleString

Corresponds to the JSON property targetMembershipRole

Returns:

  • (String)


251
252
253
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 251

def target_membership_role
  @target_membership_role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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