diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c3fcdc8e..7167b3d5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## Release (2025-xx-xx) +- `observability`: [v0.15.0](services/observability/CHANGELOG.md#v0150) + - **Deprecation:** The `JaegerHttpTracesUrl` field is now deprecated in all relevant models and will be removed after 9th April 2026. Use the new `JaegerHttpUrl` field instead. +- `cdn`: [v1.6.0](services/cdn/CHANGELOG.md#v160) + - **Feature:** Add models: `DistributionWaf`, `WafConfig`, `WAFConfigPatch`, `WAFMode`, `WAFRule`, `WAFRuleCollection`, `WAFRuleGroup` and `WAFStatusRuleBlock` + - **Feature:** Add `Waf` attribute to `Config` and `Distribution` + - **Feature:** Add `WafStatus` to `DistributionRequest` and `ListWafCollections` + ## Release (2025-09-30) - `authorization`: [v0.9.0](services/authorization/CHANGELOG.md#v090) - **Feature:** Add support for assignable subjects diff --git a/services/cdn/CHANGELOG.md b/services/cdn/CHANGELOG.md index c362a4b32..e35fd3bd5 100644 --- a/services/cdn/CHANGELOG.md +++ b/services/cdn/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.6.0 +- **Feature:** Add models: `DistributionWaf`, `WafConfig`, `WAFConfigPatch`, `WAFMode`, `WAFRule`, `WAFRuleCollection`, `WAFRuleGroup` and `WAFStatusRuleBlock` +- **Feature:** Add `Waf` attribute to `Config` and `Distribution` +- **Feature:** Add `WafStatus` to `DistributionRequest` and `ListWafCollections` + ## v1.5.0 - **Feature:** Added Attribute `LogSink` to `ConfigPatch` - **Feature:** Added Attribute `Geofencing` to `DistributionPayload` diff --git a/services/cdn/VERSION b/services/cdn/VERSION index 76864c1c2..05f629f1b 100644 --- a/services/cdn/VERSION +++ b/services/cdn/VERSION @@ -1 +1 @@ -v1.5.0 \ No newline at end of file +v1.6.0 \ No newline at end of file diff --git a/services/cdn/api_default.go b/services/cdn/api_default.go index 995063910..803f9289a 100644 --- a/services/cdn/api_default.go +++ b/services/cdn/api_default.go @@ -277,6 +277,24 @@ type DefaultApi interface { */ ListDistributionsExecute(ctx context.Context, projectId string) (*ListDistributionsResponse, error) + /* + ListWAFCollections List all WAF rule collections of the project + Returns all WAF rule collections available to the project + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID + @return ApiListWAFCollectionsRequest + */ + ListWAFCollections(ctx context.Context, projectId string) ApiListWAFCollectionsRequest + /* + ListWAFCollectionsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID + @return ListWAFCollectionsResponse + + */ + ListWAFCollectionsExecute(ctx context.Context, projectId string) (*ListWAFCollectionsResponse, error) /* PatchDistribution Update existing distribution Modify a CDN distribution with a partial update. Only the fields specified in the request will be modified. @@ -376,6 +394,8 @@ type ApiGetCustomDomainRequest interface { } type ApiGetDistributionRequest interface { + // If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. + WithWafStatus(withWafStatus bool) ApiGetDistributionRequest Execute() (*GetDistributionResponse, error) } @@ -421,6 +441,8 @@ type ApiGetStatisticsRequest interface { type ApiListDistributionsRequest interface { // Quantifies how many distributions should be returned on this page. Must be a natural number between 1 and 100 (inclusive) PageSize(pageSize int32) ApiListDistributionsRequest + // If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. + WithWafStatus(withWafStatus bool) ApiListDistributionsRequest // Identifier is returned by the previous response and is used to request the next page. As the `pageIdentifier` encodes an element, inserts during pagination will *not* shift the result. So a scenario like: - Start listing first page - Insert new element - Start listing second page will *never* result in an element from the first page to get \"pushed\" to the second page, like it could occur with basic limit + offset pagination. The identifier should be treated as an opaque string and never modified. Only pass values returned by the API. PageIdentifier(pageIdentifier string) ApiListDistributionsRequest // The following sort options exist. We default to `createdAt` - `id` - Sort by distribution ID using String comparison - `updatedAt` - Sort by when the distribution configuration was last modified, for example by changing the regions or response headers - `createdAt` - Sort by when the distribution was initially created. - `originUrl` - Sort by originURL using String comparison - `status` - Sort by distribution status, using String comparison - `originUrlRelated` - The origin URL is segmented and reversed before sorting. E.g. `www.example.com` is converted to `com.example.www` for sorting. This way, distributions pointing to the same domain trees are grouped next to each other. @@ -429,6 +451,10 @@ type ApiListDistributionsRequest interface { Execute() (*ListDistributionsResponse, error) } +type ApiListWAFCollectionsRequest interface { + Execute() (*ListWAFCollectionsResponse, error) +} + type ApiPatchDistributionRequest interface { PatchDistributionPayload(patchDistributionPayload PatchDistributionPayload) ApiPatchDistributionRequest Execute() (*PatchDistributionResponse, error) @@ -1555,6 +1581,14 @@ type GetDistributionRequest struct { apiService *DefaultApiService projectId string distributionId string + withWafStatus *bool +} + +// If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. + +func (r GetDistributionRequest) WithWafStatus(withWafStatus bool) ApiGetDistributionRequest { + r.withWafStatus = &withWafStatus + return r } func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { @@ -1582,6 +1616,9 @@ func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.withWafStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "withWafStatus", r.withWafStatus, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2405,6 +2442,7 @@ type ListDistributionsRequest struct { apiService *DefaultApiService projectId string pageSize *int32 + withWafStatus *bool pageIdentifier *string sortBy *string sortOrder *string @@ -2417,6 +2455,13 @@ func (r ListDistributionsRequest) PageSize(pageSize int32) ApiListDistributionsR return r } +// If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. + +func (r ListDistributionsRequest) WithWafStatus(withWafStatus bool) ApiListDistributionsRequest { + r.withWafStatus = &withWafStatus + return r +} + // Identifier is returned by the previous response and is used to request the next page. As the `pageIdentifier` encodes an element, inserts during pagination will *not* shift the result. So a scenario like: - Start listing first page - Insert new element - Start listing second page will *never* result in an element from the first page to get \"pushed\" to the second page, like it could occur with basic limit + offset pagination. The identifier should be treated as an opaque string and never modified. Only pass values returned by the API. func (r ListDistributionsRequest) PageIdentifier(pageIdentifier string) ApiListDistributionsRequest { @@ -2463,6 +2508,9 @@ func (r ListDistributionsRequest) Execute() (*ListDistributionsResponse, error) if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") } + if r.withWafStatus != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "withWafStatus", r.withWafStatus, "") + } if r.pageIdentifier != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "pageIdentifier", r.pageIdentifier, "") } @@ -2605,6 +2653,168 @@ func (a *APIClient) ListDistributionsExecute(ctx context.Context, projectId stri return r.Execute() } +type ListWAFCollectionsRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string +} + +func (r ListWAFCollectionsRequest) Execute() (*ListWAFCollectionsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListWAFCollectionsResponse + ) + a := r.apiService + client, ok := a.client.(*APIClient) + if !ok { + return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") + } + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListWAFCollections") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/waf/collections" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.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{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v GenericJSONResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericJSONResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + var v GenericJSONResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +ListWAFCollections: List all WAF rule collections of the project + +Returns all WAF rule collections available to the project + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID + @return ApiListWAFCollectionsRequest +*/ +func (a *APIClient) ListWAFCollections(ctx context.Context, projectId string) ApiListWAFCollectionsRequest { + return ListWAFCollectionsRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + } +} + +func (a *APIClient) ListWAFCollectionsExecute(ctx context.Context, projectId string) (*ListWAFCollectionsResponse, error) { + r := ListWAFCollectionsRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + } + return r.Execute() +} + type PatchDistributionRequest struct { ctx context.Context apiService *DefaultApiService diff --git a/services/cdn/api_default_test.go b/services/cdn/api_default_test.go index 4872a1784..32f1be735 100644 --- a/services/cdn/api_default_test.go +++ b/services/cdn/api_default_test.go @@ -634,6 +634,58 @@ func Test_cdn_DefaultApiService(t *testing.T) { } }) + t.Run("Test DefaultApiService ListWAFCollections", func(t *testing.T) { + _apiUrlPath := "/v1beta/projects/{projectId}/waf/collections" + projectIdValue := "projectId-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListWAFCollectionsResponse{} + w.Header().Add("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) + }) + testServer := httptest.NewServer(testDefaultApiServeMux) + defer testServer.Close() + + configuration := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Region: "test_region", + Servers: config.ServerConfigurations{ + { + URL: testServer.URL, + Description: "Localhost for cdn_DefaultApi", + Variables: map[string]config.ServerVariable{ + "region": { + DefaultValue: "test_region.", + EnumValues: []string{ + "test_region.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) + if err != nil { + t.Fatalf("creating API client: %v", err) + } + + projectId := projectIdValue + + resp, reqErr := apiClient.ListWAFCollections(context.Background(), projectId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + t.Run("Test DefaultApiService PatchDistribution", func(t *testing.T) { _apiUrlPath := "/v1beta/projects/{projectId}/distributions/{distributionId}" projectIdValue := "projectId-value" diff --git a/services/cdn/model_config.go b/services/cdn/model_config.go index c004ce712..fa661d310 100644 --- a/services/cdn/model_config.go +++ b/services/cdn/model_config.go @@ -182,6 +182,26 @@ func setConfigGetRegionsAttributeType(arg *ConfigGetRegionsAttributeType, val Co *arg = &val } +/* + types and functions for waf +*/ + +// isModel +type ConfigGetWafAttributeType = *WafConfig +type ConfigGetWafArgType = WafConfig +type ConfigGetWafRetType = WafConfig + +func getConfigGetWafAttributeTypeOk(arg ConfigGetWafAttributeType) (ret ConfigGetWafRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setConfigGetWafAttributeType(arg *ConfigGetWafAttributeType, val ConfigGetWafRetType) { + *arg = &val +} + // Config struct for Config type Config struct { // REQUIRED @@ -200,6 +220,8 @@ type Config struct { Optimizer ConfigGetOptimizerAttributeType `json:"optimizer,omitempty"` // REQUIRED Regions ConfigGetRegionsAttributeType `json:"regions" required:"true"` + // REQUIRED + Waf ConfigGetWafAttributeType `json:"waf" required:"true"` } type _Config Config @@ -208,12 +230,13 @@ type _Config Config // 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 NewConfig(backend ConfigGetBackendArgType, blockedCountries ConfigGetBlockedCountriesArgType, blockedIPs ConfigGetBlockedIPsArgType, regions ConfigGetRegionsArgType) *Config { +func NewConfig(backend ConfigGetBackendArgType, blockedCountries ConfigGetBlockedCountriesArgType, blockedIPs ConfigGetBlockedIPsArgType, regions ConfigGetRegionsArgType, waf ConfigGetWafArgType) *Config { this := Config{} setConfigGetBackendAttributeType(&this.Backend, backend) setConfigGetBlockedCountriesAttributeType(&this.BlockedCountries, blockedCountries) setConfigGetBlockedIPsAttributeType(&this.BlockedIPs, blockedIPs) setConfigGetRegionsAttributeType(&this.Regions, regions) + setConfigGetWafAttributeType(&this.Waf, waf) return &this } @@ -407,6 +430,23 @@ func (o *Config) SetRegions(v ConfigGetRegionsRetType) { setConfigGetRegionsAttributeType(&o.Regions, v) } +// GetWaf returns the Waf field value +func (o *Config) GetWaf() (ret ConfigGetWafRetType) { + ret, _ = o.GetWafOk() + return ret +} + +// GetWafOk returns a tuple with the Waf field value +// and a boolean to check if the value has been set. +func (o *Config) GetWafOk() (ret ConfigGetWafRetType, ok bool) { + return getConfigGetWafAttributeTypeOk(o.Waf) +} + +// SetWaf sets field value +func (o *Config) SetWaf(v ConfigGetWafRetType) { + setConfigGetWafAttributeType(&o.Waf, v) +} + func (o Config) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getConfigGetBackendAttributeTypeOk(o.Backend); ok { @@ -433,6 +473,9 @@ func (o Config) ToMap() (map[string]interface{}, error) { if val, ok := getConfigGetRegionsAttributeTypeOk(o.Regions); ok { toSerialize["Regions"] = val } + if val, ok := getConfigGetWafAttributeTypeOk(o.Waf); ok { + toSerialize["Waf"] = val + } return toSerialize, nil } diff --git a/services/cdn/model_config_patch.go b/services/cdn/model_config_patch.go index 27689ab14..b2d9d9f21 100644 --- a/services/cdn/model_config_patch.go +++ b/services/cdn/model_config_patch.go @@ -182,6 +182,26 @@ func setConfigPatchGetRegionsAttributeType(arg *ConfigPatchGetRegionsAttributeTy *arg = &val } +/* + types and functions for waf +*/ + +// isModel +type ConfigPatchGetWafAttributeType = *WafConfigPatch +type ConfigPatchGetWafArgType = WafConfigPatch +type ConfigPatchGetWafRetType = WafConfigPatch + +func getConfigPatchGetWafAttributeTypeOk(arg ConfigPatchGetWafAttributeType) (ret ConfigPatchGetWafRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setConfigPatchGetWafAttributeType(arg *ConfigPatchGetWafAttributeType, val ConfigPatchGetWafRetType) { + *arg = &val +} + // ConfigPatch struct for ConfigPatch type ConfigPatch struct { Backend ConfigPatchGetBackendAttributeType `json:"backend,omitempty"` @@ -196,6 +216,7 @@ type ConfigPatch struct { MonthlyLimitBytes ConfigPatchGetMonthlyLimitBytesAttributeType `json:"monthlyLimitBytes,omitempty"` Optimizer ConfigPatchGetOptimizerAttributeType `json:"optimizer,omitempty"` Regions ConfigPatchGetRegionsAttributeType `json:"regions,omitempty"` + Waf ConfigPatchGetWafAttributeType `json:"waf,omitempty"` } // NewConfigPatch instantiates a new ConfigPatch object @@ -432,6 +453,29 @@ func (o *ConfigPatch) SetRegions(v ConfigPatchGetRegionsRetType) { setConfigPatchGetRegionsAttributeType(&o.Regions, v) } +// GetWaf returns the Waf field value if set, zero value otherwise. +func (o *ConfigPatch) GetWaf() (res ConfigPatchGetWafRetType) { + res, _ = o.GetWafOk() + return +} + +// GetWafOk returns a tuple with the Waf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPatch) GetWafOk() (ret ConfigPatchGetWafRetType, ok bool) { + return getConfigPatchGetWafAttributeTypeOk(o.Waf) +} + +// HasWaf returns a boolean if a field has been set. +func (o *ConfigPatch) HasWaf() bool { + _, ok := o.GetWafOk() + return ok +} + +// SetWaf gets a reference to the given WafConfigPatch and assigns it to the Waf field. +func (o *ConfigPatch) SetWaf(v ConfigPatchGetWafRetType) { + setConfigPatchGetWafAttributeType(&o.Waf, v) +} + func (o ConfigPatch) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getConfigPatchGetBackendAttributeTypeOk(o.Backend); ok { @@ -458,6 +502,9 @@ func (o ConfigPatch) ToMap() (map[string]interface{}, error) { if val, ok := getConfigPatchGetRegionsAttributeTypeOk(o.Regions); ok { toSerialize["Regions"] = val } + if val, ok := getConfigPatchGetWafAttributeTypeOk(o.Waf); ok { + toSerialize["Waf"] = val + } return toSerialize, nil } diff --git a/services/cdn/model_create_distribution_payload.go b/services/cdn/model_create_distribution_payload.go index 143a84304..816ea8dd6 100644 --- a/services/cdn/model_create_distribution_payload.go +++ b/services/cdn/model_create_distribution_payload.go @@ -240,6 +240,26 @@ func setCreateDistributionPayloadGetRegionsAttributeType(arg *CreateDistribution *arg = &val } +/* + types and functions for waf +*/ + +// isModel +type CreateDistributionPayloadGetWafAttributeType = *WafConfig +type CreateDistributionPayloadGetWafArgType = WafConfig +type CreateDistributionPayloadGetWafRetType = WafConfig + +func getCreateDistributionPayloadGetWafAttributeTypeOk(arg CreateDistributionPayloadGetWafAttributeType) (ret CreateDistributionPayloadGetWafRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateDistributionPayloadGetWafAttributeType(arg *CreateDistributionPayloadGetWafAttributeType, val CreateDistributionPayloadGetWafRetType) { + *arg = &val +} + // CreateDistributionPayload struct for CreateDistributionPayload type CreateDistributionPayload struct { // Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. @@ -264,6 +284,7 @@ type CreateDistributionPayload struct { // Define in which regions you would like your content to be cached. // REQUIRED Regions CreateDistributionPayloadGetRegionsAttributeType `json:"regions" required:"true"` + Waf CreateDistributionPayloadGetWafAttributeType `json:"waf,omitempty"` } type _CreateDistributionPayload CreateDistributionPayload @@ -528,6 +549,29 @@ func (o *CreateDistributionPayload) SetRegions(v CreateDistributionPayloadGetReg setCreateDistributionPayloadGetRegionsAttributeType(&o.Regions, v) } +// GetWaf returns the Waf field value if set, zero value otherwise. +func (o *CreateDistributionPayload) GetWaf() (res CreateDistributionPayloadGetWafRetType) { + res, _ = o.GetWafOk() + return +} + +// GetWafOk returns a tuple with the Waf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDistributionPayload) GetWafOk() (ret CreateDistributionPayloadGetWafRetType, ok bool) { + return getCreateDistributionPayloadGetWafAttributeTypeOk(o.Waf) +} + +// HasWaf returns a boolean if a field has been set. +func (o *CreateDistributionPayload) HasWaf() bool { + _, ok := o.GetWafOk() + return ok +} + +// SetWaf gets a reference to the given WafConfig and assigns it to the Waf field. +func (o *CreateDistributionPayload) SetWaf(v CreateDistributionPayloadGetWafRetType) { + setCreateDistributionPayloadGetWafAttributeType(&o.Waf, v) +} + func (o CreateDistributionPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateDistributionPayloadGetBlockedCountriesAttributeTypeOk(o.BlockedCountries); ok { @@ -563,6 +607,9 @@ func (o CreateDistributionPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateDistributionPayloadGetRegionsAttributeTypeOk(o.Regions); ok { toSerialize["Regions"] = val } + if val, ok := getCreateDistributionPayloadGetWafAttributeTypeOk(o.Waf); ok { + toSerialize["Waf"] = val + } return toSerialize, nil } diff --git a/services/cdn/model_distribution.go b/services/cdn/model_distribution.go index fb950838d..f2cfc9a6e 100644 --- a/services/cdn/model_distribution.go +++ b/services/cdn/model_distribution.go @@ -291,6 +291,26 @@ func setDistributionGetUpdatedAtAttributeType(arg *DistributionGetUpdatedAtAttri *arg = &val } +/* + types and functions for waf +*/ + +// isModel +type DistributionGetWafAttributeType = *DistributionWaf +type DistributionGetWafArgType = DistributionWaf +type DistributionGetWafRetType = DistributionWaf + +func getDistributionGetWafAttributeTypeOk(arg DistributionGetWafAttributeType) (ret DistributionGetWafRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDistributionGetWafAttributeType(arg *DistributionGetWafAttributeType, val DistributionGetWafRetType) { + *arg = &val +} + // Distribution struct for Distribution type Distribution struct { // REQUIRED @@ -312,6 +332,7 @@ type Distribution struct { // RFC3339 string which returns the last time the distribution configuration was modified. // REQUIRED UpdatedAt DistributionGetUpdatedAtAttributeType `json:"updatedAt" required:"true"` + Waf DistributionGetWafAttributeType `json:"waf,omitempty"` } type _Distribution Distribution @@ -482,6 +503,29 @@ func (o *Distribution) SetUpdatedAt(v DistributionGetUpdatedAtRetType) { setDistributionGetUpdatedAtAttributeType(&o.UpdatedAt, v) } +// GetWaf returns the Waf field value if set, zero value otherwise. +func (o *Distribution) GetWaf() (res DistributionGetWafRetType) { + res, _ = o.GetWafOk() + return +} + +// GetWafOk returns a tuple with the Waf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Distribution) GetWafOk() (ret DistributionGetWafRetType, ok bool) { + return getDistributionGetWafAttributeTypeOk(o.Waf) +} + +// HasWaf returns a boolean if a field has been set. +func (o *Distribution) HasWaf() bool { + _, ok := o.GetWafOk() + return ok +} + +// SetWaf gets a reference to the given DistributionWaf and assigns it to the Waf field. +func (o *Distribution) SetWaf(v DistributionGetWafRetType) { + setDistributionGetWafAttributeType(&o.Waf, v) +} + func (o Distribution) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getDistributionGetConfigAttributeTypeOk(o.Config); ok { @@ -508,6 +552,9 @@ func (o Distribution) ToMap() (map[string]interface{}, error) { if val, ok := getDistributionGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { toSerialize["UpdatedAt"] = val } + if val, ok := getDistributionGetWafAttributeTypeOk(o.Waf); ok { + toSerialize["Waf"] = val + } return toSerialize, nil } diff --git a/services/cdn/model_distribution_waf.go b/services/cdn/model_distribution_waf.go new file mode 100644 index 000000000..4d7c5fbd9 --- /dev/null +++ b/services/cdn/model_distribution_waf.go @@ -0,0 +1,211 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the DistributionWaf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DistributionWaf{} + +/* + types and functions for disabledRules +*/ + +// isArray +type DistributionWafGetDisabledRulesAttributeType = *[]WAFStatusRuleBlock +type DistributionWafGetDisabledRulesArgType = []WAFStatusRuleBlock +type DistributionWafGetDisabledRulesRetType = []WAFStatusRuleBlock + +func getDistributionWafGetDisabledRulesAttributeTypeOk(arg DistributionWafGetDisabledRulesAttributeType) (ret DistributionWafGetDisabledRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDistributionWafGetDisabledRulesAttributeType(arg *DistributionWafGetDisabledRulesAttributeType, val DistributionWafGetDisabledRulesRetType) { + *arg = &val +} + +/* + types and functions for enabledRules +*/ + +// isArray +type DistributionWafGetEnabledRulesAttributeType = *[]WAFStatusRuleBlock +type DistributionWafGetEnabledRulesArgType = []WAFStatusRuleBlock +type DistributionWafGetEnabledRulesRetType = []WAFStatusRuleBlock + +func getDistributionWafGetEnabledRulesAttributeTypeOk(arg DistributionWafGetEnabledRulesAttributeType) (ret DistributionWafGetEnabledRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDistributionWafGetEnabledRulesAttributeType(arg *DistributionWafGetEnabledRulesAttributeType, val DistributionWafGetEnabledRulesRetType) { + *arg = &val +} + +/* + types and functions for logOnlyRules +*/ + +// isArray +type DistributionWafGetLogOnlyRulesAttributeType = *[]WAFStatusRuleBlock +type DistributionWafGetLogOnlyRulesArgType = []WAFStatusRuleBlock +type DistributionWafGetLogOnlyRulesRetType = []WAFStatusRuleBlock + +func getDistributionWafGetLogOnlyRulesAttributeTypeOk(arg DistributionWafGetLogOnlyRulesAttributeType) (ret DistributionWafGetLogOnlyRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDistributionWafGetLogOnlyRulesAttributeType(arg *DistributionWafGetLogOnlyRulesAttributeType, val DistributionWafGetLogOnlyRulesRetType) { + *arg = &val +} + +// DistributionWaf For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** +type DistributionWaf struct { + // REQUIRED + DisabledRules DistributionWafGetDisabledRulesAttributeType `json:"disabledRules" required:"true"` + // REQUIRED + EnabledRules DistributionWafGetEnabledRulesAttributeType `json:"enabledRules" required:"true"` + // REQUIRED + LogOnlyRules DistributionWafGetLogOnlyRulesAttributeType `json:"logOnlyRules" required:"true"` +} + +type _DistributionWaf DistributionWaf + +// NewDistributionWaf instantiates a new DistributionWaf 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 NewDistributionWaf(disabledRules DistributionWafGetDisabledRulesArgType, enabledRules DistributionWafGetEnabledRulesArgType, logOnlyRules DistributionWafGetLogOnlyRulesArgType) *DistributionWaf { + this := DistributionWaf{} + setDistributionWafGetDisabledRulesAttributeType(&this.DisabledRules, disabledRules) + setDistributionWafGetEnabledRulesAttributeType(&this.EnabledRules, enabledRules) + setDistributionWafGetLogOnlyRulesAttributeType(&this.LogOnlyRules, logOnlyRules) + return &this +} + +// NewDistributionWafWithDefaults instantiates a new DistributionWaf 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 NewDistributionWafWithDefaults() *DistributionWaf { + this := DistributionWaf{} + return &this +} + +// GetDisabledRules returns the DisabledRules field value +func (o *DistributionWaf) GetDisabledRules() (ret DistributionWafGetDisabledRulesRetType) { + ret, _ = o.GetDisabledRulesOk() + return ret +} + +// GetDisabledRulesOk returns a tuple with the DisabledRules field value +// and a boolean to check if the value has been set. +func (o *DistributionWaf) GetDisabledRulesOk() (ret DistributionWafGetDisabledRulesRetType, ok bool) { + return getDistributionWafGetDisabledRulesAttributeTypeOk(o.DisabledRules) +} + +// SetDisabledRules sets field value +func (o *DistributionWaf) SetDisabledRules(v DistributionWafGetDisabledRulesRetType) { + setDistributionWafGetDisabledRulesAttributeType(&o.DisabledRules, v) +} + +// GetEnabledRules returns the EnabledRules field value +func (o *DistributionWaf) GetEnabledRules() (ret DistributionWafGetEnabledRulesRetType) { + ret, _ = o.GetEnabledRulesOk() + return ret +} + +// GetEnabledRulesOk returns a tuple with the EnabledRules field value +// and a boolean to check if the value has been set. +func (o *DistributionWaf) GetEnabledRulesOk() (ret DistributionWafGetEnabledRulesRetType, ok bool) { + return getDistributionWafGetEnabledRulesAttributeTypeOk(o.EnabledRules) +} + +// SetEnabledRules sets field value +func (o *DistributionWaf) SetEnabledRules(v DistributionWafGetEnabledRulesRetType) { + setDistributionWafGetEnabledRulesAttributeType(&o.EnabledRules, v) +} + +// GetLogOnlyRules returns the LogOnlyRules field value +func (o *DistributionWaf) GetLogOnlyRules() (ret DistributionWafGetLogOnlyRulesRetType) { + ret, _ = o.GetLogOnlyRulesOk() + return ret +} + +// GetLogOnlyRulesOk returns a tuple with the LogOnlyRules field value +// and a boolean to check if the value has been set. +func (o *DistributionWaf) GetLogOnlyRulesOk() (ret DistributionWafGetLogOnlyRulesRetType, ok bool) { + return getDistributionWafGetLogOnlyRulesAttributeTypeOk(o.LogOnlyRules) +} + +// SetLogOnlyRules sets field value +func (o *DistributionWaf) SetLogOnlyRules(v DistributionWafGetLogOnlyRulesRetType) { + setDistributionWafGetLogOnlyRulesAttributeType(&o.LogOnlyRules, v) +} + +func (o DistributionWaf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getDistributionWafGetDisabledRulesAttributeTypeOk(o.DisabledRules); ok { + toSerialize["DisabledRules"] = val + } + if val, ok := getDistributionWafGetEnabledRulesAttributeTypeOk(o.EnabledRules); ok { + toSerialize["EnabledRules"] = val + } + if val, ok := getDistributionWafGetLogOnlyRulesAttributeTypeOk(o.LogOnlyRules); ok { + toSerialize["LogOnlyRules"] = val + } + return toSerialize, nil +} + +type NullableDistributionWaf struct { + value *DistributionWaf + isSet bool +} + +func (v NullableDistributionWaf) Get() *DistributionWaf { + return v.value +} + +func (v *NullableDistributionWaf) Set(val *DistributionWaf) { + v.value = val + v.isSet = true +} + +func (v NullableDistributionWaf) IsSet() bool { + return v.isSet +} + +func (v *NullableDistributionWaf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDistributionWaf(val *DistributionWaf) *NullableDistributionWaf { + return &NullableDistributionWaf{value: val, isSet: true} +} + +func (v NullableDistributionWaf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDistributionWaf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_distribution_waf_test.go b/services/cdn/model_distribution_waf_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_distribution_waf_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_list_waf_collections_response.go b/services/cdn/model_list_waf_collections_response.go new file mode 100644 index 000000000..686af1099 --- /dev/null +++ b/services/cdn/model_list_waf_collections_response.go @@ -0,0 +1,125 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the ListWAFCollectionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListWAFCollectionsResponse{} + +/* + types and functions for collections +*/ + +// isArray +type ListWAFCollectionsResponseGetCollectionsAttributeType = *[]WAFRuleCollection +type ListWAFCollectionsResponseGetCollectionsArgType = []WAFRuleCollection +type ListWAFCollectionsResponseGetCollectionsRetType = []WAFRuleCollection + +func getListWAFCollectionsResponseGetCollectionsAttributeTypeOk(arg ListWAFCollectionsResponseGetCollectionsAttributeType) (ret ListWAFCollectionsResponseGetCollectionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListWAFCollectionsResponseGetCollectionsAttributeType(arg *ListWAFCollectionsResponseGetCollectionsAttributeType, val ListWAFCollectionsResponseGetCollectionsRetType) { + *arg = &val +} + +// ListWAFCollectionsResponse struct for ListWAFCollectionsResponse +type ListWAFCollectionsResponse struct { + // REQUIRED + Collections ListWAFCollectionsResponseGetCollectionsAttributeType `json:"collections" required:"true"` +} + +type _ListWAFCollectionsResponse ListWAFCollectionsResponse + +// NewListWAFCollectionsResponse instantiates a new ListWAFCollectionsResponse 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 NewListWAFCollectionsResponse(collections ListWAFCollectionsResponseGetCollectionsArgType) *ListWAFCollectionsResponse { + this := ListWAFCollectionsResponse{} + setListWAFCollectionsResponseGetCollectionsAttributeType(&this.Collections, collections) + return &this +} + +// NewListWAFCollectionsResponseWithDefaults instantiates a new ListWAFCollectionsResponse 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 NewListWAFCollectionsResponseWithDefaults() *ListWAFCollectionsResponse { + this := ListWAFCollectionsResponse{} + return &this +} + +// GetCollections returns the Collections field value +func (o *ListWAFCollectionsResponse) GetCollections() (ret ListWAFCollectionsResponseGetCollectionsRetType) { + ret, _ = o.GetCollectionsOk() + return ret +} + +// GetCollectionsOk returns a tuple with the Collections field value +// and a boolean to check if the value has been set. +func (o *ListWAFCollectionsResponse) GetCollectionsOk() (ret ListWAFCollectionsResponseGetCollectionsRetType, ok bool) { + return getListWAFCollectionsResponseGetCollectionsAttributeTypeOk(o.Collections) +} + +// SetCollections sets field value +func (o *ListWAFCollectionsResponse) SetCollections(v ListWAFCollectionsResponseGetCollectionsRetType) { + setListWAFCollectionsResponseGetCollectionsAttributeType(&o.Collections, v) +} + +func (o ListWAFCollectionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListWAFCollectionsResponseGetCollectionsAttributeTypeOk(o.Collections); ok { + toSerialize["Collections"] = val + } + return toSerialize, nil +} + +type NullableListWAFCollectionsResponse struct { + value *ListWAFCollectionsResponse + isSet bool +} + +func (v NullableListWAFCollectionsResponse) Get() *ListWAFCollectionsResponse { + return v.value +} + +func (v *NullableListWAFCollectionsResponse) Set(val *ListWAFCollectionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListWAFCollectionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListWAFCollectionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListWAFCollectionsResponse(val *ListWAFCollectionsResponse) *NullableListWAFCollectionsResponse { + return &NullableListWAFCollectionsResponse{value: val, isSet: true} +} + +func (v NullableListWAFCollectionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListWAFCollectionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_list_waf_collections_response_test.go b/services/cdn/model_list_waf_collections_response_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_list_waf_collections_response_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_config.go b/services/cdn/model_waf_config.go new file mode 100644 index 000000000..e772a1dae --- /dev/null +++ b/services/cdn/model_waf_config.go @@ -0,0 +1,212 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WafConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafConfig{} + +/* + types and functions for enabledRuleIds +*/ + +// isArray +type WafConfigGetEnabledRuleIdsAttributeType = *[]string +type WafConfigGetEnabledRuleIdsArgType = []string +type WafConfigGetEnabledRuleIdsRetType = []string + +func getWafConfigGetEnabledRuleIdsAttributeTypeOk(arg WafConfigGetEnabledRuleIdsAttributeType) (ret WafConfigGetEnabledRuleIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetEnabledRuleIdsAttributeType(arg *WafConfigGetEnabledRuleIdsAttributeType, val WafConfigGetEnabledRuleIdsRetType) { + *arg = &val +} + +/* + types and functions for mode +*/ + +// isEnumRef +type WafConfigGetModeAttributeType = *WafMode +type WafConfigGetModeArgType = WafMode +type WafConfigGetModeRetType = WafMode + +func getWafConfigGetModeAttributeTypeOk(arg WafConfigGetModeAttributeType) (ret WafConfigGetModeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetModeAttributeType(arg *WafConfigGetModeAttributeType, val WafConfigGetModeRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type WafConfigGetTypeAttributeType = *WafType +type WafConfigGetTypeArgType = WafType +type WafConfigGetTypeRetType = WafType + +func getWafConfigGetTypeAttributeTypeOk(arg WafConfigGetTypeAttributeType) (ret WafConfigGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetTypeAttributeType(arg *WafConfigGetTypeAttributeType, val WafConfigGetTypeRetType) { + *arg = &val +} + +// WafConfig Configuration of the WAF of a distribution +type WafConfig struct { + // IDs of the WAF rules that are **explicitly** enabled for this distribution. If this rule is in a disabled / log Only RuleGroup or Collection, it will be enabled regardless as `enabledRuleIds` overrides those in specificity. Do note that rules can also be enabled because a Rulegroup or Collection is enabled. **DO NOT** use this property to find all active rules. Instead, pass `?withWafStatus=true` as a query parameter to `GetDistribution` or `ListDistributions`. This will expose the `waf` Property on distribution Level. From there you can `$.waf.enabledRules.map(e => e.id)` to get a list of all enabled rules. + // REQUIRED + EnabledRuleIds WafConfigGetEnabledRuleIdsAttributeType `json:"enabledRuleIds" required:"true"` + // REQUIRED + Mode WafConfigGetModeAttributeType `json:"mode" required:"true"` + // REQUIRED + Type WafConfigGetTypeAttributeType `json:"type" required:"true"` +} + +type _WafConfig WafConfig + +// NewWafConfig instantiates a new WafConfig 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 NewWafConfig(enabledRuleIds WafConfigGetEnabledRuleIdsArgType, mode WafConfigGetModeArgType, types WafConfigGetTypeArgType) *WafConfig { + this := WafConfig{} + setWafConfigGetEnabledRuleIdsAttributeType(&this.EnabledRuleIds, enabledRuleIds) + setWafConfigGetModeAttributeType(&this.Mode, mode) + setWafConfigGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewWafConfigWithDefaults instantiates a new WafConfig 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 NewWafConfigWithDefaults() *WafConfig { + this := WafConfig{} + return &this +} + +// GetEnabledRuleIds returns the EnabledRuleIds field value +func (o *WafConfig) GetEnabledRuleIds() (ret WafConfigGetEnabledRuleIdsRetType) { + ret, _ = o.GetEnabledRuleIdsOk() + return ret +} + +// GetEnabledRuleIdsOk returns a tuple with the EnabledRuleIds field value +// and a boolean to check if the value has been set. +func (o *WafConfig) GetEnabledRuleIdsOk() (ret WafConfigGetEnabledRuleIdsRetType, ok bool) { + return getWafConfigGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds) +} + +// SetEnabledRuleIds sets field value +func (o *WafConfig) SetEnabledRuleIds(v WafConfigGetEnabledRuleIdsRetType) { + setWafConfigGetEnabledRuleIdsAttributeType(&o.EnabledRuleIds, v) +} + +// GetMode returns the Mode field value +func (o *WafConfig) GetMode() (ret WafConfigGetModeRetType) { + ret, _ = o.GetModeOk() + return ret +} + +// GetModeOk returns a tuple with the Mode field value +// and a boolean to check if the value has been set. +func (o *WafConfig) GetModeOk() (ret WafConfigGetModeRetType, ok bool) { + return getWafConfigGetModeAttributeTypeOk(o.Mode) +} + +// SetMode sets field value +func (o *WafConfig) SetMode(v WafConfigGetModeRetType) { + setWafConfigGetModeAttributeType(&o.Mode, v) +} + +// GetType returns the Type field value +func (o *WafConfig) GetType() (ret WafConfigGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WafConfig) GetTypeOk() (ret WafConfigGetTypeRetType, ok bool) { + return getWafConfigGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *WafConfig) SetType(v WafConfigGetTypeRetType) { + setWafConfigGetTypeAttributeType(&o.Type, v) +} + +func (o WafConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWafConfigGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds); ok { + toSerialize["EnabledRuleIds"] = val + } + if val, ok := getWafConfigGetModeAttributeTypeOk(o.Mode); ok { + toSerialize["Mode"] = val + } + if val, ok := getWafConfigGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableWafConfig struct { + value *WafConfig + isSet bool +} + +func (v NullableWafConfig) Get() *WafConfig { + return v.value +} + +func (v *NullableWafConfig) Set(val *WafConfig) { + v.value = val + v.isSet = true +} + +func (v NullableWafConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableWafConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafConfig(val *WafConfig) *NullableWafConfig { + return &NullableWafConfig{value: val, isSet: true} +} + +func (v NullableWafConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_config_patch.go b/services/cdn/model_waf_config_patch.go new file mode 100644 index 000000000..850dda32b --- /dev/null +++ b/services/cdn/model_waf_config_patch.go @@ -0,0 +1,174 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WafConfigPatch type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafConfigPatch{} + +/* + types and functions for mode +*/ + +// isEnumRef +type WafConfigPatchGetModeAttributeType = *WafMode +type WafConfigPatchGetModeArgType = WafMode +type WafConfigPatchGetModeRetType = WafMode + +func getWafConfigPatchGetModeAttributeTypeOk(arg WafConfigPatchGetModeAttributeType) (ret WafConfigPatchGetModeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetModeAttributeType(arg *WafConfigPatchGetModeAttributeType, val WafConfigPatchGetModeRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type WafConfigPatchGetTypeAttributeType = *WafType +type WafConfigPatchGetTypeArgType = WafType +type WafConfigPatchGetTypeRetType = WafType + +func getWafConfigPatchGetTypeAttributeTypeOk(arg WafConfigPatchGetTypeAttributeType) (ret WafConfigPatchGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetTypeAttributeType(arg *WafConfigPatchGetTypeAttributeType, val WafConfigPatchGetTypeRetType) { + *arg = &val +} + +// WafConfigPatch struct for WafConfigPatch +type WafConfigPatch struct { + Mode WafConfigPatchGetModeAttributeType `json:"mode,omitempty"` + Type WafConfigPatchGetTypeAttributeType `json:"type,omitempty"` +} + +// NewWafConfigPatch instantiates a new WafConfigPatch 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 NewWafConfigPatch() *WafConfigPatch { + this := WafConfigPatch{} + return &this +} + +// NewWafConfigPatchWithDefaults instantiates a new WafConfigPatch 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 NewWafConfigPatchWithDefaults() *WafConfigPatch { + this := WafConfigPatch{} + return &this +} + +// GetMode returns the Mode field value if set, zero value otherwise. +func (o *WafConfigPatch) GetMode() (res WafConfigPatchGetModeRetType) { + res, _ = o.GetModeOk() + return +} + +// GetModeOk returns a tuple with the Mode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetModeOk() (ret WafConfigPatchGetModeRetType, ok bool) { + return getWafConfigPatchGetModeAttributeTypeOk(o.Mode) +} + +// HasMode returns a boolean if a field has been set. +func (o *WafConfigPatch) HasMode() bool { + _, ok := o.GetModeOk() + return ok +} + +// SetMode gets a reference to the given WafMode and assigns it to the Mode field. +func (o *WafConfigPatch) SetMode(v WafConfigPatchGetModeRetType) { + setWafConfigPatchGetModeAttributeType(&o.Mode, v) +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *WafConfigPatch) GetType() (res WafConfigPatchGetTypeRetType) { + res, _ = o.GetTypeOk() + return +} + +// 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 *WafConfigPatch) GetTypeOk() (ret WafConfigPatchGetTypeRetType, ok bool) { + return getWafConfigPatchGetTypeAttributeTypeOk(o.Type) +} + +// HasType returns a boolean if a field has been set. +func (o *WafConfigPatch) HasType() bool { + _, ok := o.GetTypeOk() + return ok +} + +// SetType gets a reference to the given WafType and assigns it to the Type field. +func (o *WafConfigPatch) SetType(v WafConfigPatchGetTypeRetType) { + setWafConfigPatchGetTypeAttributeType(&o.Type, v) +} + +func (o WafConfigPatch) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWafConfigPatchGetModeAttributeTypeOk(o.Mode); ok { + toSerialize["Mode"] = val + } + if val, ok := getWafConfigPatchGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableWafConfigPatch struct { + value *WafConfigPatch + isSet bool +} + +func (v NullableWafConfigPatch) Get() *WafConfigPatch { + return v.value +} + +func (v *NullableWafConfigPatch) Set(val *WafConfigPatch) { + v.value = val + v.isSet = true +} + +func (v NullableWafConfigPatch) IsSet() bool { + return v.isSet +} + +func (v *NullableWafConfigPatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafConfigPatch(val *WafConfigPatch) *NullableWafConfigPatch { + return &NullableWafConfigPatch{value: val, isSet: true} +} + +func (v NullableWafConfigPatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafConfigPatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_config_patch_test.go b/services/cdn/model_waf_config_patch_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_waf_config_patch_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_config_test.go b/services/cdn/model_waf_config_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_waf_config_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_mode.go b/services/cdn/model_waf_mode.go new file mode 100644 index 000000000..30776fdf3 --- /dev/null +++ b/services/cdn/model_waf_mode.go @@ -0,0 +1,117 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" + "fmt" +) + +// WafMode the model 'WafMode' +type WafMode string + +// List of WafMode +const ( + WAFMODE_DISABLED WafMode = "DISABLED" + WAFMODE_ENABLED WafMode = "ENABLED" + WAFMODE_LOG_ONLY WafMode = "LOG_ONLY" +) + +// All allowed values of WafMode enum +var AllowedWafModeEnumValues = []WafMode{ + "DISABLED", + "ENABLED", + "LOG_ONLY", +} + +func (v *WafMode) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := WafMode(value) + for _, existing := range AllowedWafModeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid WafMode", value) +} + +// NewWafModeFromValue returns a pointer to a valid WafMode +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewWafModeFromValue(v string) (*WafMode, error) { + ev := WafMode(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for WafMode: valid values are %v", v, AllowedWafModeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v WafMode) IsValid() bool { + for _, existing := range AllowedWafModeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WafMode value +func (v WafMode) Ptr() *WafMode { + return &v +} + +type NullableWafMode struct { + value *WafMode + isSet bool +} + +func (v NullableWafMode) Get() *WafMode { + return v.value +} + +func (v *NullableWafMode) Set(val *WafMode) { + v.value = val + v.isSet = true +} + +func (v NullableWafMode) IsSet() bool { + return v.isSet +} + +func (v *NullableWafMode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafMode(val *WafMode) *NullableWafMode { + return &NullableWafMode{value: val, isSet: true} +} + +func (v NullableWafMode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafMode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_mode_test.go b/services/cdn/model_waf_mode_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_waf_mode_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_rule.go b/services/cdn/model_waf_rule.go new file mode 100644 index 000000000..3a873b618 --- /dev/null +++ b/services/cdn/model_waf_rule.go @@ -0,0 +1,219 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WAFRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFRule{} + +/* + types and functions for code +*/ + +// isNotNullableString +type WAFRuleGetCodeAttributeType = *string + +func getWAFRuleGetCodeAttributeTypeOk(arg WAFRuleGetCodeAttributeType) (ret WAFRuleGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleGetCodeAttributeType(arg *WAFRuleGetCodeAttributeType, val WAFRuleGetCodeRetType) { + *arg = &val +} + +type WAFRuleGetCodeArgType = string +type WAFRuleGetCodeRetType = string + +/* + types and functions for description +*/ + +// isContainer +type WAFRuleGetDescriptionAttributeType = *map[string]string +type WAFRuleGetDescriptionArgType = map[string]string +type WAFRuleGetDescriptionRetType = map[string]string + +func getWAFRuleGetDescriptionAttributeTypeOk(arg WAFRuleGetDescriptionAttributeType) (ret WAFRuleGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleGetDescriptionAttributeType(arg *WAFRuleGetDescriptionAttributeType, val WAFRuleGetDescriptionRetType) { + *arg = &val +} + +/* + types and functions for id +*/ + +// isNotNullableString +type WAFRuleGetIdAttributeType = *string + +func getWAFRuleGetIdAttributeTypeOk(arg WAFRuleGetIdAttributeType) (ret WAFRuleGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleGetIdAttributeType(arg *WAFRuleGetIdAttributeType, val WAFRuleGetIdRetType) { + *arg = &val +} + +type WAFRuleGetIdArgType = string +type WAFRuleGetIdRetType = string + +// WAFRule struct for WAFRule +type WAFRule struct { + // Optional CoreRuleSet rule ID in case this is a CRS rule + Code WAFRuleGetCodeAttributeType `json:"code,omitempty"` + // LocalizedString is a map from language to string value + // REQUIRED + Description WAFRuleGetDescriptionAttributeType `json:"description" required:"true"` + // REQUIRED + Id WAFRuleGetIdAttributeType `json:"id" required:"true"` +} + +type _WAFRule WAFRule + +// NewWAFRule instantiates a new WAFRule 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 NewWAFRule(description WAFRuleGetDescriptionArgType, id WAFRuleGetIdArgType) *WAFRule { + this := WAFRule{} + setWAFRuleGetDescriptionAttributeType(&this.Description, description) + setWAFRuleGetIdAttributeType(&this.Id, id) + return &this +} + +// NewWAFRuleWithDefaults instantiates a new WAFRule 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 NewWAFRuleWithDefaults() *WAFRule { + this := WAFRule{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *WAFRule) GetCode() (res WAFRuleGetCodeRetType) { + res, _ = o.GetCodeOk() + return +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRule) GetCodeOk() (ret WAFRuleGetCodeRetType, ok bool) { + return getWAFRuleGetCodeAttributeTypeOk(o.Code) +} + +// HasCode returns a boolean if a field has been set. +func (o *WAFRule) HasCode() bool { + _, ok := o.GetCodeOk() + return ok +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *WAFRule) SetCode(v WAFRuleGetCodeRetType) { + setWAFRuleGetCodeAttributeType(&o.Code, v) +} + +// GetDescription returns the Description field value +func (o *WAFRule) GetDescription() (ret WAFRuleGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *WAFRule) GetDescriptionOk() (ret WAFRuleGetDescriptionRetType, ok bool) { + return getWAFRuleGetDescriptionAttributeTypeOk(o.Description) +} + +// SetDescription sets field value +func (o *WAFRule) SetDescription(v WAFRuleGetDescriptionRetType) { + setWAFRuleGetDescriptionAttributeType(&o.Description, v) +} + +// GetId returns the Id field value +func (o *WAFRule) GetId() (ret WAFRuleGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WAFRule) GetIdOk() (ret WAFRuleGetIdRetType, ok bool) { + return getWAFRuleGetIdAttributeTypeOk(o.Id) +} + +// SetId sets field value +func (o *WAFRule) SetId(v WAFRuleGetIdRetType) { + setWAFRuleGetIdAttributeType(&o.Id, v) +} + +func (o WAFRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWAFRuleGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } + if val, ok := getWAFRuleGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getWAFRuleGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + return toSerialize, nil +} + +type NullableWAFRule struct { + value *WAFRule + isSet bool +} + +func (v NullableWAFRule) Get() *WAFRule { + return v.value +} + +func (v *NullableWAFRule) Set(val *WAFRule) { + v.value = val + v.isSet = true +} + +func (v NullableWAFRule) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFRule(val *WAFRule) *NullableWAFRule { + return &NullableWAFRule{value: val, isSet: true} +} + +func (v NullableWAFRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_rule_collection.go b/services/cdn/model_waf_rule_collection.go new file mode 100644 index 000000000..f97cbd1ef --- /dev/null +++ b/services/cdn/model_waf_rule_collection.go @@ -0,0 +1,213 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WAFRuleCollection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFRuleCollection{} + +/* + types and functions for groups +*/ + +// isArray +type WAFRuleCollectionGetGroupsAttributeType = *[]WAFRuleGroup +type WAFRuleCollectionGetGroupsArgType = []WAFRuleGroup +type WAFRuleCollectionGetGroupsRetType = []WAFRuleGroup + +func getWAFRuleCollectionGetGroupsAttributeTypeOk(arg WAFRuleCollectionGetGroupsAttributeType) (ret WAFRuleCollectionGetGroupsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleCollectionGetGroupsAttributeType(arg *WAFRuleCollectionGetGroupsAttributeType, val WAFRuleCollectionGetGroupsRetType) { + *arg = &val +} + +/* + types and functions for id +*/ + +// isNotNullableString +type WAFRuleCollectionGetIdAttributeType = *string + +func getWAFRuleCollectionGetIdAttributeTypeOk(arg WAFRuleCollectionGetIdAttributeType) (ret WAFRuleCollectionGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleCollectionGetIdAttributeType(arg *WAFRuleCollectionGetIdAttributeType, val WAFRuleCollectionGetIdRetType) { + *arg = &val +} + +type WAFRuleCollectionGetIdArgType = string +type WAFRuleCollectionGetIdRetType = string + +/* + types and functions for name +*/ + +// isContainer +type WAFRuleCollectionGetNameAttributeType = *map[string]string +type WAFRuleCollectionGetNameArgType = map[string]string +type WAFRuleCollectionGetNameRetType = map[string]string + +func getWAFRuleCollectionGetNameAttributeTypeOk(arg WAFRuleCollectionGetNameAttributeType) (ret WAFRuleCollectionGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleCollectionGetNameAttributeType(arg *WAFRuleCollectionGetNameAttributeType, val WAFRuleCollectionGetNameRetType) { + *arg = &val +} + +// WAFRuleCollection struct for WAFRuleCollection +type WAFRuleCollection struct { + // REQUIRED + Groups WAFRuleCollectionGetGroupsAttributeType `json:"groups" required:"true"` + // REQUIRED + Id WAFRuleCollectionGetIdAttributeType `json:"id" required:"true"` + // LocalizedString is a map from language to string value + // REQUIRED + Name WAFRuleCollectionGetNameAttributeType `json:"name" required:"true"` +} + +type _WAFRuleCollection WAFRuleCollection + +// NewWAFRuleCollection instantiates a new WAFRuleCollection 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 NewWAFRuleCollection(groups WAFRuleCollectionGetGroupsArgType, id WAFRuleCollectionGetIdArgType, name WAFRuleCollectionGetNameArgType) *WAFRuleCollection { + this := WAFRuleCollection{} + setWAFRuleCollectionGetGroupsAttributeType(&this.Groups, groups) + setWAFRuleCollectionGetIdAttributeType(&this.Id, id) + setWAFRuleCollectionGetNameAttributeType(&this.Name, name) + return &this +} + +// NewWAFRuleCollectionWithDefaults instantiates a new WAFRuleCollection 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 NewWAFRuleCollectionWithDefaults() *WAFRuleCollection { + this := WAFRuleCollection{} + return &this +} + +// GetGroups returns the Groups field value +func (o *WAFRuleCollection) GetGroups() (ret WAFRuleCollectionGetGroupsRetType) { + ret, _ = o.GetGroupsOk() + return ret +} + +// GetGroupsOk returns a tuple with the Groups field value +// and a boolean to check if the value has been set. +func (o *WAFRuleCollection) GetGroupsOk() (ret WAFRuleCollectionGetGroupsRetType, ok bool) { + return getWAFRuleCollectionGetGroupsAttributeTypeOk(o.Groups) +} + +// SetGroups sets field value +func (o *WAFRuleCollection) SetGroups(v WAFRuleCollectionGetGroupsRetType) { + setWAFRuleCollectionGetGroupsAttributeType(&o.Groups, v) +} + +// GetId returns the Id field value +func (o *WAFRuleCollection) GetId() (ret WAFRuleCollectionGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WAFRuleCollection) GetIdOk() (ret WAFRuleCollectionGetIdRetType, ok bool) { + return getWAFRuleCollectionGetIdAttributeTypeOk(o.Id) +} + +// SetId sets field value +func (o *WAFRuleCollection) SetId(v WAFRuleCollectionGetIdRetType) { + setWAFRuleCollectionGetIdAttributeType(&o.Id, v) +} + +// GetName returns the Name field value +func (o *WAFRuleCollection) GetName() (ret WAFRuleCollectionGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WAFRuleCollection) GetNameOk() (ret WAFRuleCollectionGetNameRetType, ok bool) { + return getWAFRuleCollectionGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *WAFRuleCollection) SetName(v WAFRuleCollectionGetNameRetType) { + setWAFRuleCollectionGetNameAttributeType(&o.Name, v) +} + +func (o WAFRuleCollection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWAFRuleCollectionGetGroupsAttributeTypeOk(o.Groups); ok { + toSerialize["Groups"] = val + } + if val, ok := getWAFRuleCollectionGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getWAFRuleCollectionGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + return toSerialize, nil +} + +type NullableWAFRuleCollection struct { + value *WAFRuleCollection + isSet bool +} + +func (v NullableWAFRuleCollection) Get() *WAFRuleCollection { + return v.value +} + +func (v *NullableWAFRuleCollection) Set(val *WAFRuleCollection) { + v.value = val + v.isSet = true +} + +func (v NullableWAFRuleCollection) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFRuleCollection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFRuleCollection(val *WAFRuleCollection) *NullableWAFRuleCollection { + return &NullableWAFRuleCollection{value: val, isSet: true} +} + +func (v NullableWAFRuleCollection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFRuleCollection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_rule_collection_test.go b/services/cdn/model_waf_rule_collection_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_waf_rule_collection_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_rule_group.go b/services/cdn/model_waf_rule_group.go new file mode 100644 index 000000000..cbae73c7c --- /dev/null +++ b/services/cdn/model_waf_rule_group.go @@ -0,0 +1,213 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WAFRuleGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFRuleGroup{} + +/* + types and functions for description +*/ + +// isContainer +type WAFRuleGroupGetDescriptionAttributeType = *map[string]string +type WAFRuleGroupGetDescriptionArgType = map[string]string +type WAFRuleGroupGetDescriptionRetType = map[string]string + +func getWAFRuleGroupGetDescriptionAttributeTypeOk(arg WAFRuleGroupGetDescriptionAttributeType) (ret WAFRuleGroupGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleGroupGetDescriptionAttributeType(arg *WAFRuleGroupGetDescriptionAttributeType, val WAFRuleGroupGetDescriptionRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isContainer +type WAFRuleGroupGetNameAttributeType = *map[string]string +type WAFRuleGroupGetNameArgType = map[string]string +type WAFRuleGroupGetNameRetType = map[string]string + +func getWAFRuleGroupGetNameAttributeTypeOk(arg WAFRuleGroupGetNameAttributeType) (ret WAFRuleGroupGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleGroupGetNameAttributeType(arg *WAFRuleGroupGetNameAttributeType, val WAFRuleGroupGetNameRetType) { + *arg = &val +} + +/* + types and functions for rules +*/ + +// isArray +type WAFRuleGroupGetRulesAttributeType = *[]WAFRule +type WAFRuleGroupGetRulesArgType = []WAFRule +type WAFRuleGroupGetRulesRetType = []WAFRule + +func getWAFRuleGroupGetRulesAttributeTypeOk(arg WAFRuleGroupGetRulesAttributeType) (ret WAFRuleGroupGetRulesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFRuleGroupGetRulesAttributeType(arg *WAFRuleGroupGetRulesAttributeType, val WAFRuleGroupGetRulesRetType) { + *arg = &val +} + +// WAFRuleGroup struct for WAFRuleGroup +type WAFRuleGroup struct { + // LocalizedString is a map from language to string value + // REQUIRED + Description WAFRuleGroupGetDescriptionAttributeType `json:"description" required:"true"` + // LocalizedString is a map from language to string value + // REQUIRED + Name WAFRuleGroupGetNameAttributeType `json:"name" required:"true"` + // REQUIRED + Rules WAFRuleGroupGetRulesAttributeType `json:"rules" required:"true"` +} + +type _WAFRuleGroup WAFRuleGroup + +// NewWAFRuleGroup instantiates a new WAFRuleGroup 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 NewWAFRuleGroup(description WAFRuleGroupGetDescriptionArgType, name WAFRuleGroupGetNameArgType, rules WAFRuleGroupGetRulesArgType) *WAFRuleGroup { + this := WAFRuleGroup{} + setWAFRuleGroupGetDescriptionAttributeType(&this.Description, description) + setWAFRuleGroupGetNameAttributeType(&this.Name, name) + setWAFRuleGroupGetRulesAttributeType(&this.Rules, rules) + return &this +} + +// NewWAFRuleGroupWithDefaults instantiates a new WAFRuleGroup 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 NewWAFRuleGroupWithDefaults() *WAFRuleGroup { + this := WAFRuleGroup{} + return &this +} + +// GetDescription returns the Description field value +func (o *WAFRuleGroup) GetDescription() (ret WAFRuleGroupGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *WAFRuleGroup) GetDescriptionOk() (ret WAFRuleGroupGetDescriptionRetType, ok bool) { + return getWAFRuleGroupGetDescriptionAttributeTypeOk(o.Description) +} + +// SetDescription sets field value +func (o *WAFRuleGroup) SetDescription(v WAFRuleGroupGetDescriptionRetType) { + setWAFRuleGroupGetDescriptionAttributeType(&o.Description, v) +} + +// GetName returns the Name field value +func (o *WAFRuleGroup) GetName() (ret WAFRuleGroupGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WAFRuleGroup) GetNameOk() (ret WAFRuleGroupGetNameRetType, ok bool) { + return getWAFRuleGroupGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *WAFRuleGroup) SetName(v WAFRuleGroupGetNameRetType) { + setWAFRuleGroupGetNameAttributeType(&o.Name, v) +} + +// GetRules returns the Rules field value +func (o *WAFRuleGroup) GetRules() (ret WAFRuleGroupGetRulesRetType) { + ret, _ = o.GetRulesOk() + return ret +} + +// GetRulesOk returns a tuple with the Rules field value +// and a boolean to check if the value has been set. +func (o *WAFRuleGroup) GetRulesOk() (ret WAFRuleGroupGetRulesRetType, ok bool) { + return getWAFRuleGroupGetRulesAttributeTypeOk(o.Rules) +} + +// SetRules sets field value +func (o *WAFRuleGroup) SetRules(v WAFRuleGroupGetRulesRetType) { + setWAFRuleGroupGetRulesAttributeType(&o.Rules, v) +} + +func (o WAFRuleGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWAFRuleGroupGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getWAFRuleGroupGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getWAFRuleGroupGetRulesAttributeTypeOk(o.Rules); ok { + toSerialize["Rules"] = val + } + return toSerialize, nil +} + +type NullableWAFRuleGroup struct { + value *WAFRuleGroup + isSet bool +} + +func (v NullableWAFRuleGroup) Get() *WAFRuleGroup { + return v.value +} + +func (v *NullableWAFRuleGroup) Set(val *WAFRuleGroup) { + v.value = val + v.isSet = true +} + +func (v NullableWAFRuleGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFRuleGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFRuleGroup(val *WAFRuleGroup) *NullableWAFRuleGroup { + return &NullableWAFRuleGroup{value: val, isSet: true} +} + +func (v NullableWAFRuleGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFRuleGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_rule_group_test.go b/services/cdn/model_waf_rule_group_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_waf_rule_group_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_rule_test.go b/services/cdn/model_waf_rule_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_waf_rule_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_status_rule_block.go b/services/cdn/model_waf_status_rule_block.go new file mode 100644 index 000000000..e22846aa3 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block.go @@ -0,0 +1,127 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WAFStatusRuleBlock type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFStatusRuleBlock{} + +/* + types and functions for id +*/ + +// isNotNullableString +type WAFStatusRuleBlockGetIdAttributeType = *string + +func getWAFStatusRuleBlockGetIdAttributeTypeOk(arg WAFStatusRuleBlockGetIdAttributeType) (ret WAFStatusRuleBlockGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFStatusRuleBlockGetIdAttributeType(arg *WAFStatusRuleBlockGetIdAttributeType, val WAFStatusRuleBlockGetIdRetType) { + *arg = &val +} + +type WAFStatusRuleBlockGetIdArgType = string +type WAFStatusRuleBlockGetIdRetType = string + +// WAFStatusRuleBlock struct for WAFStatusRuleBlock +type WAFStatusRuleBlock struct { + // Specifies the ID of the Rule. + // REQUIRED + Id WAFStatusRuleBlockGetIdAttributeType `json:"id" required:"true"` +} + +type _WAFStatusRuleBlock WAFStatusRuleBlock + +// NewWAFStatusRuleBlock instantiates a new WAFStatusRuleBlock 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 NewWAFStatusRuleBlock(id WAFStatusRuleBlockGetIdArgType) *WAFStatusRuleBlock { + this := WAFStatusRuleBlock{} + setWAFStatusRuleBlockGetIdAttributeType(&this.Id, id) + return &this +} + +// NewWAFStatusRuleBlockWithDefaults instantiates a new WAFStatusRuleBlock 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 NewWAFStatusRuleBlockWithDefaults() *WAFStatusRuleBlock { + this := WAFStatusRuleBlock{} + return &this +} + +// GetId returns the Id field value +func (o *WAFStatusRuleBlock) GetId() (ret WAFStatusRuleBlockGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WAFStatusRuleBlock) GetIdOk() (ret WAFStatusRuleBlockGetIdRetType, ok bool) { + return getWAFStatusRuleBlockGetIdAttributeTypeOk(o.Id) +} + +// SetId sets field value +func (o *WAFStatusRuleBlock) SetId(v WAFStatusRuleBlockGetIdRetType) { + setWAFStatusRuleBlockGetIdAttributeType(&o.Id, v) +} + +func (o WAFStatusRuleBlock) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWAFStatusRuleBlockGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + return toSerialize, nil +} + +type NullableWAFStatusRuleBlock struct { + value *WAFStatusRuleBlock + isSet bool +} + +func (v NullableWAFStatusRuleBlock) Get() *WAFStatusRuleBlock { + return v.value +} + +func (v *NullableWAFStatusRuleBlock) Set(val *WAFStatusRuleBlock) { + v.value = val + v.isSet = true +} + +func (v NullableWAFStatusRuleBlock) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFStatusRuleBlock) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFStatusRuleBlock(val *WAFStatusRuleBlock) *NullableWAFStatusRuleBlock { + return &NullableWAFStatusRuleBlock{value: val, isSet: true} +} + +func (v NullableWAFStatusRuleBlock) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFStatusRuleBlock) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_status_rule_block_test.go b/services/cdn/model_waf_status_rule_block_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_type.go b/services/cdn/model_waf_type.go new file mode 100644 index 000000000..c1421e710 --- /dev/null +++ b/services/cdn/model_waf_type.go @@ -0,0 +1,115 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" + "fmt" +) + +// WafType Enable or disable the Premium WAF. Do note that enabling the Premium WAF will cause additional fees. Some features are gated behind the Premium WAF, like additional, **premium-only rules** and the ability to create **custom rules** (not yet implemented) +type WafType string + +// List of WafType +const ( + WAFTYPE_FREE WafType = "FREE" + WAFTYPE_PREMIUM WafType = "PREMIUM" +) + +// All allowed values of WafType enum +var AllowedWafTypeEnumValues = []WafType{ + "FREE", + "PREMIUM", +} + +func (v *WafType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := WafType(value) + for _, existing := range AllowedWafTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid WafType", value) +} + +// NewWafTypeFromValue returns a pointer to a valid WafType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewWafTypeFromValue(v string) (*WafType, error) { + ev := WafType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for WafType: valid values are %v", v, AllowedWafTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v WafType) IsValid() bool { + for _, existing := range AllowedWafTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WafType value +func (v WafType) Ptr() *WafType { + return &v +} + +type NullableWafType struct { + value *WafType + isSet bool +} + +func (v NullableWafType) Get() *WafType { + return v.value +} + +func (v *NullableWafType) Set(val *WafType) { + v.value = val + v.isSet = true +} + +func (v NullableWafType) IsSet() bool { + return v.isSet +} + +func (v *NullableWafType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafType(val *WafType) *NullableWafType { + return &NullableWafType{value: val, isSet: true} +} + +func (v NullableWafType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_type_test.go b/services/cdn/model_waf_type_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_waf_type_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/observability/CHANGELOG.md b/services/observability/CHANGELOG.md index a79ef82a9..b9065d475 100644 --- a/services/observability/CHANGELOG.md +++ b/services/observability/CHANGELOG.md @@ -1,3 +1,6 @@ +# v0.15.0 +- **Deprecation:** The `JaegerHttpTracesUrl` field is now deprecated in all relevant models and will be removed after 9th April 2026. Use the new `JaegerHttpUrl` field instead. + # v0.14.0 - **Feature:** Add attributes `JaegerHttpTracesUrl`, `OtlpGrpcTracesUrl` and `OtlpHttpTracesUrl` to `InstanceSensitiveData` model diff --git a/services/observability/VERSION b/services/observability/VERSION index 4a29f93bb..86dd09abc 100644 --- a/services/observability/VERSION +++ b/services/observability/VERSION @@ -1 +1 @@ -v0.14.0 +v0.15.0 diff --git a/services/observability/model_instance_sensitive_data.go b/services/observability/model_instance_sensitive_data.go index 5789d3f6c..0d59b1929 100644 --- a/services/observability/model_instance_sensitive_data.go +++ b/services/observability/model_instance_sensitive_data.go @@ -225,6 +225,27 @@ func setInstanceSensitiveDataGetJaegerHttpTracesUrlAttributeType(arg *InstanceSe type InstanceSensitiveDataGetJaegerHttpTracesUrlArgType = string type InstanceSensitiveDataGetJaegerHttpTracesUrlRetType = string +/* + types and functions for jaegerHttpUrl +*/ + +// isNotNullableString +type InstanceSensitiveDataGetJaegerHttpUrlAttributeType = *string + +func getInstanceSensitiveDataGetJaegerHttpUrlAttributeTypeOk(arg InstanceSensitiveDataGetJaegerHttpUrlAttributeType) (ret InstanceSensitiveDataGetJaegerHttpUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceSensitiveDataGetJaegerHttpUrlAttributeType(arg *InstanceSensitiveDataGetJaegerHttpUrlAttributeType, val InstanceSensitiveDataGetJaegerHttpUrlRetType) { + *arg = &val +} + +type InstanceSensitiveDataGetJaegerHttpUrlArgType = string +type InstanceSensitiveDataGetJaegerHttpUrlRetType = string + /* types and functions for jaegerTracesUrl */ @@ -597,9 +618,12 @@ type InstanceSensitiveData struct { // REQUIRED GrafanaUseStackitSso InstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType `json:"grafanaUseStackitSso" required:"true"` // REQUIRED - Instance InstanceSensitiveDataGetInstanceAttributeType `json:"instance" required:"true"` + Instance InstanceSensitiveDataGetInstanceAttributeType `json:"instance" required:"true"` + // Deprecated: Check the GitHub changelog for alternatives JaegerHttpTracesUrl InstanceSensitiveDataGetJaegerHttpTracesUrlAttributeType `json:"jaegerHttpTracesUrl,omitempty"` // REQUIRED + JaegerHttpUrl InstanceSensitiveDataGetJaegerHttpUrlAttributeType `json:"jaegerHttpUrl" required:"true"` + // REQUIRED JaegerTracesUrl InstanceSensitiveDataGetJaegerTracesUrlAttributeType `json:"jaegerTracesUrl" required:"true"` // REQUIRED JaegerUiUrl InstanceSensitiveDataGetJaegerUiUrlAttributeType `json:"jaegerUiUrl" required:"true"` @@ -640,7 +664,7 @@ type _InstanceSensitiveData InstanceSensitiveData // 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 NewInstanceSensitiveData(alertingUrl InstanceSensitiveDataGetAlertingUrlArgType, cluster InstanceSensitiveDataGetClusterArgType, dashboardUrl InstanceSensitiveDataGetDashboardUrlArgType, grafanaAdminPassword InstanceSensitiveDataGetGrafanaAdminPasswordArgType, grafanaAdminUser InstanceSensitiveDataGetGrafanaAdminUserArgType, grafanaPublicReadAccess InstanceSensitiveDatagetGrafanaPublicReadAccessArgType, grafanaUrl InstanceSensitiveDataGetGrafanaUrlArgType, grafanaUseStackitSso InstanceSensitiveDatagetGrafanaUseStackitSsoArgType, instance InstanceSensitiveDataGetInstanceArgType, jaegerTracesUrl InstanceSensitiveDataGetJaegerTracesUrlArgType, jaegerUiUrl InstanceSensitiveDataGetJaegerUiUrlArgType, logsPushUrl InstanceSensitiveDataGetLogsPushUrlArgType, logsUrl InstanceSensitiveDataGetLogsUrlArgType, metricsEndpointUrl InstanceSensitiveDataGetMetricsEndpointUrlArgType, metricsRetentionTime1h InstanceSensitiveDataGetMetricsRetentionTime1hArgType, metricsRetentionTime5m InstanceSensitiveDataGetMetricsRetentionTime5mArgType, metricsRetentionTimeRaw InstanceSensitiveDataGetMetricsRetentionTimeRawArgType, metricsUrl InstanceSensitiveDataGetMetricsUrlArgType, otlpGrpcTracesUrl InstanceSensitiveDataGetOtlpGrpcTracesUrlArgType, otlpHttpTracesUrl InstanceSensitiveDataGetOtlpHttpTracesUrlArgType, otlpTracesUrl InstanceSensitiveDataGetOtlpTracesUrlArgType, plan InstanceSensitiveDataGetPlanArgType, pushMetricsUrl InstanceSensitiveDataGetPushMetricsUrlArgType, targetsUrl InstanceSensitiveDataGetTargetsUrlArgType, zipkinSpansUrl InstanceSensitiveDataGetZipkinSpansUrlArgType) *InstanceSensitiveData { +func NewInstanceSensitiveData(alertingUrl InstanceSensitiveDataGetAlertingUrlArgType, cluster InstanceSensitiveDataGetClusterArgType, dashboardUrl InstanceSensitiveDataGetDashboardUrlArgType, grafanaAdminPassword InstanceSensitiveDataGetGrafanaAdminPasswordArgType, grafanaAdminUser InstanceSensitiveDataGetGrafanaAdminUserArgType, grafanaPublicReadAccess InstanceSensitiveDatagetGrafanaPublicReadAccessArgType, grafanaUrl InstanceSensitiveDataGetGrafanaUrlArgType, grafanaUseStackitSso InstanceSensitiveDatagetGrafanaUseStackitSsoArgType, instance InstanceSensitiveDataGetInstanceArgType, jaegerHttpUrl InstanceSensitiveDataGetJaegerHttpUrlArgType, jaegerTracesUrl InstanceSensitiveDataGetJaegerTracesUrlArgType, jaegerUiUrl InstanceSensitiveDataGetJaegerUiUrlArgType, logsPushUrl InstanceSensitiveDataGetLogsPushUrlArgType, logsUrl InstanceSensitiveDataGetLogsUrlArgType, metricsEndpointUrl InstanceSensitiveDataGetMetricsEndpointUrlArgType, metricsRetentionTime1h InstanceSensitiveDataGetMetricsRetentionTime1hArgType, metricsRetentionTime5m InstanceSensitiveDataGetMetricsRetentionTime5mArgType, metricsRetentionTimeRaw InstanceSensitiveDataGetMetricsRetentionTimeRawArgType, metricsUrl InstanceSensitiveDataGetMetricsUrlArgType, otlpGrpcTracesUrl InstanceSensitiveDataGetOtlpGrpcTracesUrlArgType, otlpHttpTracesUrl InstanceSensitiveDataGetOtlpHttpTracesUrlArgType, otlpTracesUrl InstanceSensitiveDataGetOtlpTracesUrlArgType, plan InstanceSensitiveDataGetPlanArgType, pushMetricsUrl InstanceSensitiveDataGetPushMetricsUrlArgType, targetsUrl InstanceSensitiveDataGetTargetsUrlArgType, zipkinSpansUrl InstanceSensitiveDataGetZipkinSpansUrlArgType) *InstanceSensitiveData { this := InstanceSensitiveData{} setInstanceSensitiveDataGetAlertingUrlAttributeType(&this.AlertingUrl, alertingUrl) setInstanceSensitiveDataGetClusterAttributeType(&this.Cluster, cluster) @@ -651,6 +675,7 @@ func NewInstanceSensitiveData(alertingUrl InstanceSensitiveDataGetAlertingUrlArg setInstanceSensitiveDataGetGrafanaUrlAttributeType(&this.GrafanaUrl, grafanaUrl) setInstanceSensitiveDatagetGrafanaUseStackitSsoAttributeType(&this.GrafanaUseStackitSso, grafanaUseStackitSso) setInstanceSensitiveDataGetInstanceAttributeType(&this.Instance, instance) + setInstanceSensitiveDataGetJaegerHttpUrlAttributeType(&this.JaegerHttpUrl, jaegerHttpUrl) setInstanceSensitiveDataGetJaegerTracesUrlAttributeType(&this.JaegerTracesUrl, jaegerTracesUrl) setInstanceSensitiveDataGetJaegerUiUrlAttributeType(&this.JaegerUiUrl, jaegerUiUrl) setInstanceSensitiveDataGetLogsPushUrlAttributeType(&this.LogsPushUrl, logsPushUrl) @@ -834,6 +859,7 @@ func (o *InstanceSensitiveData) SetInstance(v InstanceSensitiveDataGetInstanceRe } // GetJaegerHttpTracesUrl returns the JaegerHttpTracesUrl field value if set, zero value otherwise. +// Deprecated func (o *InstanceSensitiveData) GetJaegerHttpTracesUrl() (res InstanceSensitiveDataGetJaegerHttpTracesUrlRetType) { res, _ = o.GetJaegerHttpTracesUrlOk() return @@ -841,6 +867,7 @@ func (o *InstanceSensitiveData) GetJaegerHttpTracesUrl() (res InstanceSensitiveD // GetJaegerHttpTracesUrlOk returns a tuple with the JaegerHttpTracesUrl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *InstanceSensitiveData) GetJaegerHttpTracesUrlOk() (ret InstanceSensitiveDataGetJaegerHttpTracesUrlRetType, ok bool) { return getInstanceSensitiveDataGetJaegerHttpTracesUrlAttributeTypeOk(o.JaegerHttpTracesUrl) } @@ -852,10 +879,28 @@ func (o *InstanceSensitiveData) HasJaegerHttpTracesUrl() bool { } // SetJaegerHttpTracesUrl gets a reference to the given string and assigns it to the JaegerHttpTracesUrl field. +// Deprecated func (o *InstanceSensitiveData) SetJaegerHttpTracesUrl(v InstanceSensitiveDataGetJaegerHttpTracesUrlRetType) { setInstanceSensitiveDataGetJaegerHttpTracesUrlAttributeType(&o.JaegerHttpTracesUrl, v) } +// GetJaegerHttpUrl returns the JaegerHttpUrl field value +func (o *InstanceSensitiveData) GetJaegerHttpUrl() (ret InstanceSensitiveDataGetJaegerHttpUrlRetType) { + ret, _ = o.GetJaegerHttpUrlOk() + return ret +} + +// GetJaegerHttpUrlOk returns a tuple with the JaegerHttpUrl field value +// and a boolean to check if the value has been set. +func (o *InstanceSensitiveData) GetJaegerHttpUrlOk() (ret InstanceSensitiveDataGetJaegerHttpUrlRetType, ok bool) { + return getInstanceSensitiveDataGetJaegerHttpUrlAttributeTypeOk(o.JaegerHttpUrl) +} + +// SetJaegerHttpUrl sets field value +func (o *InstanceSensitiveData) SetJaegerHttpUrl(v InstanceSensitiveDataGetJaegerHttpUrlRetType) { + setInstanceSensitiveDataGetJaegerHttpUrlAttributeType(&o.JaegerHttpUrl, v) +} + // GetJaegerTracesUrl returns the JaegerTracesUrl field value func (o *InstanceSensitiveData) GetJaegerTracesUrl() (ret InstanceSensitiveDataGetJaegerTracesUrlRetType) { ret, _ = o.GetJaegerTracesUrlOk() @@ -1183,6 +1228,9 @@ func (o InstanceSensitiveData) ToMap() (map[string]interface{}, error) { if val, ok := getInstanceSensitiveDataGetJaegerHttpTracesUrlAttributeTypeOk(o.JaegerHttpTracesUrl); ok { toSerialize["JaegerHttpTracesUrl"] = val } + if val, ok := getInstanceSensitiveDataGetJaegerHttpUrlAttributeTypeOk(o.JaegerHttpUrl); ok { + toSerialize["JaegerHttpUrl"] = val + } if val, ok := getInstanceSensitiveDataGetJaegerTracesUrlAttributeTypeOk(o.JaegerTracesUrl); ok { toSerialize["JaegerTracesUrl"] = val }