func (client *Client) UpdateStreamRuleContext(
	ctx context.Context, rule *graylog.StreamRule,
) (*ErrorInfo, error) {
	// PUT /streams/{streamid}/rules/{streamRuleID} Update a stream rule
	if rule == nil {
		return nil, errors.New("rule is required")
	}
	if rule.StreamID == "" {
		return nil, errors.New("streamID is empty")
	}
	if rule.ID == "" {
		return nil, errors.New("streamRuleID is empty")
	}
	u, err := client.Endpoints().StreamRule(rule.StreamID, rule.ID)
	if err != nil {
		return nil, err
	}
	cr := *rule
	cr.StreamID = ""
	cr.ID = ""
	return client.callPut(ctx, u.String(), &cr, nil)
}
// UpdateStreamRuleContext updates a stream rule
UpdateStreamRuleContext updates a stream rule
// UpdateStreamRuleContext updates a stream rule
func (client *Client) UpdateStreamRuleContext(
	ctx context.Context, rule *graylog.StreamRule,
) (*ErrorInfo, error) {
	if rule == nil {
		return nil, errors.New("rule is required")
	}
	if rule.StreamID == "" {
		return nil, errors.New("streamID is empty")
	}
	if rule.ID == "" {
		return nil, errors.New("streamRuleID is empty")
	}
	u, err := client.Endpoints().StreamRule(rule.StreamID, rule.ID)
	if err != nil {
		return nil, err
	}
	cr := *rule
	cr.StreamID = ""
	cr.ID = ""
	return client.callPut(ctx, u.String(), &cr, nil)
}
func ( client * Client ) UpdateStreamRuleContext ( ctx context . Context , rule * graylog . StreamRule , ) ( * ErrorInfo , error ) { if rule == nil { return nil , errors . New ( " " ) } if rule . StreamID == " " { return nil , errors . New ( " " ) } if rule . ID == " " { return nil , errors . New ( " " ) } u , err := client . Endpoints ( ) . StreamRule ( rule . StreamID , rule . ID ) if err != nil { return nil , err } cr := * rule cr . StreamID = " " cr . ID = " " return client . callPut ( ctx , u . String ( ) , & cr , nil ) }
UpdateStreamRuleContext updates a stream rule
UpdateStreamRuleContext updates a stream rule
// PUT /streams/{streamid}/rules/{streamRuleID} Update a stream rule