func (c *DefaultApiService) UpdateRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string, params *UpdateRoomParticipantSubscribeRuleParams) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) {
	path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules"
	path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1)
	path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1)

	data := url.Values{}
	headers := make(map[string]interface{})

	if params != nil && params.Rules != nil {
		v, err := json.Marshal(params.Rules)

		if err != nil {
			return nil, err
		}

		data.Set("Rules", string(v))
	}

	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}

	defer resp.Body.Close()

	ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}

	return ps, err
}
// Update the Subscribe Rules for the Participant
Update the Subscribe Rules for the Participant
// Update the Subscribe Rules for the Participant
func (c *DefaultApiService) UpdateRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string, params *UpdateRoomParticipantSubscribeRuleParams) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) {
	path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules"
	path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1)
	path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.Rules != nil {
		v, err := json.Marshal(params.Rules)
		if err != nil {
			return nil, err
		}
		data.Set("Rules", string(v))
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) UpdateRoomParticipantSubscribeRule ( RoomSid string , ParticipantSid string , params * UpdateRoomParticipantSubscribeRuleParams ) ( * VideoV1RoomRoomParticipantRoomParticipantSubscribeRule , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , RoomSid , - 1 ) path = strings . Replace ( path , " " + " " + " " , ParticipantSid , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . Rules != nil { v , err := json . Marshal ( params . Rules ) if err != nil { return nil , err } data . Set ( " " , string ( v ) ) } resp , err := c . requestHandler . Post ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & VideoV1RoomRoomParticipantRoomParticipantSubscribeRule { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Update the Subscribe Rules for the Participant
Update the Subscribe Rules for the Participant