'Initialize the SegmentMembershipContext
:param Version version: Version that contains the resource
:param service_sid: The service_sid
:param identity: The identity
:param segment: The segment
:returns: twilio.rest.notify.v1.service.user.segment_memberships.SegmentMembershipContext
:rtype: twilio.rest.notify.v1.service.user.segment_memberships.SegmentMembershipContext'

def __init__(self, version, service_sid, identity, segment):

    super(SegmentMembershipContext, self).__init__(version)
    self._solution = {'service_sid': service_sid, 'identity': identity, 'segment': segment}
    self._uri = '/Services/{service_sid}/Users/{identity}/SegmentMemberships/{segment}'.format(**self._solution)
