diff --git a/ame/README.md b/ame/README.md index 687891b..c7e416b 100644 --- a/ame/README.md +++ b/ame/README.md @@ -78,10 +78,10 @@ All URIs are relative to *https://anypoint.mulesoft.com/mq/admin/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsexchangesexchangeiddelete) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsexchangesexchangeidget) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsexchangesexchangeidpatch) | **Patch** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsexchangesexchangeidput) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | +*DefaultApi* | [**CreateAME**](docs/DefaultApi.md#createame) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | +*DefaultApi* | [**DeleteAME**](docs/DefaultApi.md#deleteame) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | +*DefaultApi* | [**GetAME**](docs/DefaultApi.md#getame) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | +*DefaultApi* | [**UpdateAME**](docs/DefaultApi.md#updateame) | **Patch** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | ## Documentation For Models diff --git a/ame/api/openapi.yaml b/ame/api/openapi.yaml index 5130645..43b088d 100644 --- a/ame/api/openapi.yaml +++ b/ame/api/openapi.yaml @@ -16,6 +16,7 @@ paths: /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId}: delete: description: Delete an exchange + operationId: DeleteAME parameters: - description: The organization Id explode: false @@ -56,6 +57,7 @@ paths: description: Success response get: description: Get details about an exchange + operationId: GetAME parameters: - description: The organization Id explode: false @@ -100,6 +102,7 @@ paths: description: Success response patch: description: Modify an exchange's properties + operationId: UpdateAME parameters: - description: The organization Id explode: false @@ -155,6 +158,7 @@ paths: description: Successfully created exchange put: description: Create exchange + operationId: CreateAME parameters: - description: The organization Id explode: false @@ -270,12 +274,6 @@ components: encrypted: title: encrypted type: boolean - type: - title: type - type: string - exchangeId: - title: exchangeId - type: string title: exchange type: object inline_response_404: diff --git a/ame/api_default.go b/ame/api_default.go index 43f39da..d63652a 100644 --- a/ame/api_default.go +++ b/ame/api_default.go @@ -27,32 +27,37 @@ var ( // DefaultApiService DefaultApi service type DefaultApiService service -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteRequest struct { +type DefaultApiApiCreateAMERequest struct { ctx _context.Context ApiService *DefaultApiService orgId string envId string regionId string exchangeId string + exchangeBody *ExchangeBody } +func (r DefaultApiApiCreateAMERequest) ExchangeBody(exchangeBody ExchangeBody) DefaultApiApiCreateAMERequest { + r.exchangeBody = &exchangeBody + return r +} -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteRequest) Execute() (*_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteExecute(r) +func (r DefaultApiApiCreateAMERequest) Execute() (Exchange, *_nethttp.Response, error) { + return r.ApiService.CreateAMEExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete - * Delete an exchange + * CreateAME Method for CreateAME + * Create exchange * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param exchangeId The id of a specific exchange - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteRequest + * @return DefaultApiApiCreateAMERequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteRequest{ +func (a *DefaultApiService) CreateAME(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string) DefaultApiApiCreateAMERequest { + return DefaultApiApiCreateAMERequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -64,19 +69,21 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe /* * Execute executes the request + * @return Exchange */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteRequest) (*_nethttp.Response, error) { +func (a *DefaultApiService) CreateAMEExecute(r DefaultApiApiCreateAMERequest) (Exchange, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue Exchange ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAME") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId}" @@ -90,7 +97,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -99,28 +106,30 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.exchangeBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -128,13 +137,22 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + 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 DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetRequest struct { +type DefaultApiApiDeleteAMERequest struct { ctx _context.Context ApiService *DefaultApiService orgId string @@ -144,22 +162,22 @@ type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinations } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetRequest) Execute() (Exchange, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetExecute(r) +func (r DefaultApiApiDeleteAMERequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteAMEExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet - * Get details about an exchange + * DeleteAME Method for DeleteAME + * Delete an exchange * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param exchangeId The id of a specific exchange - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetRequest + * @return DefaultApiApiDeleteAMERequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetRequest{ +func (a *DefaultApiService) DeleteAME(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string) DefaultApiApiDeleteAMERequest { + return DefaultApiApiDeleteAMERequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -171,21 +189,19 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe /* * Execute executes the request - * @return Exchange */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetRequest) (Exchange, *_nethttp.Response, error) { +func (a *DefaultApiService) DeleteAMEExecute(r DefaultApiApiDeleteAMERequest) (*_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Exchange ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAME") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId}" @@ -208,7 +224,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -217,19 +233,19 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -237,52 +253,38 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe body: localVarBody, error: localVarHTTPResponse.Status, } - 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 localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest struct { +type DefaultApiApiGetAMERequest struct { ctx _context.Context ApiService *DefaultApiService orgId string envId string regionId string exchangeId string - exchangeBody *ExchangeBody } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest) ExchangeBody(exchangeBody ExchangeBody) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest { - r.exchangeBody = &exchangeBody - return r -} -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest) Execute() (Exchange, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchExecute(r) +func (r DefaultApiApiGetAMERequest) Execute() (Exchange, *_nethttp.Response, error) { + return r.ApiService.GetAMEExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch - * Modify an exchange's properties + * GetAME Method for GetAME + * Get details about an exchange * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param exchangeId The id of a specific exchange - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest + * @return DefaultApiApiGetAMERequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest{ +func (a *DefaultApiService) GetAME(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string) DefaultApiApiGetAMERequest { + return DefaultApiApiGetAMERequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -296,9 +298,9 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe * Execute executes the request * @return Exchange */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest) (Exchange, *_nethttp.Response, error) { +func (a *DefaultApiService) GetAMEExecute(r DefaultApiApiGetAMERequest) (Exchange, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -306,7 +308,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe localVarReturnValue Exchange ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAME") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -322,7 +324,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -338,8 +340,6 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.exchangeBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -362,16 +362,6 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 404 { - var v InlineResponse404 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -387,7 +377,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe return localVarReturnValue, localVarHTTPResponse, nil } -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest struct { +type DefaultApiApiUpdateAMERequest struct { ctx _context.Context ApiService *DefaultApiService orgId string @@ -397,27 +387,27 @@ type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinations exchangeBody *ExchangeBody } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest) ExchangeBody(exchangeBody ExchangeBody) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest { +func (r DefaultApiApiUpdateAMERequest) ExchangeBody(exchangeBody ExchangeBody) DefaultApiApiUpdateAMERequest { r.exchangeBody = &exchangeBody return r } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest) Execute() (Exchange, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutExecute(r) +func (r DefaultApiApiUpdateAMERequest) Execute() (Exchange, *_nethttp.Response, error) { + return r.ApiService.UpdateAMEExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut - * Create exchange + * UpdateAME Method for UpdateAME + * Modify an exchange's properties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param exchangeId The id of a specific exchange - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest + * @return DefaultApiApiUpdateAMERequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest{ +func (a *DefaultApiService) UpdateAME(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string) DefaultApiApiUpdateAMERequest { + return DefaultApiApiUpdateAMERequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -431,9 +421,9 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe * Execute executes the request * @return Exchange */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest) (Exchange, *_nethttp.Response, error) { +func (a *DefaultApiService) UpdateAMEExecute(r DefaultApiApiUpdateAMERequest) (Exchange, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -441,7 +431,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe localVarReturnValue Exchange ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateAME") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -497,6 +487,16 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 404 { + var v InlineResponse404 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/ame/docs/DefaultApi.md b/ame/docs/DefaultApi.md index 7bd0d5d..eb3728b 100644 --- a/ame/docs/DefaultApi.md +++ b/ame/docs/DefaultApi.md @@ -4,16 +4,16 @@ All URIs are relative to *https://anypoint.mulesoft.com/mq/admin/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch) | **Patch** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | +[**CreateAME**](DefaultApi.md#CreateAME) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | +[**DeleteAME**](DefaultApi.md#DeleteAME) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | +[**GetAME**](DefaultApi.md#GetAME) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | +[**UpdateAME**](DefaultApi.md#UpdateAME) | **Patch** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/exchanges/{exchangeId} | -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete +## CreateAME -> OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete(ctx, orgId, envId, regionId, exchangeId).Execute() +> Exchange CreateAME(ctx, orgId, envId, regionId, exchangeId).ExchangeBody(exchangeBody).Execute() @@ -36,14 +36,17 @@ func main() { envId := "envId_example" // string | The environment id regionId := "regionId_example" // string | The region id exchangeId := "exchangeId_example" // string | The id of a specific exchange + exchangeBody := *openapiclient.NewExchangeBody() // ExchangeBody | (optional) configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete(context.Background(), orgId, envId, regionId, exchangeId).Execute() + resp, r, err := api_client.DefaultApi.CreateAME(context.Background(), orgId, envId, regionId, exchangeId).ExchangeBody(exchangeBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateAME``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } + // response from `CreateAME`: Exchange + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateAME`: %v\n", resp) } ``` @@ -60,7 +63,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdDeleteRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCreateAMERequest struct via the builder pattern Name | Type | Description | Notes @@ -69,10 +72,11 @@ Name | Type | Description | Notes + **exchangeBody** | [**ExchangeBody**](ExchangeBody.md) | | ### Return type - (empty response body) +[**Exchange**](Exchange.md) ### Authorization @@ -80,17 +84,17 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: Not defined +- **Content-Type**: application/json +- **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) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet +## DeleteAME -> Exchange OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet(ctx, orgId, envId, regionId, exchangeId).Execute() +> DeleteAME(ctx, orgId, envId, regionId, exchangeId).Execute() @@ -116,13 +120,11 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet(context.Background(), orgId, envId, regionId, exchangeId).Execute() + resp, r, err := api_client.DefaultApi.DeleteAME(context.Background(), orgId, envId, regionId, exchangeId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAME``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet`: Exchange - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGet`: %v\n", resp) } ``` @@ -139,7 +141,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdGetRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDeleteAMERequest struct via the builder pattern Name | Type | Description | Notes @@ -151,7 +153,7 @@ Name | Type | Description | Notes ### Return type -[**Exchange**](Exchange.md) + (empty response body) ### Authorization @@ -160,16 +162,16 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: Not defined [[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) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch +## GetAME -> Exchange OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch(ctx, orgId, envId, regionId, exchangeId).ExchangeBody(exchangeBody).Execute() +> Exchange GetAME(ctx, orgId, envId, regionId, exchangeId).Execute() @@ -192,17 +194,16 @@ func main() { envId := "envId_example" // string | The environment id regionId := "regionId_example" // string | The region id exchangeId := "exchangeId_example" // string | The id of a specific exchange - exchangeBody := *openapiclient.NewExchangeBody() // ExchangeBody | (optional) configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch(context.Background(), orgId, envId, regionId, exchangeId).ExchangeBody(exchangeBody).Execute() + resp, r, err := api_client.DefaultApi.GetAME(context.Background(), orgId, envId, regionId, exchangeId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAME``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch`: Exchange - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatch`: %v\n", resp) + // response from `GetAME`: Exchange + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAME`: %v\n", resp) } ``` @@ -219,7 +220,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPatchRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetAMERequest struct via the builder pattern Name | Type | Description | Notes @@ -228,7 +229,6 @@ Name | Type | Description | Notes - **exchangeBody** | [**ExchangeBody**](ExchangeBody.md) | | ### Return type @@ -240,7 +240,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -248,9 +248,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut +## UpdateAME -> Exchange OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut(ctx, orgId, envId, regionId, exchangeId).ExchangeBody(exchangeBody).Execute() +> Exchange UpdateAME(ctx, orgId, envId, regionId, exchangeId).ExchangeBody(exchangeBody).Execute() @@ -277,13 +277,13 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut(context.Background(), orgId, envId, regionId, exchangeId).ExchangeBody(exchangeBody).Execute() + resp, r, err := api_client.DefaultApi.UpdateAME(context.Background(), orgId, envId, regionId, exchangeId).ExchangeBody(exchangeBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateAME``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut`: Exchange - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPut`: %v\n", resp) + // response from `UpdateAME`: Exchange + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateAME`: %v\n", resp) } ``` @@ -300,7 +300,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsExchangesExchangeIdPutRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateAMERequest struct via the builder pattern Name | Type | Description | Notes diff --git a/ame/docs/ExchangeBody.md b/ame/docs/ExchangeBody.md index 40347aa..179d9a1 100644 --- a/ame/docs/ExchangeBody.md +++ b/ame/docs/ExchangeBody.md @@ -5,8 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Encrypted** | Pointer to **bool** | | [optional] -**Type** | Pointer to **string** | | [optional] -**ExchangeId** | Pointer to **string** | | [optional] ## Methods @@ -52,56 +50,6 @@ SetEncrypted sets Encrypted field to given value. HasEncrypted returns a boolean if a field has been set. -### GetType - -`func (o *ExchangeBody) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *ExchangeBody) 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 *ExchangeBody) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *ExchangeBody) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetExchangeId - -`func (o *ExchangeBody) GetExchangeId() string` - -GetExchangeId returns the ExchangeId field if non-nil, zero value otherwise. - -### GetExchangeIdOk - -`func (o *ExchangeBody) GetExchangeIdOk() (*string, bool)` - -GetExchangeIdOk returns a tuple with the ExchangeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExchangeId - -`func (o *ExchangeBody) SetExchangeId(v string)` - -SetExchangeId sets ExchangeId field to given value. - -### HasExchangeId - -`func (o *ExchangeBody) HasExchangeId() bool` - -HasExchangeId 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/ame/model_exchange_body.go b/ame/model_exchange_body.go index 326ca56..755a6a9 100644 --- a/ame/model_exchange_body.go +++ b/ame/model_exchange_body.go @@ -17,8 +17,6 @@ import ( // ExchangeBody struct for ExchangeBody type ExchangeBody struct { Encrypted *bool `json:"encrypted,omitempty"` - Type *string `json:"type,omitempty"` - ExchangeId *string `json:"exchangeId,omitempty"` } // NewExchangeBody instantiates a new ExchangeBody object @@ -70,81 +68,11 @@ func (o *ExchangeBody) SetEncrypted(v bool) { o.Encrypted = &v } -// GetType returns the Type field value if set, zero value otherwise. -func (o *ExchangeBody) GetType() string { - if o == nil || o.Type == nil { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExchangeBody) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *ExchangeBody) HasType() bool { - if o != nil && o.Type != nil { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *ExchangeBody) SetType(v string) { - o.Type = &v -} - -// GetExchangeId returns the ExchangeId field value if set, zero value otherwise. -func (o *ExchangeBody) GetExchangeId() string { - if o == nil || o.ExchangeId == nil { - var ret string - return ret - } - return *o.ExchangeId -} - -// GetExchangeIdOk returns a tuple with the ExchangeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExchangeBody) GetExchangeIdOk() (*string, bool) { - if o == nil || o.ExchangeId == nil { - return nil, false - } - return o.ExchangeId, true -} - -// HasExchangeId returns a boolean if a field has been set. -func (o *ExchangeBody) HasExchangeId() bool { - if o != nil && o.ExchangeId != nil { - return true - } - - return false -} - -// SetExchangeId gets a reference to the given string and assigns it to the ExchangeId field. -func (o *ExchangeBody) SetExchangeId(v string) { - o.ExchangeId = &v -} - func (o ExchangeBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Encrypted != nil { toSerialize["encrypted"] = o.Encrypted } - if o.Type != nil { - toSerialize["type"] = o.Type - } - if o.ExchangeId != nil { - toSerialize["exchangeId"] = o.ExchangeId - } return json.Marshal(toSerialize) } diff --git a/ame_binding/.openapi-generator/FILES b/ame_binding/.openapi-generator/FILES index 8294c32..d1724bb 100644 --- a/ame_binding/.openapi-generator/FILES +++ b/ame_binding/.openapi-generator/FILES @@ -5,11 +5,19 @@ api/openapi.yaml api_default.go client.go configuration.go +docs/AMEBindingRuleBody.md docs/DefaultApi.md docs/ExchangeBinding.md +docs/ExchangeBindingRules.md +docs/ExchangeBindingWithRules.md +docs/ExchangeBindingWithRulesAllOf.md git_push.sh go.mod go.sum +model_ame_binding_rule_body.go model_exchange_binding.go +model_exchange_binding_rules.go +model_exchange_binding_with_rules.go +model_exchange_binding_with_rules_all_of.go response.go utils.go diff --git a/ame_binding/README.md b/ame_binding/README.md index 9700e85..655045f 100644 --- a/ame_binding/README.md +++ b/ame_binding/README.md @@ -78,14 +78,20 @@ All URIs are relative to *https://anypoint.mulesoft.com/mq/admin/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregionidbindingsexchangesexchangeidqueuesqueueiddelete) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregionidbindingsexchangesexchangeidqueuesqueueidget) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregionidbindingsexchangesexchangeidqueuesqueueidput) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | +*DefaultApi* | [**CreateAMEBinding**](docs/DefaultApi.md#createamebinding) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | +*DefaultApi* | [**CreateAMEBindingRule**](docs/DefaultApi.md#createamebindingrule) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}/rules/routing | +*DefaultApi* | [**DeleteAMEBinding**](docs/DefaultApi.md#deleteamebinding) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | +*DefaultApi* | [**DeleteAMEBindingRule**](docs/DefaultApi.md#deleteamebindingrule) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}/rules/routing | +*DefaultApi* | [**GetAMEBinding**](docs/DefaultApi.md#getamebinding) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | ## Documentation For Models + - [AMEBindingRuleBody](docs/AMEBindingRuleBody.md) - [ExchangeBinding](docs/ExchangeBinding.md) + - [ExchangeBindingRules](docs/ExchangeBindingRules.md) + - [ExchangeBindingWithRules](docs/ExchangeBindingWithRules.md) + - [ExchangeBindingWithRulesAllOf](docs/ExchangeBindingWithRulesAllOf.md) ## Documentation For Authorization diff --git a/ame_binding/api/openapi.yaml b/ame_binding/api/openapi.yaml index b9b34cf..105c065 100644 --- a/ame_binding/api/openapi.yaml +++ b/ame_binding/api/openapi.yaml @@ -16,6 +16,7 @@ paths: /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}: delete: description: Delete an exchange queue binding + operationId: DeleteAMEBinding parameters: - description: The organization Id explode: false @@ -64,6 +65,7 @@ paths: description: Success response get: description: Get details about a queue bound to an exchange + operationId: GetAMEBinding parameters: - description: The organization Id explode: false @@ -105,6 +107,17 @@ paths: schema: type: string style: simple + - description: Defines what to fetch + explode: true + in: query + name: inclusion + required: false + schema: + enum: + - all + - minimal + type: string + style: form responses: "401": description: Access token is missing or invalid @@ -112,10 +125,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/exchangeBinding' + $ref: '#/components/schemas/exchangeBindingWithRules' description: Success response put: description: Create exchange queue binding + operationId: CreateAMEBinding parameters: - description: The organization Id explode: false @@ -166,7 +180,134 @@ paths: schema: $ref: '#/components/schemas/exchangeBinding' description: Successfully created exchange + /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}/rules/routing: + delete: + description: Delete an exchange queue binding Rule + operationId: DeleteAMEBindingRule + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The region id + explode: false + in: path + name: regionId + required: true + schema: + type: string + style: simple + - description: The id of a specific exchange + explode: false + in: path + name: exchangeId + required: true + schema: + type: string + style: simple + - description: The id of a specific exchange queue binding + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + responses: + "401": + description: Access token is missing or invalid + "204": + description: Success response + put: + description: Create exchange queue binding rule + operationId: CreateAMEBindingRule + parameters: + - description: The organization Id + explode: false + in: path + name: orgId + required: true + schema: + type: string + style: simple + - description: The environment id + explode: false + in: path + name: envId + required: true + schema: + type: string + style: simple + - description: The region id + explode: false + in: path + name: regionId + required: true + schema: + type: string + style: simple + - description: The id of a specific exchange + explode: false + in: path + name: exchangeId + required: true + schema: + type: string + style: simple + - description: The id of a specific exchange queue binding + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/AMEBindingRuleBody' + content: + application/json: + schema: + example: + routingRules: + - '{}' + - '{}' + properties: + routingRules: + items: + title: routingRule + type: object + title: routingRules + type: array + title: AMEBindingRuleBody + type: object + responses: + "401": + description: Access token is missing or invalid + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/exchangeBindingRules' + description: Successfully created exchange binding rules components: + requestBodies: + AMEBindingRuleBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AMEBindingRuleBody' responses: UnauthorizedError: description: Access token is missing or invalid @@ -204,7 +345,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/exchangeBinding' + $ref: '#/components/schemas/exchangeBindingWithRules' description: Success response SuccessCreateExchangeBinding: content: @@ -214,6 +355,14 @@ components: description: Successfully created exchange SuccessDeleteExchangeBinding: description: Success response + SuccessCreateExchangeBindingRules: + content: + application/json: + schema: + $ref: '#/components/schemas/exchangeBindingRules' + description: Successfully created exchange binding rules + SuccessDeleteExchangeBindingRules: + description: Success response schemas: exchangeBinding: example: @@ -228,6 +377,60 @@ components: type: string title: exchangeBinding type: object + exchangeBindingWithRules: + allOf: + - $ref: '#/components/schemas/exchangeBinding' + - $ref: '#/components/schemas/exchangeBindingWithRules_allOf' + exchangeBindingRules: + example: + exchangeId: exchangeId + queueId: queueId + routingRules: + - '{}' + - '{}' + properties: + queueId: + title: queueId + type: string + exchangeId: + title: exchangeId + type: string + routingRules: + items: + title: routingRule + type: object + title: routingRules + type: array + title: exchangeBinding + type: object + routingRules: + items: + title: routingRule + type: object + title: routingRules + type: array + AMEBindingRuleBody: + example: + routingRules: + - '{}' + - '{}' + properties: + routingRules: + items: + title: routingRule + type: object + title: routingRules + type: array + title: AMEBindingRuleBody + type: object + exchangeBindingWithRules_allOf: + properties: + rules: + items: + title: routingRule + type: object + title: routingRules + type: array securitySchemes: bearerAuth: bearerFormat: JWT diff --git a/ame_binding/api_default.go b/ame_binding/api_default.go index 3775854..11144ee 100644 --- a/ame_binding/api_default.go +++ b/ame_binding/api_default.go @@ -27,7 +27,7 @@ var ( // DefaultApiService DefaultApi service type DefaultApiService service -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteRequest struct { +type DefaultApiApiCreateAMEBindingRequest struct { ctx _context.Context ApiService *DefaultApiService orgId string @@ -38,23 +38,23 @@ type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExch } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteRequest) Execute() (*_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteExecute(r) +func (r DefaultApiApiCreateAMEBindingRequest) Execute() (ExchangeBinding, *_nethttp.Response, error) { + return r.ApiService.CreateAMEBindingExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete - * Delete an exchange queue binding + * CreateAMEBinding Method for CreateAMEBinding + * Create exchange queue binding * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param exchangeId The id of a specific exchange * @param queueId The id of a specific exchange queue binding - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteRequest + * @return DefaultApiApiCreateAMEBindingRequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string, queueId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteRequest{ +func (a *DefaultApiService) CreateAMEBinding(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string, queueId string) DefaultApiApiCreateAMEBindingRequest { + return DefaultApiApiCreateAMEBindingRequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -67,19 +67,21 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi /* * Execute executes the request + * @return ExchangeBinding */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteRequest) (*_nethttp.Response, error) { +func (a *DefaultApiService) CreateAMEBindingExecute(r DefaultApiApiCreateAMEBindingRequest) (ExchangeBinding, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue ExchangeBinding ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAMEBinding") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}" @@ -103,7 +105,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -112,19 +114,19 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -132,13 +134,22 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + 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 DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetRequest struct { +type DefaultApiApiCreateAMEBindingRuleRequest struct { ctx _context.Context ApiService *DefaultApiService orgId string @@ -146,26 +157,31 @@ type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExch regionId string exchangeId string queueId string + aMEBindingRuleBody *AMEBindingRuleBody } +func (r DefaultApiApiCreateAMEBindingRuleRequest) AMEBindingRuleBody(aMEBindingRuleBody AMEBindingRuleBody) DefaultApiApiCreateAMEBindingRuleRequest { + r.aMEBindingRuleBody = &aMEBindingRuleBody + return r +} -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetRequest) Execute() (ExchangeBinding, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetExecute(r) +func (r DefaultApiApiCreateAMEBindingRuleRequest) Execute() (ExchangeBindingRules, *_nethttp.Response, error) { + return r.ApiService.CreateAMEBindingRuleExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet - * Get details about a queue bound to an exchange + * CreateAMEBindingRule Method for CreateAMEBindingRule + * Create exchange queue binding rule * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param exchangeId The id of a specific exchange * @param queueId The id of a specific exchange queue binding - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetRequest + * @return DefaultApiApiCreateAMEBindingRuleRequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string, queueId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetRequest{ +func (a *DefaultApiService) CreateAMEBindingRule(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string, queueId string) DefaultApiApiCreateAMEBindingRuleRequest { + return DefaultApiApiCreateAMEBindingRuleRequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -178,24 +194,24 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi /* * Execute executes the request - * @return ExchangeBinding + * @return ExchangeBindingRules */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetRequest) (ExchangeBinding, *_nethttp.Response, error) { +func (a *DefaultApiService) CreateAMEBindingRuleExecute(r DefaultApiApiCreateAMEBindingRuleRequest) (ExchangeBindingRules, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ExchangeBinding + localVarReturnValue ExchangeBindingRules ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAMEBindingRule") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}" + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}/rules/routing" localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) @@ -207,7 +223,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -223,6 +239,8 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.aMEBindingRuleBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -260,7 +278,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi return localVarReturnValue, localVarHTTPResponse, nil } -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutRequest struct { +type DefaultApiApiDeleteAMEBindingRequest struct { ctx _context.Context ApiService *DefaultApiService orgId string @@ -271,23 +289,23 @@ type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExch } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutRequest) Execute() (ExchangeBinding, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutExecute(r) +func (r DefaultApiApiDeleteAMEBindingRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteAMEBindingExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut - * Create exchange queue binding + * DeleteAMEBinding Method for DeleteAMEBinding + * Delete an exchange queue binding * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param exchangeId The id of a specific exchange * @param queueId The id of a specific exchange queue binding - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutRequest + * @return DefaultApiApiDeleteAMEBindingRequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string, queueId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutRequest{ +func (a *DefaultApiService) DeleteAMEBinding(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string, queueId string) DefaultApiApiDeleteAMEBindingRequest { + return DefaultApiApiDeleteAMEBindingRequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -300,19 +318,246 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi /* * Execute executes the request - * @return ExchangeBinding */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutRequest) (ExchangeBinding, *_nethttp.Response, error) { +func (a *DefaultApiService) DeleteAMEBindingExecute(r DefaultApiApiDeleteAMEBindingRequest) (*_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ExchangeBinding ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAMEBinding") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"exchangeId"+"}", _neturl.PathEscape(parameterToString(r.exchangeId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"queueId"+"}", _neturl.PathEscape(parameterToString(r.queueId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // 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{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type DefaultApiApiDeleteAMEBindingRuleRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + regionId string + exchangeId string + queueId string +} + + +func (r DefaultApiApiDeleteAMEBindingRuleRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteAMEBindingRuleExecute(r) +} + +/* + * DeleteAMEBindingRule Method for DeleteAMEBindingRule + * Delete an exchange queue binding Rule + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param regionId The region id + * @param exchangeId The id of a specific exchange + * @param queueId The id of a specific exchange queue binding + * @return DefaultApiApiDeleteAMEBindingRuleRequest + */ +func (a *DefaultApiService) DeleteAMEBindingRule(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string, queueId string) DefaultApiApiDeleteAMEBindingRuleRequest { + return DefaultApiApiDeleteAMEBindingRuleRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + regionId: regionId, + exchangeId: exchangeId, + queueId: queueId, + } +} + +/* + * Execute executes the request + */ +func (a *DefaultApiService) DeleteAMEBindingRuleExecute(r DefaultApiApiDeleteAMEBindingRuleRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAMEBindingRule") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}/rules/routing" + localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"exchangeId"+"}", _neturl.PathEscape(parameterToString(r.exchangeId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"queueId"+"}", _neturl.PathEscape(parameterToString(r.queueId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // 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{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type DefaultApiApiGetAMEBindingRequest struct { + ctx _context.Context + ApiService *DefaultApiService + orgId string + envId string + regionId string + exchangeId string + queueId string + inclusion *string +} + +func (r DefaultApiApiGetAMEBindingRequest) Inclusion(inclusion string) DefaultApiApiGetAMEBindingRequest { + r.inclusion = &inclusion + return r +} + +func (r DefaultApiApiGetAMEBindingRequest) Execute() (ExchangeBindingWithRules, *_nethttp.Response, error) { + return r.ApiService.GetAMEBindingExecute(r) +} + +/* + * GetAMEBinding Method for GetAMEBinding + * Get details about a queue bound to an exchange + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param orgId The organization Id + * @param envId The environment id + * @param regionId The region id + * @param exchangeId The id of a specific exchange + * @param queueId The id of a specific exchange queue binding + * @return DefaultApiApiGetAMEBindingRequest + */ +func (a *DefaultApiService) GetAMEBinding(ctx _context.Context, orgId string, envId string, regionId string, exchangeId string, queueId string) DefaultApiApiGetAMEBindingRequest { + return DefaultApiApiGetAMEBindingRequest{ + ApiService: a, + ctx: ctx, + orgId: orgId, + envId: envId, + regionId: regionId, + exchangeId: exchangeId, + queueId: queueId, + } +} + +/* + * Execute executes the request + * @return ExchangeBindingWithRules + */ +func (a *DefaultApiService) GetAMEBindingExecute(r DefaultApiApiGetAMEBindingRequest) (ExchangeBindingWithRules, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ExchangeBindingWithRules + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAMEBinding") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -328,6 +573,9 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBi localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.inclusion != nil { + localVarQueryParams.Add("inclusion", parameterToString(*r.inclusion, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/ame_binding/docs/AMEBindingRuleBody.md b/ame_binding/docs/AMEBindingRuleBody.md new file mode 100644 index 0000000..7a743f4 --- /dev/null +++ b/ame_binding/docs/AMEBindingRuleBody.md @@ -0,0 +1,56 @@ +# AMEBindingRuleBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoutingRules** | Pointer to **[]map[string]interface{}** | | [optional] + +## Methods + +### NewAMEBindingRuleBody + +`func NewAMEBindingRuleBody() *AMEBindingRuleBody` + +NewAMEBindingRuleBody instantiates a new AMEBindingRuleBody 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 + +### NewAMEBindingRuleBodyWithDefaults + +`func NewAMEBindingRuleBodyWithDefaults() *AMEBindingRuleBody` + +NewAMEBindingRuleBodyWithDefaults instantiates a new AMEBindingRuleBody 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 + +### GetRoutingRules + +`func (o *AMEBindingRuleBody) GetRoutingRules() []map[string]interface{}` + +GetRoutingRules returns the RoutingRules field if non-nil, zero value otherwise. + +### GetRoutingRulesOk + +`func (o *AMEBindingRuleBody) GetRoutingRulesOk() (*[]map[string]interface{}, bool)` + +GetRoutingRulesOk returns a tuple with the RoutingRules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoutingRules + +`func (o *AMEBindingRuleBody) SetRoutingRules(v []map[string]interface{})` + +SetRoutingRules sets RoutingRules field to given value. + +### HasRoutingRules + +`func (o *AMEBindingRuleBody) HasRoutingRules() bool` + +HasRoutingRules 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/ame_binding/docs/DefaultApi.md b/ame_binding/docs/DefaultApi.md index 5c4068d..b675438 100644 --- a/ame_binding/docs/DefaultApi.md +++ b/ame_binding/docs/DefaultApi.md @@ -4,15 +4,17 @@ All URIs are relative to *https://anypoint.mulesoft.com/mq/admin/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | +[**CreateAMEBinding**](DefaultApi.md#CreateAMEBinding) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | +[**CreateAMEBindingRule**](DefaultApi.md#CreateAMEBindingRule) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}/rules/routing | +[**DeleteAMEBinding**](DefaultApi.md#DeleteAMEBinding) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | +[**DeleteAMEBindingRule**](DefaultApi.md#DeleteAMEBindingRule) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId}/rules/routing | +[**GetAMEBinding**](DefaultApi.md#GetAMEBinding) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/bindings/exchanges/{exchangeId}/queues/{queueId} | -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete +## CreateAMEBinding -> OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete(ctx, orgId, envId, regionId, exchangeId, queueId).Execute() +> ExchangeBinding CreateAMEBinding(ctx, orgId, envId, regionId, exchangeId, queueId).Execute() @@ -39,11 +41,13 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete(context.Background(), orgId, envId, regionId, exchangeId, queueId).Execute() + resp, r, err := api_client.DefaultApi.CreateAMEBinding(context.Background(), orgId, envId, regionId, exchangeId, queueId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateAMEBinding``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } + // response from `CreateAMEBinding`: ExchangeBinding + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateAMEBinding`: %v\n", resp) } ``` @@ -61,7 +65,171 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdDeleteRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCreateAMEBindingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + + +### Return type + +[**ExchangeBinding**](ExchangeBinding.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## CreateAMEBindingRule + +> ExchangeBindingRules CreateAMEBindingRule(ctx, orgId, envId, regionId, exchangeId, queueId).AMEBindingRuleBody(aMEBindingRuleBody).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + regionId := "regionId_example" // string | The region id + exchangeId := "exchangeId_example" // string | The id of a specific exchange + queueId := "queueId_example" // string | The id of a specific exchange queue binding + aMEBindingRuleBody := *openapiclient.NewAMEBindingRuleBody() // AMEBindingRuleBody | (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.CreateAMEBindingRule(context.Background(), orgId, envId, regionId, exchangeId, queueId).AMEBindingRuleBody(aMEBindingRuleBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateAMEBindingRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAMEBindingRule`: ExchangeBindingRules + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateAMEBindingRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**regionId** | **string** | The region id | +**exchangeId** | **string** | The id of a specific exchange | +**queueId** | **string** | The id of a specific exchange queue binding | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAMEBindingRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + + **aMEBindingRuleBody** | [**AMEBindingRuleBody**](AMEBindingRuleBody.md) | | + +### Return type + +[**ExchangeBindingRules**](ExchangeBindingRules.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) + + +## DeleteAMEBinding + +> DeleteAMEBinding(ctx, orgId, envId, regionId, exchangeId, queueId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + orgId := "orgId_example" // string | The organization Id + envId := "envId_example" // string | The environment id + regionId := "regionId_example" // string | The region id + exchangeId := "exchangeId_example" // string | The id of a specific exchange + queueId := "queueId_example" // string | The id of a specific exchange queue binding + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.DeleteAMEBinding(context.Background(), orgId, envId, regionId, exchangeId, queueId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAMEBinding``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orgId** | **string** | The organization Id | +**envId** | **string** | The environment id | +**regionId** | **string** | The region id | +**exchangeId** | **string** | The id of a specific exchange | +**queueId** | **string** | The id of a specific exchange queue binding | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAMEBindingRequest struct via the builder pattern Name | Type | Description | Notes @@ -90,9 +258,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet +## DeleteAMEBindingRule -> ExchangeBinding OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet(ctx, orgId, envId, regionId, exchangeId, queueId).Execute() +> DeleteAMEBindingRule(ctx, orgId, envId, regionId, exchangeId, queueId).Execute() @@ -119,13 +287,11 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet(context.Background(), orgId, envId, regionId, exchangeId, queueId).Execute() + resp, r, err := api_client.DefaultApi.DeleteAMEBindingRule(context.Background(), orgId, envId, regionId, exchangeId, queueId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAMEBindingRule``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet`: ExchangeBinding - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGet`: %v\n", resp) } ``` @@ -143,7 +309,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdGetRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDeleteAMEBindingRuleRequest struct via the builder pattern Name | Type | Description | Notes @@ -156,7 +322,7 @@ Name | Type | Description | Notes ### Return type -[**ExchangeBinding**](ExchangeBinding.md) + (empty response body) ### Authorization @@ -165,16 +331,16 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: Not defined [[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) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut +## GetAMEBinding -> ExchangeBinding OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut(ctx, orgId, envId, regionId, exchangeId, queueId).Execute() +> ExchangeBindingWithRules GetAMEBinding(ctx, orgId, envId, regionId, exchangeId, queueId).Inclusion(inclusion).Execute() @@ -198,16 +364,17 @@ func main() { regionId := "regionId_example" // string | The region id exchangeId := "exchangeId_example" // string | The id of a specific exchange queueId := "queueId_example" // string | The id of a specific exchange queue binding + inclusion := "inclusion_example" // string | Defines what to fetch (optional) configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut(context.Background(), orgId, envId, regionId, exchangeId, queueId).Execute() + resp, r, err := api_client.DefaultApi.GetAMEBinding(context.Background(), orgId, envId, regionId, exchangeId, queueId).Inclusion(inclusion).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAMEBinding``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut`: ExchangeBinding - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPut`: %v\n", resp) + // response from `GetAMEBinding`: ExchangeBindingWithRules + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAMEBinding`: %v\n", resp) } ``` @@ -225,7 +392,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdBindingsExchangesExchangeIdQueuesQueueIdPutRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetAMEBindingRequest struct via the builder pattern Name | Type | Description | Notes @@ -235,10 +402,11 @@ Name | Type | Description | Notes + **inclusion** | **string** | Defines what to fetch | ### Return type -[**ExchangeBinding**](ExchangeBinding.md) +[**ExchangeBindingWithRules**](ExchangeBindingWithRules.md) ### Authorization diff --git a/ame_binding/docs/ExchangeBindingRules.md b/ame_binding/docs/ExchangeBindingRules.md new file mode 100644 index 0000000..4533539 --- /dev/null +++ b/ame_binding/docs/ExchangeBindingRules.md @@ -0,0 +1,108 @@ +# ExchangeBindingRules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QueueId** | Pointer to **string** | | [optional] +**ExchangeId** | Pointer to **string** | | [optional] +**RoutingRules** | Pointer to **[]map[string]interface{}** | | [optional] + +## Methods + +### NewExchangeBindingRules + +`func NewExchangeBindingRules() *ExchangeBindingRules` + +NewExchangeBindingRules instantiates a new ExchangeBindingRules 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 + +### NewExchangeBindingRulesWithDefaults + +`func NewExchangeBindingRulesWithDefaults() *ExchangeBindingRules` + +NewExchangeBindingRulesWithDefaults instantiates a new ExchangeBindingRules 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 + +### GetQueueId + +`func (o *ExchangeBindingRules) GetQueueId() string` + +GetQueueId returns the QueueId field if non-nil, zero value otherwise. + +### GetQueueIdOk + +`func (o *ExchangeBindingRules) GetQueueIdOk() (*string, bool)` + +GetQueueIdOk returns a tuple with the QueueId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueueId + +`func (o *ExchangeBindingRules) SetQueueId(v string)` + +SetQueueId sets QueueId field to given value. + +### HasQueueId + +`func (o *ExchangeBindingRules) HasQueueId() bool` + +HasQueueId returns a boolean if a field has been set. + +### GetExchangeId + +`func (o *ExchangeBindingRules) GetExchangeId() string` + +GetExchangeId returns the ExchangeId field if non-nil, zero value otherwise. + +### GetExchangeIdOk + +`func (o *ExchangeBindingRules) GetExchangeIdOk() (*string, bool)` + +GetExchangeIdOk returns a tuple with the ExchangeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExchangeId + +`func (o *ExchangeBindingRules) SetExchangeId(v string)` + +SetExchangeId sets ExchangeId field to given value. + +### HasExchangeId + +`func (o *ExchangeBindingRules) HasExchangeId() bool` + +HasExchangeId returns a boolean if a field has been set. + +### GetRoutingRules + +`func (o *ExchangeBindingRules) GetRoutingRules() []map[string]interface{}` + +GetRoutingRules returns the RoutingRules field if non-nil, zero value otherwise. + +### GetRoutingRulesOk + +`func (o *ExchangeBindingRules) GetRoutingRulesOk() (*[]map[string]interface{}, bool)` + +GetRoutingRulesOk returns a tuple with the RoutingRules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoutingRules + +`func (o *ExchangeBindingRules) SetRoutingRules(v []map[string]interface{})` + +SetRoutingRules sets RoutingRules field to given value. + +### HasRoutingRules + +`func (o *ExchangeBindingRules) HasRoutingRules() bool` + +HasRoutingRules 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/ame_binding/docs/ExchangeBindingWithRules.md b/ame_binding/docs/ExchangeBindingWithRules.md new file mode 100644 index 0000000..900201f --- /dev/null +++ b/ame_binding/docs/ExchangeBindingWithRules.md @@ -0,0 +1,108 @@ +# ExchangeBindingWithRules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QueueId** | Pointer to **string** | | [optional] +**ExchangeId** | Pointer to **string** | | [optional] +**Rules** | Pointer to **[]map[string]interface{}** | | [optional] + +## Methods + +### NewExchangeBindingWithRules + +`func NewExchangeBindingWithRules() *ExchangeBindingWithRules` + +NewExchangeBindingWithRules instantiates a new ExchangeBindingWithRules 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 + +### NewExchangeBindingWithRulesWithDefaults + +`func NewExchangeBindingWithRulesWithDefaults() *ExchangeBindingWithRules` + +NewExchangeBindingWithRulesWithDefaults instantiates a new ExchangeBindingWithRules 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 + +### GetQueueId + +`func (o *ExchangeBindingWithRules) GetQueueId() string` + +GetQueueId returns the QueueId field if non-nil, zero value otherwise. + +### GetQueueIdOk + +`func (o *ExchangeBindingWithRules) GetQueueIdOk() (*string, bool)` + +GetQueueIdOk returns a tuple with the QueueId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueueId + +`func (o *ExchangeBindingWithRules) SetQueueId(v string)` + +SetQueueId sets QueueId field to given value. + +### HasQueueId + +`func (o *ExchangeBindingWithRules) HasQueueId() bool` + +HasQueueId returns a boolean if a field has been set. + +### GetExchangeId + +`func (o *ExchangeBindingWithRules) GetExchangeId() string` + +GetExchangeId returns the ExchangeId field if non-nil, zero value otherwise. + +### GetExchangeIdOk + +`func (o *ExchangeBindingWithRules) GetExchangeIdOk() (*string, bool)` + +GetExchangeIdOk returns a tuple with the ExchangeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExchangeId + +`func (o *ExchangeBindingWithRules) SetExchangeId(v string)` + +SetExchangeId sets ExchangeId field to given value. + +### HasExchangeId + +`func (o *ExchangeBindingWithRules) HasExchangeId() bool` + +HasExchangeId returns a boolean if a field has been set. + +### GetRules + +`func (o *ExchangeBindingWithRules) GetRules() []map[string]interface{}` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *ExchangeBindingWithRules) GetRulesOk() (*[]map[string]interface{}, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *ExchangeBindingWithRules) SetRules(v []map[string]interface{})` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *ExchangeBindingWithRules) HasRules() bool` + +HasRules 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/ame_binding/docs/ExchangeBindingWithRulesAllOf.md b/ame_binding/docs/ExchangeBindingWithRulesAllOf.md new file mode 100644 index 0000000..2bc9d66 --- /dev/null +++ b/ame_binding/docs/ExchangeBindingWithRulesAllOf.md @@ -0,0 +1,56 @@ +# ExchangeBindingWithRulesAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rules** | Pointer to **[]map[string]interface{}** | | [optional] + +## Methods + +### NewExchangeBindingWithRulesAllOf + +`func NewExchangeBindingWithRulesAllOf() *ExchangeBindingWithRulesAllOf` + +NewExchangeBindingWithRulesAllOf instantiates a new ExchangeBindingWithRulesAllOf 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 + +### NewExchangeBindingWithRulesAllOfWithDefaults + +`func NewExchangeBindingWithRulesAllOfWithDefaults() *ExchangeBindingWithRulesAllOf` + +NewExchangeBindingWithRulesAllOfWithDefaults instantiates a new ExchangeBindingWithRulesAllOf 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 + +### GetRules + +`func (o *ExchangeBindingWithRulesAllOf) GetRules() []map[string]interface{}` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *ExchangeBindingWithRulesAllOf) GetRulesOk() (*[]map[string]interface{}, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *ExchangeBindingWithRulesAllOf) SetRules(v []map[string]interface{})` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *ExchangeBindingWithRulesAllOf) HasRules() bool` + +HasRules 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/ame_binding/model_ame_binding_rule_body.go b/ame_binding/model_ame_binding_rule_body.go new file mode 100644 index 0000000..919c30d --- /dev/null +++ b/ame_binding/model_ame_binding_rule_body.go @@ -0,0 +1,115 @@ +/* + * Anypoint MQ Exchange Binding specfication + * + * Anypoint MQ Exchange Binding API specification + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ame_binding + +import ( + "encoding/json" +) + +// AMEBindingRuleBody struct for AMEBindingRuleBody +type AMEBindingRuleBody struct { + RoutingRules *[]map[string]interface{} `json:"routingRules,omitempty"` +} + +// NewAMEBindingRuleBody instantiates a new AMEBindingRuleBody 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 NewAMEBindingRuleBody() *AMEBindingRuleBody { + this := AMEBindingRuleBody{} + return &this +} + +// NewAMEBindingRuleBodyWithDefaults instantiates a new AMEBindingRuleBody 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 NewAMEBindingRuleBodyWithDefaults() *AMEBindingRuleBody { + this := AMEBindingRuleBody{} + return &this +} + +// GetRoutingRules returns the RoutingRules field value if set, zero value otherwise. +func (o *AMEBindingRuleBody) GetRoutingRules() []map[string]interface{} { + if o == nil || o.RoutingRules == nil { + var ret []map[string]interface{} + return ret + } + return *o.RoutingRules +} + +// GetRoutingRulesOk returns a tuple with the RoutingRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AMEBindingRuleBody) GetRoutingRulesOk() (*[]map[string]interface{}, bool) { + if o == nil || o.RoutingRules == nil { + return nil, false + } + return o.RoutingRules, true +} + +// HasRoutingRules returns a boolean if a field has been set. +func (o *AMEBindingRuleBody) HasRoutingRules() bool { + if o != nil && o.RoutingRules != nil { + return true + } + + return false +} + +// SetRoutingRules gets a reference to the given []map[string]interface{} and assigns it to the RoutingRules field. +func (o *AMEBindingRuleBody) SetRoutingRules(v []map[string]interface{}) { + o.RoutingRules = &v +} + +func (o AMEBindingRuleBody) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.RoutingRules != nil { + toSerialize["routingRules"] = o.RoutingRules + } + return json.Marshal(toSerialize) +} + +type NullableAMEBindingRuleBody struct { + value *AMEBindingRuleBody + isSet bool +} + +func (v NullableAMEBindingRuleBody) Get() *AMEBindingRuleBody { + return v.value +} + +func (v *NullableAMEBindingRuleBody) Set(val *AMEBindingRuleBody) { + v.value = val + v.isSet = true +} + +func (v NullableAMEBindingRuleBody) IsSet() bool { + return v.isSet +} + +func (v *NullableAMEBindingRuleBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAMEBindingRuleBody(val *AMEBindingRuleBody) *NullableAMEBindingRuleBody { + return &NullableAMEBindingRuleBody{value: val, isSet: true} +} + +func (v NullableAMEBindingRuleBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAMEBindingRuleBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/ame_binding/model_exchange_binding_rules.go b/ame_binding/model_exchange_binding_rules.go new file mode 100644 index 0000000..5a60679 --- /dev/null +++ b/ame_binding/model_exchange_binding_rules.go @@ -0,0 +1,187 @@ +/* + * Anypoint MQ Exchange Binding specfication + * + * Anypoint MQ Exchange Binding API specification + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ame_binding + +import ( + "encoding/json" +) + +// ExchangeBindingRules struct for ExchangeBindingRules +type ExchangeBindingRules struct { + QueueId *string `json:"queueId,omitempty"` + ExchangeId *string `json:"exchangeId,omitempty"` + RoutingRules *[]map[string]interface{} `json:"routingRules,omitempty"` +} + +// NewExchangeBindingRules instantiates a new ExchangeBindingRules 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 NewExchangeBindingRules() *ExchangeBindingRules { + this := ExchangeBindingRules{} + return &this +} + +// NewExchangeBindingRulesWithDefaults instantiates a new ExchangeBindingRules 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 NewExchangeBindingRulesWithDefaults() *ExchangeBindingRules { + this := ExchangeBindingRules{} + return &this +} + +// GetQueueId returns the QueueId field value if set, zero value otherwise. +func (o *ExchangeBindingRules) GetQueueId() string { + if o == nil || o.QueueId == nil { + var ret string + return ret + } + return *o.QueueId +} + +// GetQueueIdOk returns a tuple with the QueueId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExchangeBindingRules) GetQueueIdOk() (*string, bool) { + if o == nil || o.QueueId == nil { + return nil, false + } + return o.QueueId, true +} + +// HasQueueId returns a boolean if a field has been set. +func (o *ExchangeBindingRules) HasQueueId() bool { + if o != nil && o.QueueId != nil { + return true + } + + return false +} + +// SetQueueId gets a reference to the given string and assigns it to the QueueId field. +func (o *ExchangeBindingRules) SetQueueId(v string) { + o.QueueId = &v +} + +// GetExchangeId returns the ExchangeId field value if set, zero value otherwise. +func (o *ExchangeBindingRules) GetExchangeId() string { + if o == nil || o.ExchangeId == nil { + var ret string + return ret + } + return *o.ExchangeId +} + +// GetExchangeIdOk returns a tuple with the ExchangeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExchangeBindingRules) GetExchangeIdOk() (*string, bool) { + if o == nil || o.ExchangeId == nil { + return nil, false + } + return o.ExchangeId, true +} + +// HasExchangeId returns a boolean if a field has been set. +func (o *ExchangeBindingRules) HasExchangeId() bool { + if o != nil && o.ExchangeId != nil { + return true + } + + return false +} + +// SetExchangeId gets a reference to the given string and assigns it to the ExchangeId field. +func (o *ExchangeBindingRules) SetExchangeId(v string) { + o.ExchangeId = &v +} + +// GetRoutingRules returns the RoutingRules field value if set, zero value otherwise. +func (o *ExchangeBindingRules) GetRoutingRules() []map[string]interface{} { + if o == nil || o.RoutingRules == nil { + var ret []map[string]interface{} + return ret + } + return *o.RoutingRules +} + +// GetRoutingRulesOk returns a tuple with the RoutingRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExchangeBindingRules) GetRoutingRulesOk() (*[]map[string]interface{}, bool) { + if o == nil || o.RoutingRules == nil { + return nil, false + } + return o.RoutingRules, true +} + +// HasRoutingRules returns a boolean if a field has been set. +func (o *ExchangeBindingRules) HasRoutingRules() bool { + if o != nil && o.RoutingRules != nil { + return true + } + + return false +} + +// SetRoutingRules gets a reference to the given []map[string]interface{} and assigns it to the RoutingRules field. +func (o *ExchangeBindingRules) SetRoutingRules(v []map[string]interface{}) { + o.RoutingRules = &v +} + +func (o ExchangeBindingRules) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.QueueId != nil { + toSerialize["queueId"] = o.QueueId + } + if o.ExchangeId != nil { + toSerialize["exchangeId"] = o.ExchangeId + } + if o.RoutingRules != nil { + toSerialize["routingRules"] = o.RoutingRules + } + return json.Marshal(toSerialize) +} + +type NullableExchangeBindingRules struct { + value *ExchangeBindingRules + isSet bool +} + +func (v NullableExchangeBindingRules) Get() *ExchangeBindingRules { + return v.value +} + +func (v *NullableExchangeBindingRules) Set(val *ExchangeBindingRules) { + v.value = val + v.isSet = true +} + +func (v NullableExchangeBindingRules) IsSet() bool { + return v.isSet +} + +func (v *NullableExchangeBindingRules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExchangeBindingRules(val *ExchangeBindingRules) *NullableExchangeBindingRules { + return &NullableExchangeBindingRules{value: val, isSet: true} +} + +func (v NullableExchangeBindingRules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExchangeBindingRules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/ame_binding/model_exchange_binding_with_rules.go b/ame_binding/model_exchange_binding_with_rules.go new file mode 100644 index 0000000..e4ec919 --- /dev/null +++ b/ame_binding/model_exchange_binding_with_rules.go @@ -0,0 +1,187 @@ +/* + * Anypoint MQ Exchange Binding specfication + * + * Anypoint MQ Exchange Binding API specification + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ame_binding + +import ( + "encoding/json" +) + +// ExchangeBindingWithRules struct for ExchangeBindingWithRules +type ExchangeBindingWithRules struct { + QueueId *string `json:"queueId,omitempty"` + ExchangeId *string `json:"exchangeId,omitempty"` + Rules *[]map[string]interface{} `json:"rules,omitempty"` +} + +// NewExchangeBindingWithRules instantiates a new ExchangeBindingWithRules 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 NewExchangeBindingWithRules() *ExchangeBindingWithRules { + this := ExchangeBindingWithRules{} + return &this +} + +// NewExchangeBindingWithRulesWithDefaults instantiates a new ExchangeBindingWithRules 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 NewExchangeBindingWithRulesWithDefaults() *ExchangeBindingWithRules { + this := ExchangeBindingWithRules{} + return &this +} + +// GetQueueId returns the QueueId field value if set, zero value otherwise. +func (o *ExchangeBindingWithRules) GetQueueId() string { + if o == nil || o.QueueId == nil { + var ret string + return ret + } + return *o.QueueId +} + +// GetQueueIdOk returns a tuple with the QueueId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExchangeBindingWithRules) GetQueueIdOk() (*string, bool) { + if o == nil || o.QueueId == nil { + return nil, false + } + return o.QueueId, true +} + +// HasQueueId returns a boolean if a field has been set. +func (o *ExchangeBindingWithRules) HasQueueId() bool { + if o != nil && o.QueueId != nil { + return true + } + + return false +} + +// SetQueueId gets a reference to the given string and assigns it to the QueueId field. +func (o *ExchangeBindingWithRules) SetQueueId(v string) { + o.QueueId = &v +} + +// GetExchangeId returns the ExchangeId field value if set, zero value otherwise. +func (o *ExchangeBindingWithRules) GetExchangeId() string { + if o == nil || o.ExchangeId == nil { + var ret string + return ret + } + return *o.ExchangeId +} + +// GetExchangeIdOk returns a tuple with the ExchangeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExchangeBindingWithRules) GetExchangeIdOk() (*string, bool) { + if o == nil || o.ExchangeId == nil { + return nil, false + } + return o.ExchangeId, true +} + +// HasExchangeId returns a boolean if a field has been set. +func (o *ExchangeBindingWithRules) HasExchangeId() bool { + if o != nil && o.ExchangeId != nil { + return true + } + + return false +} + +// SetExchangeId gets a reference to the given string and assigns it to the ExchangeId field. +func (o *ExchangeBindingWithRules) SetExchangeId(v string) { + o.ExchangeId = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *ExchangeBindingWithRules) GetRules() []map[string]interface{} { + if o == nil || o.Rules == nil { + var ret []map[string]interface{} + return ret + } + return *o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExchangeBindingWithRules) GetRulesOk() (*[]map[string]interface{}, bool) { + if o == nil || o.Rules == nil { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *ExchangeBindingWithRules) HasRules() bool { + if o != nil && o.Rules != nil { + return true + } + + return false +} + +// SetRules gets a reference to the given []map[string]interface{} and assigns it to the Rules field. +func (o *ExchangeBindingWithRules) SetRules(v []map[string]interface{}) { + o.Rules = &v +} + +func (o ExchangeBindingWithRules) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.QueueId != nil { + toSerialize["queueId"] = o.QueueId + } + if o.ExchangeId != nil { + toSerialize["exchangeId"] = o.ExchangeId + } + if o.Rules != nil { + toSerialize["rules"] = o.Rules + } + return json.Marshal(toSerialize) +} + +type NullableExchangeBindingWithRules struct { + value *ExchangeBindingWithRules + isSet bool +} + +func (v NullableExchangeBindingWithRules) Get() *ExchangeBindingWithRules { + return v.value +} + +func (v *NullableExchangeBindingWithRules) Set(val *ExchangeBindingWithRules) { + v.value = val + v.isSet = true +} + +func (v NullableExchangeBindingWithRules) IsSet() bool { + return v.isSet +} + +func (v *NullableExchangeBindingWithRules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExchangeBindingWithRules(val *ExchangeBindingWithRules) *NullableExchangeBindingWithRules { + return &NullableExchangeBindingWithRules{value: val, isSet: true} +} + +func (v NullableExchangeBindingWithRules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExchangeBindingWithRules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/ame_binding/model_exchange_binding_with_rules_all_of.go b/ame_binding/model_exchange_binding_with_rules_all_of.go new file mode 100644 index 0000000..b49161b --- /dev/null +++ b/ame_binding/model_exchange_binding_with_rules_all_of.go @@ -0,0 +1,115 @@ +/* + * Anypoint MQ Exchange Binding specfication + * + * Anypoint MQ Exchange Binding API specification + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ame_binding + +import ( + "encoding/json" +) + +// ExchangeBindingWithRulesAllOf struct for ExchangeBindingWithRulesAllOf +type ExchangeBindingWithRulesAllOf struct { + Rules *[]map[string]interface{} `json:"rules,omitempty"` +} + +// NewExchangeBindingWithRulesAllOf instantiates a new ExchangeBindingWithRulesAllOf 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 NewExchangeBindingWithRulesAllOf() *ExchangeBindingWithRulesAllOf { + this := ExchangeBindingWithRulesAllOf{} + return &this +} + +// NewExchangeBindingWithRulesAllOfWithDefaults instantiates a new ExchangeBindingWithRulesAllOf 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 NewExchangeBindingWithRulesAllOfWithDefaults() *ExchangeBindingWithRulesAllOf { + this := ExchangeBindingWithRulesAllOf{} + return &this +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *ExchangeBindingWithRulesAllOf) GetRules() []map[string]interface{} { + if o == nil || o.Rules == nil { + var ret []map[string]interface{} + return ret + } + return *o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExchangeBindingWithRulesAllOf) GetRulesOk() (*[]map[string]interface{}, bool) { + if o == nil || o.Rules == nil { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *ExchangeBindingWithRulesAllOf) HasRules() bool { + if o != nil && o.Rules != nil { + return true + } + + return false +} + +// SetRules gets a reference to the given []map[string]interface{} and assigns it to the Rules field. +func (o *ExchangeBindingWithRulesAllOf) SetRules(v []map[string]interface{}) { + o.Rules = &v +} + +func (o ExchangeBindingWithRulesAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Rules != nil { + toSerialize["rules"] = o.Rules + } + return json.Marshal(toSerialize) +} + +type NullableExchangeBindingWithRulesAllOf struct { + value *ExchangeBindingWithRulesAllOf + isSet bool +} + +func (v NullableExchangeBindingWithRulesAllOf) Get() *ExchangeBindingWithRulesAllOf { + return v.value +} + +func (v *NullableExchangeBindingWithRulesAllOf) Set(val *ExchangeBindingWithRulesAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableExchangeBindingWithRulesAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableExchangeBindingWithRulesAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExchangeBindingWithRulesAllOf(val *ExchangeBindingWithRulesAllOf) *NullableExchangeBindingWithRulesAllOf { + return &NullableExchangeBindingWithRulesAllOf{value: val, isSet: true} +} + +func (v NullableExchangeBindingWithRulesAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExchangeBindingWithRulesAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/amq/README.md b/amq/README.md index 74facc5..2c62ff0 100644 --- a/amq/README.md +++ b/amq/README.md @@ -78,11 +78,11 @@ All URIs are relative to *https://anypoint.mulesoft.com/mq/admin/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsget) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsqueuesqueueiddelete) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsqueuesqueueidget) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsqueuesqueueidpatch) | **Patch** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | -*DefaultApi* | [**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut**](docs/DefaultApi.md#organizationsorgidenvironmentsenvidregionsregioniddestinationsqueuesqueueidput) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | +*DefaultApi* | [**CreateAMQ**](docs/DefaultApi.md#createamq) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | +*DefaultApi* | [**DeleteAMQ**](docs/DefaultApi.md#deleteamq) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | +*DefaultApi* | [**GetAMQ**](docs/DefaultApi.md#getamq) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | +*DefaultApi* | [**GetAMQList**](docs/DefaultApi.md#getamqlist) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations | +*DefaultApi* | [**UpdateAMQ**](docs/DefaultApi.md#updateamq) | **Patch** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | ## Documentation For Models diff --git a/amq/api/openapi.yaml b/amq/api/openapi.yaml index 170a989..2307988 100644 --- a/amq/api/openapi.yaml +++ b/amq/api/openapi.yaml @@ -16,6 +16,7 @@ paths: /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations: get: description: Get a list of queues in a region + operationId: GetAMQList parameters: - description: The organization Id explode: false @@ -41,6 +42,66 @@ paths: schema: type: string style: simple + - description: Defines what to fetch + explode: true + in: query + name: inclusion + required: false + schema: + enum: + - all + - minimal + type: string + style: form + - description: Defines what to fetch + explode: true + in: query + name: destinationType + required: false + schema: + enum: + - all + - queue + - exchange + type: string + style: form + - description: Skip over a number of elements by specifying an offset value + for the query. + explode: true + in: query + name: offset + required: false + schema: + default: 0 + type: integer + style: form + - description: Limit the number of elements in the response. + explode: true + in: query + name: limit + required: false + schema: + default: 20 + type: integer + style: form + - description: Searchs the field from the left using the passed string. + explode: true + in: query + name: startsWith + required: false + schema: + type: string + style: form + - description: Includes only results with the given Ids. + explode: true + in: query + name: destinationIds + required: false + schema: + items: + type: string + type: array + style: form responses: "401": description: Access token is missing or invalid @@ -56,6 +117,7 @@ paths: /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId}: delete: description: Delete queue + operationId: DeleteAMQ parameters: - description: The organization Id explode: false @@ -96,6 +158,7 @@ paths: description: Success response get: description: Get details about a queue + operationId: GetAMQ parameters: - description: The organization Id explode: false @@ -140,6 +203,7 @@ paths: description: Success response patch: description: Modify a queue's properties + operationId: UpdateAMQ parameters: - description: The organization Id explode: false @@ -195,6 +259,7 @@ paths: description: Success response put: description: Create queue + operationId: CreateAMQ parameters: - description: The organization Id explode: false @@ -293,17 +358,23 @@ components: schemas: queue: example: + exchangeId: exchangeId queueId: queueId fifo: true defaultLockTtl: 6 encrypted: true defaultTtl: 0 defaultDeliveryDelay: 1 + maxDeliveries: 5 type: type + deadLetterQueueId: deadLetterQueueId properties: queueId: title: queueId type: string + exchangeId: + title: exchangeId + type: string defaultTtl: title: defaultTtl type: integer @@ -319,6 +390,12 @@ components: defaultDeliveryDelay: title: defaultDeliveryDelay type: integer + deadLetterQueueId: + title: deadLetterQueueId + type: string + maxDeliveries: + title: maxDeliveries + type: integer fifo: title: fifo type: boolean @@ -327,21 +404,35 @@ components: queueBody: properties: defaultTtl: + nullable: true title: defaultTtl type: integer defaultLockTtl: + nullable: true title: defaultLockTtl type: integer type: + nullable: true title: type type: string encrypted: + nullable: true title: encrypted type: boolean defaultDeliveryDelay: + nullable: true title: defaultDeliveryDelay type: integer + deadLetterQueueId: + nullable: true + title: deadLetterQueueId + type: string + maxDeliveries: + nullable: true + title: maxDeliveries + type: integer fifo: + nullable: true title: fifo type: boolean title: queueBody diff --git a/amq/api_default.go b/amq/api_default.go index 9523b56..ef31f40 100644 --- a/amq/api_default.go +++ b/amq/api_default.go @@ -17,6 +17,7 @@ import ( _nethttp "net/http" _neturl "net/url" "strings" + "reflect" ) // Linger please @@ -27,68 +28,77 @@ var ( // DefaultApiService DefaultApi service type DefaultApiService service -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetRequest struct { +type DefaultApiApiCreateAMQRequest struct { ctx _context.Context ApiService *DefaultApiService orgId string envId string regionId string + queueId string + queueBody *QueueBody } +func (r DefaultApiApiCreateAMQRequest) QueueBody(queueBody QueueBody) DefaultApiApiCreateAMQRequest { + r.queueBody = &queueBody + return r +} -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetRequest) Execute() ([]Queue, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetExecute(r) +func (r DefaultApiApiCreateAMQRequest) Execute() (Queue, *_nethttp.Response, error) { + return r.ApiService.CreateAMQExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet - * Get a list of queues in a region + * CreateAMQ Method for CreateAMQ + * Create queue * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id - * @param regionId The region id for MQ - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetRequest + * @param regionId The region id + * @param queueId The id of a specific queue + * @return DefaultApiApiCreateAMQRequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet(ctx _context.Context, orgId string, envId string, regionId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetRequest{ +func (a *DefaultApiService) CreateAMQ(ctx _context.Context, orgId string, envId string, regionId string, queueId string) DefaultApiApiCreateAMQRequest { + return DefaultApiApiCreateAMQRequest{ ApiService: a, ctx: ctx, orgId: orgId, envId: envId, regionId: regionId, + queueId: queueId, } } /* * Execute executes the request - * @return []Queue + * @return Queue */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetRequest) ([]Queue, *_nethttp.Response, error) { +func (a *DefaultApiService) CreateAMQExecute(r DefaultApiApiCreateAMQRequest) (Queue, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue []Queue + localVarReturnValue Queue ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAMQ") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations" + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId}" localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"queueId"+"}", _neturl.PathEscape(parameterToString(r.queueId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -104,6 +114,8 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.queueBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -141,7 +153,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe return localVarReturnValue, localVarHTTPResponse, nil } -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteRequest struct { +type DefaultApiApiDeleteAMQRequest struct { ctx _context.Context ApiService *DefaultApiService orgId string @@ -151,22 +163,22 @@ type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinations } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteRequest) Execute() (*_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteExecute(r) +func (r DefaultApiApiDeleteAMQRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteAMQExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete + * DeleteAMQ Method for DeleteAMQ * Delete queue * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param queueId The id of a specific queue - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteRequest + * @return DefaultApiApiDeleteAMQRequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete(ctx _context.Context, orgId string, envId string, regionId string, queueId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteRequest{ +func (a *DefaultApiService) DeleteAMQ(ctx _context.Context, orgId string, envId string, regionId string, queueId string) DefaultApiApiDeleteAMQRequest { + return DefaultApiApiDeleteAMQRequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -179,7 +191,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe /* * Execute executes the request */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteRequest) (*_nethttp.Response, error) { +func (a *DefaultApiService) DeleteAMQExecute(r DefaultApiApiDeleteAMQRequest) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -188,7 +200,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAMQ") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -248,7 +260,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe return localVarHTTPResponse, nil } -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetRequest struct { +type DefaultApiApiGetAMQRequest struct { ctx _context.Context ApiService *DefaultApiService orgId string @@ -258,22 +270,22 @@ type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinations } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetRequest) Execute() (Queue, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetExecute(r) +func (r DefaultApiApiGetAMQRequest) Execute() (Queue, *_nethttp.Response, error) { + return r.ApiService.GetAMQExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet + * GetAMQ Method for GetAMQ * Get details about a queue * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param queueId The id of a specific queue - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetRequest + * @return DefaultApiApiGetAMQRequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet(ctx _context.Context, orgId string, envId string, regionId string, queueId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetRequest{ +func (a *DefaultApiService) GetAMQ(ctx _context.Context, orgId string, envId string, regionId string, queueId string) DefaultApiApiGetAMQRequest { + return DefaultApiApiGetAMQRequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -287,7 +299,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe * Execute executes the request * @return Queue */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetRequest) (Queue, *_nethttp.Response, error) { +func (a *DefaultApiService) GetAMQExecute(r DefaultApiApiGetAMQRequest) (Queue, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -297,7 +309,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe localVarReturnValue Queue ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAMQ") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -366,77 +378,124 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe return localVarReturnValue, localVarHTTPResponse, nil } -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest struct { +type DefaultApiApiGetAMQListRequest struct { ctx _context.Context ApiService *DefaultApiService orgId string envId string regionId string - queueId string - queueBody *QueueBody + inclusion *string + destinationType *string + offset *int32 + limit *int32 + startsWith *string + destinationIds *[]string } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest) QueueBody(queueBody QueueBody) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest { - r.queueBody = &queueBody +func (r DefaultApiApiGetAMQListRequest) Inclusion(inclusion string) DefaultApiApiGetAMQListRequest { + r.inclusion = &inclusion + return r +} +func (r DefaultApiApiGetAMQListRequest) DestinationType(destinationType string) DefaultApiApiGetAMQListRequest { + r.destinationType = &destinationType + return r +} +func (r DefaultApiApiGetAMQListRequest) Offset(offset int32) DefaultApiApiGetAMQListRequest { + r.offset = &offset + return r +} +func (r DefaultApiApiGetAMQListRequest) Limit(limit int32) DefaultApiApiGetAMQListRequest { + r.limit = &limit + return r +} +func (r DefaultApiApiGetAMQListRequest) StartsWith(startsWith string) DefaultApiApiGetAMQListRequest { + r.startsWith = &startsWith + return r +} +func (r DefaultApiApiGetAMQListRequest) DestinationIds(destinationIds []string) DefaultApiApiGetAMQListRequest { + r.destinationIds = &destinationIds return r } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest) Execute() (Queue, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchExecute(r) +func (r DefaultApiApiGetAMQListRequest) Execute() ([]Queue, *_nethttp.Response, error) { + return r.ApiService.GetAMQListExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch - * Modify a queue's properties + * GetAMQList Method for GetAMQList + * Get a list of queues in a region * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id - * @param regionId The region id - * @param queueId The id of a specific queue - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest + * @param regionId The region id for MQ + * @return DefaultApiApiGetAMQListRequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch(ctx _context.Context, orgId string, envId string, regionId string, queueId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest{ +func (a *DefaultApiService) GetAMQList(ctx _context.Context, orgId string, envId string, regionId string) DefaultApiApiGetAMQListRequest { + return DefaultApiApiGetAMQListRequest{ ApiService: a, ctx: ctx, orgId: orgId, envId: envId, regionId: regionId, - queueId: queueId, } } /* * Execute executes the request - * @return Queue + * @return []Queue */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest) (Queue, *_nethttp.Response, error) { +func (a *DefaultApiService) GetAMQListExecute(r DefaultApiApiGetAMQListRequest) ([]Queue, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPatch + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Queue + localVarReturnValue []Queue ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAMQList") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId}" + localVarPath := localBasePath + "/organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations" localVarPath = strings.Replace(localVarPath, "{"+"orgId"+"}", _neturl.PathEscape(parameterToString(r.orgId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"envId"+"}", _neturl.PathEscape(parameterToString(r.envId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"queueId"+"}", _neturl.PathEscape(parameterToString(r.queueId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.inclusion != nil { + localVarQueryParams.Add("inclusion", parameterToString(*r.inclusion, "")) + } + if r.destinationType != nil { + localVarQueryParams.Add("destinationType", parameterToString(*r.destinationType, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.startsWith != nil { + localVarQueryParams.Add("startsWith", parameterToString(*r.startsWith, "")) + } + if r.destinationIds != nil { + t := *r.destinationIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("destinationIds", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("destinationIds", parameterToString(t, "multi")) + } + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -452,8 +511,6 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.queueBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -476,16 +533,6 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 404 { - var v InlineResponse404 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -501,7 +548,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe return localVarReturnValue, localVarHTTPResponse, nil } -type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest struct { +type DefaultApiApiUpdateAMQRequest struct { ctx _context.Context ApiService *DefaultApiService orgId string @@ -511,27 +558,27 @@ type DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinations queueBody *QueueBody } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest) QueueBody(queueBody QueueBody) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest { +func (r DefaultApiApiUpdateAMQRequest) QueueBody(queueBody QueueBody) DefaultApiApiUpdateAMQRequest { r.queueBody = &queueBody return r } -func (r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest) Execute() (Queue, *_nethttp.Response, error) { - return r.ApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutExecute(r) +func (r DefaultApiApiUpdateAMQRequest) Execute() (Queue, *_nethttp.Response, error) { + return r.ApiService.UpdateAMQExecute(r) } /* - * OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut Method for OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut - * Create queue + * UpdateAMQ Method for UpdateAMQ + * Modify a queue's properties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orgId The organization Id * @param envId The environment id * @param regionId The region id * @param queueId The id of a specific queue - * @return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest + * @return DefaultApiApiUpdateAMQRequest */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut(ctx _context.Context, orgId string, envId string, regionId string, queueId string) DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest { - return DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest{ +func (a *DefaultApiService) UpdateAMQ(ctx _context.Context, orgId string, envId string, regionId string, queueId string) DefaultApiApiUpdateAMQRequest { + return DefaultApiApiUpdateAMQRequest{ ApiService: a, ctx: ctx, orgId: orgId, @@ -545,9 +592,9 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe * Execute executes the request * @return Queue */ -func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutExecute(r DefaultApiApiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest) (Queue, *_nethttp.Response, error) { +func (a *DefaultApiService) UpdateAMQExecute(r DefaultApiApiUpdateAMQRequest) (Queue, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -555,7 +602,7 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe localVarReturnValue Queue ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateAMQ") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -611,6 +658,16 @@ func (a *DefaultApiService) OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDe body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 404 { + var v InlineResponse404 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/amq/docs/DefaultApi.md b/amq/docs/DefaultApi.md index aecddb2..e54e04c 100644 --- a/amq/docs/DefaultApi.md +++ b/amq/docs/DefaultApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://anypoint.mulesoft.com/mq/admin/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch) | **Patch** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | -[**OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut**](DefaultApi.md#OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | +[**CreateAMQ**](DefaultApi.md#CreateAMQ) | **Put** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | +[**DeleteAMQ**](DefaultApi.md#DeleteAMQ) | **Delete** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | +[**GetAMQ**](DefaultApi.md#GetAMQ) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | +[**GetAMQList**](DefaultApi.md#GetAMQList) | **Get** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations | +[**UpdateAMQ**](DefaultApi.md#UpdateAMQ) | **Patch** /organizations/{orgId}/environments/{envId}/regions/{regionId}/destinations/queues/{queueId} | -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet +## CreateAMQ -> []Queue OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet(ctx, orgId, envId, regionId).Execute() +> Queue CreateAMQ(ctx, orgId, envId, regionId, queueId).QueueBody(queueBody).Execute() @@ -35,17 +35,19 @@ import ( func main() { orgId := "orgId_example" // string | The organization Id envId := "envId_example" // string | The environment id - regionId := "regionId_example" // string | The region id for MQ + regionId := "regionId_example" // string | The region id + queueId := "queueId_example" // string | The id of a specific queue + queueBody := *openapiclient.NewQueueBody() // QueueBody | (optional) configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet(context.Background(), orgId, envId, regionId).Execute() + resp, r, err := api_client.DefaultApi.CreateAMQ(context.Background(), orgId, envId, regionId, queueId).QueueBody(queueBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateAMQ``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet`: []Queue - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGet`: %v\n", resp) + // response from `CreateAMQ`: Queue + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateAMQ`: %v\n", resp) } ``` @@ -57,11 +59,12 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **orgId** | **string** | The organization Id | **envId** | **string** | The environment id | -**regionId** | **string** | The region id for MQ | +**regionId** | **string** | The region id | +**queueId** | **string** | The id of a specific queue | ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsGetRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiCreateAMQRequest struct via the builder pattern Name | Type | Description | Notes @@ -70,9 +73,11 @@ Name | Type | Description | Notes + **queueBody** | [**QueueBody**](QueueBody.md) | | + ### Return type -[**[]Queue**](Queue.md) +[**Queue**](Queue.md) ### Authorization @@ -80,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -88,9 +93,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete +## DeleteAMQ -> OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete(ctx, orgId, envId, regionId, queueId).Execute() +> DeleteAMQ(ctx, orgId, envId, regionId, queueId).Execute() @@ -116,9 +121,9 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete(context.Background(), orgId, envId, regionId, queueId).Execute() + resp, r, err := api_client.DefaultApi.DeleteAMQ(context.Background(), orgId, envId, regionId, queueId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAMQ``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } @@ -137,7 +142,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdDeleteRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDeleteAMQRequest struct via the builder pattern Name | Type | Description | Notes @@ -165,9 +170,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet +## GetAMQ -> Queue OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet(ctx, orgId, envId, regionId, queueId).Execute() +> Queue GetAMQ(ctx, orgId, envId, regionId, queueId).Execute() @@ -193,13 +198,13 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet(context.Background(), orgId, envId, regionId, queueId).Execute() + resp, r, err := api_client.DefaultApi.GetAMQ(context.Background(), orgId, envId, regionId, queueId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAMQ``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet`: Queue - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGet`: %v\n", resp) + // response from `GetAMQ`: Queue + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAMQ`: %v\n", resp) } ``` @@ -216,7 +221,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdGetRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetAMQRequest struct via the builder pattern Name | Type | Description | Notes @@ -244,9 +249,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch +## GetAMQList -> Queue OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch(ctx, orgId, envId, regionId, queueId).QueueBody(queueBody).Execute() +> []Queue GetAMQList(ctx, orgId, envId, regionId).Inclusion(inclusion).DestinationType(destinationType).Offset(offset).Limit(limit).StartsWith(startsWith).DestinationIds(destinationIds).Execute() @@ -267,19 +272,23 @@ import ( func main() { orgId := "orgId_example" // string | The organization Id envId := "envId_example" // string | The environment id - regionId := "regionId_example" // string | The region id - queueId := "queueId_example" // string | The id of a specific queue - queueBody := *openapiclient.NewQueueBody() // QueueBody | (optional) + regionId := "regionId_example" // string | The region id for MQ + inclusion := "inclusion_example" // string | Defines what to fetch (optional) + destinationType := "destinationType_example" // string | Defines what to fetch (optional) + offset := int32(56) // int32 | Skip over a number of elements by specifying an offset value for the query. (optional) (default to 0) + limit := int32(56) // int32 | Limit the number of elements in the response. (optional) (default to 20) + startsWith := "startsWith_example" // string | Searchs the field from the left using the passed string. (optional) + destinationIds := []string{"Inner_example"} // []string | Includes only results with the given Ids. (optional) configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch(context.Background(), orgId, envId, regionId, queueId).QueueBody(queueBody).Execute() + resp, r, err := api_client.DefaultApi.GetAMQList(context.Background(), orgId, envId, regionId).Inclusion(inclusion).DestinationType(destinationType).Offset(offset).Limit(limit).StartsWith(startsWith).DestinationIds(destinationIds).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAMQList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch`: Queue - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatch`: %v\n", resp) + // response from `GetAMQList`: []Queue + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAMQList`: %v\n", resp) } ``` @@ -291,12 +300,11 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **orgId** | **string** | The organization Id | **envId** | **string** | The environment id | -**regionId** | **string** | The region id | -**queueId** | **string** | The id of a specific queue | +**regionId** | **string** | The region id for MQ | ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPatchRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetAMQListRequest struct via the builder pattern Name | Type | Description | Notes @@ -304,12 +312,16 @@ Name | Type | Description | Notes - - **queueBody** | [**QueueBody**](QueueBody.md) | | + **inclusion** | **string** | Defines what to fetch | + **destinationType** | **string** | Defines what to fetch | + **offset** | **int32** | Skip over a number of elements by specifying an offset value for the query. | [default to 0] + **limit** | **int32** | Limit the number of elements in the response. | [default to 20] + **startsWith** | **string** | Searchs the field from the left using the passed string. | + **destinationIds** | **[]string** | Includes only results with the given Ids. | ### Return type -[**Queue**](Queue.md) +[**[]Queue**](Queue.md) ### Authorization @@ -317,7 +329,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -325,9 +337,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut +## UpdateAMQ -> Queue OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut(ctx, orgId, envId, regionId, queueId).QueueBody(queueBody).Execute() +> Queue UpdateAMQ(ctx, orgId, envId, regionId, queueId).QueueBody(queueBody).Execute() @@ -354,13 +366,13 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut(context.Background(), orgId, envId, regionId, queueId).QueueBody(queueBody).Execute() + resp, r, err := api_client.DefaultApi.UpdateAMQ(context.Background(), orgId, envId, regionId, queueId).QueueBody(queueBody).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateAMQ``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut`: Queue - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.OrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPut`: %v\n", resp) + // response from `UpdateAMQ`: Queue + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateAMQ`: %v\n", resp) } ``` @@ -377,7 +389,7 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiOrganizationsOrgIdEnvironmentsEnvIdRegionsRegionIdDestinationsQueuesQueueIdPutRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiUpdateAMQRequest struct via the builder pattern Name | Type | Description | Notes diff --git a/amq/docs/Queue.md b/amq/docs/Queue.md index c6cce38..d8b6033 100644 --- a/amq/docs/Queue.md +++ b/amq/docs/Queue.md @@ -5,11 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **QueueId** | Pointer to **string** | | [optional] +**ExchangeId** | Pointer to **string** | | [optional] **DefaultTtl** | Pointer to **int32** | | [optional] **DefaultLockTtl** | Pointer to **int32** | | [optional] **Type** | Pointer to **string** | | [optional] **Encrypted** | Pointer to **bool** | | [optional] **DefaultDeliveryDelay** | Pointer to **int32** | | [optional] +**DeadLetterQueueId** | Pointer to **string** | | [optional] +**MaxDeliveries** | Pointer to **int32** | | [optional] **Fifo** | Pointer to **bool** | | [optional] ## Methods @@ -56,6 +59,31 @@ SetQueueId sets QueueId field to given value. HasQueueId returns a boolean if a field has been set. +### GetExchangeId + +`func (o *Queue) GetExchangeId() string` + +GetExchangeId returns the ExchangeId field if non-nil, zero value otherwise. + +### GetExchangeIdOk + +`func (o *Queue) GetExchangeIdOk() (*string, bool)` + +GetExchangeIdOk returns a tuple with the ExchangeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExchangeId + +`func (o *Queue) SetExchangeId(v string)` + +SetExchangeId sets ExchangeId field to given value. + +### HasExchangeId + +`func (o *Queue) HasExchangeId() bool` + +HasExchangeId returns a boolean if a field has been set. + ### GetDefaultTtl `func (o *Queue) GetDefaultTtl() int32` @@ -181,6 +209,56 @@ SetDefaultDeliveryDelay sets DefaultDeliveryDelay field to given value. HasDefaultDeliveryDelay returns a boolean if a field has been set. +### GetDeadLetterQueueId + +`func (o *Queue) GetDeadLetterQueueId() string` + +GetDeadLetterQueueId returns the DeadLetterQueueId field if non-nil, zero value otherwise. + +### GetDeadLetterQueueIdOk + +`func (o *Queue) GetDeadLetterQueueIdOk() (*string, bool)` + +GetDeadLetterQueueIdOk returns a tuple with the DeadLetterQueueId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeadLetterQueueId + +`func (o *Queue) SetDeadLetterQueueId(v string)` + +SetDeadLetterQueueId sets DeadLetterQueueId field to given value. + +### HasDeadLetterQueueId + +`func (o *Queue) HasDeadLetterQueueId() bool` + +HasDeadLetterQueueId returns a boolean if a field has been set. + +### GetMaxDeliveries + +`func (o *Queue) GetMaxDeliveries() int32` + +GetMaxDeliveries returns the MaxDeliveries field if non-nil, zero value otherwise. + +### GetMaxDeliveriesOk + +`func (o *Queue) GetMaxDeliveriesOk() (*int32, bool)` + +GetMaxDeliveriesOk returns a tuple with the MaxDeliveries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxDeliveries + +`func (o *Queue) SetMaxDeliveries(v int32)` + +SetMaxDeliveries sets MaxDeliveries field to given value. + +### HasMaxDeliveries + +`func (o *Queue) HasMaxDeliveries() bool` + +HasMaxDeliveries returns a boolean if a field has been set. + ### GetFifo `func (o *Queue) GetFifo() bool` diff --git a/amq/docs/QueueBody.md b/amq/docs/QueueBody.md index af5ec93..b7500d6 100644 --- a/amq/docs/QueueBody.md +++ b/amq/docs/QueueBody.md @@ -4,12 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DefaultTtl** | Pointer to **int32** | | [optional] -**DefaultLockTtl** | Pointer to **int32** | | [optional] -**Type** | Pointer to **string** | | [optional] -**Encrypted** | Pointer to **bool** | | [optional] -**DefaultDeliveryDelay** | Pointer to **int32** | | [optional] -**Fifo** | Pointer to **bool** | | [optional] +**DefaultTtl** | Pointer to **NullableInt32** | | [optional] +**DefaultLockTtl** | Pointer to **NullableInt32** | | [optional] +**Type** | Pointer to **NullableString** | | [optional] +**Encrypted** | Pointer to **NullableBool** | | [optional] +**DefaultDeliveryDelay** | Pointer to **NullableInt32** | | [optional] +**DeadLetterQueueId** | Pointer to **NullableString** | | [optional] +**MaxDeliveries** | Pointer to **NullableInt32** | | [optional] +**Fifo** | Pointer to **NullableBool** | | [optional] ## Methods @@ -55,6 +57,16 @@ SetDefaultTtl sets DefaultTtl field to given value. HasDefaultTtl returns a boolean if a field has been set. +### SetDefaultTtlNil + +`func (o *QueueBody) SetDefaultTtlNil(b bool)` + + SetDefaultTtlNil sets the value for DefaultTtl to be an explicit nil + +### UnsetDefaultTtl +`func (o *QueueBody) UnsetDefaultTtl()` + +UnsetDefaultTtl ensures that no value is present for DefaultTtl, not even an explicit nil ### GetDefaultLockTtl `func (o *QueueBody) GetDefaultLockTtl() int32` @@ -80,6 +92,16 @@ SetDefaultLockTtl sets DefaultLockTtl field to given value. HasDefaultLockTtl returns a boolean if a field has been set. +### SetDefaultLockTtlNil + +`func (o *QueueBody) SetDefaultLockTtlNil(b bool)` + + SetDefaultLockTtlNil sets the value for DefaultLockTtl to be an explicit nil + +### UnsetDefaultLockTtl +`func (o *QueueBody) UnsetDefaultLockTtl()` + +UnsetDefaultLockTtl ensures that no value is present for DefaultLockTtl, not even an explicit nil ### GetType `func (o *QueueBody) GetType() string` @@ -105,6 +127,16 @@ SetType sets Type field to given value. HasType returns a boolean if a field has been set. +### SetTypeNil + +`func (o *QueueBody) SetTypeNil(b bool)` + + SetTypeNil sets the value for Type to be an explicit nil + +### UnsetType +`func (o *QueueBody) UnsetType()` + +UnsetType ensures that no value is present for Type, not even an explicit nil ### GetEncrypted `func (o *QueueBody) GetEncrypted() bool` @@ -130,6 +162,16 @@ SetEncrypted sets Encrypted field to given value. HasEncrypted returns a boolean if a field has been set. +### SetEncryptedNil + +`func (o *QueueBody) SetEncryptedNil(b bool)` + + SetEncryptedNil sets the value for Encrypted to be an explicit nil + +### UnsetEncrypted +`func (o *QueueBody) UnsetEncrypted()` + +UnsetEncrypted ensures that no value is present for Encrypted, not even an explicit nil ### GetDefaultDeliveryDelay `func (o *QueueBody) GetDefaultDeliveryDelay() int32` @@ -155,6 +197,86 @@ SetDefaultDeliveryDelay sets DefaultDeliveryDelay field to given value. HasDefaultDeliveryDelay returns a boolean if a field has been set. +### SetDefaultDeliveryDelayNil + +`func (o *QueueBody) SetDefaultDeliveryDelayNil(b bool)` + + SetDefaultDeliveryDelayNil sets the value for DefaultDeliveryDelay to be an explicit nil + +### UnsetDefaultDeliveryDelay +`func (o *QueueBody) UnsetDefaultDeliveryDelay()` + +UnsetDefaultDeliveryDelay ensures that no value is present for DefaultDeliveryDelay, not even an explicit nil +### GetDeadLetterQueueId + +`func (o *QueueBody) GetDeadLetterQueueId() string` + +GetDeadLetterQueueId returns the DeadLetterQueueId field if non-nil, zero value otherwise. + +### GetDeadLetterQueueIdOk + +`func (o *QueueBody) GetDeadLetterQueueIdOk() (*string, bool)` + +GetDeadLetterQueueIdOk returns a tuple with the DeadLetterQueueId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeadLetterQueueId + +`func (o *QueueBody) SetDeadLetterQueueId(v string)` + +SetDeadLetterQueueId sets DeadLetterQueueId field to given value. + +### HasDeadLetterQueueId + +`func (o *QueueBody) HasDeadLetterQueueId() bool` + +HasDeadLetterQueueId returns a boolean if a field has been set. + +### SetDeadLetterQueueIdNil + +`func (o *QueueBody) SetDeadLetterQueueIdNil(b bool)` + + SetDeadLetterQueueIdNil sets the value for DeadLetterQueueId to be an explicit nil + +### UnsetDeadLetterQueueId +`func (o *QueueBody) UnsetDeadLetterQueueId()` + +UnsetDeadLetterQueueId ensures that no value is present for DeadLetterQueueId, not even an explicit nil +### GetMaxDeliveries + +`func (o *QueueBody) GetMaxDeliveries() int32` + +GetMaxDeliveries returns the MaxDeliveries field if non-nil, zero value otherwise. + +### GetMaxDeliveriesOk + +`func (o *QueueBody) GetMaxDeliveriesOk() (*int32, bool)` + +GetMaxDeliveriesOk returns a tuple with the MaxDeliveries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxDeliveries + +`func (o *QueueBody) SetMaxDeliveries(v int32)` + +SetMaxDeliveries sets MaxDeliveries field to given value. + +### HasMaxDeliveries + +`func (o *QueueBody) HasMaxDeliveries() bool` + +HasMaxDeliveries returns a boolean if a field has been set. + +### SetMaxDeliveriesNil + +`func (o *QueueBody) SetMaxDeliveriesNil(b bool)` + + SetMaxDeliveriesNil sets the value for MaxDeliveries to be an explicit nil + +### UnsetMaxDeliveries +`func (o *QueueBody) UnsetMaxDeliveries()` + +UnsetMaxDeliveries ensures that no value is present for MaxDeliveries, not even an explicit nil ### GetFifo `func (o *QueueBody) GetFifo() bool` @@ -180,6 +302,16 @@ SetFifo sets Fifo field to given value. HasFifo returns a boolean if a field has been set. +### SetFifoNil + +`func (o *QueueBody) SetFifoNil(b bool)` + + SetFifoNil sets the value for Fifo to be an explicit nil + +### UnsetFifo +`func (o *QueueBody) UnsetFifo()` + +UnsetFifo ensures that no value is present for Fifo, 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/amq/model_queue.go b/amq/model_queue.go index 0ec3843..f101446 100644 --- a/amq/model_queue.go +++ b/amq/model_queue.go @@ -17,11 +17,14 @@ import ( // Queue struct for Queue type Queue struct { QueueId *string `json:"queueId,omitempty"` + ExchangeId *string `json:"exchangeId,omitempty"` DefaultTtl *int32 `json:"defaultTtl,omitempty"` DefaultLockTtl *int32 `json:"defaultLockTtl,omitempty"` Type *string `json:"type,omitempty"` Encrypted *bool `json:"encrypted,omitempty"` DefaultDeliveryDelay *int32 `json:"defaultDeliveryDelay,omitempty"` + DeadLetterQueueId *string `json:"deadLetterQueueId,omitempty"` + MaxDeliveries *int32 `json:"maxDeliveries,omitempty"` Fifo *bool `json:"fifo,omitempty"` } @@ -74,6 +77,38 @@ func (o *Queue) SetQueueId(v string) { o.QueueId = &v } +// GetExchangeId returns the ExchangeId field value if set, zero value otherwise. +func (o *Queue) GetExchangeId() string { + if o == nil || o.ExchangeId == nil { + var ret string + return ret + } + return *o.ExchangeId +} + +// GetExchangeIdOk returns a tuple with the ExchangeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Queue) GetExchangeIdOk() (*string, bool) { + if o == nil || o.ExchangeId == nil { + return nil, false + } + return o.ExchangeId, true +} + +// HasExchangeId returns a boolean if a field has been set. +func (o *Queue) HasExchangeId() bool { + if o != nil && o.ExchangeId != nil { + return true + } + + return false +} + +// SetExchangeId gets a reference to the given string and assigns it to the ExchangeId field. +func (o *Queue) SetExchangeId(v string) { + o.ExchangeId = &v +} + // GetDefaultTtl returns the DefaultTtl field value if set, zero value otherwise. func (o *Queue) GetDefaultTtl() int32 { if o == nil || o.DefaultTtl == nil { @@ -234,6 +269,70 @@ func (o *Queue) SetDefaultDeliveryDelay(v int32) { o.DefaultDeliveryDelay = &v } +// GetDeadLetterQueueId returns the DeadLetterQueueId field value if set, zero value otherwise. +func (o *Queue) GetDeadLetterQueueId() string { + if o == nil || o.DeadLetterQueueId == nil { + var ret string + return ret + } + return *o.DeadLetterQueueId +} + +// GetDeadLetterQueueIdOk returns a tuple with the DeadLetterQueueId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Queue) GetDeadLetterQueueIdOk() (*string, bool) { + if o == nil || o.DeadLetterQueueId == nil { + return nil, false + } + return o.DeadLetterQueueId, true +} + +// HasDeadLetterQueueId returns a boolean if a field has been set. +func (o *Queue) HasDeadLetterQueueId() bool { + if o != nil && o.DeadLetterQueueId != nil { + return true + } + + return false +} + +// SetDeadLetterQueueId gets a reference to the given string and assigns it to the DeadLetterQueueId field. +func (o *Queue) SetDeadLetterQueueId(v string) { + o.DeadLetterQueueId = &v +} + +// GetMaxDeliveries returns the MaxDeliveries field value if set, zero value otherwise. +func (o *Queue) GetMaxDeliveries() int32 { + if o == nil || o.MaxDeliveries == nil { + var ret int32 + return ret + } + return *o.MaxDeliveries +} + +// GetMaxDeliveriesOk returns a tuple with the MaxDeliveries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Queue) GetMaxDeliveriesOk() (*int32, bool) { + if o == nil || o.MaxDeliveries == nil { + return nil, false + } + return o.MaxDeliveries, true +} + +// HasMaxDeliveries returns a boolean if a field has been set. +func (o *Queue) HasMaxDeliveries() bool { + if o != nil && o.MaxDeliveries != nil { + return true + } + + return false +} + +// SetMaxDeliveries gets a reference to the given int32 and assigns it to the MaxDeliveries field. +func (o *Queue) SetMaxDeliveries(v int32) { + o.MaxDeliveries = &v +} + // GetFifo returns the Fifo field value if set, zero value otherwise. func (o *Queue) GetFifo() bool { if o == nil || o.Fifo == nil { @@ -271,6 +370,9 @@ func (o Queue) MarshalJSON() ([]byte, error) { if o.QueueId != nil { toSerialize["queueId"] = o.QueueId } + if o.ExchangeId != nil { + toSerialize["exchangeId"] = o.ExchangeId + } if o.DefaultTtl != nil { toSerialize["defaultTtl"] = o.DefaultTtl } @@ -286,6 +388,12 @@ func (o Queue) MarshalJSON() ([]byte, error) { if o.DefaultDeliveryDelay != nil { toSerialize["defaultDeliveryDelay"] = o.DefaultDeliveryDelay } + if o.DeadLetterQueueId != nil { + toSerialize["deadLetterQueueId"] = o.DeadLetterQueueId + } + if o.MaxDeliveries != nil { + toSerialize["maxDeliveries"] = o.MaxDeliveries + } if o.Fifo != nil { toSerialize["fifo"] = o.Fifo } diff --git a/amq/model_queue_body.go b/amq/model_queue_body.go index a39313b..03703af 100644 --- a/amq/model_queue_body.go +++ b/amq/model_queue_body.go @@ -16,12 +16,14 @@ import ( // QueueBody struct for QueueBody type QueueBody struct { - DefaultTtl *int32 `json:"defaultTtl,omitempty"` - DefaultLockTtl *int32 `json:"defaultLockTtl,omitempty"` - Type *string `json:"type,omitempty"` - Encrypted *bool `json:"encrypted,omitempty"` - DefaultDeliveryDelay *int32 `json:"defaultDeliveryDelay,omitempty"` - Fifo *bool `json:"fifo,omitempty"` + DefaultTtl NullableInt32 `json:"defaultTtl,omitempty"` + DefaultLockTtl NullableInt32 `json:"defaultLockTtl,omitempty"` + Type NullableString `json:"type,omitempty"` + Encrypted NullableBool `json:"encrypted,omitempty"` + DefaultDeliveryDelay NullableInt32 `json:"defaultDeliveryDelay,omitempty"` + DeadLetterQueueId NullableString `json:"deadLetterQueueId,omitempty"` + MaxDeliveries NullableInt32 `json:"maxDeliveries,omitempty"` + Fifo NullableBool `json:"fifo,omitempty"` } // NewQueueBody instantiates a new QueueBody object @@ -41,217 +43,367 @@ func NewQueueBodyWithDefaults() *QueueBody { return &this } -// GetDefaultTtl returns the DefaultTtl field value if set, zero value otherwise. +// GetDefaultTtl returns the DefaultTtl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *QueueBody) GetDefaultTtl() int32 { - if o == nil || o.DefaultTtl == nil { + if o == nil || o.DefaultTtl.Get() == nil { var ret int32 return ret } - return *o.DefaultTtl + return *o.DefaultTtl.Get() } // GetDefaultTtlOk returns a tuple with the DefaultTtl field value if set, nil otherwise // 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 *QueueBody) GetDefaultTtlOk() (*int32, bool) { - if o == nil || o.DefaultTtl == nil { + if o == nil { return nil, false } - return o.DefaultTtl, true + return o.DefaultTtl.Get(), o.DefaultTtl.IsSet() } // HasDefaultTtl returns a boolean if a field has been set. func (o *QueueBody) HasDefaultTtl() bool { - if o != nil && o.DefaultTtl != nil { + if o != nil && o.DefaultTtl.IsSet() { return true } return false } -// SetDefaultTtl gets a reference to the given int32 and assigns it to the DefaultTtl field. +// SetDefaultTtl gets a reference to the given NullableInt32 and assigns it to the DefaultTtl field. func (o *QueueBody) SetDefaultTtl(v int32) { - o.DefaultTtl = &v + o.DefaultTtl.Set(&v) +} +// SetDefaultTtlNil sets the value for DefaultTtl to be an explicit nil +func (o *QueueBody) SetDefaultTtlNil() { + o.DefaultTtl.Set(nil) +} + +// UnsetDefaultTtl ensures that no value is present for DefaultTtl, not even an explicit nil +func (o *QueueBody) UnsetDefaultTtl() { + o.DefaultTtl.Unset() } -// GetDefaultLockTtl returns the DefaultLockTtl field value if set, zero value otherwise. +// GetDefaultLockTtl returns the DefaultLockTtl field value if set, zero value otherwise (both if not set or set to explicit null). func (o *QueueBody) GetDefaultLockTtl() int32 { - if o == nil || o.DefaultLockTtl == nil { + if o == nil || o.DefaultLockTtl.Get() == nil { var ret int32 return ret } - return *o.DefaultLockTtl + return *o.DefaultLockTtl.Get() } // GetDefaultLockTtlOk returns a tuple with the DefaultLockTtl field value if set, nil otherwise // 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 *QueueBody) GetDefaultLockTtlOk() (*int32, bool) { - if o == nil || o.DefaultLockTtl == nil { + if o == nil { return nil, false } - return o.DefaultLockTtl, true + return o.DefaultLockTtl.Get(), o.DefaultLockTtl.IsSet() } // HasDefaultLockTtl returns a boolean if a field has been set. func (o *QueueBody) HasDefaultLockTtl() bool { - if o != nil && o.DefaultLockTtl != nil { + if o != nil && o.DefaultLockTtl.IsSet() { return true } return false } -// SetDefaultLockTtl gets a reference to the given int32 and assigns it to the DefaultLockTtl field. +// SetDefaultLockTtl gets a reference to the given NullableInt32 and assigns it to the DefaultLockTtl field. func (o *QueueBody) SetDefaultLockTtl(v int32) { - o.DefaultLockTtl = &v + o.DefaultLockTtl.Set(&v) +} +// SetDefaultLockTtlNil sets the value for DefaultLockTtl to be an explicit nil +func (o *QueueBody) SetDefaultLockTtlNil() { + o.DefaultLockTtl.Set(nil) } -// GetType returns the Type field value if set, zero value otherwise. +// UnsetDefaultLockTtl ensures that no value is present for DefaultLockTtl, not even an explicit nil +func (o *QueueBody) UnsetDefaultLockTtl() { + o.DefaultLockTtl.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). func (o *QueueBody) GetType() string { - if o == nil || o.Type == nil { + if o == nil || o.Type.Get() == nil { var ret string return ret } - return *o.Type + return *o.Type.Get() } // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // 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 *QueueBody) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { + if o == nil { return nil, false } - return o.Type, true + return o.Type.Get(), o.Type.IsSet() } // HasType returns a boolean if a field has been set. func (o *QueueBody) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && o.Type.IsSet() { return true } return false } -// SetType gets a reference to the given string and assigns it to the Type field. +// SetType gets a reference to the given NullableString and assigns it to the Type field. func (o *QueueBody) SetType(v string) { - o.Type = &v + o.Type.Set(&v) +} +// SetTypeNil sets the value for Type to be an explicit nil +func (o *QueueBody) SetTypeNil() { + o.Type.Set(nil) +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *QueueBody) UnsetType() { + o.Type.Unset() } -// GetEncrypted returns the Encrypted field value if set, zero value otherwise. +// GetEncrypted returns the Encrypted field value if set, zero value otherwise (both if not set or set to explicit null). func (o *QueueBody) GetEncrypted() bool { - if o == nil || o.Encrypted == nil { + if o == nil || o.Encrypted.Get() == nil { var ret bool return ret } - return *o.Encrypted + return *o.Encrypted.Get() } // GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise // 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 *QueueBody) GetEncryptedOk() (*bool, bool) { - if o == nil || o.Encrypted == nil { + if o == nil { return nil, false } - return o.Encrypted, true + return o.Encrypted.Get(), o.Encrypted.IsSet() } // HasEncrypted returns a boolean if a field has been set. func (o *QueueBody) HasEncrypted() bool { - if o != nil && o.Encrypted != nil { + if o != nil && o.Encrypted.IsSet() { return true } return false } -// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field. +// SetEncrypted gets a reference to the given NullableBool and assigns it to the Encrypted field. func (o *QueueBody) SetEncrypted(v bool) { - o.Encrypted = &v + o.Encrypted.Set(&v) +} +// SetEncryptedNil sets the value for Encrypted to be an explicit nil +func (o *QueueBody) SetEncryptedNil() { + o.Encrypted.Set(nil) +} + +// UnsetEncrypted ensures that no value is present for Encrypted, not even an explicit nil +func (o *QueueBody) UnsetEncrypted() { + o.Encrypted.Unset() } -// GetDefaultDeliveryDelay returns the DefaultDeliveryDelay field value if set, zero value otherwise. +// GetDefaultDeliveryDelay returns the DefaultDeliveryDelay field value if set, zero value otherwise (both if not set or set to explicit null). func (o *QueueBody) GetDefaultDeliveryDelay() int32 { - if o == nil || o.DefaultDeliveryDelay == nil { + if o == nil || o.DefaultDeliveryDelay.Get() == nil { var ret int32 return ret } - return *o.DefaultDeliveryDelay + return *o.DefaultDeliveryDelay.Get() } // GetDefaultDeliveryDelayOk returns a tuple with the DefaultDeliveryDelay field value if set, nil otherwise // 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 *QueueBody) GetDefaultDeliveryDelayOk() (*int32, bool) { - if o == nil || o.DefaultDeliveryDelay == nil { + if o == nil { return nil, false } - return o.DefaultDeliveryDelay, true + return o.DefaultDeliveryDelay.Get(), o.DefaultDeliveryDelay.IsSet() } // HasDefaultDeliveryDelay returns a boolean if a field has been set. func (o *QueueBody) HasDefaultDeliveryDelay() bool { - if o != nil && o.DefaultDeliveryDelay != nil { + if o != nil && o.DefaultDeliveryDelay.IsSet() { return true } return false } -// SetDefaultDeliveryDelay gets a reference to the given int32 and assigns it to the DefaultDeliveryDelay field. +// SetDefaultDeliveryDelay gets a reference to the given NullableInt32 and assigns it to the DefaultDeliveryDelay field. func (o *QueueBody) SetDefaultDeliveryDelay(v int32) { - o.DefaultDeliveryDelay = &v + o.DefaultDeliveryDelay.Set(&v) +} +// SetDefaultDeliveryDelayNil sets the value for DefaultDeliveryDelay to be an explicit nil +func (o *QueueBody) SetDefaultDeliveryDelayNil() { + o.DefaultDeliveryDelay.Set(nil) +} + +// UnsetDefaultDeliveryDelay ensures that no value is present for DefaultDeliveryDelay, not even an explicit nil +func (o *QueueBody) UnsetDefaultDeliveryDelay() { + o.DefaultDeliveryDelay.Unset() +} + +// GetDeadLetterQueueId returns the DeadLetterQueueId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueBody) GetDeadLetterQueueId() string { + if o == nil || o.DeadLetterQueueId.Get() == nil { + var ret string + return ret + } + return *o.DeadLetterQueueId.Get() +} + +// GetDeadLetterQueueIdOk returns a tuple with the DeadLetterQueueId field value if set, nil otherwise +// 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 *QueueBody) GetDeadLetterQueueIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DeadLetterQueueId.Get(), o.DeadLetterQueueId.IsSet() +} + +// HasDeadLetterQueueId returns a boolean if a field has been set. +func (o *QueueBody) HasDeadLetterQueueId() bool { + if o != nil && o.DeadLetterQueueId.IsSet() { + return true + } + + return false } -// GetFifo returns the Fifo field value if set, zero value otherwise. +// SetDeadLetterQueueId gets a reference to the given NullableString and assigns it to the DeadLetterQueueId field. +func (o *QueueBody) SetDeadLetterQueueId(v string) { + o.DeadLetterQueueId.Set(&v) +} +// SetDeadLetterQueueIdNil sets the value for DeadLetterQueueId to be an explicit nil +func (o *QueueBody) SetDeadLetterQueueIdNil() { + o.DeadLetterQueueId.Set(nil) +} + +// UnsetDeadLetterQueueId ensures that no value is present for DeadLetterQueueId, not even an explicit nil +func (o *QueueBody) UnsetDeadLetterQueueId() { + o.DeadLetterQueueId.Unset() +} + +// GetMaxDeliveries returns the MaxDeliveries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *QueueBody) GetMaxDeliveries() int32 { + if o == nil || o.MaxDeliveries.Get() == nil { + var ret int32 + return ret + } + return *o.MaxDeliveries.Get() +} + +// GetMaxDeliveriesOk returns a tuple with the MaxDeliveries field value if set, nil otherwise +// 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 *QueueBody) GetMaxDeliveriesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.MaxDeliveries.Get(), o.MaxDeliveries.IsSet() +} + +// HasMaxDeliveries returns a boolean if a field has been set. +func (o *QueueBody) HasMaxDeliveries() bool { + if o != nil && o.MaxDeliveries.IsSet() { + return true + } + + return false +} + +// SetMaxDeliveries gets a reference to the given NullableInt32 and assigns it to the MaxDeliveries field. +func (o *QueueBody) SetMaxDeliveries(v int32) { + o.MaxDeliveries.Set(&v) +} +// SetMaxDeliveriesNil sets the value for MaxDeliveries to be an explicit nil +func (o *QueueBody) SetMaxDeliveriesNil() { + o.MaxDeliveries.Set(nil) +} + +// UnsetMaxDeliveries ensures that no value is present for MaxDeliveries, not even an explicit nil +func (o *QueueBody) UnsetMaxDeliveries() { + o.MaxDeliveries.Unset() +} + +// GetFifo returns the Fifo field value if set, zero value otherwise (both if not set or set to explicit null). func (o *QueueBody) GetFifo() bool { - if o == nil || o.Fifo == nil { + if o == nil || o.Fifo.Get() == nil { var ret bool return ret } - return *o.Fifo + return *o.Fifo.Get() } // GetFifoOk returns a tuple with the Fifo field value if set, nil otherwise // 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 *QueueBody) GetFifoOk() (*bool, bool) { - if o == nil || o.Fifo == nil { + if o == nil { return nil, false } - return o.Fifo, true + return o.Fifo.Get(), o.Fifo.IsSet() } // HasFifo returns a boolean if a field has been set. func (o *QueueBody) HasFifo() bool { - if o != nil && o.Fifo != nil { + if o != nil && o.Fifo.IsSet() { return true } return false } -// SetFifo gets a reference to the given bool and assigns it to the Fifo field. +// SetFifo gets a reference to the given NullableBool and assigns it to the Fifo field. func (o *QueueBody) SetFifo(v bool) { - o.Fifo = &v + o.Fifo.Set(&v) +} +// SetFifoNil sets the value for Fifo to be an explicit nil +func (o *QueueBody) SetFifoNil() { + o.Fifo.Set(nil) +} + +// UnsetFifo ensures that no value is present for Fifo, not even an explicit nil +func (o *QueueBody) UnsetFifo() { + o.Fifo.Unset() } func (o QueueBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.DefaultTtl != nil { - toSerialize["defaultTtl"] = o.DefaultTtl + if o.DefaultTtl.IsSet() { + toSerialize["defaultTtl"] = o.DefaultTtl.Get() + } + if o.DefaultLockTtl.IsSet() { + toSerialize["defaultLockTtl"] = o.DefaultLockTtl.Get() + } + if o.Type.IsSet() { + toSerialize["type"] = o.Type.Get() } - if o.DefaultLockTtl != nil { - toSerialize["defaultLockTtl"] = o.DefaultLockTtl + if o.Encrypted.IsSet() { + toSerialize["encrypted"] = o.Encrypted.Get() } - if o.Type != nil { - toSerialize["type"] = o.Type + if o.DefaultDeliveryDelay.IsSet() { + toSerialize["defaultDeliveryDelay"] = o.DefaultDeliveryDelay.Get() } - if o.Encrypted != nil { - toSerialize["encrypted"] = o.Encrypted + if o.DeadLetterQueueId.IsSet() { + toSerialize["deadLetterQueueId"] = o.DeadLetterQueueId.Get() } - if o.DefaultDeliveryDelay != nil { - toSerialize["defaultDeliveryDelay"] = o.DefaultDeliveryDelay + if o.MaxDeliveries.IsSet() { + toSerialize["maxDeliveries"] = o.MaxDeliveries.Get() } - if o.Fifo != nil { - toSerialize["fifo"] = o.Fifo + if o.Fifo.IsSet() { + toSerialize["fifo"] = o.Fifo.Get() } return json.Marshal(toSerialize) }