diff --git a/pkg/config-api-client/.openapi-generator/FILES b/pkg/config-api-client/.openapi-generator/FILES index 7c60a2f7..66c3309e 100644 --- a/pkg/config-api-client/.openapi-generator/FILES +++ b/pkg/config-api-client/.openapi-generator/FILES @@ -3,6 +3,9 @@ api/openapi.yaml api_configuration.go client.go configuration.go +docs/Agent.md +docs/AgentGroupAssignmentsItem.md +docs/AgentGroupAssignmentsResponse.md docs/AgentItem.md docs/AgentsResponse.md docs/ConfigurationAPI.md @@ -43,6 +46,9 @@ docs/WirelessNetworksItem.md docs/WirelessNetworksResponse.md go.mod go.sum +model_agent.go +model_agent_group_assignments_item.go +model_agent_group_assignments_response.go model_agent_item.go model_agents_response.go model_error_detail.go diff --git a/pkg/config-api-client/README.md b/pkg/config-api-client/README.md index 69d77f98..f4bfa79a 100644 --- a/pkg/config-api-client/README.md +++ b/pkg/config-api-client/README.md @@ -5,7 +5,7 @@ Nice description goes here ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -- API version: 5.3.0 +- API version: 5.4.0 - Package version: 1.0.0 - Generator version: 7.9.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.GoClientCodegen @@ -79,6 +79,7 @@ All URIs are relative to *https://api.capenetworks.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*ConfigurationAPI* | [**AgentGroupAssignmentsGet**](docs/ConfigurationAPI.md#agentgroupassignmentsget) | **Get** /networking-uxi/v1alpha1/agent-group-assignments | Agent Group Assignments Get *ConfigurationAPI* | [**AgentsDelete**](docs/ConfigurationAPI.md#agentsdelete) | **Delete** /networking-uxi/v1alpha1/agents/{agent_uid} | Agents Delete *ConfigurationAPI* | [**AgentsGet**](docs/ConfigurationAPI.md#agentsget) | **Get** /networking-uxi/v1alpha1/agents | Agents Get *ConfigurationAPI* | [**GroupsDelete**](docs/ConfigurationAPI.md#groupsdelete) | **Delete** /networking-uxi/v1alpha1/groups/{group_uid} | Groups Delete @@ -102,6 +103,9 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [Agent](docs/Agent.md) + - [AgentGroupAssignmentsItem](docs/AgentGroupAssignmentsItem.md) + - [AgentGroupAssignmentsResponse](docs/AgentGroupAssignmentsResponse.md) - [AgentItem](docs/AgentItem.md) - [AgentsResponse](docs/AgentsResponse.md) - [ErrorDetail](docs/ErrorDetail.md) @@ -176,3 +180,4 @@ Each of these functions takes a value of the given basic type and returns a poin ## Author support@capenetworks.com + diff --git a/pkg/config-api-client/api/.openapi.source.yaml b/pkg/config-api-client/api/.openapi.source.yaml index 00f85956..78d8a639 100644 --- a/pkg/config-api-client/api/.openapi.source.yaml +++ b/pkg/config-api-client/api/.openapi.source.yaml @@ -9,11 +9,69 @@ info: email: support@capenetworks.com license: name: No idea, but we need something - version: 5.3.0 + version: 5.4.0 servers: - url: https://api.capenetworks.com - url: https://api.staging.capedev.io paths: + /networking-uxi/v1alpha1/agent-group-assignments: + get: + operationId: agent_group_assignments_get + summary: Agent Group Assignments Get + description: Get a list of agent group assignments + parameters: + - name: id + in: query + required: false + schema: + anyOf: + - type: string + nullable: true + title: Id + - name: next + in: query + required: false + schema: + anyOf: + - type: string + nullable: true + title: Next + - name: limit + in: query + required: false + schema: + type: integer + default: 50 + maximum: 100 + minimum: 0 + title: Limit + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/AgentGroupAssignmentsResponse' + 4XX: + description: Client Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + 5XX: + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + security: + - HTTPBearer: [] + tags: + - api + - configuration + - v1alpha1 + - agent-group-assignments + x-stability-level: alpha /networking-uxi/v1alpha1/agents/{agent_uid}: delete: operationId: agents_delete @@ -912,6 +970,57 @@ paths: x-stability-level: alpha components: schemas: + Agent: + type: object + properties: + id: + type: string + title: Id + required: + - id + title: Agent + AgentGroupAssignmentsItem: + type: object + properties: + id: + type: string + title: Id + group: + $ref: '#/components/schemas/Group' + agent: + $ref: '#/components/schemas/Agent' + type: + type: string + enum: + - networking-uxi/agent-group-assignment + title: Type + required: + - id + - group + - agent + - type + title: AgentGroupAssignmentsItem + AgentGroupAssignmentsResponse: + type: object + properties: + items: + type: array + items: + $ref: '#/components/schemas/AgentGroupAssignmentsItem' + title: Items + count: + type: integer + title: Count + next: + anyOf: + - type: string + nullable: true + title: Next + required: + - items + - count + - next + title: AgentGroupAssignmentsResponse AgentItem: type: object properties: @@ -1823,6 +1932,7 @@ tags: - name: v1alpha1 - name: configuration - name: agents + - name: agent-group-assignments - name: groups - name: health - name: network-group-assignments diff --git a/pkg/config-api-client/api/openapi.yaml b/pkg/config-api-client/api/openapi.yaml index 042acdf1..5c334fde 100644 --- a/pkg/config-api-client/api/openapi.yaml +++ b/pkg/config-api-client/api/openapi.yaml @@ -9,7 +9,7 @@ info: name: "No idea, but we need something" termsOfService: http://we.dont.care.yet.com/term-of-service title: Configuration Api - version: 5.3.0 + version: 5.4.0 servers: - url: https://api.capenetworks.com - url: https://api.staging.capedev.io @@ -19,6 +19,7 @@ tags: - name: v1alpha1 - name: configuration - name: agents +- name: agent-group-assignments - name: groups - name: health - name: network-group-assignments @@ -29,6 +30,63 @@ tags: - name: wired-networks - name: wireless-networks paths: + /networking-uxi/v1alpha1/agent-group-assignments: + get: + description: Get a list of agent group assignments + operationId: agent_group_assignments_get + parameters: + - explode: true + in: query + name: id + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: next + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 50 + maximum: 100 + minimum: 0 + title: Limit + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AgentGroupAssignmentsResponse' + description: Successful Response + "4XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Client Error + "5XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Server Error + security: + - HTTPBearer: [] + summary: Agent Group Assignments Get + tags: + - configuration + x-stability-level: alpha /networking-uxi/v1alpha1/agents/{agent_uid}: delete: description: Delete an existing agent. @@ -894,6 +952,80 @@ paths: x-stability-level: alpha components: schemas: + Agent: + example: + id: id + properties: + id: + title: Id + type: string + required: + - id + title: Agent + type: object + AgentGroupAssignmentsItem: + example: + agent: + id: id + id: id + type: networking-uxi/agent-group-assignment + group: + id: id + properties: + id: + title: Id + type: string + group: + $ref: '#/components/schemas/Group' + agent: + $ref: '#/components/schemas/Agent' + type: + enum: + - networking-uxi/agent-group-assignment + title: Type + type: string + required: + - agent + - group + - id + - type + title: AgentGroupAssignmentsItem + type: object + AgentGroupAssignmentsResponse: + example: + next: next + count: 0 + items: + - agent: + id: id + id: id + type: networking-uxi/agent-group-assignment + group: + id: id + - agent: + id: id + id: id + type: networking-uxi/agent-group-assignment + group: + id: id + properties: + items: + items: + $ref: '#/components/schemas/AgentGroupAssignmentsItem' + title: Items + type: array + count: + title: Count + type: integer + next: + nullable: true + type: string + required: + - count + - items + - next + title: AgentGroupAssignmentsResponse + type: object AgentItem: example: notes: notes @@ -1017,7 +1149,7 @@ components: errorCode: errorCode debugId: debugId message: message - httpStatusCode: 0 + httpStatusCode: 6 errorDetails: - type: type issues: diff --git a/pkg/config-api-client/api_configuration.go b/pkg/config-api-client/api_configuration.go index 51a1cca2..489f395b 100644 --- a/pkg/config-api-client/api_configuration.go +++ b/pkg/config-api-client/api_configuration.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ @@ -23,6 +23,177 @@ import ( // ConfigurationAPIService ConfigurationAPI service type ConfigurationAPIService service +type ApiAgentGroupAssignmentsGetRequest struct { + ctx context.Context + ApiService *ConfigurationAPIService + id *string + next *string + limit *int32 +} + +func (r ApiAgentGroupAssignmentsGetRequest) Id(id string) ApiAgentGroupAssignmentsGetRequest { + r.id = &id + return r +} + +func (r ApiAgentGroupAssignmentsGetRequest) Next(next string) ApiAgentGroupAssignmentsGetRequest { + r.next = &next + return r +} + +func (r ApiAgentGroupAssignmentsGetRequest) Limit(limit int32) ApiAgentGroupAssignmentsGetRequest { + r.limit = &limit + return r +} + +func (r ApiAgentGroupAssignmentsGetRequest) Execute() (*AgentGroupAssignmentsResponse, *http.Response, error) { + return r.ApiService.AgentGroupAssignmentsGetExecute(r) +} + +/* +AgentGroupAssignmentsGet Agent Group Assignments Get + +# Get a list of agent group assignments + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAgentGroupAssignmentsGetRequest +*/ +func (a *ConfigurationAPIService) AgentGroupAssignmentsGet( + ctx context.Context, +) ApiAgentGroupAssignmentsGetRequest { + return ApiAgentGroupAssignmentsGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return AgentGroupAssignmentsResponse +func (a *ConfigurationAPIService) AgentGroupAssignmentsGetExecute( + r ApiAgentGroupAssignmentsGetRequest, +) (*AgentGroupAssignmentsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AgentGroupAssignmentsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext( + r.ctx, + "ConfigurationAPIService.AgentGroupAssignmentsGet", + ) + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/networking-uxi/v1alpha1/agent-group-assignments" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.next != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next", r.next, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 50 + r.limit = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // 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 + } + req, err := a.client.prepareRequest( + r.ctx, + localVarPath, + localVarHTTPMethod, + localVarPostBody, + localVarHeaderParams, + localVarQueryParams, + localVarFormParams, + formFiles, + ) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode >= 400 && localVarHTTPResponse.StatusCode < 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode >= 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode( + &localVarReturnValue, + localVarBody, + localVarHTTPResponse.Header.Get("Content-Type"), + ) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiAgentsDeleteRequest struct { ctx context.Context ApiService *ConfigurationAPIService diff --git a/pkg/config-api-client/client.go b/pkg/config-api-client/client.go index 845295b0..2cbcadd4 100644 --- a/pkg/config-api-client/client.go +++ b/pkg/config-api-client/client.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ @@ -41,7 +41,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the Configuration Api API v5.3.0 +// APIClient manages communication with the Configuration Api API v5.4.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/pkg/config-api-client/configuration.go b/pkg/config-api-client/configuration.go index 7aaf5261..7540c6aa 100644 --- a/pkg/config-api-client/configuration.go +++ b/pkg/config-api-client/configuration.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/docs/Agent.md b/pkg/config-api-client/docs/Agent.md new file mode 100644 index 00000000..b0ba7e80 --- /dev/null +++ b/pkg/config-api-client/docs/Agent.md @@ -0,0 +1,51 @@ +# Agent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | + +## Methods + +### NewAgent + +`func NewAgent(id string, ) *Agent` + +NewAgent instantiates a new Agent 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 + +### NewAgentWithDefaults + +`func NewAgentWithDefaults() *Agent` + +NewAgentWithDefaults instantiates a new Agent 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 + +### GetId + +`func (o *Agent) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Agent) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Agent) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/config-api-client/docs/AgentGroupAssignmentsItem.md b/pkg/config-api-client/docs/AgentGroupAssignmentsItem.md new file mode 100644 index 00000000..84124b5d --- /dev/null +++ b/pkg/config-api-client/docs/AgentGroupAssignmentsItem.md @@ -0,0 +1,114 @@ +# AgentGroupAssignmentsItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Group** | [**Group**](Group.md) | | +**Agent** | [**Agent**](Agent.md) | | +**Type** | **string** | | + +## Methods + +### NewAgentGroupAssignmentsItem + +`func NewAgentGroupAssignmentsItem(id string, group Group, agent Agent, type_ string, ) *AgentGroupAssignmentsItem` + +NewAgentGroupAssignmentsItem instantiates a new AgentGroupAssignmentsItem 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 + +### NewAgentGroupAssignmentsItemWithDefaults + +`func NewAgentGroupAssignmentsItemWithDefaults() *AgentGroupAssignmentsItem` + +NewAgentGroupAssignmentsItemWithDefaults instantiates a new AgentGroupAssignmentsItem 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 + +### GetId + +`func (o *AgentGroupAssignmentsItem) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AgentGroupAssignmentsItem) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AgentGroupAssignmentsItem) SetId(v string)` + +SetId sets Id field to given value. + + +### GetGroup + +`func (o *AgentGroupAssignmentsItem) GetGroup() Group` + +GetGroup returns the Group field if non-nil, zero value otherwise. + +### GetGroupOk + +`func (o *AgentGroupAssignmentsItem) GetGroupOk() (*Group, bool)` + +GetGroupOk returns a tuple with the Group field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroup + +`func (o *AgentGroupAssignmentsItem) SetGroup(v Group)` + +SetGroup sets Group field to given value. + + +### GetAgent + +`func (o *AgentGroupAssignmentsItem) GetAgent() Agent` + +GetAgent returns the Agent field if non-nil, zero value otherwise. + +### GetAgentOk + +`func (o *AgentGroupAssignmentsItem) GetAgentOk() (*Agent, bool)` + +GetAgentOk returns a tuple with the Agent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAgent + +`func (o *AgentGroupAssignmentsItem) SetAgent(v Agent)` + +SetAgent sets Agent field to given value. + + +### GetType + +`func (o *AgentGroupAssignmentsItem) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AgentGroupAssignmentsItem) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AgentGroupAssignmentsItem) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/config-api-client/docs/AgentGroupAssignmentsResponse.md b/pkg/config-api-client/docs/AgentGroupAssignmentsResponse.md new file mode 100644 index 00000000..e6d6ebed --- /dev/null +++ b/pkg/config-api-client/docs/AgentGroupAssignmentsResponse.md @@ -0,0 +1,103 @@ +# AgentGroupAssignmentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]AgentGroupAssignmentsItem**](AgentGroupAssignmentsItem.md) | | +**Count** | **int32** | | +**Next** | **NullableString** | | + +## Methods + +### NewAgentGroupAssignmentsResponse + +`func NewAgentGroupAssignmentsResponse(items []AgentGroupAssignmentsItem, count int32, next NullableString, ) *AgentGroupAssignmentsResponse` + +NewAgentGroupAssignmentsResponse instantiates a new AgentGroupAssignmentsResponse 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 + +### NewAgentGroupAssignmentsResponseWithDefaults + +`func NewAgentGroupAssignmentsResponseWithDefaults() *AgentGroupAssignmentsResponse` + +NewAgentGroupAssignmentsResponseWithDefaults instantiates a new AgentGroupAssignmentsResponse 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 + +### GetItems + +`func (o *AgentGroupAssignmentsResponse) GetItems() []AgentGroupAssignmentsItem` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *AgentGroupAssignmentsResponse) GetItemsOk() (*[]AgentGroupAssignmentsItem, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *AgentGroupAssignmentsResponse) SetItems(v []AgentGroupAssignmentsItem)` + +SetItems sets Items field to given value. + + +### GetCount + +`func (o *AgentGroupAssignmentsResponse) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *AgentGroupAssignmentsResponse) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *AgentGroupAssignmentsResponse) SetCount(v int32)` + +SetCount sets Count field to given value. + + +### GetNext + +`func (o *AgentGroupAssignmentsResponse) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *AgentGroupAssignmentsResponse) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *AgentGroupAssignmentsResponse) SetNext(v string)` + +SetNext sets Next field to given value. + + +### SetNextNil + +`func (o *AgentGroupAssignmentsResponse) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *AgentGroupAssignmentsResponse) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/config-api-client/docs/ConfigurationAPI.md b/pkg/config-api-client/docs/ConfigurationAPI.md index 0a1ce70a..12186df3 100644 --- a/pkg/config-api-client/docs/ConfigurationAPI.md +++ b/pkg/config-api-client/docs/ConfigurationAPI.md @@ -4,6 +4,7 @@ All URIs are relative to *https://api.capenetworks.com* Method | HTTP request | Description ------------- | ------------- | ------------- +[**AgentGroupAssignmentsGet**](ConfigurationAPI.md#AgentGroupAssignmentsGet) | **Get** /networking-uxi/v1alpha1/agent-group-assignments | Agent Group Assignments Get [**AgentsDelete**](ConfigurationAPI.md#AgentsDelete) | **Delete** /networking-uxi/v1alpha1/agents/{agent_uid} | Agents Delete [**AgentsGet**](ConfigurationAPI.md#AgentsGet) | **Get** /networking-uxi/v1alpha1/agents | Agents Get [**GroupsDelete**](ConfigurationAPI.md#GroupsDelete) | **Delete** /networking-uxi/v1alpha1/groups/{group_uid} | Groups Delete @@ -26,6 +27,76 @@ Method | HTTP request | Description +## AgentGroupAssignmentsGet + +> AgentGroupAssignmentsResponse AgentGroupAssignmentsGet(ctx).Id(id).Next(next).Limit(limit).Execute() + +Agent Group Assignments Get + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/aruba-uxi/terraform-provider-configuration-api/pkg/config-api-client" +) + +func main() { + id := "id_example" // string | (optional) + next := "next_example" // string | (optional) + limit := int32(56) // int32 | (optional) (default to 50) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConfigurationAPI.AgentGroupAssignmentsGet(context.Background()).Id(id).Next(next).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.AgentGroupAssignmentsGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AgentGroupAssignmentsGet`: AgentGroupAssignmentsResponse + fmt.Fprintf(os.Stdout, "Response from `ConfigurationAPI.AgentGroupAssignmentsGet`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAgentGroupAssignmentsGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string** | | + **next** | **string** | | + **limit** | **int32** | | [default to 50] + +### Return type + +[**AgentGroupAssignmentsResponse**](AgentGroupAssignmentsResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## AgentsDelete > interface{} AgentsDelete(ctx, agentUid).Execute() @@ -47,7 +118,7 @@ import ( ) func main() { - agentUid := "agentUid_example" // string | + agentUid := "agentUid_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -67,7 +138,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**agentUid** | **string** | | +**agentUid** | **string** | | ### Other Parameters @@ -144,8 +215,8 @@ Other parameters are passed through a pointer to a apiAgentsGetRequest struct vi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **next** | **string** | | + **id** | **string** | | + **next** | **string** | | **limit** | **int32** | | [default to 50] ### Return type @@ -187,7 +258,7 @@ import ( ) func main() { - groupUid := "groupUid_example" // string | + groupUid := "groupUid_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -207,7 +278,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupUid** | **string** | | +**groupUid** | **string** | | ### Other Parameters @@ -284,8 +355,8 @@ Other parameters are passed through a pointer to a apiGroupsGetRequest struct vi Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **next** | **string** | | + **id** | **string** | | + **next** | **string** | | **limit** | **int32** | | [default to 50] ### Return type @@ -327,7 +398,7 @@ import ( ) func main() { - groupUid := "groupUid_example" // string | + groupUid := "groupUid_example" // string | groupsPatchRequest := *openapiclient.NewGroupsPatchRequest("Name_example") // GroupsPatchRequest | (optional) configuration := openapiclient.NewConfiguration() @@ -348,7 +419,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupUid** | **string** | | +**groupUid** | **string** | | ### Other Parameters @@ -358,7 +429,7 @@ Other parameters are passed through a pointer to a apiGroupsPatchRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **groupsPatchRequest** | [**GroupsPatchRequest**](GroupsPatchRequest.md) | | + **groupsPatchRequest** | [**GroupsPatchRequest**](GroupsPatchRequest.md) | | ### Return type @@ -399,7 +470,7 @@ import ( ) func main() { - groupsPostRequest := *openapiclient.NewGroupsPostRequest("Name_example") // GroupsPostRequest | + groupsPostRequest := *openapiclient.NewGroupsPostRequest("Name_example") // GroupsPostRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -424,7 +495,7 @@ Other parameters are passed through a pointer to a apiGroupsPostRequest struct v Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **groupsPostRequest** | [**GroupsPostRequest**](GroupsPostRequest.md) | | + **groupsPostRequest** | [**GroupsPostRequest**](GroupsPostRequest.md) | | ### Return type @@ -465,7 +536,7 @@ import ( ) func main() { - id := "id_example" // string | + id := "id_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -485,7 +556,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | | +**id** | **string** | | ### Other Parameters @@ -562,8 +633,8 @@ Other parameters are passed through a pointer to a apiNetworkGroupAssignmentsGet Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **next** | **string** | | + **id** | **string** | | + **next** | **string** | | **limit** | **int32** | | [default to 50] ### Return type @@ -605,7 +676,7 @@ import ( ) func main() { - networkGroupAssignmentsPostRequest := *openapiclient.NewNetworkGroupAssignmentsPostRequest("GroupId_example", "NetworkId_example") // NetworkGroupAssignmentsPostRequest | + networkGroupAssignmentsPostRequest := *openapiclient.NewNetworkGroupAssignmentsPostRequest("GroupId_example", "NetworkId_example") // NetworkGroupAssignmentsPostRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -630,7 +701,7 @@ Other parameters are passed through a pointer to a apiNetworkGroupAssignmentsPos Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **networkGroupAssignmentsPostRequest** | [**NetworkGroupAssignmentsPostRequest**](NetworkGroupAssignmentsPostRequest.md) | | + **networkGroupAssignmentsPostRequest** | [**NetworkGroupAssignmentsPostRequest**](NetworkGroupAssignmentsPostRequest.md) | | ### Return type @@ -671,7 +742,7 @@ import ( ) func main() { - id := "id_example" // string | + id := "id_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -691,7 +762,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | | +**id** | **string** | | ### Other Parameters @@ -768,8 +839,8 @@ Other parameters are passed through a pointer to a apiSensorGroupAssignmentsGetR Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **next** | **string** | | + **id** | **string** | | + **next** | **string** | | **limit** | **int32** | | [default to 50] ### Return type @@ -811,7 +882,7 @@ import ( ) func main() { - sensorGroupAssignmentsPostRequest := *openapiclient.NewSensorGroupAssignmentsPostRequest("GroupId_example", "SensorId_example") // SensorGroupAssignmentsPostRequest | + sensorGroupAssignmentsPostRequest := *openapiclient.NewSensorGroupAssignmentsPostRequest("GroupId_example", "SensorId_example") // SensorGroupAssignmentsPostRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -836,7 +907,7 @@ Other parameters are passed through a pointer to a apiSensorGroupAssignmentsPost Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sensorGroupAssignmentsPostRequest** | [**SensorGroupAssignmentsPostRequest**](SensorGroupAssignmentsPostRequest.md) | | + **sensorGroupAssignmentsPostRequest** | [**SensorGroupAssignmentsPostRequest**](SensorGroupAssignmentsPostRequest.md) | | ### Return type @@ -904,8 +975,8 @@ Other parameters are passed through a pointer to a apiSensorsGetRequest struct v Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **next** | **string** | | + **id** | **string** | | + **next** | **string** | | **limit** | **int32** | | [default to 50] ### Return type @@ -947,8 +1018,8 @@ import ( ) func main() { - sensorUid := "sensorUid_example" // string | - sensorsPatchRequest := *openapiclient.NewSensorsPatchRequest() // SensorsPatchRequest | + sensorUid := "sensorUid_example" // string | + sensorsPatchRequest := *openapiclient.NewSensorsPatchRequest() // SensorsPatchRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -968,7 +1039,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sensorUid** | **string** | | +**sensorUid** | **string** | | ### Other Parameters @@ -978,7 +1049,7 @@ Other parameters are passed through a pointer to a apiSensorsPatchRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **sensorsPatchRequest** | [**SensorsPatchRequest**](SensorsPatchRequest.md) | | + **sensorsPatchRequest** | [**SensorsPatchRequest**](SensorsPatchRequest.md) | | ### Return type @@ -1019,7 +1090,7 @@ import ( ) func main() { - id := "id_example" // string | + id := "id_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -1039,7 +1110,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | | +**id** | **string** | | ### Other Parameters @@ -1089,7 +1160,7 @@ import ( ) func main() { - serviceTestGroupAssignmentsPostRequest := *openapiclient.NewServiceTestGroupAssignmentsPostRequest("GroupId_example", "ServiceTestId_example") // ServiceTestGroupAssignmentsPostRequest | + serviceTestGroupAssignmentsPostRequest := *openapiclient.NewServiceTestGroupAssignmentsPostRequest("GroupId_example", "ServiceTestId_example") // ServiceTestGroupAssignmentsPostRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -1114,7 +1185,7 @@ Other parameters are passed through a pointer to a apiServiceTestGroupAssignment Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **serviceTestGroupAssignmentsPostRequest** | [**ServiceTestGroupAssignmentsPostRequest**](ServiceTestGroupAssignmentsPostRequest.md) | | + **serviceTestGroupAssignmentsPostRequest** | [**ServiceTestGroupAssignmentsPostRequest**](ServiceTestGroupAssignmentsPostRequest.md) | | ### Return type @@ -1182,8 +1253,8 @@ Other parameters are passed through a pointer to a apiServiceTestsGetRequest str Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **next** | **string** | | + **id** | **string** | | + **next** | **string** | | **limit** | **int32** | | [default to 50] ### Return type @@ -1252,8 +1323,8 @@ Other parameters are passed through a pointer to a apiWiredNetworksGetRequest st Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **next** | **string** | | + **id** | **string** | | + **next** | **string** | | **limit** | **int32** | | [default to 50] ### Return type @@ -1322,8 +1393,8 @@ Other parameters are passed through a pointer to a apiWirelessNetworksGetRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string** | | - **next** | **string** | | + **id** | **string** | | + **next** | **string** | | **limit** | **int32** | | [default to 50] ### Return type @@ -1342,3 +1413,4 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/pkg/config-api-client/model_agent.go b/pkg/config-api-client/model_agent.go new file mode 100644 index 00000000..b9d7e64c --- /dev/null +++ b/pkg/config-api-client/model_agent.go @@ -0,0 +1,157 @@ +/* +Configuration Api + +Nice description goes here + +API version: 5.4.0 +Contact: support@capenetworks.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package config_api_client + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Agent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Agent{} + +// Agent struct for Agent +type Agent struct { + Id string `json:"id"` +} + +type _Agent Agent + +// NewAgent instantiates a new Agent 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 +func NewAgent(id string) *Agent { + this := Agent{} + this.Id = id + return &this +} + +// NewAgentWithDefaults instantiates a new Agent 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 +func NewAgentWithDefaults() *Agent { + this := Agent{} + return &this +} + +// GetId returns the Id field value +func (o *Agent) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Agent) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Agent) SetId(v string) { + o.Id = v +} + +func (o Agent) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Agent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *Agent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAgent := _Agent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAgent) + + if err != nil { + return err + } + + *o = Agent(varAgent) + + return err +} + +type NullableAgent struct { + value *Agent + isSet bool +} + +func (v NullableAgent) Get() *Agent { + return v.value +} + +func (v *NullableAgent) Set(val *Agent) { + v.value = val + v.isSet = true +} + +func (v NullableAgent) IsSet() bool { + return v.isSet +} + +func (v *NullableAgent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgent(val *Agent) *NullableAgent { + return &NullableAgent{value: val, isSet: true} +} + +func (v NullableAgent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/config-api-client/model_agent_group_assignments_item.go b/pkg/config-api-client/model_agent_group_assignments_item.go new file mode 100644 index 00000000..5eb673cc --- /dev/null +++ b/pkg/config-api-client/model_agent_group_assignments_item.go @@ -0,0 +1,248 @@ +/* +Configuration Api + +Nice description goes here + +API version: 5.4.0 +Contact: support@capenetworks.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package config_api_client + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AgentGroupAssignmentsItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentGroupAssignmentsItem{} + +// AgentGroupAssignmentsItem struct for AgentGroupAssignmentsItem +type AgentGroupAssignmentsItem struct { + Id string `json:"id"` + Group Group `json:"group"` + Agent Agent `json:"agent"` + Type string `json:"type"` +} + +type _AgentGroupAssignmentsItem AgentGroupAssignmentsItem + +// NewAgentGroupAssignmentsItem instantiates a new AgentGroupAssignmentsItem 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 +func NewAgentGroupAssignmentsItem( + id string, + group Group, + agent Agent, + type_ string, +) *AgentGroupAssignmentsItem { + this := AgentGroupAssignmentsItem{} + this.Id = id + this.Group = group + this.Agent = agent + this.Type = type_ + return &this +} + +// NewAgentGroupAssignmentsItemWithDefaults instantiates a new AgentGroupAssignmentsItem 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 +func NewAgentGroupAssignmentsItemWithDefaults() *AgentGroupAssignmentsItem { + this := AgentGroupAssignmentsItem{} + return &this +} + +// GetId returns the Id field value +func (o *AgentGroupAssignmentsItem) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *AgentGroupAssignmentsItem) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AgentGroupAssignmentsItem) SetId(v string) { + o.Id = v +} + +// GetGroup returns the Group field value +func (o *AgentGroupAssignmentsItem) GetGroup() Group { + if o == nil { + var ret Group + return ret + } + + return o.Group +} + +// GetGroupOk returns a tuple with the Group field value +// and a boolean to check if the value has been set. +func (o *AgentGroupAssignmentsItem) GetGroupOk() (*Group, bool) { + if o == nil { + return nil, false + } + return &o.Group, true +} + +// SetGroup sets field value +func (o *AgentGroupAssignmentsItem) SetGroup(v Group) { + o.Group = v +} + +// GetAgent returns the Agent field value +func (o *AgentGroupAssignmentsItem) GetAgent() Agent { + if o == nil { + var ret Agent + return ret + } + + return o.Agent +} + +// GetAgentOk returns a tuple with the Agent field value +// and a boolean to check if the value has been set. +func (o *AgentGroupAssignmentsItem) GetAgentOk() (*Agent, bool) { + if o == nil { + return nil, false + } + return &o.Agent, true +} + +// SetAgent sets field value +func (o *AgentGroupAssignmentsItem) SetAgent(v Agent) { + o.Agent = v +} + +// GetType returns the Type field value +func (o *AgentGroupAssignmentsItem) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AgentGroupAssignmentsItem) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AgentGroupAssignmentsItem) SetType(v string) { + o.Type = v +} + +func (o AgentGroupAssignmentsItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentGroupAssignmentsItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["group"] = o.Group + toSerialize["agent"] = o.Agent + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *AgentGroupAssignmentsItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "group", + "agent", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAgentGroupAssignmentsItem := _AgentGroupAssignmentsItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAgentGroupAssignmentsItem) + + if err != nil { + return err + } + + *o = AgentGroupAssignmentsItem(varAgentGroupAssignmentsItem) + + return err +} + +type NullableAgentGroupAssignmentsItem struct { + value *AgentGroupAssignmentsItem + isSet bool +} + +func (v NullableAgentGroupAssignmentsItem) Get() *AgentGroupAssignmentsItem { + return v.value +} + +func (v *NullableAgentGroupAssignmentsItem) Set(val *AgentGroupAssignmentsItem) { + v.value = val + v.isSet = true +} + +func (v NullableAgentGroupAssignmentsItem) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentGroupAssignmentsItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentGroupAssignmentsItem( + val *AgentGroupAssignmentsItem, +) *NullableAgentGroupAssignmentsItem { + return &NullableAgentGroupAssignmentsItem{value: val, isSet: true} +} + +func (v NullableAgentGroupAssignmentsItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentGroupAssignmentsItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/config-api-client/model_agent_group_assignments_response.go b/pkg/config-api-client/model_agent_group_assignments_response.go new file mode 100644 index 00000000..8ff372cb --- /dev/null +++ b/pkg/config-api-client/model_agent_group_assignments_response.go @@ -0,0 +1,221 @@ +/* +Configuration Api + +Nice description goes here + +API version: 5.4.0 +Contact: support@capenetworks.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package config_api_client + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AgentGroupAssignmentsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AgentGroupAssignmentsResponse{} + +// AgentGroupAssignmentsResponse struct for AgentGroupAssignmentsResponse +type AgentGroupAssignmentsResponse struct { + Items []AgentGroupAssignmentsItem `json:"items"` + Count int32 `json:"count"` + Next NullableString `json:"next"` +} + +type _AgentGroupAssignmentsResponse AgentGroupAssignmentsResponse + +// NewAgentGroupAssignmentsResponse instantiates a new AgentGroupAssignmentsResponse 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 +func NewAgentGroupAssignmentsResponse( + items []AgentGroupAssignmentsItem, + count int32, + next NullableString, +) *AgentGroupAssignmentsResponse { + this := AgentGroupAssignmentsResponse{} + this.Items = items + this.Count = count + this.Next = next + return &this +} + +// NewAgentGroupAssignmentsResponseWithDefaults instantiates a new AgentGroupAssignmentsResponse 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 +func NewAgentGroupAssignmentsResponseWithDefaults() *AgentGroupAssignmentsResponse { + this := AgentGroupAssignmentsResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *AgentGroupAssignmentsResponse) GetItems() []AgentGroupAssignmentsItem { + if o == nil { + var ret []AgentGroupAssignmentsItem + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *AgentGroupAssignmentsResponse) GetItemsOk() ([]AgentGroupAssignmentsItem, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *AgentGroupAssignmentsResponse) SetItems(v []AgentGroupAssignmentsItem) { + o.Items = v +} + +// GetCount returns the Count field value +func (o *AgentGroupAssignmentsResponse) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *AgentGroupAssignmentsResponse) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *AgentGroupAssignmentsResponse) SetCount(v int32) { + o.Count = v +} + +// GetNext returns the Next field value +// If the value is explicit nil, the zero value for string will be returned +func (o *AgentGroupAssignmentsResponse) GetNext() string { + if o == nil || o.Next.Get() == nil { + var ret string + return ret + } + + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AgentGroupAssignmentsResponse) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// SetNext sets field value +func (o *AgentGroupAssignmentsResponse) SetNext(v string) { + o.Next.Set(&v) +} + +func (o AgentGroupAssignmentsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AgentGroupAssignmentsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["count"] = o.Count + toSerialize["next"] = o.Next.Get() + return toSerialize, nil +} + +func (o *AgentGroupAssignmentsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "count", + "next", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAgentGroupAssignmentsResponse := _AgentGroupAssignmentsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAgentGroupAssignmentsResponse) + + if err != nil { + return err + } + + *o = AgentGroupAssignmentsResponse(varAgentGroupAssignmentsResponse) + + return err +} + +type NullableAgentGroupAssignmentsResponse struct { + value *AgentGroupAssignmentsResponse + isSet bool +} + +func (v NullableAgentGroupAssignmentsResponse) Get() *AgentGroupAssignmentsResponse { + return v.value +} + +func (v *NullableAgentGroupAssignmentsResponse) Set(val *AgentGroupAssignmentsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAgentGroupAssignmentsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAgentGroupAssignmentsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAgentGroupAssignmentsResponse( + val *AgentGroupAssignmentsResponse, +) *NullableAgentGroupAssignmentsResponse { + return &NullableAgentGroupAssignmentsResponse{value: val, isSet: true} +} + +func (v NullableAgentGroupAssignmentsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAgentGroupAssignmentsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/config-api-client/model_agent_item.go b/pkg/config-api-client/model_agent_item.go index 9672f912..eca17f4b 100644 --- a/pkg/config-api-client/model_agent_item.go +++ b/pkg/config-api-client/model_agent_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_agents_response.go b/pkg/config-api-client/model_agents_response.go index dd02d0bb..c751b76f 100644 --- a/pkg/config-api-client/model_agents_response.go +++ b/pkg/config-api-client/model_agents_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_error_detail.go b/pkg/config-api-client/model_error_detail.go index c9fbf200..2b201310 100644 --- a/pkg/config-api-client/model_error_detail.go +++ b/pkg/config-api-client/model_error_detail.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_error_response.go b/pkg/config-api-client/model_error_response.go index 14ae2cbc..badb9e57 100644 --- a/pkg/config-api-client/model_error_response.go +++ b/pkg/config-api-client/model_error_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_group.go b/pkg/config-api-client/model_group.go index 8e9e71fa..7328df49 100644 --- a/pkg/config-api-client/model_group.go +++ b/pkg/config-api-client/model_group.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_get_item.go b/pkg/config-api-client/model_groups_get_item.go index c50b77d3..bd386746 100644 --- a/pkg/config-api-client/model_groups_get_item.go +++ b/pkg/config-api-client/model_groups_get_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_get_response.go b/pkg/config-api-client/model_groups_get_response.go index d4d748dd..4637bcc3 100644 --- a/pkg/config-api-client/model_groups_get_response.go +++ b/pkg/config-api-client/model_groups_get_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_patch_request.go b/pkg/config-api-client/model_groups_patch_request.go index 47ebd70c..7cf61b43 100644 --- a/pkg/config-api-client/model_groups_patch_request.go +++ b/pkg/config-api-client/model_groups_patch_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_patch_response.go b/pkg/config-api-client/model_groups_patch_response.go index 27f501ef..128545d1 100644 --- a/pkg/config-api-client/model_groups_patch_response.go +++ b/pkg/config-api-client/model_groups_patch_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_post_request.go b/pkg/config-api-client/model_groups_post_request.go index 1094358f..04139d99 100644 --- a/pkg/config-api-client/model_groups_post_request.go +++ b/pkg/config-api-client/model_groups_post_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_groups_post_response.go b/pkg/config-api-client/model_groups_post_response.go index 6ba42f33..860b33c2 100644 --- a/pkg/config-api-client/model_groups_post_response.go +++ b/pkg/config-api-client/model_groups_post_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_issue.go b/pkg/config-api-client/model_issue.go index 3ce6699e..f8e77050 100644 --- a/pkg/config-api-client/model_issue.go +++ b/pkg/config-api-client/model_issue.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_issue_subject.go b/pkg/config-api-client/model_issue_subject.go index a3a1ccd7..7b799f59 100644 --- a/pkg/config-api-client/model_issue_subject.go +++ b/pkg/config-api-client/model_issue_subject.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network.go b/pkg/config-api-client/model_network.go index b471a4aa..11ec39b9 100644 --- a/pkg/config-api-client/model_network.go +++ b/pkg/config-api-client/model_network.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network_group_assignments_item.go b/pkg/config-api-client/model_network_group_assignments_item.go index 6f206cde..ae01a174 100644 --- a/pkg/config-api-client/model_network_group_assignments_item.go +++ b/pkg/config-api-client/model_network_group_assignments_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network_group_assignments_post_request.go b/pkg/config-api-client/model_network_group_assignments_post_request.go index d763b378..d38ab453 100644 --- a/pkg/config-api-client/model_network_group_assignments_post_request.go +++ b/pkg/config-api-client/model_network_group_assignments_post_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network_group_assignments_post_response.go b/pkg/config-api-client/model_network_group_assignments_post_response.go index e7bc17fd..8583dcf4 100644 --- a/pkg/config-api-client/model_network_group_assignments_post_response.go +++ b/pkg/config-api-client/model_network_group_assignments_post_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_network_group_assignments_response.go b/pkg/config-api-client/model_network_group_assignments_response.go index 515e5f9a..a290d298 100644 --- a/pkg/config-api-client/model_network_group_assignments_response.go +++ b/pkg/config-api-client/model_network_group_assignments_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_parent.go b/pkg/config-api-client/model_parent.go index ebc22a81..1a187b22 100644 --- a/pkg/config-api-client/model_parent.go +++ b/pkg/config-api-client/model_parent.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor.go b/pkg/config-api-client/model_sensor.go index a32c56ee..2a5f2809 100644 --- a/pkg/config-api-client/model_sensor.go +++ b/pkg/config-api-client/model_sensor.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignment_response.go b/pkg/config-api-client/model_sensor_group_assignment_response.go index 6d32cb79..cb48206c 100644 --- a/pkg/config-api-client/model_sensor_group_assignment_response.go +++ b/pkg/config-api-client/model_sensor_group_assignment_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignments_item.go b/pkg/config-api-client/model_sensor_group_assignments_item.go index e1b6ae29..c90b3898 100644 --- a/pkg/config-api-client/model_sensor_group_assignments_item.go +++ b/pkg/config-api-client/model_sensor_group_assignments_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignments_post_request.go b/pkg/config-api-client/model_sensor_group_assignments_post_request.go index bf200a26..b1b56396 100644 --- a/pkg/config-api-client/model_sensor_group_assignments_post_request.go +++ b/pkg/config-api-client/model_sensor_group_assignments_post_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignments_response.go b/pkg/config-api-client/model_sensor_group_assignments_response.go index a179f71e..8330c287 100644 --- a/pkg/config-api-client/model_sensor_group_assignments_response.go +++ b/pkg/config-api-client/model_sensor_group_assignments_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_item.go b/pkg/config-api-client/model_sensor_item.go index 052e1daf..533f9fe5 100644 --- a/pkg/config-api-client/model_sensor_item.go +++ b/pkg/config-api-client/model_sensor_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensors_patch_request.go b/pkg/config-api-client/model_sensors_patch_request.go index 59330b4d..488b9ce6 100644 --- a/pkg/config-api-client/model_sensors_patch_request.go +++ b/pkg/config-api-client/model_sensors_patch_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensors_patch_response.go b/pkg/config-api-client/model_sensors_patch_response.go index 98f104f1..30c16872 100644 --- a/pkg/config-api-client/model_sensors_patch_response.go +++ b/pkg/config-api-client/model_sensors_patch_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensors_response.go b/pkg/config-api-client/model_sensors_response.go index 24e20bfa..97956185 100644 --- a/pkg/config-api-client/model_sensors_response.go +++ b/pkg/config-api-client/model_sensors_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_service_test_.go b/pkg/config-api-client/model_service_test_.go index c3fc5365..75b91084 100644 --- a/pkg/config-api-client/model_service_test_.go +++ b/pkg/config-api-client/model_service_test_.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_service_test_group_assignments_post_request.go b/pkg/config-api-client/model_service_test_group_assignments_post_request.go index 096e48bd..ad366a6c 100644 --- a/pkg/config-api-client/model_service_test_group_assignments_post_request.go +++ b/pkg/config-api-client/model_service_test_group_assignments_post_request.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_service_test_group_assignments_post_response.go b/pkg/config-api-client/model_service_test_group_assignments_post_response.go index 15413d65..25fa3298 100644 --- a/pkg/config-api-client/model_service_test_group_assignments_post_response.go +++ b/pkg/config-api-client/model_service_test_group_assignments_post_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_service_tests_list_item.go b/pkg/config-api-client/model_service_tests_list_item.go index db20d771..0afec495 100644 --- a/pkg/config-api-client/model_service_tests_list_item.go +++ b/pkg/config-api-client/model_service_tests_list_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_service_tests_list_response.go b/pkg/config-api-client/model_service_tests_list_response.go index 461b0c2c..1ad592f2 100644 --- a/pkg/config-api-client/model_service_tests_list_response.go +++ b/pkg/config-api-client/model_service_tests_list_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_wired_networks_item.go b/pkg/config-api-client/model_wired_networks_item.go index b85120d7..44fd7666 100644 --- a/pkg/config-api-client/model_wired_networks_item.go +++ b/pkg/config-api-client/model_wired_networks_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_wired_networks_response.go b/pkg/config-api-client/model_wired_networks_response.go index 9691bcc6..df673ec2 100644 --- a/pkg/config-api-client/model_wired_networks_response.go +++ b/pkg/config-api-client/model_wired_networks_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_wireless_networks_item.go b/pkg/config-api-client/model_wireless_networks_item.go index a26aa21a..c98ba895 100644 --- a/pkg/config-api-client/model_wireless_networks_item.go +++ b/pkg/config-api-client/model_wireless_networks_item.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_wireless_networks_response.go b/pkg/config-api-client/model_wireless_networks_response.go index 755d5dc4..c33f102c 100644 --- a/pkg/config-api-client/model_wireless_networks_response.go +++ b/pkg/config-api-client/model_wireless_networks_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/response.go b/pkg/config-api-client/response.go index 62fb8c6f..cc425cde 100644 --- a/pkg/config-api-client/response.go +++ b/pkg/config-api-client/response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/test/api_configuration_test.go b/pkg/config-api-client/test/api_configuration_test.go index 430490e7..7112f64c 100644 --- a/pkg/config-api-client/test/api_configuration_test.go +++ b/pkg/config-api-client/test/api_configuration_test.go @@ -332,6 +332,46 @@ func TestConfigurationAPI(t *testing.T) { }) }) + t.Run("Test ConfigurationAPI AgentGroupAssignmentsGet", func(t *testing.T) { + + gock.New(configuration.Scheme + "://" + configuration.Host). + Get("/networking-uxi/v1alpha1/agent-group-assignments"). + MatchParams(map[string]string{"id": "uid", "limit": "10", "next": "some-cursor"}). + Reply(200). + JSON(map[string]interface{}{ + "items": []map[string]interface{}{ + { + "id": "uid", + "group": map[string]string{"id": "group_uid"}, + "agent": map[string]string{"id": "agent_uid"}, + "type": "networking-uxi/agent-group-assignment", + }, + }, + "count": 1, + "next": nil, + }) + resp, httpRes, err := apiClient.ConfigurationAPI. + AgentGroupAssignmentsGet(context.Background()). + Id("uid"). + Limit(10). + Next("some-cursor"). + Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, resp, &openapiclient.AgentGroupAssignmentsResponse{ + Items: []openapiclient.AgentGroupAssignmentsItem{ + { + Id: "uid", + Group: *openapiclient.NewGroup("group_uid"), + Agent: *openapiclient.NewAgent("agent_uid"), + Type: "networking-uxi/agent-group-assignment", + }, + }, + Count: 1, + Next: *openapiclient.NewNullableString(nil), + }) + }) t.Run("Test ConfigurationAPI SensorGroupAssignmentsGet", func(t *testing.T) { gock.New(configuration.Scheme + "://" + configuration.Host). diff --git a/pkg/config-api-client/utils.go b/pkg/config-api-client/utils.go index a8e3c2fa..9f8fbefa 100644 --- a/pkg/config-api-client/utils.go +++ b/pkg/config-api-client/utils.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 5.3.0 +API version: 5.4.0 Contact: support@capenetworks.com */