# README

Go API client for cloudquery

An API providing access to observation data using an AppDynamics domain-specific language.

The language is declarative, read-only (it does not allow for data modification) and specific to the AppD MELT model. It presents MELT data (metrics, events, logs, traces) and State in the scope of monitored topology.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import cloudquery "github.com/cisco-open/appd-cloud-go-client"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), cloudquery.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), cloudquery.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), cloudquery.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), cloudquery.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://customer1.observe.appdynamics.com/monitoring/v1

ClassMethodHTTP requestDescription
ExecuteQueryApiExecuteQueryPost /query/executeExecute a query to fetch observation data.
ResultPaginationApiResultPaginationGet /query/continueFetch the next page of results.

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

# Functions

CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResponse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewComplexModelResultItem instantiates a new ComplexModelResultItem object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewComplexModelResultItemWithDefaults instantiates a new ComplexModelResultItem object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewDataResultChunk instantiates a new DataResultChunk object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewDataResultChunkWithDefaults instantiates a new DataResultChunk object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewDatasetReference instantiates a new DatasetReference object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewDatasetReferenceWithDefaults instantiates a new DatasetReference object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrorDetailItem instantiates a new ErrorDetailItem object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorDetailItemWithDefaults instantiates a new ErrorDetailItem object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrorResult instantiates a new ErrorResult object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorResultChunk instantiates a new ErrorResultChunk object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorResultChunkError instantiates a new ErrorResultChunkError object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorResultChunkErrorWithDefaults instantiates a new ErrorResultChunkError object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrorResultChunkWithDefaults instantiates a new ErrorResultChunk object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrorResultWithDefaults instantiates a new ErrorResult object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewEventMetadataResultItem instantiates a new EventMetadataResultItem object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewEventMetadataResultItemWithDefaults instantiates a new EventMetadataResultItem object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewHeartbeatResultChunk instantiates a new HeartbeatResultChunk object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewHeartbeatResultChunkWithDefaults instantiates a new HeartbeatResultChunk object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewHints instantiates a new Hints object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewHintsWithDefaults instantiates a new Hints object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewMainMetadataResultItem instantiates a new MainMetadataResultItem object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewMainMetadataResultItemWithDefaults instantiates a new MainMetadataResultItem object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewMetricMetadataResultItem instantiates a new MetricMetadataResultItem object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewMetricMetadataResultItemWithDefaults instantiates a new MetricMetadataResultItem object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewModel instantiates a new Model object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewModelReference instantiates a new ModelReference object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewModelReferenceWithDefaults instantiates a new ModelReference object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewModelResultChunk instantiates a new ModelResultChunk object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewModelResultChunkWithDefaults instantiates a new ModelResultChunk object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewModelResultItem instantiates a new ModelResultItem object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewModelResultItemWithDefaults instantiates a new ModelResultItem object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewModelWithDefaults instantiates a new Model object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPaginationReference instantiates a new PaginationReference object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPaginationReferenceNext instantiates a new PaginationReferenceNext object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPaginationReferenceNextWithDefaults instantiates a new PaginationReferenceNext object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPaginationReferenceWithDefaults instantiates a new PaginationReference object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewQueryRequestBody instantiates a new QueryRequestBody object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewQueryRequestBodyWithDefaults instantiates a new QueryRequestBody object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
PtrBool is a helper routine that returns a pointer to given boolean value.
PtrFloat32 is a helper routine that returns a pointer to given float value.
PtrFloat64 is a helper routine that returns a pointer to given float value.
PtrInt is a helper routine that returns a pointer to given integer value.
PtrInt32 is a helper routine that returns a pointer to given integer value.
PtrInt64 is a helper routine that returns a pointer to given integer value.
PtrString is a helper routine that returns a pointer to given string value.
PtrTime is helper routine that returns a pointer to given Time value.

# Structs

APIClient manages communication with the AppDynamics Cloud Query Service API API v1.0 In most cases there should be only one, shared, APIClient.
No description provided by the author
APIResponse stores the API response returned by the server.
No description provided by the author
ComplexModelResultItem A description of a complex data type of a single fetched expression in the result.
DataResultChunk A part of the result data.
DataResultItemInner struct for DataResultItemInner.
DatasetReference A reference to a specific dataset.
ErrorDetailItem A detailed description of the error.
ErrorDetailItemFixPossibilitiesInner struct for ErrorDetailItemFixPossibilitiesInner.
ErrorDetailsArrayInner struct for ErrorDetailsArrayInner.
ErrorResult A representation of an error that occurred during query execution.
ErrorResultChunk A signal that an error occurred during query execution.
ErrorResultChunkError struct for ErrorResultChunkError.
EventMetadataResultItem Metadata for an event data chunk.
ExecuteQuery200Response struct for ExecuteQuery200Response.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
HeartbeatResultChunk An empty chunk sent to prevent the HTTP connection from being pre-maturely closed.
Hints Additional information about a single fetched expression from the query.
MainMetadataResultItem Metadata for the main data chunk.
MetadataResultItem Additional information collected for the data contained in the data chunk.
MetricMetadataResultItem Metadata for a metric data chunk.
Model A description of the schema of the data to follow in the DataResultChunks.
ModelFieldsInner struct for ModelFieldsInner.
ModelReference A reference to a specific model.
ModelResultChunk A schema of the data to follow.
ModelResultItem A description of a simple data type of a single fetched expression in the result.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PaginationReference A reference to the next page of results if there are more results to be had.
PaginationReferenceNext Holds the link to the next page of results.
QueryRequestBody Client request with a query.
QueryResponseArrayBodyInner struct for QueryResponseArrayBodyInner.

# Type aliases

ExecuteQueryApiService ExecuteQueryApi service.
ResultPaginationApiService ResultPaginationApi service.