package platformclientv2 import ( "strings" "fmt" "errors" "net/url" "encoding/json" ) // RoutingApi provides functions for API endpoints type RoutingApi struct { Configuration *Configuration } // NewRoutingApi creates an API instance using the default configuration func NewRoutingApi() *RoutingApi { fmt.Sprintf(strings.Title(""), "") config := GetDefaultConfiguration() return &RoutingApi{ Configuration: config, } } // NewRoutingApiWithConfig creates an API instance using the provided configuration func NewRoutingApiWithConfig(config *Configuration) *RoutingApi { return &RoutingApi{ Configuration: config, } } // DeleteRoutingAssessment invokes DELETE /api/v2/routing/assessments/{assessmentId} // // Delete single benefit assessment. func (a RoutingApi) DeleteRoutingAssessment(assessmentId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/assessments/{assessmentId}" path = strings.Replace(path, "{assessmentId}", url.PathEscape(fmt.Sprintf("%v", assessmentId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'assessmentId' is set if &assessmentId == nil { // false return nil, errors.New("Missing required parameter 'assessmentId' when calling RoutingApi->DeleteRoutingAssessment") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingDirectroutingbackupSettingsMe invokes DELETE /api/v2/routing/directroutingbackup/settings/me // // Delete the user's Direct Routing Backup settings and revert to the Direct Routing Queue default. func (a RoutingApi) DeleteRoutingDirectroutingbackupSettingsMe() (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/directroutingbackup/settings/me" 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 } // DeleteRoutingEmailDomain invokes DELETE /api/v2/routing/email/domains/{domainId} // // Delete a domain func (a RoutingApi) DeleteRoutingEmailDomain(domainId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->DeleteRoutingEmailDomain") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingEmailDomainRoute invokes DELETE /api/v2/routing/email/domains/{domainName}/routes/{routeId} // // Delete a route func (a RoutingApi) DeleteRoutingEmailDomainRoute(domainName string, routeId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainName}/routes/{routeId}" path = strings.Replace(path, "{domainName}", url.PathEscape(fmt.Sprintf("%v", domainName)), -1) path = strings.Replace(path, "{routeId}", url.PathEscape(fmt.Sprintf("%v", routeId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainName' is set if &domainName == nil { // false return nil, errors.New("Missing required parameter 'domainName' when calling RoutingApi->DeleteRoutingEmailDomainRoute") } // verify the required parameter 'routeId' is set if &routeId == nil { // false return nil, errors.New("Missing required parameter 'routeId' when calling RoutingApi->DeleteRoutingEmailDomainRoute") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingEmailOutboundDomain invokes DELETE /api/v2/routing/email/outbound/domains/{domainId} // // Delete an outbound domain func (a RoutingApi) DeleteRoutingEmailOutboundDomain(domainId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains/{domainId}" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->DeleteRoutingEmailOutboundDomain") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingEmailSettingEmailSettingId invokes DELETE /api/v2/routing/email/setting/{emailSettingId} // // Delete an email setting. Removes the email setting and its associated settings func (a RoutingApi) DeleteRoutingEmailSettingEmailSettingId(emailSettingId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/setting/{emailSettingId}" path = strings.Replace(path, "{emailSettingId}", url.PathEscape(fmt.Sprintf("%v", emailSettingId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'emailSettingId' is set if &emailSettingId == nil { // false return nil, errors.New("Missing required parameter 'emailSettingId' when calling RoutingApi->DeleteRoutingEmailSettingEmailSettingId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingLanguage invokes DELETE /api/v2/routing/languages/{languageId} // // Delete a routing language func (a RoutingApi) DeleteRoutingLanguage(languageId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/languages/{languageId}" path = strings.Replace(path, "{languageId}", url.PathEscape(fmt.Sprintf("%v", languageId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'languageId' is set if &languageId == nil { // false return nil, errors.New("Missing required parameter 'languageId' when calling RoutingApi->DeleteRoutingLanguage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingPredictor invokes DELETE /api/v2/routing/predictors/{predictorId} // // Delete single predictor. func (a RoutingApi) DeleteRoutingPredictor(predictorId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/{predictorId}" path = strings.Replace(path, "{predictorId}", url.PathEscape(fmt.Sprintf("%v", predictorId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'predictorId' is set if &predictorId == nil { // false return nil, errors.New("Missing required parameter 'predictorId' when calling RoutingApi->DeleteRoutingPredictor") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingPredictorsKeyperformanceindicator invokes DELETE /api/v2/routing/predictors/keyperformanceindicators/{kpiId} // // Delete a custom Key Performance Indicator. func (a RoutingApi) DeleteRoutingPredictorsKeyperformanceindicator(kpiId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/keyperformanceindicators/{kpiId}" path = strings.Replace(path, "{kpiId}", url.PathEscape(fmt.Sprintf("%v", kpiId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'kpiId' is set if &kpiId == nil { // false return nil, errors.New("Missing required parameter 'kpiId' when calling RoutingApi->DeleteRoutingPredictorsKeyperformanceindicator") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingQueue invokes DELETE /api/v2/routing/queues/{queueId} // // Delete a queue func (a RoutingApi) DeleteRoutingQueue(queueId string, forceDelete bool) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->DeleteRoutingQueue") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["forceDelete"] = a.Configuration.APIClient.ParameterToString(forceDelete, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingQueueMember invokes DELETE /api/v2/routing/queues/{queueId}/members/{memberId} // // Delete a queue member. func (a RoutingApi) DeleteRoutingQueueMember(queueId string, memberId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/members/{memberId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) path = strings.Replace(path, "{memberId}", url.PathEscape(fmt.Sprintf("%v", memberId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->DeleteRoutingQueueMember") } // verify the required parameter 'memberId' is set if &memberId == nil { // false return nil, errors.New("Missing required parameter 'memberId' when calling RoutingApi->DeleteRoutingQueueMember") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingQueueUser invokes DELETE /api/v2/routing/queues/{queueId}/users/{memberId} // // DEPRECATED: use DELETE /routing/queues/{queueId}/members/{memberId}. Delete queue member. // // Deprecated: DeleteRoutingQueueUser is deprecated func (a RoutingApi) DeleteRoutingQueueUser(queueId string, memberId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/users/{memberId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) path = strings.Replace(path, "{memberId}", url.PathEscape(fmt.Sprintf("%v", memberId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->DeleteRoutingQueueUser") } // verify the required parameter 'memberId' is set if &memberId == nil { // false return nil, errors.New("Missing required parameter 'memberId' when calling RoutingApi->DeleteRoutingQueueUser") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingQueueWrapupcode invokes DELETE /api/v2/routing/queues/{queueId}/wrapupcodes/{codeId} // // Delete a wrap-up code from a queue func (a RoutingApi) DeleteRoutingQueueWrapupcode(queueId string, codeId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/wrapupcodes/{codeId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) path = strings.Replace(path, "{codeId}", url.PathEscape(fmt.Sprintf("%v", codeId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->DeleteRoutingQueueWrapupcode") } // verify the required parameter 'codeId' is set if &codeId == nil { // false return nil, errors.New("Missing required parameter 'codeId' when calling RoutingApi->DeleteRoutingQueueWrapupcode") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingSettings invokes DELETE /api/v2/routing/settings // // Delete an organization's routing settings func (a RoutingApi) DeleteRoutingSettings() (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/settings" 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 } // DeleteRoutingSkill invokes DELETE /api/v2/routing/skills/{skillId} // // Delete Routing Skill func (a RoutingApi) DeleteRoutingSkill(skillId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skills/{skillId}" path = strings.Replace(path, "{skillId}", url.PathEscape(fmt.Sprintf("%v", skillId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillId' is set if &skillId == nil { // false return nil, errors.New("Missing required parameter 'skillId' when calling RoutingApi->DeleteRoutingSkill") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingSkillexpression invokes DELETE /api/v2/routing/skillexpressions/{expressionId} // // Archive a skill expression to remove it from the set of active expressions func (a RoutingApi) DeleteRoutingSkillexpression(expressionId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillexpressions/{expressionId}" path = strings.Replace(path, "{expressionId}", url.PathEscape(fmt.Sprintf("%v", expressionId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'expressionId' is set if &expressionId == nil { // false return nil, errors.New("Missing required parameter 'expressionId' when calling RoutingApi->DeleteRoutingSkillexpression") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingSkillexpressions invokes DELETE /api/v2/routing/skillexpressions // // Archive a set of skill expressions to remove them from the set of active expressions func (a RoutingApi) DeleteRoutingSkillexpressions(id []string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillexpressions" 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] } 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 } response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 } // DeleteRoutingSkillgroup invokes DELETE /api/v2/routing/skillgroups/{skillGroupId} // // Remove skill group definition func (a RoutingApi) DeleteRoutingSkillgroup(skillGroupId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillgroups/{skillGroupId}" path = strings.Replace(path, "{skillGroupId}", url.PathEscape(fmt.Sprintf("%v", skillGroupId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillGroupId' is set if &skillGroupId == nil { // false return nil, errors.New("Missing required parameter 'skillGroupId' when calling RoutingApi->DeleteRoutingSkillgroup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingSmsAddress invokes DELETE /api/v2/routing/sms/addresses/{addressId} // // Delete an Address by Id for SMS func (a RoutingApi) DeleteRoutingSmsAddress(addressId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/addresses/{addressId}" path = strings.Replace(path, "{addressId}", url.PathEscape(fmt.Sprintf("%v", addressId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'addressId' is set if &addressId == nil { // false return nil, errors.New("Missing required parameter 'addressId' when calling RoutingApi->DeleteRoutingSmsAddress") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingSmsPhonenumber invokes DELETE /api/v2/routing/sms/phonenumbers/{phoneNumberId} // // Delete a phone number provisioned for SMS. func (a RoutingApi) DeleteRoutingSmsPhonenumber(phoneNumberId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/phonenumbers/{phoneNumberId}" path = strings.Replace(path, "{phoneNumberId}", url.PathEscape(fmt.Sprintf("%v", phoneNumberId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'phoneNumberId' is set if &phoneNumberId == nil { // false return nil, errors.New("Missing required parameter 'phoneNumberId' when calling RoutingApi->DeleteRoutingSmsPhonenumber") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingUserDirectroutingbackupSettings invokes DELETE /api/v2/routing/users/{userId}/directroutingbackup/settings // // Delete the user's Direct Routing Backup settings and revert to the Direct Routing Queue default. func (a RoutingApi) DeleteRoutingUserDirectroutingbackupSettings(userId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/users/{userId}/directroutingbackup/settings" 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 'userId' is set if &userId == nil { // false return nil, errors.New("Missing required parameter 'userId' when calling RoutingApi->DeleteRoutingUserDirectroutingbackupSettings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingUserUtilization invokes DELETE /api/v2/routing/users/{userId}/utilization // // Delete the user's max utilization settings and revert to the organization-wide default. func (a RoutingApi) DeleteRoutingUserUtilization(userId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/users/{userId}/utilization" 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 'userId' is set if &userId == nil { // false return nil, errors.New("Missing required parameter 'userId' when calling RoutingApi->DeleteRoutingUserUtilization") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingUtilization invokes DELETE /api/v2/routing/utilization // // Delete the organization-wide max utilization settings and revert to the system default. func (a RoutingApi) DeleteRoutingUtilization() (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization" 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 } // DeleteRoutingUtilizationLabel invokes DELETE /api/v2/routing/utilization/labels/{labelId} // // Delete a utilization label func (a RoutingApi) DeleteRoutingUtilizationLabel(labelId string, forceDelete bool) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization/labels/{labelId}" path = strings.Replace(path, "{labelId}", url.PathEscape(fmt.Sprintf("%v", labelId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'labelId' is set if &labelId == nil { // false return nil, errors.New("Missing required parameter 'labelId' when calling RoutingApi->DeleteRoutingUtilizationLabel") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["forceDelete"] = a.Configuration.APIClient.ParameterToString(forceDelete, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteRoutingWrapupcode invokes DELETE /api/v2/routing/wrapupcodes/{codeId} // // Delete wrap-up code func (a RoutingApi) DeleteRoutingWrapupcode(codeId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/wrapupcodes/{codeId}" path = strings.Replace(path, "{codeId}", url.PathEscape(fmt.Sprintf("%v", codeId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'codeId' is set if &codeId == nil { // false return nil, errors.New("Missing required parameter 'codeId' when calling RoutingApi->DeleteRoutingWrapupcode") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteUserRoutinglanguage invokes DELETE /api/v2/users/{userId}/routinglanguages/{languageId} // // Remove a routing language from a user func (a RoutingApi) DeleteUserRoutinglanguage(userId string, languageId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routinglanguages/{languageId}" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) path = strings.Replace(path, "{languageId}", url.PathEscape(fmt.Sprintf("%v", languageId)), -1) if true == false { return 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 nil, errors.New("Missing required parameter 'userId' when calling RoutingApi->DeleteUserRoutinglanguage") } // verify the required parameter 'languageId' is set if &languageId == nil { // false return nil, errors.New("Missing required parameter 'languageId' when calling RoutingApi->DeleteUserRoutinglanguage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // DeleteUserRoutingskill invokes DELETE /api/v2/users/{userId}/routingskills/{skillId} // // Remove a routing skill from a user func (a RoutingApi) DeleteUserRoutingskill(userId string, skillId string) (*APIResponse, error) { var httpMethod = "DELETE" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routingskills/{skillId}" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) path = strings.Replace(path, "{skillId}", url.PathEscape(fmt.Sprintf("%v", skillId)), -1) if true == false { return 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 nil, errors.New("Missing required parameter 'userId' when calling RoutingApi->DeleteUserRoutingskill") } // verify the required parameter 'skillId' is set if &skillId == nil { // false return nil, errors.New("Missing required parameter 'skillId' when calling RoutingApi->DeleteUserRoutingskill") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // GetRoutingAssessment invokes GET /api/v2/routing/assessments/{assessmentId} // // Retrieve a single benefit assessment. func (a RoutingApi) GetRoutingAssessment(assessmentId string) (*Benefitassessment, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/assessments/{assessmentId}" path = strings.Replace(path, "{assessmentId}", url.PathEscape(fmt.Sprintf("%v", assessmentId)), -1) defaultReturn := new(Benefitassessment) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'assessmentId' is set if &assessmentId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'assessmentId' when calling RoutingApi->GetRoutingAssessment") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Benefitassessment response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Benefitassessment" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingAssessments invokes GET /api/v2/routing/assessments // // Retrieve all benefit assessments. func (a RoutingApi) GetRoutingAssessments(before string, after string, limit string, pageSize string, queueId []string) (*Assessmentlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/assessments" defaultReturn := new(Assessmentlisting) 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["before"] = a.Configuration.APIClient.ParameterToString(before, "") queryParams["after"] = a.Configuration.APIClient.ParameterToString(after, "") queryParams["limit"] = a.Configuration.APIClient.ParameterToString(limit, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["queueId"] = a.Configuration.APIClient.ParameterToString(queueId, "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 *Assessmentlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Assessmentlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingAssessmentsJob invokes GET /api/v2/routing/assessments/jobs/{jobId} // // Retrieve a single benefit assessments job. func (a RoutingApi) GetRoutingAssessmentsJob(jobId string) (*Benefitassessmentjob, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/assessments/jobs/{jobId}" path = strings.Replace(path, "{jobId}", url.PathEscape(fmt.Sprintf("%v", jobId)), -1) defaultReturn := new(Benefitassessmentjob) 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 RoutingApi->GetRoutingAssessmentsJob") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Benefitassessmentjob response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Benefitassessmentjob" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingAssessmentsJobs invokes GET /api/v2/routing/assessments/jobs // // Retrieve all benefit assessment jobs. func (a RoutingApi) GetRoutingAssessmentsJobs(divisionId []string) (*Assessmentjoblisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/assessments/jobs" defaultReturn := new(Assessmentjoblisting) 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["divisionId"] = a.Configuration.APIClient.ParameterToString(divisionId, "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 *Assessmentjoblisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Assessmentjoblisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingAvailablemediatypes invokes GET /api/v2/routing/availablemediatypes // // Get available media types func (a RoutingApi) GetRoutingAvailablemediatypes() (*Availablemediatypeentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/availablemediatypes" defaultReturn := new(Availablemediatypeentitylisting) 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 *Availablemediatypeentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Availablemediatypeentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingDirectroutingbackupSettingsMe invokes GET /api/v2/routing/directroutingbackup/settings/me // // Get the user's Direct Routing Backup settings. func (a RoutingApi) GetRoutingDirectroutingbackupSettingsMe() (*Agentdirectroutingbackupsettings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/directroutingbackup/settings/me" defaultReturn := new(Agentdirectroutingbackupsettings) 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 *Agentdirectroutingbackupsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Agentdirectroutingbackupsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailDomain invokes GET /api/v2/routing/email/domains/{domainId} // // Get domain func (a RoutingApi) GetRoutingEmailDomain(domainId string, expand string) (*Inbounddomain, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Inbounddomain) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->GetRoutingEmailDomain") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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 *Inbounddomain response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inbounddomain" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailDomainDkim invokes GET /api/v2/routing/email/domains/{domainId}/dkim // // Get domain dkim settings func (a RoutingApi) GetRoutingEmailDomainDkim(domainId string) (*Verificationresult, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}/dkim" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Verificationresult) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->GetRoutingEmailDomainDkim") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Verificationresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Verificationresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailDomainMailfrom invokes GET /api/v2/routing/email/domains/{domainId}/mailfrom // // Get domain mail from settings func (a RoutingApi) GetRoutingEmailDomainMailfrom(domainId string) (*Mailfromresult, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}/mailfrom" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Mailfromresult) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->GetRoutingEmailDomainMailfrom") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Mailfromresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Mailfromresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailDomainRoute invokes GET /api/v2/routing/email/domains/{domainName}/routes/{routeId} // // Get a route func (a RoutingApi) GetRoutingEmailDomainRoute(domainName string, routeId string, expand []string) (*Inboundroute, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainName}/routes/{routeId}" path = strings.Replace(path, "{domainName}", url.PathEscape(fmt.Sprintf("%v", domainName)), -1) path = strings.Replace(path, "{routeId}", url.PathEscape(fmt.Sprintf("%v", routeId)), -1) defaultReturn := new(Inboundroute) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainName' is set if &domainName == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainName' when calling RoutingApi->GetRoutingEmailDomainRoute") } // verify the required parameter 'routeId' is set if &routeId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'routeId' when calling RoutingApi->GetRoutingEmailDomainRoute") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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, "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 *Inboundroute response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inboundroute" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailDomainRouteIdentityresolution invokes GET /api/v2/routing/email/domains/{domainName}/routes/{routeId}/identityresolution // // Get a route identity resolution setting. func (a RoutingApi) GetRoutingEmailDomainRouteIdentityresolution(domainName string, routeId string) (*Routeidentityresolutionconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainName}/routes/{routeId}/identityresolution" path = strings.Replace(path, "{domainName}", url.PathEscape(fmt.Sprintf("%v", domainName)), -1) path = strings.Replace(path, "{routeId}", url.PathEscape(fmt.Sprintf("%v", routeId)), -1) defaultReturn := new(Routeidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainName' is set if &domainName == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainName' when calling RoutingApi->GetRoutingEmailDomainRouteIdentityresolution") } // verify the required parameter 'routeId' is set if &routeId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'routeId' when calling RoutingApi->GetRoutingEmailDomainRouteIdentityresolution") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Routeidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routeidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailDomainRoutes invokes GET /api/v2/routing/email/domains/{domainName}/routes // // Get routes func (a RoutingApi) GetRoutingEmailDomainRoutes(domainName string, pageSize int, pageNumber int, pattern string, expand []string) (*Inboundrouteentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainName}/routes" path = strings.Replace(path, "{domainName}", url.PathEscape(fmt.Sprintf("%v", domainName)), -1) defaultReturn := new(Inboundrouteentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainName' is set if &domainName == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainName' when calling RoutingApi->GetRoutingEmailDomainRoutes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["pattern"] = a.Configuration.APIClient.ParameterToString(pattern, "") 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 *Inboundrouteentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inboundrouteentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailDomainVerification invokes GET /api/v2/routing/email/domains/{domainId}/verification // // Get domain verification settings func (a RoutingApi) GetRoutingEmailDomainVerification(domainId string) (*Verificationresult, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}/verification" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Verificationresult) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->GetRoutingEmailDomainVerification") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Verificationresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Verificationresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailDomains invokes GET /api/v2/routing/email/domains // // Get domains func (a RoutingApi) GetRoutingEmailDomains(pageSize int, pageNumber int, excludeStatus bool, filter string, expand string) (*Inbounddomainentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains" defaultReturn := new(Inbounddomainentitylisting) 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["excludeStatus"] = a.Configuration.APIClient.ParameterToString(excludeStatus, "") queryParams["filter"] = a.Configuration.APIClient.ParameterToString(filter, "") 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 *Inbounddomainentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inbounddomainentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailOutboundDomain invokes GET /api/v2/routing/email/outbound/domains/{domainId} // // Get domain func (a RoutingApi) GetRoutingEmailOutboundDomain(domainId string, expand string) (*Outbounddomain, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains/{domainId}" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Outbounddomain) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->GetRoutingEmailOutboundDomain") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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 *Outbounddomain response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Outbounddomain" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailOutboundDomainActivation invokes GET /api/v2/routing/email/outbound/domains/{domainId}/activation // // Get activation status (cname + dkim) of an outbound domain func (a RoutingApi) GetRoutingEmailOutboundDomainActivation(domainId string) (*Emailoutbounddomainresult, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains/{domainId}/activation" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Emailoutbounddomainresult) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->GetRoutingEmailOutboundDomainActivation") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Emailoutbounddomainresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailoutbounddomainresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailOutboundDomains invokes GET /api/v2/routing/email/outbound/domains // // Get outbound domains func (a RoutingApi) GetRoutingEmailOutboundDomains(pageSize int, pageNumber int, filter string, expand string) (*Outbounddomainentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains" defaultReturn := new(Outbounddomainentitylisting) 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["filter"] = a.Configuration.APIClient.ParameterToString(filter, "") 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 *Outbounddomainentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Outbounddomainentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailSetting invokes GET /api/v2/routing/email/setting // // Get a paged list of email routing settings. func (a RoutingApi) GetRoutingEmailSetting(pageSize int, pageNumber int) (*Emailsettingentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/setting" defaultReturn := new(Emailsettingentitylisting) 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 *Emailsettingentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailsettingentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailSettingEmailSettingId invokes GET /api/v2/routing/email/setting/{emailSettingId} // // Get email setting. Returns the specified email setting that defines settings for email func (a RoutingApi) GetRoutingEmailSettingEmailSettingId(emailSettingId string) (*Emailsetting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/setting/{emailSettingId}" path = strings.Replace(path, "{emailSettingId}", url.PathEscape(fmt.Sprintf("%v", emailSettingId)), -1) defaultReturn := new(Emailsetting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'emailSettingId' is set if &emailSettingId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'emailSettingId' when calling RoutingApi->GetRoutingEmailSettingEmailSettingId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Emailsetting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailsetting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingEmailSetup invokes GET /api/v2/routing/email/setup // // Get email setup func (a RoutingApi) GetRoutingEmailSetup() (*Emailsetup, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/setup" defaultReturn := new(Emailsetup) 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 *Emailsetup response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailsetup" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingLanguage invokes GET /api/v2/routing/languages/{languageId} // // Get a routing language func (a RoutingApi) GetRoutingLanguage(languageId string) (*Language, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/languages/{languageId}" path = strings.Replace(path, "{languageId}", url.PathEscape(fmt.Sprintf("%v", languageId)), -1) defaultReturn := new(Language) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'languageId' is set if &languageId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'languageId' when calling RoutingApi->GetRoutingLanguage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Language response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Language" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingLanguages invokes GET /api/v2/routing/languages // // Get the list of supported languages. func (a RoutingApi) GetRoutingLanguages(pageSize int, pageNumber int, sortOrder string, name string, id []string) (*Languageentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/languages" defaultReturn := new(Languageentitylisting) 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["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") queryParams["name"] = a.Configuration.APIClient.ParameterToString(name, "") 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 *Languageentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Languageentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingMessageRecipient invokes GET /api/v2/routing/message/recipients/{recipientId} // // Get a recipient func (a RoutingApi) GetRoutingMessageRecipient(recipientId string) (*Recipient, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/message/recipients/{recipientId}" path = strings.Replace(path, "{recipientId}", url.PathEscape(fmt.Sprintf("%v", recipientId)), -1) defaultReturn := new(Recipient) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'recipientId' is set if &recipientId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'recipientId' when calling RoutingApi->GetRoutingMessageRecipient") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Recipient response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Recipient" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingMessageRecipients invokes GET /api/v2/routing/message/recipients // // Get recipients func (a RoutingApi) GetRoutingMessageRecipients(messengerType string, name string, pageSize int, pageNumber int) (*Recipientlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/message/recipients" defaultReturn := new(Recipientlisting) 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["messengerType"] = a.Configuration.APIClient.ParameterToString(messengerType, "") queryParams["name"] = a.Configuration.APIClient.ParameterToString(name, "") 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 *Recipientlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Recipientlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingPredictor invokes GET /api/v2/routing/predictors/{predictorId} // // Retrieve a single predictor. func (a RoutingApi) GetRoutingPredictor(predictorId string) (*Predictor, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/{predictorId}" path = strings.Replace(path, "{predictorId}", url.PathEscape(fmt.Sprintf("%v", predictorId)), -1) defaultReturn := new(Predictor) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'predictorId' is set if &predictorId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'predictorId' when calling RoutingApi->GetRoutingPredictor") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Predictor response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Predictor" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingPredictorModelFeatures invokes GET /api/v2/routing/predictors/{predictorId}/models/{modelId}/features // // Retrieve Predictor Model Features. func (a RoutingApi) GetRoutingPredictorModelFeatures(predictorId string, modelId string) (*Predictormodelfeaturelisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/{predictorId}/models/{modelId}/features" path = strings.Replace(path, "{predictorId}", url.PathEscape(fmt.Sprintf("%v", predictorId)), -1) path = strings.Replace(path, "{modelId}", url.PathEscape(fmt.Sprintf("%v", modelId)), -1) defaultReturn := new(Predictormodelfeaturelisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'predictorId' is set if &predictorId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'predictorId' when calling RoutingApi->GetRoutingPredictorModelFeatures") } // verify the required parameter 'modelId' is set if &modelId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'modelId' when calling RoutingApi->GetRoutingPredictorModelFeatures") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Predictormodelfeaturelisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Predictormodelfeaturelisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingPredictorModels invokes GET /api/v2/routing/predictors/{predictorId}/models // // Retrieve Predictor Models and Top Features. func (a RoutingApi) GetRoutingPredictorModels(predictorId string) (*Predictormodels, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/{predictorId}/models" path = strings.Replace(path, "{predictorId}", url.PathEscape(fmt.Sprintf("%v", predictorId)), -1) defaultReturn := new(Predictormodels) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'predictorId' is set if &predictorId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'predictorId' when calling RoutingApi->GetRoutingPredictorModels") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Predictormodels response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Predictormodels" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingPredictors invokes GET /api/v2/routing/predictors // // Retrieve all predictors. func (a RoutingApi) GetRoutingPredictors(before string, after string, limit string, pageSize string, queueId []string, kpiId string, state string) (*Predictorlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors" defaultReturn := new(Predictorlisting) 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["before"] = a.Configuration.APIClient.ParameterToString(before, "") queryParams["after"] = a.Configuration.APIClient.ParameterToString(after, "") queryParams["limit"] = a.Configuration.APIClient.ParameterToString(limit, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["queueId"] = a.Configuration.APIClient.ParameterToString(queueId, "multi") queryParams["kpiId"] = a.Configuration.APIClient.ParameterToString(kpiId, "") 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 *Predictorlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Predictorlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingPredictorsKeyperformanceindicator invokes GET /api/v2/routing/predictors/keyperformanceindicators/{kpiId} // // Retrieve a single Key Performance Indicator. func (a RoutingApi) GetRoutingPredictorsKeyperformanceindicator(kpiId string, expand []string) (*Keyperformanceindicator, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/keyperformanceindicators/{kpiId}" path = strings.Replace(path, "{kpiId}", url.PathEscape(fmt.Sprintf("%v", kpiId)), -1) defaultReturn := new(Keyperformanceindicator) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'kpiId' is set if &kpiId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'kpiId' when calling RoutingApi->GetRoutingPredictorsKeyperformanceindicator") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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, "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 *Keyperformanceindicator response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Keyperformanceindicator" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingPredictorsKeyperformanceindicators invokes GET /api/v2/routing/predictors/keyperformanceindicators // // Get a list of Key Performance Indicators func (a RoutingApi) GetRoutingPredictorsKeyperformanceindicators(kpiGroup string, expand []string) ([]Keyperformanceindicator, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/keyperformanceindicators" defaultReturn := make([]Keyperformanceindicator, 0) 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["kpiGroup"] = a.Configuration.APIClient.ParameterToString(kpiGroup, "") 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 []Keyperformanceindicator response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "[]Keyperformanceindicator" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingPredictorsKeyperformanceindicatortypes invokes GET /api/v2/routing/predictors/keyperformanceindicatortypes // // Get a list of Key Performance Indicators Types available. func (a RoutingApi) GetRoutingPredictorsKeyperformanceindicatortypes() ([]Keyperformanceindicatortype, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/keyperformanceindicatortypes" defaultReturn := make([]Keyperformanceindicatortype, 0) 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 []Keyperformanceindicatortype response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "[]Keyperformanceindicatortype" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueue invokes GET /api/v2/routing/queues/{queueId} // // Get details about this queue. func (a RoutingApi) GetRoutingQueue(queueId string, expand []string) (*Queue, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Queue) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueue") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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, "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 *Queue response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queue" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueAssistant invokes GET /api/v2/routing/queues/{queueId}/assistant // // Get an assistant associated with a queue. func (a RoutingApi) GetRoutingQueueAssistant(queueId string, expand []string, languageVariation string, fallbackToPrimaryAssistant bool) (*Assistantqueue, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/assistant" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Assistantqueue) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueAssistant") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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, "multi") queryParams["languageVariation"] = a.Configuration.APIClient.ParameterToString(languageVariation, "") queryParams["fallbackToPrimaryAssistant"] = a.Configuration.APIClient.ParameterToString(fallbackToPrimaryAssistant, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Assistantqueue response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Assistantqueue" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueComparisonperiod invokes GET /api/v2/routing/queues/{queueId}/comparisonperiods/{comparisonPeriodId} // // Get a Comparison Period. func (a RoutingApi) GetRoutingQueueComparisonperiod(queueId string, comparisonPeriodId string) (*Comparisonperiod, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/comparisonperiods/{comparisonPeriodId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) path = strings.Replace(path, "{comparisonPeriodId}", url.PathEscape(fmt.Sprintf("%v", comparisonPeriodId)), -1) defaultReturn := new(Comparisonperiod) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueComparisonperiod") } // verify the required parameter 'comparisonPeriodId' is set if &comparisonPeriodId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'comparisonPeriodId' when calling RoutingApi->GetRoutingQueueComparisonperiod") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Comparisonperiod response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Comparisonperiod" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueComparisonperiods invokes GET /api/v2/routing/queues/{queueId}/comparisonperiods // // Get list of comparison periods func (a RoutingApi) GetRoutingQueueComparisonperiods(queueId string) (*Comparisonperiodlisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/comparisonperiods" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Comparisonperiodlisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueComparisonperiods") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Comparisonperiodlisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Comparisonperiodlisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueEstimatedwaittime invokes GET /api/v2/routing/queues/{queueId}/estimatedwaittime // // Get Estimated Wait Time func (a RoutingApi) GetRoutingQueueEstimatedwaittime(queueId string, conversationId string) (*Estimatedwaittimepredictions, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/estimatedwaittime" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Estimatedwaittimepredictions) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueEstimatedwaittime") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["conversationId"] = a.Configuration.APIClient.ParameterToString(conversationId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Estimatedwaittimepredictions response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Estimatedwaittimepredictions" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueIdentityresolution invokes GET /api/v2/routing/queues/{queueId}/identityresolution // // Get Queue IdentityResolution Settings. func (a RoutingApi) GetRoutingQueueIdentityresolution(queueId string) (*Identityresolutionqueueconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/identityresolution" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Identityresolutionqueueconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueIdentityresolution") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Identityresolutionqueueconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Identityresolutionqueueconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueMediatypeEstimatedwaittime invokes GET /api/v2/routing/queues/{queueId}/mediatypes/{mediaType}/estimatedwaittime // // Get Estimated Wait Time func (a RoutingApi) GetRoutingQueueMediatypeEstimatedwaittime(queueId string, mediaType string, labelId string) (*Estimatedwaittimepredictions, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/mediatypes/{mediaType}/estimatedwaittime" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) path = strings.Replace(path, "{mediaType}", url.PathEscape(fmt.Sprintf("%v", mediaType)), -1) defaultReturn := new(Estimatedwaittimepredictions) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueMediatypeEstimatedwaittime") } // verify the required parameter 'mediaType' is set if &mediaType == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'mediaType' when calling RoutingApi->GetRoutingQueueMediatypeEstimatedwaittime") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["labelId"] = a.Configuration.APIClient.ParameterToString(labelId, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Estimatedwaittimepredictions response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Estimatedwaittimepredictions" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueMembers invokes GET /api/v2/routing/queues/{queueId}/members // // Get the members of this queue. func (a RoutingApi) GetRoutingQueueMembers(queueId string, pageNumber int, pageSize int, sortOrder string, expand []string, name string, profileSkills []string, skills []string, languages []string, routingStatus []string, presence []string, memberBy string, joined bool) (*Queuememberentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/members" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Queuememberentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueMembers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "multi") queryParams["name"] = a.Configuration.APIClient.ParameterToString(name, "") queryParams["profileSkills"] = a.Configuration.APIClient.ParameterToString(profileSkills, "multi") queryParams["skills"] = a.Configuration.APIClient.ParameterToString(skills, "multi") queryParams["languages"] = a.Configuration.APIClient.ParameterToString(languages, "multi") queryParams["routingStatus"] = a.Configuration.APIClient.ParameterToString(routingStatus, "multi") queryParams["presence"] = a.Configuration.APIClient.ParameterToString(presence, "multi") queryParams["memberBy"] = a.Configuration.APIClient.ParameterToString(memberBy, "") queryParams["joined"] = a.Configuration.APIClient.ParameterToString(joined, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Queuememberentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queuememberentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueUsers invokes GET /api/v2/routing/queues/{queueId}/users // // DEPRECATED: use GET /routing/queues/{queueId}/members. Get the members of this queue. // // Deprecated: GetRoutingQueueUsers is deprecated func (a RoutingApi) GetRoutingQueueUsers(queueId string, pageNumber int, pageSize int, sortOrder string, expand []string, joined bool, name string, profileSkills []string, skills []string, languages []string, routingStatus []string, presence []string) (*Queuememberentitylistingv1, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/users" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Queuememberentitylistingv1) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueUsers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") queryParams["expand"] = a.Configuration.APIClient.ParameterToString(expand, "multi") queryParams["joined"] = a.Configuration.APIClient.ParameterToString(joined, "") queryParams["name"] = a.Configuration.APIClient.ParameterToString(name, "") queryParams["profileSkills"] = a.Configuration.APIClient.ParameterToString(profileSkills, "multi") queryParams["skills"] = a.Configuration.APIClient.ParameterToString(skills, "multi") queryParams["languages"] = a.Configuration.APIClient.ParameterToString(languages, "multi") queryParams["routingStatus"] = a.Configuration.APIClient.ParameterToString(routingStatus, "multi") queryParams["presence"] = a.Configuration.APIClient.ParameterToString(presence, "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 *Queuememberentitylistingv1 response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queuememberentitylistingv1" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueueWrapupcodes invokes GET /api/v2/routing/queues/{queueId}/wrapupcodes // // Get the wrap-up codes for a queue func (a RoutingApi) GetRoutingQueueWrapupcodes(queueId string, pageSize int, pageNumber int, name string) (*Wrapupcodeentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/wrapupcodes" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Wrapupcodeentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingQueueWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["name"] = a.Configuration.APIClient.ParameterToString(name, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Wrapupcodeentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Wrapupcodeentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueues invokes GET /api/v2/routing/queues // // Get list of queues. func (a RoutingApi) GetRoutingQueues(pageNumber int, pageSize int, sortOrder string, name string, id []string, divisionId []string, peerId []string, cannedResponseLibraryId string, hasPeer bool, expand []string) (*Queueentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues" defaultReturn := new(Queueentitylisting) 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["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") queryParams["name"] = a.Configuration.APIClient.ParameterToString(name, "") queryParams["id"] = a.Configuration.APIClient.ParameterToString(id, "multi") queryParams["divisionId"] = a.Configuration.APIClient.ParameterToString(divisionId, "multi") queryParams["peerId"] = a.Configuration.APIClient.ParameterToString(peerId, "multi") queryParams["cannedResponseLibraryId"] = a.Configuration.APIClient.ParameterToString(cannedResponseLibraryId, "") queryParams["hasPeer"] = a.Configuration.APIClient.ParameterToString(hasPeer, "") 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 *Queueentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queueentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueuesDivisionviews invokes GET /api/v2/routing/queues/divisionviews // // Get a paged listing of simplified queue objects, filterable by name, queue ID(s), or division ID(s). func (a RoutingApi) GetRoutingQueuesDivisionviews(pageSize int, pageNumber int, sortBy string, sortOrder string, name string, id []string, divisionId []string) (*Queueentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/divisionviews" defaultReturn := new(Queueentitylisting) 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["sortBy"] = a.Configuration.APIClient.ParameterToString(sortBy, "") queryParams["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") queryParams["name"] = a.Configuration.APIClient.ParameterToString(name, "") queryParams["id"] = a.Configuration.APIClient.ParameterToString(id, "multi") queryParams["divisionId"] = a.Configuration.APIClient.ParameterToString(divisionId, "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 *Queueentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queueentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueuesDivisionviewsAll invokes GET /api/v2/routing/queues/divisionviews/all // // Get a paged listing of simplified queue objects, sorted by name. Can be used to get a digest of all queues in an organization. func (a RoutingApi) GetRoutingQueuesDivisionviewsAll(pageSize int, pageNumber int, sortOrder string) (*Queueentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/divisionviews/all" defaultReturn := new(Queueentitylisting) 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["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Queueentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queueentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingQueuesMe invokes GET /api/v2/routing/queues/me // // Get a paged listing of queues the user is a member of. func (a RoutingApi) GetRoutingQueuesMe(pageNumber int, pageSize int, joined bool, sortOrder string) (*Userqueueentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/me" defaultReturn := new(Userqueueentitylisting) 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["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["joined"] = a.Configuration.APIClient.ParameterToString(joined, "") queryParams["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userqueueentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userqueueentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSettings invokes GET /api/v2/routing/settings // // Get an organization's routing settings func (a RoutingApi) GetRoutingSettings() (*Routingsettings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/settings" defaultReturn := new(Routingsettings) 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 *Routingsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routingsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSettingsContactcenter invokes GET /api/v2/routing/settings/contactcenter // // Get Contact Center Settings func (a RoutingApi) GetRoutingSettingsContactcenter() (*Contactcentersettings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/settings/contactcenter" defaultReturn := new(Contactcentersettings) 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 *Contactcentersettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Contactcentersettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSettingsTranscription invokes GET /api/v2/routing/settings/transcription // // Get Transcription Settings func (a RoutingApi) GetRoutingSettingsTranscription() (*Transcriptionsettings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/settings/transcription" defaultReturn := new(Transcriptionsettings) 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 *Transcriptionsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Transcriptionsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkill invokes GET /api/v2/routing/skills/{skillId} // // Get Routing Skill func (a RoutingApi) GetRoutingSkill(skillId string) (*Routingskill, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skills/{skillId}" path = strings.Replace(path, "{skillId}", url.PathEscape(fmt.Sprintf("%v", skillId)), -1) defaultReturn := new(Routingskill) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillId' is set if &skillId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'skillId' when calling RoutingApi->GetRoutingSkill") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Routingskill response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routingskill" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkillexpression invokes GET /api/v2/routing/skillexpressions/{expressionId} // // Get a skill expression by ID func (a RoutingApi) GetRoutingSkillexpression(expressionId string, includeArchived bool, format string) (*Skillexpression, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillexpressions/{expressionId}" path = strings.Replace(path, "{expressionId}", url.PathEscape(fmt.Sprintf("%v", expressionId)), -1) defaultReturn := new(Skillexpression) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'expressionId' is set if &expressionId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'expressionId' when calling RoutingApi->GetRoutingSkillexpression") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["includeArchived"] = a.Configuration.APIClient.ParameterToString(includeArchived, "") queryParams["format"] = a.Configuration.APIClient.ParameterToString(format, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Skillexpression response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillexpression" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkillexpressions invokes GET /api/v2/routing/skillexpressions // // Get skill expressions func (a RoutingApi) GetRoutingSkillexpressions(format string, includeArchived bool, id []string) (*Skillexpressionentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillexpressions" defaultReturn := new(Skillexpressionentitylisting) 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["format"] = a.Configuration.APIClient.ParameterToString(format, "") queryParams["includeArchived"] = a.Configuration.APIClient.ParameterToString(includeArchived, "") 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 *Skillexpressionentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillexpressionentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkillexpressionsQueueQueueId invokes GET /api/v2/routing/skillexpressions/queue/{queueId} // // Get skill expressions associated with a queue func (a RoutingApi) GetRoutingSkillexpressionsQueueQueueId(queueId string, format string, includeArchived bool) (*Skillexpressionentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillexpressions/queue/{queueId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Skillexpressionentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->GetRoutingSkillexpressionsQueueQueueId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["format"] = a.Configuration.APIClient.ParameterToString(format, "") queryParams["includeArchived"] = a.Configuration.APIClient.ParameterToString(includeArchived, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Skillexpressionentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillexpressionentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkillgroup invokes GET /api/v2/routing/skillgroups/{skillGroupId} // // Get skill group func (a RoutingApi) GetRoutingSkillgroup(skillGroupId string) (*Skillgroup, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillgroups/{skillGroupId}" path = strings.Replace(path, "{skillGroupId}", url.PathEscape(fmt.Sprintf("%v", skillGroupId)), -1) defaultReturn := new(Skillgroup) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillGroupId' is set if &skillGroupId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'skillGroupId' when calling RoutingApi->GetRoutingSkillgroup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Skillgroup response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillgroup" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkillgroupMembers invokes GET /api/v2/routing/skillgroups/{skillGroupId}/members // // Get skill group members func (a RoutingApi) GetRoutingSkillgroupMembers(skillGroupId string, pageSize int, after string, before string, expand string) (*Skillgroupmemberentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillgroups/{skillGroupId}/members" path = strings.Replace(path, "{skillGroupId}", url.PathEscape(fmt.Sprintf("%v", skillGroupId)), -1) defaultReturn := new(Skillgroupmemberentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillGroupId' is set if &skillGroupId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'skillGroupId' when calling RoutingApi->GetRoutingSkillgroupMembers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["after"] = a.Configuration.APIClient.ParameterToString(after, "") queryParams["before"] = a.Configuration.APIClient.ParameterToString(before, "") 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 *Skillgroupmemberentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillgroupmemberentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkillgroupMembersDivisions invokes GET /api/v2/routing/skillgroups/{skillGroupId}/members/divisions // // Get list of member divisions for this skill group. func (a RoutingApi) GetRoutingSkillgroupMembersDivisions(skillGroupId string, expand string) (*Skillgroupmemberdivisionlist, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillgroups/{skillGroupId}/members/divisions" path = strings.Replace(path, "{skillGroupId}", url.PathEscape(fmt.Sprintf("%v", skillGroupId)), -1) defaultReturn := new(Skillgroupmemberdivisionlist) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillGroupId' is set if &skillGroupId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'skillGroupId' when calling RoutingApi->GetRoutingSkillgroupMembersDivisions") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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 *Skillgroupmemberdivisionlist response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillgroupmemberdivisionlist" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkillgroups invokes GET /api/v2/routing/skillgroups // // Get skill group listing func (a RoutingApi) GetRoutingSkillgroups(pageSize int, name string, after string, before string) (*Skillgroupentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillgroups" defaultReturn := new(Skillgroupentitylisting) 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["name"] = a.Configuration.APIClient.ParameterToString(name, "") queryParams["after"] = a.Configuration.APIClient.ParameterToString(after, "") queryParams["before"] = a.Configuration.APIClient.ParameterToString(before, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Skillgroupentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillgroupentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSkills invokes GET /api/v2/routing/skills // // Get the list of routing skills. View permission enforcement only applies to skills assigned to a division. func (a RoutingApi) GetRoutingSkills(pageSize int, pageNumber int, name string, id []string) (*Skillentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skills" defaultReturn := new(Skillentitylisting) 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["name"] = a.Configuration.APIClient.ParameterToString(name, "") 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 *Skillentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSmsAddress invokes GET /api/v2/routing/sms/addresses/{addressId} // // Get an Address by Id for SMS func (a RoutingApi) GetRoutingSmsAddress(addressId string) (*Smsaddress, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/addresses/{addressId}" path = strings.Replace(path, "{addressId}", url.PathEscape(fmt.Sprintf("%v", addressId)), -1) defaultReturn := new(Smsaddress) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'addressId' is set if &addressId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'addressId' when calling RoutingApi->GetRoutingSmsAddress") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsaddress response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsaddress" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSmsAddresses invokes GET /api/v2/routing/sms/addresses // // Get a list of Addresses for SMS func (a RoutingApi) GetRoutingSmsAddresses(pageSize int, pageNumber int) (*Smsaddressentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/addresses" defaultReturn := new(Smsaddressentitylisting) 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 *Smsaddressentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsaddressentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSmsAvailablephonenumbers invokes GET /api/v2/routing/sms/availablephonenumbers // // Get a list of available phone numbers for SMS provisioning. // // This request will return up to 30 random phone numbers matching the criteria specified. To get additional phone numbers repeat the request. func (a RoutingApi) GetRoutingSmsAvailablephonenumbers(countryCode string, phoneNumberType string, region string, city string, areaCode string, pattern string, addressRequirement string) (*Smsavailablephonenumberentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/availablephonenumbers" defaultReturn := new(Smsavailablephonenumberentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'countryCode' is set if &countryCode == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'countryCode' when calling RoutingApi->GetRoutingSmsAvailablephonenumbers") } // verify the required parameter 'phoneNumberType' is set if &phoneNumberType == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'phoneNumberType' when calling RoutingApi->GetRoutingSmsAvailablephonenumbers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["countryCode"] = a.Configuration.APIClient.ParameterToString(countryCode, "") queryParams["region"] = a.Configuration.APIClient.ParameterToString(region, "") queryParams["city"] = a.Configuration.APIClient.ParameterToString(city, "") queryParams["areaCode"] = a.Configuration.APIClient.ParameterToString(areaCode, "") queryParams["phoneNumberType"] = a.Configuration.APIClient.ParameterToString(phoneNumberType, "") queryParams["pattern"] = a.Configuration.APIClient.ParameterToString(pattern, "") queryParams["addressRequirement"] = a.Configuration.APIClient.ParameterToString(addressRequirement, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsavailablephonenumberentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsavailablephonenumberentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSmsIdentityresolutionPhonenumber invokes GET /api/v2/routing/sms/identityresolution/phonenumbers/{addressId} // // Get a SMS identity resolution settings. func (a RoutingApi) GetRoutingSmsIdentityresolutionPhonenumber(addressId string) (*Smsidentityresolutionconfig, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/identityresolution/phonenumbers/{addressId}" path = strings.Replace(path, "{addressId}", url.PathEscape(fmt.Sprintf("%v", addressId)), -1) defaultReturn := new(Smsidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'addressId' is set if &addressId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'addressId' when calling RoutingApi->GetRoutingSmsIdentityresolutionPhonenumber") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSmsPhonenumber invokes GET /api/v2/routing/sms/phonenumbers/{phoneNumberId} // // Get a phone number provisioned for SMS. // // When no supported content profile is explicitly set on an MMS-capable phone number, the system uses the \"SMS Default\" profile. This default profile allows all media types (*_/_*) for inbound messages and specific image types (image/gif, image/jpeg, image/png) for outbound messages. The \"SMS Default\" profile does not have an ID and cannot be modified. To customize media filtering, create and assign a custom supported content profile using the PATCH endpoint. func (a RoutingApi) GetRoutingSmsPhonenumber(phoneNumberId string, expand string) (*Smsphonenumber, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/phonenumbers/{phoneNumberId}" path = strings.Replace(path, "{phoneNumberId}", url.PathEscape(fmt.Sprintf("%v", phoneNumberId)), -1) defaultReturn := new(Smsphonenumber) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'phoneNumberId' is set if &phoneNumberId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'phoneNumberId' when calling RoutingApi->GetRoutingSmsPhonenumber") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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 *Smsphonenumber response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsphonenumber" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingSmsPhonenumbers invokes GET /api/v2/routing/sms/phonenumbers // // Get a list of provisioned phone numbers. // // When no supported content profile is explicitly set, the system uses the \"SMS Default\" profile. This default profile allows all media types (*_/_*) for inbound messages and specific image types (image/gif, image/jpeg, image/png) for outbound messages. The \"SMS Default\" profile does not have an ID and cannot be modified. To customize media filtering, create and assign a custom supported content profile. func (a RoutingApi) GetRoutingSmsPhonenumbers(phoneNumber string, phoneNumberType []string, phoneNumberStatus []string, countryCode []string, pageSize int, pageNumber int, sortBy string, sortOrder string, language string, integrationId string, supportedContentId string, expand []string) (*Smsphonenumberentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/phonenumbers" defaultReturn := new(Smsphonenumberentitylisting) 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["phoneNumber"] = a.Configuration.APIClient.ParameterToString(phoneNumber, "") queryParams["phoneNumberType"] = a.Configuration.APIClient.ParameterToString(phoneNumberType, "multi") queryParams["phoneNumberStatus"] = a.Configuration.APIClient.ParameterToString(phoneNumberStatus, "multi") queryParams["countryCode"] = a.Configuration.APIClient.ParameterToString(countryCode, "multi") queryParams["pageSize"] = a.Configuration.APIClient.ParameterToString(pageSize, "") queryParams["pageNumber"] = a.Configuration.APIClient.ParameterToString(pageNumber, "") queryParams["sortBy"] = a.Configuration.APIClient.ParameterToString(sortBy, "") queryParams["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") queryParams["language"] = a.Configuration.APIClient.ParameterToString(language, "") queryParams["integrationId"] = a.Configuration.APIClient.ParameterToString(integrationId, "") queryParams["supportedContentId"] = a.Configuration.APIClient.ParameterToString(supportedContentId, "") 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 *Smsphonenumberentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsphonenumberentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingUserDirectroutingbackupSettings invokes GET /api/v2/routing/users/{userId}/directroutingbackup/settings // // Get the user's Direct Routing Backup settings. func (a RoutingApi) GetRoutingUserDirectroutingbackupSettings(userId string) (*Agentdirectroutingbackupsettings, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/users/{userId}/directroutingbackup/settings" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Agentdirectroutingbackupsettings) 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 RoutingApi->GetRoutingUserDirectroutingbackupSettings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Agentdirectroutingbackupsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Agentdirectroutingbackupsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingUserUtilization invokes GET /api/v2/routing/users/{userId}/utilization // // Get the user's max utilization settings. If not configured, the organization-wide default is returned. func (a RoutingApi) GetRoutingUserUtilization(userId string) (*Agentmaxutilizationresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/users/{userId}/utilization" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Agentmaxutilizationresponse) 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 RoutingApi->GetRoutingUserUtilization") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Agentmaxutilizationresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Agentmaxutilizationresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingUtilization invokes GET /api/v2/routing/utilization // // Get the organization-wide max utilization settings. func (a RoutingApi) GetRoutingUtilization() (*Utilizationresponse, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization" defaultReturn := new(Utilizationresponse) 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 *Utilizationresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Utilizationresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingUtilizationLabel invokes GET /api/v2/routing/utilization/labels/{labelId} // // Get details about this utilization label func (a RoutingApi) GetRoutingUtilizationLabel(labelId string) (*Utilizationlabel, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization/labels/{labelId}" path = strings.Replace(path, "{labelId}", url.PathEscape(fmt.Sprintf("%v", labelId)), -1) defaultReturn := new(Utilizationlabel) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'labelId' is set if &labelId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'labelId' when calling RoutingApi->GetRoutingUtilizationLabel") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Utilizationlabel response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Utilizationlabel" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingUtilizationLabelAgents invokes GET /api/v2/routing/utilization/labels/{labelId}/agents // // Get list of agent ids associated with a utilization label func (a RoutingApi) GetRoutingUtilizationLabelAgents(labelId string) ([]interface{}, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization/labels/{labelId}/agents" path = strings.Replace(path, "{labelId}", url.PathEscape(fmt.Sprintf("%v", labelId)), -1) defaultReturn := make([]interface{}, 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 'labelId' is set if &labelId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'labelId' when calling RoutingApi->GetRoutingUtilizationLabelAgents") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 []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 } // GetRoutingUtilizationLabels invokes GET /api/v2/routing/utilization/labels // // Get list of utilization labels func (a RoutingApi) GetRoutingUtilizationLabels(pageSize int, pageNumber int, sortOrder string, name string) (*Utilizationlabelentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization/labels" defaultReturn := new(Utilizationlabelentitylisting) 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["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") queryParams["name"] = a.Configuration.APIClient.ParameterToString(name, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Utilizationlabelentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Utilizationlabelentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingWrapupcode invokes GET /api/v2/routing/wrapupcodes/{codeId} // // Get details about this wrap-up code. func (a RoutingApi) GetRoutingWrapupcode(codeId string) (*Wrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/wrapupcodes/{codeId}" path = strings.Replace(path, "{codeId}", url.PathEscape(fmt.Sprintf("%v", codeId)), -1) defaultReturn := new(Wrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'codeId' is set if &codeId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'codeId' when calling RoutingApi->GetRoutingWrapupcode") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // GetRoutingWrapupcodes invokes GET /api/v2/routing/wrapupcodes // // Get list of wrapup codes. func (a RoutingApi) GetRoutingWrapupcodes(pageSize int, pageNumber int, sortBy string, sortOrder string, name string, id []string, divisionId []string) (*Wrapupcodeentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/wrapupcodes" defaultReturn := new(Wrapupcodeentitylisting) 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["sortBy"] = a.Configuration.APIClient.ParameterToString(sortBy, "") queryParams["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") queryParams["name"] = a.Configuration.APIClient.ParameterToString(name, "") queryParams["id"] = a.Configuration.APIClient.ParameterToString(id, "multi") queryParams["divisionId"] = a.Configuration.APIClient.ParameterToString(divisionId, "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 *Wrapupcodeentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Wrapupcodeentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetRoutingWrapupcodesDivisionview invokes GET /api/v2/routing/wrapupcodes/divisionviews/{codeId} // // Get a simplified wrap-up code. func (a RoutingApi) GetRoutingWrapupcodesDivisionview(codeId string) (*Wrapupcode, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/wrapupcodes/divisionviews/{codeId}" path = strings.Replace(path, "{codeId}", url.PathEscape(fmt.Sprintf("%v", codeId)), -1) defaultReturn := new(Wrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'codeId' is set if &codeId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'codeId' when calling RoutingApi->GetRoutingWrapupcodesDivisionview") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // GetRoutingWrapupcodesDivisionviews invokes GET /api/v2/routing/wrapupcodes/divisionviews // // Get a paged listing of simplified wrapup code objects, filterable by name, wrapup code ID(s), or division ID(s). // // Specifying both name and ID parameters is not supported. func (a RoutingApi) GetRoutingWrapupcodesDivisionviews(pageSize int, pageNumber int, name string, id []string, divisionId []string, includeState string) (*Wrapupcodeentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/wrapupcodes/divisionviews" defaultReturn := new(Wrapupcodeentitylisting) 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["name"] = a.Configuration.APIClient.ParameterToString(name, "") queryParams["id"] = a.Configuration.APIClient.ParameterToString(id, "multi") queryParams["divisionId"] = a.Configuration.APIClient.ParameterToString(divisionId, "multi") queryParams["includeState"] = a.Configuration.APIClient.ParameterToString(includeState, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Wrapupcodeentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Wrapupcodeentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetUserQueues invokes GET /api/v2/users/{userId}/queues // // Get queues for user func (a RoutingApi) GetUserQueues(userId string, pageSize int, pageNumber int, joined bool, divisionId []string) (*Userqueueentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/queues" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userqueueentitylisting) 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 RoutingApi->GetUserQueues") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["joined"] = a.Configuration.APIClient.ParameterToString(joined, "") queryParams["divisionId"] = a.Configuration.APIClient.ParameterToString(divisionId, "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 *Userqueueentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userqueueentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetUserRoutinglanguages invokes GET /api/v2/users/{userId}/routinglanguages // // List routing languages assigned to a user func (a RoutingApi) GetUserRoutinglanguages(userId string, pageSize int, pageNumber int, sortOrder string) (*Userlanguageentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routinglanguages" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userlanguageentitylisting) 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 RoutingApi->GetUserRoutinglanguages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userlanguageentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userlanguageentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetUserRoutingskills invokes GET /api/v2/users/{userId}/routingskills // // List routing skills assigned to a user func (a RoutingApi) GetUserRoutingskills(userId string, pageSize int, pageNumber int, sortOrder string) (*Userskillentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routingskills" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userskillentitylisting) 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 RoutingApi->GetUserRoutingskills") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["sortOrder"] = a.Configuration.APIClient.ParameterToString(sortOrder, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userskillentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userskillentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // GetUserSkillgroups invokes GET /api/v2/users/{userId}/skillgroups // // Get skill groups for a user func (a RoutingApi) GetUserSkillgroups(userId string, pageSize int, after string, before string) (*Userskillgroupentitylisting, *APIResponse, error) { var httpMethod = "GET" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/skillgroups" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userskillgroupentitylisting) 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 RoutingApi->GetUserSkillgroups") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["after"] = a.Configuration.APIClient.ParameterToString(after, "") queryParams["before"] = a.Configuration.APIClient.ParameterToString(before, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userskillgroupentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userskillgroupentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingConversation invokes PATCH /api/v2/routing/conversations/{conversationId} // // Update attributes of an in-queue conversation // // Returns an object indicating the updated values of all settable attributes. Supported attributes: skillIds, skillExpression, languageId, and priority. func (a RoutingApi) PatchRoutingConversation(conversationId string, body Routingconversationattributesrequest) (*Routingconversationattributesresponse, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/conversations/{conversationId}" path = strings.Replace(path, "{conversationId}", url.PathEscape(fmt.Sprintf("%v", conversationId)), -1) defaultReturn := new(Routingconversationattributesresponse) 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 RoutingApi->PatchRoutingConversation") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingConversation") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Routingconversationattributesresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routingconversationattributesresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingEmailDomain invokes PATCH /api/v2/routing/email/domains/{domainId} // // Update domain settings func (a RoutingApi) PatchRoutingEmailDomain(domainId string, body Inbounddomainpatchrequest) (*Inbounddomain, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Inbounddomain) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PatchRoutingEmailDomain") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingEmailDomain") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Inbounddomain response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inbounddomain" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingEmailDomainValidate invokes PATCH /api/v2/routing/email/domains/{domainId}/validate // // Validate domain settings func (a RoutingApi) PatchRoutingEmailDomainValidate(domainId string, body Inbounddomainpatchrequest) (*Inbounddomain, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}/validate" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Inbounddomain) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PatchRoutingEmailDomainValidate") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingEmailDomainValidate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Inbounddomain response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inbounddomain" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingEmailOutboundDomain invokes PATCH /api/v2/routing/email/outbound/domains/{domainId} // // Update configurable settings for an email domain, such as changing the sending method (e.g., to or from SMTP). func (a RoutingApi) PatchRoutingEmailOutboundDomain(domainId string, body Outbounddomainpatchrequest) (*Outbounddomain, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains/{domainId}" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Outbounddomain) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PatchRoutingEmailOutboundDomain") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingEmailOutboundDomain") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Outbounddomain response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Outbounddomain" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingEmailSettingEmailSettingId invokes PATCH /api/v2/routing/email/setting/{emailSettingId} // // Update an email setting. Modifies the settings for email setting func (a RoutingApi) PatchRoutingEmailSettingEmailSettingId(emailSettingId string, body Emailsetting) (*Emailsetting, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/setting/{emailSettingId}" path = strings.Replace(path, "{emailSettingId}", url.PathEscape(fmt.Sprintf("%v", emailSettingId)), -1) defaultReturn := new(Emailsetting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'emailSettingId' is set if &emailSettingId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'emailSettingId' when calling RoutingApi->PatchRoutingEmailSettingEmailSettingId") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingEmailSettingEmailSettingId") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Emailsetting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailsetting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingPredictor invokes PATCH /api/v2/routing/predictors/{predictorId} // // Update single predictor. func (a RoutingApi) PatchRoutingPredictor(predictorId string, body Patchpredictorrequest) (*Predictor, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/{predictorId}" path = strings.Replace(path, "{predictorId}", url.PathEscape(fmt.Sprintf("%v", predictorId)), -1) defaultReturn := new(Predictor) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'predictorId' is set if &predictorId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'predictorId' when calling RoutingApi->PatchRoutingPredictor") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Predictor response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Predictor" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingPredictorsKeyperformanceindicator invokes PATCH /api/v2/routing/predictors/keyperformanceindicators/{kpiId} // // Update a custom Key Performance Indicator. func (a RoutingApi) PatchRoutingPredictorsKeyperformanceindicator(kpiId string, body Updatekpirequest) (*Keyperformanceindicator, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/keyperformanceindicators/{kpiId}" path = strings.Replace(path, "{kpiId}", url.PathEscape(fmt.Sprintf("%v", kpiId)), -1) defaultReturn := new(Keyperformanceindicator) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'kpiId' is set if &kpiId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'kpiId' when calling RoutingApi->PatchRoutingPredictorsKeyperformanceindicator") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Keyperformanceindicator response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Keyperformanceindicator" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingQueueMember invokes PATCH /api/v2/routing/queues/{queueId}/members/{memberId} // // Update the ring number OR joined status for a queue member. func (a RoutingApi) PatchRoutingQueueMember(queueId string, memberId string, body Queuemember) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/members/{memberId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) path = strings.Replace(path, "{memberId}", url.PathEscape(fmt.Sprintf("%v", memberId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PatchRoutingQueueMember") } // verify the required parameter 'memberId' is set if &memberId == nil { // false return nil, errors.New("Missing required parameter 'memberId' when calling RoutingApi->PatchRoutingQueueMember") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingQueueMember") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // PatchRoutingQueueMembers invokes PATCH /api/v2/routing/queues/{queueId}/members // // Join or unjoin a set of up to 100 users for a queue // // Users can only be joined to queues where they have membership. Non-member user-queue pairs in the request will be disregarded. Note: This operation is processed asynchronously and the response data may not reflect the final state. Changes may take time to propagate. Query the GET endpoint after a delay to retrieve the current membership status. func (a RoutingApi) PatchRoutingQueueMembers(queueId string, body []Queuemember) (*Queuememberentitylisting, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/members" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Queuememberentitylisting) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PatchRoutingQueueMembers") } // verify the required parameter 'body' is set if &body == nil { // true return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingQueueMembers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Queuememberentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queuememberentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingQueueUser invokes PATCH /api/v2/routing/queues/{queueId}/users/{memberId} // // DEPRECATED: use PATCH /routing/queues/{queueId}/members/{memberId}. Update the ring number OR joined status for a User in a Queue. // // Deprecated: PatchRoutingQueueUser is deprecated func (a RoutingApi) PatchRoutingQueueUser(queueId string, memberId string, body Queuemember) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/users/{memberId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) path = strings.Replace(path, "{memberId}", url.PathEscape(fmt.Sprintf("%v", memberId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PatchRoutingQueueUser") } // verify the required parameter 'memberId' is set if &memberId == nil { // false return nil, errors.New("Missing required parameter 'memberId' when calling RoutingApi->PatchRoutingQueueUser") } // verify the required parameter 'body' is set if &body == nil { // false return nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingQueueUser") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // PatchRoutingQueueUsers invokes PATCH /api/v2/routing/queues/{queueId}/users // // DEPRECATED: use PATCH /routing/queues/{queueId}/members. Join or unjoin a set of users for a queue. // // Deprecated: PatchRoutingQueueUsers is deprecated func (a RoutingApi) PatchRoutingQueueUsers(queueId string, body []Queuemember) (*Queuememberentitylistingv1, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/users" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Queuememberentitylistingv1) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PatchRoutingQueueUsers") } // verify the required parameter 'body' is set if &body == nil { // true return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingQueueUsers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Queuememberentitylistingv1 response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queuememberentitylistingv1" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingSettingsContactcenter invokes PATCH /api/v2/routing/settings/contactcenter // // Update Contact Center Settings func (a RoutingApi) PatchRoutingSettingsContactcenter(body Contactcentersettings) (*APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/settings/contactcenter" 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 RoutingApi->PatchRoutingSettingsContactcenter") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // PatchRoutingSettingsTranscription invokes PATCH /api/v2/routing/settings/transcription // // Patch Transcription Settings func (a RoutingApi) PatchRoutingSettingsTranscription(body Transcriptionsettings) (*Transcriptionsettings, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/settings/transcription" defaultReturn := new(Transcriptionsettings) 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 RoutingApi->PatchRoutingSettingsTranscription") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Transcriptionsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Transcriptionsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingSkill invokes PATCH /api/v2/routing/skills/{skillId} // // Update Routing Skill Division func (a RoutingApi) PatchRoutingSkill(skillId string, body Updateskilldivisionrequest) (*Routingskill, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skills/{skillId}" path = strings.Replace(path, "{skillId}", url.PathEscape(fmt.Sprintf("%v", skillId)), -1) defaultReturn := new(Routingskill) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillId' is set if &skillId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'skillId' when calling RoutingApi->PatchRoutingSkill") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingSkill") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Routingskill response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routingskill" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingSkillgroup invokes PATCH /api/v2/routing/skillgroups/{skillGroupId} // // Update skill group definition func (a RoutingApi) PatchRoutingSkillgroup(skillGroupId string, body Skillgroup) (*Skillgroup, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillgroups/{skillGroupId}" path = strings.Replace(path, "{skillGroupId}", url.PathEscape(fmt.Sprintf("%v", skillGroupId)), -1) defaultReturn := new(Skillgroup) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillGroupId' is set if &skillGroupId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'skillGroupId' when calling RoutingApi->PatchRoutingSkillgroup") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingSkillgroup") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Skillgroup response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillgroup" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchRoutingSmsPhonenumber invokes PATCH /api/v2/routing/sms/phonenumbers/{phoneNumberId} // // Update a phone number provisioned for SMS. // // Use this endpoint to assign a custom supported content profile to an MMS-capable phone number. If no supported content profile is set, the phone number uses the \"SMS Default\" profile, which allows all media types (*_/_*) for inbound messages and specific image types (image/gif, image/jpeg, image/png) for outbound messages. To customize media filtering, provide a supported content profile ID in the request body. func (a RoutingApi) PatchRoutingSmsPhonenumber(phoneNumberId string, body Smsphonenumberpatchrequest) (*Smsphonenumber, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/phonenumbers/{phoneNumberId}" path = strings.Replace(path, "{phoneNumberId}", url.PathEscape(fmt.Sprintf("%v", phoneNumberId)), -1) defaultReturn := new(Smsphonenumber) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'phoneNumberId' is set if &phoneNumberId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'phoneNumberId' when calling RoutingApi->PatchRoutingSmsPhonenumber") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchRoutingSmsPhonenumber") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsphonenumber response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsphonenumber" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchUserQueue invokes PATCH /api/v2/users/{userId}/queues/{queueId} // // Join or unjoin a queue for a user func (a RoutingApi) PatchUserQueue(queueId string, userId string, body Userqueue) (*Userqueue, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/queues/{queueId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userqueue) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PatchUserQueue") } // verify the required parameter 'userId' is set if &userId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'userId' when calling RoutingApi->PatchUserQueue") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchUserQueue") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userqueue response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userqueue" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchUserQueues invokes PATCH /api/v2/users/{userId}/queues // // Join or unjoin a set of queues for a user // // Users can only be joined to queues where they have membership. Non-member user-queue pairs in the request will be disregarded. Note: This operation is processed asynchronously and the response data may not reflect the final state. Changes may take time to propagate. Query the GET endpoint after a delay to retrieve the current membership status. func (a RoutingApi) PatchUserQueues(userId string, body []Userqueue, divisionId []string) (*Userqueueentitylisting, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/queues" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userqueueentitylisting) 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 RoutingApi->PatchUserQueues") } // verify the required parameter 'body' is set if &body == nil { // true return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchUserQueues") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["divisionId"] = a.Configuration.APIClient.ParameterToString(divisionId, "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 } // body params postBody = &body var successPayload *Userqueueentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userqueueentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchUserRoutinglanguage invokes PATCH /api/v2/users/{userId}/routinglanguages/{languageId} // // Update an assigned routing language's proficiency func (a RoutingApi) PatchUserRoutinglanguage(userId string, languageId string, body Userroutinglanguage) (*Userroutinglanguage, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routinglanguages/{languageId}" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) path = strings.Replace(path, "{languageId}", url.PathEscape(fmt.Sprintf("%v", languageId)), -1) defaultReturn := new(Userroutinglanguage) 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 RoutingApi->PatchUserRoutinglanguage") } // verify the required parameter 'languageId' is set if &languageId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'languageId' when calling RoutingApi->PatchUserRoutinglanguage") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchUserRoutinglanguage") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userroutinglanguage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userroutinglanguage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchUserRoutinglanguagesBulk invokes PATCH /api/v2/users/{userId}/routinglanguages/bulk // // Assign multiple routing languages to a user. Max 50 routing languages in request body func (a RoutingApi) PatchUserRoutinglanguagesBulk(userId string, body []Userroutinglanguagepost) (*Userlanguageentitylisting, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routinglanguages/bulk" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userlanguageentitylisting) 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 RoutingApi->PatchUserRoutinglanguagesBulk") } // verify the required parameter 'body' is set if &body == nil { // true return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchUserRoutinglanguagesBulk") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userlanguageentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userlanguageentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PatchUserRoutingskillsBulk invokes PATCH /api/v2/users/{userId}/routingskills/bulk // // Assign multiple routing skills to a user func (a RoutingApi) PatchUserRoutingskillsBulk(userId string, body []Userroutingskillpost) (*Userskillentitylisting, *APIResponse, error) { var httpMethod = "PATCH" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routingskills/bulk" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userskillentitylisting) 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 RoutingApi->PatchUserRoutingskillsBulk") } // verify the required parameter 'body' is set if &body == nil { // true return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PatchUserRoutingskillsBulk") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userskillentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userskillentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostAnalyticsQueuesObservationsQuery invokes POST /api/v2/analytics/queues/observations/query // // Query for queue observations func (a RoutingApi) PostAnalyticsQueuesObservationsQuery(body Queueobservationquery) (*Queueobservationqueryresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/queues/observations/query" defaultReturn := new(Queueobservationqueryresponse) 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 RoutingApi->PostAnalyticsQueuesObservationsQuery") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Queueobservationqueryresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queueobservationqueryresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostAnalyticsRoutingActivityQuery invokes POST /api/v2/analytics/routing/activity/query // // Query for user activity observations func (a RoutingApi) PostAnalyticsRoutingActivityQuery(body Routingactivityquery, pageSize int, pageNumber int) (*Routingactivityresponse, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/analytics/routing/activity/query" defaultReturn := new(Routingactivityresponse) 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 RoutingApi->PostAnalyticsRoutingActivityQuery") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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 *Routingactivityresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routingactivityresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingAssessments invokes POST /api/v2/routing/assessments // // Create a benefit assessment. func (a RoutingApi) PostRoutingAssessments(body Createbenefitassessmentrequest) (*Benefitassessment, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/assessments" defaultReturn := new(Benefitassessment) 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 } // body params postBody = &body var successPayload *Benefitassessment response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Benefitassessment" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingAssessmentsJobs invokes POST /api/v2/routing/assessments/jobs // // Create a benefit assessment job. func (a RoutingApi) PostRoutingAssessmentsJobs(body Createbenefitassessmentjobrequest) (*Benefitassessmentjob, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/assessments/jobs" defaultReturn := new(Benefitassessmentjob) 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 } // body params postBody = &body var successPayload *Benefitassessmentjob response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Benefitassessmentjob" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailDomainDkim invokes POST /api/v2/routing/email/domains/{domainId}/dkim // // Restart domain dkim func (a RoutingApi) PostRoutingEmailDomainDkim(domainId string) (*Verificationresult, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}/dkim" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Verificationresult) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PostRoutingEmailDomainDkim") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Verificationresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Verificationresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailDomainMailfrom invokes POST /api/v2/routing/email/domains/{domainId}/mailfrom // // Set domain mail from settings func (a RoutingApi) PostRoutingEmailDomainMailfrom(domainId string, body Mailfromresult) (*Mailfromresult, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}/mailfrom" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Mailfromresult) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PostRoutingEmailDomainMailfrom") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PostRoutingEmailDomainMailfrom") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Mailfromresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Mailfromresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailDomainRoutes invokes POST /api/v2/routing/email/domains/{domainName}/routes // // Create a route func (a RoutingApi) PostRoutingEmailDomainRoutes(domainName string, body Inboundroute) (*Inboundroute, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainName}/routes" path = strings.Replace(path, "{domainName}", url.PathEscape(fmt.Sprintf("%v", domainName)), -1) defaultReturn := new(Inboundroute) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainName' is set if &domainName == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainName' when calling RoutingApi->PostRoutingEmailDomainRoutes") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PostRoutingEmailDomainRoutes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Inboundroute response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inboundroute" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailDomainTestconnection invokes POST /api/v2/routing/email/domains/{domainId}/testconnection // // Tests the custom SMTP server integration connection set on this ACD domain // // The request body is optional. If omitted, this endpoint will just test the connection of the Custom SMTP Server used by the ACD domain. If the body is specified, there will be an attempt to send an email message to the server. func (a RoutingApi) PostRoutingEmailDomainTestconnection(domainId string, body Testmessage) (*Testmessage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}/testconnection" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Testmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PostRoutingEmailDomainTestconnection") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Testmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Testmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailDomainVerification invokes POST /api/v2/routing/email/domains/{domainId}/verification // // Restart domain verification func (a RoutingApi) PostRoutingEmailDomainVerification(domainId string) (*Verificationresult, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainId}/verification" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Verificationresult) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PostRoutingEmailDomainVerification") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Verificationresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Verificationresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailDomains invokes POST /api/v2/routing/email/domains // // Create a domain func (a RoutingApi) PostRoutingEmailDomains(body Inbounddomaincreaterequest) (*Inbounddomain, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains" defaultReturn := new(Inbounddomain) 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 RoutingApi->PostRoutingEmailDomains") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Inbounddomain response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inbounddomain" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailOutboundDomainTestconnection invokes POST /api/v2/routing/email/outbound/domains/{domainId}/testconnection // // Tests the custom SMTP server integration connection set on this outbound domain // // The request body is optional. If omitted, this endpoint will just test the connection of the Custom SMTP Server for the outbound domain. If the body is specified, there will be an attempt to send an email message to the server. func (a RoutingApi) PostRoutingEmailOutboundDomainTestconnection(domainId string, body Testmessage) (*Testmessage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains/{domainId}/testconnection" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Testmessage) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PostRoutingEmailOutboundDomainTestconnection") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Testmessage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Testmessage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailOutboundDomains invokes POST /api/v2/routing/email/outbound/domains // // Create a domain func (a RoutingApi) PostRoutingEmailOutboundDomains(body Outbounddomaincreaterequest) (*Emailoutbounddomainresult, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains" defaultReturn := new(Emailoutbounddomainresult) 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 RoutingApi->PostRoutingEmailOutboundDomains") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Emailoutbounddomainresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailoutbounddomainresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailOutboundDomainsSimulated invokes POST /api/v2/routing/email/outbound/domains/simulated // // Create a simulated domain func (a RoutingApi) PostRoutingEmailOutboundDomainsSimulated(body Outbounddomaincreaterequest) (*Emailoutbounddomainresult, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains/simulated" defaultReturn := new(Emailoutbounddomainresult) 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 RoutingApi->PostRoutingEmailOutboundDomainsSimulated") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Emailoutbounddomainresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailoutbounddomainresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingEmailSetting invokes POST /api/v2/routing/email/setting // // Create a new email setting. Used to define various settings, that can then be associated with email domains func (a RoutingApi) PostRoutingEmailSetting(body Emailsetting) (*Emailsetting, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/setting" defaultReturn := new(Emailsetting) 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 RoutingApi->PostRoutingEmailSetting") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Emailsetting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailsetting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingLanguages invokes POST /api/v2/routing/languages // // Create Language func (a RoutingApi) PostRoutingLanguages(body Language) (*Language, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/languages" defaultReturn := new(Language) 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 RoutingApi->PostRoutingLanguages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Language response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Language" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingPredictors invokes POST /api/v2/routing/predictors // // Create a predictor. func (a RoutingApi) PostRoutingPredictors(body Createpredictorrequest) (*Predictor, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors" defaultReturn := new(Predictor) 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 } // body params postBody = &body var successPayload *Predictor response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Predictor" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingPredictorsKeyperformanceindicators invokes POST /api/v2/routing/predictors/keyperformanceindicators // // Create a custom Key Performance Indicator. func (a RoutingApi) PostRoutingPredictorsKeyperformanceindicators(body Createkpirequest) (*Keyperformanceindicator, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/predictors/keyperformanceindicators" defaultReturn := new(Keyperformanceindicator) 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 RoutingApi->PostRoutingPredictorsKeyperformanceindicators") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Keyperformanceindicator response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Keyperformanceindicator" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingQueueMembers invokes POST /api/v2/routing/queues/{queueId}/members // // Bulk add or delete up to 100 queue members func (a RoutingApi) PostRoutingQueueMembers(queueId string, body []Writableentity, delete bool) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/members" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PostRoutingQueueMembers") } // verify the required parameter 'body' is set if &body == nil { // true return nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PostRoutingQueueMembers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["delete"] = a.Configuration.APIClient.ParameterToString(delete, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // PostRoutingQueueUsers invokes POST /api/v2/routing/queues/{queueId}/users // // DEPRECATED: use POST /routing/queues/{queueId}/members. Bulk add or delete up to 100 queue members. // // Deprecated: PostRoutingQueueUsers is deprecated func (a RoutingApi) PostRoutingQueueUsers(queueId string, body []Writableentity, delete bool) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/users" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PostRoutingQueueUsers") } // verify the required parameter 'body' is set if &body == nil { // true return nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PostRoutingQueueUsers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.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["delete"] = a.Configuration.APIClient.ParameterToString(delete, "") // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // PostRoutingQueueWrapupcodes invokes POST /api/v2/routing/queues/{queueId}/wrapupcodes // // Add up to 100 wrap-up codes to a queue func (a RoutingApi) PostRoutingQueueWrapupcodes(queueId string, body []Wrapupcodereference) ([]Wrapupcode, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/wrapupcodes" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -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 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PostRoutingQueueWrapupcodes") } // verify the required parameter 'body' is set if &body == nil { // true return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PostRoutingQueueWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 []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 } // PostRoutingQueues invokes POST /api/v2/routing/queues // // Create a queue func (a RoutingApi) PostRoutingQueues(body Createqueuerequest) (*Queue, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues" defaultReturn := new(Queue) 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 RoutingApi->PostRoutingQueues") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Queue response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queue" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingSkillexpressionsValidate invokes POST /api/v2/routing/skillexpressions/validate // // Validate and normalize a skill expression func (a RoutingApi) PostRoutingSkillexpressionsValidate(body Skillexpressiondata) (*Skillexpressionvalidationresult, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillexpressions/validate" defaultReturn := new(Skillexpressionvalidationresult) 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 RoutingApi->PostRoutingSkillexpressionsValidate") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Skillexpressionvalidationresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillexpressionvalidationresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingSkillgroupMembersDivisions invokes POST /api/v2/routing/skillgroups/{skillGroupId}/members/divisions // // Add or remove member divisions for this skill group. func (a RoutingApi) PostRoutingSkillgroupMembersDivisions(skillGroupId string, body Skillgroupmemberdivisions) (*APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillgroups/{skillGroupId}/members/divisions" path = strings.Replace(path, "{skillGroupId}", url.PathEscape(fmt.Sprintf("%v", skillGroupId)), -1) if true == false { return nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'skillGroupId' is set if &skillGroupId == nil { // false return nil, errors.New("Missing required parameter 'skillGroupId' when calling RoutingApi->PostRoutingSkillgroupMembersDivisions") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 } // PostRoutingSkillgroups invokes POST /api/v2/routing/skillgroups // // Create a skill group func (a RoutingApi) PostRoutingSkillgroups(body Skillgroupwithmemberdivisions) (*Skillgroupwithmemberdivisions, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skillgroups" defaultReturn := new(Skillgroupwithmemberdivisions) 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 RoutingApi->PostRoutingSkillgroups") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Skillgroupwithmemberdivisions response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Skillgroupwithmemberdivisions" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingSkills invokes POST /api/v2/routing/skills // // Create Skill func (a RoutingApi) PostRoutingSkills(body Createroutingskill) (*Routingskill, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/skills" defaultReturn := new(Routingskill) 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 RoutingApi->PostRoutingSkills") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Routingskill response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routingskill" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingSmsAddresses invokes POST /api/v2/routing/sms/addresses // // Provision an Address for SMS func (a RoutingApi) PostRoutingSmsAddresses(body Smsaddressprovision) (*Smsaddress, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/addresses" defaultReturn := new(Smsaddress) 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 RoutingApi->PostRoutingSmsAddresses") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsaddress response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsaddress" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingSmsPhonenumbers invokes POST /api/v2/routing/sms/phonenumbers // // Provision a phone number for SMS // // When provisioning an MMS-capable phone number, if no supported content profile is specified in the request, the system automatically assigns the \"SMS Default\" profile. This default profile allows all media types (*_/_*) for inbound messages and specific image types (image/gif, image/jpeg, image/png) for outbound messages. To use custom media filtering, specify a supported content profile ID in the request body. func (a RoutingApi) PostRoutingSmsPhonenumbers(body Smsphonenumberprovision) (*Smsphonenumber, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/phonenumbers" defaultReturn := new(Smsphonenumber) 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 RoutingApi->PostRoutingSmsPhonenumbers") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsphonenumber response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsphonenumber" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingSmsPhonenumbersAlphanumeric invokes POST /api/v2/routing/sms/phonenumbers/alphanumeric // // Provision an alphanumeric number for SMS // // Preview: PostRoutingSmsPhonenumbersAlphanumeric is a preview method and is subject to both breaking and non-breaking changes at any time without notice func (a RoutingApi) PostRoutingSmsPhonenumbersAlphanumeric(body Smsalphanumericprovision) (*Smsphonenumber, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/phonenumbers/alphanumeric" defaultReturn := new(Smsphonenumber) 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 RoutingApi->PostRoutingSmsPhonenumbersAlphanumeric") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsphonenumber response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsphonenumber" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingSmsPhonenumbersImport invokes POST /api/v2/routing/sms/phonenumbers/import // // Imports a phone number for SMS func (a RoutingApi) PostRoutingSmsPhonenumbersImport(body Smsphonenumberimport) (*Smsphonenumber, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/phonenumbers/import" defaultReturn := new(Smsphonenumber) 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 RoutingApi->PostRoutingSmsPhonenumbersImport") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsphonenumber response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsphonenumber" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingUtilizationLabels invokes POST /api/v2/routing/utilization/labels // // Create a utilization label func (a RoutingApi) PostRoutingUtilizationLabels(body Createutilizationlabelrequest) (*Utilizationlabel, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization/labels" defaultReturn := new(Utilizationlabel) 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 RoutingApi->PostRoutingUtilizationLabels") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Utilizationlabel response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Utilizationlabel" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostRoutingWrapupcodes invokes POST /api/v2/routing/wrapupcodes // // Create a wrap-up code func (a RoutingApi) PostRoutingWrapupcodes(body Wrapupcoderequest) (*Wrapupcode, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/wrapupcodes" defaultReturn := new(Wrapupcode) 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 RoutingApi->PostRoutingWrapupcodes") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *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 } // PostUserRoutinglanguages invokes POST /api/v2/users/{userId}/routinglanguages // // Assign a routing language to a user func (a RoutingApi) PostUserRoutinglanguages(userId string, body Userroutinglanguagepost) (*Userroutinglanguage, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routinglanguages" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userroutinglanguage) 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 RoutingApi->PostUserRoutinglanguages") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PostUserRoutinglanguages") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userroutinglanguage response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userroutinglanguage" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PostUserRoutingskills invokes POST /api/v2/users/{userId}/routingskills // // Assign a routing skill to a user func (a RoutingApi) PostUserRoutingskills(userId string, body Userroutingskillpost) (*Userroutingskill, *APIResponse, error) { var httpMethod = "POST" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routingskills" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userroutingskill) 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 RoutingApi->PostUserRoutingskills") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PostUserRoutingskills") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userroutingskill response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userroutingskill" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingDirectroutingbackupSettingsMe invokes PUT /api/v2/routing/directroutingbackup/settings/me // // Update the user's Direct Routing Backup settings. func (a RoutingApi) PutRoutingDirectroutingbackupSettingsMe(body Agentdirectroutingbackupsettings) (*Agentdirectroutingbackupsettings, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/directroutingbackup/settings/me" defaultReturn := new(Agentdirectroutingbackupsettings) 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 RoutingApi->PutRoutingDirectroutingbackupSettingsMe") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Agentdirectroutingbackupsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Agentdirectroutingbackupsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingEmailDomainRoute invokes PUT /api/v2/routing/email/domains/{domainName}/routes/{routeId} // // Update a route func (a RoutingApi) PutRoutingEmailDomainRoute(domainName string, routeId string, body Inboundroute) (*Inboundroute, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainName}/routes/{routeId}" path = strings.Replace(path, "{domainName}", url.PathEscape(fmt.Sprintf("%v", domainName)), -1) path = strings.Replace(path, "{routeId}", url.PathEscape(fmt.Sprintf("%v", routeId)), -1) defaultReturn := new(Inboundroute) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainName' is set if &domainName == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainName' when calling RoutingApi->PutRoutingEmailDomainRoute") } // verify the required parameter 'routeId' is set if &routeId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'routeId' when calling RoutingApi->PutRoutingEmailDomainRoute") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingEmailDomainRoute") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Inboundroute response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Inboundroute" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingEmailDomainRouteIdentityresolution invokes PUT /api/v2/routing/email/domains/{domainName}/routes/{routeId}/identityresolution // // Update identity resolution settings for a route. func (a RoutingApi) PutRoutingEmailDomainRouteIdentityresolution(domainName string, routeId string, body Routeidentityresolutionconfig) (*Routeidentityresolutionconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/domains/{domainName}/routes/{routeId}/identityresolution" path = strings.Replace(path, "{domainName}", url.PathEscape(fmt.Sprintf("%v", domainName)), -1) path = strings.Replace(path, "{routeId}", url.PathEscape(fmt.Sprintf("%v", routeId)), -1) defaultReturn := new(Routeidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainName' is set if &domainName == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainName' when calling RoutingApi->PutRoutingEmailDomainRouteIdentityresolution") } // verify the required parameter 'routeId' is set if &routeId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'routeId' when calling RoutingApi->PutRoutingEmailDomainRouteIdentityresolution") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingEmailDomainRouteIdentityresolution") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Routeidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routeidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingEmailOutboundDomainActivation invokes PUT /api/v2/routing/email/outbound/domains/{domainId}/activation // // Request an activation status (cname + dkim) update of an outbound domain func (a RoutingApi) PutRoutingEmailOutboundDomainActivation(domainId string) (*Emailoutbounddomainresult, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/email/outbound/domains/{domainId}/activation" path = strings.Replace(path, "{domainId}", url.PathEscape(fmt.Sprintf("%v", domainId)), -1) defaultReturn := new(Emailoutbounddomainresult) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'domainId' is set if &domainId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'domainId' when calling RoutingApi->PutRoutingEmailOutboundDomainActivation") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Emailoutbounddomainresult response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Emailoutbounddomainresult" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingMessageRecipient invokes PUT /api/v2/routing/message/recipients/{recipientId} // // Update a recipient func (a RoutingApi) PutRoutingMessageRecipient(recipientId string, body Recipientrequest) (*Recipient, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/message/recipients/{recipientId}" path = strings.Replace(path, "{recipientId}", url.PathEscape(fmt.Sprintf("%v", recipientId)), -1) defaultReturn := new(Recipient) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'recipientId' is set if &recipientId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'recipientId' when calling RoutingApi->PutRoutingMessageRecipient") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingMessageRecipient") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Recipient response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Recipient" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingQueue invokes PUT /api/v2/routing/queues/{queueId} // // Update a queue func (a RoutingApi) PutRoutingQueue(queueId string, body Queuerequest) (*Queue, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Queue) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PutRoutingQueue") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingQueue") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Queue response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Queue" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingQueueIdentityresolution invokes PUT /api/v2/routing/queues/{queueId}/identityresolution // // Update Queue IdentityResolution Settings. func (a RoutingApi) PutRoutingQueueIdentityresolution(queueId string, body Identityresolutionqueueconfig) (*Identityresolutionqueueconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/queues/{queueId}/identityresolution" path = strings.Replace(path, "{queueId}", url.PathEscape(fmt.Sprintf("%v", queueId)), -1) defaultReturn := new(Identityresolutionqueueconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'queueId' is set if &queueId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'queueId' when calling RoutingApi->PutRoutingQueueIdentityresolution") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingQueueIdentityresolution") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Identityresolutionqueueconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Identityresolutionqueueconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingSettings invokes PUT /api/v2/routing/settings // // Update an organization's routing settings func (a RoutingApi) PutRoutingSettings(body Routingsettings) (*Routingsettings, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/settings" defaultReturn := new(Routingsettings) 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 RoutingApi->PutRoutingSettings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Routingsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Routingsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingSettingsTranscription invokes PUT /api/v2/routing/settings/transcription // // Update Transcription Settings func (a RoutingApi) PutRoutingSettingsTranscription(body Transcriptionsettings) (*Transcriptionsettings, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/settings/transcription" defaultReturn := new(Transcriptionsettings) 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 RoutingApi->PutRoutingSettingsTranscription") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Transcriptionsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Transcriptionsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingSmsIdentityresolutionPhonenumber invokes PUT /api/v2/routing/sms/identityresolution/phonenumbers/{addressId} // // Update an SMS identity resolution settings. func (a RoutingApi) PutRoutingSmsIdentityresolutionPhonenumber(addressId string, body Smsidentityresolutionconfig) (*Smsidentityresolutionconfig, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/sms/identityresolution/phonenumbers/{addressId}" path = strings.Replace(path, "{addressId}", url.PathEscape(fmt.Sprintf("%v", addressId)), -1) defaultReturn := new(Smsidentityresolutionconfig) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'addressId' is set if &addressId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'addressId' when calling RoutingApi->PutRoutingSmsIdentityresolutionPhonenumber") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingSmsIdentityresolutionPhonenumber") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Smsidentityresolutionconfig response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Smsidentityresolutionconfig" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingUserDirectroutingbackupSettings invokes PUT /api/v2/routing/users/{userId}/directroutingbackup/settings // // Update the user's Direct Routing Backup settings. func (a RoutingApi) PutRoutingUserDirectroutingbackupSettings(userId string, body Agentdirectroutingbackupsettings) (*Agentdirectroutingbackupsettings, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/users/{userId}/directroutingbackup/settings" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Agentdirectroutingbackupsettings) 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 RoutingApi->PutRoutingUserDirectroutingbackupSettings") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingUserDirectroutingbackupSettings") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Agentdirectroutingbackupsettings response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Agentdirectroutingbackupsettings" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingUserUtilization invokes PUT /api/v2/routing/users/{userId}/utilization // // Update the user's max utilization settings. Include only those media types requiring custom configuration. Any omitted media types will be set to the organization's default values. func (a RoutingApi) PutRoutingUserUtilization(userId string, body Utilizationrequest) (*Agentmaxutilizationresponse, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/users/{userId}/utilization" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Agentmaxutilizationresponse) 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 RoutingApi->PutRoutingUserUtilization") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingUserUtilization") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Agentmaxutilizationresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Agentmaxutilizationresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingUtilization invokes PUT /api/v2/routing/utilization // // Update the organization-wide max utilization settings. Include only those media types requiring custom configuration. Any omitted media types will be set to the system default values. func (a RoutingApi) PutRoutingUtilization(body Utilizationrequest) (*Utilizationresponse, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization" defaultReturn := new(Utilizationresponse) 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 RoutingApi->PutRoutingUtilization") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Utilizationresponse response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Utilizationresponse" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingUtilizationLabel invokes PUT /api/v2/routing/utilization/labels/{labelId} // // Update a utilization label func (a RoutingApi) PutRoutingUtilizationLabel(labelId string, body Updateutilizationlabelrequest) (*Utilizationlabel, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/utilization/labels/{labelId}" path = strings.Replace(path, "{labelId}", url.PathEscape(fmt.Sprintf("%v", labelId)), -1) defaultReturn := new(Utilizationlabel) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'labelId' is set if &labelId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'labelId' when calling RoutingApi->PutRoutingUtilizationLabel") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingUtilizationLabel") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Utilizationlabel response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Utilizationlabel" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutRoutingWrapupcode invokes PUT /api/v2/routing/wrapupcodes/{codeId} // // Update wrap-up code func (a RoutingApi) PutRoutingWrapupcode(codeId string, body Wrapupcoderequest) (*Wrapupcode, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/routing/wrapupcodes/{codeId}" path = strings.Replace(path, "{codeId}", url.PathEscape(fmt.Sprintf("%v", codeId)), -1) defaultReturn := new(Wrapupcode) if true == false { return defaultReturn, nil, errors.New("This message brought to you by the laws of physics being broken") } // verify the required parameter 'codeId' is set if &codeId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'codeId' when calling RoutingApi->PutRoutingWrapupcode") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutRoutingWrapupcode") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *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 } // PutUserRoutingskill invokes PUT /api/v2/users/{userId}/routingskills/{skillId} // // Update an assigned routing skill's proficiency func (a RoutingApi) PutUserRoutingskill(userId string, skillId string, body Userroutingskill) (*Userroutingskill, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routingskills/{skillId}" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) path = strings.Replace(path, "{skillId}", url.PathEscape(fmt.Sprintf("%v", skillId)), -1) defaultReturn := new(Userroutingskill) 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 RoutingApi->PutUserRoutingskill") } // verify the required parameter 'skillId' is set if &skillId == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'skillId' when calling RoutingApi->PutUserRoutingskill") } // verify the required parameter 'body' is set if &body == nil { // false return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutUserRoutingskill") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userroutingskill response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userroutingskill" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err } // PutUserRoutingskillsBulk invokes PUT /api/v2/users/{userId}/routingskills/bulk // // Assign multiple routing skills to a user, replacing any current assignments func (a RoutingApi) PutUserRoutingskillsBulk(userId string, body []Userroutingskillpost) (*Userskillentitylisting, *APIResponse, error) { var httpMethod = "PUT" // create path and map variables path := a.Configuration.BasePath + "/api/v2/users/{userId}/routingskills/bulk" path = strings.Replace(path, "{userId}", url.PathEscape(fmt.Sprintf("%v", userId)), -1) defaultReturn := new(Userskillentitylisting) 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 RoutingApi->PutUserRoutingskillsBulk") } // verify the required parameter 'body' is set if &body == nil { // true return defaultReturn, nil, errors.New("Missing required parameter 'body' when calling RoutingApi->PutUserRoutingskillsBulk") } headerParams := make(map[string]string) queryParams := make(map[string]string) formParams := url.Values{} var postBody interface{} var postFileName string var fileBytes []byte // authentication (PureCloud OAuth) required // oauth required if a.Configuration.AccessToken != ""{ headerParams["Authorization"] = "Bearer " + a.Configuration.AccessToken } // add default headers if any for key := range a.Configuration.DefaultHeader { headerParams[key] = a.Configuration.DefaultHeader[key] } // Find an replace keys that were altered to avoid clashes with go keywords correctedQueryParams := make(map[string]string) for k, v := range queryParams { if k == "varType" { correctedQueryParams["type"] = v continue } correctedQueryParams[k] = v } queryParams = correctedQueryParams // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } // set Content-Type header localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) if localVarHttpContentType != "" { headerParams["Content-Type"] = 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 *Userskillentitylisting response, err := a.Configuration.APIClient.CallAPI(path, httpMethod, postBody, headerParams, queryParams, formParams, postFileName, fileBytes, "other") if err != 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 "Userskillentitylisting" == "string" { copy(response.RawBody, &successPayload) } else { err = json.Unmarshal(response.RawBody, &successPayload) } } return successPayload, response, err }