text: /* Copyright © 2017 VMware, Inc. All Rights Reserved.
     SPDX-License-Identifier: BSD-2-Clause
  
     Generated by: https://github.com/swagger-api/swagger-codegen.git */
  
  package nsxt
  
  import (
  	"context"
  	"encoding/json"
  	"fmt"
  	"github.com/vmware/go-vmware-nsxt/manager"
  	"github.com/vmware/go-vmware-nsxt/monitoring"
  	"net/http"
  	"net/url"
  	"strings"
  )
  
  // Linger please
  var (
  	_ context.Context
  )
  
  type TroubleshootingAndMonitoringApiService service
  
  /* TroubleshootingAndMonitoringApiService Create a mirror session
  Create a mirror session
  * @param ctx context.Context Authentication Context
  @param portMirroringSession
  @return manager.PortMirroringSession*/
  func (a *TroubleshootingAndMonitoringApiService) CreatePortMirroringSessions(ctx context.Context, portMirroringSession manager.PortMirroringSession) (manager.PortMirroringSession, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Post")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.PortMirroringSession
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/mirror-sessions"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	// body params
  	localVarPostBody = &portMirroringSession
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Initiate a monitoring.Traceflow Operation on the Specified Port
  Initiate a monitoring.Traceflow Operation on the Specified Port
  * @param ctx context.Context Authentication Context
  @param traceflowRequest
  @return monitoringTraceflow*/
  func (a *TroubleshootingAndMonitoringApiService) CreateTraceflow(ctx context.Context, traceflowRequest monitoring.TraceflowRequest) (monitoring.Traceflow, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Post")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.Traceflow
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/traceflows"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	// body params
  	localVarPostBody = &traceflowRequest
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Delete the mirror session
  Delete the mirror session
  * @param ctx context.Context Authentication Context
  @param mirrorSessionId
  @return */
  func (a *TroubleshootingAndMonitoringApiService) DeletePortMirroringSession(ctx context.Context, mirrorSessionId string) (*http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Delete")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/mirror-sessions/{mirror-session-id}"
  	localVarPath = strings.Replace(localVarPath, "{"+"mirror-session-id"+"}", fmt.Sprintf("%v", mirrorSessionId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	return localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Delete the monitoring.Traceflow round
  Delete the monitoring.Traceflow round
  * @param ctx context.Context Authentication Context
  @param traceflowId
  @return */
  func (a *TroubleshootingAndMonitoringApiService) DeleteTraceflow(ctx context.Context, traceflowId string) (*http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Delete")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/traceflows/{traceflow-id}"
  	localVarPath = strings.Replace(localVarPath, "{"+"traceflow-id"+"}", fmt.Sprintf("%v", traceflowId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	return localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Get networking entities between two logical ports with VIF attachment
  Get networking entities between two logical ports with VIF attachment
  * @param ctx context.Context Authentication Context
  @param lportId ID of source port
  @param peerPortId ID of peer port
  @return monitoring.PortConnectionEntities*/
  func (a *TroubleshootingAndMonitoringApiService) GetForwardingPath(ctx context.Context, lportId string, peerPortId string) (manager.PortConnectionEntities, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.PortConnectionEntities
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/logical-ports/{lport-id}/forwarding-path"
  	localVarPath = strings.Replace(localVarPath, "{"+"lport-id"+"}", fmt.Sprintf("%v", lportId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	localVarQueryParams.Add("peer_port_id", parameterToString(peerPortId, ""))
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Get high-level summary of a transport zone
  Get high-level summary of a transport zone
  * @param ctx context.Context Authentication Context
  @param zoneId ID of transport zone
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "source" (string) Data source type.
  @return monitoring.HeatMapTransportZoneStatus*/
  func (a *TroubleshootingAndMonitoringApiService) GetHeatmapTransportZoneStatus(ctx context.Context, zoneId string, localVarOptionals map[string]interface{}) (monitoring.HeatMapTransportZoneStatus, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.HeatMapTransportZoneStatus
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/transport-zones/{zone-id}/status"
  	localVarPath = strings.Replace(localVarPath, "{"+"zone-id"+"}", fmt.Sprintf("%v", zoneId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["source"], "string", "source"); err != nil {
  		return successPayload, nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["source"].(string); localVarOk {
  		localVarQueryParams.Add("source", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Get the list of IPFIX observation points
  Get the list of IPFIX observation points
  * @param ctx context.Context Authentication Context
  @return monitoring.IpfixObsPointsListResult*/
  func (a *TroubleshootingAndMonitoringApiService) GetIpfixObsPoints(ctx context.Context) (monitoring.IpfixObsPointsListResult, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.IpfixObsPointsListResult
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/ipfix-obs-points"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Get the mirror session
  Get the mirror session
  * @param ctx context.Context Authentication Context
  @param mirrorSessionId
  @return manager.PortMirroringSession*/
  func (a *TroubleshootingAndMonitoringApiService) GetPortMirroringSession(ctx context.Context, mirrorSessionId string) (manager.PortMirroringSession, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.PortMirroringSession
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/mirror-sessions/{mirror-session-id}"
  	localVarPath = strings.Replace(localVarPath, "{"+"mirror-session-id"+"}", fmt.Sprintf("%v", mirrorSessionId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Read global switch IPFIX export configuration
  Read global switch IPFIX export configuration
  * @param ctx context.Context Authentication Context
  @return monitoring.IpfixObsPointConfig*/
  func (a *TroubleshootingAndMonitoringApiService) GetSwitchIpfixConfig(ctx context.Context) (monitoring.IpfixObsPointConfig, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.IpfixObsPointConfig
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/ipfix-obs-points/switch-global"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Get the monitoring.Traceflow round status and result summary
  Get the monitoring.Traceflow round status and result summary
  * @param ctx context.Context Authentication Context
  @param traceflowId
  @return monitoring.Traceflow*/
  func (a *TroubleshootingAndMonitoringApiService) GetTraceflow(ctx context.Context, traceflowId string) (monitoring.Traceflow, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.Traceflow
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/traceflows/{traceflow-id}"
  	localVarPath = strings.Replace(localVarPath, "{"+"traceflow-id"+"}", fmt.Sprintf("%v", traceflowId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Get observations for the monitoring.Traceflow round
  Get observations for the monitoring.Traceflow round
  * @param ctx context.Context Authentication Context
  @param traceflowId
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "componentName" (string) Observations having the given component name will be listed.
      @param "componentType" (string) Observations having the given component type will be listed.
      @param "cursor" (string) Opaque cursor to be used for getting next page of records (supplied by current result page)
      @param "includedFields" (string) Comma separated list of fields that should be included to result of query
      @param "pageSize" (int64) Maximum number of results to return in this page (server may return fewer)
      @param "resourceType" (string) The type of observations that will be listed.
      @param "sortAscending" (bool)
      @param "sortBy" (string) Field by which records are sorted
      @param "transportNodeName" (string) Observations having the given transport node name will be listed.
  @return monitoring.TraceflowObservationListResult*/
  func (a *TroubleshootingAndMonitoringApiService) GetTraceflowObservations(ctx context.Context, traceflowId string, localVarOptionals map[string]interface{}) (monitoring.TraceflowObservationListResult, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.TraceflowObservationListResult
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/traceflows/{traceflow-id}/observations"
  	localVarPath = strings.Replace(localVarPath, "{"+"traceflow-id"+"}", fmt.Sprintf("%v", traceflowId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["componentName"], "string", "componentName"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["componentType"], "string", "componentType"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["cursor"], "string", "cursor"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["includedFields"], "string", "includedFields"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["pageSize"], "int64", "pageSize"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["resourceType"], "string", "resourceType"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortAscending"], "bool", "sortAscending"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortBy"], "string", "sortBy"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["transportNodeName"], "string", "transportNodeName"); err != nil {
  		return successPayload, nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["componentName"].(string); localVarOk {
  		localVarQueryParams.Add("component_name", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["componentType"].(string); localVarOk {
  		localVarQueryParams.Add("component_type", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["cursor"].(string); localVarOk {
  		localVarQueryParams.Add("cursor", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["includedFields"].(string); localVarOk {
  		localVarQueryParams.Add("included_fields", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["pageSize"].(int64); localVarOk {
  		localVarQueryParams.Add("page_size", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["resourceType"].(string); localVarOk {
  		localVarQueryParams.Add("resource_type", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortAscending"].(bool); localVarOk {
  		localVarQueryParams.Add("sort_ascending", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortBy"].(string); localVarOk {
  		localVarQueryParams.Add("sort_by", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["transportNodeName"].(string); localVarOk {
  		localVarQueryParams.Add("transport_node_name", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Creates a status report of transport nodes of all the transport zones
  Creates a status report of transport nodes of all the transport zones
  * @param ctx context.Context Authentication Context
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "source" (string) Data source type.
      @param "status" (string) Transport node
  @return */
  func (a *TroubleshootingAndMonitoringApiService) GetTransportNodeReport(ctx context.Context, localVarOptionals map[string]interface{}) (*http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/transport-zones/transport-node-status-report"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["source"], "string", "source"); err != nil {
  		return nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["status"], "string", "status"); err != nil {
  		return nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["source"].(string); localVarOk {
  		localVarQueryParams.Add("source", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["status"].(string); localVarOk {
  		localVarQueryParams.Add("status", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/octet-stream",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	return localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Creates a status report of transport nodes in a transport zone
  Creates a status report of transport nodes in a transport zone
  * @param ctx context.Context Authentication Context
  @param zoneId ID of transport zone
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "source" (string) Data source type.
      @param "status" (string) Transport node
  @return */
  func (a *TroubleshootingAndMonitoringApiService) GetTransportNodeReportForATransportZone(ctx context.Context, zoneId string, localVarOptionals map[string]interface{}) (*http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/transport-zones/{zone-id}/transport-node-status-report"
  	localVarPath = strings.Replace(localVarPath, "{"+"zone-id"+"}", fmt.Sprintf("%v", zoneId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["source"], "string", "source"); err != nil {
  		return nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["status"], "string", "status"); err != nil {
  		return nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["source"].(string); localVarOk {
  		localVarQueryParams.Add("source", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["status"].(string); localVarOk {
  		localVarQueryParams.Add("status", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/octet-stream",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	return localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Read status of a transport node
  Read status of a transport node
  * @param ctx context.Context Authentication Context
  @param nodeId ID of transport node
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "source" (string) Data source type.
  @return manager.TransportNodeStatus*/
  func (a *TroubleshootingAndMonitoringApiService) GetTransportNodeStatus(ctx context.Context, nodeId string, localVarOptionals map[string]interface{}) (manager.TransportNodeStatus, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.TransportNodeStatus
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/transport-nodes/{node-id}/status"
  	localVarPath = strings.Replace(localVarPath, "{"+"node-id"+"}", fmt.Sprintf("%v", nodeId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["source"], "string", "source"); err != nil {
  		return successPayload, nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["source"].(string); localVarOk {
  		localVarQueryParams.Add("source", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService List available node logs
  Returns the number of log files and lists the log files that reside on the NSX virtual appliance. The list includes the filename, file size, and last-modified time in milliseconds since epoch (1 January 1970) for each log file. Knowing the last-modified time with millisecond accuracy since epoch is helpful when you are comparing two times, such as the time of a POST request and the end time on a server.
  * @param ctx context.Context Authentication Context
  @return monitoring.NodeLogPropertiesListResult*/
  func (a *TroubleshootingAndMonitoringApiService) ListNodeLogs(ctx context.Context) (monitoring.NodeLogPropertiesListResult, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.NodeLogPropertiesListResult
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/node/logs"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService List all mirror sessions
  List all mirror sessions
  * @param ctx context.Context Authentication Context
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "cursor" (string) Opaque cursor to be used for getting next page of records (supplied by current result page)
      @param "includedFields" (string) Comma separated list of fields that should be included to result of query
      @param "pageSize" (int64) Maximum number of results to return in this page (server may return fewer)
      @param "sortAscending" (bool)
      @param "sortBy" (string) Field by which records are sorted
  @return manager.PortMirroringSessionListResult*/
  func (a *TroubleshootingAndMonitoringApiService) ListPortMirroringSession(ctx context.Context, localVarOptionals map[string]interface{}) (manager.PortMirroringSessionListResult, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.PortMirroringSessionListResult
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/mirror-sessions"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["cursor"], "string", "cursor"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["includedFields"], "string", "includedFields"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["pageSize"], "int64", "pageSize"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortAscending"], "bool", "sortAscending"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortBy"], "string", "sortBy"); err != nil {
  		return successPayload, nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["cursor"].(string); localVarOk {
  		localVarQueryParams.Add("cursor", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["includedFields"].(string); localVarOk {
  		localVarQueryParams.Add("included_fields", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["pageSize"].(int64); localVarOk {
  		localVarQueryParams.Add("page_size", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortAscending"].(bool); localVarOk {
  		localVarQueryParams.Add("sort_ascending", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortBy"].(string); localVarOk {
  		localVarQueryParams.Add("sort_by", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Read status of all transport nodes with tunnel connections to transport node
  Read status of all transport nodes with tunnel connections to transport node
  * @param ctx context.Context Authentication Context
  @param nodeId ID of transport node
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "bfdDiagnosticCode" (string) BFD diagnostic code of Tunnel as defined in RFC 5880
      @param "cursor" (string) Opaque cursor to be used for getting next page of records (supplied by current result page)
      @param "includedFields" (string) Comma separated list of fields that should be included to result of query
      @param "pageSize" (int64) Maximum number of results to return in this page (server may return fewer)
      @param "sortAscending" (bool)
      @param "sortBy" (string) Field by which records are sorted
      @param "source" (string) Data source type.
      @param "tunnelStatus" (string) Tunnel Status
  @return manager.TransportNodeStatusListResult*/
  func (a *TroubleshootingAndMonitoringApiService) ListRemoteTransportNodeStatus(ctx context.Context, nodeId string, localVarOptionals map[string]interface{}) (manager.TransportNodeStatusListResult, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.TransportNodeStatusListResult
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/transport-nodes/{node-id}/remote-transport-node-status"
  	localVarPath = strings.Replace(localVarPath, "{"+"node-id"+"}", fmt.Sprintf("%v", nodeId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["bfdDiagnosticCode"], "string", "bfdDiagnosticCode"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["cursor"], "string", "cursor"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["includedFields"], "string", "includedFields"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["pageSize"], "int64", "pageSize"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortAscending"], "bool", "sortAscending"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortBy"], "string", "sortBy"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["source"], "string", "source"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["tunnelStatus"], "string", "tunnelStatus"); err != nil {
  		return successPayload, nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["bfdDiagnosticCode"].(string); localVarOk {
  		localVarQueryParams.Add("bfd_diagnostic_code", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["cursor"].(string); localVarOk {
  		localVarQueryParams.Add("cursor", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["includedFields"].(string); localVarOk {
  		localVarQueryParams.Add("included_fields", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["pageSize"].(int64); localVarOk {
  		localVarQueryParams.Add("page_size", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortAscending"].(bool); localVarOk {
  		localVarQueryParams.Add("sort_ascending", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortBy"].(string); localVarOk {
  		localVarQueryParams.Add("sort_by", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["source"].(string); localVarOk {
  		localVarQueryParams.Add("source", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["tunnelStatus"].(string); localVarOk {
  		localVarQueryParams.Add("tunnel_status", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService List all monitoring.Traceflow rounds
  List all monitoring.Traceflow rounds; if a logical port id is given as a query parameter, only those originated from the logical port are returned.
  * @param ctx context.Context Authentication Context
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "cursor" (string) Opaque cursor to be used for getting next page of records (supplied by current result page)
      @param "includedFields" (string) Comma separated list of fields that should be included to result of query
      @param "lportId" (string) id of the source logical port where the trace flows originated
      @param "pageSize" (int64) Maximum number of results to return in this page (server may return fewer)
      @param "sortAscending" (bool)
      @param "sortBy" (string) Field by which records are sorted
  @return monitoring.TraceflowListResult*/
  func (a *TroubleshootingAndMonitoringApiService) ListTraceflows(ctx context.Context, localVarOptionals map[string]interface{}) (monitoring.TraceflowListResult, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.TraceflowListResult
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/traceflows"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["cursor"], "string", "cursor"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["includedFields"], "string", "includedFields"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["lportId"], "string", "lportId"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["pageSize"], "int64", "pageSize"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortAscending"], "bool", "sortAscending"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortBy"], "string", "sortBy"); err != nil {
  		return successPayload, nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["cursor"].(string); localVarOk {
  		localVarQueryParams.Add("cursor", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["includedFields"].(string); localVarOk {
  		localVarQueryParams.Add("included_fields", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["lportId"].(string); localVarOk {
  		localVarQueryParams.Add("lport_id", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["pageSize"].(int64); localVarOk {
  		localVarQueryParams.Add("page_size", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortAscending"].(bool); localVarOk {
  		localVarQueryParams.Add("sort_ascending", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortBy"].(string); localVarOk {
  		localVarQueryParams.Add("sort_by", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Read status of all the transport nodes
  Read status of all the transport nodes
  * @param ctx context.Context Authentication Context
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "cursor" (string) Opaque cursor to be used for getting next page of records (supplied by current result page)
      @param "includedFields" (string) Comma separated list of fields that should be included to result of query
      @param "pageSize" (int64) Maximum number of results to return in this page (server may return fewer)
      @param "sortAscending" (bool)
      @param "sortBy" (string) Field by which records are sorted
      @param "source" (string) Data source type.
      @param "status" (string) Transport node
  @return manager.TransportNodeStatusListResult*/
  func (a *TroubleshootingAndMonitoringApiService) ListTransportNodeStatus(ctx context.Context, localVarOptionals map[string]interface{}) (manager.TransportNodeStatusListResult, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.TransportNodeStatusListResult
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/transport-zones/transport-node-status"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["cursor"], "string", "cursor"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["includedFields"], "string", "includedFields"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["pageSize"], "int64", "pageSize"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortAscending"], "bool", "sortAscending"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortBy"], "string", "sortBy"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["source"], "string", "source"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["status"], "string", "status"); err != nil {
  		return successPayload, nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["cursor"].(string); localVarOk {
  		localVarQueryParams.Add("cursor", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["includedFields"].(string); localVarOk {
  		localVarQueryParams.Add("included_fields", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["pageSize"].(int64); localVarOk {
  		localVarQueryParams.Add("page_size", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortAscending"].(bool); localVarOk {
  		localVarQueryParams.Add("sort_ascending", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortBy"].(string); localVarOk {
  		localVarQueryParams.Add("sort_by", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["source"].(string); localVarOk {
  		localVarQueryParams.Add("source", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["status"].(string); localVarOk {
  		localVarQueryParams.Add("status", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Read status of transport nodes in a transport zone
  Read status of transport nodes in a transport zone
  * @param ctx context.Context Authentication Context
  @param zoneId ID of transport zone
  @param optional (nil or map[string]interface{}) with one or more of:
      @param "cursor" (string) Opaque cursor to be used for getting next page of records (supplied by current result page)
      @param "includedFields" (string) Comma separated list of fields that should be included to result of query
      @param "pageSize" (int64) Maximum number of results to return in this page (server may return fewer)
      @param "sortAscending" (bool)
      @param "sortBy" (string) Field by which records are sorted
      @param "source" (string) Data source type.
      @param "status" (string) Transport node
  @return manager.TransportNodeStatusListResult*/
  func (a *TroubleshootingAndMonitoringApiService) ListTransportNodeStatusForTransportZone(ctx context.Context, zoneId string, localVarOptionals map[string]interface{}) (manager.TransportNodeStatusListResult, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.TransportNodeStatusListResult
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/transport-zones/{zone-id}/transport-node-status"
  	localVarPath = strings.Replace(localVarPath, "{"+"zone-id"+"}", fmt.Sprintf("%v", zoneId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	if err := typeCheckParameter(localVarOptionals["cursor"], "string", "cursor"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["includedFields"], "string", "includedFields"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["pageSize"], "int64", "pageSize"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortAscending"], "bool", "sortAscending"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["sortBy"], "string", "sortBy"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["source"], "string", "source"); err != nil {
  		return successPayload, nil, err
  	}
  	if err := typeCheckParameter(localVarOptionals["status"], "string", "status"); err != nil {
  		return successPayload, nil, err
  	}
  
  	if localVarTempParam, localVarOk := localVarOptionals["cursor"].(string); localVarOk {
  		localVarQueryParams.Add("cursor", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["includedFields"].(string); localVarOk {
  		localVarQueryParams.Add("included_fields", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["pageSize"].(int64); localVarOk {
  		localVarQueryParams.Add("page_size", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortAscending"].(bool); localVarOk {
  		localVarQueryParams.Add("sort_ascending", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["sortBy"].(string); localVarOk {
  		localVarQueryParams.Add("sort_by", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["source"].(string); localVarOk {
  		localVarQueryParams.Add("source", parameterToString(localVarTempParam, ""))
  	}
  	if localVarTempParam, localVarOk := localVarOptionals["status"].(string); localVarOk {
  		localVarQueryParams.Add("status", parameterToString(localVarTempParam, ""))
  	}
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Read node log properties
  For a single specified log file, lists the filename, file size, and last-modified time.
  * @param ctx context.Context Authentication Context
  @param logName Name of log file to read properties
  @return monitoring.NodeLogProperties*/
  func (a *TroubleshootingAndMonitoringApiService) ReadNodeLog(ctx context.Context, logName string) (monitoring.NodeLogProperties, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.NodeLogProperties
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/node/logs/{log-name}"
  	localVarPath = strings.Replace(localVarPath, "{"+"log-name"+"}", fmt.Sprintf("%v", logName), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  		"application/octet-stream",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Read node log contents
  For a single specified log file, returns the content of the log file. This method supports byte-range requests. To request just a portion of a log file, supply an HTTP Range header, e.g. \&quot;Range: bytes&#x3D;&lt;start&gt;-&lt;end&gt;\&quot;. &lt;end&gt; is optional, and, if omitted, the file contents from start to the end of the file are returned.&#39;
  * @param ctx context.Context Authentication Context
  @param logName Name of log to read
  @return */
  func (a *TroubleshootingAndMonitoringApiService) ReadNodeLogData(ctx context.Context, logName string) (*http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Get")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/node/logs/{log-name}/data"
  	localVarPath = strings.Replace(localVarPath, "{"+"log-name"+"}", fmt.Sprintf("%v", logName), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/octet-stream",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	return localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Update the mirror session
  Update the mirror session
  * @param ctx context.Context Authentication Context
  @param mirrorSessionId
  @param portMirroringSession
  @return manager.PortMirroringSession*/
  func (a *TroubleshootingAndMonitoringApiService) UpdatePortMirroringSession(ctx context.Context, mirrorSessionId string, portMirroringSession manager.PortMirroringSession) (manager.PortMirroringSession, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Put")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     manager.PortMirroringSession
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/mirror-sessions/{mirror-session-id}"
  	localVarPath = strings.Replace(localVarPath, "{"+"mirror-session-id"+"}", fmt.Sprintf("%v", mirrorSessionId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	// body params
  	localVarPostBody = &portMirroringSession
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Update global switch IPFIX export configuration
  Update global switch IPFIX export configuration
  * @param ctx context.Context Authentication Context
  @param ipfixObsPointConfig
  @return monitoring.IpfixObsPointConfig*/
  func (a *TroubleshootingAndMonitoringApiService) UpdateSwitchIpfixConfig(ctx context.Context, ipfixObsPointConfig monitoring.IpfixObsPointConfig) (monitoring.IpfixObsPointConfig, *http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Put")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  		successPayload     monitoring.IpfixObsPointConfig
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/ipfix-obs-points/switch-global"
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	// body params
  	localVarPostBody = &ipfixObsPointConfig
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return successPayload, nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return successPayload, localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil {
  		return successPayload, localVarHttpResponse, err
  	}
  
  	return successPayload, localVarHttpResponse, err
  }
  
  /* TroubleshootingAndMonitoringApiService Verify whether the mirror session is still valid
  Verify whether all participants are on the same transport node
  * @param ctx context.Context Authentication Context
  @param mirrorSessionId
  @return */
  func (a *TroubleshootingAndMonitoringApiService) VerifyPortMirroringSessionVerify(ctx context.Context, mirrorSessionId string) (*http.Response, error) {
  	var (
  		localVarHttpMethod = strings.ToUpper("Post")
  		localVarPostBody   interface{}
  		localVarFileName   string
  		localVarFileBytes  []byte
  	)
  
  	// create path and map variables
  	localVarPath := a.client.cfg.BasePath + "/mirror-sessions/{mirror-session-id}?action=verify"
  	localVarPath = strings.Replace(localVarPath, "{"+"mirror-session-id"+"}", fmt.Sprintf("%v", mirrorSessionId), -1)
  
  	localVarHeaderParams := make(map[string]string)
  	localVarQueryParams := url.Values{}
  	localVarFormParams := url.Values{}
  
  	// to determine the Content-Type header
  	localVarHttpContentTypes := []string{"application/json"}
  
  	// set Content-Type header
  	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
  	if localVarHttpContentType != "" {
  		localVarHeaderParams["Content-Type"] = localVarHttpContentType
  	}
  
  	// to determine the Accept header
  	localVarHttpHeaderAccepts := []string{
  		"application/json",
  	}
  
  	// set Accept header
  	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
  	if localVarHttpHeaderAccept != "" {
  		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
  	}
  	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
  	if err != nil {
  		return nil, err
  	}
  
  	localVarHttpResponse, err := a.client.callAPI(r)
  	if err != nil || localVarHttpResponse == nil {
  		return localVarHttpResponse, err
  	}
  	defer localVarHttpResponse.Body.Close()
  	if localVarHttpResponse.StatusCode >= 300 {
  		return localVarHttpResponse, reportError(localVarHttpResponse.Status)
  	}
  
  	return localVarHttpResponse, err
  }
  