From faeee6082e5d0bb92af84106d9de8196c43a983b Mon Sep 17 00:00:00 2001 From: 1riatsila1 Date: Mon, 9 Sep 2024 16:12:37 +0200 Subject: [PATCH] feat: update client with groups get list (autogenned code) --- .../.openapi-generator/FILES | 4 + pkg/config-api-client/README.md | 5 +- .../api/.openapi.source.yaml | 120 ++++++++- pkg/config-api-client/api/openapi.yaml | 124 ++++++++- pkg/config-api-client/api_configuration.go | 156 +++++++++++- pkg/config-api-client/client.go | 4 +- pkg/config-api-client/configuration.go | 2 +- .../docs/ConfigurationAPI.md | 75 +++++- pkg/config-api-client/docs/GroupsGetItem.md | 114 +++++++++ .../docs/GroupsGetResponse.md | 72 ++++++ .../docs/PaginationDetails.md | 50 +++- pkg/config-api-client/model_error_detail.go | 2 +- pkg/config-api-client/model_error_response.go | 2 +- .../model_groups_get_item.go | 241 ++++++++++++++++++ .../model_groups_get_response.go | 185 ++++++++++++++ .../model_groups_post_request.go | 2 +- .../model_groups_post_response.go | 2 +- .../model_liveness_response.go | 2 +- .../model_pagination_details.go | 62 +++-- .../model_readiness_error_response.go | 2 +- .../model_readiness_response.go | 2 +- .../model_sensor_group_assignment.go | 2 +- ...model_sensor_group_assignments_response.go | 2 +- .../model_status_response.go | 2 +- pkg/config-api-client/response.go | 2 +- pkg/config-api-client/utils.go | 2 +- 26 files changed, 1175 insertions(+), 63 deletions(-) create mode 100644 pkg/config-api-client/docs/GroupsGetItem.md create mode 100644 pkg/config-api-client/docs/GroupsGetResponse.md create mode 100644 pkg/config-api-client/model_groups_get_item.go create mode 100644 pkg/config-api-client/model_groups_get_response.go diff --git a/pkg/config-api-client/.openapi-generator/FILES b/pkg/config-api-client/.openapi-generator/FILES index d16ee51f..8670fba8 100644 --- a/pkg/config-api-client/.openapi-generator/FILES +++ b/pkg/config-api-client/.openapi-generator/FILES @@ -6,6 +6,8 @@ configuration.go docs/ConfigurationAPI.md docs/ErrorDetail.md docs/ErrorResponse.md +docs/GroupsGetItem.md +docs/GroupsGetResponse.md docs/GroupsPostRequest.md docs/GroupsPostResponse.md docs/LivenessResponse.md @@ -19,6 +21,8 @@ go.mod go.sum model_error_detail.go model_error_response.go +model_groups_get_item.go +model_groups_get_response.go model_groups_post_request.go model_groups_post_response.go model_liveness_response.go diff --git a/pkg/config-api-client/README.md b/pkg/config-api-client/README.md index f44c43c3..dc4b9b08 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: 1.4.0 +- API version: 1.5.0 - Package version: 1.0.0 - Generator version: 7.8.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.GoClientCodegen @@ -83,6 +83,7 @@ Class | Method | HTTP request | Description *ConfigurationAPI* | [**GetLivezHealthLivezGet**](docs/ConfigurationAPI.md#getlivezhealthlivezget) | **Get** /health/livez | Live health check *ConfigurationAPI* | [**GetReadyzHealthReadyzGet**](docs/ConfigurationAPI.md#getreadyzhealthreadyzget) | **Get** /health/readyz | Ready health check *ConfigurationAPI* | [**GetStatusHealthStatusGet**](docs/ConfigurationAPI.md#getstatushealthstatusget) | **Get** /health/status | Service stats endpoint +*ConfigurationAPI* | [**GroupsGetConfigurationAppV1GroupsGet**](docs/ConfigurationAPI.md#groupsgetconfigurationappv1groupsget) | **Get** /configuration/app/v1/groups | Groups Get *ConfigurationAPI* | [**GroupsPostConfigurationAppV1GroupsPost**](docs/ConfigurationAPI.md#groupspostconfigurationappv1groupspost) | **Post** /configuration/app/v1/groups | Groups Post @@ -90,6 +91,8 @@ Class | Method | HTTP request | Description - [ErrorDetail](docs/ErrorDetail.md) - [ErrorResponse](docs/ErrorResponse.md) + - [GroupsGetItem](docs/GroupsGetItem.md) + - [GroupsGetResponse](docs/GroupsGetResponse.md) - [GroupsPostRequest](docs/GroupsPostRequest.md) - [GroupsPostResponse](docs/GroupsPostResponse.md) - [LivenessResponse](docs/LivenessResponse.md) diff --git a/pkg/config-api-client/api/.openapi.source.yaml b/pkg/config-api-client/api/.openapi.source.yaml index 2197de91..71c98933 100644 --- a/pkg/config-api-client/api/.openapi.source.yaml +++ b/pkg/config-api-client/api/.openapi.source.yaml @@ -9,7 +9,7 @@ info: email: support@capenetworks.com license: name: No idea, but we need something - version: 1.4.0 + version: 1.5.0 servers: - url: https://api.capenetworks.com - url: https://api.staging.capedev.io @@ -66,6 +66,60 @@ paths: tags: - health /configuration/app/v1/groups: + get: + operationId: groups_get_configuration_app_v1_groups_get + summary: Groups Get + description: Lists groups matching provided criteria + parameters: + - name: uid + in: query + required: false + schema: + anyOf: + - type: string + nullable: true + title: Uid + - name: cursor + in: query + required: false + schema: + anyOf: + - type: string + nullable: true + title: Cursor + - name: limit + in: query + required: false + schema: + type: integer + default: 50 + title: Limit + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GroupsGetResponse' + 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 + - v1 + - groups post: operationId: groups_post_configuration_app_v1_groups_post summary: Groups Post @@ -113,17 +167,25 @@ paths: in: query required: false schema: - type: string + anyOf: + - type: string + nullable: true + title: Uid - name: cursor in: query required: false schema: - type: string + anyOf: + - type: string + nullable: true + title: Cursor - name: limit in: query required: false schema: type: integer + default: 50 + title: Limit responses: '200': description: Successful Response @@ -150,6 +212,7 @@ paths: - configuration - v1 - sensor-group-assignments + x-stability-level: alpha components: schemas: ErrorDetail: @@ -172,6 +235,41 @@ components: required: - detail title: ErrorResponse + GroupsGetItem: + type: object + properties: + uid: + type: string + title: Uid + name: + type: string + title: Name + path: + type: string + title: Path + parent_uid: + type: string + title: Parent Uid + required: + - uid + - name + - path + - parent_uid + title: GroupsGetItem + GroupsGetResponse: + type: object + properties: + pagination: + $ref: '#/components/schemas/PaginationDetails' + groups: + type: array + items: + $ref: '#/components/schemas/GroupsGetItem' + title: Groups + required: + - pagination + - groups + title: GroupsGetResponse GroupsPostRequest: type: object properties: @@ -224,16 +322,24 @@ components: type: integer title: Limit next: - type: string + anyOf: + - type: string + nullable: true title: Next previous: - type: string + anyOf: + - type: string + nullable: true title: Previous first: - type: string + anyOf: + - type: string + nullable: true title: First last: - type: string + anyOf: + - type: string + nullable: true title: Last required: - limit diff --git a/pkg/config-api-client/api/openapi.yaml b/pkg/config-api-client/api/openapi.yaml index f5277d80..8fc3c5a0 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: 1.4.0 + version: 1.5.0 servers: - url: https://api.capenetworks.com - url: https://api.staging.capedev.io @@ -73,6 +73,59 @@ paths: tags: - configuration /configuration/app/v1/groups: + get: + description: Lists groups matching provided criteria + operationId: groups_get_configuration_app_v1_groups_get + parameters: + - explode: true + in: query + name: uid + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: cursor + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: limit + required: false + schema: + default: 50 + title: Limit + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GroupsGetResponse' + 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: Groups Get + tags: + - configuration post: description: Create a new group with the group identified in `parent_uid` as its parent @@ -117,6 +170,7 @@ paths: name: uid required: false schema: + nullable: true type: string style: form - explode: true @@ -124,6 +178,7 @@ paths: name: cursor required: false schema: + nullable: true type: string style: form - explode: true @@ -131,6 +186,8 @@ paths: name: limit required: false schema: + default: 50 + title: Limit type: integer style: form responses: @@ -157,6 +214,7 @@ paths: summary: Get tags: - configuration + x-stability-level: alpha components: schemas: ErrorDetail: @@ -185,6 +243,62 @@ components: - detail title: ErrorResponse type: object + GroupsGetItem: + example: + uid: uid + path: path + parent_uid: parent_uid + name: name + properties: + uid: + title: Uid + type: string + name: + title: Name + type: string + path: + title: Path + type: string + parent_uid: + title: Parent Uid + type: string + required: + - name + - parent_uid + - path + - uid + title: GroupsGetItem + type: object + GroupsGetResponse: + example: + pagination: + next: next + previous: previous + last: last + limit: 0 + first: first + groups: + - uid: uid + path: path + parent_uid: parent_uid + name: name + - uid: uid + path: path + parent_uid: parent_uid + name: name + properties: + pagination: + $ref: '#/components/schemas/PaginationDetails' + groups: + items: + $ref: '#/components/schemas/GroupsGetItem' + title: Groups + type: array + required: + - groups + - pagination + title: GroupsGetResponse + type: object GroupsPostRequest: example: parent_uid: parent_uid @@ -252,16 +366,16 @@ components: title: Limit type: integer next: - title: Next + nullable: true type: string previous: - title: Previous + nullable: true type: string first: - title: First + nullable: true type: string last: - title: Last + nullable: true type: string required: - first diff --git a/pkg/config-api-client/api_configuration.go b/pkg/config-api-client/api_configuration.go index adae7f99..07d0fd32 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: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ @@ -94,6 +94,9 @@ func (a *ConfigurationAPIService) GetConfigurationAppV1SensorGroupAssignmentsGet } if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 50 + r.limit = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -492,6 +495,157 @@ func (a *ConfigurationAPIService) GetStatusHealthStatusGetExecute(r ApiGetStatus return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGroupsGetConfigurationAppV1GroupsGetRequest struct { + ctx context.Context + ApiService *ConfigurationAPIService + uid *string + cursor *string + limit *int32 +} + +func (r ApiGroupsGetConfigurationAppV1GroupsGetRequest) Uid(uid string) ApiGroupsGetConfigurationAppV1GroupsGetRequest { + r.uid = &uid + return r +} + +func (r ApiGroupsGetConfigurationAppV1GroupsGetRequest) Cursor(cursor string) ApiGroupsGetConfigurationAppV1GroupsGetRequest { + r.cursor = &cursor + return r +} + +func (r ApiGroupsGetConfigurationAppV1GroupsGetRequest) Limit(limit int32) ApiGroupsGetConfigurationAppV1GroupsGetRequest { + r.limit = &limit + return r +} + +func (r ApiGroupsGetConfigurationAppV1GroupsGetRequest) Execute() (*GroupsGetResponse, *http.Response, error) { + return r.ApiService.GroupsGetConfigurationAppV1GroupsGetExecute(r) +} + +/* +GroupsGetConfigurationAppV1GroupsGet Groups Get + +Lists groups matching provided criteria + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGroupsGetConfigurationAppV1GroupsGetRequest +*/ +func (a *ConfigurationAPIService) GroupsGetConfigurationAppV1GroupsGet(ctx context.Context) ApiGroupsGetConfigurationAppV1GroupsGetRequest { + return ApiGroupsGetConfigurationAppV1GroupsGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return GroupsGetResponse +func (a *ConfigurationAPIService) GroupsGetConfigurationAppV1GroupsGetExecute(r ApiGroupsGetConfigurationAppV1GroupsGetRequest) (*GroupsGetResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupsGetResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConfigurationAPIService.GroupsGetConfigurationAppV1GroupsGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/configuration/app/v1/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.uid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "uid", r.uid, "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } 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 ApiGroupsPostConfigurationAppV1GroupsPostRequest struct { ctx context.Context ApiService *ConfigurationAPIService diff --git a/pkg/config-api-client/client.go b/pkg/config-api-client/client.go index 3036c71a..637bc014 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: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ @@ -41,7 +41,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the Configuration Api API v1.4.0 +// APIClient manages communication with the Configuration Api API v1.5.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 4f990a87..85dbe635 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: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/docs/ConfigurationAPI.md b/pkg/config-api-client/docs/ConfigurationAPI.md index 78c18c69..1532bab4 100644 --- a/pkg/config-api-client/docs/ConfigurationAPI.md +++ b/pkg/config-api-client/docs/ConfigurationAPI.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**GetLivezHealthLivezGet**](ConfigurationAPI.md#GetLivezHealthLivezGet) | **Get** /health/livez | Live health check [**GetReadyzHealthReadyzGet**](ConfigurationAPI.md#GetReadyzHealthReadyzGet) | **Get** /health/readyz | Ready health check [**GetStatusHealthStatusGet**](ConfigurationAPI.md#GetStatusHealthStatusGet) | **Get** /health/status | Service stats endpoint +[**GroupsGetConfigurationAppV1GroupsGet**](ConfigurationAPI.md#GroupsGetConfigurationAppV1GroupsGet) | **Get** /configuration/app/v1/groups | Groups Get [**GroupsPostConfigurationAppV1GroupsPost**](ConfigurationAPI.md#GroupsPostConfigurationAppV1GroupsPost) | **Post** /configuration/app/v1/groups | Groups Post @@ -35,7 +36,7 @@ import ( func main() { uid := "uid_example" // string | (optional) cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) + limit := int32(56) // int32 | (optional) (default to 50) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -62,7 +63,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **uid** | **string** | | **cursor** | **string** | | - **limit** | **int32** | | + **limit** | **int32** | | [default to 50] ### Return type @@ -265,6 +266,76 @@ No authorization required [[Back to README]](../README.md) +## GroupsGetConfigurationAppV1GroupsGet + +> GroupsGetResponse GroupsGetConfigurationAppV1GroupsGet(ctx).Uid(uid).Cursor(cursor).Limit(limit).Execute() + +Groups Get + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/aruba-uxi/configuration-api-terraform-provider/pkg/config-api-client" +) + +func main() { + uid := "uid_example" // string | (optional) + cursor := "cursor_example" // string | (optional) + limit := int32(56) // int32 | (optional) (default to 50) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConfigurationAPI.GroupsGetConfigurationAppV1GroupsGet(context.Background()).Uid(uid).Cursor(cursor).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationAPI.GroupsGetConfigurationAppV1GroupsGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GroupsGetConfigurationAppV1GroupsGet`: GroupsGetResponse + fmt.Fprintf(os.Stdout, "Response from `ConfigurationAPI.GroupsGetConfigurationAppV1GroupsGet`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGroupsGetConfigurationAppV1GroupsGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uid** | **string** | | + **cursor** | **string** | | + **limit** | **int32** | | [default to 50] + +### Return type + +[**GroupsGetResponse**](GroupsGetResponse.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) + + ## GroupsPostConfigurationAppV1GroupsPost > GroupsPostResponse GroupsPostConfigurationAppV1GroupsPost(ctx).GroupsPostRequest(groupsPostRequest).Execute() diff --git a/pkg/config-api-client/docs/GroupsGetItem.md b/pkg/config-api-client/docs/GroupsGetItem.md new file mode 100644 index 00000000..a4e18a7a --- /dev/null +++ b/pkg/config-api-client/docs/GroupsGetItem.md @@ -0,0 +1,114 @@ +# GroupsGetItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uid** | **string** | | +**Name** | **string** | | +**Path** | **string** | | +**ParentUid** | **string** | | + +## Methods + +### NewGroupsGetItem + +`func NewGroupsGetItem(uid string, name string, path string, parentUid string, ) *GroupsGetItem` + +NewGroupsGetItem instantiates a new GroupsGetItem 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 + +### NewGroupsGetItemWithDefaults + +`func NewGroupsGetItemWithDefaults() *GroupsGetItem` + +NewGroupsGetItemWithDefaults instantiates a new GroupsGetItem 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 + +### GetUid + +`func (o *GroupsGetItem) GetUid() string` + +GetUid returns the Uid field if non-nil, zero value otherwise. + +### GetUidOk + +`func (o *GroupsGetItem) GetUidOk() (*string, bool)` + +GetUidOk returns a tuple with the Uid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUid + +`func (o *GroupsGetItem) SetUid(v string)` + +SetUid sets Uid field to given value. + + +### GetName + +`func (o *GroupsGetItem) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GroupsGetItem) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GroupsGetItem) SetName(v string)` + +SetName sets Name field to given value. + + +### GetPath + +`func (o *GroupsGetItem) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *GroupsGetItem) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *GroupsGetItem) SetPath(v string)` + +SetPath sets Path field to given value. + + +### GetParentUid + +`func (o *GroupsGetItem) GetParentUid() string` + +GetParentUid returns the ParentUid field if non-nil, zero value otherwise. + +### GetParentUidOk + +`func (o *GroupsGetItem) GetParentUidOk() (*string, bool)` + +GetParentUidOk returns a tuple with the ParentUid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentUid + +`func (o *GroupsGetItem) SetParentUid(v string)` + +SetParentUid sets ParentUid 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/GroupsGetResponse.md b/pkg/config-api-client/docs/GroupsGetResponse.md new file mode 100644 index 00000000..c1707ba2 --- /dev/null +++ b/pkg/config-api-client/docs/GroupsGetResponse.md @@ -0,0 +1,72 @@ +# GroupsGetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Pagination** | [**PaginationDetails**](PaginationDetails.md) | | +**Groups** | [**[]GroupsGetItem**](GroupsGetItem.md) | | + +## Methods + +### NewGroupsGetResponse + +`func NewGroupsGetResponse(pagination PaginationDetails, groups []GroupsGetItem, ) *GroupsGetResponse` + +NewGroupsGetResponse instantiates a new GroupsGetResponse 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 + +### NewGroupsGetResponseWithDefaults + +`func NewGroupsGetResponseWithDefaults() *GroupsGetResponse` + +NewGroupsGetResponseWithDefaults instantiates a new GroupsGetResponse 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 + +### GetPagination + +`func (o *GroupsGetResponse) GetPagination() PaginationDetails` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *GroupsGetResponse) GetPaginationOk() (*PaginationDetails, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *GroupsGetResponse) SetPagination(v PaginationDetails)` + +SetPagination sets Pagination field to given value. + + +### GetGroups + +`func (o *GroupsGetResponse) GetGroups() []GroupsGetItem` + +GetGroups returns the Groups field if non-nil, zero value otherwise. + +### GetGroupsOk + +`func (o *GroupsGetResponse) GetGroupsOk() (*[]GroupsGetItem, bool)` + +GetGroupsOk returns a tuple with the Groups field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroups + +`func (o *GroupsGetResponse) SetGroups(v []GroupsGetItem)` + +SetGroups sets Groups 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/PaginationDetails.md b/pkg/config-api-client/docs/PaginationDetails.md index a1b648e4..f7d6ae1d 100644 --- a/pkg/config-api-client/docs/PaginationDetails.md +++ b/pkg/config-api-client/docs/PaginationDetails.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Limit** | **int32** | | -**Next** | **string** | | -**Previous** | **string** | | -**First** | **string** | | -**Last** | **string** | | +**Next** | **NullableString** | | +**Previous** | **NullableString** | | +**First** | **NullableString** | | +**Last** | **NullableString** | | ## Methods ### NewPaginationDetails -`func NewPaginationDetails(limit int32, next string, previous string, first string, last string, ) *PaginationDetails` +`func NewPaginationDetails(limit int32, next NullableString, previous NullableString, first NullableString, last NullableString, ) *PaginationDetails` NewPaginationDetails instantiates a new PaginationDetails object This constructor will assign default values to properties that have it defined, @@ -69,6 +69,16 @@ and a boolean to check if the value has been set. SetNext sets Next field to given value. +### SetNextNil + +`func (o *PaginationDetails) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginationDetails) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil ### GetPrevious `func (o *PaginationDetails) GetPrevious() string` @@ -89,6 +99,16 @@ and a boolean to check if the value has been set. SetPrevious sets Previous field to given value. +### SetPreviousNil + +`func (o *PaginationDetails) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginationDetails) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil ### GetFirst `func (o *PaginationDetails) GetFirst() string` @@ -109,6 +129,16 @@ and a boolean to check if the value has been set. SetFirst sets First field to given value. +### SetFirstNil + +`func (o *PaginationDetails) SetFirstNil(b bool)` + + SetFirstNil sets the value for First to be an explicit nil + +### UnsetFirst +`func (o *PaginationDetails) UnsetFirst()` + +UnsetFirst ensures that no value is present for First, not even an explicit nil ### GetLast `func (o *PaginationDetails) GetLast() string` @@ -129,6 +159,16 @@ and a boolean to check if the value has been set. SetLast sets Last field to given value. +### SetLastNil + +`func (o *PaginationDetails) SetLastNil(b bool)` + + SetLastNil sets the value for Last to be an explicit nil + +### UnsetLast +`func (o *PaginationDetails) UnsetLast()` + +UnsetLast ensures that no value is present for Last, 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/model_error_detail.go b/pkg/config-api-client/model_error_detail.go index 812cfefc..22a8dbd7 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: 1.4.0 +API version: 1.5.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 78bc1b81..0e22c0f1 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: 1.4.0 +API version: 1.5.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 new file mode 100644 index 00000000..dca45217 --- /dev/null +++ b/pkg/config-api-client/model_groups_get_item.go @@ -0,0 +1,241 @@ +/* +Configuration Api + +Nice description goes here + +API version: 1.5.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 GroupsGetItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupsGetItem{} + +// GroupsGetItem struct for GroupsGetItem +type GroupsGetItem struct { + Uid string `json:"uid"` + Name string `json:"name"` + Path string `json:"path"` + ParentUid string `json:"parent_uid"` +} + +type _GroupsGetItem GroupsGetItem + +// NewGroupsGetItem instantiates a new GroupsGetItem 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 NewGroupsGetItem(uid string, name string, path string, parentUid string) *GroupsGetItem { + this := GroupsGetItem{} + this.Uid = uid + this.Name = name + this.Path = path + this.ParentUid = parentUid + return &this +} + +// NewGroupsGetItemWithDefaults instantiates a new GroupsGetItem 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 NewGroupsGetItemWithDefaults() *GroupsGetItem { + this := GroupsGetItem{} + return &this +} + +// GetUid returns the Uid field value +func (o *GroupsGetItem) GetUid() string { + if o == nil { + var ret string + return ret + } + + return o.Uid +} + +// GetUidOk returns a tuple with the Uid field value +// and a boolean to check if the value has been set. +func (o *GroupsGetItem) GetUidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uid, true +} + +// SetUid sets field value +func (o *GroupsGetItem) SetUid(v string) { + o.Uid = v +} + +// GetName returns the Name field value +func (o *GroupsGetItem) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GroupsGetItem) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GroupsGetItem) SetName(v string) { + o.Name = v +} + +// GetPath returns the Path field value +func (o *GroupsGetItem) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *GroupsGetItem) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *GroupsGetItem) SetPath(v string) { + o.Path = v +} + +// GetParentUid returns the ParentUid field value +func (o *GroupsGetItem) GetParentUid() string { + if o == nil { + var ret string + return ret + } + + return o.ParentUid +} + +// GetParentUidOk returns a tuple with the ParentUid field value +// and a boolean to check if the value has been set. +func (o *GroupsGetItem) GetParentUidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ParentUid, true +} + +// SetParentUid sets field value +func (o *GroupsGetItem) SetParentUid(v string) { + o.ParentUid = v +} + +func (o GroupsGetItem) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupsGetItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["uid"] = o.Uid + toSerialize["name"] = o.Name + toSerialize["path"] = o.Path + toSerialize["parent_uid"] = o.ParentUid + return toSerialize, nil +} + +func (o *GroupsGetItem) 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{ + "uid", + "name", + "path", + "parent_uid", + } + + 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) + } + } + + varGroupsGetItem := _GroupsGetItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroupsGetItem) + + if err != nil { + return err + } + + *o = GroupsGetItem(varGroupsGetItem) + + return err +} + +type NullableGroupsGetItem struct { + value *GroupsGetItem + isSet bool +} + +func (v NullableGroupsGetItem) Get() *GroupsGetItem { + return v.value +} + +func (v *NullableGroupsGetItem) Set(val *GroupsGetItem) { + v.value = val + v.isSet = true +} + +func (v NullableGroupsGetItem) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupsGetItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupsGetItem(val *GroupsGetItem) *NullableGroupsGetItem { + return &NullableGroupsGetItem{value: val, isSet: true} +} + +func (v NullableGroupsGetItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupsGetItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/config-api-client/model_groups_get_response.go b/pkg/config-api-client/model_groups_get_response.go new file mode 100644 index 00000000..e4ee5584 --- /dev/null +++ b/pkg/config-api-client/model_groups_get_response.go @@ -0,0 +1,185 @@ +/* +Configuration Api + +Nice description goes here + +API version: 1.5.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 GroupsGetResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupsGetResponse{} + +// GroupsGetResponse struct for GroupsGetResponse +type GroupsGetResponse struct { + Pagination PaginationDetails `json:"pagination"` + Groups []GroupsGetItem `json:"groups"` +} + +type _GroupsGetResponse GroupsGetResponse + +// NewGroupsGetResponse instantiates a new GroupsGetResponse 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 NewGroupsGetResponse(pagination PaginationDetails, groups []GroupsGetItem) *GroupsGetResponse { + this := GroupsGetResponse{} + this.Pagination = pagination + this.Groups = groups + return &this +} + +// NewGroupsGetResponseWithDefaults instantiates a new GroupsGetResponse 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 NewGroupsGetResponseWithDefaults() *GroupsGetResponse { + this := GroupsGetResponse{} + return &this +} + +// GetPagination returns the Pagination field value +func (o *GroupsGetResponse) GetPagination() PaginationDetails { + if o == nil { + var ret PaginationDetails + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *GroupsGetResponse) GetPaginationOk() (*PaginationDetails, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *GroupsGetResponse) SetPagination(v PaginationDetails) { + o.Pagination = v +} + +// GetGroups returns the Groups field value +func (o *GroupsGetResponse) GetGroups() []GroupsGetItem { + if o == nil { + var ret []GroupsGetItem + return ret + } + + return o.Groups +} + +// GetGroupsOk returns a tuple with the Groups field value +// and a boolean to check if the value has been set. +func (o *GroupsGetResponse) GetGroupsOk() ([]GroupsGetItem, bool) { + if o == nil { + return nil, false + } + return o.Groups, true +} + +// SetGroups sets field value +func (o *GroupsGetResponse) SetGroups(v []GroupsGetItem) { + o.Groups = v +} + +func (o GroupsGetResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupsGetResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["groups"] = o.Groups + return toSerialize, nil +} + +func (o *GroupsGetResponse) 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{ + "pagination", + "groups", + } + + 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) + } + } + + varGroupsGetResponse := _GroupsGetResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroupsGetResponse) + + if err != nil { + return err + } + + *o = GroupsGetResponse(varGroupsGetResponse) + + return err +} + +type NullableGroupsGetResponse struct { + value *GroupsGetResponse + isSet bool +} + +func (v NullableGroupsGetResponse) Get() *GroupsGetResponse { + return v.value +} + +func (v *NullableGroupsGetResponse) Set(val *GroupsGetResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGroupsGetResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupsGetResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupsGetResponse(val *GroupsGetResponse) *NullableGroupsGetResponse { + return &NullableGroupsGetResponse{value: val, isSet: true} +} + +func (v NullableGroupsGetResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupsGetResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/config-api-client/model_groups_post_request.go b/pkg/config-api-client/model_groups_post_request.go index c652ee28..2a2bc060 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: 1.4.0 +API version: 1.5.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 1ab8f8b1..d3476f00 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: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_liveness_response.go b/pkg/config-api-client/model_liveness_response.go index 1c0e031c..fb3c416a 100644 --- a/pkg/config-api-client/model_liveness_response.go +++ b/pkg/config-api-client/model_liveness_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_pagination_details.go b/pkg/config-api-client/model_pagination_details.go index 334f0c07..80c20606 100644 --- a/pkg/config-api-client/model_pagination_details.go +++ b/pkg/config-api-client/model_pagination_details.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ @@ -22,11 +22,11 @@ var _ MappedNullable = &PaginationDetails{} // PaginationDetails struct for PaginationDetails type PaginationDetails struct { - Limit int32 `json:"limit"` - Next string `json:"next"` - Previous string `json:"previous"` - First string `json:"first"` - Last string `json:"last"` + Limit int32 `json:"limit"` + Next NullableString `json:"next"` + Previous NullableString `json:"previous"` + First NullableString `json:"first"` + Last NullableString `json:"last"` } type _PaginationDetails PaginationDetails @@ -35,7 +35,7 @@ type _PaginationDetails PaginationDetails // 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 NewPaginationDetails(limit int32, next string, previous string, first string, last string) *PaginationDetails { +func NewPaginationDetails(limit int32, next NullableString, previous NullableString, first NullableString, last NullableString) *PaginationDetails { this := PaginationDetails{} this.Limit = limit this.Next = next @@ -78,99 +78,107 @@ func (o *PaginationDetails) SetLimit(v int32) { } // GetNext returns the Next field value +// If the value is explicit nil, the zero value for string will be returned func (o *PaginationDetails) GetNext() string { - if o == nil { + if o == nil || o.Next.Get() == nil { var ret string return ret } - return o.Next + 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 *PaginationDetails) GetNextOk() (*string, bool) { if o == nil { return nil, false } - return &o.Next, true + return o.Next.Get(), o.Next.IsSet() } // SetNext sets field value func (o *PaginationDetails) SetNext(v string) { - o.Next = v + o.Next.Set(&v) } // GetPrevious returns the Previous field value +// If the value is explicit nil, the zero value for string will be returned func (o *PaginationDetails) GetPrevious() string { - if o == nil { + if o == nil || o.Previous.Get() == nil { var ret string return ret } - return o.Previous + return *o.Previous.Get() } // GetPreviousOk returns a tuple with the Previous 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 *PaginationDetails) GetPreviousOk() (*string, bool) { if o == nil { return nil, false } - return &o.Previous, true + return o.Previous.Get(), o.Previous.IsSet() } // SetPrevious sets field value func (o *PaginationDetails) SetPrevious(v string) { - o.Previous = v + o.Previous.Set(&v) } // GetFirst returns the First field value +// If the value is explicit nil, the zero value for string will be returned func (o *PaginationDetails) GetFirst() string { - if o == nil { + if o == nil || o.First.Get() == nil { var ret string return ret } - return o.First + return *o.First.Get() } // GetFirstOk returns a tuple with the First 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 *PaginationDetails) GetFirstOk() (*string, bool) { if o == nil { return nil, false } - return &o.First, true + return o.First.Get(), o.First.IsSet() } // SetFirst sets field value func (o *PaginationDetails) SetFirst(v string) { - o.First = v + o.First.Set(&v) } // GetLast returns the Last field value +// If the value is explicit nil, the zero value for string will be returned func (o *PaginationDetails) GetLast() string { - if o == nil { + if o == nil || o.Last.Get() == nil { var ret string return ret } - return o.Last + return *o.Last.Get() } // GetLastOk returns a tuple with the Last 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 *PaginationDetails) GetLastOk() (*string, bool) { if o == nil { return nil, false } - return &o.Last, true + return o.Last.Get(), o.Last.IsSet() } // SetLast sets field value func (o *PaginationDetails) SetLast(v string) { - o.Last = v + o.Last.Set(&v) } func (o PaginationDetails) MarshalJSON() ([]byte, error) { @@ -184,10 +192,10 @@ func (o PaginationDetails) MarshalJSON() ([]byte, error) { func (o PaginationDetails) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["limit"] = o.Limit - toSerialize["next"] = o.Next - toSerialize["previous"] = o.Previous - toSerialize["first"] = o.First - toSerialize["last"] = o.Last + toSerialize["next"] = o.Next.Get() + toSerialize["previous"] = o.Previous.Get() + toSerialize["first"] = o.First.Get() + toSerialize["last"] = o.Last.Get() return toSerialize, nil } diff --git a/pkg/config-api-client/model_readiness_error_response.go b/pkg/config-api-client/model_readiness_error_response.go index 5c8410c2..6062a58b 100644 --- a/pkg/config-api-client/model_readiness_error_response.go +++ b/pkg/config-api-client/model_readiness_error_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_readiness_response.go b/pkg/config-api-client/model_readiness_response.go index 95d48e54..732fd4c8 100644 --- a/pkg/config-api-client/model_readiness_response.go +++ b/pkg/config-api-client/model_readiness_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_sensor_group_assignment.go b/pkg/config-api-client/model_sensor_group_assignment.go index 499875aa..cdaae1fe 100644 --- a/pkg/config-api-client/model_sensor_group_assignment.go +++ b/pkg/config-api-client/model_sensor_group_assignment.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 1.4.0 +API version: 1.5.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 497c0d0e..525d1a96 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: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/model_status_response.go b/pkg/config-api-client/model_status_response.go index b0344eb2..6e594632 100644 --- a/pkg/config-api-client/model_status_response.go +++ b/pkg/config-api-client/model_status_response.go @@ -3,7 +3,7 @@ Configuration Api Nice description goes here -API version: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/response.go b/pkg/config-api-client/response.go index e7239bfd..edb1c556 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: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */ diff --git a/pkg/config-api-client/utils.go b/pkg/config-api-client/utils.go index b26c6b3b..efcd92ef 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: 1.4.0 +API version: 1.5.0 Contact: support@capenetworks.com */