package platformclientv2 import ( "strings" "fmt" "errors" "net/url" "encoding/json" ) // ConversationsApi provides functions for API endpoints type ConversationsApi struct { Configuration *Configuration } // NewConversationsApi creates an API instance using the default configuration func NewConversationsApi() *ConversationsApi { fmt.Sprintf(strings.Title(""), "") config := GetDefaultConfiguration() return &ConversationsApi{ Configuration: config, } } // NewConversationsApiWithConfig creates an API instance using the provided configuration func NewConversationsApiWithConfig(config *Configuration) *ConversationsApi { return &ConversationsApi{ Configuration: config, } } // DeleteAnalyticsConversationsAggregatesJob invokes DELETE /api/v2/analytics/conversations/aggregates/jobs/{jobId} // // Delete/cancel an async request for conversation aggregates func (a ConversationsApi) DeleteAnalyticsConversationsAggregatesJob(jobId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/aggregates/jobs/{jobId}" path = strings.Replace(path, "{jobId}", url.PathEscape(fmt.Sprintf("%v", jobId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'jobId' is set if &jobId == nil { // false return nil, errors.New("Missing required parameter 'jobId' when calling ConversationsApi->DeleteAnalyticsConversationsAggregatesJob") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteAnalyticsConversationsDetailsJob invokes DELETE /api/v2/analytics/conversations/details/jobs/{jobId} // // Delete/cancel an async details job func (a ConversationsApi) DeleteAnalyticsConversationsDetailsJob(jobId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/details/jobs/{jobId}" path = strings.Replace(path, "{jobId}", url.PathEscape(fmt.Sprintf("%v", jobId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'jobId' is set if &jobId == nil { // false return nil, errors.New("Missing required parameter 'jobId' when calling ConversationsApi->DeleteAnalyticsConversationsDetailsJob") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversation invokes DELETE /api/v2/conversations/{conversationId} // // Update a conversation by disconnecting all of the participants func (a ConversationsApi) DeleteConversation(conversationId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->DeleteConversation") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationCustomattribute invokes DELETE /api/v2/conversations/{conversationId}/customattributes/{attributesId} // // Delete a custom attributes record. func (a ConversationsApi) DeleteConversationCustomattribute(conversationId string, attributesId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/customattributes/{attributesId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{attributesId}", url.PathEscape(fmt.Sprintf("%v", attributesId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->DeleteConversationCustomattribute") } // verify the required parameter 'attributesId' is set if &attributesId == nil { // false return nil, errors.New("Missing required parameter 'attributesId' when calling ConversationsApi->DeleteConversationCustomattribute") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationParticipantCode invokes DELETE /api/v2/conversations/{conversationId}/participants/{participantId}/codes/{addCommunicationCode} // // Delete a code used to add a communication to this participant func (a ConversationsApi) DeleteConversationParticipantCode(conversationId string, participantId string, addCommunicationCode string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/codes/{addCommunicationCode}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{addCommunicationCode}", url.PathEscape(fmt.Sprintf("%v", addCommunicationCode)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->DeleteConversationParticipantCode") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->DeleteConversationParticipantCode") } // verify the required parameter 'addCommunicationCode' is set if &addCommunicationCode == nil { // false return nil, errors.New("Missing required parameter 'addCommunicationCode' when calling ConversationsApi->DeleteConversationParticipantCode") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationParticipantFlaggedreason invokes DELETE /api/v2/conversations/{conversationId}/participants/{participantId}/flaggedreason // // Remove flagged reason from conversation participant. func (a ConversationsApi) DeleteConversationParticipantFlaggedreason(conversationId string, participantId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/flaggedreason" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->DeleteConversationParticipantFlaggedreason") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->DeleteConversationParticipantFlaggedreason") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsCallParticipantCommunicationPostflowaction invokes DELETE /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/postflowaction // // Remove mandatory post call actions. func (a ConversationsApi) DeleteConversationsCallParticipantCommunicationPostflowaction(conversationId string, participantId string, communicationId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/postflowaction" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->DeleteConversationsCallParticipantCommunicationPostflowaction") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->DeleteConversationsCallParticipantCommunicationPostflowaction") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->DeleteConversationsCallParticipantCommunicationPostflowaction") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsCallParticipantConsult invokes DELETE /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult // // Cancel the transfer func (a ConversationsApi) DeleteConversationsCallParticipantConsult(conversationId string, participantId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->DeleteConversationsCallParticipantConsult") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->DeleteConversationsCallParticipantConsult") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsEmailMessagesDraftAttachment invokes DELETE /api/v2/conversations/emails/{conversationId}/messages/draft/attachments/{attachmentId} // // Delete attachment from draft func (a ConversationsApi) DeleteConversationsEmailMessagesDraftAttachment(conversationId string, attachmentId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages/draft/attachments/{attachmentId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{attachmentId}", url.PathEscape(fmt.Sprintf("%v", attachmentId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->DeleteConversationsEmailMessagesDraftAttachment") } // verify the required parameter 'attachmentId' is set if &attachmentId == nil { // false return nil, errors.New("Missing required parameter 'attachmentId' when calling ConversationsApi->DeleteConversationsEmailMessagesDraftAttachment") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagesCachedmediaCachedMediaItemId invokes DELETE /api/v2/conversations/messages/cachedmedia/{cachedMediaItemId} // // Remove a cached media item asychronously func (a ConversationsApi) DeleteConversationsMessagesCachedmediaCachedMediaItemId(cachedMediaItemId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/cachedmedia/{cachedMediaItemId}" path = strings.Replace(path, "{cachedMediaItemId}", url.PathEscape(fmt.Sprintf("%v", cachedMediaItemId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'cachedMediaItemId' is set if &cachedMediaItemId == nil { // false return nil, errors.New("Missing required parameter 'cachedMediaItemId' when calling ConversationsApi->DeleteConversationsMessagesCachedmediaCachedMediaItemId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingIntegrationsAppleIntegrationId invokes DELETE /api/v2/conversations/messaging/integrations/apple/{integrationId} // // Delete an Apple messaging integration func (a ConversationsApi) DeleteConversationsMessagingIntegrationsAppleIntegrationId(integrationId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/apple/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->DeleteConversationsMessagingIntegrationsAppleIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingIntegrationsFacebookIntegrationId invokes DELETE /api/v2/conversations/messaging/integrations/facebook/{integrationId} // // Delete a Facebook messaging integration func (a ConversationsApi) DeleteConversationsMessagingIntegrationsFacebookIntegrationId(integrationId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/facebook/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->DeleteConversationsMessagingIntegrationsFacebookIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingIntegrationsInstagramIntegrationId invokes DELETE /api/v2/conversations/messaging/integrations/instagram/{integrationId} // // Delete Instagram messaging integration func (a ConversationsApi) DeleteConversationsMessagingIntegrationsInstagramIntegrationId(integrationId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/instagram/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->DeleteConversationsMessagingIntegrationsInstagramIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId invokes DELETE /api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/{integrationId} // // Delete an Open messaging integration with the Google Business Profile extension // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. // // Preview: DeleteConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) DeleteConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId(integrationId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->DeleteConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingIntegrationsOpenIntegrationId invokes DELETE /api/v2/conversations/messaging/integrations/open/{integrationId} // // Delete an Open messaging integration // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. func (a ConversationsApi) DeleteConversationsMessagingIntegrationsOpenIntegrationId(integrationId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->DeleteConversationsMessagingIntegrationsOpenIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingIntegrationsTwitterIntegrationId invokes DELETE /api/v2/conversations/messaging/integrations/twitter/{integrationId} // // Delete Twitter messaging integration func (a ConversationsApi) DeleteConversationsMessagingIntegrationsTwitterIntegrationId(integrationId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/twitter/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->DeleteConversationsMessagingIntegrationsTwitterIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingIntegrationsWhatsappIntegrationId invokes DELETE /api/v2/conversations/messaging/integrations/whatsapp/{integrationId} // // Delete a WhatsApp messaging integration func (a ConversationsApi) DeleteConversationsMessagingIntegrationsWhatsappIntegrationId(integrationId string) (*Whatsappintegration, *APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/whatsapp/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Whatsappintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->DeleteConversationsMessagingIntegrationsWhatsappIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Whatsappintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // DeleteConversationsMessagingSetting invokes DELETE /api/v2/conversations/messaging/settings/{messageSettingId} // // Delete a messaging setting func (a ConversationsApi) DeleteConversationsMessagingSetting(messageSettingId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/settings/{messageSettingId}" path = strings.Replace(path, "{messageSettingId}", url.PathEscape(fmt.Sprintf("%v", messageSettingId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'messageSettingId' is set if &messageSettingId == nil { // false return nil, errors.New("Missing required parameter 'messageSettingId' when calling ConversationsApi->DeleteConversationsMessagingSetting") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingSettingsDefault invokes DELETE /api/v2/conversations/messaging/settings/default // // Delete the organization's default setting, a global default will be applied to integrations without settings // // When an integration is created a settings ID may be assigned to it. If the settings ID is not supplied, the default settings will be assigned to it. func (a ConversationsApi) DeleteConversationsMessagingSettingsDefault() (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/settings/default" if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // DeleteConversationsMessagingSupportedcontentSupportedContentId invokes DELETE /api/v2/conversations/messaging/supportedcontent/{supportedContentId} // // Delete a supported content profile func (a ConversationsApi) DeleteConversationsMessagingSupportedcontentSupportedContentId(supportedContentId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/supportedcontent/{supportedContentId}" path = strings.Replace(path, "{supportedContentId}", url.PathEscape(fmt.Sprintf("%v", supportedContentId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'supportedContentId' is set if &supportedContentId == nil { // false return nil, errors.New("Missing required parameter 'supportedContentId' when calling ConversationsApi->DeleteConversationsMessagingSupportedcontentSupportedContentId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // GetAnalyticsConversationDetails invokes GET /api/v2/analytics/conversations/{conversationId}/details // // Get a conversation by id func (a ConversationsApi) GetAnalyticsConversationDetails(conversationId string) (*Analyticsconversationwithoutattributes, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/{conversationId}/details" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Analyticsconversationwithoutattributes) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetAnalyticsConversationDetails") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Analyticsconversationwithoutattributes response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Analyticsconversationwithoutattributes" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetAnalyticsConversationsAggregatesJob invokes GET /api/v2/analytics/conversations/aggregates/jobs/{jobId} // // Get status for async query for conversation aggregates func (a ConversationsApi) GetAnalyticsConversationsAggregatesJob(jobId string) (*Asyncquerystatus, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/aggregates/jobs/{jobId}" path = strings.Replace(path, "{jobId}", url.PathEscape(fmt.Sprintf("%v", jobId)), -1) defaultReturn := new(Asyncquerystatus) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'jobId' is set if &jobId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'jobId' when calling ConversationsApi->GetAnalyticsConversationsAggregatesJob") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Asyncquerystatus response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Asyncquerystatus" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetAnalyticsConversationsAggregatesJobResults invokes GET /api/v2/analytics/conversations/aggregates/jobs/{jobId}/results // // Fetch a page of results for an async aggregates query func (a ConversationsApi) GetAnalyticsConversationsAggregatesJobResults(jobId string, cursor string) (*Conversationasyncaggregatequeryresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/aggregates/jobs/{jobId}/results" path = strings.Replace(path, "{jobId}", url.PathEscape(fmt.Sprintf("%v", jobId)), -1) defaultReturn := new(Conversationasyncaggregatequeryresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'jobId' is set if &jobId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'jobId' when calling ConversationsApi->GetAnalyticsConversationsAggregatesJobResults") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["cursor"] = a.Configuration.APIClient.ParameterToString(cursor, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationasyncaggregatequeryresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationasyncaggregatequeryresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetAnalyticsConversationsDetails invokes GET /api/v2/analytics/conversations/details // // Gets multiple conversations by id func (a ConversationsApi) GetAnalyticsConversationsDetails(id []string) (*Analyticsconversationwithoutattributesmultigetresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/details" defaultReturn := new(Analyticsconversationwithoutattributesmultigetresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["id"] = a.Configuration.APIClient.ParameterToString(id, "multi") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Analyticsconversationwithoutattributesmultigetresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Analyticsconversationwithoutattributesmultigetresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetAnalyticsConversationsDetailsJob invokes GET /api/v2/analytics/conversations/details/jobs/{jobId} // // Get status for async query for conversation details func (a ConversationsApi) GetAnalyticsConversationsDetailsJob(jobId string) (*Asyncquerystatus, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/details/jobs/{jobId}" path = strings.Replace(path, "{jobId}", url.PathEscape(fmt.Sprintf("%v", jobId)), -1) defaultReturn := new(Asyncquerystatus) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'jobId' is set if &jobId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'jobId' when calling ConversationsApi->GetAnalyticsConversationsDetailsJob") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Asyncquerystatus response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Asyncquerystatus" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetAnalyticsConversationsDetailsJobResults invokes GET /api/v2/analytics/conversations/details/jobs/{jobId}/results // // Fetch a page of results for an async details job func (a ConversationsApi) GetAnalyticsConversationsDetailsJobResults(jobId string, cursor string, pageSize int) (*Analyticsconversationasyncqueryresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/details/jobs/{jobId}/results" path = strings.Replace(path, "{jobId}", url.PathEscape(fmt.Sprintf("%v", jobId)), -1) defaultReturn := new(Analyticsconversationasyncqueryresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'jobId' is set if &jobId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'jobId' when calling ConversationsApi->GetAnalyticsConversationsDetailsJobResults") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["cursor"] = a.Configuration.APIClient.ParameterToString(cursor, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Analyticsconversationasyncqueryresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Analyticsconversationasyncqueryresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetAnalyticsConversationsDetailsJobsAvailability invokes GET /api/v2/analytics/conversations/details/jobs/availability // // Lookup the datalake availability date and time func (a ConversationsApi) GetAnalyticsConversationsDetailsJobsAvailability() (*Dataavailabilityresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/details/jobs/availability" defaultReturn := new(Dataavailabilityresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Dataavailabilityresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Dataavailabilityresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversation invokes GET /api/v2/conversations/{conversationId} // // Get conversation func (a ConversationsApi) GetConversation(conversationId string) (*Conversation, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversation") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationAccessattributes invokes GET /api/v2/conversations/{conversationId}/accessattributes // // Get the access attributes on a conversation. // // Preview: GetConversationAccessattributes is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) GetConversationAccessattributes(conversationId string) (*Conversationaccessattributesresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/accessattributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversationaccessattributesresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationAccessattributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationaccessattributesresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationaccessattributesresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationAssistantCopilotcontext invokes GET /api/v2/conversations/{conversationId}/assistant/copilotcontext // // Get copilot context values for a conversation. // // Preview: GetConversationAssistantCopilotcontext is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) GetConversationAssistantCopilotcontext(conversationId string) (*Copilotcontextvalues, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/assistant/copilotcontext" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Copilotcontextvalues) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationAssistantCopilotcontext") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Copilotcontextvalues response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Copilotcontextvalues" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationCommunicationAgentchecklist invokes GET /api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId} // // Get checklist info for a single checklist. func (a ConversationsApi) GetConversationCommunicationAgentchecklist(conversationId string, communicationId string, agentChecklistId string) (*Agentchecklistresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) path = strings.Replace(path, "{agentChecklistId}", url.PathEscape(fmt.Sprintf("%v", agentChecklistId)), -1) defaultReturn := new(Agentchecklistresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationCommunicationAgentchecklist") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationCommunicationAgentchecklist") } // verify the required parameter 'agentChecklistId' is set if &agentChecklistId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'agentChecklistId' when calling ConversationsApi->GetConversationCommunicationAgentchecklist") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Agentchecklistresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Agentchecklistresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationCommunicationAgentchecklistJob invokes GET /api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId}/jobs/{jobId} // // Get inference job status func (a ConversationsApi) GetConversationCommunicationAgentchecklistJob(conversationId string, communicationId string, agentChecklistId string, jobId string) (*Checklistinferencejobresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId}/jobs/{jobId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) path = strings.Replace(path, "{agentChecklistId}", url.PathEscape(fmt.Sprintf("%v", agentChecklistId)), -1) path = strings.Replace(path, "{jobId}", url.PathEscape(fmt.Sprintf("%v", jobId)), -1) defaultReturn := new(Checklistinferencejobresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationCommunicationAgentchecklistJob") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationCommunicationAgentchecklistJob") } // verify the required parameter 'agentChecklistId' is set if &agentChecklistId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'agentChecklistId' when calling ConversationsApi->GetConversationCommunicationAgentchecklistJob") } // verify the required parameter 'jobId' is set if &jobId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'jobId' when calling ConversationsApi->GetConversationCommunicationAgentchecklistJob") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Checklistinferencejobresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Checklistinferencejobresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationCommunicationAgentchecklists invokes GET /api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists // // Get information of all checklists associated with a conversation. func (a ConversationsApi) GetConversationCommunicationAgentchecklists(conversationId string, communicationId string) (*Agentchecklistresponselist, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Agentchecklistresponselist) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationCommunicationAgentchecklists") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationCommunicationAgentchecklists") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Agentchecklistresponselist response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Agentchecklistresponselist" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationCommunicationInternalmessage invokes GET /api/v2/conversations/{conversationId}/communications/{communicationId}/internalmessages/{messageId} // // Get message func (a ConversationsApi) GetConversationCommunicationInternalmessage(conversationId string, communicationId string, messageId string) (*Internalmessagedata, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/internalmessages/{messageId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) path = strings.Replace(path, "{messageId}", url.PathEscape(fmt.Sprintf("%v", messageId)), -1) defaultReturn := new(Internalmessagedata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationCommunicationInternalmessage") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationCommunicationInternalmessage") } // verify the required parameter 'messageId' is set if &messageId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'messageId' when calling ConversationsApi->GetConversationCommunicationInternalmessage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Internalmessagedata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Internalmessagedata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationCommunicationInternalmessages invokes GET /api/v2/conversations/{conversationId}/communications/{communicationId}/internalmessages // // Get messages for communication func (a ConversationsApi) GetConversationCommunicationInternalmessages(conversationId string, communicationId string, pageSize int, pageNumber int) (*Internalmessagedataentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/internalmessages" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Internalmessagedataentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationCommunicationInternalmessages") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationCommunicationInternalmessages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Internalmessagedataentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Internalmessagedataentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationCustomattribute invokes GET /api/v2/conversations/{conversationId}/customattributes/{attributesId} // // Get custom attributes by id func (a ConversationsApi) GetConversationCustomattribute(conversationId string, attributesId string) (*Customattributes, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/customattributes/{attributesId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{attributesId}", url.PathEscape(fmt.Sprintf("%v", attributesId)), -1) defaultReturn := new(Customattributes) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationCustomattribute") } // verify the required parameter 'attributesId' is set if &attributesId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'attributesId' when calling ConversationsApi->GetConversationCustomattribute") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Customattributes response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Customattributes" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationCustomattributes invokes GET /api/v2/conversations/{conversationId}/customattributes // // Get a list of custom attributes for a conversation. func (a ConversationsApi) GetConversationCustomattributes(conversationId string) (*Customattributeslisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/customattributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Customattributeslisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationCustomattributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Customattributeslisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Customattributeslisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationParticipantSecureivrsession invokes GET /api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions/{secureSessionId} // // Fetch info on a secure session func (a ConversationsApi) GetConversationParticipantSecureivrsession(conversationId string, participantId string, secureSessionId string) (*Securesession, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions/{secureSessionId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{secureSessionId}", url.PathEscape(fmt.Sprintf("%v", secureSessionId)), -1) defaultReturn := new(Securesession) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationParticipantSecureivrsession") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationParticipantSecureivrsession") } // verify the required parameter 'secureSessionId' is set if &secureSessionId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'secureSessionId' when calling ConversationsApi->GetConversationParticipantSecureivrsession") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Securesession response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Securesession" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationParticipantSecureivrsessions invokes GET /api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions // // Get a list of secure sessions for this participant. func (a ConversationsApi) GetConversationParticipantSecureivrsessions(conversationId string, participantId string) (*Securesessionentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Securesessionentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationParticipantSecureivrsessions") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationParticipantSecureivrsessions") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Securesessionentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Securesessionentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationParticipantWrapup invokes GET /api/v2/conversations/{conversationId}/participants/{participantId}/wrapup // // Get the wrap-up for this conversation participant. func (a ConversationsApi) GetConversationParticipantWrapup(conversationId string, participantId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationParticipantWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationParticipantWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationParticipantWrapupcodes invokes GET /api/v2/conversations/{conversationId}/participants/{participantId}/wrapupcodes // // Get list of wrapup codes for this conversation participant func (a ConversationsApi) GetConversationParticipantWrapupcodes(conversationId string, participantId string) ([]Wrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/wrapupcodes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := make([]Wrapupcode, 0) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationParticipantWrapupcodes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationParticipantWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload []Wrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "[]Wrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationSecureattributes invokes GET /api/v2/conversations/{conversationId}/secureattributes // // Get the secure attributes on a conversation. func (a ConversationsApi) GetConversationSecureattributes(conversationId string) (*Conversationsecureattributes, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/secureattributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversationsecureattributes) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationSecureattributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationsecureattributes response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationsecureattributes" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationSuggestion invokes GET /api/v2/conversations/{conversationId}/suggestions/{suggestionId} // // Get Suggestion. func (a ConversationsApi) GetConversationSuggestion(conversationId string, suggestionId string) (*Suggestion, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/suggestions/{suggestionId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{suggestionId}", url.PathEscape(fmt.Sprintf("%v", suggestionId)), -1) defaultReturn := new(Suggestion) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationSuggestion") } // verify the required parameter 'suggestionId' is set if &suggestionId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'suggestionId' when calling ConversationsApi->GetConversationSuggestion") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Suggestion response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Suggestion" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationSuggestions invokes GET /api/v2/conversations/{conversationId}/suggestions // // Get all suggestions for a conversation. func (a ConversationsApi) GetConversationSuggestions(conversationId string, before string, after string, pageSize string, varType string, state string) (*Suggestionlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/suggestions" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Suggestionlisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationSuggestions") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["before"] = a.Configuration.APIClient.ParameterToString(before, "") queryParams["after"] = a.Configuration.APIClient.ParameterToString(after, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["varType"] = a.Configuration.APIClient.ParameterToString(varType, "") queryParams["state"] = a.Configuration.APIClient.ParameterToString(state, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Suggestionlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Suggestionlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationSummaries invokes GET /api/v2/conversations/{conversationId}/summaries // // Get the summaries of the conversation. func (a ConversationsApi) GetConversationSummaries(conversationId string) (*Conversationsummariesgetresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/summaries" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversationsummariesgetresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationSummaries") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationsummariesgetresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationsummariesgetresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversations invokes GET /api/v2/conversations // // Get active conversations for the logged in user func (a ConversationsApi) GetConversations(communicationType string) (*Conversationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations" defaultReturn := new(Conversationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["communicationType"] = a.Configuration.APIClient.ParameterToString(communicationType, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCall invokes GET /api/v2/conversations/calls/{conversationId} // // Get call conversation func (a ConversationsApi) GetConversationsCall(conversationId string) (*Callconversation, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Callconversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCall") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Callconversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Callconversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallParticipantCommunicationWrapup invokes GET /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Get the wrap-up for this conversation communication. func (a ConversationsApi) GetConversationsCallParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCallParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCallParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsCallParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallParticipantWrapup invokes GET /api/v2/conversations/calls/{conversationId}/participants/{participantId}/wrapup // // Get the wrap-up for this conversation participant. func (a ConversationsApi) GetConversationsCallParticipantWrapup(conversationId string, participantId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCallParticipantWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCallParticipantWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallParticipantWrapupcodes invokes GET /api/v2/conversations/calls/{conversationId}/participants/{participantId}/wrapupcodes // // Get list of wrapup codes for this conversation participant func (a ConversationsApi) GetConversationsCallParticipantWrapupcodes(conversationId string, participantId string) ([]Wrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/wrapupcodes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := make([]Wrapupcode, 0) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCallParticipantWrapupcodes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCallParticipantWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload []Wrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "[]Wrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallback invokes GET /api/v2/conversations/callbacks/{conversationId} // // Get callback conversation func (a ConversationsApi) GetConversationsCallback(conversationId string) (*Callbackconversation, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Callbackconversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCallback") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Callbackconversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Callbackconversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallbackParticipantCommunicationWrapup invokes GET /api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Get the wrap-up for this conversation communication. func (a ConversationsApi) GetConversationsCallbackParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCallbackParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCallbackParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsCallbackParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallbackParticipantWrapup invokes GET /api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/wrapup // // Get the wrap-up for this conversation participant. func (a ConversationsApi) GetConversationsCallbackParticipantWrapup(conversationId string, participantId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCallbackParticipantWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCallbackParticipantWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallbackParticipantWrapupcodes invokes GET /api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/wrapupcodes // // Get list of wrapup codes for this conversation participant func (a ConversationsApi) GetConversationsCallbackParticipantWrapupcodes(conversationId string, participantId string) ([]Wrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/wrapupcodes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := make([]Wrapupcode, 0) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCallbackParticipantWrapupcodes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCallbackParticipantWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload []Wrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "[]Wrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallbacks invokes GET /api/v2/conversations/callbacks // // Get the logged-in user's active conversations and their Callback participants state. // // This endpoint answers three questions:- Is the user involved in any active conversation? - Does that active conversation include Callbacks? - Is the user directly participating in a Callback within that conversation? func (a ConversationsApi) GetConversationsCallbacks() (*Callbackconversationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks" defaultReturn := new(Callbackconversationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Callbackconversationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Callbackconversationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCalls invokes GET /api/v2/conversations/calls // // Get the logged-in user's active conversations and their Call participants state. // // This endpoint answers three questions:- Is the user involved in any active conversation? - Does that active conversation include Calls? - Is the user directly participating in a Call within that conversation? func (a ConversationsApi) GetConversationsCalls() (*Callconversationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls" defaultReturn := new(Callconversationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Callconversationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Callconversationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallsHistory invokes GET /api/v2/conversations/calls/history // // Get call history func (a ConversationsApi) GetConversationsCallsHistory(pageSize int, pageNumber int, interval string, expand []string) (*Callhistoryconversationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/history" defaultReturn := new(Callhistoryconversationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["interval"] = a.Configuration.APIClient.ParameterToString(interval, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "multi") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Callhistoryconversationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Callhistoryconversationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCallsMaximumconferenceparties invokes GET /api/v2/conversations/calls/maximumconferenceparties // // Get the maximum number of participants that this user can have on a conference func (a ConversationsApi) GetConversationsCallsMaximumconferenceparties() (*Maxparticipants, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/maximumconferenceparties" defaultReturn := new(Maxparticipants) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Maxparticipants response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Maxparticipants" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCobrowsesession invokes GET /api/v2/conversations/cobrowsesessions/{conversationId} // // Get cobrowse conversation func (a ConversationsApi) GetConversationsCobrowsesession(conversationId string) (*Cobrowseconversation, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Cobrowseconversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCobrowsesession") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Cobrowseconversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Cobrowseconversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCobrowsesessionParticipantCommunicationWrapup invokes GET /api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Get the wrap-up for this conversation communication. // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: GetConversationsCobrowsesessionParticipantCommunicationWrapup is deprecated func (a ConversationsApi) GetConversationsCobrowsesessionParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCobrowsesessionParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCobrowsesessionParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsCobrowsesessionParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCobrowsesessionParticipantWrapup invokes GET /api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/wrapup // // Get the wrap-up for this conversation participant. // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: GetConversationsCobrowsesessionParticipantWrapup is deprecated func (a ConversationsApi) GetConversationsCobrowsesessionParticipantWrapup(conversationId string, participantId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCobrowsesessionParticipantWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCobrowsesessionParticipantWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCobrowsesessionParticipantWrapupcodes invokes GET /api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/wrapupcodes // // Get list of wrapup codes for this conversation participant // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: GetConversationsCobrowsesessionParticipantWrapupcodes is deprecated func (a ConversationsApi) GetConversationsCobrowsesessionParticipantWrapupcodes(conversationId string, participantId string) ([]Wrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/wrapupcodes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := make([]Wrapupcode, 0) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsCobrowsesessionParticipantWrapupcodes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsCobrowsesessionParticipantWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload []Wrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "[]Wrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCobrowsesessions invokes GET /api/v2/conversations/cobrowsesessions // // Get active cobrowse conversations for the logged in user func (a ConversationsApi) GetConversationsCobrowsesessions() (*Cobrowseconversationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions" defaultReturn := new(Cobrowseconversationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Cobrowseconversationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Cobrowseconversationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCustomattributesSchema invokes GET /api/v2/conversations/customattributes/schemas/{schemaId} // // Get a schema func (a ConversationsApi) GetConversationsCustomattributesSchema(schemaId string) (*Conversationdataschema, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas/{schemaId}" path = strings.Replace(path, "{schemaId}", url.PathEscape(fmt.Sprintf("%v", schemaId)), -1) defaultReturn := new(Conversationdataschema) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'schemaId' is set if &schemaId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'schemaId' when calling ConversationsApi->GetConversationsCustomattributesSchema") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationdataschema response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationdataschema" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCustomattributesSchemaVersion invokes GET /api/v2/conversations/customattributes/schemas/{schemaId}/versions/{versionId} // // Get a specific version of a schema func (a ConversationsApi) GetConversationsCustomattributesSchemaVersion(schemaId string, versionId string) (*Conversationdataschema, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas/{schemaId}/versions/{versionId}" path = strings.Replace(path, "{schemaId}", url.PathEscape(fmt.Sprintf("%v", schemaId)), -1) path = strings.Replace(path, "{versionId}", url.PathEscape(fmt.Sprintf("%v", versionId)), -1) defaultReturn := new(Conversationdataschema) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'schemaId' is set if &schemaId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'schemaId' when calling ConversationsApi->GetConversationsCustomattributesSchemaVersion") } // verify the required parameter 'versionId' is set if &versionId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'versionId' when calling ConversationsApi->GetConversationsCustomattributesSchemaVersion") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationdataschema response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationdataschema" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCustomattributesSchemaVersions invokes GET /api/v2/conversations/customattributes/schemas/{schemaId}/versions // // Get all versions of a CCA schema func (a ConversationsApi) GetConversationsCustomattributesSchemaVersions(schemaId string) (*Conversationdataschemalisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas/{schemaId}/versions" path = strings.Replace(path, "{schemaId}", url.PathEscape(fmt.Sprintf("%v", schemaId)), -1) defaultReturn := new(Conversationdataschemalisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'schemaId' is set if &schemaId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'schemaId' when calling ConversationsApi->GetConversationsCustomattributesSchemaVersions") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationdataschemalisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationdataschemalisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCustomattributesSchemas invokes GET /api/v2/conversations/customattributes/schemas // // Get a list of schemas. func (a ConversationsApi) GetConversationsCustomattributesSchemas() (*Conversationdataschemalisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas" defaultReturn := new(Conversationdataschemalisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationdataschemalisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationdataschemalisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCustomattributesSchemasCoretype invokes GET /api/v2/conversations/customattributes/schemas/coretypes/{coreTypeName} // // Get the core types from which all schemas are built. func (a ConversationsApi) GetConversationsCustomattributesSchemasCoretype(coreTypeName string) (*Coretype, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas/coretypes/{coreTypeName}" path = strings.Replace(path, "{coreTypeName}", url.PathEscape(fmt.Sprintf("%v", coreTypeName)), -1) defaultReturn := new(Coretype) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'coreTypeName' is set if &coreTypeName == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'coreTypeName' when calling ConversationsApi->GetConversationsCustomattributesSchemasCoretype") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Coretype response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Coretype" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCustomattributesSchemasCoretypes invokes GET /api/v2/conversations/customattributes/schemas/coretypes // // Get the list of core types enabled for a specific namespace. func (a ConversationsApi) GetConversationsCustomattributesSchemasCoretypes() (*Coretypelisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas/coretypes" defaultReturn := new(Coretypelisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Coretypelisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Coretypelisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsCustomattributesSchemasLimits invokes GET /api/v2/conversations/customattributes/schemas/limits // // Get quantitative limits on schemas func (a ConversationsApi) GetConversationsCustomattributesSchemasLimits() (*Schemaquantitylimits, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas/limits" defaultReturn := new(Schemaquantitylimits) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Schemaquantitylimits response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Schemaquantitylimits" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmail invokes GET /api/v2/conversations/emails/{conversationId} // // Get email conversation func (a ConversationsApi) GetConversationsEmail(conversationId string) (*Emailconversation, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailconversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsEmail") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Emailconversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailconversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmailMessage invokes GET /api/v2/conversations/emails/{conversationId}/messages/{messageId} // // Get conversation message func (a ConversationsApi) GetConversationsEmailMessage(conversationId string, messageId string) (*Emailmessage, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages/{messageId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{messageId}", url.PathEscape(fmt.Sprintf("%v", messageId)), -1) defaultReturn := new(Emailmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsEmailMessage") } // verify the required parameter 'messageId' is set if &messageId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'messageId' when calling ConversationsApi->GetConversationsEmailMessage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Emailmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmailMessages invokes GET /api/v2/conversations/emails/{conversationId}/messages // // Get conversation messages func (a ConversationsApi) GetConversationsEmailMessages(conversationId string, includeAgentlessStitchedMessages bool) (*Emailmessagepreviewlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailmessagepreviewlisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsEmailMessages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["includeAgentlessStitchedMessages"] = a.Configuration.APIClient.ParameterToString(includeAgentlessStitchedMessages, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Emailmessagepreviewlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailmessagepreviewlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmailMessagesDraft invokes GET /api/v2/conversations/emails/{conversationId}/messages/draft // // Get conversation draft reply func (a ConversationsApi) GetConversationsEmailMessagesDraft(conversationId string) (*Emailmessage, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages/draft" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsEmailMessagesDraft") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Emailmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmailParticipantCommunicationWrapup invokes GET /api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Get the wrap-up for this conversation communication. func (a ConversationsApi) GetConversationsEmailParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsEmailParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsEmailParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsEmailParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmailParticipantWrapup invokes GET /api/v2/conversations/emails/{conversationId}/participants/{participantId}/wrapup // // Get the wrap-up for this conversation participant. func (a ConversationsApi) GetConversationsEmailParticipantWrapup(conversationId string, participantId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsEmailParticipantWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsEmailParticipantWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmailParticipantWrapupcodes invokes GET /api/v2/conversations/emails/{conversationId}/participants/{participantId}/wrapupcodes // // Get list of wrapup codes for this conversation participant func (a ConversationsApi) GetConversationsEmailParticipantWrapupcodes(conversationId string, participantId string) ([]Wrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}/wrapupcodes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := make([]Wrapupcode, 0) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsEmailParticipantWrapupcodes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsEmailParticipantWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload []Wrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "[]Wrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmailSettings invokes GET /api/v2/conversations/emails/{conversationId}/settings // // Get emails settings for a given conversation func (a ConversationsApi) GetConversationsEmailSettings(conversationId string) (*Emailssettings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/settings" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailssettings) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsEmailSettings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Emailssettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailssettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsEmails invokes GET /api/v2/conversations/emails // // Get the logged-in user's active conversations and their Email participants state. // // This endpoint answers three questions:- Is the user involved in any active conversation? - Does that active conversation include Emails? - Is the user directly participating in an Email within that conversation? func (a ConversationsApi) GetConversationsEmails() (*Emailconversationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails" defaultReturn := new(Emailconversationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Emailconversationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailconversationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsInternalmessage invokes GET /api/v2/conversations/internalmessages/{conversationId} // // Get internal message conversation func (a ConversationsApi) GetConversationsInternalmessage(conversationId string) (*Internalmessageconversation, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/internalmessages/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Internalmessageconversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsInternalmessage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Internalmessageconversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Internalmessageconversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsInternalmessages invokes GET /api/v2/conversations/internalmessages // // Get the logged-in user's active conversations and their InternalMessage participants state. // // This endpoint answers three questions:- Is the user involved in any active conversation? - Does that active conversation include InternalMessages? - Is the user directly participating in an InternalMessage within that conversation? func (a ConversationsApi) GetConversationsInternalmessages() (*Internalmessageconversationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/internalmessages" defaultReturn := new(Internalmessageconversationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Internalmessageconversationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Internalmessageconversationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsKeyconfiguration invokes GET /api/v2/conversations/keyconfigurations/{keyconfigurationsId} // // Get the encryption key configurations func (a ConversationsApi) GetConversationsKeyconfiguration(keyconfigurationsId string) (*Conversationencryptionconfiguration, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/keyconfigurations/{keyconfigurationsId}" path = strings.Replace(path, "{keyconfigurationsId}", url.PathEscape(fmt.Sprintf("%v", keyconfigurationsId)), -1) defaultReturn := new(Conversationencryptionconfiguration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'keyconfigurationsId' is set if &keyconfigurationsId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'keyconfigurationsId' when calling ConversationsApi->GetConversationsKeyconfiguration") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationencryptionconfiguration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationencryptionconfiguration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsKeyconfigurations invokes GET /api/v2/conversations/keyconfigurations // // Get a list of key configurations data func (a ConversationsApi) GetConversationsKeyconfigurations() (*Conversationencryptionconfigurationlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/keyconfigurations" defaultReturn := new(Conversationencryptionconfigurationlisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationencryptionconfigurationlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationencryptionconfigurationlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessage invokes GET /api/v2/conversations/messages/{conversationId} // // Get message conversation func (a ConversationsApi) GetConversationsMessage(conversationId string) (*Messageconversation, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Messageconversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsMessage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messageconversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messageconversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessageCommunicationMessagesMedia invokes GET /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media // // Get message media list by status func (a ConversationsApi) GetConversationsMessageCommunicationMessagesMedia(conversationId string, communicationId string, status string, pageNumber int, pageSize int) (*Messagemedialisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Messagemedialisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsMessageCommunicationMessagesMedia") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsMessageCommunicationMessagesMedia") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["status"] = a.Configuration.APIClient.ParameterToString(status, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagemedialisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagemedialisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessageCommunicationMessagesMediaMediaId invokes GET /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media/{mediaId} // // Get media // // See https://developer.genesys.cloud/commdigital/digital/messagemediaupload/ for example usage. func (a ConversationsApi) GetConversationsMessageCommunicationMessagesMediaMediaId(conversationId string, communicationId string, mediaId string) (*Messagemediadata, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media/{mediaId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) path = strings.Replace(path, "{mediaId}", url.PathEscape(fmt.Sprintf("%v", mediaId)), -1) defaultReturn := new(Messagemediadata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsMessageCommunicationMessagesMediaMediaId") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsMessageCommunicationMessagesMediaMediaId") } // verify the required parameter 'mediaId' is set if &mediaId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'mediaId' when calling ConversationsApi->GetConversationsMessageCommunicationMessagesMediaMediaId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagemediadata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagemediadata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessageDetails invokes GET /api/v2/conversations/messages/{messageId}/details // // Get message func (a ConversationsApi) GetConversationsMessageDetails(messageId string) (*Messagedata, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{messageId}/details" path = strings.Replace(path, "{messageId}", url.PathEscape(fmt.Sprintf("%v", messageId)), -1) defaultReturn := new(Messagedata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'messageId' is set if &messageId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'messageId' when calling ConversationsApi->GetConversationsMessageDetails") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagedata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagedata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessageMessage invokes GET /api/v2/conversations/messages/{conversationId}/messages/{messageId} // // Get conversation message func (a ConversationsApi) GetConversationsMessageMessage(conversationId string, messageId string) (*Messagedata, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/messages/{messageId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{messageId}", url.PathEscape(fmt.Sprintf("%v", messageId)), -1) defaultReturn := new(Messagedata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsMessageMessage") } // verify the required parameter 'messageId' is set if &messageId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'messageId' when calling ConversationsApi->GetConversationsMessageMessage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagedata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagedata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessageParticipantCommunicationWrapup invokes GET /api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Get the wrap-up for this conversation communication. func (a ConversationsApi) GetConversationsMessageParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsMessageParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsMessageParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsMessageParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessageParticipantWrapup invokes GET /api/v2/conversations/messages/{conversationId}/participants/{participantId}/wrapup // // Get the wrap-up for this conversation participant. func (a ConversationsApi) GetConversationsMessageParticipantWrapup(conversationId string, participantId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsMessageParticipantWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsMessageParticipantWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessageParticipantWrapupcodes invokes GET /api/v2/conversations/messages/{conversationId}/participants/{participantId}/wrapupcodes // // Get list of wrapup codes for this conversation participant func (a ConversationsApi) GetConversationsMessageParticipantWrapupcodes(conversationId string, participantId string) ([]Wrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/wrapupcodes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := make([]Wrapupcode, 0) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsMessageParticipantWrapupcodes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsMessageParticipantWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload []Wrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "[]Wrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessages invokes GET /api/v2/conversations/messages // // Get the logged-in user's active conversations and their Message participants state. // // This endpoint answers three questions:- Is the user involved in any active conversation? - Does that active conversation include Messages? - Is the user directly participating in a Message within that conversation? func (a ConversationsApi) GetConversationsMessages() (*Messageconversationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages" defaultReturn := new(Messageconversationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messageconversationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messageconversationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagesCachedmedia invokes GET /api/v2/conversations/messages/cachedmedia // // Get a list of cached media items func (a ConversationsApi) GetConversationsMessagesCachedmedia(pageSize int, pageNumber int, urlParam string) (*Cachedmediaitementitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/cachedmedia" defaultReturn := new(Cachedmediaitementitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["urlParam"] = a.Configuration.APIClient.ParameterToString(urlParam, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Cachedmediaitementitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Cachedmediaitementitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagesCachedmediaCachedMediaItemId invokes GET /api/v2/conversations/messages/cachedmedia/{cachedMediaItemId} // // Get a cached media item func (a ConversationsApi) GetConversationsMessagesCachedmediaCachedMediaItemId(cachedMediaItemId string) (*Cachedmediaitem, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/cachedmedia/{cachedMediaItemId}" path = strings.Replace(path, "{cachedMediaItemId}", url.PathEscape(fmt.Sprintf("%v", cachedMediaItemId)), -1) defaultReturn := new(Cachedmediaitem) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'cachedMediaItemId' is set if &cachedMediaItemId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'cachedMediaItemId' when calling ConversationsApi->GetConversationsMessagesCachedmediaCachedMediaItemId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Cachedmediaitem response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Cachedmediaitem" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingFacebookApp invokes GET /api/v2/conversations/messaging/facebook/app // // Get Genesys Facebook App Id func (a ConversationsApi) GetConversationsMessagingFacebookApp() (*Facebookappcredentials, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/facebook/app" defaultReturn := new(Facebookappcredentials) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Facebookappcredentials response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Facebookappcredentials" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingFacebookPermissions invokes GET /api/v2/conversations/messaging/facebook/permissions // // Get a list of Facebook Permissions func (a ConversationsApi) GetConversationsMessagingFacebookPermissions() (*Facebookpermissionentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/facebook/permissions" defaultReturn := new(Facebookpermissionentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Facebookpermissionentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Facebookpermissionentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIdentityresolutionIntegrationsAppleIntegrationId invokes GET /api/v2/conversations/messaging/identityresolution/integrations/apple/{integrationId} // // Get Apple messaging integration identity resolution settings func (a ConversationsApi) GetConversationsMessagingIdentityresolutionIntegrationsAppleIntegrationId(integrationId string) (*Appleidentityresolutionconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/apple/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Appleidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIdentityresolutionIntegrationsAppleIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Appleidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Appleidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIdentityresolutionIntegrationsFacebookIntegrationId invokes GET /api/v2/conversations/messaging/identityresolution/integrations/facebook/{integrationId} // // Get Facebook messaging integration identity resolution settings func (a ConversationsApi) GetConversationsMessagingIdentityresolutionIntegrationsFacebookIntegrationId(integrationId string) (*Facebookidentityresolutionconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/facebook/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Facebookidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIdentityresolutionIntegrationsFacebookIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Facebookidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Facebookidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIdentityresolutionIntegrationsInstagramIntegrationId invokes GET /api/v2/conversations/messaging/identityresolution/integrations/instagram/{integrationId} // // Get an Instagram integration identity resolution settings func (a ConversationsApi) GetConversationsMessagingIdentityresolutionIntegrationsInstagramIntegrationId(integrationId string) (*Instagramidentityresolutionconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/instagram/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Instagramidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIdentityresolutionIntegrationsInstagramIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Instagramidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Instagramidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIdentityresolutionIntegrationsOpenIntegrationId invokes GET /api/v2/conversations/messaging/identityresolution/integrations/open/{integrationId} // // Get an open messaging integration Identity Resolution settings func (a ConversationsApi) GetConversationsMessagingIdentityresolutionIntegrationsOpenIntegrationId(integrationId string) (*Openmessagingidentityresolutionconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/open/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Openmessagingidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIdentityresolutionIntegrationsOpenIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Openmessagingidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openmessagingidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIdentityresolutionIntegrationsTwitterIntegrationId invokes GET /api/v2/conversations/messaging/identityresolution/integrations/twitter/{integrationId} // // Get X (Formally Twitter) messaging integration identity resolution settings func (a ConversationsApi) GetConversationsMessagingIdentityresolutionIntegrationsTwitterIntegrationId(integrationId string) (*Twitteridentityresolutionconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/twitter/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Twitteridentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIdentityresolutionIntegrationsTwitterIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Twitteridentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Twitteridentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIdentityresolutionIntegrationsWhatsappIntegrationId invokes GET /api/v2/conversations/messaging/identityresolution/integrations/whatsapp/{integrationId} // // Get a whatsApp integration Identity Resolution settings func (a ConversationsApi) GetConversationsMessagingIdentityresolutionIntegrationsWhatsappIntegrationId(integrationId string) (*Whatsappidentityresolutionconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/whatsapp/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Whatsappidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIdentityresolutionIntegrationsWhatsappIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Whatsappidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationTwitterOauthSettings invokes GET /api/v2/conversations/messaging/integrations/{integrationId}/twitter/oauth/settings // // Get twitter oauth settings to patch an integration func (a ConversationsApi) GetConversationsMessagingIntegrationTwitterOauthSettings(integrationId string) (*Twitteroauthsettings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/{integrationId}/twitter/oauth/settings" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Twitteroauthsettings) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIntegrationTwitterOauthSettings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Twitteroauthsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Twitteroauthsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrations invokes GET /api/v2/conversations/messaging/integrations // // Get a list of Integrations func (a ConversationsApi) GetConversationsMessagingIntegrations(pageSize int, pageNumber int, expand []string, supportedContentId string, messagingSettingId string) (*Messagingintegrationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations" defaultReturn := new(Messagingintegrationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "multi") queryParams["supportedContentId"] = a.Configuration.APIClient.ParameterToString(supportedContentId, "") queryParams["messagingSettingId"] = a.Configuration.APIClient.ParameterToString(messagingSettingId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagingintegrationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagingintegrationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsApple invokes GET /api/v2/conversations/messaging/integrations/apple // // Get a list of Apple Integrations func (a ConversationsApi) GetConversationsMessagingIntegrationsApple(pageSize int, pageNumber int, expand string, supportedContentId string, messagingSettingId string) (*Appleintegrationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/apple" defaultReturn := new(Appleintegrationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") queryParams["supportedContentId"] = a.Configuration.APIClient.ParameterToString(supportedContentId, "") queryParams["messagingSettingId"] = a.Configuration.APIClient.ParameterToString(messagingSettingId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Appleintegrationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Appleintegrationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsAppleIntegrationId invokes GET /api/v2/conversations/messaging/integrations/apple/{integrationId} // // Get an Apple messaging integration func (a ConversationsApi) GetConversationsMessagingIntegrationsAppleIntegrationId(integrationId string, expand string) (*Appleintegration, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/apple/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Appleintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIntegrationsAppleIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Appleintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Appleintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsFacebook invokes GET /api/v2/conversations/messaging/integrations/facebook // // Get a list of Facebook Integrations func (a ConversationsApi) GetConversationsMessagingIntegrationsFacebook(pageSize int, pageNumber int, expand string, supportedContentId string, messagingSettingId string) (*Facebookintegrationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/facebook" defaultReturn := new(Facebookintegrationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") queryParams["supportedContentId"] = a.Configuration.APIClient.ParameterToString(supportedContentId, "") queryParams["messagingSettingId"] = a.Configuration.APIClient.ParameterToString(messagingSettingId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Facebookintegrationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Facebookintegrationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsFacebookIntegrationId invokes GET /api/v2/conversations/messaging/integrations/facebook/{integrationId} // // Get a Facebook messaging integration func (a ConversationsApi) GetConversationsMessagingIntegrationsFacebookIntegrationId(integrationId string, expand string) (*Facebookintegration, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/facebook/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Facebookintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIntegrationsFacebookIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Facebookintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Facebookintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsInstagram invokes GET /api/v2/conversations/messaging/integrations/instagram // // Get a list of Instagram Integrations func (a ConversationsApi) GetConversationsMessagingIntegrationsInstagram(pageSize int, pageNumber int, expand string, supportedContentId string, messagingSettingId string) (*Instagramintegrationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/instagram" defaultReturn := new(Instagramintegrationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") queryParams["supportedContentId"] = a.Configuration.APIClient.ParameterToString(supportedContentId, "") queryParams["messagingSettingId"] = a.Configuration.APIClient.ParameterToString(messagingSettingId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Instagramintegrationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Instagramintegrationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsInstagramIntegrationId invokes GET /api/v2/conversations/messaging/integrations/instagram/{integrationId} // // Get Instagram messaging integration func (a ConversationsApi) GetConversationsMessagingIntegrationsInstagramIntegrationId(integrationId string, expand string) (*Instagramintegration, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/instagram/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Instagramintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIntegrationsInstagramIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Instagramintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Instagramintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsOpen invokes GET /api/v2/conversations/messaging/integrations/open // // Get a list of Open messaging integrations // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. func (a ConversationsApi) GetConversationsMessagingIntegrationsOpen(pageSize int, pageNumber int, expand string, supportedContentId string, messagingSettingId string) (*Openintegrationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open" defaultReturn := new(Openintegrationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") queryParams["supportedContentId"] = a.Configuration.APIClient.ParameterToString(supportedContentId, "") queryParams["messagingSettingId"] = a.Configuration.APIClient.ParameterToString(messagingSettingId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Openintegrationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openintegrationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId invokes GET /api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/{integrationId} // // Get an Open messaging integration with the Google Business Profile extension // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. // // Preview: GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId(integrationId string, expand string) (*Googlebusinessprofileopenintegration, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Googlebusinessprofileopenintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Googlebusinessprofileopenintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Googlebusinessprofileopenintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileOauthSettings invokes GET /api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/oauth/settings // // Get Google Business Profile OAuth 2 settings // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. // // Preview: GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileOauthSettings is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileOauthSettings() (*Googleoauthsettingsresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/oauth/settings" defaultReturn := new(Googleoauthsettingsresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Googleoauthsettingsresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Googleoauthsettingsresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileToken invokes GET /api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/tokens/{tokenId} // // Get a Google Auth Token // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. // // Preview: GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileToken is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileToken(tokenId string) (*Googleauthtoken, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/tokens/{tokenId}" path = strings.Replace(path, "{tokenId}", url.PathEscape(fmt.Sprintf("%v", tokenId)), -1) defaultReturn := new(Googleauthtoken) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'tokenId' is set if &tokenId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'tokenId' when calling ConversationsApi->GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileToken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Googleauthtoken response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Googleauthtoken" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileTokenAccounts invokes GET /api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/tokens/{tokenId}/accounts // // Get Google Business Profile accounts // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. // // Preview: GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileTokenAccounts is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileTokenAccounts(tokenId string) (*Googlebusinessprofileaccountlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/tokens/{tokenId}/accounts" path = strings.Replace(path, "{tokenId}", url.PathEscape(fmt.Sprintf("%v", tokenId)), -1) defaultReturn := new(Googlebusinessprofileaccountlisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'tokenId' is set if &tokenId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'tokenId' when calling ConversationsApi->GetConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileTokenAccounts") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Googlebusinessprofileaccountlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Googlebusinessprofileaccountlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsOpenIntegrationId invokes GET /api/v2/conversations/messaging/integrations/open/{integrationId} // // Get an Open messaging integration // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. func (a ConversationsApi) GetConversationsMessagingIntegrationsOpenIntegrationId(integrationId string, expand string) (*Openintegration, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Openintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIntegrationsOpenIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Openintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsTwitter invokes GET /api/v2/conversations/messaging/integrations/twitter // // Get a list of Twitter Integrations func (a ConversationsApi) GetConversationsMessagingIntegrationsTwitter(pageSize int, pageNumber int, expand string, supportedContentId string, messagingSettingId string) (*Twitterintegrationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/twitter" defaultReturn := new(Twitterintegrationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") queryParams["supportedContentId"] = a.Configuration.APIClient.ParameterToString(supportedContentId, "") queryParams["messagingSettingId"] = a.Configuration.APIClient.ParameterToString(messagingSettingId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Twitterintegrationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Twitterintegrationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsTwitterIntegrationId invokes GET /api/v2/conversations/messaging/integrations/twitter/{integrationId} // // Get Twitter messaging integration func (a ConversationsApi) GetConversationsMessagingIntegrationsTwitterIntegrationId(integrationId string, expand string) (*Twitterintegration, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/twitter/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Twitterintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIntegrationsTwitterIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Twitterintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Twitterintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsTwitterOauthSettings invokes GET /api/v2/conversations/messaging/integrations/twitter/oauth/settings // // Get twitter oauth settings func (a ConversationsApi) GetConversationsMessagingIntegrationsTwitterOauthSettings() (*Twittersignupoauthsettings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/twitter/oauth/settings" defaultReturn := new(Twittersignupoauthsettings) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Twittersignupoauthsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Twittersignupoauthsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsWhatsapp invokes GET /api/v2/conversations/messaging/integrations/whatsapp // // Get a list of WhatsApp Integrations func (a ConversationsApi) GetConversationsMessagingIntegrationsWhatsapp(pageSize int, pageNumber int, expand string, supportedContentId string, messagingSettingId string) (*Whatsappintegrationentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/whatsapp" defaultReturn := new(Whatsappintegrationentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") queryParams["supportedContentId"] = a.Configuration.APIClient.ParameterToString(supportedContentId, "") queryParams["messagingSettingId"] = a.Configuration.APIClient.ParameterToString(messagingSettingId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Whatsappintegrationentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappintegrationentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingIntegrationsWhatsappIntegrationId invokes GET /api/v2/conversations/messaging/integrations/whatsapp/{integrationId} // // Get a WhatsApp messaging integration func (a ConversationsApi) GetConversationsMessagingIntegrationsWhatsappIntegrationId(integrationId string, expand string) (*Whatsappintegration, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/whatsapp/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Whatsappintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->GetConversationsMessagingIntegrationsWhatsappIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Whatsappintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingOauthAppleCallback invokes GET /api/v2/conversations/messaging/oauth/apple/callback // // Call Authentication provider callback to validate state and code func (a ConversationsApi) GetConversationsMessagingOauthAppleCallback(code string, state string, varError string) (*Oauthappleauthorizationresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/oauth/apple/callback" defaultReturn := new(Oauthappleauthorizationresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'code' is set if &code == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'code' when calling ConversationsApi->GetConversationsMessagingOauthAppleCallback") } // verify the required parameter 'state' is set if &state == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'state' when calling ConversationsApi->GetConversationsMessagingOauthAppleCallback") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["code"] = a.Configuration.APIClient.ParameterToString(code, "") queryParams["state"] = a.Configuration.APIClient.ParameterToString(state, "") queryParams["varError"] = a.Configuration.APIClient.ParameterToString(varError, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Oauthappleauthorizationresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Oauthappleauthorizationresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingSetting invokes GET /api/v2/conversations/messaging/settings/{messageSettingId} // // Get a messaging setting func (a ConversationsApi) GetConversationsMessagingSetting(messageSettingId string) (*Messagingsetting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/settings/{messageSettingId}" path = strings.Replace(path, "{messageSettingId}", url.PathEscape(fmt.Sprintf("%v", messageSettingId)), -1) defaultReturn := new(Messagingsetting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'messageSettingId' is set if &messageSettingId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'messageSettingId' when calling ConversationsApi->GetConversationsMessagingSetting") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagingsetting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagingsetting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingSettings invokes GET /api/v2/conversations/messaging/settings // // Get a list of messaging settings func (a ConversationsApi) GetConversationsMessagingSettings(pageSize int, pageNumber int) (*Messagingconfiglisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/settings" defaultReturn := new(Messagingconfiglisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagingconfiglisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagingconfiglisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingSettingsDefault invokes GET /api/v2/conversations/messaging/settings/default // // Get the organization's default settings that will be used as the default when creating an integration. // // When an integration is created a settings ID may be assigned to it. If the settings ID is not supplied, the default settings will be assigned to it. func (a ConversationsApi) GetConversationsMessagingSettingsDefault() (*Messagingsetting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/settings/default" defaultReturn := new(Messagingsetting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagingsetting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagingsetting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingSupportedcontent invokes GET /api/v2/conversations/messaging/supportedcontent // // Get a list of Supported Content profiles func (a ConversationsApi) GetConversationsMessagingSupportedcontent(pageSize int, pageNumber int) (*Supportedcontentlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/supportedcontent" defaultReturn := new(Supportedcontentlisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Supportedcontentlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Supportedcontentlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingSupportedcontentDefault invokes GET /api/v2/conversations/messaging/supportedcontent/default // // Get the organization's default supported content profile that will be used as the default when creating an integration. // // When an integration is created a supported content ID may be assigned to it. If the supported content ID is not supplied, the default supported content profile will be assigned to it. func (a ConversationsApi) GetConversationsMessagingSupportedcontentDefault() (*Supportedcontent, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/supportedcontent/default" defaultReturn := new(Supportedcontent) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Supportedcontent response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Supportedcontent" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingSupportedcontentSupportedContentId invokes GET /api/v2/conversations/messaging/supportedcontent/{supportedContentId} // // Get a supported content profile func (a ConversationsApi) GetConversationsMessagingSupportedcontentSupportedContentId(supportedContentId string) (*Supportedcontent, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/supportedcontent/{supportedContentId}" path = strings.Replace(path, "{supportedContentId}", url.PathEscape(fmt.Sprintf("%v", supportedContentId)), -1) defaultReturn := new(Supportedcontent) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'supportedContentId' is set if &supportedContentId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'supportedContentId' when calling ConversationsApi->GetConversationsMessagingSupportedcontentSupportedContentId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Supportedcontent response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Supportedcontent" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsMessagingThreadingtimeline invokes GET /api/v2/conversations/messaging/threadingtimeline // // Get conversation threading window timeline for each messaging type // // Conversation messaging threading timeline is a setting defined for each messenger type in your organization. This setting will dictate whether a new message is added to the most recent existing conversation, or creates a new Conversation. If the existing Conversation is still in a connected state the threading timeline setting will never play a role. After the conversation is disconnected, if an inbound message is received or an outbound message is sent after the setting for threading timeline expires, a new conversation is created. func (a ConversationsApi) GetConversationsMessagingThreadingtimeline() (*Conversationthreadingwindow, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/threadingtimeline" defaultReturn := new(Conversationthreadingwindow) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Conversationthreadingwindow response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationthreadingwindow" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsScreenshareParticipantCommunicationWrapup invokes GET /api/v2/conversations/screenshares/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Get the wrap-up for this conversation communication. // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: GetConversationsScreenshareParticipantCommunicationWrapup is deprecated func (a ConversationsApi) GetConversationsScreenshareParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/screenshares/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsScreenshareParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsScreenshareParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsScreenshareParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsSettings invokes GET /api/v2/conversations/settings // // Get Settings func (a ConversationsApi) GetConversationsSettings() (*Settings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/settings" defaultReturn := new(Settings) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Settings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Settings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsSocialParticipantCommunicationWrapup invokes GET /api/v2/conversations/socials/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Get the wrap-up for this conversation communication. func (a ConversationsApi) GetConversationsSocialParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/socials/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsSocialParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsSocialParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsSocialParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsVideoDetails invokes GET /api/v2/conversations/videos/{conferenceId}/details // // Get video conference details (e.g. the current number of active participants). // // Preview: GetConversationsVideoDetails is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) GetConversationsVideoDetails(conferenceId string) (*Videoconferencedetails, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/videos/{conferenceId}/details" path = strings.Replace(path, "{conferenceId}", url.PathEscape(fmt.Sprintf("%v", conferenceId)), -1) defaultReturn := new(Videoconferencedetails) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conferenceId' is set if &conferenceId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conferenceId' when calling ConversationsApi->GetConversationsVideoDetails") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Videoconferencedetails response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Videoconferencedetails" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsVideoParticipantCommunicationWrapup invokes GET /api/v2/conversations/videos/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Get the wrap-up for this conversation communication. func (a ConversationsApi) GetConversationsVideoParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, provisional bool) (*Assignedwrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/videos/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Assignedwrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->GetConversationsVideoParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->GetConversationsVideoParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->GetConversationsVideoParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["provisional"] = a.Configuration.APIClient.ParameterToString(provisional, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Assignedwrapupcode response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Assignedwrapupcode" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetConversationsVideosMeeting invokes GET /api/v2/conversations/videos/meetings/{meetingId} // // Gets a record for a given meetingId func (a ConversationsApi) GetConversationsVideosMeeting(meetingId string) (*Meetingidrecord, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/videos/meetings/{meetingId}" path = strings.Replace(path, "{meetingId}", url.PathEscape(fmt.Sprintf("%v", meetingId)), -1) defaultReturn := new(Meetingidrecord) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'meetingId' is set if &meetingId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'meetingId' when calling ConversationsApi->GetConversationsVideosMeeting") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Meetingidrecord response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Meetingidrecord" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationCustomattributes invokes PATCH /api/v2/conversations/{conversationId}/customattributes // // Update a single custom attributes record by amending the data with only the provided fields. func (a ConversationsApi) PatchConversationCustomattributes(conversationId string, body Customattributespatchrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/customattributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationCustomattributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationCustomattributesBulk invokes PATCH /api/v2/conversations/{conversationId}/customattributes/bulk // // Update a list of custom attributes record by amending the data with only the provided fields. func (a ConversationsApi) PatchConversationCustomattributesBulk(conversationId string, body []Customattributespatchrequest) (*Customattributesbulkupdateresponsemap, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/customattributes/bulk" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Customattributesbulkupdateresponsemap) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationCustomattributesBulk") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Customattributesbulkupdateresponsemap response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Customattributesbulkupdateresponsemap" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationParticipant invokes PATCH /api/v2/conversations/{conversationId}/participants/{participantId} // // Update a participant. // // Update conversation participant. func (a ConversationsApi) PatchConversationParticipant(conversationId string, participantId string, body Mediaparticipantrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationParticipant") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationParticipant") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationParticipant") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationParticipantAttributes invokes PATCH /api/v2/conversations/{conversationId}/participants/{participantId}/attributes // // Update the attributes on a conversation participant. func (a ConversationsApi) PatchConversationParticipantAttributes(conversationId string, participantId string, body Participantattributes) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/attributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationParticipantAttributes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationParticipantAttributes") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationParticipantAttributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationRecordingstate invokes PATCH /api/v2/conversations/{conversationId}/recordingstate // // Update a conversation by setting its recording state func (a ConversationsApi) PatchConversationRecordingstate(conversationId string, body Setrecordingstate) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationSecureattributes invokes PATCH /api/v2/conversations/{conversationId}/secureattributes // // Update the secure attributes on a conversation. func (a ConversationsApi) PatchConversationSecureattributes(conversationId string, body Conversationsecureattributes) (*string, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/secureattributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationSecureattributes") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationSecureattributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationSuggestion invokes PATCH /api/v2/conversations/{conversationId}/suggestions/{suggestionId} // // Update a suggestion. func (a ConversationsApi) PatchConversationSuggestion(conversationId string, suggestionId string, body Suggestionpatchrequest) (*Suggestion, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/suggestions/{suggestionId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{suggestionId}", url.PathEscape(fmt.Sprintf("%v", suggestionId)), -1) defaultReturn := new(Suggestion) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationSuggestion") } // verify the required parameter 'suggestionId' is set if &suggestionId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'suggestionId' when calling ConversationsApi->PatchConversationSuggestion") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationSuggestion") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Suggestion response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Suggestion" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationSummaryEngagements invokes PATCH /api/v2/conversations/{conversationId}/summaries/{summaryId}/engagements // // Update agent's engagement for the summary. func (a ConversationsApi) PatchConversationSummaryEngagements(conversationId string, summaryId string, body Engagementrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/summaries/{summaryId}/engagements" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{summaryId}", url.PathEscape(fmt.Sprintf("%v", summaryId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationSummaryEngagements") } // verify the required parameter 'summaryId' is set if &summaryId == nil { // false return nil, errors.New("Missing required parameter 'summaryId' when calling ConversationsApi->PatchConversationSummaryEngagements") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationSummaryFeedback invokes PATCH /api/v2/conversations/{conversationId}/summaries/{summaryId}/feedback // // Update the feedback for the summary. func (a ConversationsApi) PatchConversationSummaryFeedback(conversationId string, summaryId string, body Feedbackupdaterequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/summaries/{summaryId}/feedback" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{summaryId}", url.PathEscape(fmt.Sprintf("%v", summaryId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationSummaryFeedback") } // verify the required parameter 'summaryId' is set if &summaryId == nil { // false return nil, errors.New("Missing required parameter 'summaryId' when calling ConversationsApi->PatchConversationSummaryFeedback") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationUtilizationlabel invokes PATCH /api/v2/conversations/{conversationId}/utilizationlabel // // Update the utilization label on a conversation. When there is no value provided, the system default label is applied func (a ConversationsApi) PatchConversationUtilizationlabel(conversationId string, body Conversationutilizationlabelupdate) (*string, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/utilizationlabel" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationUtilizationlabel") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationUtilizationlabel") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsAftercallworkConversationIdParticipantCommunication invokes PATCH /api/v2/conversations/aftercallwork/{conversationId}/participants/{participantId}/communications/{communicationId} // // Update after-call work for this conversation communication. func (a ConversationsApi) PatchConversationsAftercallworkConversationIdParticipantCommunication(conversationId string, participantId string, communicationId string, body Aftercallworkupdate) (*Aftercallworkupdate, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/aftercallwork/{conversationId}/participants/{participantId}/communications/{communicationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Aftercallworkupdate) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsAftercallworkConversationIdParticipantCommunication") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsAftercallworkConversationIdParticipantCommunication") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PatchConversationsAftercallworkConversationIdParticipantCommunication") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsAftercallworkConversationIdParticipantCommunication") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Aftercallworkupdate response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Aftercallworkupdate" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCall invokes PATCH /api/v2/conversations/calls/{conversationId} // // Update a conversation by setting its recording state, merging in other conversations to create a conference, or disconnecting all of the participants func (a ConversationsApi) PatchConversationsCall(conversationId string, body Conversation) (*Conversation, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCall") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCall") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCallConference invokes PATCH /api/v2/conversations/calls/{conversationId}/conference // // Update a conversation by merging in other conversations to create a conference func (a ConversationsApi) PatchConversationsCallConference(conversationId string, body Updateconferencerequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/conference" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallConference") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallConference") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsCallParticipant invokes PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId} // // Update conversation participant func (a ConversationsApi) PatchConversationsCallParticipant(conversationId string, participantId string, body Mediaparticipantrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallParticipant") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallParticipant") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallParticipant") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsCallParticipantAttributes invokes PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/attributes // // Update the attributes on a conversation participant. func (a ConversationsApi) PatchConversationsCallParticipantAttributes(conversationId string, participantId string, body Participantattributes) (*Participantattributes, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/attributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Participantattributes) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallParticipantAttributes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallParticipantAttributes") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallParticipantAttributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Participantattributes response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Participantattributes" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCallParticipantCommunication invokes PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId} // // Update conversation participant's communication by disconnecting it. This endpoint does not update wrapup. func (a ConversationsApi) PatchConversationsCallParticipantCommunication(conversationId string, participantId string, communicationId string, body Mediaparticipantrequest) (*interface{}, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(interface{}) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallParticipantCommunication") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallParticipantCommunication") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PatchConversationsCallParticipantCommunication") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallParticipantCommunication") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *interface{} response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "interface{}" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCallParticipantCommunicationPostflowaction invokes PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/postflowaction // // Set mandatory post call actions. If both values are null or blank error will occur. func (a ConversationsApi) PatchConversationsCallParticipantCommunicationPostflowaction(conversationId string, participantId string, communicationId string, body Mandatorypostcallactioninput) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/postflowaction" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallParticipantCommunicationPostflowaction") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallParticipantCommunicationPostflowaction") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PatchConversationsCallParticipantCommunicationPostflowaction") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsCallParticipantConsult invokes PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult // // Change who can speak func (a ConversationsApi) PatchConversationsCallParticipantConsult(conversationId string, participantId string, body Consulttransferupdate) (*Consulttransferresponse, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Consulttransferresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallParticipantConsult") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallParticipantConsult") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallParticipantConsult") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Consulttransferresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Consulttransferresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCallParticipantUserUserId invokes PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/user/{userId} // // Update conversation participant on behalf of a user func (a ConversationsApi) PatchConversationsCallParticipantUserUserId(conversationId string, participantId string, userId string, body Mediaparticipantrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/user/{userId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallParticipantUserUserId") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallParticipantUserUserId") } // verify the required parameter 'userId' is set if &userId == nil { // false return nil, errors.New("Missing required parameter 'userId' when calling ConversationsApi->PatchConversationsCallParticipantUserUserId") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallParticipantUserUserId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsCallback invokes PATCH /api/v2/conversations/callbacks/{conversationId} // // Update a conversation by disconnecting all of the participants func (a ConversationsApi) PatchConversationsCallback(conversationId string, body Conversation) (*Conversation, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallback") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallback") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCallbackParticipant invokes PATCH /api/v2/conversations/callbacks/{conversationId}/participants/{participantId} // // Update conversation participant func (a ConversationsApi) PatchConversationsCallbackParticipant(conversationId string, participantId string, body Mediaparticipantrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallbackParticipant") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallbackParticipant") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallbackParticipant") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsCallbackParticipantAttributes invokes PATCH /api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/attributes // // Update the attributes on a conversation participant. func (a ConversationsApi) PatchConversationsCallbackParticipantAttributes(conversationId string, participantId string, body Participantattributes) (*Participantattributes, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/attributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Participantattributes) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallbackParticipantAttributes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallbackParticipantAttributes") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallbackParticipantAttributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Participantattributes response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Participantattributes" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCallbackParticipantCommunication invokes PATCH /api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/communications/{communicationId} // // Update conversation participant's communication by disconnecting it. func (a ConversationsApi) PatchConversationsCallbackParticipantCommunication(conversationId string, participantId string, communicationId string, body Mediaparticipantrequest) (*interface{}, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/communications/{communicationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(interface{}) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCallbackParticipantCommunication") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCallbackParticipantCommunication") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PatchConversationsCallbackParticipantCommunication") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallbackParticipantCommunication") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *interface{} response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "interface{}" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCallbacks invokes PATCH /api/v2/conversations/callbacks // // Update a scheduled callback func (a ConversationsApi) PatchConversationsCallbacks(body Patchcallbackrequest) (*Patchcallbackresponse, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks" defaultReturn := new(Patchcallbackresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCallbacks") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Patchcallbackresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Patchcallbackresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCobrowsesession invokes PATCH /api/v2/conversations/cobrowsesessions/{conversationId} // // Update a conversation by disconnecting all of the participants // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PatchConversationsCobrowsesession is deprecated func (a ConversationsApi) PatchConversationsCobrowsesession(conversationId string, body Conversation) (*Conversation, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCobrowsesession") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCobrowsesession") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCobrowsesessionParticipant invokes PATCH /api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId} // // Update conversation participant // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PatchConversationsCobrowsesessionParticipant is deprecated func (a ConversationsApi) PatchConversationsCobrowsesessionParticipant(conversationId string, participantId string, body Mediaparticipantrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCobrowsesessionParticipant") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCobrowsesessionParticipant") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsCobrowsesessionParticipantAttributes invokes PATCH /api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/attributes // // Update the attributes on a conversation participant. // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PatchConversationsCobrowsesessionParticipantAttributes is deprecated func (a ConversationsApi) PatchConversationsCobrowsesessionParticipantAttributes(conversationId string, participantId string, body Participantattributes) (*Participantattributes, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/attributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Participantattributes) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCobrowsesessionParticipantAttributes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCobrowsesessionParticipantAttributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Participantattributes response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Participantattributes" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsCobrowsesessionParticipantCommunication invokes PATCH /api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/communications/{communicationId} // // Update conversation participant's communication by disconnecting it. // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PatchConversationsCobrowsesessionParticipantCommunication is deprecated func (a ConversationsApi) PatchConversationsCobrowsesessionParticipantCommunication(conversationId string, participantId string, communicationId string, body Mediaparticipantrequest) (*interface{}, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/communications/{communicationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(interface{}) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsCobrowsesessionParticipantCommunication") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsCobrowsesessionParticipantCommunication") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PatchConversationsCobrowsesessionParticipantCommunication") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsCobrowsesessionParticipantCommunication") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *interface{} response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "interface{}" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsEmail invokes PATCH /api/v2/conversations/emails/{conversationId} // // Update a conversation by disconnecting all of the participants func (a ConversationsApi) PatchConversationsEmail(conversationId string, body Conversation) (*Conversation, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsEmail") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsEmail") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsEmailMessagesDraft invokes PATCH /api/v2/conversations/emails/{conversationId}/messages/draft // // Reset conversation draft to its initial state and/or auto-fill draft content func (a ConversationsApi) PatchConversationsEmailMessagesDraft(conversationId string, autoFill bool, discard bool, body Draftmanipulationrequest) (*Emailmessage, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages/draft" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsEmailMessagesDraft") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["autoFill"] = a.Configuration.APIClient.ParameterToString(autoFill, "") queryParams["discard"] = a.Configuration.APIClient.ParameterToString(discard, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Emailmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsEmailParticipant invokes PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId} // // Update conversation participant func (a ConversationsApi) PatchConversationsEmailParticipant(conversationId string, participantId string, body Mediaparticipantrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsEmailParticipant") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsEmailParticipant") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsEmailParticipant") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsEmailParticipantAttributes invokes PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId}/attributes // // Update the attributes on a conversation participant. func (a ConversationsApi) PatchConversationsEmailParticipantAttributes(conversationId string, participantId string, body Participantattributes) (*Participantattributes, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}/attributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Participantattributes) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsEmailParticipantAttributes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsEmailParticipantAttributes") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsEmailParticipantAttributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Participantattributes response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Participantattributes" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsEmailParticipantCommunication invokes PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId} // // Update conversation participant's communication by disconnecting it. This endpoint does not update wrapup. func (a ConversationsApi) PatchConversationsEmailParticipantCommunication(conversationId string, participantId string, communicationId string, body Mediaparticipantrequest) (*interface{}, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(interface{}) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsEmailParticipantCommunication") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsEmailParticipantCommunication") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PatchConversationsEmailParticipantCommunication") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsEmailParticipantCommunication") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *interface{} response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "interface{}" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsEmailParticipantParkingstate invokes PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId}/parkingstate // // Update conversation by setting its parking state func (a ConversationsApi) PatchConversationsEmailParticipantParkingstate(conversationId string, participantId string, body Parkingstaterequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}/parkingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsEmailParticipantParkingstate") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsEmailParticipantParkingstate") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsEmailParticipantParkingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsMessage invokes PATCH /api/v2/conversations/messages/{conversationId} // // Update a conversation by disconnecting all of the participants func (a ConversationsApi) PatchConversationsMessage(conversationId string, body Conversation) (*Conversation, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsMessage") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessageParticipant invokes PATCH /api/v2/conversations/messages/{conversationId}/participants/{participantId} // // Update conversation participant func (a ConversationsApi) PatchConversationsMessageParticipant(conversationId string, participantId string, body Mediaparticipantrequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsMessageParticipant") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsMessageParticipant") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsMessageParticipantAttributes invokes PATCH /api/v2/conversations/messages/{conversationId}/participants/{participantId}/attributes // // Update the attributes on a conversation participant. func (a ConversationsApi) PatchConversationsMessageParticipantAttributes(conversationId string, participantId string, body Participantattributes) (*Participantattributes, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/attributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Participantattributes) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsMessageParticipantAttributes") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsMessageParticipantAttributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Participantattributes response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Participantattributes" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessageParticipantCommunication invokes PATCH /api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId} // // Update conversation participant's communication by disconnecting it. This endpoint does not update wrapup. func (a ConversationsApi) PatchConversationsMessageParticipantCommunication(conversationId string, participantId string, communicationId string, body Mediaparticipantrequest) (*interface{}, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(interface{}) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsMessageParticipantCommunication") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsMessageParticipantCommunication") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PatchConversationsMessageParticipantCommunication") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessageParticipantCommunication") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *interface{} response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "interface{}" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessageParticipantParkingstate invokes PATCH /api/v2/conversations/messages/{conversationId}/participants/{participantId}/parkingstate // // Update conversation by setting its parking state func (a ConversationsApi) PatchConversationsMessageParticipantParkingstate(conversationId string, participantId string, body Parkingstaterequest) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/parkingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PatchConversationsMessageParticipantParkingstate") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PatchConversationsMessageParticipantParkingstate") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessageParticipantParkingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PatchConversationsMessagingIntegrationsAppleIntegrationId invokes PATCH /api/v2/conversations/messaging/integrations/apple/{integrationId} // // Update an Apple messaging integration func (a ConversationsApi) PatchConversationsMessagingIntegrationsAppleIntegrationId(integrationId string, body Appleintegrationupdaterequest) (*Appleintegration, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/apple/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Appleintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PatchConversationsMessagingIntegrationsAppleIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingIntegrationsAppleIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Appleintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Appleintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingIntegrationsFacebookIntegrationId invokes PATCH /api/v2/conversations/messaging/integrations/facebook/{integrationId} // // Update Facebook messaging integration func (a ConversationsApi) PatchConversationsMessagingIntegrationsFacebookIntegrationId(integrationId string, body Facebookintegrationupdaterequest) (*Facebookintegration, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/facebook/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Facebookintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PatchConversationsMessagingIntegrationsFacebookIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingIntegrationsFacebookIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Facebookintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Facebookintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingIntegrationsInstagramIntegrationId invokes PATCH /api/v2/conversations/messaging/integrations/instagram/{integrationId} // // Update Instagram messaging integration func (a ConversationsApi) PatchConversationsMessagingIntegrationsInstagramIntegrationId(integrationId string, body Instagramintegrationupdaterequest) (*Instagramintegration, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/instagram/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Instagramintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PatchConversationsMessagingIntegrationsInstagramIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingIntegrationsInstagramIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Instagramintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Instagramintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId invokes PATCH /api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/{integrationId} // // Update an Open messaging integration with the Google Business Profile extension // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. // // Preview: PatchConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) PatchConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId(integrationId string, body Googlebusinessprofileopenintegrationupdaterequest) (*Googlebusinessprofileopenintegration, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Googlebusinessprofileopenintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PatchConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Googlebusinessprofileopenintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Googlebusinessprofileopenintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingIntegrationsOpenIntegrationId invokes PATCH /api/v2/conversations/messaging/integrations/open/{integrationId} // // Update an Open messaging integration // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. func (a ConversationsApi) PatchConversationsMessagingIntegrationsOpenIntegrationId(integrationId string, body Openintegrationupdaterequest) (*Openintegration, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Openintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PatchConversationsMessagingIntegrationsOpenIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingIntegrationsOpenIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Openintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingIntegrationsTwitterIntegrationId invokes PATCH /api/v2/conversations/messaging/integrations/twitter/{integrationId} // // Update a Twitter messaging integration func (a ConversationsApi) PatchConversationsMessagingIntegrationsTwitterIntegrationId(integrationId string, body Twitterintegrationupdaterequest) (*Twitterintegration, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/twitter/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Twitterintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PatchConversationsMessagingIntegrationsTwitterIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingIntegrationsTwitterIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Twitterintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Twitterintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingIntegrationsWhatsappEmbeddedsignupIntegrationId invokes PATCH /api/v2/conversations/messaging/integrations/whatsapp/embeddedsignup/{integrationId} // // Activate a WhatsApp messaging integration created using the WhatsApp embedded signup flow // // Supply the two-step verification PIN. Embedded Signup v2: phoneNumber (E.164 from availablePhoneNumbers) and pin. Embedded Signup v4: pin only. Poll GET until status is Active. func (a ConversationsApi) PatchConversationsMessagingIntegrationsWhatsappEmbeddedsignupIntegrationId(integrationId string, body Whatsappembeddedsignupintegrationactivationrequest) (*Whatsappintegration, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/whatsapp/embeddedsignup/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Whatsappintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PatchConversationsMessagingIntegrationsWhatsappEmbeddedsignupIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingIntegrationsWhatsappEmbeddedsignupIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Whatsappintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingIntegrationsWhatsappIntegrationId invokes PATCH /api/v2/conversations/messaging/integrations/whatsapp/{integrationId} // // Update a WhatsApp messaging integration func (a ConversationsApi) PatchConversationsMessagingIntegrationsWhatsappIntegrationId(integrationId string, body Whatsappintegrationupdaterequest) (*Whatsappintegration, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/whatsapp/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Whatsappintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PatchConversationsMessagingIntegrationsWhatsappIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingIntegrationsWhatsappIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Whatsappintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingSetting invokes PATCH /api/v2/conversations/messaging/settings/{messageSettingId} // // Update a messaging setting func (a ConversationsApi) PatchConversationsMessagingSetting(messageSettingId string, body Messagingsettingpatchrequest) (*Messagingsetting, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/settings/{messageSettingId}" path = strings.Replace(path, "{messageSettingId}", url.PathEscape(fmt.Sprintf("%v", messageSettingId)), -1) defaultReturn := new(Messagingsetting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'messageSettingId' is set if &messageSettingId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'messageSettingId' when calling ConversationsApi->PatchConversationsMessagingSetting") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingSetting") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Messagingsetting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagingsetting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsMessagingSupportedcontentSupportedContentId invokes PATCH /api/v2/conversations/messaging/supportedcontent/{supportedContentId} // // Update a supported content profile func (a ConversationsApi) PatchConversationsMessagingSupportedcontentSupportedContentId(supportedContentId string, body Supportedcontent) (*Supportedcontent, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/supportedcontent/{supportedContentId}" path = strings.Replace(path, "{supportedContentId}", url.PathEscape(fmt.Sprintf("%v", supportedContentId)), -1) defaultReturn := new(Supportedcontent) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'supportedContentId' is set if &supportedContentId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'supportedContentId' when calling ConversationsApi->PatchConversationsMessagingSupportedcontentSupportedContentId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsMessagingSupportedcontentSupportedContentId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Supportedcontent response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Supportedcontent" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchConversationsSettings invokes PATCH /api/v2/conversations/settings // // Update Settings func (a ConversationsApi) PatchConversationsSettings(body Settings) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/settings" if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PatchConversationsSettings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostAnalyticsConversationDetailsProperties invokes POST /api/v2/analytics/conversations/{conversationId}/details/properties // // Index conversation properties func (a ConversationsApi) PostAnalyticsConversationDetailsProperties(conversationId string, body Propertyindexrequest) (*Propertyindexrequest, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/{conversationId}/details/properties" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Propertyindexrequest) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostAnalyticsConversationDetailsProperties") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostAnalyticsConversationDetailsProperties") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Propertyindexrequest response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Propertyindexrequest" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostAnalyticsConversationsActivityQuery invokes POST /api/v2/analytics/conversations/activity/query // // Query for conversation activity observations func (a ConversationsApi) PostAnalyticsConversationsActivityQuery(body Conversationactivityquery, pageSize int, pageNumber int) (*Conversationactivityresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/activity/query" defaultReturn := new(Conversationactivityresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostAnalyticsConversationsActivityQuery") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversationactivityresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationactivityresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostAnalyticsConversationsAggregatesJobs invokes POST /api/v2/analytics/conversations/aggregates/jobs // // Query for conversation aggregates asynchronously func (a ConversationsApi) PostAnalyticsConversationsAggregatesJobs(body Conversationasyncaggregationquery) (*Asyncqueryresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/aggregates/jobs" defaultReturn := new(Asyncqueryresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostAnalyticsConversationsAggregatesJobs") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Asyncqueryresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Asyncqueryresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostAnalyticsConversationsAggregatesQuery invokes POST /api/v2/analytics/conversations/aggregates/query // // Query for conversation aggregates func (a ConversationsApi) PostAnalyticsConversationsAggregatesQuery(body Conversationaggregationquery) (*Conversationaggregatequeryresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/aggregates/query" defaultReturn := new(Conversationaggregatequeryresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostAnalyticsConversationsAggregatesQuery") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversationaggregatequeryresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationaggregatequeryresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostAnalyticsConversationsDetailsJobs invokes POST /api/v2/analytics/conversations/details/jobs // // Query for conversation details asynchronously func (a ConversationsApi) PostAnalyticsConversationsDetailsJobs(body Asyncconversationquery) (*Asyncqueryresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/details/jobs" defaultReturn := new(Asyncqueryresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostAnalyticsConversationsDetailsJobs") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Asyncqueryresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Asyncqueryresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostAnalyticsConversationsDetailsQuery invokes POST /api/v2/analytics/conversations/details/query // // Query for conversation details func (a ConversationsApi) PostAnalyticsConversationsDetailsQuery(body Conversationquery) (*Analyticsconversationqueryresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/conversations/details/query" defaultReturn := new(Analyticsconversationqueryresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostAnalyticsConversationsDetailsQuery") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Analyticsconversationqueryresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Analyticsconversationqueryresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationAssign invokes POST /api/v2/conversations/{conversationId}/assign // // Attempts to manually assign a specified conversation to a specified user. Ignores bullseye ring, PAR score, skills, and languages. func (a ConversationsApi) PostConversationAssign(conversationId string, body Conversationuser) (*string, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/assign" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationAssign") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationAssign") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationBarge invokes POST /api/v2/conversations/{conversationId}/barge // // Barge a conversation creating a barged in conference of connected participants. func (a ConversationsApi) PostConversationBarge(conversationId string) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/barge" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationBarge") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationCobrowse invokes POST /api/v2/conversations/{conversationId}/cobrowse // // Creates a cobrowse session. Requires \"conversation:cobrowse:add\" (for web messaging) or \"conversation:cobrowsevoice:add\" permission. func (a ConversationsApi) PostConversationCobrowse(conversationId string) (*Cobrowsewebmessagingsession, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/cobrowse" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Cobrowsewebmessagingsession) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationCobrowse") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Cobrowsewebmessagingsession response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Cobrowsewebmessagingsession" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationCommunicationAgentchecklist invokes POST /api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId} // // Agent Checklist activation API func (a ConversationsApi) PostConversationCommunicationAgentchecklist(conversationId string, communicationId string, agentChecklistId string, body Checklistactivationpayload) (*Agentchecklistresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) path = strings.Replace(path, "{agentChecklistId}", url.PathEscape(fmt.Sprintf("%v", agentChecklistId)), -1) defaultReturn := new(Agentchecklistresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationCommunicationAgentchecklist") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationCommunicationAgentchecklist") } // verify the required parameter 'agentChecklistId' is set if &agentChecklistId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'agentChecklistId' when calling ConversationsApi->PostConversationCommunicationAgentchecklist") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationCommunicationAgentchecklist") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Agentchecklistresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Agentchecklistresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationCommunicationAgentchecklistAgentaction invokes POST /api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId}/agentaction // // API invoked to capture an agent action. func (a ConversationsApi) PostConversationCommunicationAgentchecklistAgentaction(conversationId string, communicationId string, agentChecklistId string, body Agentactionpayload) (*Agentchecklistresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId}/agentaction" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) path = strings.Replace(path, "{agentChecklistId}", url.PathEscape(fmt.Sprintf("%v", agentChecklistId)), -1) defaultReturn := new(Agentchecklistresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationCommunicationAgentchecklistAgentaction") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationCommunicationAgentchecklistAgentaction") } // verify the required parameter 'agentChecklistId' is set if &agentChecklistId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'agentChecklistId' when calling ConversationsApi->PostConversationCommunicationAgentchecklistAgentaction") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationCommunicationAgentchecklistAgentaction") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Agentchecklistresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Agentchecklistresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationCommunicationAgentchecklistJobs invokes POST /api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId}/jobs // // Create inference job func (a ConversationsApi) PostConversationCommunicationAgentchecklistJobs(conversationId string, communicationId string, agentChecklistId string, body Checklistinferencejobpayload) (*Checklistinferencejobcreationresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/{agentChecklistId}/jobs" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) path = strings.Replace(path, "{agentChecklistId}", url.PathEscape(fmt.Sprintf("%v", agentChecklistId)), -1) defaultReturn := new(Checklistinferencejobcreationresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationCommunicationAgentchecklistJobs") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationCommunicationAgentchecklistJobs") } // verify the required parameter 'agentChecklistId' is set if &agentChecklistId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'agentChecklistId' when calling ConversationsApi->PostConversationCommunicationAgentchecklistJobs") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationCommunicationAgentchecklistJobs") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Checklistinferencejobcreationresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Checklistinferencejobcreationresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationCommunicationAgentchecklistsFinalize invokes POST /api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/finalize // // API invoked to finalize agent checklist evaluation. func (a ConversationsApi) PostConversationCommunicationAgentchecklistsFinalize(conversationId string, communicationId string, body Checklistfinalizepayload) (*Agentchecklistresponselist, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/agentchecklists/finalize" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Agentchecklistresponselist) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationCommunicationAgentchecklistsFinalize") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationCommunicationAgentchecklistsFinalize") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationCommunicationAgentchecklistsFinalize") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Agentchecklistresponselist response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Agentchecklistresponselist" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationCommunicationInternalmessages invokes POST /api/v2/conversations/{conversationId}/communications/{communicationId}/internalmessages // // Send internal message // // Send a new internal message for an existing communication. func (a ConversationsApi) PostConversationCommunicationInternalmessages(conversationId string, communicationId string, body Internalmessagerequest) (*Internalmessagedata, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/communications/{communicationId}/internalmessages" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Internalmessagedata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationCommunicationInternalmessages") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationCommunicationInternalmessages") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationCommunicationInternalmessages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Internalmessagedata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Internalmessagedata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationDisconnect invokes POST /api/v2/conversations/{conversationId}/disconnect // // Performs a full conversation teardown. Issues disconnect requests for any connected media. Applies a system wrap-up code to any participants that are pending wrap-up. This is not intended to be the normal way of ending interactions but is available in the event of problems with the application to allow a resynchronization of state across all components. It is recommended that users submit a support case if they are relying on this endpoint systematically as there is likely something that needs investigation. func (a ConversationsApi) PostConversationDisconnect(conversationId string) (*string, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/disconnect" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationDisconnect") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationParticipantCallbacks invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/callbacks // // Create a new callback for the specified participant on the conversation. func (a ConversationsApi) PostConversationParticipantCallbacks(conversationId string, participantId string, body Createcallbackonconversationcommand) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/callbacks" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantCallbacks") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantCallbacks") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationParticipantDigits invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/digits // // Sends DTMF to the participant func (a ConversationsApi) PostConversationParticipantDigits(conversationId string, participantId string, body Digits) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/digits" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantDigits") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantDigits") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationParticipantInternalmessagesUsersCommunications invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/internalmessages/users/communications // // Setup internal message communication with user // // The target user of the digital consultation must have the `conversation:internalMessaging:accept` permission. func (a ConversationsApi) PostConversationParticipantInternalmessagesUsersCommunications(conversationId string, participantId string, body Messagingconferwithuserrequest) (*Messagingconferresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/internalmessages/users/communications" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Messagingconferresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantInternalmessagesUsersCommunications") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantInternalmessagesUsersCommunications") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationParticipantInternalmessagesUsersCommunications") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Messagingconferresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagingconferresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationParticipantReplace invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/replace // // Replace this participant (Deprecated) // // This endpoint is deprecated. Use one of the following endpoints instead: /transfer, /replace/agent, /replace/queue, or /replace/contact/external. // // Deprecated: PostConversationParticipantReplace is deprecated func (a ConversationsApi) PostConversationParticipantReplace(conversationId string, participantId string, body Transferrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/replace" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantReplace") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantReplace") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationParticipantReplace") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationParticipantReplaceAgent invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/replace/agent // // Replace this participant with the specified agent func (a ConversationsApi) PostConversationParticipantReplaceAgent(conversationId string, participantId string, body Transfertoagentrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/replace/agent" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantReplaceAgent") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantReplaceAgent") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationParticipantReplaceAgent") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationParticipantReplaceContactExternal invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/replace/contact/external // // Replace this participant with the an external contact func (a ConversationsApi) PostConversationParticipantReplaceContactExternal(conversationId string, participantId string, body Transfertoexternalcontactrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/replace/contact/external" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantReplaceContactExternal") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantReplaceContactExternal") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationParticipantReplaceContactExternal") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationParticipantReplaceExternal invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/replace/external // // Replace this participant with the an external contact (Deprecated) // // This endpoint is deprecated. Use /replace/contact/external endpoint instead. // // Deprecated: PostConversationParticipantReplaceExternal is deprecated func (a ConversationsApi) PostConversationParticipantReplaceExternal(conversationId string, participantId string, body Transfertoexternalrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/replace/external" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantReplaceExternal") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantReplaceExternal") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationParticipantReplaceExternal") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationParticipantReplaceQueue invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/replace/queue // // Replace this participant with the specified queue func (a ConversationsApi) PostConversationParticipantReplaceQueue(conversationId string, participantId string, body Transfertoqueuerequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/replace/queue" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantReplaceQueue") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantReplaceQueue") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationParticipantReplaceQueue") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationParticipantSecureivrsessions invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions // // Create secure IVR session. Only a participant in the conversation can invoke a secure IVR. func (a ConversationsApi) PostConversationParticipantSecureivrsessions(conversationId string, participantId string, body Createsecuresession) (*Securesession, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Securesession) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantSecureivrsessions") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantSecureivrsessions") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Securesession response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Securesession" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationParticipantTransfer invokes POST /api/v2/conversations/{conversationId}/participants/{participantId}/transfer // // Replace this participant by another one using the address of the destination. func (a ConversationsApi) PostConversationParticipantTransfer(conversationId string, participantId string, body Transfertoaddressrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/transfer" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationParticipantTransfer") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationParticipantTransfer") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationParticipantTransfer") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationSuggestionEngagement invokes POST /api/v2/conversations/{conversationId}/suggestions/{suggestionId}/engagement // // Save an engagement on the suggestion. func (a ConversationsApi) PostConversationSuggestionEngagement(conversationId string, suggestionId string, body Suggestionengagement) (*Suggestionengagement, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/suggestions/{suggestionId}/engagement" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{suggestionId}", url.PathEscape(fmt.Sprintf("%v", suggestionId)), -1) defaultReturn := new(Suggestionengagement) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationSuggestionEngagement") } // verify the required parameter 'suggestionId' is set if &suggestionId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'suggestionId' when calling ConversationsApi->PostConversationSuggestionEngagement") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationSuggestionEngagement") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Suggestionengagement response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Suggestionengagement" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationSuggestionsFeedback invokes POST /api/v2/conversations/{conversationId}/suggestions/feedback // // Suggestion feedback. // // Google Agent Assist offering within Genesys will no longer be supported // // Deprecated: PostConversationSuggestionsFeedback is deprecated func (a ConversationsApi) PostConversationSuggestionsFeedback(conversationId string, body Feedback) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/suggestions/feedback" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationSuggestionsFeedback") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationSuggestionsFeedback") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationSummaryFeedback invokes POST /api/v2/conversations/{conversationId}/summaries/{summaryId}/feedback // // Submit feedback for the summary. func (a ConversationsApi) PostConversationSummaryFeedback(conversationId string, summaryId string, body Feedbackaddrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/summaries/{summaryId}/feedback" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{summaryId}", url.PathEscape(fmt.Sprintf("%v", summaryId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationSummaryFeedback") } // verify the required parameter 'summaryId' is set if &summaryId == nil { // false return nil, errors.New("Missing required parameter 'summaryId' when calling ConversationsApi->PostConversationSummaryFeedback") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCall invokes POST /api/v2/conversations/calls/{conversationId} // // Place a new call as part of a callback conversation. func (a ConversationsApi) PostConversationsCall(conversationId string, body Callcommand) (*Conversation, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCall") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCall") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantBarge invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/barge // // Barge a given participant's call creating a barged in conference of connected participants. func (a ConversationsApi) PostConversationsCallParticipantBarge(conversationId string, participantId string) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/barge" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantBarge") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantBarge") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCallParticipantCoach invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/coach // // Listen in on the conversation from the point of view of a given participant while speaking to just the given participant. func (a ConversationsApi) PostConversationsCallParticipantCoach(conversationId string, participantId string) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/coach" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantCoach") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantCoach") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCallParticipantCommunicationSummaries invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/summaries // // Request an on-demand summary for a call communication. func (a ConversationsApi) PostConversationsCallParticipantCommunicationSummaries(conversationId string, participantId string, communicationId string, body Ondemandconversationsummaryrequest) (*Ondemandsummaryacceptedresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/summaries" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Ondemandsummaryacceptedresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantCommunicationSummaries") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantCommunicationSummaries") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsCallParticipantCommunicationSummaries") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Ondemandsummaryacceptedresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Ondemandsummaryacceptedresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantCommunicationWrapup invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Apply wrap-up for this conversation communication func (a ConversationsApi) PostConversationsCallParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, body Wrapupinput) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsCallParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCallParticipantConsult invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult // // Initiate and update consult transfer (Deprecated) // // This endpoint is deprecated. Use one of the following endpoints instead: /voice/consult, /consult/agent, /consult/queue, or /consult/contact/external. // // Deprecated: PostConversationsCallParticipantConsult is deprecated func (a ConversationsApi) PostConversationsCallParticipantConsult(conversationId string, participantId string, body Consulttransfer) (*Consulttransferresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Consulttransferresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantConsult") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantConsult") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantConsult") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Consulttransferresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Consulttransferresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantConsultAgent invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/agent // // Initiate a consult transfer to an agent func (a ConversationsApi) PostConversationsCallParticipantConsultAgent(conversationId string, participantId string, body Consulttransfertoagent) (*Consulttransferresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/agent" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Consulttransferresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantConsultAgent") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantConsultAgent") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantConsultAgent") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Consulttransferresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Consulttransferresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantConsultContactExternal invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/contact/external // // Initiate a consult transfer to an external contact func (a ConversationsApi) PostConversationsCallParticipantConsultContactExternal(conversationId string, participantId string, body Consulttransfertoexternalcontact) (*Consulttransferresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/contact/external" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Consulttransferresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantConsultContactExternal") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantConsultContactExternal") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantConsultContactExternal") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Consulttransferresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Consulttransferresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantConsultExternal invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/external // // Initiate a consult transfer to an external contact (Deprecated) // // This endpoint is deprecated. Use /consult/contact/external endpoints instead. // // Deprecated: PostConversationsCallParticipantConsultExternal is deprecated func (a ConversationsApi) PostConversationsCallParticipantConsultExternal(conversationId string, participantId string, body Consulttransfertoexternal) (*Consulttransferresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/external" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Consulttransferresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantConsultExternal") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantConsultExternal") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantConsultExternal") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Consulttransferresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Consulttransferresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantConsultQueue invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/queue // // Initiate a consult transfer to a queue func (a ConversationsApi) PostConversationsCallParticipantConsultQueue(conversationId string, participantId string, body Consulttransfertoqueue) (*Consulttransferresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/queue" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Consulttransferresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantConsultQueue") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantConsultQueue") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantConsultQueue") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Consulttransferresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Consulttransferresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantMonitor invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/monitor // // Listen in on the conversation from the point of view of a given participant. func (a ConversationsApi) PostConversationsCallParticipantMonitor(conversationId string, participantId string) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/monitor" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantMonitor") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantMonitor") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCallParticipantReplace invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/replace // // Replace this participant with the specified user and/or address func (a ConversationsApi) PostConversationsCallParticipantReplace(conversationId string, participantId string, body Transferrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/replace" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantReplace") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantReplace") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantReplace") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCallParticipantSnippetRecord invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/snippet/record // // Start/stop the snippet recording for a participant func (a ConversationsApi) PostConversationsCallParticipantSnippetRecord(conversationId string, participantId string, body Snippetrecordingrequest) (*string, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/snippet/record" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantSnippetRecord") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantSnippetRecord") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantSnippetRecord") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantVoiceConsult invokes POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/voice/consult // // Initiate voice consult transfer func (a ConversationsApi) PostConversationsCallParticipantVoiceConsult(conversationId string, participantId string, body Consulttransfertoaddress) (*Consulttransferresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/voice/consult" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) defaultReturn := new(Consulttransferresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantVoiceConsult") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallParticipantVoiceConsult") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantVoiceConsult") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Consulttransferresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Consulttransferresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipants invokes POST /api/v2/conversations/calls/{conversationId}/participants // // Add participants to a conversation func (a ConversationsApi) PostConversationsCallParticipants(conversationId string, body Conversation) (*Conversation, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipants") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipants") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallParticipantsUserUserId invokes POST /api/v2/conversations/calls/{conversationId}/participants/user/{userId} // // Add participants to a conversation on behalf of a user func (a ConversationsApi) PostConversationsCallParticipantsUserUserId(conversationId string, userId string, body Conversation) (*Conversation, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/user/{userId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Conversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallParticipantsUserUserId") } // verify the required parameter 'userId' is set if &userId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'userId' when calling ConversationsApi->PostConversationsCallParticipantsUserUserId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallParticipantsUserUserId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallbackParticipantCommunicationWrapup invokes POST /api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Apply wrap-up for this conversation communication func (a ConversationsApi) PostConversationsCallbackParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, body Wrapupinput) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallbackParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallbackParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsCallbackParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCallbackParticipantReplace invokes POST /api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/replace // // Replace this participant with the specified user and/or address func (a ConversationsApi) PostConversationsCallbackParticipantReplace(conversationId string, participantId string, body Transferrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/replace" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCallbackParticipantReplace") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCallbackParticipantReplace") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallbackParticipantReplace") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCallbacks invokes POST /api/v2/conversations/callbacks // // Create a Callback func (a ConversationsApi) PostConversationsCallbacks(body Createcallbackcommand) (*Createcallbackresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks" defaultReturn := new(Createcallbackresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallbacks") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Createcallbackresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Createcallbackresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallbacksBulkDisconnect invokes POST /api/v2/conversations/callbacks/bulk/disconnect // // Disconnect multiple scheduled callbacks func (a ConversationsApi) PostConversationsCallbacksBulkDisconnect(body Bulkcallbackdisconnectrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/bulk/disconnect" if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallbacksBulkDisconnect") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCallbacksBulkUpdate invokes POST /api/v2/conversations/callbacks/bulk/update // // Update multiple scheduled callbacks func (a ConversationsApi) PostConversationsCallbacksBulkUpdate(body Bulkcallbackpatchrequest) (*Bulkcallbackpatchresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/bulk/update" defaultReturn := new(Bulkcallbackpatchresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallbacksBulkUpdate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Bulkcallbackpatchresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Bulkcallbackpatchresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCalls invokes POST /api/v2/conversations/calls // // Create a call conversation func (a ConversationsApi) PostConversationsCalls(body Createcallrequest) (*Createcallresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls" defaultReturn := new(Createcallresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCalls") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Createcallresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Createcallresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCallsUserUserId invokes POST /api/v2/conversations/calls/user/{userId} // // Create a call conversation on behalf of a user func (a ConversationsApi) PostConversationsCallsUserUserId(userId string, body Createcallrequest) (*Createcallresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/user/{userId}" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Createcallresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'userId' is set if &userId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'userId' when calling ConversationsApi->PostConversationsCallsUserUserId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCallsUserUserId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Createcallresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Createcallresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCobrowsesessionParticipantCommunicationWrapup invokes POST /api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Apply wrap-up for this conversation communication // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PostConversationsCobrowsesessionParticipantCommunicationWrapup is deprecated func (a ConversationsApi) PostConversationsCobrowsesessionParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, body Wrapupinput) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCobrowsesessionParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCobrowsesessionParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsCobrowsesessionParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCobrowsesessionParticipantReplace invokes POST /api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/replace // // Replace this participant with the specified user and/or address // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PostConversationsCobrowsesessionParticipantReplace is deprecated func (a ConversationsApi) PostConversationsCobrowsesessionParticipantReplace(conversationId string, participantId string, body Transferrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/replace" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsCobrowsesessionParticipantReplace") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsCobrowsesessionParticipantReplace") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsCustomattributesSchemas invokes POST /api/v2/conversations/customattributes/schemas // // Create a schema func (a ConversationsApi) PostConversationsCustomattributesSchemas(body Conversationjsonschemarequest) (*Conversationdataschema, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas" defaultReturn := new(Conversationdataschema) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCustomattributesSchemas") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversationdataschema response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationdataschema" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsCustomattributesSearch invokes POST /api/v2/conversations/customattributes/search // // Search resources. func (a ConversationsApi) PostConversationsCustomattributesSearch(body Conversationcustomattributessearchrequest) (*Jsonsearchresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/search" defaultReturn := new(Jsonsearchresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsCustomattributesSearch") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Jsonsearchresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Jsonsearchresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsEmailInboundmessages invokes POST /api/v2/conversations/emails/{conversationId}/inboundmessages // // Send an email to an external conversation. An external conversation is one where the provider is not PureCloud based. This endpoint allows the sender of the external email to reply or send a new message to the existing conversation. The new message will be treated as part of the existing conversation and chained to it. func (a ConversationsApi) PostConversationsEmailInboundmessages(conversationId string, body Inboundmessagerequest) (*Emailconversation, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/inboundmessages" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailconversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsEmailInboundmessages") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsEmailInboundmessages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Emailconversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailconversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsEmailMessages invokes POST /api/v2/conversations/emails/{conversationId}/messages // // Send an email reply func (a ConversationsApi) PostConversationsEmailMessages(conversationId string, body Emailmessage) (*Emailmessagereply, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailmessagereply) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsEmailMessages") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsEmailMessages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Emailmessagereply response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailmessagereply" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsEmailMessagesDraftAttachmentsCopy invokes POST /api/v2/conversations/emails/{conversationId}/messages/draft/attachments/copy // // Copy attachments from an email message to the current draft. func (a ConversationsApi) PostConversationsEmailMessagesDraftAttachmentsCopy(conversationId string, body Copyattachmentsrequest) (*Emailmessage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages/draft/attachments/copy" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsEmailMessagesDraftAttachmentsCopy") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsEmailMessagesDraftAttachmentsCopy") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Emailmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsEmailMessagesDraftAttachmentsUploads invokes POST /api/v2/conversations/emails/{conversationId}/messages/draft/attachments/uploads // // Create a URL to upload a message attachment file // // See https://developer.genesys.cloud/analyticsdatamanagement/uploads/upload-email-attachment-files for example usage. func (a ConversationsApi) PostConversationsEmailMessagesDraftAttachmentsUploads(conversationId string, body Uploadattachmentrequest) (*Uploadattachmentresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages/draft/attachments/uploads" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Uploadattachmentresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsEmailMessagesDraftAttachmentsUploads") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsEmailMessagesDraftAttachmentsUploads") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Uploadattachmentresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Uploadattachmentresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsEmailParticipantCommunicationWrapup invokes POST /api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Apply wrap-up for this conversation communication func (a ConversationsApi) PostConversationsEmailParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, body Wrapupinput) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsEmailParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsEmailParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsEmailParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsEmailParticipantReplace invokes POST /api/v2/conversations/emails/{conversationId}/participants/{participantId}/replace // // Replace this participant with the specified user and/or address func (a ConversationsApi) PostConversationsEmailParticipantReplace(conversationId string, participantId string, body Transferrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/participants/{participantId}/replace" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsEmailParticipantReplace") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsEmailParticipantReplace") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsEmailParticipantReplace") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsEmailReconnect invokes POST /api/v2/conversations/emails/{conversationId}/reconnect // // Reconnect the user to the most recently disconnected customer on a fully disconnected email conversation // // This request is not valid when using the Client Credentials OAuth grant. func (a ConversationsApi) PostConversationsEmailReconnect(conversationId string) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/reconnect" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsEmailReconnect") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsEmails invokes POST /api/v2/conversations/emails // // Create an email conversation // // If the direction of the request is INBOUND, this will create an external conversation with a third party provider. If the direction of the the request is OUTBOUND, this will create a conversation to send outbound emails on behalf of a queue. func (a ConversationsApi) PostConversationsEmails(body Createemailrequest) (*Emailconversation, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails" defaultReturn := new(Emailconversation) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsEmails") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Emailconversation response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailconversation" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsEmailsAgentless invokes POST /api/v2/conversations/emails/agentless // // Create an email conversation, per API func (a ConversationsApi) PostConversationsEmailsAgentless(body Agentlessemailsendrequestdto) (*Agentlessemailsendresponsedto, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/agentless" defaultReturn := new(Agentlessemailsendresponsedto) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsEmailsAgentless") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Agentlessemailsendresponsedto response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Agentlessemailsendresponsedto" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsFaxes invokes POST /api/v2/conversations/faxes // // Create Fax Conversation func (a ConversationsApi) PostConversationsFaxes(body Faxsendrequest) (*Faxsendresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/faxes" defaultReturn := new(Faxsendresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsFaxes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Faxsendresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Faxsendresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsKeyconfigurations invokes POST /api/v2/conversations/keyconfigurations // // Setup configurations for encryption key creation func (a ConversationsApi) PostConversationsKeyconfigurations(body Conversationencryptionconfiguration) (*Conversationencryptionconfiguration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/keyconfigurations" defaultReturn := new(Conversationencryptionconfiguration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsKeyconfigurations") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversationencryptionconfiguration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationencryptionconfiguration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsKeyconfigurationsValidate invokes POST /api/v2/conversations/keyconfigurations/validate // // Validate encryption key configurations without saving it func (a ConversationsApi) PostConversationsKeyconfigurationsValidate(body Conversationencryptionconfiguration) (*Conversationencryptionconfiguration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/keyconfigurations/validate" defaultReturn := new(Conversationencryptionconfiguration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsKeyconfigurationsValidate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversationencryptionconfiguration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationencryptionconfiguration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageCommunicationMessages invokes POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages // // Send message // // Send message on existing conversation/communication. Only one message body field can be accepted, per request. Example: 1 textBody, 1 mediaId, or 1 messageTemplate. func (a ConversationsApi) PostConversationsMessageCommunicationMessages(conversationId string, communicationId string, body Additionalmessage) (*Messagedata, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Messagedata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageCommunicationMessages") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsMessageCommunicationMessages") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageCommunicationMessages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Messagedata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagedata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageCommunicationMessagesMedia invokes POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media // // Create media // // See https://developer.genesys.cloud/api/rest/v2/conversations/messaging-media-upload for example usage. // // Deprecated: PostConversationsMessageCommunicationMessagesMedia is deprecated func (a ConversationsApi) PostConversationsMessageCommunicationMessagesMedia(conversationId string, communicationId string) (*Messagemediadata, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Messagemediadata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageCommunicationMessagesMedia") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsMessageCommunicationMessagesMedia") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Messagemediadata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagemediadata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageCommunicationMessagesMediaUploads invokes POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media/uploads // // Create a URL to upload a message media file // // See https://developer.genesys.cloud/commdigital/digital/messagemediaupload/ for example usage. func (a ConversationsApi) PostConversationsMessageCommunicationMessagesMediaUploads(conversationId string, communicationId string, body Uploadmediarequest) (*Messagemediauploaddata, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media/uploads" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Messagemediauploaddata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageCommunicationMessagesMediaUploads") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsMessageCommunicationMessagesMediaUploads") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageCommunicationMessagesMediaUploads") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Messagemediauploaddata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagemediauploaddata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageCommunicationSocialmediaMessages invokes POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/socialmedia/messages // // Send a social media message // // Send a social media message on existing conversation/communication. func (a ConversationsApi) PostConversationsMessageCommunicationSocialmediaMessages(conversationId string, communicationId string, body Additionalsocialmediamessage) (*Socialmediamessagedata, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/socialmedia/messages" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Socialmediamessagedata) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageCommunicationSocialmediaMessages") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsMessageCommunicationSocialmediaMessages") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageCommunicationSocialmediaMessages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Socialmediamessagedata response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Socialmediamessagedata" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageCommunicationTyping invokes POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/typing // // Send message typing event // // Send message typing event for existing conversation/communication. func (a ConversationsApi) PostConversationsMessageCommunicationTyping(conversationId string, communicationId string, body Messagetypingeventrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/typing" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageCommunicationTyping") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsMessageCommunicationTyping") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageCommunicationTyping") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsMessageInboundOpenEvent invokes POST /api/v2/conversations/messages/{integrationId}/inbound/open/event // // Send an inbound Open Event Message // // Send an inbound event message to an Open Messaging integration. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will either generate a new Conversation, or be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage. func (a ConversationsApi) PostConversationsMessageInboundOpenEvent(integrationId string, body Openinboundnormalizedevent) (*Openeventnormalizedmessage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{integrationId}/inbound/open/event" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Openeventnormalizedmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PostConversationsMessageInboundOpenEvent") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageInboundOpenEvent") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Openeventnormalizedmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openeventnormalizedmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageInboundOpenMessage invokes POST /api/v2/conversations/messages/{integrationId}/inbound/open/message // // Send inbound Open Message // // Send an inbound message to an Open Messaging integration. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will either generate a new Conversation, or be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage. func (a ConversationsApi) PostConversationsMessageInboundOpenMessage(integrationId string, body Openinboundnormalizedmessage, prefetchConversationId bool) (*Openmessagenormalizedmessage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{integrationId}/inbound/open/message" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Openmessagenormalizedmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PostConversationsMessageInboundOpenMessage") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageInboundOpenMessage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } queryParams["prefetchConversationId"] = a.Configuration.APIClient.ParameterToString(prefetchConversationId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Openmessagenormalizedmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openmessagenormalizedmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageInboundOpenReceipt invokes POST /api/v2/conversations/messages/{integrationId}/inbound/open/receipt // // Send an inbound Open Receipt Message // // Send an inbound open Receipt to an Open Messaging integration. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will either generate a new Conversation, or be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage. func (a ConversationsApi) PostConversationsMessageInboundOpenReceipt(integrationId string, body Openinboundnormalizedreceipt) (*Openreceiptnormalizedmessage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{integrationId}/inbound/open/receipt" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Openreceiptnormalizedmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PostConversationsMessageInboundOpenReceipt") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageInboundOpenReceipt") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Openreceiptnormalizedmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openreceiptnormalizedmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageInboundOpenStructuredResponse invokes POST /api/v2/conversations/messages/{integrationId}/inbound/open/structured/response // // Send inbound Open Response // // Send an inbound response for a structured message to an Open Messaging integration. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage. func (a ConversationsApi) PostConversationsMessageInboundOpenStructuredResponse(integrationId string, body Openinboundstructuredresponsemessage) (*Openstructuredresponsenormalizedmessage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{integrationId}/inbound/open/structured/response" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Openstructuredresponsenormalizedmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PostConversationsMessageInboundOpenStructuredResponse") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageInboundOpenStructuredResponse") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Openstructuredresponsenormalizedmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openstructuredresponsenormalizedmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageMessagesBulk invokes POST /api/v2/conversations/messages/{conversationId}/messages/bulk // // Get messages in batch // // The path parameter [conversationId] should contain the conversationId of the conversation being filtered. The body should contain the messageId(s) of messages being requested. For example: [\"a3069a33b-bbb1-4703-9d68-061d9e9db96e\", \"55bc6be3-078c-4a49-a4e6-1e05776ed7e8\"]. The max messages you can request in the body is 1,000. Best practice is to limit to only the messages you need in each request, rather than request large batches by default. func (a ConversationsApi) PostConversationsMessageMessagesBulk(conversationId string, body []string) (*Textmessagelisting, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/messages/bulk" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Textmessagelisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageMessagesBulk") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Textmessagelisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Textmessagelisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageParticipantCommunicationSummaries invokes POST /api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}/summaries // // Request an on-demand summary for a message communication. func (a ConversationsApi) PostConversationsMessageParticipantCommunicationSummaries(conversationId string, participantId string, communicationId string, body Ondemandconversationsummaryrequest) (*Ondemandsummaryacceptedresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}/summaries" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Ondemandsummaryacceptedresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageParticipantCommunicationSummaries") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsMessageParticipantCommunicationSummaries") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsMessageParticipantCommunicationSummaries") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Ondemandsummaryacceptedresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Ondemandsummaryacceptedresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessageParticipantCommunicationWrapup invokes POST /api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Apply wrap-up for this conversation communication func (a ConversationsApi) PostConversationsMessageParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, body Wrapupinput) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsMessageParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsMessageParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsMessageParticipantMonitor invokes POST /api/v2/conversations/messages/{conversationId}/participants/{participantId}/monitor // // Listen in on the conversation from the point of view of a given participant. func (a ConversationsApi) PostConversationsMessageParticipantMonitor(conversationId string, participantId string) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/monitor" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageParticipantMonitor") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsMessageParticipantMonitor") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsMessageParticipantReplace invokes POST /api/v2/conversations/messages/{conversationId}/participants/{participantId}/replace // // Replace this participant with the specified user and/or address func (a ConversationsApi) PostConversationsMessageParticipantReplace(conversationId string, participantId string, body Transferrequest) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/participants/{participantId}/replace" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsMessageParticipantReplace") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsMessageParticipantReplace") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessageParticipantReplace") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsMessages invokes POST /api/v2/conversations/messages // // Create an outbound messaging conversation. // // If there is an existing conversation between the remote address and the address associated with the queue specified in createOutboundRequest then the result of this request depends on the state of that conversation and the useExistingConversation field of createOutboundRequest. If the existing conversation is in alerting or connected state, then the request will fail. If the existing conversation is disconnected but still within the conversation window then the request will fail unless useExistingConversation is set to true. func (a ConversationsApi) PostConversationsMessages(body Createoutboundmessagingconversationrequest) (*Createoutboundmessagingconversationresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages" defaultReturn := new(Createoutboundmessagingconversationresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Createoutboundmessagingconversationresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Createoutboundmessagingconversationresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagesAgentless invokes POST /api/v2/conversations/messages/agentless // // Send an agentless outbound message // // Send an agentless (api participant) outbound message using a client credential grant. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. If there is already a connected conversation between the 'fromAddress' and recipient specified, the 'useExistingActiveConversation' param can be used to barge in to the ongoing conversation. func (a ConversationsApi) PostConversationsMessagesAgentless(body Sendagentlessoutboundmessagerequest) (*Sendagentlessoutboundmessageresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/agentless" defaultReturn := new(Sendagentlessoutboundmessageresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagesAgentless") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Sendagentlessoutboundmessageresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Sendagentlessoutboundmessageresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagesInboundOpen invokes POST /api/v2/conversations/messages/inbound/open // // Send an inbound Open Message // // [This API is deprecated. Instead, use 1. POST /api/v2/conversations/messages/{integrationId}/inbound/open/event, if you want to send an inbound Open Event Message 2. POST /api/v2/conversations/messages/{integrationId}/inbound/open/message, if you want to send an inbound Open Message 3. POST /api/v2/conversations/messages/{integrationId}/inbound/open/receipt, to send an inbound Open Receipt Message] In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will either generate a new Conversation, or be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage. // // Deprecated: PostConversationsMessagesInboundOpen is deprecated func (a ConversationsApi) PostConversationsMessagesInboundOpen(body Opennormalizedmessage) (*Opennormalizedmessage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/inbound/open" defaultReturn := new(Opennormalizedmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagesInboundOpen") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Opennormalizedmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Opennormalizedmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsApple invokes POST /api/v2/conversations/messaging/integrations/apple // // Create Apple Integration func (a ConversationsApi) PostConversationsMessagingIntegrationsApple(body Appleintegrationrequest) (*Appleintegration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/apple" defaultReturn := new(Appleintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsApple") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Appleintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Appleintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsFacebook invokes POST /api/v2/conversations/messaging/integrations/facebook // // Create a Facebook Integration func (a ConversationsApi) PostConversationsMessagingIntegrationsFacebook(body Facebookintegrationrequest) (*Facebookintegration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/facebook" defaultReturn := new(Facebookintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsFacebook") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Facebookintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Facebookintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsInstagram invokes POST /api/v2/conversations/messaging/integrations/instagram // // Create Instagram Integration func (a ConversationsApi) PostConversationsMessagingIntegrationsInstagram(body Instagramintegrationrequest) (*Instagramintegration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/instagram" defaultReturn := new(Instagramintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsInstagram") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Instagramintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Instagramintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsOpen invokes POST /api/v2/conversations/messaging/integrations/open // // Create an Open messaging integration // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. func (a ConversationsApi) PostConversationsMessagingIntegrationsOpen(body Openintegrationrequest) (*Openintegration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open" defaultReturn := new(Openintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsOpen") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Openintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofile invokes POST /api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile // // Create an Open messaging integration with the Google Business Profile extension // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. // // Preview: PostConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofile is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) PostConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofile(body Googlebusinessprofileopenintegrationrequest) (*Googlebusinessprofileopenintegration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile" defaultReturn := new(Googlebusinessprofileopenintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofile") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Googlebusinessprofileopenintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Googlebusinessprofileopenintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileTokens invokes POST /api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/tokens // // Create a Google Auth Token by exchanging the one-time auth code retrieved from Google // // See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. // // Preview: PostConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileTokens is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) PostConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileTokens(body Googleauthtokenrequest) (*Googleauthtoken, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/open/extensions/googlebusinessprofile/tokens" defaultReturn := new(Googleauthtoken) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsOpenExtensionsGooglebusinessprofileTokens") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Googleauthtoken response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Googleauthtoken" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsTwitter invokes POST /api/v2/conversations/messaging/integrations/twitter // // Create Twitter Integration func (a ConversationsApi) PostConversationsMessagingIntegrationsTwitter(body Twitterintegrationrequest) (*Twitterintegration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/twitter" defaultReturn := new(Twitterintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsTwitter") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Twitterintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Twitterintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsWhatsapp invokes POST /api/v2/conversations/messaging/integrations/whatsapp // // [This API is deprecated. Use POST /api/v2/conversations/messaging/integrations/whatsapp/embeddedsignup instead] Create a WhatsApp Integration // // [This API is deprecated. Use POST /api/v2/conversations/messaging/integrations/whatsapp/embeddedsignup instead] You must be approved by WhatsApp to use this feature. Your approved e164-formatted phone number and valid WhatsApp certificate for your number are required. Your WhatsApp certificate must have valid base64 encoding. Please paste carefully and do not add any leading or trailing spaces. Do not alter any characters. An integration must be activated within 7 days of certificate generation. If you cannot complete the addition and activation of the number within 7 days, please obtain a new certificate before creating the integration. Integrations created with an invalid number or certificate may immediately incur additional integration fees. Please carefully enter your number and certificate as described. // // Deprecated: PostConversationsMessagingIntegrationsWhatsapp is deprecated func (a ConversationsApi) PostConversationsMessagingIntegrationsWhatsapp(body Whatsappintegrationrequest) (*Whatsappintegration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/whatsapp" defaultReturn := new(Whatsappintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsWhatsapp") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Whatsappintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingIntegrationsWhatsappEmbeddedsignup invokes POST /api/v2/conversations/messaging/integrations/whatsapp/embeddedsignup // // Create a WhatsApp Integration using the WhatsApp embedded signup flow // // Use the access token (Embedded Signup v2) or the OAuth code and session_info IDs (Embedded Signup v4) from the embedded signup flow. Creation is asynchronous; poll GET until createStatus is Completed. Embedded Signup v2: name is required; select an E.164 number from availablePhoneNumbers and pass it to PATCH. Embedded Signup v4: name is optional; activate with pin only. func (a ConversationsApi) PostConversationsMessagingIntegrationsWhatsappEmbeddedsignup(body Whatsappembeddedsignupintegrationrequest) (*Whatsappintegration, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/integrations/whatsapp/embeddedsignup" defaultReturn := new(Whatsappintegration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingIntegrationsWhatsappEmbeddedsignup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Whatsappintegration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappintegration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingSettings invokes POST /api/v2/conversations/messaging/settings // // Create a messaging setting func (a ConversationsApi) PostConversationsMessagingSettings(body Messagingsettingrequest) (*Messagingsetting, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/settings" defaultReturn := new(Messagingsetting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingSettings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Messagingsetting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagingsetting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsMessagingSupportedcontent invokes POST /api/v2/conversations/messaging/supportedcontent // // Create a Supported Content profile func (a ConversationsApi) PostConversationsMessagingSupportedcontent(body Supportedcontent) (*Supportedcontent, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/supportedcontent" defaultReturn := new(Supportedcontent) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsMessagingSupportedcontent") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Supportedcontent response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Supportedcontent" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsParticipantsAttributesSearch invokes POST /api/v2/conversations/participants/attributes/search // // Search conversations func (a ConversationsApi) PostConversationsParticipantsAttributesSearch(body Conversationparticipantsearchrequest) (*Jsoncursorsearchresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/participants/attributes/search" defaultReturn := new(Jsoncursorsearchresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsParticipantsAttributesSearch") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Jsoncursorsearchresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Jsoncursorsearchresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsScreenshareParticipantCommunicationWrapup invokes POST /api/v2/conversations/screenshares/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Apply wrap-up for this conversation communication // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PostConversationsScreenshareParticipantCommunicationWrapup is deprecated func (a ConversationsApi) PostConversationsScreenshareParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, body Wrapupinput) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/screenshares/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsScreenshareParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsScreenshareParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsScreenshareParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsSocialParticipantCommunicationWrapup invokes POST /api/v2/conversations/socials/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Apply wrap-up for this conversation communication func (a ConversationsApi) PostConversationsSocialParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, body Wrapupinput) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/socials/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsSocialParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsSocialParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsSocialParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsVideoAgentconferenceCommunication invokes POST /api/v2/conversations/videos/{conversationId}/agentconference/communications/{communicationId} // // Create an Agent-Type video conference and assign an agent to it // // Preview: PostConversationsVideoAgentconferenceCommunication is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) PostConversationsVideoAgentconferenceCommunication(conversationId string, communicationId string) (*Createjoinvideoresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/videos/{conversationId}/agentconference/communications/{communicationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(Createjoinvideoresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsVideoAgentconferenceCommunication") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsVideoAgentconferenceCommunication") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } var successPayload *Createjoinvideoresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Createjoinvideoresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostConversationsVideoParticipantCommunicationWrapup invokes POST /api/v2/conversations/videos/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup // // Apply wrap-up for this conversation communication func (a ConversationsApi) PostConversationsVideoParticipantCommunicationWrapup(conversationId string, participantId string, communicationId string, body Wrapupinput) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/videos/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PostConversationsVideoParticipantCommunicationWrapup") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PostConversationsVideoParticipantCommunicationWrapup") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PostConversationsVideoParticipantCommunicationWrapup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PostConversationsVideosMeetings invokes POST /api/v2/conversations/videos/meetings // // Generate a meetingId for a given conferenceId func (a ConversationsApi) PostConversationsVideosMeetings(body Generatemeetingidrequest) (*Meetingidrecord, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/videos/meetings" defaultReturn := new(Meetingidrecord) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PostConversationsVideosMeetings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Meetingidrecord response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Meetingidrecord" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationAccessattributes invokes PUT /api/v2/conversations/{conversationId}/accessattributes // // Set the access attributes on a conversation. // // Preview: PutConversationAccessattributes is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a ConversationsApi) PutConversationAccessattributes(conversationId string, body Conversationaccessattributesupdate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/accessattributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationAccessattributes") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationAccessattributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationCustomattributes invokes PUT /api/v2/conversations/{conversationId}/customattributes // // Create or update a single custom attributes record. Updating replaces all data with the provided fields. func (a ConversationsApi) PutConversationCustomattributes(conversationId string, body Customattributesupdaterequest) (*Customattributesidresponse, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/customattributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Customattributesidresponse) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationCustomattributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Customattributesidresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Customattributesidresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationCustomattributesBulk invokes PUT /api/v2/conversations/{conversationId}/customattributes/bulk // // Create or update a list of custom attributes records. Updating replaces all data with the provided fields. func (a ConversationsApi) PutConversationCustomattributesBulk(conversationId string, body []Customattributesupdaterequest) (*Customattributesbulkupdateresponsemap, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/customattributes/bulk" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Customattributesbulkupdateresponsemap) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationCustomattributesBulk") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Customattributesbulkupdateresponsemap response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Customattributesbulkupdateresponsemap" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationParticipantFlaggedreason invokes PUT /api/v2/conversations/{conversationId}/participants/{participantId}/flaggedreason // // Set flagged reason on conversation participant to indicate bad conversation quality. func (a ConversationsApi) PutConversationParticipantFlaggedreason(conversationId string, participantId string) (*APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/participants/{participantId}/flaggedreason" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationParticipantFlaggedreason") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PutConversationParticipantFlaggedreason") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } return response, err } // PutConversationSecureattributes invokes PUT /api/v2/conversations/{conversationId}/secureattributes // // Set the secure attributes on a conversation. func (a ConversationsApi) PutConversationSecureattributes(conversationId string, body Conversationsecureattributes) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/secureattributes" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationSecureattributes") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationSecureattributes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationTags invokes PUT /api/v2/conversations/{conversationId}/tags // // Update the tags on a conversation. func (a ConversationsApi) PutConversationTags(conversationId string, body Conversationtagsupdate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/{conversationId}/tags" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationTags") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationTags") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsCallParticipantCommunicationUuidata invokes PUT /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/uuidata // // Set uuiData to be sent on future commands. func (a ConversationsApi) PutConversationsCallParticipantCommunicationUuidata(conversationId string, participantId string, communicationId string, body Setuuidatarequest) (*interface{}, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/uuidata" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) path = strings.Replace(path, "{participantId}", url.PathEscape(fmt.Sprintf("%v", participantId)), -1) path = strings.Replace(path, "{communicationId}", url.PathEscape(fmt.Sprintf("%v", communicationId)), -1) defaultReturn := new(interface{}) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsCallParticipantCommunicationUuidata") } // verify the required parameter 'participantId' is set if &participantId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'participantId' when calling ConversationsApi->PutConversationsCallParticipantCommunicationUuidata") } // verify the required parameter 'communicationId' is set if &communicationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'communicationId' when calling ConversationsApi->PutConversationsCallParticipantCommunicationUuidata") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsCallParticipantCommunicationUuidata") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *interface{} response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "interface{}" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsCallRecordingstate invokes PUT /api/v2/conversations/calls/{conversationId}/recordingstate // // Update a conversation by setting its recording state func (a ConversationsApi) PutConversationsCallRecordingstate(conversationId string, body Setrecordingstate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/calls/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsCallRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsCallRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsCallbackRecordingstate invokes PUT /api/v2/conversations/callbacks/{conversationId}/recordingstate // // Update a conversation by setting its recording state func (a ConversationsApi) PutConversationsCallbackRecordingstate(conversationId string, body Setrecordingstate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/callbacks/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsCallbackRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsCallbackRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsCobrowsesessionRecordingstate invokes PUT /api/v2/conversations/cobrowsesessions/{conversationId}/recordingstate // // Update a conversation by setting its recording state // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PutConversationsCobrowsesessionRecordingstate is deprecated func (a ConversationsApi) PutConversationsCobrowsesessionRecordingstate(conversationId string, body Setrecordingstate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/cobrowsesessions/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsCobrowsesessionRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsCobrowsesessionRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsCustomattributesSchema invokes PUT /api/v2/conversations/customattributes/schemas/{schemaId} // // Update a schema func (a ConversationsApi) PutConversationsCustomattributesSchema(schemaId string, body Conversationschemaupdaterequest) (*Conversationdataschema, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/customattributes/schemas/{schemaId}" path = strings.Replace(path, "{schemaId}", url.PathEscape(fmt.Sprintf("%v", schemaId)), -1) defaultReturn := new(Conversationdataschema) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'schemaId' is set if &schemaId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'schemaId' when calling ConversationsApi->PutConversationsCustomattributesSchema") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsCustomattributesSchema") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversationdataschema response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationdataschema" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsEmailMessagesDraft invokes PUT /api/v2/conversations/emails/{conversationId}/messages/draft // // Update conversation draft reply func (a ConversationsApi) PutConversationsEmailMessagesDraft(conversationId string, body Emailmessage) (*Emailmessage, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/messages/draft" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Emailmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsEmailMessagesDraft") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsEmailMessagesDraft") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Emailmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Emailmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsEmailRecordingstate invokes PUT /api/v2/conversations/emails/{conversationId}/recordingstate // // Update a conversation by setting its recording state func (a ConversationsApi) PutConversationsEmailRecordingstate(conversationId string, body Setrecordingstate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/emails/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsEmailRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsEmailRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsKeyconfiguration invokes PUT /api/v2/conversations/keyconfigurations/{keyconfigurationsId} // // Update the encryption key configurations func (a ConversationsApi) PutConversationsKeyconfiguration(keyconfigurationsId string, body Conversationencryptionconfiguration) (*Conversationencryptionconfiguration, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/keyconfigurations/{keyconfigurationsId}" path = strings.Replace(path, "{keyconfigurationsId}", url.PathEscape(fmt.Sprintf("%v", keyconfigurationsId)), -1) defaultReturn := new(Conversationencryptionconfiguration) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'keyconfigurationsId' is set if &keyconfigurationsId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'keyconfigurationsId' when calling ConversationsApi->PutConversationsKeyconfiguration") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsKeyconfiguration") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversationencryptionconfiguration response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationencryptionconfiguration" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessageRecordingstate invokes PUT /api/v2/conversations/messages/{conversationId}/recordingstate // // Update a conversation by setting its recording state func (a ConversationsApi) PutConversationsMessageRecordingstate(conversationId string, body Setrecordingstate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messages/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsMessageRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessageRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingIdentityresolutionIntegrationsAppleIntegrationId invokes PUT /api/v2/conversations/messaging/identityresolution/integrations/apple/{integrationId} // // Create an identity resolution settings for a Apple messaging integration func (a ConversationsApi) PutConversationsMessagingIdentityresolutionIntegrationsAppleIntegrationId(integrationId string, body Appleidentityresolutionconfig) (*Appleidentityresolutionconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/apple/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Appleidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsAppleIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsAppleIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Appleidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Appleidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingIdentityresolutionIntegrationsFacebookIntegrationId invokes PUT /api/v2/conversations/messaging/identityresolution/integrations/facebook/{integrationId} // // Create an identity resolution settings for a Facebook messaging integration func (a ConversationsApi) PutConversationsMessagingIdentityresolutionIntegrationsFacebookIntegrationId(integrationId string, body Facebookidentityresolutionconfig) (*Facebookidentityresolutionconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/facebook/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Facebookidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsFacebookIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsFacebookIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Facebookidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Facebookidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingIdentityresolutionIntegrationsInstagramIntegrationId invokes PUT /api/v2/conversations/messaging/identityresolution/integrations/instagram/{integrationId} // // Create identity resolution settings for an Instagram messaging integration func (a ConversationsApi) PutConversationsMessagingIdentityresolutionIntegrationsInstagramIntegrationId(integrationId string, body Instagramidentityresolutionconfig) (*Instagramidentityresolutionconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/instagram/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Instagramidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsInstagramIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsInstagramIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Instagramidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Instagramidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingIdentityresolutionIntegrationsOpenIntegrationId invokes PUT /api/v2/conversations/messaging/identityresolution/integrations/open/{integrationId} // // Update an open messaging integration Identity Resolution settings func (a ConversationsApi) PutConversationsMessagingIdentityresolutionIntegrationsOpenIntegrationId(integrationId string, body Openmessagingidentityresolutionconfig) (*Openmessagingidentityresolutionconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/open/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Openmessagingidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsOpenIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsOpenIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Openmessagingidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Openmessagingidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingIdentityresolutionIntegrationsTwitterIntegrationId invokes PUT /api/v2/conversations/messaging/identityresolution/integrations/twitter/{integrationId} // // Create an identity resolution settings for an X (Formally Twitter) messaging integration func (a ConversationsApi) PutConversationsMessagingIdentityresolutionIntegrationsTwitterIntegrationId(integrationId string, body Twitteridentityresolutionconfig) (*Twitteridentityresolutionconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/twitter/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Twitteridentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsTwitterIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsTwitterIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Twitteridentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Twitteridentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingIdentityresolutionIntegrationsWhatsappIntegrationId invokes PUT /api/v2/conversations/messaging/identityresolution/integrations/whatsapp/{integrationId} // // Update a whatsApp integration Identity Resolution settings func (a ConversationsApi) PutConversationsMessagingIdentityresolutionIntegrationsWhatsappIntegrationId(integrationId string, body Whatsappidentityresolutionconfig) (*Whatsappidentityresolutionconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/identityresolution/integrations/whatsapp/{integrationId}" path = strings.Replace(path, "{integrationId}", url.PathEscape(fmt.Sprintf("%v", integrationId)), -1) defaultReturn := new(Whatsappidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'integrationId' is set if &integrationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'integrationId' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsWhatsappIntegrationId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingIdentityresolutionIntegrationsWhatsappIntegrationId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Whatsappidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Whatsappidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingSettingsDefault invokes PUT /api/v2/conversations/messaging/settings/default // // Set the organization's default setting that may be applied to to integrations without settings // // When an integration is created a settings ID may be assigned to it. If the settings ID is not supplied, the default settings will be assigned to it. func (a ConversationsApi) PutConversationsMessagingSettingsDefault(body Messagingsettingdefaultrequest) (*Messagingsetting, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/settings/default" defaultReturn := new(Messagingsetting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingSettingsDefault") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Messagingsetting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Messagingsetting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingSupportedcontentDefault invokes PUT /api/v2/conversations/messaging/supportedcontent/default // // Set the organization's default supported content profile that may be assigned to an integration when it is created. // // When an integration is created a supported content ID may be assigned to it. If the supported content ID is not supplied, the default supported content profile will be assigned to it. func (a ConversationsApi) PutConversationsMessagingSupportedcontentDefault(body Supportedcontentreference) (*Supportedcontent, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/supportedcontent/default" defaultReturn := new(Supportedcontent) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingSupportedcontentDefault") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Supportedcontent response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Supportedcontent" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsMessagingThreadingtimeline invokes PUT /api/v2/conversations/messaging/threadingtimeline // // Update conversation threading window timeline for each messaging type // // PUT Conversation messaging threading timeline is intended to set the conversation threading settings for ALL messengerTypes. If you omit a messengerType in the request body then the setting for that messengerType will use the platform default value. The PUT replaces the existing setting(s) that were previously set for each messengerType. func (a ConversationsApi) PutConversationsMessagingThreadingtimeline(body Conversationthreadingwindow) (*Conversationthreadingwindow, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/messaging/threadingtimeline" defaultReturn := new(Conversationthreadingwindow) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsMessagingThreadingtimeline") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *Conversationthreadingwindow response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "Conversationthreadingwindow" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsScreenshareRecordingstate invokes PUT /api/v2/conversations/screenshares/{conversationId}/recordingstate // // Update a conversation by setting its recording state // // This endpoint is deprecated. Please see the article https://help.genesys.cloud/articles/deprecation-legacy-co-browse-and-screenshare/ // // Deprecated: PutConversationsScreenshareRecordingstate is deprecated func (a ConversationsApi) PutConversationsScreenshareRecordingstate(conversationId string, body Setrecordingstate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/screenshares/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsScreenshareRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsScreenshareRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsSocialRecordingstate invokes PUT /api/v2/conversations/socials/{conversationId}/recordingstate // // Update a conversation by setting its recording state func (a ConversationsApi) PutConversationsSocialRecordingstate(conversationId string, body Setrecordingstate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/socials/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsSocialRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsSocialRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutConversationsVideoRecordingstate invokes PUT /api/v2/conversations/videos/{conversationId}/recordingstate // // Update a conversation by setting its recording state func (a ConversationsApi) PutConversationsVideoRecordingstate(conversationId string, body Setrecordingstate) (*string, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/conversations/videos/{conversationId}/recordingstate" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(string) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'conversationId' is set if &conversationId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'conversationId' when calling ConversationsApi->PutConversationsVideoRecordingstate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling ConversationsApi->PutConversationsVideoRecordingstate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header localVarHttpHeaderAccepts := []string{ "application/json", } // set Accept header localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) if localVarHttpHeaderAccept != "" { headerParams["Accept"] = localVarHttpHeaderAccept } // body params postBody = &body var successPayload *string response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != nil { // Nothing special to do here, but do avoid processing the response } else if err == nil && response.Error != nil { err = errors.New(response.ErrorMessage) } else if response.HasBody { if "string" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err }