diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 406ef4e..ac728d0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -55,6 +55,7 @@ docs/ResponsesPrice.md docs/ResponsesRedelegation.md docs/ResponsesRollup.md docs/ResponsesRollupAllSeriesItem.md +docs/ResponsesRollupGroupedStats.md docs/ResponsesRollupStats24h.md docs/ResponsesRollupWithDayStats.md docs/ResponsesRollupWithStats.md @@ -120,6 +121,7 @@ model_responses_price.go model_responses_redelegation.go model_responses_rollup.go model_responses_rollup_all_series_item.go +model_responses_rollup_grouped_stats.go model_responses_rollup_stats24h.go model_responses_rollup_with_day_stats.go model_responses_rollup_with_stats.go diff --git a/README.md b/README.md index d0b4670..f29da9b 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ Class | Method | HTTP request | Description *RollupAPI* | [**ListRollup**](docs/RollupAPI.md#listrollup) | **Get** /rollup | List rollups info *RollupAPI* | [**ListRollup24h**](docs/RollupAPI.md#listrollup24h) | **Get** /rollup/day | List rollups info with stats by previous 24 hours *RollupAPI* | [**RollupExport**](docs/RollupAPI.md#rollupexport) | **Get** /rollup/{id}/export | Export rollup blobs +*RollupAPI* | [**RollupGroupedStatistics**](docs/RollupAPI.md#rollupgroupedstatistics) | **Get** /rollup/group | Rollup Grouped Statistics *SearchAPI* | [**Search**](docs/SearchAPI.md#search) | **Get** /search | Search by hash *StatsAPI* | [**Stats24hChanges**](docs/StatsAPI.md#stats24hchanges) | **Get** /stats/changes_24h | Get changes for 24 hours *StatsAPI* | [**StatsMessagesCount24h**](docs/StatsAPI.md#statsmessagescount24h) | **Get** /stats/messages_count_24h | Get messages distribution for the last 24 hours @@ -196,6 +197,7 @@ Class | Method | HTTP request | Description - [ResponsesRedelegation](docs/ResponsesRedelegation.md) - [ResponsesRollup](docs/ResponsesRollup.md) - [ResponsesRollupAllSeriesItem](docs/ResponsesRollupAllSeriesItem.md) + - [ResponsesRollupGroupedStats](docs/ResponsesRollupGroupedStats.md) - [ResponsesRollupStats24h](docs/ResponsesRollupStats24h.md) - [ResponsesRollupWithDayStats](docs/ResponsesRollupWithDayStats.md) - [ResponsesRollupWithStats](docs/ResponsesRollupWithStats.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 2306141..8b76464 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2309,6 +2309,54 @@ paths: summary: List rollups info with stats by previous 24 hours tags: - rollup + /rollup/group: + get: + description: Rollup Grouped Statistics + operationId: rollup-grouped-statistics + parameters: + - description: Aggregate function + in: query + name: func + schema: + enum: + - sum + - avg + type: string + - description: Group column + in: query + name: column + schema: + enum: + - stack + - type + - category + - vm + - provider + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/responses.RollupGroupedStats' + type: array + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/handler.Error' + description: Bad Request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/handler.Error' + description: Internal Server Error + summary: Rollup Grouped Statistics + tags: + - rollup /rollup/slug/{slug}: get: description: Get rollup by slug @@ -4889,6 +4937,9 @@ components: event_type: - event_type - event_type + rollup_type: + - rollup_type + - rollup_type message_type: - message_type - message_type @@ -4911,6 +4962,10 @@ components: items: type: string type: array + rollup_type: + items: + type: string + type: array status: items: type: string @@ -5646,6 +5701,30 @@ components: format: date-time type: string type: object + responses.RollupGroupedStats: + example: + blobs_count: 2 + size: 1000 + fee: "123.456789" + group: group + properties: + blobs_count: + example: 2 + format: integer + type: integer + fee: + example: "123.456789" + format: string + type: string + group: + example: group + format: string + type: string + size: + example: 1000 + format: integer + type: integer + type: object responses.RollupStats24h: example: blobs_count: 123 diff --git a/api_rollup.go b/api_rollup.go index 3b45341..6bf13ec 100644 --- a/api_rollup.go +++ b/api_rollup.go @@ -1575,3 +1575,143 @@ func (a *RollupAPIService) RollupExportExecute(r ApiRollupExportRequest) (*http. return localVarHTTPResponse, nil } + +type ApiRollupGroupedStatisticsRequest struct { + ctx context.Context + ApiService *RollupAPIService + func_ *string + column *string +} + +// Aggregate function +func (r ApiRollupGroupedStatisticsRequest) Func_(func_ string) ApiRollupGroupedStatisticsRequest { + r.func_ = &func_ + return r +} + +// Group column +func (r ApiRollupGroupedStatisticsRequest) Column(column string) ApiRollupGroupedStatisticsRequest { + r.column = &column + return r +} + +func (r ApiRollupGroupedStatisticsRequest) Execute() ([]ResponsesRollupGroupedStats, *http.Response, error) { + return r.ApiService.RollupGroupedStatisticsExecute(r) +} + +/* +RollupGroupedStatistics Rollup Grouped Statistics + +Rollup Grouped Statistics + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRollupGroupedStatisticsRequest +*/ +func (a *RollupAPIService) RollupGroupedStatistics(ctx context.Context) ApiRollupGroupedStatisticsRequest { + return ApiRollupGroupedStatisticsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []ResponsesRollupGroupedStats +func (a *RollupAPIService) RollupGroupedStatisticsExecute(r ApiRollupGroupedStatisticsRequest) ([]ResponsesRollupGroupedStats, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ResponsesRollupGroupedStats + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RollupAPIService.RollupGroupedStatistics") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rollup/group" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.func_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "func", r.func_, "", "") + } + if r.column != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "column", r.column, "", "") + } + // 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 { + var v HandlerError + 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 HandlerError + 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 +} diff --git a/docs/ResponsesEnums.md b/docs/ResponsesEnums.md index b8a9874..af4d86c 100644 --- a/docs/ResponsesEnums.md +++ b/docs/ResponsesEnums.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Categories** | Pointer to **[]string** | | [optional] **EventType** | Pointer to **[]string** | | [optional] **MessageType** | Pointer to **[]string** | | [optional] +**RollupType** | Pointer to **[]string** | | [optional] **Status** | Pointer to **[]string** | | [optional] ## Methods @@ -103,6 +104,31 @@ SetMessageType sets MessageType field to given value. HasMessageType returns a boolean if a field has been set. +### GetRollupType + +`func (o *ResponsesEnums) GetRollupType() []string` + +GetRollupType returns the RollupType field if non-nil, zero value otherwise. + +### GetRollupTypeOk + +`func (o *ResponsesEnums) GetRollupTypeOk() (*[]string, bool)` + +GetRollupTypeOk returns a tuple with the RollupType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRollupType + +`func (o *ResponsesEnums) SetRollupType(v []string)` + +SetRollupType sets RollupType field to given value. + +### HasRollupType + +`func (o *ResponsesEnums) HasRollupType() bool` + +HasRollupType returns a boolean if a field has been set. + ### GetStatus `func (o *ResponsesEnums) GetStatus() []string` diff --git a/docs/ResponsesRollupGroupedStats.md b/docs/ResponsesRollupGroupedStats.md new file mode 100644 index 0000000..0c884aa --- /dev/null +++ b/docs/ResponsesRollupGroupedStats.md @@ -0,0 +1,134 @@ +# ResponsesRollupGroupedStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BlobsCount** | Pointer to **int32** | | [optional] +**Fee** | Pointer to **string** | | [optional] +**Group** | Pointer to **string** | | [optional] +**Size** | Pointer to **int32** | | [optional] + +## Methods + +### NewResponsesRollupGroupedStats + +`func NewResponsesRollupGroupedStats() *ResponsesRollupGroupedStats` + +NewResponsesRollupGroupedStats instantiates a new ResponsesRollupGroupedStats 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 + +### NewResponsesRollupGroupedStatsWithDefaults + +`func NewResponsesRollupGroupedStatsWithDefaults() *ResponsesRollupGroupedStats` + +NewResponsesRollupGroupedStatsWithDefaults instantiates a new ResponsesRollupGroupedStats 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 + +### GetBlobsCount + +`func (o *ResponsesRollupGroupedStats) GetBlobsCount() int32` + +GetBlobsCount returns the BlobsCount field if non-nil, zero value otherwise. + +### GetBlobsCountOk + +`func (o *ResponsesRollupGroupedStats) GetBlobsCountOk() (*int32, bool)` + +GetBlobsCountOk returns a tuple with the BlobsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlobsCount + +`func (o *ResponsesRollupGroupedStats) SetBlobsCount(v int32)` + +SetBlobsCount sets BlobsCount field to given value. + +### HasBlobsCount + +`func (o *ResponsesRollupGroupedStats) HasBlobsCount() bool` + +HasBlobsCount returns a boolean if a field has been set. + +### GetFee + +`func (o *ResponsesRollupGroupedStats) GetFee() string` + +GetFee returns the Fee field if non-nil, zero value otherwise. + +### GetFeeOk + +`func (o *ResponsesRollupGroupedStats) GetFeeOk() (*string, bool)` + +GetFeeOk returns a tuple with the Fee field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFee + +`func (o *ResponsesRollupGroupedStats) SetFee(v string)` + +SetFee sets Fee field to given value. + +### HasFee + +`func (o *ResponsesRollupGroupedStats) HasFee() bool` + +HasFee returns a boolean if a field has been set. + +### GetGroup + +`func (o *ResponsesRollupGroupedStats) GetGroup() string` + +GetGroup returns the Group field if non-nil, zero value otherwise. + +### GetGroupOk + +`func (o *ResponsesRollupGroupedStats) GetGroupOk() (*string, 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 *ResponsesRollupGroupedStats) SetGroup(v string)` + +SetGroup sets Group field to given value. + +### HasGroup + +`func (o *ResponsesRollupGroupedStats) HasGroup() bool` + +HasGroup returns a boolean if a field has been set. + +### GetSize + +`func (o *ResponsesRollupGroupedStats) GetSize() int32` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *ResponsesRollupGroupedStats) GetSizeOk() (*int32, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *ResponsesRollupGroupedStats) SetSize(v int32)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *ResponsesRollupGroupedStats) HasSize() bool` + +HasSize returns a boolean if a field has been set. + + +[[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/docs/RollupAPI.md b/docs/RollupAPI.md index 5601834..0b43f35 100644 --- a/docs/RollupAPI.md +++ b/docs/RollupAPI.md @@ -15,6 +15,7 @@ Method | HTTP request | Description [**ListRollup**](RollupAPI.md#ListRollup) | **Get** /rollup | List rollups info [**ListRollup24h**](RollupAPI.md#ListRollup24h) | **Get** /rollup/day | List rollups info with stats by previous 24 hours [**RollupExport**](RollupAPI.md#RollupExport) | **Get** /rollup/{id}/export | Export rollup blobs +[**RollupGroupedStatistics**](RollupAPI.md#RollupGroupedStatistics) | **Get** /rollup/group | Rollup Grouped Statistics @@ -809,3 +810,71 @@ No authorization required [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## RollupGroupedStatistics + +> []ResponsesRollupGroupedStats RollupGroupedStatistics(ctx).Func_(func_).Column(column).Execute() + +Rollup Grouped Statistics + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/celenium-io/celenium-api-go" +) + +func main() { + func_ := "func__example" // string | Aggregate function (optional) + column := "column_example" // string | Group column (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RollupAPI.RollupGroupedStatistics(context.Background()).Func_(func_).Column(column).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RollupAPI.RollupGroupedStatistics``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RollupGroupedStatistics`: []ResponsesRollupGroupedStats + fmt.Fprintf(os.Stdout, "Response from `RollupAPI.RollupGroupedStatistics`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRollupGroupedStatisticsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **func_** | **string** | Aggregate function | + **column** | **string** | Group column | + +### Return type + +[**[]ResponsesRollupGroupedStats**](ResponsesRollupGroupedStats.md) + +### Authorization + +No authorization required + +### 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) + diff --git a/model_responses_enums.go b/model_responses_enums.go index 6b85312..96a5726 100644 --- a/model_responses_enums.go +++ b/model_responses_enums.go @@ -23,6 +23,7 @@ type ResponsesEnums struct { Categories []string `json:"categories,omitempty"` EventType []string `json:"event_type,omitempty"` MessageType []string `json:"message_type,omitempty"` + RollupType []string `json:"rollup_type,omitempty"` Status []string `json:"status,omitempty"` } @@ -139,6 +140,38 @@ func (o *ResponsesEnums) SetMessageType(v []string) { o.MessageType = v } +// GetRollupType returns the RollupType field value if set, zero value otherwise. +func (o *ResponsesEnums) GetRollupType() []string { + if o == nil || IsNil(o.RollupType) { + var ret []string + return ret + } + return o.RollupType +} + +// GetRollupTypeOk returns a tuple with the RollupType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsesEnums) GetRollupTypeOk() ([]string, bool) { + if o == nil || IsNil(o.RollupType) { + return nil, false + } + return o.RollupType, true +} + +// HasRollupType returns a boolean if a field has been set. +func (o *ResponsesEnums) HasRollupType() bool { + if o != nil && !IsNil(o.RollupType) { + return true + } + + return false +} + +// SetRollupType gets a reference to the given []string and assigns it to the RollupType field. +func (o *ResponsesEnums) SetRollupType(v []string) { + o.RollupType = v +} + // GetStatus returns the Status field value if set, zero value otherwise. func (o *ResponsesEnums) GetStatus() []string { if o == nil || IsNil(o.Status) { @@ -190,6 +223,9 @@ func (o ResponsesEnums) ToMap() (map[string]interface{}, error) { if !IsNil(o.MessageType) { toSerialize["message_type"] = o.MessageType } + if !IsNil(o.RollupType) { + toSerialize["rollup_type"] = o.RollupType + } if !IsNil(o.Status) { toSerialize["status"] = o.Status } diff --git a/model_responses_rollup_grouped_stats.go b/model_responses_rollup_grouped_stats.go new file mode 100644 index 0000000..238d97e --- /dev/null +++ b/model_responses_rollup_grouped_stats.go @@ -0,0 +1,235 @@ +/* +Celenium API + +Celenium API is a powerful tool to access all blockchain data that is processed and indexed by our proprietary indexer. With Celenium API you can retrieve all historical data, off-chain data, blobs and statistics through our REST API. Celenium API indexer are open source, which allows you to not depend on third-party services. You can clone, build and run them independently, giving you full control over all components. If you have any questions or feature requests, please feel free to contact us. We appreciate your feedback! + +API version: 1.0 +Contact: celenium@pklabs.me +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package celenium + +import ( + "encoding/json" +) + +// checks if the ResponsesRollupGroupedStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponsesRollupGroupedStats{} + +// ResponsesRollupGroupedStats struct for ResponsesRollupGroupedStats +type ResponsesRollupGroupedStats struct { + BlobsCount *int32 `json:"blobs_count,omitempty"` + Fee *string `json:"fee,omitempty"` + Group *string `json:"group,omitempty"` + Size *int32 `json:"size,omitempty"` +} + +// NewResponsesRollupGroupedStats instantiates a new ResponsesRollupGroupedStats 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 NewResponsesRollupGroupedStats() *ResponsesRollupGroupedStats { + this := ResponsesRollupGroupedStats{} + return &this +} + +// NewResponsesRollupGroupedStatsWithDefaults instantiates a new ResponsesRollupGroupedStats 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 NewResponsesRollupGroupedStatsWithDefaults() *ResponsesRollupGroupedStats { + this := ResponsesRollupGroupedStats{} + return &this +} + +// GetBlobsCount returns the BlobsCount field value if set, zero value otherwise. +func (o *ResponsesRollupGroupedStats) GetBlobsCount() int32 { + if o == nil || IsNil(o.BlobsCount) { + var ret int32 + return ret + } + return *o.BlobsCount +} + +// GetBlobsCountOk returns a tuple with the BlobsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsesRollupGroupedStats) GetBlobsCountOk() (*int32, bool) { + if o == nil || IsNil(o.BlobsCount) { + return nil, false + } + return o.BlobsCount, true +} + +// HasBlobsCount returns a boolean if a field has been set. +func (o *ResponsesRollupGroupedStats) HasBlobsCount() bool { + if o != nil && !IsNil(o.BlobsCount) { + return true + } + + return false +} + +// SetBlobsCount gets a reference to the given int32 and assigns it to the BlobsCount field. +func (o *ResponsesRollupGroupedStats) SetBlobsCount(v int32) { + o.BlobsCount = &v +} + +// GetFee returns the Fee field value if set, zero value otherwise. +func (o *ResponsesRollupGroupedStats) GetFee() string { + if o == nil || IsNil(o.Fee) { + var ret string + return ret + } + return *o.Fee +} + +// GetFeeOk returns a tuple with the Fee field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsesRollupGroupedStats) GetFeeOk() (*string, bool) { + if o == nil || IsNil(o.Fee) { + return nil, false + } + return o.Fee, true +} + +// HasFee returns a boolean if a field has been set. +func (o *ResponsesRollupGroupedStats) HasFee() bool { + if o != nil && !IsNil(o.Fee) { + return true + } + + return false +} + +// SetFee gets a reference to the given string and assigns it to the Fee field. +func (o *ResponsesRollupGroupedStats) SetFee(v string) { + o.Fee = &v +} + +// GetGroup returns the Group field value if set, zero value otherwise. +func (o *ResponsesRollupGroupedStats) GetGroup() string { + if o == nil || IsNil(o.Group) { + var ret string + return ret + } + return *o.Group +} + +// GetGroupOk returns a tuple with the Group field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsesRollupGroupedStats) GetGroupOk() (*string, bool) { + if o == nil || IsNil(o.Group) { + return nil, false + } + return o.Group, true +} + +// HasGroup returns a boolean if a field has been set. +func (o *ResponsesRollupGroupedStats) HasGroup() bool { + if o != nil && !IsNil(o.Group) { + return true + } + + return false +} + +// SetGroup gets a reference to the given string and assigns it to the Group field. +func (o *ResponsesRollupGroupedStats) SetGroup(v string) { + o.Group = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *ResponsesRollupGroupedStats) GetSize() int32 { + if o == nil || IsNil(o.Size) { + var ret int32 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsesRollupGroupedStats) GetSizeOk() (*int32, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *ResponsesRollupGroupedStats) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int32 and assigns it to the Size field. +func (o *ResponsesRollupGroupedStats) SetSize(v int32) { + o.Size = &v +} + +func (o ResponsesRollupGroupedStats) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponsesRollupGroupedStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BlobsCount) { + toSerialize["blobs_count"] = o.BlobsCount + } + if !IsNil(o.Fee) { + toSerialize["fee"] = o.Fee + } + if !IsNil(o.Group) { + toSerialize["group"] = o.Group + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + return toSerialize, nil +} + +type NullableResponsesRollupGroupedStats struct { + value *ResponsesRollupGroupedStats + isSet bool +} + +func (v NullableResponsesRollupGroupedStats) Get() *ResponsesRollupGroupedStats { + return v.value +} + +func (v *NullableResponsesRollupGroupedStats) Set(val *ResponsesRollupGroupedStats) { + v.value = val + v.isSet = true +} + +func (v NullableResponsesRollupGroupedStats) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsesRollupGroupedStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsesRollupGroupedStats(val *ResponsesRollupGroupedStats) *NullableResponsesRollupGroupedStats { + return &NullableResponsesRollupGroupedStats{value: val, isSet: true} +} + +func (v NullableResponsesRollupGroupedStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsesRollupGroupedStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/test/api_rollup_test.go b/test/api_rollup_test.go index 8e96e1d..d7c0319 100644 --- a/test/api_rollup_test.go +++ b/test/api_rollup_test.go @@ -171,4 +171,16 @@ func Test_celenium_RollupAPIService(t *testing.T) { }) + t.Run("Test RollupAPIService RollupGroupedStatistics", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.RollupAPI.RollupGroupedStatistics(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + }