github.com/twilio/twilio-go@v1.20.1/client/jwt/conversations_grant.go (about)

     1  package jwt
     2  
     3  import "fmt"
     4  
     5  type ConversationsGrant struct {
     6  	ConfigurationProfileSid string `json:"configuration_profile_sid"`
     7  }
     8  
     9  func (conversationsGrant *ConversationsGrant) Key() string {
    10  	return "rtc"
    11  }
    12  
    13  func (conversationsGrant *ConversationsGrant) ToPayload() map[string]interface{} {
    14  	grant := make(map[string]interface{})
    15  
    16  	if conversationsGrant.ConfigurationProfileSid != "" {
    17  		grant["configuration_profile_sid"] = conversationsGrant.ConfigurationProfileSid
    18  	}
    19  
    20  	return grant
    21  }
    22  
    23  func (conversationsGrant *ConversationsGrant) ToString() string {
    24  	return fmt.Sprintf("<%s %s>", "ConversationsGrant", conversationsGrant.ToPayload())
    25  }