diff --git a/Makefile b/Makefile index ef35b45fa..ce1f91bd9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash -export API_TAGS ?= ExternalClusterAPI,PoliciesAPI,NodeConfigurationAPI,NodeTemplatesAPI,AuthTokenAPI,ScheduledRebalancingAPI,InventoryAPI,UsersAPI,OperationsAPI,EvictorAPI,SSOAPI,CommitmentsAPI,WorkloadOptimizationAPI,ServiceAccountsAPI,RbacServiceAPI,RuntimeSecurityAPI +export API_TAGS ?= ExternalClusterAPI,PoliciesAPI,NodeConfigurationAPI,NodeTemplatesAPI,AuthTokenAPI,ScheduledRebalancingAPI,InventoryAPI,UsersAPI,OperationsAPI,EvictorAPI,SSOAPI,CommitmentsAPI,WorkloadOptimizationAPI,ServiceAccountsAPI,RbacServiceAPI,RuntimeSecurityAPI,AllocationGroupAPI export SWAGGER_LOCATION ?= https://api.cast.ai/v1/spec/openapi.json export CLUSTER_AUTOSCALER_API_TAGS ?= HibernationSchedulesAPI diff --git a/castai/provider.go b/castai/provider.go index 51aea1599..ef44e5b5d 100644 --- a/castai/provider.go +++ b/castai/provider.go @@ -62,6 +62,7 @@ func Provider(version string) *schema.Provider { "castai_role_bindings": resourceRoleBindings(), "castai_hibernation_schedule": resourceHibernationSchedule(), "castai_security_runtime_rule": resourceSecurityRuntimeRule(), + "castai_allocation_group": resourceAllocationGroup(), }, DataSourcesMap: map[string]*schema.Resource{ diff --git a/castai/resource_allocation_group.go b/castai/resource_allocation_group.go new file mode 100644 index 000000000..d8a7315bf --- /dev/null +++ b/castai/resource_allocation_group.go @@ -0,0 +1,283 @@ +package castai + +import ( + "context" + "errors" + "fmt" + "net/http" + + "github.com/hashicorp/terraform-plugin-log/tflog" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + "github.com/castai/terraform-provider-castai/castai/sdk" +) + +func resourceAllocationGroup() *schema.Resource { + return &schema.Resource{ + CreateContext: resourceAllocationGroupCreate, + ReadContext: resourceAllocationGroupRead, + UpdateContext: resourceAllocationGroupUpdate, + DeleteContext: resourceAllocationGroupDelete, + CustomizeDiff: resourceAllocationGroupDiff, + Description: "Manage allocation group. Allocation group [reference](https://docs.cast.ai/docs/allocation-groups)", + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + Description: "Allocation group name", + }, + "cluster_ids": { + Type: schema.TypeSet, + Optional: true, + Description: "List of CAST AI cluster ids", + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateDiagFunc: validation.ToDiagFunc(validation.IsUUID), + }, + }, + "namespaces": { + Type: schema.TypeList, + Optional: true, + Description: "List of cluster namespaces to track", + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + "labels": { + Type: schema.TypeMap, + Description: "Labels used to select workloads to track", + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "labels_operator": { + Type: schema.TypeString, + Description: `Operator with which to connect the labels + OR (default) - workload needs to have at least one label to be included + AND - workload needs to have all the labels to be included`, + Optional: true, + Default: sdk.OR, + ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{ + string(sdk.AND), string(sdk.OR), + }, false)), + }, + }, + } +} + +func resourceAllocationGroupDiff(_ context.Context, d *schema.ResourceDiff, _ any) error { + var clusterIds []string + if cids, ok := d.GetOk("cluster_ids"); ok { + clusterIds = toClusterIds(cids.(*schema.Set).List()) + } + namespaces := toStringList(d.Get("namespaces").([]interface{})) + + var labels []sdk.CostreportV1beta1AllocationGroupFilterLabelValue + if ls, ok := d.GetOk("labels"); ok { + labels = toLabels(ls.(map[string]interface{})) + } + + if len(clusterIds) == 0 && len(namespaces) == 0 && len(labels) == 0 { + return errors.New("allocation group must specify at least one of: cluster_ids, namespaces, or labels") + } + return nil +} + +func resourceAllocationGroupRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { + client := meta.(*ProviderConfig).api + + resp, err := client.AllocationGroupAPIGetAllocationGroupWithResponse(ctx, d.Id()) + if err != nil { + return diag.FromErr(err) + } + if !d.IsNewResource() && resp.StatusCode() == http.StatusNotFound { + tflog.Warn(ctx, "Allocation group not found, removing from state", map[string]any{"id": d.Id()}) + d.SetId("") + return nil + } + if err := sdk.CheckOKResponse(resp, err); err != nil { + return diag.FromErr(err) + } + + ag := resp.JSON200 + + if err := d.Set("name", ag.Name); err != nil { + return diag.FromErr(fmt.Errorf("setting name: %w", err)) + } + if err := d.Set("cluster_ids", *ag.Filter.ClusterIds); err != nil { + return diag.FromErr(fmt.Errorf("setting cluster_ids: %w", err)) + } + if err := d.Set("namespaces", ag.Filter.Namespaces); err != nil { + return diag.FromErr(fmt.Errorf("setting namespaces: %w", err)) + } + if err := d.Set("labels", fromLabels(*ag.Filter.Labels)); err != nil { + return diag.FromErr(fmt.Errorf("setting labels: %w", err)) + } + if err := d.Set("labels_operator", ag.Filter.LabelsOperator); err != nil { + return diag.FromErr(fmt.Errorf("setting labels_operator: %w", err)) + } + return nil +} + +func resourceAllocationGroupCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { + client := meta.(*ProviderConfig).api + + var clusterIds []string + if cid, ok := d.GetOk("cluster_ids"); ok { + clusterIds = toClusterIds(cid.(*schema.Set).List()) + } + + allocationGroupName := d.Get("name").(string) + + namespaces := toStringList(d.Get("namespaces").([]interface{})) + + var labels []sdk.CostreportV1beta1AllocationGroupFilterLabelValue + if ls, ok := d.GetOk("labels"); ok { + labels = toLabels(ls.(map[string]interface{})) + } + + labelsOperator := toLabelsOperator(d) + + if len(clusterIds) == 0 && len(namespaces) == 0 && len(labels) == 0 { + return diag.FromErr(errors.New("allocation group must specify at least one of: cluster_ids, namespaces, or labels")) + } + + body := sdk.AllocationGroupAPICreateAllocationGroupJSONRequestBody{ + Filter: &sdk.CostreportV1beta1AllocationGroupFilter{ + ClusterIds: &clusterIds, + Labels: &labels, + LabelsOperator: labelsOperator, + Namespaces: &namespaces, + }, + Name: &allocationGroupName, + } + create, err := client.AllocationGroupAPICreateAllocationGroupWithResponse(ctx, body) + if err != nil { + return diag.FromErr(fmt.Errorf("error calling create allocation group: %w", err)) + } + switch create.StatusCode() { + case http.StatusOK: + d.SetId(*create.JSON200.Id) + return resourceAllocationGroupRead(ctx, d, meta) + default: + return diag.Errorf("expected status code %d, received: status=%d body=%s", http.StatusOK, create.StatusCode(), string(create.GetBody())) + } +} + +func resourceAllocationGroupUpdate(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { + if !d.HasChanges( + "name", + "cluster_ids", + "namespaces", + "labels", + "labels_operator", + ) { + tflog.Info(ctx, "allocation group up to date") + return nil + } + + client := meta.(*ProviderConfig).api + + allocationGroupName := d.Get("name").(string) + + var clusterIds []string + if cids, ok := d.GetOk("cluster_ids"); ok { + clusterIds = toClusterIds(cids.(*schema.Set).List()) + } + + var labels []sdk.CostreportV1beta1AllocationGroupFilterLabelValue + if ls, ok := d.GetOk("labels"); ok { + labels = toLabels(ls.(map[string]interface{})) + } + + namespaces := toStringList(d.Get("namespaces").([]interface{})) + + if len(clusterIds) == 0 && len(namespaces) == 0 && len(labels) == 0 { + return diag.FromErr(errors.New("allocation group must specify at least one of: cluster_ids, namespaces, or labels")) + } + + req := sdk.AllocationGroupAPIUpdateAllocationGroupJSONRequestBody{ + Name: &allocationGroupName, + Filter: &sdk.CostreportV1beta1AllocationGroupFilter{ + ClusterIds: &clusterIds, + Labels: &labels, + LabelsOperator: toLabelsOperator(d), + Namespaces: &namespaces, + }, + } + + resp, err := client.AllocationGroupAPIUpdateAllocationGroupWithResponse(ctx, d.Id(), req) + if checkErr := sdk.CheckOKResponse(resp, err); checkErr != nil { + return diag.FromErr(checkErr) + } + return resourceAllocationGroupRead(ctx, d, meta) +} + +func resourceAllocationGroupDelete(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { + client := meta.(*ProviderConfig).api + + response, err := client.AllocationGroupAPIDeleteAllocationGroupWithResponse(ctx, d.Id()) + if err != nil { + return diag.FromErr(err) + } + if err := sdk.StatusOk(response); err != nil { + return diag.FromErr(err) + } + + return nil +} + +func toLabelsOperator(d *schema.ResourceData) *sdk.CostreportV1beta1FilterOperator { + defaultLabelOperator := sdk.OR + if v, ok := d.GetOk("labels_operator"); ok { + if lv := v.(string); lv != "" { + labelOperator := sdk.CostreportV1beta1FilterOperator(lv) + return &labelOperator + } + } + return &defaultLabelOperator +} + +func toClusterIds(lv []interface{}) []string { + if len(lv) > 0 { + return toStringList(lv) + } + return nil +} + +func fromLabels(labels []sdk.CostreportV1beta1AllocationGroupFilterLabelValue) map[string]string { + result := make(map[string]string) + for _, label := range labels { + result[*label.Label] = *label.Value + } + return result +} + +func toLabels(lv map[string]interface{}) []sdk.CostreportV1beta1AllocationGroupFilterLabelValue { + if len(lv) > 0 { + labelsStringMap := toStringMap(lv) + + operator := sdk.CostreportV1beta1AllocationGroupFilterLabelValueOperatorEqual + + if len(labelsStringMap) > 0 { + labels := make([]sdk.CostreportV1beta1AllocationGroupFilterLabelValue, 0, len(labelsStringMap)) + for labelKey, labelValue := range labelsStringMap { + label := sdk.CostreportV1beta1AllocationGroupFilterLabelValue{ + Label: &labelKey, + Value: &labelValue, + Operator: &operator, + } + labels = append(labels, label) + } + return labels + } + } + return nil +} diff --git a/castai/resource_allocation_group_test.go b/castai/resource_allocation_group_test.go new file mode 100644 index 000000000..dc710368b --- /dev/null +++ b/castai/resource_allocation_group_test.go @@ -0,0 +1,140 @@ +package castai + +import ( + "context" + "fmt" + "net/http" + "regexp" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" +) + +func TestAccResourceAllocationGroup(t *testing.T) { + resourceName := "castai_allocation_group.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProviderFactories: providerFactories, + CheckDestroy: testAccCheckAllocationGroupDestroy, + Steps: []resource.TestStep{ + { + Config: invalidAllocationGroupConfig(), + ExpectError: regexp.MustCompile(`allocation group must specify at least one of: cluster_ids, namespaces, or labels`), + }, + { + Config: allocationGroupConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "name", "Test terraform example"), + resource.TestCheckResourceAttr(resourceName, "namespaces.0", "namespace-a"), + resource.TestCheckResourceAttr(resourceName, "namespaces.1", "namespace-b"), + resource.TestCheckResourceAttr(resourceName, "labels.environment", "production"), + resource.TestCheckResourceAttr(resourceName, "labels.team", "my-team"), + resource.TestCheckResourceAttr(resourceName, "labels.app.kubernetes.io/name", "app-name"), + resource.TestCheckResourceAttr(resourceName, "labels_operator", "AND"), + ), + }, + { + Config: allocationGroupUpdatedConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "name", "Test terraform example updated"), + resource.TestCheckResourceAttr(resourceName, "namespaces.0", "namespace-a"), + resource.TestCheckResourceAttr(resourceName, "namespaces.1", "namespace-b"), + resource.TestCheckResourceAttr(resourceName, "namespaces.2", "namespace-c"), + resource.TestCheckResourceAttr(resourceName, "labels.environment", "production"), + resource.TestCheckResourceAttr(resourceName, "labels.team", "my-team"), + resource.TestCheckResourceAttr(resourceName, "labels.app.kubernetes.io/name", "app-name-updated"), + resource.TestCheckResourceAttr(resourceName, "labels_operator", "AND"), + ), + }, + { + // Import state by ID + ImportState: true, + ResourceName: "castai_allocation_group.test", + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAllocationGroupDestroy(s *terraform.State) error { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + + client := testAccProvider.Meta().(*ProviderConfig).api + for _, rs := range s.RootModule().Resources { + if rs.Type != "castai_allocation_group" { + continue + } + + id := rs.Primary.ID + resp, err := client.AllocationGroupAPIGetAllocationGroupWithResponse(ctx, id) + if err != nil { + return err + } + if resp.StatusCode() == http.StatusNotFound { + return nil + } + + return fmt.Errorf("allocation group %s still exists", rs.Primary.ID) + } + + return nil +} + +func invalidAllocationGroupConfig() string { + cfg := ` + resource "castai_allocation_group" "test" { + name = "Test terraform example" + }` + return ConfigCompose(cfg) +} + +func allocationGroupConfig() string { + cfg := ` + resource "castai_allocation_group" "test" { + name = "Test terraform example" + + namespaces = [ + "namespace-a", + "namespace-b" + ] + + labels = { + environment = "production", + team = "my-team", + "app.kubernetes.io/name" = "app-name" + } + + labels_operator = "AND" + } + ` + + return ConfigCompose(cfg) +} + +func allocationGroupUpdatedConfig() string { + cfg := ` + resource "castai_allocation_group" "test" { + name = "Test terraform example updated" + + namespaces = [ + "namespace-a", + "namespace-b", + "namespace-c" + ] + + labels = { + environment = "production", + team = "my-team", + "app.kubernetes.io/name" = "app-name-updated" + } + + labels_operator = "AND" + } + ` + + return ConfigCompose(cfg) +} diff --git a/castai/sdk/api.gen.go b/castai/sdk/api.gen.go index b9f5756ce..9aead4649 100644 --- a/castai/sdk/api.gen.go +++ b/castai/sdk/api.gen.go @@ -190,6 +190,27 @@ const ( ORGANIZATIONTYPEENTERPRISE CastaiUsersV1beta1OrganizationType = "ORGANIZATION_TYPE_ENTERPRISE" ) +// Defines values for CostreportV1beta1AllocationGroupFilterLabelValueOperator. +const ( + CostreportV1beta1AllocationGroupFilterLabelValueOperatorDoesNotExist CostreportV1beta1AllocationGroupFilterLabelValueOperator = "DoesNotExist" + CostreportV1beta1AllocationGroupFilterLabelValueOperatorEqual CostreportV1beta1AllocationGroupFilterLabelValueOperator = "Equal" + CostreportV1beta1AllocationGroupFilterLabelValueOperatorExists CostreportV1beta1AllocationGroupFilterLabelValueOperator = "Exists" + CostreportV1beta1AllocationGroupFilterLabelValueOperatorNotEqual CostreportV1beta1AllocationGroupFilterLabelValueOperator = "NotEqual" +) + +// Defines values for CostreportV1beta1FilterOperator. +const ( + AND CostreportV1beta1FilterOperator = "AND" + OR CostreportV1beta1FilterOperator = "OR" +) + +// Defines values for CostreportV1beta1NoDataReason. +const ( + CostreportV1beta1NoDataReasonAgentOutdated CostreportV1beta1NoDataReason = "AgentOutdated" + CostreportV1beta1NoDataReasonNoMetricsServer CostreportV1beta1NoDataReason = "NoMetricsServer" + CostreportV1beta1NoDataReasonUnknown CostreportV1beta1NoDataReason = "Unknown" +) + // Defines values for ExternalclusterV1ClusterReconcileInfoReconcileMode. const ( ExternalclusterV1ClusterReconcileInfoReconcileModeDisabled ExternalclusterV1ClusterReconcileInfoReconcileMode = "disabled" @@ -217,18 +238,18 @@ const ( // Defines values for K8sSelectorV1Operator. const ( - DoesNotExist K8sSelectorV1Operator = "DoesNotExist" - DoesNotExist1 K8sSelectorV1Operator = "doesNotExist" - Exists K8sSelectorV1Operator = "Exists" - Exists1 K8sSelectorV1Operator = "exists" - Gt K8sSelectorV1Operator = "Gt" - Gt1 K8sSelectorV1Operator = "gt" - IN K8sSelectorV1Operator = "IN" - In K8sSelectorV1Operator = "in" - Lt K8sSelectorV1Operator = "Lt" - Lt1 K8sSelectorV1Operator = "lt" - NotIn K8sSelectorV1Operator = "NotIn" - NotIn1 K8sSelectorV1Operator = "notIn" + K8sSelectorV1OperatorDoesNotExist K8sSelectorV1Operator = "DoesNotExist" + K8sSelectorV1OperatorDoesNotExist1 K8sSelectorV1Operator = "doesNotExist" + K8sSelectorV1OperatorExists K8sSelectorV1Operator = "Exists" + K8sSelectorV1OperatorExists1 K8sSelectorV1Operator = "exists" + K8sSelectorV1OperatorGt K8sSelectorV1Operator = "Gt" + K8sSelectorV1OperatorGt1 K8sSelectorV1Operator = "gt" + K8sSelectorV1OperatorIN K8sSelectorV1Operator = "IN" + K8sSelectorV1OperatorIn K8sSelectorV1Operator = "in" + K8sSelectorV1OperatorLt K8sSelectorV1Operator = "Lt" + K8sSelectorV1OperatorLt1 K8sSelectorV1Operator = "lt" + K8sSelectorV1OperatorNotIn K8sSelectorV1Operator = "NotIn" + K8sSelectorV1OperatorNotIn1 K8sSelectorV1Operator = "notIn" ) // Defines values for NodeconfigV1AKSConfigImageFamily. @@ -549,19 +570,35 @@ const ( CommitmentsAPIImportAWSReservedInstancesParamsBehaviourOVERWRITE CommitmentsAPIImportAWSReservedInstancesParamsBehaviour = "OVERWRITE" ) +// Defines values for AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrder. +const ( + AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrderASC AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrder = "ASC" + AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrderAsc AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrder = "asc" + AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrderDESC AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrder = "DESC" + AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrderDesc AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrder = "desc" +) + +// Defines values for AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrder. +const ( + AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrderASC AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrder = "ASC" + AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrderAsc AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrder = "asc" + AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrderDESC AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrder = "DESC" + AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrderDesc AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrder = "desc" +) + // Defines values for ExternalClusterAPIListNodesParamsNodeStatus. const ( - ExternalClusterAPIListNodesParamsNodeStatusCordoned ExternalClusterAPIListNodesParamsNodeStatus = "cordoned" - ExternalClusterAPIListNodesParamsNodeStatusCreating ExternalClusterAPIListNodesParamsNodeStatus = "creating" - ExternalClusterAPIListNodesParamsNodeStatusDeleted ExternalClusterAPIListNodesParamsNodeStatus = "deleted" - ExternalClusterAPIListNodesParamsNodeStatusDeleting ExternalClusterAPIListNodesParamsNodeStatus = "deleting" - ExternalClusterAPIListNodesParamsNodeStatusDraining ExternalClusterAPIListNodesParamsNodeStatus = "draining" - ExternalClusterAPIListNodesParamsNodeStatusInterrupted ExternalClusterAPIListNodesParamsNodeStatus = "interrupted" - ExternalClusterAPIListNodesParamsNodeStatusNodeStatusUnspecified ExternalClusterAPIListNodesParamsNodeStatus = "node_status_unspecified" - ExternalClusterAPIListNodesParamsNodeStatusNotReady ExternalClusterAPIListNodesParamsNodeStatus = "not_ready" - ExternalClusterAPIListNodesParamsNodeStatusPending ExternalClusterAPIListNodesParamsNodeStatus = "pending" - ExternalClusterAPIListNodesParamsNodeStatusReady ExternalClusterAPIListNodesParamsNodeStatus = "ready" - ExternalClusterAPIListNodesParamsNodeStatusUnknown ExternalClusterAPIListNodesParamsNodeStatus = "unknown" + Cordoned ExternalClusterAPIListNodesParamsNodeStatus = "cordoned" + Creating ExternalClusterAPIListNodesParamsNodeStatus = "creating" + Deleted ExternalClusterAPIListNodesParamsNodeStatus = "deleted" + Deleting ExternalClusterAPIListNodesParamsNodeStatus = "deleting" + Draining ExternalClusterAPIListNodesParamsNodeStatus = "draining" + Interrupted ExternalClusterAPIListNodesParamsNodeStatus = "interrupted" + NodeStatusUnspecified ExternalClusterAPIListNodesParamsNodeStatus = "node_status_unspecified" + NotReady ExternalClusterAPIListNodesParamsNodeStatus = "not_ready" + Pending ExternalClusterAPIListNodesParamsNodeStatus = "pending" + Ready ExternalClusterAPIListNodesParamsNodeStatus = "ready" + Unknown ExternalClusterAPIListNodesParamsNodeStatus = "unknown" ) // Defines values for ExternalClusterAPIListNodesParamsLifecycleType. @@ -2846,6 +2883,686 @@ type CastaiUsersV1beta1UserOrganization struct { Type *CastaiUsersV1beta1OrganizationType `json:"type,omitempty"` } +// CostreportV1beta1AllocationGroup defines model for costreport.v1beta1.AllocationGroup. +type CostreportV1beta1AllocationGroup struct { + Filter *CostreportV1beta1AllocationGroupFilter `json:"filter,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` +} + +// CostreportV1beta1AllocationGroupDetails defines model for costreport.v1beta1.AllocationGroupDetails. +type CostreportV1beta1AllocationGroupDetails struct { + Filter *CostreportV1beta1AllocationGroupFilter `json:"filter,omitempty"` + Name *string `json:"name,omitempty"` +} + +// CostreportV1beta1AllocationGroupFilter defines model for costreport.v1beta1.AllocationGroupFilter. +type CostreportV1beta1AllocationGroupFilter struct { + ClusterIds *[]string `json:"clusterIds,omitempty"` + Labels *[]CostreportV1beta1AllocationGroupFilterLabelValue `json:"labels,omitempty"` + LabelsOperator *CostreportV1beta1FilterOperator `json:"labelsOperator,omitempty"` + Namespaces *[]string `json:"namespaces,omitempty"` + NodeLabels *[]CostreportV1beta1AllocationGroupFilterLabelValue `json:"nodeLabels,omitempty"` + NodeLabelsOperator *CostreportV1beta1FilterOperator `json:"nodeLabelsOperator,omitempty"` +} + +// CostreportV1beta1AllocationGroupFilterLabelValue defines model for costreport.v1beta1.AllocationGroupFilter.LabelValue. +type CostreportV1beta1AllocationGroupFilterLabelValue struct { + // Label Label name. + Label *string `json:"label,omitempty"` + + // Operator A set of operators which can be used in the label filter. + Operator *CostreportV1beta1AllocationGroupFilterLabelValueOperator `json:"operator,omitempty"` + + // Value Label value. Not used with operators: Exists and DoesNotExist. + Value *string `json:"value,omitempty"` +} + +// CostreportV1beta1AllocationGroupFilterLabelValueOperator A set of operators which can be used in the label filter. +type CostreportV1beta1AllocationGroupFilterLabelValueOperator string + +// CostreportV1beta1AllocationGroupVersionDetails defines model for costreport.v1beta1.AllocationGroupVersionDetails. +type CostreportV1beta1AllocationGroupVersionDetails struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` +} + +// CostreportV1beta1CostImpact Defines cost impact of wasted resources per lifecycle. +type CostreportV1beta1CostImpact struct { + // OnDemand Cost impact in $ for workload running on on-demand node. + OnDemand string `json:"onDemand"` + + // Spot Cost impact in $ for workload running on spot node. + Spot string `json:"spot"` + + // SpotFallback Cost impact in $ for workload running on spot-fallback node. + SpotFallback string `json:"spotFallback"` +} + +// CostreportV1beta1DeleteAllocationGroupResponse defines model for costreport.v1beta1.DeleteAllocationGroupResponse. +type CostreportV1beta1DeleteAllocationGroupResponse = map[string]interface{} + +// CostreportV1beta1FilterOperator defines model for costreport.v1beta1.FilterOperator. +type CostreportV1beta1FilterOperator string + +// CostreportV1beta1GetAllocationGroupCostSummariesResponse defines model for costreport.v1beta1.GetAllocationGroupCostSummariesResponse. +type CostreportV1beta1GetAllocationGroupCostSummariesResponse struct { + Items *[]CostreportV1beta1GetAllocationGroupCostSummariesResponseGroupItem `json:"items,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupCostSummariesResponseGroupItem defines model for costreport.v1beta1.GetAllocationGroupCostSummariesResponse.GroupItem. +type CostreportV1beta1GetAllocationGroupCostSummariesResponseGroupItem struct { + // GroupId Allocation group ID. + GroupId *string `json:"groupId,omitempty"` + + // GroupName Allocation group name. + GroupName *string `json:"groupName,omitempty"` + + // Summary Defines cost details for a given time. + Summary *CostreportV1beta1GetAllocationGroupCostSummariesResponseSummary `json:"summary,omitempty"` + + // Versions Allocation group version history. + Versions *[]CostreportV1beta1AllocationGroupVersionDetails `json:"versions,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupCostSummariesResponseSummary Defines cost details for a given time. +type CostreportV1beta1GetAllocationGroupCostSummariesResponseSummary struct { + // CpuCost Total CPU cost of on-demand instances for the given time period. + CpuCost *string `json:"cpuCost,omitempty"` + + // CpuCount Average number of CPUs used for the given time period. + CpuCount *string `json:"cpuCount,omitempty"` + + // GpuCost Total GPU cost of on-demand instances for the given time period. + GpuCost *string `json:"gpuCost,omitempty"` + + // GpuCount Average number of GPUs for the given time period. + GpuCount *string `json:"gpuCount,omitempty"` + + // RamCost Total RAM cost of on-demand instances for the given time period. + RamCost *string `json:"ramCost,omitempty"` + + // RamGib Average RAM GiB used for the given time period. + RamGib *string `json:"ramGib,omitempty"` + + // TotalCostOnDemand Total cost of on-demand instances for the given time period. + TotalCostOnDemand *string `json:"totalCostOnDemand,omitempty"` + + // TotalCostSpot Total cost of spot instances for the given time period. + TotalCostSpot *string `json:"totalCostSpot,omitempty"` + + // TotalCostSpotFallback Total cost of spot-fallback instances for the given time period. + TotalCostSpotFallback *string `json:"totalCostSpotFallback,omitempty"` + WorkloadCount *string `json:"workloadCount,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupCostTimedSummariesResponse defines model for costreport.v1beta1.GetAllocationGroupCostTimedSummariesResponse. +type CostreportV1beta1GetAllocationGroupCostTimedSummariesResponse struct { + Items *[]CostreportV1beta1GetAllocationGroupCostTimedSummariesResponseGroupItem `json:"items,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupCostTimedSummariesResponseGroupItem defines model for costreport.v1beta1.GetAllocationGroupCostTimedSummariesResponse.GroupItem. +type CostreportV1beta1GetAllocationGroupCostTimedSummariesResponseGroupItem struct { + // GroupId Allocation group ID. + GroupId *string `json:"groupId,omitempty"` + + // GroupName Allocation group name. + GroupName *string `json:"groupName,omitempty"` + + // Items Allocation group cost entries. + Items *[]CostreportV1beta1GetAllocationGroupCostTimedSummariesResponseSummary `json:"items,omitempty"` + + // Versions Allocation group version history. + Versions *[]CostreportV1beta1AllocationGroupVersionDetails `json:"versions,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupCostTimedSummariesResponseSummary Defines cost details for a given time. +type CostreportV1beta1GetAllocationGroupCostTimedSummariesResponseSummary struct { + // CpuCost Total CPU cost of on-demand instances for the given time period. + CpuCost *string `json:"cpuCost,omitempty"` + + // CpuCount Average number of CPUs used for the given time period. + CpuCount *string `json:"cpuCount,omitempty"` + + // GpuCost Total GPU cost of on-demand instances for the given time period. + GpuCost *string `json:"gpuCost,omitempty"` + + // GpuCount Average number of GPUs for the given time period. + GpuCount *string `json:"gpuCount,omitempty"` + + // RamCost Total RAM cost of on-demand instances for the given time period. + RamCost *string `json:"ramCost,omitempty"` + + // RamGib Average RAM GiB used for the given time period. + RamGib *string `json:"ramGib,omitempty"` + + // Timestamp Timestamp of entry. + Timestamp *time.Time `json:"timestamp,omitempty"` + + // TotalCostOnDemand Total cost of on-demand instances for the given time period. + TotalCostOnDemand *string `json:"totalCostOnDemand,omitempty"` + + // TotalCostSpot Total cost of spot instances for the given time period. + TotalCostSpot *string `json:"totalCostSpot,omitempty"` + + // TotalCostSpotFallback Total cost of spot-fallback instances for the given time period. + TotalCostSpotFallback *string `json:"totalCostSpotFallback,omitempty"` + WorkloadCount *string `json:"workloadCount,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupEfficiencySummaryResponse defines model for costreport.v1beta1.GetAllocationGroupEfficiencySummaryResponse. +type CostreportV1beta1GetAllocationGroupEfficiencySummaryResponse struct { + Items *[]CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseCostAllocationGroupItem `json:"items,omitempty"` + + // TopItems Top N allocation groups with highest cost impact. + TopItems *[]CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseTopItem `json:"topItems,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseCostAllocationGroupItem defines model for costreport.v1beta1.GetAllocationGroupEfficiencySummaryResponse.CostAllocationGroupItem. +type CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseCostAllocationGroupItem struct { + // CostImpact Defines cost impact of wasted resources per lifecycle. + CostImpact *CostreportV1beta1CostImpact `json:"costImpact,omitempty"` + GroupId *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` + + // Requests Defines the resources. + Requests *CostreportV1beta1Resources `json:"requests,omitempty"` + + // TotalCostImpact Total cost impact of the group. Sum of cost impacts by lifecycle. + TotalCostImpact *string `json:"totalCostImpact,omitempty"` + + // Usage Defines the resources. + Usage *CostreportV1beta1Resources `json:"usage,omitempty"` + + // Versions Allocation group version history. + Versions *[]CostreportV1beta1AllocationGroupVersionDetails `json:"versions,omitempty"` + + // Waste Defines the resources. + Waste *CostreportV1beta1Resources `json:"waste,omitempty"` + + // WorkloadCount Number of workloads for the given time period. + WorkloadCount *int32 `json:"workloadCount,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseCostImpactHistoryItem defines model for costreport.v1beta1.GetAllocationGroupEfficiencySummaryResponse.CostImpactHistoryItem. +type CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseCostImpactHistoryItem struct { + CostImpact *string `json:"costImpact,omitempty"` + + // Timestamp Timestamp of the cost impact. + Timestamp *time.Time `json:"timestamp,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseTopItem defines model for costreport.v1beta1.GetAllocationGroupEfficiencySummaryResponse.TopItem. +type CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseTopItem struct { + // CostImpactHistory Cost impact of the group with daily breakdown. + CostImpactHistory *[]CostreportV1beta1GetAllocationGroupEfficiencySummaryResponseCostImpactHistoryItem `json:"costImpactHistory,omitempty"` + + // GroupId Allocation group ID. + GroupId *string `json:"groupId,omitempty"` + + // GroupName Allocation group name. + GroupName *string `json:"groupName,omitempty"` + + // TotalCostImpact Total cost impact of the group. + TotalCostImpact *string `json:"totalCostImpact,omitempty"` + + // Versions Allocation group version history. + Versions *[]CostreportV1beta1AllocationGroupVersionDetails `json:"versions,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupTotalCostTimedResponse defines model for costreport.v1beta1.GetAllocationGroupTotalCostTimedResponse. +type CostreportV1beta1GetAllocationGroupTotalCostTimedResponse struct { + Count *string `json:"count,omitempty"` + Items *[]CostreportV1beta1GetAllocationGroupTotalCostTimedResponseGroupItem `json:"items,omitempty"` + + // NextCursor next_cursor is a token to be used in future request to retrieve subsequent items. If empty - no more items present. + NextCursor *string `json:"nextCursor,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupTotalCostTimedResponseCostItem Defines cost details for a given time. +type CostreportV1beta1GetAllocationGroupTotalCostTimedResponseCostItem struct { + // Timestamp Timestamp of entry. + Timestamp *time.Time `json:"timestamp,omitempty"` + + // TotalCost Total cost for the given time period. + TotalCost *string `json:"totalCost,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupTotalCostTimedResponseGroupItem defines model for costreport.v1beta1.GetAllocationGroupTotalCostTimedResponse.GroupItem. +type CostreportV1beta1GetAllocationGroupTotalCostTimedResponseGroupItem struct { + // GroupId Allocation group ID. + GroupId *string `json:"groupId,omitempty"` + + // GroupName Allocation group name. + GroupName *string `json:"groupName,omitempty"` + + // Items Allocation group cost entries. + Items *[]CostreportV1beta1GetAllocationGroupTotalCostTimedResponseCostItem `json:"items,omitempty"` + + // Versions Allocation group version history. + Versions *[]CostreportV1beta1AllocationGroupVersionDetails `json:"versions,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupWorkloadCostsResponse Defines cluster workload cost response. +type CostreportV1beta1GetAllocationGroupWorkloadCostsResponse struct { + Count *string `json:"count,omitempty"` + GroupId *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` + + // Items Workload entries. + Items *[]CostreportV1beta1GetAllocationGroupWorkloadCostsResponseWorkloadItem `json:"items,omitempty"` + + // NextCursor next_cursor is a token to be used in future request to retrieve subsequent items. If empty - no more items present. + NextCursor *string `json:"nextCursor,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupWorkloadCostsResponseWorkloadItem Defines a workload. +type CostreportV1beta1GetAllocationGroupWorkloadCostsResponseWorkloadItem struct { + ClusterId *string `json:"clusterId,omitempty"` + + // CpuCost Total CPU cost of on-demand instances for the given time period. + CpuCost *string `json:"cpuCost,omitempty"` + + // CpuCount Average number of CPUs used for the given time period. + CpuCount *string `json:"cpuCount,omitempty"` + + // GpuCost Total GPU cost of on-demand instances for the given time period. + GpuCost *string `json:"gpuCost,omitempty"` + + // GpuCount Average number of GPUs for the given time period. + GpuCount *string `json:"gpuCount,omitempty"` + + // Namespace Namespace the workload is in. + Namespace *string `json:"namespace,omitempty"` + + // PodCount Average amount of pods included to allocation group based on filter criteria. + PodCount *string `json:"podCount,omitempty"` + + // RamCost Total RAM cost of on-demand instances for the given time period. + RamCost *string `json:"ramCost,omitempty"` + + // RamGib Average RAM GiB used for the given time period. + RamGib *string `json:"ramGib,omitempty"` + + // TotalCostOnDemand Total cost of on-demand instances for the given time period. + TotalCostOnDemand *string `json:"totalCostOnDemand,omitempty"` + + // TotalCostSpot Total cost of spot instances for the given time period. + TotalCostSpot *string `json:"totalCostSpot,omitempty"` + + // TotalCostSpotFallback Total cost of spot-fallback instances for the given time period. + TotalCostSpotFallback *string `json:"totalCostSpotFallback,omitempty"` + TotalPodCount *string `json:"totalPodCount,omitempty"` + + // WorkloadName Name of the workload. + WorkloadName *string `json:"workloadName,omitempty"` + + // WorkloadType Type of the workload. + WorkloadType *string `json:"workloadType,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupWorkloadsEfficiencyResponse Defines cluster workload cost response. +type CostreportV1beta1GetAllocationGroupWorkloadsEfficiencyResponse struct { + Count *string `json:"count,omitempty"` + GroupId *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` + + // NextCursor next_cursor is a token to be used in future request to retrieve subsequent items. If empty - no more items present. + NextCursor *string `json:"nextCursor,omitempty"` + + // Workloads Workload entries. + Workloads *[]CostreportV1beta1GetAllocationGroupWorkloadsEfficiencyResponseWorkloadItem `json:"workloads,omitempty"` +} + +// CostreportV1beta1GetAllocationGroupWorkloadsEfficiencyResponseWorkloadItem Defines a workload. +type CostreportV1beta1GetAllocationGroupWorkloadsEfficiencyResponseWorkloadItem struct { + ClusterId *string `json:"clusterId,omitempty"` + + // CostImpact Defines cost impact of wasted resources per lifecycle. + CostImpact *CostreportV1beta1CostImpact `json:"costImpact,omitempty"` + + // Namespace Namespace the workload is in. + Namespace *string `json:"namespace,omitempty"` + + // PodCount Average amount of pods included to allocation group based on filter criteria. + PodCount *string `json:"podCount,omitempty"` + + // Requests Defines the resources. + Requests *CostreportV1beta1Resources `json:"requests,omitempty"` + + // TotalCostImpact Total cost impact of the workload. Sum of cost impacts by lifecycle. + TotalCostImpact *string `json:"totalCostImpact,omitempty"` + TotalPodCount *string `json:"totalPodCount,omitempty"` + + // Usage Defines the resources. + Usage *CostreportV1beta1Resources `json:"usage,omitempty"` + + // Waste Defines the resources. + Waste *CostreportV1beta1Resources `json:"waste,omitempty"` + + // WorkloadName Name of the workload. + WorkloadName *string `json:"workloadName,omitempty"` + + // WorkloadType Type of the workload. + WorkloadType *string `json:"workloadType,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponse defines model for costreport.v1beta1.GetCostAllocationGroupDataTransferSummaryResponse. +type CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponse struct { + Groups *[]CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseCostAllocationGroupItem `json:"groups,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseCostAllocationGroupItem defines model for costreport.v1beta1.GetCostAllocationGroupDataTransferSummaryResponse.CostAllocationGroupItem. +type CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseCostAllocationGroupItem struct { + GroupId *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` + + // Items Group traffic entries. + Items *[]CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseCostItem `json:"items,omitempty"` + WorkloadCount *string `json:"workloadCount,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseCostItem Defines a workload. +type CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseCostItem struct { + // EgressMetrics Defines a datatransfer costs item. + EgressMetrics *CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseDataTransferCostItem `json:"egressMetrics,omitempty"` + + // IngressMetrics Defines a datatransfer costs item. + IngressMetrics *CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseDataTransferCostItem `json:"ingressMetrics,omitempty"` + + // Timestamp Timestamp of entry. + Timestamp *time.Time `json:"timestamp,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseDataTransferCostItem Defines a datatransfer costs item. +type CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponseDataTransferCostItem struct { + CloudApiBytes *string `json:"cloudApiBytes,omitempty"` + CloudApiCost *string `json:"cloudApiCost,omitempty"` + InterRegionBytes *string `json:"interRegionBytes,omitempty"` + InterRegionCost *string `json:"interRegionCost,omitempty"` + InterZoneBytes *string `json:"interZoneBytes,omitempty"` + InterZoneCost *string `json:"interZoneCost,omitempty"` + InternetBytes *string `json:"internetBytes,omitempty"` + InternetCost *string `json:"internetCost,omitempty"` + IntraZoneBytes *string `json:"intraZoneBytes,omitempty"` + IntraZoneCost *string `json:"intraZoneCost,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponse Defines cluster workloads datatransfer cost response aggregated over the requested period. +type CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponse struct { + Clusters *[]CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseClusterDetails `json:"clusters,omitempty"` + GroupId *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` + + // NoDataReason Defines a list of possible reasons why report data is missing. + NoDataReason *CostreportV1beta1NoDataReason `json:"noDataReason,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseClusterDetails defines model for costreport.v1beta1.GetCostAllocationGroupDataTransferWorkloadsResponse.ClusterDetails. +type CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseClusterDetails struct { + ClusterId *string `json:"clusterId,omitempty"` + + // Items Workload entries. + Items *[]CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseWorkloadItem `json:"items,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseWorkloadDataTransferCostItem Defines an aggregated workloads datatransfer cost over requested period. +type CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseWorkloadDataTransferCostItem struct { + CloudApiBytes *string `json:"cloudApiBytes,omitempty"` + CloudApiCost *string `json:"cloudApiCost,omitempty"` + InterRegionBytes *string `json:"interRegionBytes,omitempty"` + InterRegionCost *string `json:"interRegionCost,omitempty"` + InterZoneBytes *string `json:"interZoneBytes,omitempty"` + InterZoneCost *string `json:"interZoneCost,omitempty"` + InternetBytes *string `json:"internetBytes,omitempty"` + InternetCost *string `json:"internetCost,omitempty"` + IntraZoneBytes *string `json:"intraZoneBytes,omitempty"` + IntraZoneCost *string `json:"intraZoneCost,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseWorkloadItem Defines a workload. +type CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseWorkloadItem struct { + // EgressMetrics Defines an aggregated workloads datatransfer cost over requested period. + EgressMetrics *CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseWorkloadDataTransferCostItem `json:"egressMetrics,omitempty"` + + // IngressMetrics Defines an aggregated workloads datatransfer cost over requested period. + IngressMetrics *CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponseWorkloadDataTransferCostItem `json:"ingressMetrics,omitempty"` + + // Namespace Namespace the workload is in. + Namespace *string `json:"namespace,omitempty"` + + // PodCount Average pod count of the workload within requested period. + PodCount *string `json:"podCount,omitempty"` + + // WorkloadName Name of the workload. + WorkloadName *string `json:"workloadName,omitempty"` + + // WorkloadType Type of the workload. + WorkloadType *string `json:"workloadType,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupSummaryResponse defines model for costreport.v1beta1.GetCostAllocationGroupSummaryResponse. +type CostreportV1beta1GetCostAllocationGroupSummaryResponse struct { + Items *[]CostreportV1beta1GetCostAllocationGroupSummaryResponseCostAllocationGroupItem `json:"items,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupSummaryResponseCostAllocationGroupItem defines model for costreport.v1beta1.GetCostAllocationGroupSummaryResponse.CostAllocationGroupItem. +type CostreportV1beta1GetCostAllocationGroupSummaryResponseCostAllocationGroupItem struct { + GroupId *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` + Items *[]CostreportV1beta1GetCostAllocationGroupSummaryResponseCostItem `json:"items,omitempty"` + + // WorkloadCount Count of workloads for the given time period. + WorkloadCount *string `json:"workloadCount,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupSummaryResponseCostItem Defines cost details for a given time. +type CostreportV1beta1GetCostAllocationGroupSummaryResponseCostItem struct { + // CpuCostOnDemand Average CPU cost of on-demand instances for the given time period. + CpuCostOnDemand *string `json:"cpuCostOnDemand,omitempty"` + + // CpuCostSpot Average CPU cost of spot instances for the given time period. + CpuCostSpot *string `json:"cpuCostSpot,omitempty"` + + // CpuCostSpotFallback Average CPU cost of spot-fallback instances for the given time period. + CpuCostSpotFallback *string `json:"cpuCostSpotFallback,omitempty"` + + // CpuCountOnDemand Average number of CPUs used on on-demand instances for the given time period. + CpuCountOnDemand *string `json:"cpuCountOnDemand,omitempty"` + + // CpuCountSpot Average number of CPUs used on spot instances for the given time period. + CpuCountSpot *string `json:"cpuCountSpot,omitempty"` + + // CpuCountSpotFallback Average number of CPUs used on spot-fallback instances for the given time period. + CpuCountSpotFallback *string `json:"cpuCountSpotFallback,omitempty"` + + // GpuCostOnDemand Average GPU cost of on-demand instances for the given time period. + GpuCostOnDemand *string `json:"gpuCostOnDemand,omitempty"` + + // GpuCostSpot Average GPU cost of spot instances for the given time period. + GpuCostSpot *string `json:"gpuCostSpot,omitempty"` + + // GpuCostSpotFallback Average GPU cost of spot-fallback instances for the given time period. + GpuCostSpotFallback *string `json:"gpuCostSpotFallback,omitempty"` + + // GpuCountOnDemand Average number of GPUs used on on-demand instances for the given time period. + GpuCountOnDemand *string `json:"gpuCountOnDemand,omitempty"` + + // GpuCountSpot Average number of GPUs used on spot instances for the given time period. + GpuCountSpot *string `json:"gpuCountSpot,omitempty"` + + // GpuCountSpotFallback Average number of GPUs used on spot-fallback instances for the given time period. + GpuCountSpotFallback *string `json:"gpuCountSpotFallback,omitempty"` + + // PodCountOnDemand Average amount of pods on on-demand instances for the given time period. + PodCountOnDemand *string `json:"podCountOnDemand,omitempty"` + + // PodCountSpot Average amount of pods on spot instances for the given time period. + PodCountSpot *string `json:"podCountSpot,omitempty"` + + // PodCountSpotFallback Average amount of pods on spot-fallback instances for the given time period. + PodCountSpotFallback *string `json:"podCountSpotFallback,omitempty"` + + // RamCostOnDemand Average RAM cost of on-demand instances for the given time period. + RamCostOnDemand *string `json:"ramCostOnDemand,omitempty"` + + // RamCostSpot Average RAM cost of spot instances for the given time period. + RamCostSpot *string `json:"ramCostSpot,omitempty"` + + // RamCostSpotFallback Average RAM cost of spot-fallback instances for the given time period. + RamCostSpotFallback *string `json:"ramCostSpotFallback,omitempty"` + + // RamGibOnDemand Average RAM GiB used on on-demand instances for the given time period. + RamGibOnDemand *string `json:"ramGibOnDemand,omitempty"` + + // RamGibSpot Average RAM GiB used on spot instances for the given time period. + RamGibSpot *string `json:"ramGibSpot,omitempty"` + + // RamGibSpotFallback Average RAM GiB used on spot-fallback instances for the given time period. + RamGibSpotFallback *string `json:"ramGibSpotFallback,omitempty"` + + // Timestamp Timestamp of entry. + Timestamp *time.Time `json:"timestamp,omitempty"` + + // TotalCostOnDemand Total cost of on-demand instances for the given time period. + TotalCostOnDemand *string `json:"totalCostOnDemand,omitempty"` + + // TotalCostSpot Total cost of spot instances for the given time period. + TotalCostSpot *string `json:"totalCostSpot,omitempty"` + + // TotalCostSpotFallback Total cost of spot-fallback instances for the given time period. + TotalCostSpotFallback *string `json:"totalCostSpotFallback,omitempty"` + + // WorkloadCount Number of workloads included in group. + WorkloadCount *string `json:"workloadCount,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupWorkloadsResponse Defines cluster workload cost response. +type CostreportV1beta1GetCostAllocationGroupWorkloadsResponse struct { + GroupId *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` + + // Items Workload entries. + Items *[]CostreportV1beta1GetCostAllocationGroupWorkloadsResponseWorkloadItem `json:"items,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupWorkloadsResponseClusterInfo defines model for costreport.v1beta1.GetCostAllocationGroupWorkloadsResponse.ClusterInfo. +type CostreportV1beta1GetCostAllocationGroupWorkloadsResponseClusterInfo struct { + Id *string `json:"id,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupWorkloadsResponseWorkloadCostItem Defines a workloads cost for a given time. +type CostreportV1beta1GetCostAllocationGroupWorkloadsResponseWorkloadCostItem struct { + // CpuCostOnDemand Average CPU cost of the workload that are on-demand instances for the given time period. + CpuCostOnDemand *string `json:"cpuCostOnDemand,omitempty"` + + // CpuCostSpot Average CPU cost of the workload that are spot instances for the given time period. + CpuCostSpot *string `json:"cpuCostSpot,omitempty"` + + // CpuCostSpotFallback Average CPU cost of the workload that are spot-fallback instances for the given time period. + CpuCostSpotFallback *string `json:"cpuCostSpotFallback,omitempty"` + + // CpuCountOnDemand Average number of CPUs of the workload that is on on-demand instances for the given time period. + CpuCountOnDemand *string `json:"cpuCountOnDemand,omitempty"` + + // CpuCountSpot Average number of CPUs of the workload that is on spot instances for the given time period. + CpuCountSpot *string `json:"cpuCountSpot,omitempty"` + + // CpuCountSpotFallback Average number of CPUs of the workload that is on spot-fallback instances for the given time period. + CpuCountSpotFallback *string `json:"cpuCountSpotFallback,omitempty"` + + // GpuCostOnDemand Average GPU cost of the workload that is on on-demand instances for the given time period. + GpuCostOnDemand *string `json:"gpuCostOnDemand,omitempty"` + + // GpuCostSpot Average GPU cost of the workload that is on spot instances for the given time period. + GpuCostSpot *string `json:"gpuCostSpot,omitempty"` + + // GpuCostSpotFallback Average GPU cost of the workload that is on spot-fallback instances for the given time period. + GpuCostSpotFallback *string `json:"gpuCostSpotFallback,omitempty"` + + // GpuCountOnDemand Average number of GPUs of the workload that is on on-demand instances for the given time period. + GpuCountOnDemand *string `json:"gpuCountOnDemand,omitempty"` + + // GpuCountSpot Average number of GPUs of the workload that is on spot instances for the given time period. + GpuCountSpot *string `json:"gpuCountSpot,omitempty"` + + // GpuCountSpotFallback Average number of GPUs of the workload that is on spot-fallback instances for the given time period. + GpuCountSpotFallback *string `json:"gpuCountSpotFallback,omitempty"` + + // PodCountOnDemand Average amount of pods for the workload that are on on-demand instances for the given time period. + PodCountOnDemand *string `json:"podCountOnDemand,omitempty"` + + // PodCountSpot Average amount of pods for the workload that are on spot instances for the given time period. + PodCountSpot *string `json:"podCountSpot,omitempty"` + + // PodCountSpotFallback Average amount of pods for the workload that are on spot-fallback instances for the given time period. + PodCountSpotFallback *string `json:"podCountSpotFallback,omitempty"` + + // RamCostOnDemand Average RAM cost of the workload that are on-demand instances for the given time period. + RamCostOnDemand *string `json:"ramCostOnDemand,omitempty"` + + // RamCostSpot Average RAM cost of the workload that are spot instances for the given time period. + RamCostSpot *string `json:"ramCostSpot,omitempty"` + + // RamCostSpotFallback Average RAM cost of the workload that are spot-fallback instances for the given time period. + RamCostSpotFallback *string `json:"ramCostSpotFallback,omitempty"` + + // RamGibOnDemand Average RAM GiB used on on-demand instances for the given time period. + RamGibOnDemand *string `json:"ramGibOnDemand,omitempty"` + + // RamGibSpot Average RAM GiB of the workload that are on spot instances for the given time period. + RamGibSpot *string `json:"ramGibSpot,omitempty"` + + // RamGibSpotFallback Average RAM GiB of the workload that are on spot-fallback instances for the given time period. + RamGibSpotFallback *string `json:"ramGibSpotFallback,omitempty"` + + // Timestamp Timestamp of entry creation. + Timestamp *time.Time `json:"timestamp,omitempty"` + + // TotalCostOnDemand Total cost of the workload that is on on-demand instances for the given time period. + TotalCostOnDemand *string `json:"totalCostOnDemand,omitempty"` + + // TotalCostSpot Total cost of the workload that is on spot instances for the given time period. + TotalCostSpot *string `json:"totalCostSpot,omitempty"` + + // TotalCostSpotFallback Total cost of the workload that is on spot-fallback instances for the given time period. + TotalCostSpotFallback *string `json:"totalCostSpotFallback,omitempty"` +} + +// CostreportV1beta1GetCostAllocationGroupWorkloadsResponseWorkloadItem Defines a workload. +type CostreportV1beta1GetCostAllocationGroupWorkloadsResponseWorkloadItem struct { + Cluster *CostreportV1beta1GetCostAllocationGroupWorkloadsResponseClusterInfo `json:"cluster,omitempty"` + + // Items Cost metrics of the workload. + Items *[]CostreportV1beta1GetCostAllocationGroupWorkloadsResponseWorkloadCostItem `json:"items,omitempty"` + + // Namespace Namespace the workload is in. + Namespace *string `json:"namespace,omitempty"` + + // WorkloadName Name of the workload. + WorkloadName *string `json:"workloadName,omitempty"` + + // WorkloadType Type of the workload. + WorkloadType *string `json:"workloadType,omitempty"` +} + +// CostreportV1beta1ListAllocationGroupsResponse defines model for costreport.v1beta1.ListAllocationGroupsResponse. +type CostreportV1beta1ListAllocationGroupsResponse struct { + Items *[]CostreportV1beta1AllocationGroup `json:"items,omitempty"` +} + +// CostreportV1beta1NoDataReason Defines a list of possible reasons why report data is missing. +type CostreportV1beta1NoDataReason string + +// CostreportV1beta1Resources Defines the resources. +type CostreportV1beta1Resources struct { + // Cpu Defines the cpu resource. + Cpu string `json:"cpu"` + + // MemoryGib Defines the memory resource in GiB. + MemoryGib string `json:"memoryGib"` +} + // ExternalclusterV1AKSClusterParams AKSClusterParams defines AKS-specific arguments. type ExternalclusterV1AKSClusterParams struct { // ClusterResourceGroup Azure cluster resource group. @@ -6544,6 +7261,178 @@ type AuthTokenAPIListAuthTokensParams struct { UserId *string `form:"userId,omitempty" json:"userId,omitempty"` } +// AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams defines parameters for AllocationGroupAPIGetAllocationGroupCostTimedSummaries. +type AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` + + // GroupId Allocation group ID. Leave empty for the full list. + GroupId *string `form:"groupId,omitempty" json:"groupId,omitempty"` +} + +// AllocationGroupAPIGetAllocationGroupCostSummariesParams defines parameters for AllocationGroupAPIGetAllocationGroupCostSummaries. +type AllocationGroupAPIGetAllocationGroupCostSummariesParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` + + // GroupId Allocation group ID. Leave empty for the full list. + GroupId *string `form:"groupId,omitempty" json:"groupId,omitempty"` +} + +// AllocationGroupAPIGetAllocationGroupTotalCostTimedParams defines parameters for AllocationGroupAPIGetAllocationGroupTotalCostTimed. +type AllocationGroupAPIGetAllocationGroupTotalCostTimedParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` + PageLimit *string `form:"page.limit,omitempty" json:"page.limit,omitempty"` + + // PageCursor Cursor that defines token indicating where to start the next page. + // Empty value indicates to start from beginning of the dataset. + PageCursor *string `form:"page.cursor,omitempty" json:"page.cursor,omitempty"` +} + +// AllocationGroupAPIListAllocationGroupsParams defines parameters for AllocationGroupAPIListAllocationGroups. +type AllocationGroupAPIListAllocationGroupsParams struct { + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams defines parameters for AllocationGroupAPIGetCostAllocationGroupDataTransferSummary. +type AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` +} + +// AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams defines parameters for AllocationGroupAPIGetAllocationGroupEfficiencySummary. +type AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` +} + +// AllocationGroupAPIGetCostAllocationGroupSummaryParams defines parameters for AllocationGroupAPIGetCostAllocationGroupSummary. +type AllocationGroupAPIGetCostAllocationGroupSummaryParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams defines parameters for AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads. +type AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCostsParams defines parameters for AllocationGroupAPIGetAllocationGroupWorkloadCosts. +type AllocationGroupAPIGetAllocationGroupWorkloadCostsParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` + PageLimit *string `form:"page.limit,omitempty" json:"page.limit,omitempty"` + + // PageCursor Cursor that defines token indicating where to start the next page. + // Empty value indicates to start from beginning of the dataset. + PageCursor *string `form:"page.cursor,omitempty" json:"page.cursor,omitempty"` + + // SortField Name of the field you want to sort + SortField *string `form:"sort.field,omitempty" json:"sort.field,omitempty"` + + // SortOrder The sort order, possible values ASC or DESC, if not provided asc is the default + // + // - ASC: ASC + // - asc: desc + // - DESC: ASC + // - desc: desc + SortOrder *AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrder `form:"sort.order,omitempty" json:"sort.order,omitempty"` +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrder defines parameters for AllocationGroupAPIGetAllocationGroupWorkloadCosts. +type AllocationGroupAPIGetAllocationGroupWorkloadCostsParamsSortOrder string + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams defines parameters for AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency. +type AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` + PageLimit *string `form:"page.limit,omitempty" json:"page.limit,omitempty"` + + // PageCursor Cursor that defines token indicating where to start the next page. + // Empty value indicates to start from beginning of the dataset. + PageCursor *string `form:"page.cursor,omitempty" json:"page.cursor,omitempty"` + + // SortField Name of the field you want to sort + SortField *string `form:"sort.field,omitempty" json:"sort.field,omitempty"` + + // SortOrder The sort order, possible values ASC or DESC, if not provided asc is the default + // + // - ASC: ASC + // - asc: desc + // - DESC: ASC + // - desc: desc + SortOrder *AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrder `form:"sort.order,omitempty" json:"sort.order,omitempty"` +} + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrder defines parameters for AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency. +type AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParamsSortOrder string + +// AllocationGroupAPIGetCostAllocationGroupWorkloadsParams defines parameters for AllocationGroupAPIGetCostAllocationGroupWorkloads. +type AllocationGroupAPIGetCostAllocationGroupWorkloadsParams struct { + // StartTime Filter items to include from specified time. + StartTime time.Time `form:"startTime" json:"startTime"` + + // EndTime Filter items to include up to specified time. + EndTime time.Time `form:"endTime" json:"endTime"` + + // ClusterIds Cluster IDs for filtering. Leave empty for the full list. + ClusterIds *[]string `form:"clusterIds,omitempty" json:"clusterIds,omitempty"` +} + // InventoryAPIListInstanceTypeNamesParams defines parameters for InventoryAPIListInstanceTypeNames. type InventoryAPIListInstanceTypeNamesParams struct { CloudServiceProviders *[]string `form:"cloudServiceProviders,omitempty" json:"cloudServiceProviders,omitempty"` @@ -7198,6 +8087,12 @@ type AuthTokenAPICreateAuthTokenJSONRequestBody = CastaiAuthtokenV1beta1AuthToke // AuthTokenAPIUpdateAuthTokenJSONRequestBody defines body for AuthTokenAPIUpdateAuthToken for application/json ContentType. type AuthTokenAPIUpdateAuthTokenJSONRequestBody = CastaiAuthtokenV1beta1AuthTokenUpdate +// AllocationGroupAPICreateAllocationGroupJSONRequestBody defines body for AllocationGroupAPICreateAllocationGroup for application/json ContentType. +type AllocationGroupAPICreateAllocationGroupJSONRequestBody = CostreportV1beta1AllocationGroupDetails + +// AllocationGroupAPIUpdateAllocationGroupJSONRequestBody defines body for AllocationGroupAPIUpdateAllocationGroup for application/json ContentType. +type AllocationGroupAPIUpdateAllocationGroupJSONRequestBody = CostreportV1beta1AllocationGroupDetails + // UsersAPICreateInvitationsJSONRequestBody defines body for UsersAPICreateInvitations for application/json ContentType. type UsersAPICreateInvitationsJSONRequestBody = CastaiUsersV1beta1CreateInvitationsRequest diff --git a/castai/sdk/client.gen.go b/castai/sdk/client.gen.go index 69e49d889..e3c521ecf 100644 --- a/castai/sdk/client.gen.go +++ b/castai/sdk/client.gen.go @@ -133,6 +133,55 @@ type ClientInterface interface { AuthTokenAPIUpdateAuthToken(ctx context.Context, id string, body AuthTokenAPIUpdateAuthTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // AllocationGroupAPIGetAllocationGroupCostTimedSummaries request + AllocationGroupAPIGetAllocationGroupCostTimedSummaries(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetAllocationGroupCostSummaries request + AllocationGroupAPIGetAllocationGroupCostSummaries(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupCostSummariesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetAllocationGroupTotalCostTimed request + AllocationGroupAPIGetAllocationGroupTotalCostTimed(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupTotalCostTimedParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIListAllocationGroups request + AllocationGroupAPIListAllocationGroups(ctx context.Context, params *AllocationGroupAPIListAllocationGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPICreateAllocationGroupWithBody request with any body + AllocationGroupAPICreateAllocationGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AllocationGroupAPICreateAllocationGroup(ctx context.Context, body AllocationGroupAPICreateAllocationGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetCostAllocationGroupDataTransferSummary request + AllocationGroupAPIGetCostAllocationGroupDataTransferSummary(ctx context.Context, params *AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetAllocationGroupEfficiencySummary request + AllocationGroupAPIGetAllocationGroupEfficiencySummary(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetCostAllocationGroupSummary request + AllocationGroupAPIGetCostAllocationGroupSummary(ctx context.Context, params *AllocationGroupAPIGetCostAllocationGroupSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads request + AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads(ctx context.Context, groupId string, params *AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetAllocationGroupWorkloadCosts request + AllocationGroupAPIGetAllocationGroupWorkloadCosts(ctx context.Context, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency request + AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency(ctx context.Context, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetCostAllocationGroupWorkloads request + AllocationGroupAPIGetCostAllocationGroupWorkloads(ctx context.Context, groupId string, params *AllocationGroupAPIGetCostAllocationGroupWorkloadsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIDeleteAllocationGroup request + AllocationGroupAPIDeleteAllocationGroup(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIGetAllocationGroup request + AllocationGroupAPIGetAllocationGroup(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AllocationGroupAPIUpdateAllocationGroupWithBody request with any body + AllocationGroupAPIUpdateAllocationGroupWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AllocationGroupAPIUpdateAllocationGroup(ctx context.Context, id string, body AllocationGroupAPIUpdateAllocationGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // InventoryAPIListInstanceTypeNames request InventoryAPIListInstanceTypeNames(ctx context.Context, params *InventoryAPIListInstanceTypeNamesParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -993,6 +1042,210 @@ func (c *Client) AuthTokenAPIUpdateAuthToken(ctx context.Context, id string, bod return c.Client.Do(req) } +func (c *Client) AllocationGroupAPIGetAllocationGroupCostTimedSummaries(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetAllocationGroupCostTimedSummariesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetAllocationGroupCostSummaries(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupCostSummariesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetAllocationGroupCostSummariesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetAllocationGroupTotalCostTimed(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupTotalCostTimedParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetAllocationGroupTotalCostTimedRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIListAllocationGroups(ctx context.Context, params *AllocationGroupAPIListAllocationGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIListAllocationGroupsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPICreateAllocationGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPICreateAllocationGroupRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPICreateAllocationGroup(ctx context.Context, body AllocationGroupAPICreateAllocationGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPICreateAllocationGroupRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetCostAllocationGroupDataTransferSummary(ctx context.Context, params *AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetCostAllocationGroupDataTransferSummaryRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetAllocationGroupEfficiencySummary(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetAllocationGroupEfficiencySummaryRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetCostAllocationGroupSummary(ctx context.Context, params *AllocationGroupAPIGetCostAllocationGroupSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetCostAllocationGroupSummaryRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads(ctx context.Context, groupId string, params *AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsRequest(c.Server, groupId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetAllocationGroupWorkloadCosts(ctx context.Context, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetAllocationGroupWorkloadCostsRequest(c.Server, groupId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency(ctx context.Context, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyRequest(c.Server, groupId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetCostAllocationGroupWorkloads(ctx context.Context, groupId string, params *AllocationGroupAPIGetCostAllocationGroupWorkloadsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetCostAllocationGroupWorkloadsRequest(c.Server, groupId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIDeleteAllocationGroup(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIDeleteAllocationGroupRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIGetAllocationGroup(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIGetAllocationGroupRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIUpdateAllocationGroupWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIUpdateAllocationGroupRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AllocationGroupAPIUpdateAllocationGroup(ctx context.Context, id string, body AllocationGroupAPIUpdateAllocationGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAllocationGroupAPIUpdateAllocationGroupRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) InventoryAPIListInstanceTypeNames(ctx context.Context, params *InventoryAPIListInstanceTypeNamesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewInventoryAPIListInstanceTypeNamesRequest(c.Server, params) if err != nil { @@ -4461,8 +4714,8 @@ func NewAuthTokenAPIUpdateAuthTokenRequestWithBody(server string, id string, con return req, nil } -// NewInventoryAPIListInstanceTypeNamesRequest generates requests for InventoryAPIListInstanceTypeNames -func NewInventoryAPIListInstanceTypeNamesRequest(server string, params *InventoryAPIListInstanceTypeNamesParams) (*http.Request, error) { +// NewAllocationGroupAPIGetAllocationGroupCostTimedSummariesRequest generates requests for AllocationGroupAPIGetAllocationGroupCostTimedSummaries +func NewAllocationGroupAPIGetAllocationGroupCostTimedSummariesRequest(server string, params *AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -4470,7 +4723,7 @@ func NewInventoryAPIListInstanceTypeNamesRequest(server string, params *Inventor return nil, err } - operationPath := fmt.Sprintf("/v1/instances/types") + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-group-costs") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4483,25 +4736,33 @@ func NewInventoryAPIListInstanceTypeNamesRequest(server string, params *Inventor if params != nil { queryValues := queryURL.Query() - if params.CloudServiceProviders != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cloudServiceProviders", runtime.ParamLocationQuery, *params.CloudServiceProviders); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) } } + } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } - if params.PageLimit != nil { + if params.ClusterIds != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4515,9 +4776,9 @@ func NewInventoryAPIListInstanceTypeNamesRequest(server string, params *Inventor } - if params.PageCursor != nil { + if params.GroupId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupId", runtime.ParamLocationQuery, *params.GroupId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4542,8 +4803,8 @@ func NewInventoryAPIListInstanceTypeNamesRequest(server string, params *Inventor return req, nil } -// NewUsersAPIListInvitationsRequest generates requests for UsersAPIListInvitations -func NewUsersAPIListInvitationsRequest(server string, params *UsersAPIListInvitationsParams) (*http.Request, error) { +// NewAllocationGroupAPIGetAllocationGroupCostSummariesRequest generates requests for AllocationGroupAPIGetAllocationGroupCostSummaries +func NewAllocationGroupAPIGetAllocationGroupCostSummariesRequest(server string, params *AllocationGroupAPIGetAllocationGroupCostSummariesParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -4551,7 +4812,7 @@ func NewUsersAPIListInvitationsRequest(server string, params *UsersAPIListInvita return nil, err } - operationPath := fmt.Sprintf("/v1/invitations") + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-group-summaries") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4564,27 +4825,51 @@ func NewUsersAPIListInvitationsRequest(server string, params *UsersAPIListInvita if params != nil { queryValues := queryURL.Query() - if params.PageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) } } - } - if params.PageCursor != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.ClusterIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GroupId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupId", runtime.ParamLocationQuery, *params.GroupId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err } else { for k, v := range parsed { @@ -4607,19 +4892,8 @@ func NewUsersAPIListInvitationsRequest(server string, params *UsersAPIListInvita return req, nil } -// NewUsersAPICreateInvitationsRequest calls the generic UsersAPICreateInvitations builder with application/json body -func NewUsersAPICreateInvitationsRequest(server string, body UsersAPICreateInvitationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUsersAPICreateInvitationsRequestWithBody(server, "application/json", bodyReader) -} - -// NewUsersAPICreateInvitationsRequestWithBody generates requests for UsersAPICreateInvitations with any type of body -func NewUsersAPICreateInvitationsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewAllocationGroupAPIGetAllocationGroupTotalCostTimedRequest generates requests for AllocationGroupAPIGetAllocationGroupTotalCostTimed +func NewAllocationGroupAPIGetAllocationGroupTotalCostTimedRequest(server string, params *AllocationGroupAPIGetAllocationGroupTotalCostTimedParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -4627,7 +4901,7 @@ func NewUsersAPICreateInvitationsRequestWithBody(server string, contentType stri return nil, err } - operationPath := fmt.Sprintf("/v1/invitations") + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-group-totals") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4637,33 +4911,102 @@ func NewUsersAPICreateInvitationsRequestWithBody(server string, contentType stri return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - req.Header.Add("Content-Type", contentType) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewUsersAPIDeleteInvitationRequest generates requests for UsersAPIDeleteInvitation -func NewUsersAPIDeleteInvitationRequest(server string, id string) (*http.Request, error) { - var err error + if params.ClusterIds != nil { - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + } + + if params.PageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageCursor != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } + return req, nil +} + +// NewAllocationGroupAPIListAllocationGroupsRequest generates requests for AllocationGroupAPIListAllocationGroups +func NewAllocationGroupAPIListAllocationGroupsRequest(server string, params *AllocationGroupAPIListAllocationGroupsParams) (*http.Request, error) { + var err error + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/invitations/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4673,7 +5016,29 @@ func NewUsersAPIDeleteInvitationRequest(server string, id string) (*http.Request return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if params != nil { + queryValues := queryURL.Query() + + if params.ClusterIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -4681,34 +5046,27 @@ func NewUsersAPIDeleteInvitationRequest(server string, id string) (*http.Request return req, nil } -// NewUsersAPIClaimInvitationRequest calls the generic UsersAPIClaimInvitation builder with application/json body -func NewUsersAPIClaimInvitationRequest(server string, invitationId string, body UsersAPIClaimInvitationJSONRequestBody) (*http.Request, error) { +// NewAllocationGroupAPICreateAllocationGroupRequest calls the generic AllocationGroupAPICreateAllocationGroup builder with application/json body +func NewAllocationGroupAPICreateAllocationGroupRequest(server string, body AllocationGroupAPICreateAllocationGroupJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUsersAPIClaimInvitationRequestWithBody(server, invitationId, "application/json", bodyReader) + return NewAllocationGroupAPICreateAllocationGroupRequestWithBody(server, "application/json", bodyReader) } -// NewUsersAPIClaimInvitationRequestWithBody generates requests for UsersAPIClaimInvitation with any type of body -func NewUsersAPIClaimInvitationRequestWithBody(server string, invitationId string, contentType string, body io.Reader) (*http.Request, error) { +// NewAllocationGroupAPICreateAllocationGroupRequestWithBody generates requests for AllocationGroupAPICreateAllocationGroup with any type of body +func NewAllocationGroupAPICreateAllocationGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invitationId", runtime.ParamLocationPath, invitationId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/invitations/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4728,23 +5086,16 @@ func NewUsersAPIClaimInvitationRequestWithBody(server string, invitationId strin return req, nil } -// NewEvictorAPIGetAdvancedConfigRequest generates requests for EvictorAPIGetAdvancedConfig -func NewEvictorAPIGetAdvancedConfigRequest(server string, clusterId string) (*http.Request, error) { +// NewAllocationGroupAPIGetCostAllocationGroupDataTransferSummaryRequest generates requests for AllocationGroupAPIGetCostAllocationGroupDataTransferSummary +func NewAllocationGroupAPIGetCostAllocationGroupDataTransferSummaryRequest(server string, params *AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/evictor-advanced-config", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/datatransfer-costs/summary") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4754,6 +5105,52 @@ func NewEvictorAPIGetAdvancedConfigRequest(server string, clusterId string) (*ht return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.ClusterIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -4762,34 +5159,16 @@ func NewEvictorAPIGetAdvancedConfigRequest(server string, clusterId string) (*ht return req, nil } -// NewEvictorAPIUpsertAdvancedConfigRequest calls the generic EvictorAPIUpsertAdvancedConfig builder with application/json body -func NewEvictorAPIUpsertAdvancedConfigRequest(server string, clusterId string, body EvictorAPIUpsertAdvancedConfigJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewEvictorAPIUpsertAdvancedConfigRequestWithBody(server, clusterId, "application/json", bodyReader) -} - -// NewEvictorAPIUpsertAdvancedConfigRequestWithBody generates requests for EvictorAPIUpsertAdvancedConfig with any type of body -func NewEvictorAPIUpsertAdvancedConfigRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewAllocationGroupAPIGetAllocationGroupEfficiencySummaryRequest generates requests for AllocationGroupAPIGetAllocationGroupEfficiencySummary +func NewAllocationGroupAPIGetAllocationGroupEfficiencySummaryRequest(server string, params *AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/evictor-advanced-config", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/efficiency/summary") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4799,80 +5178,70 @@ func NewEvictorAPIUpsertAdvancedConfigRequestWithBody(server string, clusterId s return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewNodeTemplatesAPIFilterInstanceTypesRequest calls the generic NodeTemplatesAPIFilterInstanceTypes builder with application/json body -func NewNodeTemplatesAPIFilterInstanceTypesRequest(server string, clusterId string, body NodeTemplatesAPIFilterInstanceTypesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewNodeTemplatesAPIFilterInstanceTypesRequestWithBody(server, clusterId, "application/json", bodyReader) -} + if params != nil { + queryValues := queryURL.Query() -// NewNodeTemplatesAPIFilterInstanceTypesRequestWithBody generates requests for NodeTemplatesAPIFilterInstanceTypes with any type of body -func NewNodeTemplatesAPIFilterInstanceTypesRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + if params.ClusterIds != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/filter-instance-types", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewNodeTemplatesAPIGenerateNodeTemplatesRequest generates requests for NodeTemplatesAPIGenerateNodeTemplates -func NewNodeTemplatesAPIGenerateNodeTemplatesRequest(server string, clusterId string) (*http.Request, error) { +// NewAllocationGroupAPIGetCostAllocationGroupSummaryRequest generates requests for AllocationGroupAPIGetCostAllocationGroupSummary +func NewAllocationGroupAPIGetCostAllocationGroupSummaryRequest(server string, params *AllocationGroupAPIGetCostAllocationGroupSummaryParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/generate-node-templates", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/summary") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4882,38 +5251,50 @@ func NewNodeTemplatesAPIGenerateNodeTemplatesRequest(server string, clusterId st return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} + if params != nil { + queryValues := queryURL.Query() -// NewNodeConfigurationAPIListConfigurationsRequest generates requests for NodeConfigurationAPIListConfigurations -func NewNodeConfigurationAPIListConfigurationsRequest(server string, clusterId string) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + if params.ClusterIds != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -4924,24 +5305,13 @@ func NewNodeConfigurationAPIListConfigurationsRequest(server string, clusterId s return req, nil } -// NewNodeConfigurationAPICreateConfigurationRequest calls the generic NodeConfigurationAPICreateConfiguration builder with application/json body -func NewNodeConfigurationAPICreateConfigurationRequest(server string, clusterId string, body NodeConfigurationAPICreateConfigurationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewNodeConfigurationAPICreateConfigurationRequestWithBody(server, clusterId, "application/json", bodyReader) -} - -// NewNodeConfigurationAPICreateConfigurationRequestWithBody generates requests for NodeConfigurationAPICreateConfiguration with any type of body -func NewNodeConfigurationAPICreateConfigurationRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewAllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsRequest generates requests for AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads +func NewAllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsRequest(server string, groupId string, params *AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "groupId", runtime.ParamLocationPath, groupId) if err != nil { return nil, err } @@ -4951,7 +5321,7 @@ func NewNodeConfigurationAPICreateConfigurationRequestWithBody(server string, cl return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/%s/datatransfer-costs/workloads", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4961,40 +5331,34 @@ func NewNodeConfigurationAPICreateConfigurationRequestWithBody(server string, cl return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewNodeConfigurationAPIGetSuggestedConfigurationRequest generates requests for NodeConfigurationAPIGetSuggestedConfiguration -func NewNodeConfigurationAPIGetSuggestedConfigurationRequest(server string, clusterId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/suggestions", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -5005,20 +5369,13 @@ func NewNodeConfigurationAPIGetSuggestedConfigurationRequest(server string, clus return req, nil } -// NewNodeConfigurationAPIDeleteConfigurationRequest generates requests for NodeConfigurationAPIDeleteConfiguration -func NewNodeConfigurationAPIDeleteConfigurationRequest(server string, clusterId string, id string) (*http.Request, error) { +// NewAllocationGroupAPIGetAllocationGroupWorkloadCostsRequest generates requests for AllocationGroupAPIGetAllocationGroupWorkloadCosts +func NewAllocationGroupAPIGetAllocationGroupWorkloadCostsRequest(server string, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadCostsParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "groupId", runtime.ParamLocationPath, groupId) if err != nil { return nil, err } @@ -5028,7 +5385,7 @@ func NewNodeConfigurationAPIDeleteConfigurationRequest(server string, clusterId return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/%s/workload-costs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5038,174 +5395,114 @@ func NewNodeConfigurationAPIDeleteConfigurationRequest(server string, clusterId return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewNodeConfigurationAPIGetConfigurationRequest generates requests for NodeConfigurationAPIGetConfiguration -func NewNodeConfigurationAPIGetConfigurationRequest(server string, clusterId string, id string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewNodeConfigurationAPIUpdateConfigurationRequest calls the generic NodeConfigurationAPIUpdateConfiguration builder with application/json body -func NewNodeConfigurationAPIUpdateConfigurationRequest(server string, clusterId string, id string, body NodeConfigurationAPIUpdateConfigurationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewNodeConfigurationAPIUpdateConfigurationRequestWithBody(server, clusterId, id, "application/json", bodyReader) -} - -// NewNodeConfigurationAPIUpdateConfigurationRequestWithBody generates requests for NodeConfigurationAPIUpdateConfiguration with any type of body -func NewNodeConfigurationAPIUpdateConfigurationRequestWithBody(server string, clusterId string, id string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewNodeConfigurationAPISetDefaultRequest generates requests for NodeConfigurationAPISetDefault -func NewNodeConfigurationAPISetDefaultRequest(server string, clusterId string, id string) (*http.Request, error) { - var err error + if params.ClusterIds != nil { - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + } - var pathParam1 string + if params.PageLimit != nil { - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/%s/default", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.PageCursor != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } + } - return req, nil -} + if params.SortField != nil { -// NewPoliciesAPIGetClusterNodeConstraintsRequest generates requests for PoliciesAPIGetClusterNodeConstraints -func NewPoliciesAPIGetClusterNodeConstraintsRequest(server string, clusterId string) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam0 string + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + if params.SortOrder != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-constraints", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -5216,13 +5513,13 @@ func NewPoliciesAPIGetClusterNodeConstraintsRequest(server string, clusterId str return req, nil } -// NewNodeTemplatesAPIListNodeTemplatesRequest generates requests for NodeTemplatesAPIListNodeTemplates -func NewNodeTemplatesAPIListNodeTemplatesRequest(server string, clusterId string, params *NodeTemplatesAPIListNodeTemplatesParams) (*http.Request, error) { +// NewAllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyRequest generates requests for AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency +func NewAllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyRequest(server string, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "groupId", runtime.ParamLocationPath, groupId) if err != nil { return nil, err } @@ -5232,7 +5529,7 @@ func NewNodeTemplatesAPIListNodeTemplatesRequest(server string, clusterId string return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-templates", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/%s/workload-efficiency", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5245,9 +5542,33 @@ func NewNodeTemplatesAPIListNodeTemplatesRequest(server string, clusterId string if params != nil { queryValues := queryURL.Query() - if params.IncludeDefault != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeDefault", runtime.ParamLocationQuery, *params.IncludeDefault); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.ClusterIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5261,9 +5582,9 @@ func NewNodeTemplatesAPIListNodeTemplatesRequest(server string, clusterId string } - if params.ExcludeStats != nil { + if params.PageLimit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "excludeStats", runtime.ParamLocationQuery, *params.ExcludeStats); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5277,78 +5598,72 @@ func NewNodeTemplatesAPIListNodeTemplatesRequest(server string, clusterId string } - queryURL.RawQuery = queryValues.Encode() - } + if params.PageCursor != nil { - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - return req, nil -} + } -// NewNodeTemplatesAPICreateNodeTemplateRequest calls the generic NodeTemplatesAPICreateNodeTemplate builder with application/json body -func NewNodeTemplatesAPICreateNodeTemplateRequest(server string, clusterId string, body NodeTemplatesAPICreateNodeTemplateJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewNodeTemplatesAPICreateNodeTemplateRequestWithBody(server, clusterId, "application/json", bodyReader) -} + if params.SortField != nil { -// NewNodeTemplatesAPICreateNodeTemplateRequestWithBody generates requests for NodeTemplatesAPICreateNodeTemplate with any type of body -func NewNodeTemplatesAPICreateNodeTemplateRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam0 string + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + if params.SortOrder != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-templates", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewNodeTemplatesAPIDeleteNodeTemplateRequest generates requests for NodeTemplatesAPIDeleteNodeTemplate -func NewNodeTemplatesAPIDeleteNodeTemplateRequest(server string, clusterId string, nodeTemplateName string) (*http.Request, error) { +// NewAllocationGroupAPIGetCostAllocationGroupWorkloadsRequest generates requests for AllocationGroupAPIGetCostAllocationGroupWorkloads +func NewAllocationGroupAPIGetCostAllocationGroupWorkloadsRequest(server string, groupId string, params *AllocationGroupAPIGetCostAllocationGroupWorkloadsParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeTemplateName", runtime.ParamLocationPath, nodeTemplateName) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "groupId", runtime.ParamLocationPath, groupId) if err != nil { return nil, err } @@ -5358,7 +5673,7 @@ func NewNodeTemplatesAPIDeleteNodeTemplateRequest(server string, clusterId strin return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-templates/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/%s/workloads", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5368,39 +5683,67 @@ func NewNodeTemplatesAPIDeleteNodeTemplateRequest(server string, clusterId strin return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewNodeTemplatesAPIUpdateNodeTemplateRequest calls the generic NodeTemplatesAPIUpdateNodeTemplate builder with application/json body -func NewNodeTemplatesAPIUpdateNodeTemplateRequest(server string, clusterId string, nodeTemplateName string, body NodeTemplatesAPIUpdateNodeTemplateJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.ClusterIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewNodeTemplatesAPIUpdateNodeTemplateRequestWithBody(server, clusterId, nodeTemplateName, "application/json", bodyReader) + + return req, nil } -// NewNodeTemplatesAPIUpdateNodeTemplateRequestWithBody generates requests for NodeTemplatesAPIUpdateNodeTemplate with any type of body -func NewNodeTemplatesAPIUpdateNodeTemplateRequestWithBody(server string, clusterId string, nodeTemplateName string, contentType string, body io.Reader) (*http.Request, error) { +// NewAllocationGroupAPIDeleteAllocationGroupRequest generates requests for AllocationGroupAPIDeleteAllocationGroup +func NewAllocationGroupAPIDeleteAllocationGroupRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeTemplateName", runtime.ParamLocationPath, nodeTemplateName) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -5410,7 +5753,7 @@ func NewNodeTemplatesAPIUpdateNodeTemplateRequestWithBody(server string, cluster return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-templates/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5420,23 +5763,21 @@ func NewNodeTemplatesAPIUpdateNodeTemplateRequestWithBody(server string, cluster return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewPoliciesAPIGetClusterPoliciesRequest generates requests for PoliciesAPIGetClusterPolicies -func NewPoliciesAPIGetClusterPoliciesRequest(server string, clusterId string) (*http.Request, error) { +// NewAllocationGroupAPIGetAllocationGroupRequest generates requests for AllocationGroupAPIGetAllocationGroup +func NewAllocationGroupAPIGetAllocationGroupRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -5446,7 +5787,7 @@ func NewPoliciesAPIGetClusterPoliciesRequest(server string, clusterId string) (* return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/policies", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5464,24 +5805,24 @@ func NewPoliciesAPIGetClusterPoliciesRequest(server string, clusterId string) (* return req, nil } -// NewPoliciesAPIUpsertClusterPoliciesRequest calls the generic PoliciesAPIUpsertClusterPolicies builder with application/json body -func NewPoliciesAPIUpsertClusterPoliciesRequest(server string, clusterId string, body PoliciesAPIUpsertClusterPoliciesJSONRequestBody) (*http.Request, error) { +// NewAllocationGroupAPIUpdateAllocationGroupRequest calls the generic AllocationGroupAPIUpdateAllocationGroup builder with application/json body +func NewAllocationGroupAPIUpdateAllocationGroupRequest(server string, id string, body AllocationGroupAPIUpdateAllocationGroupJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPoliciesAPIUpsertClusterPoliciesRequestWithBody(server, clusterId, "application/json", bodyReader) + return NewAllocationGroupAPIUpdateAllocationGroupRequestWithBody(server, id, "application/json", bodyReader) } -// NewPoliciesAPIUpsertClusterPoliciesRequestWithBody generates requests for PoliciesAPIUpsertClusterPolicies with any type of body -func NewPoliciesAPIUpsertClusterPoliciesRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewAllocationGroupAPIUpdateAllocationGroupRequestWithBody generates requests for AllocationGroupAPIUpdateAllocationGroup with any type of body +func NewAllocationGroupAPIUpdateAllocationGroupRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -5491,7 +5832,7 @@ func NewPoliciesAPIUpsertClusterPoliciesRequestWithBody(server string, clusterId return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/policies", pathParam0) + operationPath := fmt.Sprintf("/v1/cost-reports/allocation-groups/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5511,23 +5852,16 @@ func NewPoliciesAPIUpsertClusterPoliciesRequestWithBody(server string, clusterId return req, nil } -// NewScheduledRebalancingAPIListRebalancingJobsRequest generates requests for ScheduledRebalancingAPIListRebalancingJobs -func NewScheduledRebalancingAPIListRebalancingJobsRequest(server string, clusterId string, params *ScheduledRebalancingAPIListRebalancingJobsParams) (*http.Request, error) { +// NewInventoryAPIListInstanceTypeNamesRequest generates requests for InventoryAPIListInstanceTypeNames +func NewInventoryAPIListInstanceTypeNamesRequest(server string, params *InventoryAPIListInstanceTypeNamesParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs", pathParam0) + operationPath := fmt.Sprintf("/v1/instances/types") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5540,9 +5874,41 @@ func NewScheduledRebalancingAPIListRebalancingJobsRequest(server string, cluster if params != nil { queryValues := queryURL.Query() - if params.RebalancingScheduleId != nil { + if params.CloudServiceProviders != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "rebalancingScheduleId", runtime.ParamLocationQuery, *params.RebalancingScheduleId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cloudServiceProviders", runtime.ParamLocationQuery, *params.CloudServiceProviders); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageCursor != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5567,34 +5933,16 @@ func NewScheduledRebalancingAPIListRebalancingJobsRequest(server string, cluster return req, nil } -// NewScheduledRebalancingAPICreateRebalancingJobRequest calls the generic ScheduledRebalancingAPICreateRebalancingJob builder with application/json body -func NewScheduledRebalancingAPICreateRebalancingJobRequest(server string, clusterId string, body ScheduledRebalancingAPICreateRebalancingJobJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewScheduledRebalancingAPICreateRebalancingJobRequestWithBody(server, clusterId, "application/json", bodyReader) -} - -// NewScheduledRebalancingAPICreateRebalancingJobRequestWithBody generates requests for ScheduledRebalancingAPICreateRebalancingJob with any type of body -func NewScheduledRebalancingAPICreateRebalancingJobRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewUsersAPIListInvitationsRequest generates requests for UsersAPIListInvitations +func NewUsersAPIListInvitationsRequest(server string, params *UsersAPIListInvitationsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs", pathParam0) + operationPath := fmt.Sprintf("/v1/invitations") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5604,50 +5952,45 @@ func NewScheduledRebalancingAPICreateRebalancingJobRequestWithBody(server string return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewScheduledRebalancingAPIDeleteRebalancingJobRequest generates requests for ScheduledRebalancingAPIDeleteRebalancingJob -func NewScheduledRebalancingAPIDeleteRebalancingJobRequest(server string, clusterId string, id string) (*http.Request, error) { - var err error + if params != nil { + queryValues := queryURL.Query() - var pathParam0 string + if params.PageLimit != nil { - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam1 string + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } + if params.PageCursor != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -5655,30 +5998,27 @@ func NewScheduledRebalancingAPIDeleteRebalancingJobRequest(server string, cluste return req, nil } -// NewScheduledRebalancingAPIGetRebalancingJobRequest generates requests for ScheduledRebalancingAPIGetRebalancingJob -func NewScheduledRebalancingAPIGetRebalancingJobRequest(server string, clusterId string, id string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) +// NewUsersAPICreateInvitationsRequest calls the generic UsersAPICreateInvitations builder with application/json body +func NewUsersAPICreateInvitationsRequest(server string, body UsersAPICreateInvitationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewUsersAPICreateInvitationsRequestWithBody(server, "application/json", bodyReader) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } +// NewUsersAPICreateInvitationsRequestWithBody generates requests for UsersAPICreateInvitations with any type of body +func NewUsersAPICreateInvitationsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/invitations") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5688,39 +6028,23 @@ func NewScheduledRebalancingAPIGetRebalancingJobRequest(server string, clusterId return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewScheduledRebalancingAPIUpdateRebalancingJobRequest calls the generic ScheduledRebalancingAPIUpdateRebalancingJob builder with application/json body -func NewScheduledRebalancingAPIUpdateRebalancingJobRequest(server string, clusterId string, id string, body ScheduledRebalancingAPIUpdateRebalancingJobJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewScheduledRebalancingAPIUpdateRebalancingJobRequestWithBody(server, clusterId, id, "application/json", bodyReader) + return req, nil } -// NewScheduledRebalancingAPIUpdateRebalancingJobRequestWithBody generates requests for ScheduledRebalancingAPIUpdateRebalancingJob with any type of body -func NewScheduledRebalancingAPIUpdateRebalancingJobRequestWithBody(server string, clusterId string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewUsersAPIDeleteInvitationRequest generates requests for UsersAPIDeleteInvitation +func NewUsersAPIDeleteInvitationRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -5730,7 +6054,7 @@ func NewScheduledRebalancingAPIUpdateRebalancingJobRequestWithBody(server string return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/invitations/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5740,34 +6064,32 @@ func NewScheduledRebalancingAPIUpdateRebalancingJobRequestWithBody(server string return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewScheduledRebalancingAPIPreviewRebalancingScheduleRequest calls the generic ScheduledRebalancingAPIPreviewRebalancingSchedule builder with application/json body -func NewScheduledRebalancingAPIPreviewRebalancingScheduleRequest(server string, clusterId string, body ScheduledRebalancingAPIPreviewRebalancingScheduleJSONRequestBody) (*http.Request, error) { +// NewUsersAPIClaimInvitationRequest calls the generic UsersAPIClaimInvitation builder with application/json body +func NewUsersAPIClaimInvitationRequest(server string, invitationId string, body UsersAPIClaimInvitationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewScheduledRebalancingAPIPreviewRebalancingScheduleRequestWithBody(server, clusterId, "application/json", bodyReader) + return NewUsersAPIClaimInvitationRequestWithBody(server, invitationId, "application/json", bodyReader) } -// NewScheduledRebalancingAPIPreviewRebalancingScheduleRequestWithBody generates requests for ScheduledRebalancingAPIPreviewRebalancingSchedule with any type of body -func NewScheduledRebalancingAPIPreviewRebalancingScheduleRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewUsersAPIClaimInvitationRequestWithBody generates requests for UsersAPIClaimInvitation with any type of body +func NewUsersAPIClaimInvitationRequestWithBody(server string, invitationId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invitationId", runtime.ParamLocationPath, invitationId) if err != nil { return nil, err } @@ -5777,7 +6099,7 @@ func NewScheduledRebalancingAPIPreviewRebalancingScheduleRequestWithBody(server return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-schedule-preview", pathParam0) + operationPath := fmt.Sprintf("/v1/invitations/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5797,16 +6119,23 @@ func NewScheduledRebalancingAPIPreviewRebalancingScheduleRequestWithBody(server return req, nil } -// NewExternalClusterAPIListClustersRequest generates requests for ExternalClusterAPIListClusters -func NewExternalClusterAPIListClustersRequest(server string) (*http.Request, error) { +// NewEvictorAPIGetAdvancedConfigRequest generates requests for EvictorAPIGetAdvancedConfig +func NewEvictorAPIGetAdvancedConfigRequest(server string, clusterId string) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters") + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/evictor-advanced-config", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5824,27 +6153,34 @@ func NewExternalClusterAPIListClustersRequest(server string) (*http.Request, err return req, nil } -// NewExternalClusterAPIRegisterClusterRequest calls the generic ExternalClusterAPIRegisterCluster builder with application/json body -func NewExternalClusterAPIRegisterClusterRequest(server string, body ExternalClusterAPIRegisterClusterJSONRequestBody) (*http.Request, error) { +// NewEvictorAPIUpsertAdvancedConfigRequest calls the generic EvictorAPIUpsertAdvancedConfig builder with application/json body +func NewEvictorAPIUpsertAdvancedConfigRequest(server string, clusterId string, body EvictorAPIUpsertAdvancedConfigJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIRegisterClusterRequestWithBody(server, "application/json", bodyReader) + return NewEvictorAPIUpsertAdvancedConfigRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewExternalClusterAPIRegisterClusterRequestWithBody generates requests for ExternalClusterAPIRegisterCluster with any type of body -func NewExternalClusterAPIRegisterClusterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewEvictorAPIUpsertAdvancedConfigRequestWithBody generates requests for EvictorAPIUpsertAdvancedConfig with any type of body +func NewEvictorAPIUpsertAdvancedConfigRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters") + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/evictor-advanced-config", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5864,40 +6200,24 @@ func NewExternalClusterAPIRegisterClusterRequestWithBody(server string, contentT return req, nil } -// NewExternalClusterAPIGetListNodesFiltersRequest generates requests for ExternalClusterAPIGetListNodesFilters -func NewExternalClusterAPIGetListNodesFiltersRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/filters/nodes") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) +// NewNodeTemplatesAPIFilterInstanceTypesRequest calls the generic NodeTemplatesAPIFilterInstanceTypes builder with application/json body +func NewNodeTemplatesAPIFilterInstanceTypesRequest(server string, clusterId string, body NodeTemplatesAPIFilterInstanceTypesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - - return req, nil + bodyReader = bytes.NewReader(buf) + return NewNodeTemplatesAPIFilterInstanceTypesRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewOperationsAPIGetOperationRequest generates requests for OperationsAPIGetOperation -func NewOperationsAPIGetOperationRequest(server string, id string) (*http.Request, error) { +// NewNodeTemplatesAPIFilterInstanceTypesRequestWithBody generates requests for NodeTemplatesAPIFilterInstanceTypes with any type of body +func NewNodeTemplatesAPIFilterInstanceTypesRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -5907,7 +6227,7 @@ func NewOperationsAPIGetOperationRequest(server string, id string) (*http.Reques return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/operations/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/filter-instance-types", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5917,16 +6237,18 @@ func NewOperationsAPIGetOperationRequest(server string, id string) (*http.Reques return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewExternalClusterAPIDeleteClusterRequest generates requests for ExternalClusterAPIDeleteCluster -func NewExternalClusterAPIDeleteClusterRequest(server string, clusterId string) (*http.Request, error) { +// NewNodeTemplatesAPIGenerateNodeTemplatesRequest generates requests for NodeTemplatesAPIGenerateNodeTemplates +func NewNodeTemplatesAPIGenerateNodeTemplatesRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -5941,7 +6263,7 @@ func NewExternalClusterAPIDeleteClusterRequest(server string, clusterId string) return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/generate-node-templates", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5951,7 +6273,7 @@ func NewExternalClusterAPIDeleteClusterRequest(server string, clusterId string) return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -5959,8 +6281,8 @@ func NewExternalClusterAPIDeleteClusterRequest(server string, clusterId string) return req, nil } -// NewExternalClusterAPIGetClusterRequest generates requests for ExternalClusterAPIGetCluster -func NewExternalClusterAPIGetClusterRequest(server string, clusterId string) (*http.Request, error) { +// NewNodeConfigurationAPIListConfigurationsRequest generates requests for NodeConfigurationAPIListConfigurations +func NewNodeConfigurationAPIListConfigurationsRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -5975,7 +6297,7 @@ func NewExternalClusterAPIGetClusterRequest(server string, clusterId string) (*h return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5993,19 +6315,19 @@ func NewExternalClusterAPIGetClusterRequest(server string, clusterId string) (*h return req, nil } -// NewExternalClusterAPIUpdateClusterRequest calls the generic ExternalClusterAPIUpdateCluster builder with application/json body -func NewExternalClusterAPIUpdateClusterRequest(server string, clusterId string, body ExternalClusterAPIUpdateClusterJSONRequestBody) (*http.Request, error) { +// NewNodeConfigurationAPICreateConfigurationRequest calls the generic NodeConfigurationAPICreateConfiguration builder with application/json body +func NewNodeConfigurationAPICreateConfigurationRequest(server string, clusterId string, body NodeConfigurationAPICreateConfigurationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIUpdateClusterRequestWithBody(server, clusterId, "application/json", bodyReader) + return NewNodeConfigurationAPICreateConfigurationRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewExternalClusterAPIUpdateClusterRequestWithBody generates requests for ExternalClusterAPIUpdateCluster with any type of body -func NewExternalClusterAPIUpdateClusterRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewNodeConfigurationAPICreateConfigurationRequestWithBody generates requests for NodeConfigurationAPICreateConfiguration with any type of body +func NewNodeConfigurationAPICreateConfigurationRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6020,7 +6342,7 @@ func NewExternalClusterAPIUpdateClusterRequestWithBody(server string, clusterId return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6040,8 +6362,8 @@ func NewExternalClusterAPIUpdateClusterRequestWithBody(server string, clusterId return req, nil } -// NewExternalClusterAPIDeleteAssumeRolePrincipalRequest generates requests for ExternalClusterAPIDeleteAssumeRolePrincipal -func NewExternalClusterAPIDeleteAssumeRolePrincipalRequest(server string, clusterId string) (*http.Request, error) { +// NewNodeConfigurationAPIGetSuggestedConfigurationRequest generates requests for NodeConfigurationAPIGetSuggestedConfiguration +func NewNodeConfigurationAPIGetSuggestedConfigurationRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -6056,7 +6378,7 @@ func NewExternalClusterAPIDeleteAssumeRolePrincipalRequest(server string, cluste return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/assume-role-principal", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/suggestions", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6066,7 +6388,7 @@ func NewExternalClusterAPIDeleteAssumeRolePrincipalRequest(server string, cluste return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -6074,8 +6396,8 @@ func NewExternalClusterAPIDeleteAssumeRolePrincipalRequest(server string, cluste return req, nil } -// NewExternalClusterAPIGetAssumeRolePrincipalRequest generates requests for ExternalClusterAPIGetAssumeRolePrincipal -func NewExternalClusterAPIGetAssumeRolePrincipalRequest(server string, clusterId string) (*http.Request, error) { +// NewNodeConfigurationAPIDeleteConfigurationRequest generates requests for NodeConfigurationAPIDeleteConfiguration +func NewNodeConfigurationAPIDeleteConfigurationRequest(server string, clusterId string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -6085,12 +6407,19 @@ func NewExternalClusterAPIGetAssumeRolePrincipalRequest(server string, clusterId return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/assume-role-principal", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6100,7 +6429,7 @@ func NewExternalClusterAPIGetAssumeRolePrincipalRequest(server string, clusterId return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -6108,8 +6437,8 @@ func NewExternalClusterAPIGetAssumeRolePrincipalRequest(server string, clusterId return req, nil } -// NewExternalClusterAPICreateAssumeRolePrincipalRequest generates requests for ExternalClusterAPICreateAssumeRolePrincipal -func NewExternalClusterAPICreateAssumeRolePrincipalRequest(server string, clusterId string) (*http.Request, error) { +// NewNodeConfigurationAPIGetConfigurationRequest generates requests for NodeConfigurationAPIGetConfiguration +func NewNodeConfigurationAPIGetConfigurationRequest(server string, clusterId string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -6119,12 +6448,19 @@ func NewExternalClusterAPICreateAssumeRolePrincipalRequest(server string, cluste return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/assume-role-principal", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6134,7 +6470,7 @@ func NewExternalClusterAPICreateAssumeRolePrincipalRequest(server string, cluste return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -6142,8 +6478,19 @@ func NewExternalClusterAPICreateAssumeRolePrincipalRequest(server string, cluste return req, nil } -// NewExternalClusterAPIGetAssumeRoleUserRequest generates requests for ExternalClusterAPIGetAssumeRoleUser -func NewExternalClusterAPIGetAssumeRoleUserRequest(server string, clusterId string) (*http.Request, error) { +// NewNodeConfigurationAPIUpdateConfigurationRequest calls the generic NodeConfigurationAPIUpdateConfiguration builder with application/json body +func NewNodeConfigurationAPIUpdateConfigurationRequest(server string, clusterId string, id string, body NodeConfigurationAPIUpdateConfigurationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewNodeConfigurationAPIUpdateConfigurationRequestWithBody(server, clusterId, id, "application/json", bodyReader) +} + +// NewNodeConfigurationAPIUpdateConfigurationRequestWithBody generates requests for NodeConfigurationAPIUpdateConfiguration with any type of body +func NewNodeConfigurationAPIUpdateConfigurationRequestWithBody(server string, clusterId string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6153,12 +6500,19 @@ func NewExternalClusterAPIGetAssumeRoleUserRequest(server string, clusterId stri return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/assume-role-user", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6168,16 +6522,18 @@ func NewExternalClusterAPIGetAssumeRoleUserRequest(server string, clusterId stri return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewExternalClusterAPIGetCleanupScriptRequest generates requests for ExternalClusterAPIGetCleanupScript -func NewExternalClusterAPIGetCleanupScriptRequest(server string, clusterId string) (*http.Request, error) { +// NewNodeConfigurationAPISetDefaultRequest generates requests for NodeConfigurationAPISetDefault +func NewNodeConfigurationAPISetDefaultRequest(server string, clusterId string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -6187,12 +6543,19 @@ func NewExternalClusterAPIGetCleanupScriptRequest(server string, clusterId strin return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/cleanup-script", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-configurations/%s/default", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6202,7 +6565,7 @@ func NewExternalClusterAPIGetCleanupScriptRequest(server string, clusterId strin return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -6210,8 +6573,8 @@ func NewExternalClusterAPIGetCleanupScriptRequest(server string, clusterId strin return req, nil } -// NewExternalClusterAPIGetCredentialsScriptRequest generates requests for ExternalClusterAPIGetCredentialsScript -func NewExternalClusterAPIGetCredentialsScriptRequest(server string, clusterId string, params *ExternalClusterAPIGetCredentialsScriptParams) (*http.Request, error) { +// NewPoliciesAPIGetClusterNodeConstraintsRequest generates requests for PoliciesAPIGetClusterNodeConstraints +func NewPoliciesAPIGetClusterNodeConstraintsRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -6226,7 +6589,7 @@ func NewExternalClusterAPIGetCredentialsScriptRequest(server string, clusterId s return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/credentials-script", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-constraints", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6236,124 +6599,46 @@ func NewExternalClusterAPIGetCredentialsScriptRequest(server string, clusterId s return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.CrossRole != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "crossRole", runtime.ParamLocationQuery, *params.CrossRole); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NvidiaDevicePlugin != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nvidiaDevicePlugin", runtime.ParamLocationQuery, *params.NvidiaDevicePlugin); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InstallSecurityAgent != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installSecurityAgent", runtime.ParamLocationQuery, *params.InstallSecurityAgent); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InstallAutoscalerAgent != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installAutoscalerAgent", runtime.ParamLocationQuery, *params.InstallAutoscalerAgent); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.InstallGpuMetricsExporter != nil { + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installGpuMetricsExporter", runtime.ParamLocationQuery, *params.InstallGpuMetricsExporter); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewNodeTemplatesAPIListNodeTemplatesRequest generates requests for NodeTemplatesAPIListNodeTemplates +func NewNodeTemplatesAPIListNodeTemplatesRequest(server string, clusterId string, params *NodeTemplatesAPIListNodeTemplatesParams) (*http.Request, error) { + var err error - if params.InstallAiOptimizerProxy != nil { + var pathParam0 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installAiOptimizerProxy", runtime.ParamLocationQuery, *params.InstallAiOptimizerProxy); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if params.GcpSaImpersonate != nil { + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-templates", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcpSaImpersonate", runtime.ParamLocationQuery, *params.GcpSaImpersonate); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - } + if params != nil { + queryValues := queryURL.Query() - if params.InstallNetflowExporter != nil { + if params.IncludeDefault != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installNetflowExporter", runtime.ParamLocationQuery, *params.InstallNetflowExporter); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeDefault", runtime.ParamLocationQuery, *params.IncludeDefault); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6367,9 +6652,9 @@ func NewExternalClusterAPIGetCredentialsScriptRequest(server string, clusterId s } - if params.InstallWorkloadAutoscaler != nil { + if params.ExcludeStats != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installWorkloadAutoscaler", runtime.ParamLocationQuery, *params.InstallWorkloadAutoscaler); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "excludeStats", runtime.ParamLocationQuery, *params.ExcludeStats); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6394,19 +6679,19 @@ func NewExternalClusterAPIGetCredentialsScriptRequest(server string, clusterId s return req, nil } -// NewExternalClusterAPIDisconnectClusterRequest calls the generic ExternalClusterAPIDisconnectCluster builder with application/json body -func NewExternalClusterAPIDisconnectClusterRequest(server string, clusterId string, body ExternalClusterAPIDisconnectClusterJSONRequestBody) (*http.Request, error) { +// NewNodeTemplatesAPICreateNodeTemplateRequest calls the generic NodeTemplatesAPICreateNodeTemplate builder with application/json body +func NewNodeTemplatesAPICreateNodeTemplateRequest(server string, clusterId string, body NodeTemplatesAPICreateNodeTemplateJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIDisconnectClusterRequestWithBody(server, clusterId, "application/json", bodyReader) + return NewNodeTemplatesAPICreateNodeTemplateRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewExternalClusterAPIDisconnectClusterRequestWithBody generates requests for ExternalClusterAPIDisconnectCluster with any type of body -func NewExternalClusterAPIDisconnectClusterRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewNodeTemplatesAPICreateNodeTemplateRequestWithBody generates requests for NodeTemplatesAPICreateNodeTemplate with any type of body +func NewNodeTemplatesAPICreateNodeTemplateRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6421,7 +6706,7 @@ func NewExternalClusterAPIDisconnectClusterRequestWithBody(server string, cluste return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/disconnect", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-templates", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6441,19 +6726,8 @@ func NewExternalClusterAPIDisconnectClusterRequestWithBody(server string, cluste return req, nil } -// NewExternalClusterAPIHandleCloudEventRequest calls the generic ExternalClusterAPIHandleCloudEvent builder with application/json body -func NewExternalClusterAPIHandleCloudEventRequest(server string, clusterId string, body ExternalClusterAPIHandleCloudEventJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIHandleCloudEventRequestWithBody(server, clusterId, "application/json", bodyReader) -} - -// NewExternalClusterAPIHandleCloudEventRequestWithBody generates requests for ExternalClusterAPIHandleCloudEvent with any type of body -func NewExternalClusterAPIHandleCloudEventRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewNodeTemplatesAPIDeleteNodeTemplateRequest generates requests for NodeTemplatesAPIDeleteNodeTemplate +func NewNodeTemplatesAPIDeleteNodeTemplateRequest(server string, clusterId string, nodeTemplateName string) (*http.Request, error) { var err error var pathParam0 string @@ -6463,12 +6737,19 @@ func NewExternalClusterAPIHandleCloudEventRequestWithBody(server string, cluster return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeTemplateName", runtime.ParamLocationPath, nodeTemplateName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/events", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-templates/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6478,29 +6759,27 @@ func NewExternalClusterAPIHandleCloudEventRequestWithBody(server string, cluster return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewExternalClusterAPIGCPCreateSARequest calls the generic ExternalClusterAPIGCPCreateSA builder with application/json body -func NewExternalClusterAPIGCPCreateSARequest(server string, clusterId string, body ExternalClusterAPIGCPCreateSAJSONRequestBody) (*http.Request, error) { +// NewNodeTemplatesAPIUpdateNodeTemplateRequest calls the generic NodeTemplatesAPIUpdateNodeTemplate builder with application/json body +func NewNodeTemplatesAPIUpdateNodeTemplateRequest(server string, clusterId string, nodeTemplateName string, body NodeTemplatesAPIUpdateNodeTemplateJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIGCPCreateSARequestWithBody(server, clusterId, "application/json", bodyReader) + return NewNodeTemplatesAPIUpdateNodeTemplateRequestWithBody(server, clusterId, nodeTemplateName, "application/json", bodyReader) } -// NewExternalClusterAPIGCPCreateSARequestWithBody generates requests for ExternalClusterAPIGCPCreateSA with any type of body -func NewExternalClusterAPIGCPCreateSARequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewNodeTemplatesAPIUpdateNodeTemplateRequestWithBody generates requests for NodeTemplatesAPIUpdateNodeTemplate with any type of body +func NewNodeTemplatesAPIUpdateNodeTemplateRequestWithBody(server string, clusterId string, nodeTemplateName string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6510,12 +6789,19 @@ func NewExternalClusterAPIGCPCreateSARequestWithBody(server string, clusterId st return nil, err } - serverURL, err := url.Parse(server) - if err != nil { + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeTemplateName", runtime.ParamLocationPath, nodeTemplateName) + if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/gcp-create-sa", pathParam0) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/node-templates/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6525,7 +6811,7 @@ func NewExternalClusterAPIGCPCreateSARequestWithBody(server string, clusterId st return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -6535,8 +6821,8 @@ func NewExternalClusterAPIGCPCreateSARequestWithBody(server string, clusterId st return req, nil } -// NewExternalClusterAPIDisableGCPSARequest generates requests for ExternalClusterAPIDisableGCPSA -func NewExternalClusterAPIDisableGCPSARequest(server string, clusterId string) (*http.Request, error) { +// NewPoliciesAPIGetClusterPoliciesRequest generates requests for PoliciesAPIGetClusterPolicies +func NewPoliciesAPIGetClusterPoliciesRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -6551,7 +6837,7 @@ func NewExternalClusterAPIDisableGCPSARequest(server string, clusterId string) ( return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/gcp-disable-sa", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/policies", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6561,7 +6847,7 @@ func NewExternalClusterAPIDisableGCPSARequest(server string, clusterId string) ( return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -6569,19 +6855,19 @@ func NewExternalClusterAPIDisableGCPSARequest(server string, clusterId string) ( return req, nil } -// NewExternalClusterAPIGKECreateSARequest calls the generic ExternalClusterAPIGKECreateSA builder with application/json body -func NewExternalClusterAPIGKECreateSARequest(server string, clusterId string, body ExternalClusterAPIGKECreateSAJSONRequestBody) (*http.Request, error) { +// NewPoliciesAPIUpsertClusterPoliciesRequest calls the generic PoliciesAPIUpsertClusterPolicies builder with application/json body +func NewPoliciesAPIUpsertClusterPoliciesRequest(server string, clusterId string, body PoliciesAPIUpsertClusterPoliciesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIGKECreateSARequestWithBody(server, clusterId, "application/json", bodyReader) + return NewPoliciesAPIUpsertClusterPoliciesRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewExternalClusterAPIGKECreateSARequestWithBody generates requests for ExternalClusterAPIGKECreateSA with any type of body -func NewExternalClusterAPIGKECreateSARequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewPoliciesAPIUpsertClusterPoliciesRequestWithBody generates requests for PoliciesAPIUpsertClusterPolicies with any type of body +func NewPoliciesAPIUpsertClusterPoliciesRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6596,7 +6882,7 @@ func NewExternalClusterAPIGKECreateSARequestWithBody(server string, clusterId st return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/gke-create-sa", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/policies", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6606,7 +6892,7 @@ func NewExternalClusterAPIGKECreateSARequestWithBody(server string, clusterId st return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -6616,8 +6902,8 @@ func NewExternalClusterAPIGKECreateSARequestWithBody(server string, clusterId st return req, nil } -// NewExternalClusterAPIDisableGKESARequest generates requests for ExternalClusterAPIDisableGKESA -func NewExternalClusterAPIDisableGKESARequest(server string, clusterId string) (*http.Request, error) { +// NewScheduledRebalancingAPIListRebalancingJobsRequest generates requests for ScheduledRebalancingAPIListRebalancingJobs +func NewScheduledRebalancingAPIListRebalancingJobsRequest(server string, clusterId string, params *ScheduledRebalancingAPIListRebalancingJobsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6632,7 +6918,7 @@ func NewExternalClusterAPIDisableGKESARequest(server string, clusterId string) ( return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/gke-disable-sa", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6642,7 +6928,29 @@ func NewExternalClusterAPIDisableGKESARequest(server string, clusterId string) ( return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + if params != nil { + queryValues := queryURL.Query() + + if params.RebalancingScheduleId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "rebalancingScheduleId", runtime.ParamLocationQuery, *params.RebalancingScheduleId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -6650,8 +6958,19 @@ func NewExternalClusterAPIDisableGKESARequest(server string, clusterId string) ( return req, nil } -// NewExternalClusterAPITriggerHibernateClusterRequest generates requests for ExternalClusterAPITriggerHibernateCluster -func NewExternalClusterAPITriggerHibernateClusterRequest(server string, clusterId string) (*http.Request, error) { +// NewScheduledRebalancingAPICreateRebalancingJobRequest calls the generic ScheduledRebalancingAPICreateRebalancingJob builder with application/json body +func NewScheduledRebalancingAPICreateRebalancingJobRequest(server string, clusterId string, body ScheduledRebalancingAPICreateRebalancingJobJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewScheduledRebalancingAPICreateRebalancingJobRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewScheduledRebalancingAPICreateRebalancingJobRequestWithBody generates requests for ScheduledRebalancingAPICreateRebalancingJob with any type of body +func NewScheduledRebalancingAPICreateRebalancingJobRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6666,7 +6985,7 @@ func NewExternalClusterAPITriggerHibernateClusterRequest(server string, clusterI return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/hibernate", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6676,16 +6995,18 @@ func NewExternalClusterAPITriggerHibernateClusterRequest(server string, clusterI return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewExternalClusterAPIListNodesRequest generates requests for ExternalClusterAPIListNodes -func NewExternalClusterAPIListNodesRequest(server string, clusterId string, params *ExternalClusterAPIListNodesParams) (*http.Request, error) { +// NewScheduledRebalancingAPIDeleteRebalancingJobRequest generates requests for ScheduledRebalancingAPIDeleteRebalancingJob +func NewScheduledRebalancingAPIDeleteRebalancingJobRequest(server string, clusterId string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -6695,12 +7016,19 @@ func NewExternalClusterAPIListNodesRequest(server string, clusterId string, para return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6710,273 +7038,122 @@ func NewExternalClusterAPIListNodesRequest(server string, clusterId string, para return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - if params.PageLimit != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewScheduledRebalancingAPIGetRebalancingJobRequest generates requests for ScheduledRebalancingAPIGetRebalancingJob +func NewScheduledRebalancingAPIGetRebalancingJobRequest(server string, clusterId string, id string) (*http.Request, error) { + var err error - } + var pathParam0 string - if params.PageCursor != nil { + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + var pathParam1 string - } + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } - if params.NodeId != nil { + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeId", runtime.ParamLocationQuery, *params.NodeId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - if params.NodeStatus != nil { + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeStatus", runtime.ParamLocationQuery, *params.NodeStatus); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewScheduledRebalancingAPIUpdateRebalancingJobRequest calls the generic ScheduledRebalancingAPIUpdateRebalancingJob builder with application/json body +func NewScheduledRebalancingAPIUpdateRebalancingJobRequest(server string, clusterId string, id string, body ScheduledRebalancingAPIUpdateRebalancingJobJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewScheduledRebalancingAPIUpdateRebalancingJobRequestWithBody(server, clusterId, id, "application/json", bodyReader) +} - if params.InstanceType != nil { +// NewScheduledRebalancingAPIUpdateRebalancingJobRequestWithBody generates requests for ScheduledRebalancingAPIUpdateRebalancingJob with any type of body +func NewScheduledRebalancingAPIUpdateRebalancingJobRequestWithBody(server string, clusterId string, id string, contentType string, body io.Reader) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "instanceType", runtime.ParamLocationQuery, *params.InstanceType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + var pathParam0 string - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - if params.LifecycleType != nil { + var pathParam1 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "lifecycleType", runtime.ParamLocationQuery, *params.LifecycleType); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if params.RemovalDisabled != nil { + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-jobs/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "removalDisabled", runtime.ParamLocationQuery, *params.RemovalDisabled); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Unschedulable != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "unschedulable", runtime.ParamLocationQuery, *params.Unschedulable); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Zone != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "zone", runtime.ParamLocationQuery, *params.Zone); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NodeConfigurationName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeConfigurationName", runtime.ParamLocationQuery, *params.NodeConfigurationName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NodeConfigurationVersion != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeConfigurationVersion", runtime.ParamLocationQuery, *params.NodeConfigurationVersion); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NodeTemplateName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeTemplateName", runtime.ParamLocationQuery, *params.NodeTemplateName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NodeTemplateVersion != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeTemplateVersion", runtime.ParamLocationQuery, *params.NodeTemplateVersion); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NodeName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeName", runtime.ParamLocationQuery, *params.NodeName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ExcludeDeleting != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "excludeDeleting", runtime.ParamLocationQuery, *params.ExcludeDeleting); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewExternalClusterAPIAddNodeRequest calls the generic ExternalClusterAPIAddNode builder with application/json body -func NewExternalClusterAPIAddNodeRequest(server string, clusterId string, body ExternalClusterAPIAddNodeJSONRequestBody) (*http.Request, error) { +// NewScheduledRebalancingAPIPreviewRebalancingScheduleRequest calls the generic ScheduledRebalancingAPIPreviewRebalancingSchedule builder with application/json body +func NewScheduledRebalancingAPIPreviewRebalancingScheduleRequest(server string, clusterId string, body ScheduledRebalancingAPIPreviewRebalancingScheduleJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIAddNodeRequestWithBody(server, clusterId, "application/json", bodyReader) + return NewScheduledRebalancingAPIPreviewRebalancingScheduleRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewExternalClusterAPIAddNodeRequestWithBody generates requests for ExternalClusterAPIAddNode with any type of body -func NewExternalClusterAPIAddNodeRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewScheduledRebalancingAPIPreviewRebalancingScheduleRequestWithBody generates requests for ScheduledRebalancingAPIPreviewRebalancingSchedule with any type of body +func NewScheduledRebalancingAPIPreviewRebalancingScheduleRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6991,7 +7168,7 @@ func NewExternalClusterAPIAddNodeRequestWithBody(server string, clusterId string return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/clusters/%s/rebalancing-schedule-preview", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7011,30 +7188,54 @@ func NewExternalClusterAPIAddNodeRequestWithBody(server string, clusterId string return req, nil } -// NewExternalClusterAPIDeleteNodeRequest generates requests for ExternalClusterAPIDeleteNode -func NewExternalClusterAPIDeleteNodeRequest(server string, clusterId string, nodeId string, params *ExternalClusterAPIDeleteNodeParams) (*http.Request, error) { +// NewExternalClusterAPIListClustersRequest generates requests for ExternalClusterAPIListClusters +func NewExternalClusterAPIListClustersRequest(server string) (*http.Request, error) { var err error - var pathParam0 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam1 string + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeId", runtime.ParamLocationPath, nodeId) + return req, nil +} + +// NewExternalClusterAPIRegisterClusterRequest calls the generic ExternalClusterAPIRegisterCluster builder with application/json body +func NewExternalClusterAPIRegisterClusterRequest(server string, body ExternalClusterAPIRegisterClusterJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewExternalClusterAPIRegisterClusterRequestWithBody(server, "application/json", bodyReader) +} + +// NewExternalClusterAPIRegisterClusterRequestWithBody generates requests for ExternalClusterAPIRegisterCluster with any type of body +func NewExternalClusterAPIRegisterClusterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7044,76 +7245,26 @@ func NewExternalClusterAPIDeleteNodeRequest(server string, clusterId string, nod return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.DrainTimeout != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "drainTimeout", runtime.ParamLocationQuery, *params.DrainTimeout); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ForceDelete != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "forceDelete", runtime.ParamLocationQuery, *params.ForceDelete); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewExternalClusterAPIGetNodeRequest generates requests for ExternalClusterAPIGetNode -func NewExternalClusterAPIGetNodeRequest(server string, clusterId string, nodeId string) (*http.Request, error) { +// NewExternalClusterAPIGetListNodesFiltersRequest generates requests for ExternalClusterAPIGetListNodesFilters +func NewExternalClusterAPIGetListNodesFiltersRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeId", runtime.ParamLocationPath, nodeId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/filters/nodes") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7131,31 +7282,13 @@ func NewExternalClusterAPIGetNodeRequest(server string, clusterId string, nodeId return req, nil } -// NewExternalClusterAPIDrainNodeRequest calls the generic ExternalClusterAPIDrainNode builder with application/json body -func NewExternalClusterAPIDrainNodeRequest(server string, clusterId string, nodeId string, body ExternalClusterAPIDrainNodeJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIDrainNodeRequestWithBody(server, clusterId, nodeId, "application/json", bodyReader) -} - -// NewExternalClusterAPIDrainNodeRequestWithBody generates requests for ExternalClusterAPIDrainNode with any type of body -func NewExternalClusterAPIDrainNodeRequestWithBody(server string, clusterId string, nodeId string, contentType string, body io.Reader) (*http.Request, error) { +// NewOperationsAPIGetOperationRequest generates requests for OperationsAPIGetOperation +func NewOperationsAPIGetOperationRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeId", runtime.ParamLocationPath, nodeId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -7165,7 +7298,7 @@ func NewExternalClusterAPIDrainNodeRequestWithBody(server string, clusterId stri return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes/%s/drain", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/operations/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7175,18 +7308,16 @@ func NewExternalClusterAPIDrainNodeRequestWithBody(server string, clusterId stri return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewExternalClusterAPIReconcileClusterRequest generates requests for ExternalClusterAPIReconcileCluster -func NewExternalClusterAPIReconcileClusterRequest(server string, clusterId string, params *ExternalClusterAPIReconcileClusterParams) (*http.Request, error) { +// NewExternalClusterAPIDeleteClusterRequest generates requests for ExternalClusterAPIDeleteCluster +func NewExternalClusterAPIDeleteClusterRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -7201,7 +7332,7 @@ func NewExternalClusterAPIReconcileClusterRequest(server string, clusterId strin return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/reconcile", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7211,29 +7342,7 @@ func NewExternalClusterAPIReconcileClusterRequest(server string, clusterId strin return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.SkipAksInitData != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "skipAksInitData", runtime.ParamLocationQuery, *params.SkipAksInitData); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -7241,19 +7350,8 @@ func NewExternalClusterAPIReconcileClusterRequest(server string, clusterId strin return req, nil } -// NewExternalClusterAPITriggerResumeClusterRequest calls the generic ExternalClusterAPITriggerResumeCluster builder with application/json body -func NewExternalClusterAPITriggerResumeClusterRequest(server string, clusterId string, body ExternalClusterAPITriggerResumeClusterJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPITriggerResumeClusterRequestWithBody(server, clusterId, "application/json", bodyReader) -} - -// NewExternalClusterAPITriggerResumeClusterRequestWithBody generates requests for ExternalClusterAPITriggerResumeCluster with any type of body -func NewExternalClusterAPITriggerResumeClusterRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIGetClusterRequest generates requests for ExternalClusterAPIGetCluster +func NewExternalClusterAPIGetClusterRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -7268,7 +7366,7 @@ func NewExternalClusterAPITriggerResumeClusterRequestWithBody(server string, clu return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/resume", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7278,29 +7376,27 @@ func NewExternalClusterAPITriggerResumeClusterRequestWithBody(server string, clu return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewExternalClusterAPIUpdateClusterTagsRequest calls the generic ExternalClusterAPIUpdateClusterTags builder with application/json body -func NewExternalClusterAPIUpdateClusterTagsRequest(server string, clusterId string, body ExternalClusterAPIUpdateClusterTagsJSONRequestBody) (*http.Request, error) { +// NewExternalClusterAPIUpdateClusterRequest calls the generic ExternalClusterAPIUpdateCluster builder with application/json body +func NewExternalClusterAPIUpdateClusterRequest(server string, clusterId string, body ExternalClusterAPIUpdateClusterJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewExternalClusterAPIUpdateClusterTagsRequestWithBody(server, clusterId, "application/json", bodyReader) + return NewExternalClusterAPIUpdateClusterRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewExternalClusterAPIUpdateClusterTagsRequestWithBody generates requests for ExternalClusterAPIUpdateClusterTags with any type of body -func NewExternalClusterAPIUpdateClusterTagsRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIUpdateClusterRequestWithBody generates requests for ExternalClusterAPIUpdateCluster with any type of body +func NewExternalClusterAPIUpdateClusterRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7315,7 +7411,7 @@ func NewExternalClusterAPIUpdateClusterTagsRequestWithBody(server string, cluste return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/tags", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7335,8 +7431,8 @@ func NewExternalClusterAPIUpdateClusterTagsRequestWithBody(server string, cluste return req, nil } -// NewExternalClusterAPICreateClusterTokenRequest generates requests for ExternalClusterAPICreateClusterToken -func NewExternalClusterAPICreateClusterTokenRequest(server string, clusterId string) (*http.Request, error) { +// NewExternalClusterAPIDeleteAssumeRolePrincipalRequest generates requests for ExternalClusterAPIDeleteAssumeRolePrincipal +func NewExternalClusterAPIDeleteAssumeRolePrincipalRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -7351,7 +7447,7 @@ func NewExternalClusterAPICreateClusterTokenRequest(server string, clusterId str return nil, err } - operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/token", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/assume-role-principal", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7361,7 +7457,7 @@ func NewExternalClusterAPICreateClusterTokenRequest(server string, clusterId str return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -7369,43 +7465,23 @@ func NewExternalClusterAPICreateClusterTokenRequest(server string, clusterId str return req, nil } -// NewNodeConfigurationAPIListMaxPodsPresetsRequest generates requests for NodeConfigurationAPIListMaxPodsPresets -func NewNodeConfigurationAPIListMaxPodsPresetsRequest(server string) (*http.Request, error) { +// NewExternalClusterAPIGetAssumeRolePrincipalRequest generates requests for ExternalClusterAPIGetAssumeRolePrincipal +func NewExternalClusterAPIGetAssumeRolePrincipalRequest(server string, clusterId string) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/kubernetes/maxpods-formula-presets") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + var pathParam0 string - req, err := http.NewRequest("GET", queryURL.String(), nil) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } - return req, nil -} - -// NewUsersAPICurrentUserProfileRequest generates requests for UsersAPICurrentUserProfile -func NewUsersAPICurrentUserProfileRequest(server string) (*http.Request, error) { - var err error - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/me") + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/assume-role-principal", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7423,56 +7499,23 @@ func NewUsersAPICurrentUserProfileRequest(server string) (*http.Request, error) return req, nil } -// NewUsersAPIUpdateCurrentUserProfileRequest calls the generic UsersAPIUpdateCurrentUserProfile builder with application/json body -func NewUsersAPIUpdateCurrentUserProfileRequest(server string, body UsersAPIUpdateCurrentUserProfileJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUsersAPIUpdateCurrentUserProfileRequestWithBody(server, "application/json", bodyReader) -} - -// NewUsersAPIUpdateCurrentUserProfileRequestWithBody generates requests for UsersAPIUpdateCurrentUserProfile with any type of body -func NewUsersAPIUpdateCurrentUserProfileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPICreateAssumeRolePrincipalRequest generates requests for ExternalClusterAPICreateAssumeRolePrincipal +func NewExternalClusterAPICreateAssumeRolePrincipalRequest(server string, clusterId string) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/me") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + var pathParam0 string - req, err := http.NewRequest("POST", queryURL.String(), body) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewUsersAPIListOrganizationsRequest generates requests for UsersAPIListOrganizations -func NewUsersAPIListOrganizationsRequest(server string) (*http.Request, error) { - var err error - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/organizations") + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/assume-role-principal", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7482,7 +7525,7 @@ func NewUsersAPIListOrganizationsRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -7490,27 +7533,23 @@ func NewUsersAPIListOrganizationsRequest(server string) (*http.Request, error) { return req, nil } -// NewUsersAPICreateOrganizationRequest calls the generic UsersAPICreateOrganization builder with application/json body -func NewUsersAPICreateOrganizationRequest(server string, body UsersAPICreateOrganizationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewExternalClusterAPIGetAssumeRoleUserRequest generates requests for ExternalClusterAPIGetAssumeRoleUser +func NewExternalClusterAPIGetAssumeRoleUserRequest(server string, clusterId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewUsersAPICreateOrganizationRequestWithBody(server, "application/json", bodyReader) -} - -// NewUsersAPICreateOrganizationRequestWithBody generates requests for UsersAPICreateOrganization with any type of body -func NewUsersAPICreateOrganizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/organizations") + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/assume-role-user", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7520,53 +7559,31 @@ func NewUsersAPICreateOrganizationRequestWithBody(server string, contentType str return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewInventoryAPIGetOrganizationReservationsBalanceRequest generates requests for InventoryAPIGetOrganizationReservationsBalance -func NewInventoryAPIGetOrganizationReservationsBalanceRequest(server string) (*http.Request, error) { +// NewExternalClusterAPIGetCleanupScriptRequest generates requests for ExternalClusterAPIGetCleanupScript +func NewExternalClusterAPIGetCleanupScriptRequest(server string, clusterId string) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/organizations/reservations/balance") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + var pathParam0 string - req, err := http.NewRequest("GET", queryURL.String(), nil) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } - return req, nil -} - -// NewInventoryAPIGetOrganizationResourceUsageRequest generates requests for InventoryAPIGetOrganizationResourceUsage -func NewInventoryAPIGetOrganizationResourceUsageRequest(server string) (*http.Request, error) { - var err error - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/resource-usage") + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/cleanup-script", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7584,13 +7601,13 @@ func NewInventoryAPIGetOrganizationResourceUsageRequest(server string) (*http.Re return req, nil } -// NewUsersAPIDeleteOrganizationRequest generates requests for UsersAPIDeleteOrganization -func NewUsersAPIDeleteOrganizationRequest(server string, id string) (*http.Request, error) { +// NewExternalClusterAPIGetCredentialsScriptRequest generates requests for ExternalClusterAPIGetCredentialsScript +func NewExternalClusterAPIGetCredentialsScriptRequest(server string, clusterId string, params *ExternalClusterAPIGetCredentialsScriptParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -7600,7 +7617,7 @@ func NewUsersAPIDeleteOrganizationRequest(server string, id string) (*http.Reque return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/credentials-script", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7610,38 +7627,154 @@ func NewUsersAPIDeleteOrganizationRequest(server string, id string) (*http.Reque return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUsersAPIGetOrganizationRequest generates requests for UsersAPIGetOrganization -func NewUsersAPIGetOrganizationRequest(server string, id string) (*http.Request, error) { - var err error - - var pathParam0 string + if params != nil { + queryValues := queryURL.Query() - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } + if params.CrossRole != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "crossRole", runtime.ParamLocationQuery, *params.CrossRole); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/organizations/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + if params.NvidiaDevicePlugin != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nvidiaDevicePlugin", runtime.ParamLocationQuery, *params.NvidiaDevicePlugin); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InstallSecurityAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installSecurityAgent", runtime.ParamLocationQuery, *params.InstallSecurityAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InstallAutoscalerAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installAutoscalerAgent", runtime.ParamLocationQuery, *params.InstallAutoscalerAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InstallGpuMetricsExporter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installGpuMetricsExporter", runtime.ParamLocationQuery, *params.InstallGpuMetricsExporter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InstallAiOptimizerProxy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installAiOptimizerProxy", runtime.ParamLocationQuery, *params.InstallAiOptimizerProxy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GcpSaImpersonate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gcpSaImpersonate", runtime.ParamLocationQuery, *params.GcpSaImpersonate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InstallNetflowExporter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installNetflowExporter", runtime.ParamLocationQuery, *params.InstallNetflowExporter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InstallWorkloadAutoscaler != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "installWorkloadAutoscaler", runtime.ParamLocationQuery, *params.InstallWorkloadAutoscaler); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -7652,24 +7785,24 @@ func NewUsersAPIGetOrganizationRequest(server string, id string) (*http.Request, return req, nil } -// NewUsersAPIEditOrganizationRequest calls the generic UsersAPIEditOrganization builder with application/json body -func NewUsersAPIEditOrganizationRequest(server string, id string, body UsersAPIEditOrganizationJSONRequestBody) (*http.Request, error) { +// NewExternalClusterAPIDisconnectClusterRequest calls the generic ExternalClusterAPIDisconnectCluster builder with application/json body +func NewExternalClusterAPIDisconnectClusterRequest(server string, clusterId string, body ExternalClusterAPIDisconnectClusterJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUsersAPIEditOrganizationRequestWithBody(server, id, "application/json", bodyReader) + return NewExternalClusterAPIDisconnectClusterRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewUsersAPIEditOrganizationRequestWithBody generates requests for UsersAPIEditOrganization with any type of body -func NewUsersAPIEditOrganizationRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIDisconnectClusterRequestWithBody generates requests for ExternalClusterAPIDisconnectCluster with any type of body +func NewExternalClusterAPIDisconnectClusterRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -7679,7 +7812,7 @@ func NewUsersAPIEditOrganizationRequestWithBody(server string, id string, conten return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/disconnect", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7699,20 +7832,24 @@ func NewUsersAPIEditOrganizationRequestWithBody(server string, id string, conten return req, nil } -// NewInventoryAPISyncClusterResourcesRequest generates requests for InventoryAPISyncClusterResources -func NewInventoryAPISyncClusterResourcesRequest(server string, organizationId string, clusterId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) +// NewExternalClusterAPIHandleCloudEventRequest calls the generic ExternalClusterAPIHandleCloudEvent builder with application/json body +func NewExternalClusterAPIHandleCloudEventRequest(server string, clusterId string, body ExternalClusterAPIHandleCloudEventJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewExternalClusterAPIHandleCloudEventRequestWithBody(server, clusterId, "application/json", bodyReader) +} - var pathParam1 string +// NewExternalClusterAPIHandleCloudEventRequestWithBody generates requests for ExternalClusterAPIHandleCloudEvent with any type of body +func NewExternalClusterAPIHandleCloudEventRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -7722,7 +7859,7 @@ func NewInventoryAPISyncClusterResourcesRequest(server string, organizationId st return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/clusters/%s/sync-resource-usage", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/events", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7732,32 +7869,34 @@ func NewInventoryAPISyncClusterResourcesRequest(server string, organizationId st return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewRbacServiceAPICreateGroupRequest calls the generic RbacServiceAPICreateGroup builder with application/json body -func NewRbacServiceAPICreateGroupRequest(server string, organizationId string, body RbacServiceAPICreateGroupJSONRequestBody) (*http.Request, error) { +// NewExternalClusterAPIGCPCreateSARequest calls the generic ExternalClusterAPIGCPCreateSA builder with application/json body +func NewExternalClusterAPIGCPCreateSARequest(server string, clusterId string, body ExternalClusterAPIGCPCreateSAJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRbacServiceAPICreateGroupRequestWithBody(server, organizationId, "application/json", bodyReader) + return NewExternalClusterAPIGCPCreateSARequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewRbacServiceAPICreateGroupRequestWithBody generates requests for RbacServiceAPICreateGroup with any type of body -func NewRbacServiceAPICreateGroupRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIGCPCreateSARequestWithBody generates requests for ExternalClusterAPIGCPCreateSA with any type of body +func NewExternalClusterAPIGCPCreateSARequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -7767,7 +7906,7 @@ func NewRbacServiceAPICreateGroupRequestWithBody(server string, organizationId s return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/groups", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/gcp-create-sa", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7787,31 +7926,13 @@ func NewRbacServiceAPICreateGroupRequestWithBody(server string, organizationId s return req, nil } -// NewRbacServiceAPIUpdateGroupRequest calls the generic RbacServiceAPIUpdateGroup builder with application/json body -func NewRbacServiceAPIUpdateGroupRequest(server string, organizationId string, groupId string, body RbacServiceAPIUpdateGroupJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRbacServiceAPIUpdateGroupRequestWithBody(server, organizationId, groupId, "application/json", bodyReader) -} - -// NewRbacServiceAPIUpdateGroupRequestWithBody generates requests for RbacServiceAPIUpdateGroup with any type of body -func NewRbacServiceAPIUpdateGroupRequestWithBody(server string, organizationId string, groupId string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIDisableGCPSARequest generates requests for ExternalClusterAPIDisableGCPSA +func NewExternalClusterAPIDisableGCPSARequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "group.id", runtime.ParamLocationPath, groupId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -7821,7 +7942,7 @@ func NewRbacServiceAPIUpdateGroupRequestWithBody(server string, organizationId s return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/groups/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/gcp-disable-sa", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7831,150 +7952,32 @@ func NewRbacServiceAPIUpdateGroupRequestWithBody(server string, organizationId s return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewRbacServiceAPIDeleteGroupRequest generates requests for RbacServiceAPIDeleteGroup -func NewRbacServiceAPIDeleteGroupRequest(server string, organizationId string, id string) (*http.Request, error) { +// NewExternalClusterAPIGKECreateSARequest calls the generic ExternalClusterAPIGKECreateSA builder with application/json body +func NewExternalClusterAPIGKECreateSARequest(server string, clusterId string, body ExternalClusterAPIGKECreateSAJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewExternalClusterAPIGKECreateSARequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewExternalClusterAPIGKECreateSARequestWithBody generates requests for ExternalClusterAPIGKECreateSA with any type of body +func NewExternalClusterAPIGKECreateSARequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/organizations/%s/groups/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewRbacServiceAPIGetGroupRequest generates requests for RbacServiceAPIGetGroup -func NewRbacServiceAPIGetGroupRequest(server string, organizationId string, id string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/organizations/%s/groups/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewInventoryAPIGetReservationsRequest generates requests for InventoryAPIGetReservations -func NewInventoryAPIGetReservationsRequest(server string, organizationId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/organizations/%s/reservations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewInventoryAPIAddReservationRequest calls the generic InventoryAPIAddReservation builder with application/json body -func NewInventoryAPIAddReservationRequest(server string, organizationId string, body InventoryAPIAddReservationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewInventoryAPIAddReservationRequestWithBody(server, organizationId, "application/json", bodyReader) -} - -// NewInventoryAPIAddReservationRequestWithBody generates requests for InventoryAPIAddReservation with any type of body -func NewInventoryAPIAddReservationRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -7984,7 +7987,7 @@ func NewInventoryAPIAddReservationRequestWithBody(server string, organizationId return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/reservations", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/gke-create-sa", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8004,58 +8007,13 @@ func NewInventoryAPIAddReservationRequestWithBody(server string, organizationId return req, nil } -// NewInventoryAPIGetReservationsBalanceRequest generates requests for InventoryAPIGetReservationsBalance -func NewInventoryAPIGetReservationsBalanceRequest(server string, organizationId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/organizations/%s/reservations/balance", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewInventoryAPIOverwriteReservationsRequest calls the generic InventoryAPIOverwriteReservations builder with application/json body -func NewInventoryAPIOverwriteReservationsRequest(server string, organizationId string, body InventoryAPIOverwriteReservationsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewInventoryAPIOverwriteReservationsRequestWithBody(server, organizationId, "application/json", bodyReader) -} - -// NewInventoryAPIOverwriteReservationsRequestWithBody generates requests for InventoryAPIOverwriteReservations with any type of body -func NewInventoryAPIOverwriteReservationsRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIDisableGKESARequest generates requests for ExternalClusterAPIDisableGKESA +func NewExternalClusterAPIDisableGKESARequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -8065,7 +8023,7 @@ func NewInventoryAPIOverwriteReservationsRequestWithBody(server string, organiza return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/reservations/overwrite", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/gke-disable-sa", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8075,30 +8033,21 @@ func NewInventoryAPIOverwriteReservationsRequestWithBody(server string, organiza return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewInventoryAPIDeleteReservationRequest generates requests for InventoryAPIDeleteReservation -func NewInventoryAPIDeleteReservationRequest(server string, organizationId string, reservationId string) (*http.Request, error) { +// NewExternalClusterAPITriggerHibernateClusterRequest generates requests for ExternalClusterAPITriggerHibernateCluster +func NewExternalClusterAPITriggerHibernateClusterRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "reservationId", runtime.ParamLocationPath, reservationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -8108,7 +8057,7 @@ func NewInventoryAPIDeleteReservationRequest(server string, organizationId strin return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/reservations/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/hibernate", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8118,7 +8067,7 @@ func NewInventoryAPIDeleteReservationRequest(server string, organizationId strin return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -8126,13 +8075,13 @@ func NewInventoryAPIDeleteReservationRequest(server string, organizationId strin return req, nil } -// NewRbacServiceAPIListRoleBindingsRequest generates requests for RbacServiceAPIListRoleBindings -func NewRbacServiceAPIListRoleBindingsRequest(server string, organizationId string, params *RbacServiceAPIListRoleBindingsParams) (*http.Request, error) { +// NewExternalClusterAPIListNodesRequest generates requests for ExternalClusterAPIListNodes +func NewExternalClusterAPIListNodesRequest(server string, clusterId string, params *ExternalClusterAPIListNodesParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -8142,7 +8091,7 @@ func NewRbacServiceAPIListRoleBindingsRequest(server string, organizationId stri return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8187,9 +8136,9 @@ func NewRbacServiceAPIListRoleBindingsRequest(server string, organizationId stri } - if params.RoleId != nil { + if params.NodeId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "roleId", runtime.ParamLocationQuery, *params.RoleId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeId", runtime.ParamLocationQuery, *params.NodeId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8203,9 +8152,9 @@ func NewRbacServiceAPIListRoleBindingsRequest(server string, organizationId stri } - if params.GroupId != nil { + if params.NodeStatus != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupId", runtime.ParamLocationQuery, *params.GroupId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeStatus", runtime.ParamLocationQuery, *params.NodeStatus); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8219,9 +8168,9 @@ func NewRbacServiceAPIListRoleBindingsRequest(server string, organizationId stri } - if params.ScopeId != nil { + if params.InstanceType != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scopeId", runtime.ParamLocationQuery, *params.ScopeId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "instanceType", runtime.ParamLocationQuery, *params.InstanceType); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8235,35 +8184,195 @@ func NewRbacServiceAPIListRoleBindingsRequest(server string, organizationId stri } - queryURL.RawQuery = queryValues.Encode() - } + if params.LifecycleType != nil { - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "lifecycleType", runtime.ParamLocationQuery, *params.LifecycleType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - return req, nil -} + } -// NewRbacServiceAPICreateRoleBindingsRequest calls the generic RbacServiceAPICreateRoleBindings builder with application/json body -func NewRbacServiceAPICreateRoleBindingsRequest(server string, organizationId string, body RbacServiceAPICreateRoleBindingsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRbacServiceAPICreateRoleBindingsRequestWithBody(server, organizationId, "application/json", bodyReader) -} + if params.RemovalDisabled != nil { -// NewRbacServiceAPICreateRoleBindingsRequestWithBody generates requests for RbacServiceAPICreateRoleBindings with any type of body -func NewRbacServiceAPICreateRoleBindingsRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "removalDisabled", runtime.ParamLocationQuery, *params.RemovalDisabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Unschedulable != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "unschedulable", runtime.ParamLocationQuery, *params.Unschedulable); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Zone != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "zone", runtime.ParamLocationQuery, *params.Zone); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NodeConfigurationName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeConfigurationName", runtime.ParamLocationQuery, *params.NodeConfigurationName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NodeConfigurationVersion != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeConfigurationVersion", runtime.ParamLocationQuery, *params.NodeConfigurationVersion); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NodeTemplateName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeTemplateName", runtime.ParamLocationQuery, *params.NodeTemplateName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NodeTemplateVersion != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeTemplateVersion", runtime.ParamLocationQuery, *params.NodeTemplateVersion); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NodeName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nodeName", runtime.ParamLocationQuery, *params.NodeName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ExcludeDeleting != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "excludeDeleting", runtime.ParamLocationQuery, *params.ExcludeDeleting); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExternalClusterAPIAddNodeRequest calls the generic ExternalClusterAPIAddNode builder with application/json body +func NewExternalClusterAPIAddNodeRequest(server string, clusterId string, body ExternalClusterAPIAddNodeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewExternalClusterAPIAddNodeRequestWithBody(server, clusterId, "application/json", bodyReader) +} + +// NewExternalClusterAPIAddNodeRequestWithBody generates requests for ExternalClusterAPIAddNode with any type of body +func NewExternalClusterAPIAddNodeRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -8273,7 +8382,7 @@ func NewRbacServiceAPICreateRoleBindingsRequestWithBody(server string, organizat return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8293,20 +8402,20 @@ func NewRbacServiceAPICreateRoleBindingsRequestWithBody(server string, organizat return req, nil } -// NewRbacServiceAPIDeleteRoleBindingRequest generates requests for RbacServiceAPIDeleteRoleBinding -func NewRbacServiceAPIDeleteRoleBindingRequest(server string, organizationId string, id string) (*http.Request, error) { +// NewExternalClusterAPIDeleteNodeRequest generates requests for ExternalClusterAPIDeleteNode +func NewExternalClusterAPIDeleteNodeRequest(server string, clusterId string, nodeId string, params *ExternalClusterAPIDeleteNodeParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeId", runtime.ParamLocationPath, nodeId) if err != nil { return nil, err } @@ -8316,7 +8425,7 @@ func NewRbacServiceAPIDeleteRoleBindingRequest(server string, organizationId str return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8326,6 +8435,44 @@ func NewRbacServiceAPIDeleteRoleBindingRequest(server string, organizationId str return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.DrainTimeout != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "drainTimeout", runtime.ParamLocationQuery, *params.DrainTimeout); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ForceDelete != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "forceDelete", runtime.ParamLocationQuery, *params.ForceDelete); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err @@ -8334,20 +8481,20 @@ func NewRbacServiceAPIDeleteRoleBindingRequest(server string, organizationId str return req, nil } -// NewRbacServiceAPIGetRoleBindingRequest generates requests for RbacServiceAPIGetRoleBinding -func NewRbacServiceAPIGetRoleBindingRequest(server string, organizationId string, id string) (*http.Request, error) { +// NewExternalClusterAPIGetNodeRequest generates requests for ExternalClusterAPIGetNode +func NewExternalClusterAPIGetNodeRequest(server string, clusterId string, nodeId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeId", runtime.ParamLocationPath, nodeId) if err != nil { return nil, err } @@ -8357,7 +8504,7 @@ func NewRbacServiceAPIGetRoleBindingRequest(server string, organizationId string return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8375,31 +8522,31 @@ func NewRbacServiceAPIGetRoleBindingRequest(server string, organizationId string return req, nil } -// NewRbacServiceAPIUpdateRoleBindingRequest calls the generic RbacServiceAPIUpdateRoleBinding builder with application/json body -func NewRbacServiceAPIUpdateRoleBindingRequest(server string, organizationId string, roleBindingId string, body RbacServiceAPIUpdateRoleBindingJSONRequestBody) (*http.Request, error) { +// NewExternalClusterAPIDrainNodeRequest calls the generic ExternalClusterAPIDrainNode builder with application/json body +func NewExternalClusterAPIDrainNodeRequest(server string, clusterId string, nodeId string, body ExternalClusterAPIDrainNodeJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRbacServiceAPIUpdateRoleBindingRequestWithBody(server, organizationId, roleBindingId, "application/json", bodyReader) + return NewExternalClusterAPIDrainNodeRequestWithBody(server, clusterId, nodeId, "application/json", bodyReader) } -// NewRbacServiceAPIUpdateRoleBindingRequestWithBody generates requests for RbacServiceAPIUpdateRoleBinding with any type of body -func NewRbacServiceAPIUpdateRoleBindingRequestWithBody(server string, organizationId string, roleBindingId string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIDrainNodeRequestWithBody generates requests for ExternalClusterAPIDrainNode with any type of body +func NewExternalClusterAPIDrainNodeRequestWithBody(server string, clusterId string, nodeId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "roleBinding.id", runtime.ParamLocationPath, roleBindingId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "nodeId", runtime.ParamLocationPath, nodeId) if err != nil { return nil, err } @@ -8409,7 +8556,7 @@ func NewRbacServiceAPIUpdateRoleBindingRequestWithBody(server string, organizati return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/nodes/%s/drain", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8419,7 +8566,7 @@ func NewRbacServiceAPIUpdateRoleBindingRequestWithBody(server string, organizati return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -8429,13 +8576,13 @@ func NewRbacServiceAPIUpdateRoleBindingRequestWithBody(server string, organizati return req, nil } -// NewRbacServiceAPIListRolesRequest generates requests for RbacServiceAPIListRoles -func NewRbacServiceAPIListRolesRequest(server string, organizationId string, params *RbacServiceAPIListRolesParams) (*http.Request, error) { +// NewExternalClusterAPIReconcileClusterRequest generates requests for ExternalClusterAPIReconcileCluster +func NewExternalClusterAPIReconcileClusterRequest(server string, clusterId string, params *ExternalClusterAPIReconcileClusterParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -8445,7 +8592,7 @@ func NewRbacServiceAPIListRolesRequest(server string, organizationId string, par return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/roles", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/reconcile", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8458,41 +8605,9 @@ func NewRbacServiceAPIListRolesRequest(server string, organizationId string, par if params != nil { queryValues := queryURL.Query() - if params.PageLimit != nil { + if params.SkipAksInitData != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PageCursor != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Type != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "skipAksInitData", runtime.ParamLocationQuery, *params.SkipAksInitData); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8509,7 +8624,7 @@ func NewRbacServiceAPIListRolesRequest(server string, organizationId string, par queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -8517,65 +8632,24 @@ func NewRbacServiceAPIListRolesRequest(server string, organizationId string, par return req, nil } -// NewServiceAccountsAPIDeleteServiceAccountsRequest generates requests for ServiceAccountsAPIDeleteServiceAccounts -func NewServiceAccountsAPIDeleteServiceAccountsRequest(server string, organizationId string, params *ServiceAccountsAPIDeleteServiceAccountsParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "serviceAccountIds", runtime.ParamLocationQuery, params.ServiceAccountIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) +// NewExternalClusterAPITriggerResumeClusterRequest calls the generic ExternalClusterAPITriggerResumeCluster builder with application/json body +func NewExternalClusterAPITriggerResumeClusterRequest(server string, clusterId string, body ExternalClusterAPITriggerResumeClusterJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - - return req, nil + bodyReader = bytes.NewReader(buf) + return NewExternalClusterAPITriggerResumeClusterRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewServiceAccountsAPIListServiceAccountsRequest generates requests for ServiceAccountsAPIListServiceAccounts -func NewServiceAccountsAPIListServiceAccountsRequest(server string, organizationId string, params *ServiceAccountsAPIListServiceAccountsParams) (*http.Request, error) { +// NewExternalClusterAPITriggerResumeClusterRequestWithBody generates requests for ExternalClusterAPITriggerResumeCluster with any type of body +func NewExternalClusterAPITriggerResumeClusterRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -8585,7 +8659,7 @@ func NewServiceAccountsAPIListServiceAccountsRequest(server string, organization return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/resume", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8595,70 +8669,34 @@ func NewServiceAccountsAPIListServiceAccountsRequest(server string, organization return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.PageLimit != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PageCursor != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewServiceAccountsAPICreateServiceAccountRequest calls the generic ServiceAccountsAPICreateServiceAccount builder with application/json body -func NewServiceAccountsAPICreateServiceAccountRequest(server string, organizationId string, body ServiceAccountsAPICreateServiceAccountJSONRequestBody) (*http.Request, error) { +// NewExternalClusterAPIUpdateClusterTagsRequest calls the generic ExternalClusterAPIUpdateClusterTags builder with application/json body +func NewExternalClusterAPIUpdateClusterTagsRequest(server string, clusterId string, body ExternalClusterAPIUpdateClusterTagsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewServiceAccountsAPICreateServiceAccountRequestWithBody(server, organizationId, "application/json", bodyReader) + return NewExternalClusterAPIUpdateClusterTagsRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewServiceAccountsAPICreateServiceAccountRequestWithBody generates requests for ServiceAccountsAPICreateServiceAccount with any type of body -func NewServiceAccountsAPICreateServiceAccountRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIUpdateClusterTagsRequestWithBody generates requests for ExternalClusterAPIUpdateClusterTags with any type of body +func NewExternalClusterAPIUpdateClusterTagsRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -8668,7 +8706,7 @@ func NewServiceAccountsAPICreateServiceAccountRequestWithBody(server string, org return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts", pathParam0) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/tags", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8688,20 +8726,13 @@ func NewServiceAccountsAPICreateServiceAccountRequestWithBody(server string, org return req, nil } -// NewServiceAccountsAPIDeleteServiceAccountRequest generates requests for ServiceAccountsAPIDeleteServiceAccount -func NewServiceAccountsAPIDeleteServiceAccountRequest(server string, organizationId string, serviceAccountId string) (*http.Request, error) { +// NewExternalClusterAPICreateClusterTokenRequest generates requests for ExternalClusterAPICreateClusterToken +func NewExternalClusterAPICreateClusterTokenRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -8711,7 +8742,7 @@ func NewServiceAccountsAPIDeleteServiceAccountRequest(server string, organizatio return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/kubernetes/external-clusters/%s/token", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8721,7 +8752,7 @@ func NewServiceAccountsAPIDeleteServiceAccountRequest(server string, organizatio return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -8729,30 +8760,43 @@ func NewServiceAccountsAPIDeleteServiceAccountRequest(server string, organizatio return req, nil } -// NewServiceAccountsAPIGetServiceAccountRequest generates requests for ServiceAccountsAPIGetServiceAccount -func NewServiceAccountsAPIGetServiceAccountRequest(server string, organizationId string, serviceAccountId string) (*http.Request, error) { +// NewNodeConfigurationAPIListMaxPodsPresetsRequest generates requests for NodeConfigurationAPIListMaxPodsPresets +func NewNodeConfigurationAPIListMaxPodsPresetsRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam1 string + operationPath := fmt.Sprintf("/v1/kubernetes/maxpods-formula-presets") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } + return req, nil +} + +// NewUsersAPICurrentUserProfileRequest generates requests for UsersAPICurrentUserProfile +func NewUsersAPICurrentUserProfileRequest(server string) (*http.Request, error) { + var err error + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/me") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8770,41 +8814,56 @@ func NewServiceAccountsAPIGetServiceAccountRequest(server string, organizationId return req, nil } -// NewServiceAccountsAPIUpdateServiceAccountRequest calls the generic ServiceAccountsAPIUpdateServiceAccount builder with application/json body -func NewServiceAccountsAPIUpdateServiceAccountRequest(server string, organizationId string, serviceAccountId string, body ServiceAccountsAPIUpdateServiceAccountJSONRequestBody) (*http.Request, error) { +// NewUsersAPIUpdateCurrentUserProfileRequest calls the generic UsersAPIUpdateCurrentUserProfile builder with application/json body +func NewUsersAPIUpdateCurrentUserProfileRequest(server string, body UsersAPIUpdateCurrentUserProfileJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewServiceAccountsAPIUpdateServiceAccountRequestWithBody(server, organizationId, serviceAccountId, "application/json", bodyReader) + return NewUsersAPIUpdateCurrentUserProfileRequestWithBody(server, "application/json", bodyReader) } -// NewServiceAccountsAPIUpdateServiceAccountRequestWithBody generates requests for ServiceAccountsAPIUpdateServiceAccount with any type of body -func NewServiceAccountsAPIUpdateServiceAccountRequestWithBody(server string, organizationId string, serviceAccountId string, contentType string, body io.Reader) (*http.Request, error) { +// NewUsersAPIUpdateCurrentUserProfileRequestWithBody generates requests for UsersAPIUpdateCurrentUserProfile with any type of body +func NewUsersAPIUpdateCurrentUserProfileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam1 string + operationPath := fmt.Sprintf("/v1/me") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUsersAPIListOrganizationsRequest generates requests for UsersAPIListOrganizations +func NewUsersAPIListOrganizationsRequest(server string) (*http.Request, error) { + var err error + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/organizations") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8814,51 +8873,35 @@ func NewServiceAccountsAPIUpdateServiceAccountRequestWithBody(server string, org return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewServiceAccountsAPICreateServiceAccountKeyRequest calls the generic ServiceAccountsAPICreateServiceAccountKey builder with application/json body -func NewServiceAccountsAPICreateServiceAccountKeyRequest(server string, organizationId string, serviceAccountId string, body ServiceAccountsAPICreateServiceAccountKeyJSONRequestBody) (*http.Request, error) { +// NewUsersAPICreateOrganizationRequest calls the generic UsersAPICreateOrganization builder with application/json body +func NewUsersAPICreateOrganizationRequest(server string, body UsersAPICreateOrganizationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewServiceAccountsAPICreateServiceAccountKeyRequestWithBody(server, organizationId, serviceAccountId, "application/json", bodyReader) + return NewUsersAPICreateOrganizationRequestWithBody(server, "application/json", bodyReader) } -// NewServiceAccountsAPICreateServiceAccountKeyRequestWithBody generates requests for ServiceAccountsAPICreateServiceAccountKey with any type of body -func NewServiceAccountsAPICreateServiceAccountKeyRequestWithBody(server string, organizationId string, serviceAccountId string, contentType string, body io.Reader) (*http.Request, error) { +// NewUsersAPICreateOrganizationRequestWithBody generates requests for UsersAPICreateOrganization with any type of body +func NewUsersAPICreateOrganizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s/keys", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/organizations") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8878,48 +8921,43 @@ func NewServiceAccountsAPICreateServiceAccountKeyRequestWithBody(server string, return req, nil } -// NewServiceAccountsAPIUpdateServiceAccountKeyRequest calls the generic ServiceAccountsAPIUpdateServiceAccountKey builder with application/json body -func NewServiceAccountsAPIUpdateServiceAccountKeyRequest(server string, organizationId string, serviceAccountId string, keyId string, body ServiceAccountsAPIUpdateServiceAccountKeyJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewServiceAccountsAPIUpdateServiceAccountKeyRequestWithBody(server, organizationId, serviceAccountId, keyId, "application/json", bodyReader) -} - -// NewServiceAccountsAPIUpdateServiceAccountKeyRequestWithBody generates requests for ServiceAccountsAPIUpdateServiceAccountKey with any type of body -func NewServiceAccountsAPIUpdateServiceAccountKeyRequestWithBody(server string, organizationId string, serviceAccountId string, keyId string, contentType string, body io.Reader) (*http.Request, error) { +// NewInventoryAPIGetOrganizationReservationsBalanceRequest generates requests for InventoryAPIGetOrganizationReservationsBalance +func NewInventoryAPIGetOrganizationReservationsBalanceRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam1 string + operationPath := fmt.Sprintf("/v1/organizations/reservations/balance") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "key.id", runtime.ParamLocationPath, keyId) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } + return req, nil +} + +// NewInventoryAPIGetOrganizationResourceUsageRequest generates requests for InventoryAPIGetOrganizationResourceUsage +func NewInventoryAPIGetOrganizationResourceUsageRequest(server string) (*http.Request, error) { + var err error + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s/keys/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/v1/organizations/resource-usage") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8929,37 +8967,21 @@ func NewServiceAccountsAPIUpdateServiceAccountKeyRequestWithBody(server string, return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewServiceAccountsAPIDeleteServiceAccountKeyRequest generates requests for ServiceAccountsAPIDeleteServiceAccountKey -func NewServiceAccountsAPIDeleteServiceAccountKeyRequest(server string, organizationId string, serviceAccountId string, keyId string) (*http.Request, error) { +// NewUsersAPIDeleteOrganizationRequest generates requests for UsersAPIDeleteOrganization +func NewUsersAPIDeleteOrganizationRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "keyId", runtime.ParamLocationPath, keyId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -8969,7 +8991,7 @@ func NewServiceAccountsAPIDeleteServiceAccountKeyRequest(server string, organiza return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s/keys/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/v1/organizations/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8987,27 +9009,13 @@ func NewServiceAccountsAPIDeleteServiceAccountKeyRequest(server string, organiza return req, nil } -// NewServiceAccountsAPIGetServiceAccountKeyRequest generates requests for ServiceAccountsAPIGetServiceAccountKey -func NewServiceAccountsAPIGetServiceAccountKeyRequest(server string, organizationId string, serviceAccountId string, keyId string) (*http.Request, error) { +// NewUsersAPIGetOrganizationRequest generates requests for UsersAPIGetOrganization +func NewUsersAPIGetOrganizationRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "keyId", runtime.ParamLocationPath, keyId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -9017,7 +9025,7 @@ func NewServiceAccountsAPIGetServiceAccountKeyRequest(server string, organizatio return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s/keys/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/v1/organizations/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9035,13 +9043,24 @@ func NewServiceAccountsAPIGetServiceAccountKeyRequest(server string, organizatio return req, nil } -// NewUsersAPIRemoveOrganizationUsersRequest generates requests for UsersAPIRemoveOrganizationUsers -func NewUsersAPIRemoveOrganizationUsersRequest(server string, organizationId string, params *UsersAPIRemoveOrganizationUsersParams) (*http.Request, error) { +// NewUsersAPIEditOrganizationRequest calls the generic UsersAPIEditOrganization builder with application/json body +func NewUsersAPIEditOrganizationRequest(server string, id string, body UsersAPIEditOrganizationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUsersAPIEditOrganizationRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewUsersAPIEditOrganizationRequestWithBody generates requests for UsersAPIEditOrganization with any type of body +func NewUsersAPIEditOrganizationRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -9051,7 +9070,7 @@ func NewUsersAPIRemoveOrganizationUsersRequest(server string, organizationId str return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/users", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9061,34 +9080,18 @@ func NewUsersAPIRemoveOrganizationUsersRequest(server string, organizationId str return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "users", runtime.ParamLocationQuery, params.Users); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUsersAPIListOrganizationUsersRequest generates requests for UsersAPIListOrganizationUsers -func NewUsersAPIListOrganizationUsersRequest(server string, organizationId string, params *UsersAPIListOrganizationUsersParams) (*http.Request, error) { +// NewInventoryAPISyncClusterResourcesRequest generates requests for InventoryAPISyncClusterResources +func NewInventoryAPISyncClusterResourcesRequest(server string, organizationId string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -9098,12 +9101,19 @@ func NewUsersAPIListOrganizationUsersRequest(server string, organizationId strin return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/users", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/clusters/%s/sync-resource-usage", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9113,45 +9123,7 @@ func NewUsersAPIListOrganizationUsersRequest(server string, organizationId strin return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.IncludeGroups != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeGroups", runtime.ParamLocationQuery, *params.IncludeGroups); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.RoleId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "roleId", runtime.ParamLocationQuery, *params.RoleId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -9159,19 +9131,19 @@ func NewUsersAPIListOrganizationUsersRequest(server string, organizationId strin return req, nil } -// NewUsersAPIAddUserToOrganizationRequest calls the generic UsersAPIAddUserToOrganization builder with application/json body -func NewUsersAPIAddUserToOrganizationRequest(server string, organizationId string, body UsersAPIAddUserToOrganizationJSONRequestBody) (*http.Request, error) { +// NewRbacServiceAPICreateGroupRequest calls the generic RbacServiceAPICreateGroup builder with application/json body +func NewRbacServiceAPICreateGroupRequest(server string, organizationId string, body RbacServiceAPICreateGroupJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUsersAPIAddUserToOrganizationRequestWithBody(server, organizationId, "application/json", bodyReader) + return NewRbacServiceAPICreateGroupRequestWithBody(server, organizationId, "application/json", bodyReader) } -// NewUsersAPIAddUserToOrganizationRequestWithBody generates requests for UsersAPIAddUserToOrganization with any type of body -func NewUsersAPIAddUserToOrganizationRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { +// NewRbacServiceAPICreateGroupRequestWithBody generates requests for RbacServiceAPICreateGroup with any type of body +func NewRbacServiceAPICreateGroupRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -9186,7 +9158,7 @@ func NewUsersAPIAddUserToOrganizationRequestWithBody(server string, organization return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/users", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/groups", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9206,8 +9178,19 @@ func NewUsersAPIAddUserToOrganizationRequestWithBody(server string, organization return req, nil } -// NewUsersAPIRemoveUserFromOrganizationRequest generates requests for UsersAPIRemoveUserFromOrganization -func NewUsersAPIRemoveUserFromOrganizationRequest(server string, organizationId string, userId string) (*http.Request, error) { +// NewRbacServiceAPIUpdateGroupRequest calls the generic RbacServiceAPIUpdateGroup builder with application/json body +func NewRbacServiceAPIUpdateGroupRequest(server string, organizationId string, groupId string, body RbacServiceAPIUpdateGroupJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRbacServiceAPIUpdateGroupRequestWithBody(server, organizationId, groupId, "application/json", bodyReader) +} + +// NewRbacServiceAPIUpdateGroupRequestWithBody generates requests for RbacServiceAPIUpdateGroup with any type of body +func NewRbacServiceAPIUpdateGroupRequestWithBody(server string, organizationId string, groupId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -9219,7 +9202,7 @@ func NewUsersAPIRemoveUserFromOrganizationRequest(server string, organizationId var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "group.id", runtime.ParamLocationPath, groupId) if err != nil { return nil, err } @@ -9229,7 +9212,7 @@ func NewUsersAPIRemoveUserFromOrganizationRequest(server string, organizationId return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/users/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/organizations/%s/groups/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9239,27 +9222,18 @@ func NewUsersAPIRemoveUserFromOrganizationRequest(server string, organizationId return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewUsersAPIUpdateOrganizationUserRequest calls the generic UsersAPIUpdateOrganizationUser builder with application/json body -func NewUsersAPIUpdateOrganizationUserRequest(server string, organizationId string, userId string, body UsersAPIUpdateOrganizationUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUsersAPIUpdateOrganizationUserRequestWithBody(server, organizationId, userId, "application/json", bodyReader) + return req, nil } -// NewUsersAPIUpdateOrganizationUserRequestWithBody generates requests for UsersAPIUpdateOrganizationUser with any type of body -func NewUsersAPIUpdateOrganizationUserRequestWithBody(server string, organizationId string, userId string, contentType string, body io.Reader) (*http.Request, error) { +// NewRbacServiceAPIDeleteGroupRequest generates requests for RbacServiceAPIDeleteGroup +func NewRbacServiceAPIDeleteGroupRequest(server string, organizationId string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -9271,7 +9245,7 @@ func NewUsersAPIUpdateOrganizationUserRequestWithBody(server string, organizatio var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -9281,7 +9255,7 @@ func NewUsersAPIUpdateOrganizationUserRequestWithBody(server string, organizatio return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/users/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/organizations/%s/groups/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9291,18 +9265,16 @@ func NewUsersAPIUpdateOrganizationUserRequestWithBody(server string, organizatio return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewUsersAPIListUserGroupsRequest generates requests for UsersAPIListUserGroups -func NewUsersAPIListUserGroupsRequest(server string, organizationId string, userId string) (*http.Request, error) { +// NewRbacServiceAPIGetGroupRequest generates requests for RbacServiceAPIGetGroup +func NewRbacServiceAPIGetGroupRequest(server string, organizationId string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -9314,7 +9286,7 @@ func NewUsersAPIListUserGroupsRequest(server string, organizationId string, user var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -9324,7 +9296,7 @@ func NewUsersAPIListUserGroupsRequest(server string, organizationId string, user return nil, err } - operationPath := fmt.Sprintf("/v1/organizations/%s/users/%s/groups", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/organizations/%s/groups/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9342,16 +9314,23 @@ func NewUsersAPIListUserGroupsRequest(server string, organizationId string, user return req, nil } -// NewScheduledRebalancingAPIListRebalancingSchedulesRequest generates requests for ScheduledRebalancingAPIListRebalancingSchedules -func NewScheduledRebalancingAPIListRebalancingSchedulesRequest(server string) (*http.Request, error) { +// NewInventoryAPIGetReservationsRequest generates requests for InventoryAPIGetReservations +func NewInventoryAPIGetReservationsRequest(server string, organizationId string) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/rebalancing-schedules") + operationPath := fmt.Sprintf("/v1/organizations/%s/reservations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9369,27 +9348,34 @@ func NewScheduledRebalancingAPIListRebalancingSchedulesRequest(server string) (* return req, nil } -// NewScheduledRebalancingAPICreateRebalancingScheduleRequest calls the generic ScheduledRebalancingAPICreateRebalancingSchedule builder with application/json body -func NewScheduledRebalancingAPICreateRebalancingScheduleRequest(server string, body ScheduledRebalancingAPICreateRebalancingScheduleJSONRequestBody) (*http.Request, error) { +// NewInventoryAPIAddReservationRequest calls the generic InventoryAPIAddReservation builder with application/json body +func NewInventoryAPIAddReservationRequest(server string, organizationId string, body InventoryAPIAddReservationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewScheduledRebalancingAPICreateRebalancingScheduleRequestWithBody(server, "application/json", bodyReader) + return NewInventoryAPIAddReservationRequestWithBody(server, organizationId, "application/json", bodyReader) } -// NewScheduledRebalancingAPICreateRebalancingScheduleRequestWithBody generates requests for ScheduledRebalancingAPICreateRebalancingSchedule with any type of body -func NewScheduledRebalancingAPICreateRebalancingScheduleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewInventoryAPIAddReservationRequestWithBody generates requests for InventoryAPIAddReservation with any type of body +func NewInventoryAPIAddReservationRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/rebalancing-schedules") + operationPath := fmt.Sprintf("/v1/organizations/%s/reservations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9409,27 +9395,23 @@ func NewScheduledRebalancingAPICreateRebalancingScheduleRequestWithBody(server s return req, nil } -// NewScheduledRebalancingAPIUpdateRebalancingScheduleRequest calls the generic ScheduledRebalancingAPIUpdateRebalancingSchedule builder with application/json body -func NewScheduledRebalancingAPIUpdateRebalancingScheduleRequest(server string, params *ScheduledRebalancingAPIUpdateRebalancingScheduleParams, body ScheduledRebalancingAPIUpdateRebalancingScheduleJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewInventoryAPIGetReservationsBalanceRequest generates requests for InventoryAPIGetReservationsBalance +func NewInventoryAPIGetReservationsBalanceRequest(server string, organizationId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewScheduledRebalancingAPIUpdateRebalancingScheduleRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewScheduledRebalancingAPIUpdateRebalancingScheduleRequestWithBody generates requests for ScheduledRebalancingAPIUpdateRebalancingSchedule with any type of body -func NewScheduledRebalancingAPIUpdateRebalancingScheduleRequestWithBody(server string, params *ScheduledRebalancingAPIUpdateRebalancingScheduleParams, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/rebalancing-schedules") + operationPath := fmt.Sprintf("/v1/organizations/%s/reservations/balance", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9439,45 +9421,32 @@ func NewScheduledRebalancingAPIUpdateRebalancingScheduleRequestWithBody(server s return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewScheduledRebalancingAPIDeleteRebalancingScheduleRequest generates requests for ScheduledRebalancingAPIDeleteRebalancingSchedule -func NewScheduledRebalancingAPIDeleteRebalancingScheduleRequest(server string, id string) (*http.Request, error) { +// NewInventoryAPIOverwriteReservationsRequest calls the generic InventoryAPIOverwriteReservations builder with application/json body +func NewInventoryAPIOverwriteReservationsRequest(server string, organizationId string, body InventoryAPIOverwriteReservationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewInventoryAPIOverwriteReservationsRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewInventoryAPIOverwriteReservationsRequestWithBody generates requests for InventoryAPIOverwriteReservations with any type of body +func NewInventoryAPIOverwriteReservationsRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) if err != nil { return nil, err } @@ -9487,7 +9456,7 @@ func NewScheduledRebalancingAPIDeleteRebalancingScheduleRequest(server string, i return nil, err } - operationPath := fmt.Sprintf("/v1/rebalancing-schedules/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/reservations/overwrite", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9497,21 +9466,30 @@ func NewScheduledRebalancingAPIDeleteRebalancingScheduleRequest(server string, i return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewScheduledRebalancingAPIGetRebalancingScheduleRequest generates requests for ScheduledRebalancingAPIGetRebalancingSchedule -func NewScheduledRebalancingAPIGetRebalancingScheduleRequest(server string, id string) (*http.Request, error) { +// NewInventoryAPIDeleteReservationRequest generates requests for InventoryAPIDeleteReservation +func NewInventoryAPIDeleteReservationRequest(server string, organizationId string, reservationId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "reservationId", runtime.ParamLocationPath, reservationId) if err != nil { return nil, err } @@ -9521,7 +9499,7 @@ func NewScheduledRebalancingAPIGetRebalancingScheduleRequest(server string, id s return nil, err } - operationPath := fmt.Sprintf("/v1/rebalancing-schedules/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/reservations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9531,7 +9509,7 @@ func NewScheduledRebalancingAPIGetRebalancingScheduleRequest(server string, id s return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -9539,16 +9517,23 @@ func NewScheduledRebalancingAPIGetRebalancingScheduleRequest(server string, id s return req, nil } -// NewInventoryAPIListRegionsRequest generates requests for InventoryAPIListRegions -func NewInventoryAPIListRegionsRequest(server string, params *InventoryAPIListRegionsParams) (*http.Request, error) { +// NewRbacServiceAPIListRoleBindingsRequest generates requests for RbacServiceAPIListRoleBindings +func NewRbacServiceAPIListRoleBindingsRequest(server string, organizationId string, params *RbacServiceAPIListRoleBindingsParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/regions") + operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9561,9 +9546,9 @@ func NewInventoryAPIListRegionsRequest(server string, params *InventoryAPIListRe if params != nil { queryValues := queryURL.Query() - if params.PageSize != nil { + if params.PageLimit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -9577,9 +9562,57 @@ func NewInventoryAPIListRegionsRequest(server string, params *InventoryAPIListRe } - if params.PageToken != nil { + if params.PageCursor != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageToken", runtime.ParamLocationQuery, *params.PageToken); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.RoleId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "roleId", runtime.ParamLocationQuery, *params.RoleId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GroupId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupId", runtime.ParamLocationQuery, *params.GroupId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ScopeId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scopeId", runtime.ParamLocationQuery, *params.ScopeId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -9604,16 +9637,34 @@ func NewInventoryAPIListRegionsRequest(server string, params *InventoryAPIListRe return req, nil } -// NewCommitmentsAPIGetCommitmentsAssignmentsRequest generates requests for CommitmentsAPIGetCommitmentsAssignments -func NewCommitmentsAPIGetCommitmentsAssignmentsRequest(server string) (*http.Request, error) { +// NewRbacServiceAPICreateRoleBindingsRequest calls the generic RbacServiceAPICreateRoleBindings builder with application/json body +func NewRbacServiceAPICreateRoleBindingsRequest(server string, organizationId string, body RbacServiceAPICreateRoleBindingsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRbacServiceAPICreateRoleBindingsRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewRbacServiceAPICreateRoleBindingsRequestWithBody generates requests for RbacServiceAPICreateRoleBindings with any type of body +func NewRbacServiceAPICreateRoleBindingsRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/savings/assignments") + operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9623,24 +9674,40 @@ func NewCommitmentsAPIGetCommitmentsAssignmentsRequest(server string) (*http.Req return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCommitmentsAPICreateCommitmentAssignmentRequest generates requests for CommitmentsAPICreateCommitmentAssignment -func NewCommitmentsAPICreateCommitmentAssignmentRequest(server string, params *CommitmentsAPICreateCommitmentAssignmentParams) (*http.Request, error) { +// NewRbacServiceAPIDeleteRoleBindingRequest generates requests for RbacServiceAPIDeleteRoleBinding +func NewRbacServiceAPIDeleteRoleBindingRequest(server string, organizationId string, id string) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/savings/assignments") + operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9650,37 +9717,48 @@ func NewCommitmentsAPICreateCommitmentAssignmentRequest(server string, params *C return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterId", runtime.ParamLocationQuery, params.ClusterId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "commitmentId", runtime.ParamLocationQuery, params.CommitmentId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - queryURL.RawQuery = queryValues.Encode() +// NewRbacServiceAPIGetRoleBindingRequest generates requests for RbacServiceAPIGetRoleBinding +func NewRbacServiceAPIGetRoleBindingRequest(server string, organizationId string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -9688,13 +9766,31 @@ func NewCommitmentsAPICreateCommitmentAssignmentRequest(server string, params *C return req, nil } -// NewCommitmentsAPIDeleteCommitmentAssignmentRequest generates requests for CommitmentsAPIDeleteCommitmentAssignment -func NewCommitmentsAPIDeleteCommitmentAssignmentRequest(server string, assignmentId string) (*http.Request, error) { +// NewRbacServiceAPIUpdateRoleBindingRequest calls the generic RbacServiceAPIUpdateRoleBinding builder with application/json body +func NewRbacServiceAPIUpdateRoleBindingRequest(server string, organizationId string, roleBindingId string, body RbacServiceAPIUpdateRoleBindingJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRbacServiceAPIUpdateRoleBindingRequestWithBody(server, organizationId, roleBindingId, "application/json", bodyReader) +} + +// NewRbacServiceAPIUpdateRoleBindingRequestWithBody generates requests for RbacServiceAPIUpdateRoleBinding with any type of body +func NewRbacServiceAPIUpdateRoleBindingRequestWithBody(server string, organizationId string, roleBindingId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "assignmentId", runtime.ParamLocationPath, assignmentId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "roleBinding.id", runtime.ParamLocationPath, roleBindingId) if err != nil { return nil, err } @@ -9704,7 +9800,7 @@ func NewCommitmentsAPIDeleteCommitmentAssignmentRequest(server string, assignmen return nil, err } - operationPath := fmt.Sprintf("/v1/savings/assignments/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/role-bindings/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9714,24 +9810,33 @@ func NewCommitmentsAPIDeleteCommitmentAssignmentRequest(server string, assignmen return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCommitmentsAPIGetCommitmentsRequest generates requests for CommitmentsAPIGetCommitments -func NewCommitmentsAPIGetCommitmentsRequest(server string, params *CommitmentsAPIGetCommitmentsParams) (*http.Request, error) { +// NewRbacServiceAPIListRolesRequest generates requests for RbacServiceAPIListRoles +func NewRbacServiceAPIListRolesRequest(server string, organizationId string, params *RbacServiceAPIListRolesParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments") + operationPath := fmt.Sprintf("/v1/organizations/%s/roles", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9744,9 +9849,9 @@ func NewCommitmentsAPIGetCommitmentsRequest(server string, params *CommitmentsAP if params != nil { queryValues := queryURL.Query() - if params.IncludeUsage != nil { + if params.PageLimit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsage", runtime.ParamLocationQuery, *params.IncludeUsage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -9760,9 +9865,9 @@ func NewCommitmentsAPIGetCommitmentsRequest(server string, params *CommitmentsAP } - if params.ClusterId != nil { + if params.PageCursor != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterId", runtime.ParamLocationQuery, *params.ClusterId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -9776,9 +9881,9 @@ func NewCommitmentsAPIGetCommitmentsRequest(server string, params *CommitmentsAP } - if params.IncludeUsagePerClusters != nil { + if params.Type != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsagePerClusters", runtime.ParamLocationQuery, *params.IncludeUsagePerClusters); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -9792,26 +9897,62 @@ func NewCommitmentsAPIGetCommitmentsRequest(server string, params *CommitmentsAP } - if params.IncludeUsagePerInstanceTypes != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsagePerInstanceTypes", runtime.ParamLocationQuery, *params.IncludeUsagePerInstanceTypes); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewServiceAccountsAPIDeleteServiceAccountsRequest generates requests for ServiceAccountsAPIDeleteServiceAccounts +func NewServiceAccountsAPIDeleteServiceAccountsRequest(server string, organizationId string, params *ServiceAccountsAPIDeleteServiceAccountsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "serviceAccountIds", runtime.ParamLocationQuery, params.ServiceAccountIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) } } - } queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -9819,16 +9960,23 @@ func NewCommitmentsAPIGetCommitmentsRequest(server string, params *CommitmentsAP return req, nil } -// NewCommitmentsAPIGetCommitmentsDiscountedPricesRequest generates requests for CommitmentsAPIGetCommitmentsDiscountedPrices -func NewCommitmentsAPIGetCommitmentsDiscountedPricesRequest(server string, params *CommitmentsAPIGetCommitmentsDiscountedPricesParams) (*http.Request, error) { +// NewServiceAccountsAPIListServiceAccountsRequest generates requests for ServiceAccountsAPIListServiceAccounts +func NewServiceAccountsAPIListServiceAccountsRequest(server string, organizationId string, params *ServiceAccountsAPIListServiceAccountsParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/discounted-prices") + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9884,27 +10032,34 @@ func NewCommitmentsAPIGetCommitmentsDiscountedPricesRequest(server string, param return req, nil } -// NewCommitmentsAPIImportAzureReservationsRequest calls the generic CommitmentsAPIImportAzureReservations builder with application/json body -func NewCommitmentsAPIImportAzureReservationsRequest(server string, params *CommitmentsAPIImportAzureReservationsParams, body CommitmentsAPIImportAzureReservationsJSONRequestBody) (*http.Request, error) { +// NewServiceAccountsAPICreateServiceAccountRequest calls the generic ServiceAccountsAPICreateServiceAccount builder with application/json body +func NewServiceAccountsAPICreateServiceAccountRequest(server string, organizationId string, body ServiceAccountsAPICreateServiceAccountJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCommitmentsAPIImportAzureReservationsRequestWithBody(server, params, "application/json", bodyReader) + return NewServiceAccountsAPICreateServiceAccountRequestWithBody(server, organizationId, "application/json", bodyReader) } -// NewCommitmentsAPIImportAzureReservationsRequestWithBody generates requests for CommitmentsAPIImportAzureReservations with any type of body -func NewCommitmentsAPIImportAzureReservationsRequestWithBody(server string, params *CommitmentsAPIImportAzureReservationsParams, contentType string, body io.Reader) (*http.Request, error) { +// NewServiceAccountsAPICreateServiceAccountRequestWithBody generates requests for ServiceAccountsAPICreateServiceAccount with any type of body +func NewServiceAccountsAPICreateServiceAccountRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/import/azure/reservation") + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9914,28 +10069,6 @@ func NewCommitmentsAPIImportAzureReservationsRequestWithBody(server string, para return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Behaviour != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "behaviour", runtime.ParamLocationQuery, *params.Behaviour); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err @@ -9946,27 +10079,30 @@ func NewCommitmentsAPIImportAzureReservationsRequestWithBody(server string, para return req, nil } -// NewCommitmentsAPIImportGCPCommitmentsRequest calls the generic CommitmentsAPIImportGCPCommitments builder with application/json body -func NewCommitmentsAPIImportGCPCommitmentsRequest(server string, params *CommitmentsAPIImportGCPCommitmentsParams, body CommitmentsAPIImportGCPCommitmentsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewServiceAccountsAPIDeleteServiceAccountRequest generates requests for ServiceAccountsAPIDeleteServiceAccount +func NewServiceAccountsAPIDeleteServiceAccountRequest(server string, organizationId string, serviceAccountId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCommitmentsAPIImportGCPCommitmentsRequestWithBody(server, params, "application/json", bodyReader) -} -// NewCommitmentsAPIImportGCPCommitmentsRequestWithBody generates requests for CommitmentsAPIImportGCPCommitments with any type of body -func NewCommitmentsAPIImportGCPCommitmentsRequestWithBody(server string, params *CommitmentsAPIImportGCPCommitmentsParams, contentType string, body io.Reader) (*http.Request, error) { - var err error + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/import/gcp/cud") + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9976,48 +10112,38 @@ func NewCommitmentsAPIImportGCPCommitmentsRequestWithBody(server string, params return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - if params.Behaviour != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "behaviour", runtime.ParamLocationQuery, *params.Behaviour); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } +// NewServiceAccountsAPIGetServiceAccountRequest generates requests for ServiceAccountsAPIGetServiceAccount +func NewServiceAccountsAPIGetServiceAccountRequest(server string, organizationId string, serviceAccountId string) (*http.Request, error) { + var err error - queryURL.RawQuery = queryValues.Encode() - } + var pathParam0 string - req, err := http.NewRequest("POST", queryURL.String(), body) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} + var pathParam1 string -// NewCommitmentsAPIGetGCPCommitmentsImportScriptRequest generates requests for CommitmentsAPIGetGCPCommitmentsImportScript -func NewCommitmentsAPIGetGCPCommitmentsImportScriptRequest(server string, params *CommitmentsAPIGetGCPCommitmentsImportScriptParams) (*http.Request, error) { - var err error + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/import/gcp/cud/script") + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10027,28 +10153,6 @@ func NewCommitmentsAPIGetGCPCommitmentsImportScriptRequest(server string, params return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Projects != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projects", runtime.ParamLocationQuery, *params.Projects); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -10057,13 +10161,31 @@ func NewCommitmentsAPIGetGCPCommitmentsImportScriptRequest(server string, params return req, nil } -// NewCommitmentsAPIDeleteCommitmentRequest generates requests for CommitmentsAPIDeleteCommitment -func NewCommitmentsAPIDeleteCommitmentRequest(server string, commitmentId string) (*http.Request, error) { +// NewServiceAccountsAPIUpdateServiceAccountRequest calls the generic ServiceAccountsAPIUpdateServiceAccount builder with application/json body +func NewServiceAccountsAPIUpdateServiceAccountRequest(server string, organizationId string, serviceAccountId string, body ServiceAccountsAPIUpdateServiceAccountJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewServiceAccountsAPIUpdateServiceAccountRequestWithBody(server, organizationId, serviceAccountId, "application/json", bodyReader) +} + +// NewServiceAccountsAPIUpdateServiceAccountRequestWithBody generates requests for ServiceAccountsAPIUpdateServiceAccount with any type of body +func NewServiceAccountsAPIUpdateServiceAccountRequestWithBody(server string, organizationId string, serviceAccountId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) if err != nil { return nil, err } @@ -10073,7 +10195,7 @@ func NewCommitmentsAPIDeleteCommitmentRequest(server string, commitmentId string return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10083,21 +10205,41 @@ func NewCommitmentsAPIDeleteCommitmentRequest(server string, commitmentId string return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCommitmentsAPIGetCommitmentRequest generates requests for CommitmentsAPIGetCommitment -func NewCommitmentsAPIGetCommitmentRequest(server string, commitmentId string, params *CommitmentsAPIGetCommitmentParams) (*http.Request, error) { +// NewServiceAccountsAPICreateServiceAccountKeyRequest calls the generic ServiceAccountsAPICreateServiceAccountKey builder with application/json body +func NewServiceAccountsAPICreateServiceAccountKeyRequest(server string, organizationId string, serviceAccountId string, body ServiceAccountsAPICreateServiceAccountKeyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewServiceAccountsAPICreateServiceAccountKeyRequestWithBody(server, organizationId, serviceAccountId, "application/json", bodyReader) +} + +// NewServiceAccountsAPICreateServiceAccountKeyRequestWithBody generates requests for ServiceAccountsAPICreateServiceAccountKey with any type of body +func NewServiceAccountsAPICreateServiceAccountKeyRequestWithBody(server string, organizationId string, serviceAccountId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) if err != nil { return nil, err } @@ -10107,7 +10249,7 @@ func NewCommitmentsAPIGetCommitmentRequest(server string, commitmentId string, p return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s/keys", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10117,102 +10259,48 @@ func NewCommitmentsAPIGetCommitmentRequest(server string, commitmentId string, p return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.ClusterId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterId", runtime.ParamLocationQuery, *params.ClusterId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IncludeUsage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsage", runtime.ParamLocationQuery, *params.IncludeUsage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IncludeUsagePerClusters != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsagePerClusters", runtime.ParamLocationQuery, *params.IncludeUsagePerClusters); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IncludeUsagePerInstanceTypes != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsagePerInstanceTypes", runtime.ParamLocationQuery, *params.IncludeUsagePerInstanceTypes); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCommitmentsAPIUpdateCommitmentRequest calls the generic CommitmentsAPIUpdateCommitment builder with application/json body -func NewCommitmentsAPIUpdateCommitmentRequest(server string, commitmentId string, body CommitmentsAPIUpdateCommitmentJSONRequestBody) (*http.Request, error) { +// NewServiceAccountsAPIUpdateServiceAccountKeyRequest calls the generic ServiceAccountsAPIUpdateServiceAccountKey builder with application/json body +func NewServiceAccountsAPIUpdateServiceAccountKeyRequest(server string, organizationId string, serviceAccountId string, keyId string, body ServiceAccountsAPIUpdateServiceAccountKeyJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCommitmentsAPIUpdateCommitmentRequestWithBody(server, commitmentId, "application/json", bodyReader) + return NewServiceAccountsAPIUpdateServiceAccountKeyRequestWithBody(server, organizationId, serviceAccountId, keyId, "application/json", bodyReader) } -// NewCommitmentsAPIUpdateCommitmentRequestWithBody generates requests for CommitmentsAPIUpdateCommitment with any type of body -func NewCommitmentsAPIUpdateCommitmentRequestWithBody(server string, commitmentId string, contentType string, body io.Reader) (*http.Request, error) { +// NewServiceAccountsAPIUpdateServiceAccountKeyRequestWithBody generates requests for ServiceAccountsAPIUpdateServiceAccountKey with any type of body +func NewServiceAccountsAPIUpdateServiceAccountKeyRequestWithBody(server string, organizationId string, serviceAccountId string, keyId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "key.id", runtime.ParamLocationPath, keyId) if err != nil { return nil, err } @@ -10222,7 +10310,7 @@ func NewCommitmentsAPIUpdateCommitmentRequestWithBody(server string, commitmentI return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s/keys/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10232,7 +10320,7 @@ func NewCommitmentsAPIUpdateCommitmentRequestWithBody(server string, commitmentI return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -10242,13 +10330,27 @@ func NewCommitmentsAPIUpdateCommitmentRequestWithBody(server string, commitmentI return req, nil } -// NewCommitmentsAPIGetCommitmentAssignmentsRequest generates requests for CommitmentsAPIGetCommitmentAssignments -func NewCommitmentsAPIGetCommitmentAssignmentsRequest(server string, commitmentId string) (*http.Request, error) { +// NewServiceAccountsAPIDeleteServiceAccountKeyRequest generates requests for ServiceAccountsAPIDeleteServiceAccountKey +func NewServiceAccountsAPIDeleteServiceAccountKeyRequest(server string, organizationId string, serviceAccountId string, keyId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "keyId", runtime.ParamLocationPath, keyId) if err != nil { return nil, err } @@ -10258,7 +10360,7 @@ func NewCommitmentsAPIGetCommitmentAssignmentsRequest(server string, commitmentI return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/%s/assignments", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s/keys/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10268,7 +10370,7 @@ func NewCommitmentsAPIGetCommitmentAssignmentsRequest(server string, commitmentI return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -10276,63 +10378,37 @@ func NewCommitmentsAPIGetCommitmentAssignmentsRequest(server string, commitmentI return req, nil } -// NewCommitmentsAPIReplaceCommitmentAssignmentsRequest calls the generic CommitmentsAPIReplaceCommitmentAssignments builder with application/json body -func NewCommitmentsAPIReplaceCommitmentAssignmentsRequest(server string, commitmentId string, body CommitmentsAPIReplaceCommitmentAssignmentsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCommitmentsAPIReplaceCommitmentAssignmentsRequestWithBody(server, commitmentId, "application/json", bodyReader) -} - -// NewCommitmentsAPIReplaceCommitmentAssignmentsRequestWithBody generates requests for CommitmentsAPIReplaceCommitmentAssignments with any type of body -func NewCommitmentsAPIReplaceCommitmentAssignmentsRequestWithBody(server string, commitmentId string, contentType string, body io.Reader) (*http.Request, error) { +// NewServiceAccountsAPIGetServiceAccountKeyRequest generates requests for ServiceAccountsAPIGetServiceAccountKey +func NewServiceAccountsAPIGetServiceAccountKeyRequest(server string, organizationId string, serviceAccountId string, keyId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) if err != nil { return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceAccountId", runtime.ParamLocationPath, serviceAccountId) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/savings/commitments/%s/assignments", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + var pathParam2 string - req, err := http.NewRequest("PUT", queryURL.String(), body) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "keyId", runtime.ParamLocationPath, keyId) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCommitmentsAPIGetGCPCommitmentsScriptTemplateRequest generates requests for CommitmentsAPIGetGCPCommitmentsScriptTemplate -func NewCommitmentsAPIGetGCPCommitmentsScriptTemplateRequest(server string) (*http.Request, error) { - var err error - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/scripts/commitments/gcp/cud/import.sh") + operationPath := fmt.Sprintf("/v1/organizations/%s/service-accounts/%s/keys/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10350,13 +10426,13 @@ func NewCommitmentsAPIGetGCPCommitmentsScriptTemplateRequest(server string) (*ht return req, nil } -// NewExternalClusterAPIGetCleanupScriptTemplateRequest generates requests for ExternalClusterAPIGetCleanupScriptTemplate -func NewExternalClusterAPIGetCleanupScriptTemplateRequest(server string, provider string) (*http.Request, error) { +// NewUsersAPIRemoveOrganizationUsersRequest generates requests for UsersAPIRemoveOrganizationUsers +func NewUsersAPIRemoveOrganizationUsersRequest(server string, organizationId string, params *UsersAPIRemoveOrganizationUsersParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "provider", runtime.ParamLocationPath, provider) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) if err != nil { return nil, err } @@ -10366,7 +10442,7 @@ func NewExternalClusterAPIGetCleanupScriptTemplateRequest(server string, provide return nil, err } - operationPath := fmt.Sprintf("/v1/scripts/%s/cleanup.sh", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/users", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10376,7 +10452,25 @@ func NewExternalClusterAPIGetCleanupScriptTemplateRequest(server string, provide return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "users", runtime.ParamLocationQuery, params.Users); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -10384,13 +10478,13 @@ func NewExternalClusterAPIGetCleanupScriptTemplateRequest(server string, provide return req, nil } -// NewExternalClusterAPIGetCredentialsScriptTemplateRequest generates requests for ExternalClusterAPIGetCredentialsScriptTemplate -func NewExternalClusterAPIGetCredentialsScriptTemplateRequest(server string, provider string, params *ExternalClusterAPIGetCredentialsScriptTemplateParams) (*http.Request, error) { +// NewUsersAPIListOrganizationUsersRequest generates requests for UsersAPIListOrganizationUsers +func NewUsersAPIListOrganizationUsersRequest(server string, organizationId string, params *UsersAPIListOrganizationUsersParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "provider", runtime.ParamLocationPath, provider) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) if err != nil { return nil, err } @@ -10400,7 +10494,7 @@ func NewExternalClusterAPIGetCredentialsScriptTemplateRequest(server string, pro return nil, err } - operationPath := fmt.Sprintf("/v1/scripts/%s/onboarding.sh", pathParam0) + operationPath := fmt.Sprintf("/v1/organizations/%s/users", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10413,9 +10507,25 @@ func NewExternalClusterAPIGetCredentialsScriptTemplateRequest(server string, pro if params != nil { queryValues := queryURL.Query() - if params.CrossRole != nil { + if params.IncludeGroups != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "crossRole", runtime.ParamLocationQuery, *params.CrossRole); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeGroups", runtime.ParamLocationQuery, *params.IncludeGroups); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.RoleId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "roleId", runtime.ParamLocationQuery, *params.RoleId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -10440,16 +10550,34 @@ func NewExternalClusterAPIGetCredentialsScriptTemplateRequest(server string, pro return req, nil } -// NewRuntimeSecurityAPIGetAnomaliesRequest generates requests for RuntimeSecurityAPIGetAnomalies -func NewRuntimeSecurityAPIGetAnomaliesRequest(server string, params *RuntimeSecurityAPIGetAnomaliesParams) (*http.Request, error) { +// NewUsersAPIAddUserToOrganizationRequest calls the generic UsersAPIAddUserToOrganization builder with application/json body +func NewUsersAPIAddUserToOrganizationRequest(server string, organizationId string, body UsersAPIAddUserToOrganizationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUsersAPIAddUserToOrganizationRequestWithBody(server, organizationId, "application/json", bodyReader) +} + +// NewUsersAPIAddUserToOrganizationRequestWithBody generates requests for UsersAPIAddUserToOrganization with any type of body +func NewUsersAPIAddUserToOrganizationRequestWithBody(server string, organizationId string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/anomalies") + operationPath := fmt.Sprintf("/v1/organizations/%s/users", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10459,202 +10587,169 @@ func NewRuntimeSecurityAPIGetAnomaliesRequest(server string, params *RuntimeSecu return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.ClusterIds != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewUsersAPIRemoveUserFromOrganizationRequest generates requests for UsersAPIRemoveUserFromOrganization +func NewUsersAPIRemoveUserFromOrganizationRequest(server string, organizationId string, userId string) (*http.Request, error) { + var err error - if params.Namespaces != nil { + var pathParam0 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespaces", runtime.ParamLocationQuery, *params.Namespaces); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } - } + var pathParam1 string - if params.Status != nil { + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/v1/organizations/%s/users/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if params.PageLimit != nil { + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.PageCursor != nil { +// NewUsersAPIUpdateOrganizationUserRequest calls the generic UsersAPIUpdateOrganizationUser builder with application/json body +func NewUsersAPIUpdateOrganizationUserRequest(server string, organizationId string, userId string, body UsersAPIUpdateOrganizationUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUsersAPIUpdateOrganizationUserRequestWithBody(server, organizationId, userId, "application/json", bodyReader) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewUsersAPIUpdateOrganizationUserRequestWithBody generates requests for UsersAPIUpdateOrganizationUser with any type of body +func NewUsersAPIUpdateOrganizationUserRequestWithBody(server string, organizationId string, userId string, contentType string, body io.Reader) (*http.Request, error) { + var err error - } + var pathParam0 string - if params.SortField != nil { + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + var pathParam1 string - } + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId) + if err != nil { + return nil, err + } - if params.SortOrder != nil { + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + operationPath := fmt.Sprintf("/v1/organizations/%s/users/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - if params.ResourceId != nil { + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "resourceId", runtime.ParamLocationQuery, *params.ResourceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req.Header.Add("Content-Type", contentType) - } + return req, nil +} - if params.Types != nil { +// NewUsersAPIListUserGroupsRequest generates requests for UsersAPIListUserGroups +func NewUsersAPIListUserGroupsRequest(server string, organizationId string, userId string) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "types", runtime.ParamLocationQuery, *params.Types); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + var pathParam0 string - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationId", runtime.ParamLocationPath, organizationId) + if err != nil { + return nil, err + } - if params.Search != nil { + var pathParam1 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId) + if err != nil { + return nil, err + } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if params.StartTime != nil { + operationPath := fmt.Sprintf("/v1/organizations/%s/users/%s/groups", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - if params.EndTime != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewScheduledRebalancingAPIListRebalancingSchedulesRequest generates requests for ScheduledRebalancingAPIListRebalancingSchedules +func NewScheduledRebalancingAPIListRebalancingSchedulesRequest(server string) (*http.Request, error) { + var err error - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - queryURL.RawQuery = queryValues.Encode() + operationPath := fmt.Sprintf("/v1/rebalancing-schedules") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -10665,19 +10760,19 @@ func NewRuntimeSecurityAPIGetAnomaliesRequest(server string, params *RuntimeSecu return req, nil } -// NewRuntimeSecurityAPIAckAnomaliesRequest calls the generic RuntimeSecurityAPIAckAnomalies builder with application/json body -func NewRuntimeSecurityAPIAckAnomaliesRequest(server string, body RuntimeSecurityAPIAckAnomaliesJSONRequestBody) (*http.Request, error) { +// NewScheduledRebalancingAPICreateRebalancingScheduleRequest calls the generic ScheduledRebalancingAPICreateRebalancingSchedule builder with application/json body +func NewScheduledRebalancingAPICreateRebalancingScheduleRequest(server string, body ScheduledRebalancingAPICreateRebalancingScheduleJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPIAckAnomaliesRequestWithBody(server, "application/json", bodyReader) + return NewScheduledRebalancingAPICreateRebalancingScheduleRequestWithBody(server, "application/json", bodyReader) } -// NewRuntimeSecurityAPIAckAnomaliesRequestWithBody generates requests for RuntimeSecurityAPIAckAnomalies with any type of body -func NewRuntimeSecurityAPIAckAnomaliesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewScheduledRebalancingAPICreateRebalancingScheduleRequestWithBody generates requests for ScheduledRebalancingAPICreateRebalancingSchedule with any type of body +func NewScheduledRebalancingAPICreateRebalancingScheduleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -10685,7 +10780,7 @@ func NewRuntimeSecurityAPIAckAnomaliesRequestWithBody(server string, contentType return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/ack") + operationPath := fmt.Sprintf("/v1/rebalancing-schedules") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10705,19 +10800,19 @@ func NewRuntimeSecurityAPIAckAnomaliesRequestWithBody(server string, contentType return req, nil } -// NewRuntimeSecurityAPICloseAnomaliesRequest calls the generic RuntimeSecurityAPICloseAnomalies builder with application/json body -func NewRuntimeSecurityAPICloseAnomaliesRequest(server string, body RuntimeSecurityAPICloseAnomaliesJSONRequestBody) (*http.Request, error) { +// NewScheduledRebalancingAPIUpdateRebalancingScheduleRequest calls the generic ScheduledRebalancingAPIUpdateRebalancingSchedule builder with application/json body +func NewScheduledRebalancingAPIUpdateRebalancingScheduleRequest(server string, params *ScheduledRebalancingAPIUpdateRebalancingScheduleParams, body ScheduledRebalancingAPIUpdateRebalancingScheduleJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPICloseAnomaliesRequestWithBody(server, "application/json", bodyReader) + return NewScheduledRebalancingAPIUpdateRebalancingScheduleRequestWithBody(server, params, "application/json", bodyReader) } -// NewRuntimeSecurityAPICloseAnomaliesRequestWithBody generates requests for RuntimeSecurityAPICloseAnomalies with any type of body -func NewRuntimeSecurityAPICloseAnomaliesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewScheduledRebalancingAPIUpdateRebalancingScheduleRequestWithBody generates requests for ScheduledRebalancingAPIUpdateRebalancingSchedule with any type of body +func NewScheduledRebalancingAPIUpdateRebalancingScheduleRequestWithBody(server string, params *ScheduledRebalancingAPIUpdateRebalancingScheduleParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -10725,7 +10820,7 @@ func NewRuntimeSecurityAPICloseAnomaliesRequestWithBody(server string, contentTy return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/close") + operationPath := fmt.Sprintf("/v1/rebalancing-schedules") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10735,7 +10830,29 @@ func NewRuntimeSecurityAPICloseAnomaliesRequestWithBody(server string, contentTy return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -10745,27 +10862,23 @@ func NewRuntimeSecurityAPICloseAnomaliesRequestWithBody(server string, contentTy return req, nil } -// NewRuntimeSecurityAPITriggerAnomaliesWebhookRequest calls the generic RuntimeSecurityAPITriggerAnomaliesWebhook builder with application/json body -func NewRuntimeSecurityAPITriggerAnomaliesWebhookRequest(server string, body RuntimeSecurityAPITriggerAnomaliesWebhookJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewScheduledRebalancingAPIDeleteRebalancingScheduleRequest generates requests for ScheduledRebalancingAPIDeleteRebalancingSchedule +func NewScheduledRebalancingAPIDeleteRebalancingScheduleRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPITriggerAnomaliesWebhookRequestWithBody(server, "application/json", bodyReader) -} - -// NewRuntimeSecurityAPITriggerAnomaliesWebhookRequestWithBody generates requests for RuntimeSecurityAPITriggerAnomaliesWebhook with any type of body -func NewRuntimeSecurityAPITriggerAnomaliesWebhookRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/trigger-webhook") + operationPath := fmt.Sprintf("/v1/rebalancing-schedules/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10775,18 +10888,16 @@ func NewRuntimeSecurityAPITriggerAnomaliesWebhookRequestWithBody(server string, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewRuntimeSecurityAPIGetAnomalyRequest generates requests for RuntimeSecurityAPIGetAnomaly -func NewRuntimeSecurityAPIGetAnomalyRequest(server string, id string) (*http.Request, error) { +// NewScheduledRebalancingAPIGetRebalancingScheduleRequest generates requests for ScheduledRebalancingAPIGetRebalancingSchedule +func NewScheduledRebalancingAPIGetRebalancingScheduleRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -10801,7 +10912,7 @@ func NewRuntimeSecurityAPIGetAnomalyRequest(server string, id string) (*http.Req return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/rebalancing-schedules/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10819,23 +10930,16 @@ func NewRuntimeSecurityAPIGetAnomalyRequest(server string, id string) (*http.Req return req, nil } -// NewRuntimeSecurityAPIGetAnomalyEventsRequest generates requests for RuntimeSecurityAPIGetAnomalyEvents -func NewRuntimeSecurityAPIGetAnomalyEventsRequest(server string, id string, params *RuntimeSecurityAPIGetAnomalyEventsParams) (*http.Request, error) { +// NewInventoryAPIListRegionsRequest generates requests for InventoryAPIListRegions +func NewInventoryAPIListRegionsRequest(server string, params *InventoryAPIListRegionsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/%s/events", pathParam0) + operationPath := fmt.Sprintf("/v1/regions") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10848,9 +10952,9 @@ func NewRuntimeSecurityAPIGetAnomalyEventsRequest(server string, id string, para if params != nil { queryValues := queryURL.Query() - if params.PageLimit != nil { + if params.PageSize != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -10864,9 +10968,9 @@ func NewRuntimeSecurityAPIGetAnomalyEventsRequest(server string, id string, para } - if params.PageCursor != nil { + if params.PageToken != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageToken", runtime.ParamLocationQuery, *params.PageToken); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -10880,58 +10984,94 @@ func NewRuntimeSecurityAPIGetAnomalyEventsRequest(server string, id string, para } - if params.SortField != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.SortOrder != nil { +// NewCommitmentsAPIGetCommitmentsAssignmentsRequest generates requests for CommitmentsAPIGetCommitmentsAssignments +func NewCommitmentsAPIGetCommitmentsAssignmentsRequest(server string) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/v1/savings/assignments") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if params.Search != nil { + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCommitmentsAPICreateCommitmentAssignmentRequest generates requests for CommitmentsAPICreateCommitmentAssignment +func NewCommitmentsAPICreateCommitmentAssignmentRequest(server string, params *CommitmentsAPICreateCommitmentAssignmentParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/savings/assignments") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterId", runtime.ParamLocationQuery, params.ClusterId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) } } + } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "commitmentId", runtime.ParamLocationQuery, params.CommitmentId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -10939,24 +11079,13 @@ func NewRuntimeSecurityAPIGetAnomalyEventsRequest(server string, id string, para return req, nil } -// NewRuntimeSecurityAPITriggerAnomalyWebhookRequest calls the generic RuntimeSecurityAPITriggerAnomalyWebhook builder with application/json body -func NewRuntimeSecurityAPITriggerAnomalyWebhookRequest(server string, id string, body RuntimeSecurityAPITriggerAnomalyWebhookJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPITriggerAnomalyWebhookRequestWithBody(server, id, "application/json", bodyReader) -} - -// NewRuntimeSecurityAPITriggerAnomalyWebhookRequestWithBody generates requests for RuntimeSecurityAPITriggerAnomalyWebhook with any type of body -func NewRuntimeSecurityAPITriggerAnomalyWebhookRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewCommitmentsAPIDeleteCommitmentAssignmentRequest generates requests for CommitmentsAPIDeleteCommitmentAssignment +func NewCommitmentsAPIDeleteCommitmentAssignmentRequest(server string, assignmentId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "assignmentId", runtime.ParamLocationPath, assignmentId) if err != nil { return nil, err } @@ -10966,7 +11095,7 @@ func NewRuntimeSecurityAPITriggerAnomalyWebhookRequestWithBody(server string, id return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/%s/trigger-webhook", pathParam0) + operationPath := fmt.Sprintf("/v1/savings/assignments/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10976,18 +11105,16 @@ func NewRuntimeSecurityAPITriggerAnomalyWebhookRequestWithBody(server string, id return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewRuntimeSecurityAPIGetRuntimeEventsRequest generates requests for RuntimeSecurityAPIGetRuntimeEvents -func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *RuntimeSecurityAPIGetRuntimeEventsParams) (*http.Request, error) { +// NewCommitmentsAPIGetCommitmentsRequest generates requests for CommitmentsAPIGetCommitments +func NewCommitmentsAPIGetCommitmentsRequest(server string, params *CommitmentsAPIGetCommitmentsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -10995,7 +11122,7 @@ func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *Runtime return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/events") + operationPath := fmt.Sprintf("/v1/savings/commitments") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11008,9 +11135,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *Runtime if params != nil { queryValues := queryURL.Query() - if params.ClusterIds != nil { + if params.IncludeUsage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsage", runtime.ParamLocationQuery, *params.IncludeUsage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11024,9 +11151,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *Runtime } - if params.Types != nil { + if params.ClusterId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "types", runtime.ParamLocationQuery, *params.Types); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterId", runtime.ParamLocationQuery, *params.ClusterId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11040,9 +11167,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *Runtime } - if params.GroupSelectors != nil { + if params.IncludeUsagePerClusters != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupSelectors", runtime.ParamLocationQuery, *params.GroupSelectors); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsagePerClusters", runtime.ParamLocationQuery, *params.IncludeUsagePerClusters); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11056,9 +11183,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *Runtime } - if params.Search != nil { + if params.IncludeUsagePerInstanceTypes != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsagePerInstanceTypes", runtime.ParamLocationQuery, *params.IncludeUsagePerInstanceTypes); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11072,37 +11199,38 @@ func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *Runtime } - if params.StartTime != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.EndTime != nil { +// NewCommitmentsAPIGetCommitmentsDiscountedPricesRequest generates requests for CommitmentsAPIGetCommitmentsDiscountedPrices +func NewCommitmentsAPIGetCommitmentsDiscountedPricesRequest(server string, params *CommitmentsAPIGetCommitmentsDiscountedPricesParams) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/v1/savings/commitments/discounted-prices") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() if params.PageLimit != nil { @@ -11136,38 +11264,6 @@ func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *Runtime } - if params.SortField != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SortOrder != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - queryURL.RawQuery = queryValues.Encode() } @@ -11179,8 +11275,19 @@ func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *Runtime return req, nil } -// NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest generates requests for RuntimeSecurityAPIGetRuntimeEventGroups -func NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest(server string, params *RuntimeSecurityAPIGetRuntimeEventGroupsParams) (*http.Request, error) { +// NewCommitmentsAPIImportAzureReservationsRequest calls the generic CommitmentsAPIImportAzureReservations builder with application/json body +func NewCommitmentsAPIImportAzureReservationsRequest(server string, params *CommitmentsAPIImportAzureReservationsParams, body CommitmentsAPIImportAzureReservationsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCommitmentsAPIImportAzureReservationsRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewCommitmentsAPIImportAzureReservationsRequestWithBody generates requests for CommitmentsAPIImportAzureReservations with any type of body +func NewCommitmentsAPIImportAzureReservationsRequestWithBody(server string, params *CommitmentsAPIImportAzureReservationsParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -11188,7 +11295,7 @@ func NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest(server string, params *Ru return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/events/groups") + operationPath := fmt.Sprintf("/v1/savings/commitments/import/azure/reservation") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11201,9 +11308,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest(server string, params *Ru if params != nil { queryValues := queryURL.Query() - if params.ClusterIds != nil { + if params.Behaviour != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "behaviour", runtime.ParamLocationQuery, *params.Behaviour); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11217,73 +11324,55 @@ func NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest(server string, params *Ru } - if params.Types != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "types", runtime.ParamLocationQuery, *params.Types); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - } + req.Header.Add("Content-Type", contentType) - if params.GroupBy != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupBy", runtime.ParamLocationQuery, *params.GroupBy); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } + return req, nil +} - if params.Search != nil { +// NewCommitmentsAPIImportGCPCommitmentsRequest calls the generic CommitmentsAPIImportGCPCommitments builder with application/json body +func NewCommitmentsAPIImportGCPCommitmentsRequest(server string, params *CommitmentsAPIImportGCPCommitmentsParams, body CommitmentsAPIImportGCPCommitmentsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCommitmentsAPIImportGCPCommitmentsRequestWithBody(server, params, "application/json", bodyReader) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewCommitmentsAPIImportGCPCommitmentsRequestWithBody generates requests for CommitmentsAPIImportGCPCommitments with any type of body +func NewCommitmentsAPIImportGCPCommitmentsRequestWithBody(server string, params *CommitmentsAPIImportGCPCommitmentsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if params.StartTime != nil { + operationPath := fmt.Sprintf("/v1/savings/commitments/import/gcp/cud") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - } + if params != nil { + queryValues := queryURL.Query() - if params.EndTime != nil { + if params.Behaviour != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "behaviour", runtime.ParamLocationQuery, *params.Behaviour); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11297,57 +11386,44 @@ func NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest(server string, params *Ru } - if params.PageLimit != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - } + req.Header.Add("Content-Type", contentType) - if params.PageCursor != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewCommitmentsAPIGetGCPCommitmentsImportScriptRequest generates requests for CommitmentsAPIGetGCPCommitmentsImportScript +func NewCommitmentsAPIGetGCPCommitmentsImportScriptRequest(server string, params *CommitmentsAPIGetGCPCommitmentsImportScriptParams) (*http.Request, error) { + var err error - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if params.SortField != nil { + operationPath := fmt.Sprintf("/v1/savings/commitments/import/gcp/cud/script") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - } + if params != nil { + queryValues := queryURL.Query() - if params.SortOrder != nil { + if params.Projects != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projects", runtime.ParamLocationQuery, *params.Projects); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11372,13 +11448,13 @@ func NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest(server string, params *Ru return req, nil } -// NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest generates requests for RuntimeSecurityAPIGetRuntimeEventsProcessTree -func NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest(server string, clusterId string, params *RuntimeSecurityAPIGetRuntimeEventsProcessTreeParams) (*http.Request, error) { +// NewCommitmentsAPIDeleteCommitmentRequest generates requests for CommitmentsAPIDeleteCommitment +func NewCommitmentsAPIDeleteCommitmentRequest(server string, commitmentId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) if err != nil { return nil, err } @@ -11388,7 +11464,41 @@ func NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest(server string, clus return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/events/process-tree/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/savings/commitments/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCommitmentsAPIGetCommitmentRequest generates requests for CommitmentsAPIGetCommitment +func NewCommitmentsAPIGetCommitmentRequest(server string, commitmentId string, params *CommitmentsAPIGetCommitmentParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/savings/commitments/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11401,9 +11511,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest(server string, clus if params != nil { queryValues := queryURL.Query() - if params.ContainerId != nil { + if params.ClusterId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "containerId", runtime.ParamLocationQuery, *params.ContainerId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterId", runtime.ParamLocationQuery, *params.ClusterId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11417,9 +11527,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest(server string, clus } - if params.ProcessPid != nil { + if params.IncludeUsage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "processPid", runtime.ParamLocationQuery, *params.ProcessPid); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsage", runtime.ParamLocationQuery, *params.IncludeUsage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11433,9 +11543,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest(server string, clus } - if params.ProcessStartTime != nil { + if params.IncludeUsagePerClusters != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "processStartTime", runtime.ParamLocationQuery, *params.ProcessStartTime); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsagePerClusters", runtime.ParamLocationQuery, *params.IncludeUsagePerClusters); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11449,9 +11559,9 @@ func NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest(server string, clus } - if params.EndTime != nil { + if params.IncludeUsagePerInstanceTypes != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeUsagePerInstanceTypes", runtime.ParamLocationQuery, *params.IncludeUsagePerInstanceTypes); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11476,16 +11586,34 @@ func NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest(server string, clus return req, nil } -// NewRuntimeSecurityAPIGetListsRequest generates requests for RuntimeSecurityAPIGetLists -func NewRuntimeSecurityAPIGetListsRequest(server string, params *RuntimeSecurityAPIGetListsParams) (*http.Request, error) { +// NewCommitmentsAPIUpdateCommitmentRequest calls the generic CommitmentsAPIUpdateCommitment builder with application/json body +func NewCommitmentsAPIUpdateCommitmentRequest(server string, commitmentId string, body CommitmentsAPIUpdateCommitmentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCommitmentsAPIUpdateCommitmentRequestWithBody(server, commitmentId, "application/json", bodyReader) +} + +// NewCommitmentsAPIUpdateCommitmentRequestWithBody generates requests for CommitmentsAPIUpdateCommitment with any type of body +func NewCommitmentsAPIUpdateCommitmentRequestWithBody(server string, commitmentId string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/list") + operationPath := fmt.Sprintf("/v1/savings/commitments/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11495,90 +11623,40 @@ func NewRuntimeSecurityAPIGetListsRequest(server string, params *RuntimeSecurity return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.Search != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewCommitmentsAPIGetCommitmentAssignmentsRequest generates requests for CommitmentsAPIGetCommitmentAssignments +func NewCommitmentsAPIGetCommitmentAssignmentsRequest(server string, commitmentId string) (*http.Request, error) { + var err error - if params.PageLimit != nil { + var pathParam0 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PageCursor != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SortField != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SortOrder != nil { + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/v1/savings/commitments/%s/assignments", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - queryURL.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -11589,27 +11667,34 @@ func NewRuntimeSecurityAPIGetListsRequest(server string, params *RuntimeSecurity return req, nil } -// NewRuntimeSecurityAPICreateListRequest calls the generic RuntimeSecurityAPICreateList builder with application/json body -func NewRuntimeSecurityAPICreateListRequest(server string, body RuntimeSecurityAPICreateListJSONRequestBody) (*http.Request, error) { +// NewCommitmentsAPIReplaceCommitmentAssignmentsRequest calls the generic CommitmentsAPIReplaceCommitmentAssignments builder with application/json body +func NewCommitmentsAPIReplaceCommitmentAssignmentsRequest(server string, commitmentId string, body CommitmentsAPIReplaceCommitmentAssignmentsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPICreateListRequestWithBody(server, "application/json", bodyReader) + return NewCommitmentsAPIReplaceCommitmentAssignmentsRequestWithBody(server, commitmentId, "application/json", bodyReader) } -// NewRuntimeSecurityAPICreateListRequestWithBody generates requests for RuntimeSecurityAPICreateList with any type of body -func NewRuntimeSecurityAPICreateListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCommitmentsAPIReplaceCommitmentAssignmentsRequestWithBody generates requests for CommitmentsAPIReplaceCommitmentAssignments with any type of body +func NewCommitmentsAPIReplaceCommitmentAssignmentsRequestWithBody(server string, commitmentId string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "commitmentId", runtime.ParamLocationPath, commitmentId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/list") + operationPath := fmt.Sprintf("/v1/savings/commitments/%s/assignments", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11619,7 +11704,7 @@ func NewRuntimeSecurityAPICreateListRequestWithBody(server string, contentType s return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -11629,19 +11714,8 @@ func NewRuntimeSecurityAPICreateListRequestWithBody(server string, contentType s return req, nil } -// NewRuntimeSecurityAPIDeleteListsRequest calls the generic RuntimeSecurityAPIDeleteLists builder with application/json body -func NewRuntimeSecurityAPIDeleteListsRequest(server string, body RuntimeSecurityAPIDeleteListsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPIDeleteListsRequestWithBody(server, "application/json", bodyReader) -} - -// NewRuntimeSecurityAPIDeleteListsRequestWithBody generates requests for RuntimeSecurityAPIDeleteLists with any type of body -func NewRuntimeSecurityAPIDeleteListsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCommitmentsAPIGetGCPCommitmentsScriptTemplateRequest generates requests for CommitmentsAPIGetGCPCommitmentsScriptTemplate +func NewCommitmentsAPIGetGCPCommitmentsScriptTemplateRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -11649,7 +11723,7 @@ func NewRuntimeSecurityAPIDeleteListsRequestWithBody(server string, contentType return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/list/delete") + operationPath := fmt.Sprintf("/v1/scripts/commitments/gcp/cud/import.sh") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11659,23 +11733,21 @@ func NewRuntimeSecurityAPIDeleteListsRequestWithBody(server string, contentType return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewRuntimeSecurityAPIGetListRequest generates requests for RuntimeSecurityAPIGetList -func NewRuntimeSecurityAPIGetListRequest(server string, id string) (*http.Request, error) { +// NewExternalClusterAPIGetCleanupScriptTemplateRequest generates requests for ExternalClusterAPIGetCleanupScriptTemplate +func NewExternalClusterAPIGetCleanupScriptTemplateRequest(server string, provider string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "provider", runtime.ParamLocationPath, provider) if err != nil { return nil, err } @@ -11685,7 +11757,7 @@ func NewRuntimeSecurityAPIGetListRequest(server string, id string) (*http.Reques return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/list/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/scripts/%s/cleanup.sh", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11703,24 +11775,13 @@ func NewRuntimeSecurityAPIGetListRequest(server string, id string) (*http.Reques return req, nil } -// NewRuntimeSecurityAPIAddListEntriesRequest calls the generic RuntimeSecurityAPIAddListEntries builder with application/json body -func NewRuntimeSecurityAPIAddListEntriesRequest(server string, id string, body RuntimeSecurityAPIAddListEntriesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPIAddListEntriesRequestWithBody(server, id, "application/json", bodyReader) -} - -// NewRuntimeSecurityAPIAddListEntriesRequestWithBody generates requests for RuntimeSecurityAPIAddListEntries with any type of body -func NewRuntimeSecurityAPIAddListEntriesRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewExternalClusterAPIGetCredentialsScriptTemplateRequest generates requests for ExternalClusterAPIGetCredentialsScriptTemplate +func NewExternalClusterAPIGetCredentialsScriptTemplateRequest(server string, provider string, params *ExternalClusterAPIGetCredentialsScriptTemplateParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "provider", runtime.ParamLocationPath, provider) if err != nil { return nil, err } @@ -11730,7 +11791,7 @@ func NewRuntimeSecurityAPIAddListEntriesRequestWithBody(server string, id string return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/list/%s/add", pathParam0) + operationPath := fmt.Sprintf("/v1/scripts/%s/onboarding.sh", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11740,33 +11801,46 @@ func NewRuntimeSecurityAPIAddListEntriesRequestWithBody(server string, id string return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - req.Header.Add("Content-Type", contentType) + if params.CrossRole != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "crossRole", runtime.ParamLocationQuery, *params.CrossRole); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewRuntimeSecurityAPIGetListEntriesRequest generates requests for RuntimeSecurityAPIGetListEntries -func NewRuntimeSecurityAPIGetListEntriesRequest(server string, id string, params *RuntimeSecurityAPIGetListEntriesParams) (*http.Request, error) { - var err error + } - var pathParam0 string + queryURL.RawQuery = queryValues.Encode() + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } + return req, nil +} + +// NewRuntimeSecurityAPIGetAnomaliesRequest generates requests for RuntimeSecurityAPIGetAnomalies +func NewRuntimeSecurityAPIGetAnomaliesRequest(server string, params *RuntimeSecurityAPIGetAnomaliesParams) (*http.Request, error) { + var err error + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/list/%s/entries", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/anomalies") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11779,9 +11853,41 @@ func NewRuntimeSecurityAPIGetListEntriesRequest(server string, id string, params if params != nil { queryValues := queryURL.Query() - if params.Search != nil { + if params.ClusterIds != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Namespaces != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespaces", runtime.ParamLocationQuery, *params.Namespaces); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11859,45 +11965,118 @@ func NewRuntimeSecurityAPIGetListEntriesRequest(server string, id string, params } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} + if params.ResourceId != nil { -// NewRuntimeSecurityAPIRemoveListEntriesRequest calls the generic RuntimeSecurityAPIRemoveListEntries builder with application/json body -func NewRuntimeSecurityAPIRemoveListEntriesRequest(server string, id string, body RuntimeSecurityAPIRemoveListEntriesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPIRemoveListEntriesRequestWithBody(server, id, "application/json", bodyReader) -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "resourceId", runtime.ParamLocationQuery, *params.ResourceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewRuntimeSecurityAPIRemoveListEntriesRequestWithBody generates requests for RuntimeSecurityAPIRemoveListEntries with any type of body -func NewRuntimeSecurityAPIRemoveListEntriesRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { - var err error + } - var pathParam0 string + if params.Types != nil { - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "types", runtime.ParamLocationQuery, *params.Types); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Search != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StartTime != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewRuntimeSecurityAPIAckAnomaliesRequest calls the generic RuntimeSecurityAPIAckAnomalies builder with application/json body +func NewRuntimeSecurityAPIAckAnomaliesRequest(server string, body RuntimeSecurityAPIAckAnomaliesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } + bodyReader = bytes.NewReader(buf) + return NewRuntimeSecurityAPIAckAnomaliesRequestWithBody(server, "application/json", bodyReader) +} + +// NewRuntimeSecurityAPIAckAnomaliesRequestWithBody generates requests for RuntimeSecurityAPIAckAnomalies with any type of body +func NewRuntimeSecurityAPIAckAnomaliesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/list/%s/remove", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/ack") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11917,13 +12096,93 @@ func NewRuntimeSecurityAPIRemoveListEntriesRequestWithBody(server string, id str return req, nil } -// NewRuntimeSecurityAPIGetNetflowGraphRequest generates requests for RuntimeSecurityAPIGetNetflowGraph -func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string, params *RuntimeSecurityAPIGetNetflowGraphParams) (*http.Request, error) { +// NewRuntimeSecurityAPICloseAnomaliesRequest calls the generic RuntimeSecurityAPICloseAnomalies builder with application/json body +func NewRuntimeSecurityAPICloseAnomaliesRequest(server string, body RuntimeSecurityAPICloseAnomaliesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRuntimeSecurityAPICloseAnomaliesRequestWithBody(server, "application/json", bodyReader) +} + +// NewRuntimeSecurityAPICloseAnomaliesRequestWithBody generates requests for RuntimeSecurityAPICloseAnomalies with any type of body +func NewRuntimeSecurityAPICloseAnomaliesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/close") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewRuntimeSecurityAPITriggerAnomaliesWebhookRequest calls the generic RuntimeSecurityAPITriggerAnomaliesWebhook builder with application/json body +func NewRuntimeSecurityAPITriggerAnomaliesWebhookRequest(server string, body RuntimeSecurityAPITriggerAnomaliesWebhookJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRuntimeSecurityAPITriggerAnomaliesWebhookRequestWithBody(server, "application/json", bodyReader) +} + +// NewRuntimeSecurityAPITriggerAnomaliesWebhookRequestWithBody generates requests for RuntimeSecurityAPITriggerAnomaliesWebhook with any type of body +func NewRuntimeSecurityAPITriggerAnomaliesWebhookRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/trigger-webhook") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewRuntimeSecurityAPIGetAnomalyRequest generates requests for RuntimeSecurityAPIGetAnomaly +func NewRuntimeSecurityAPIGetAnomalyRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -11933,7 +12192,41 @@ func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/netflow/%s/graph", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewRuntimeSecurityAPIGetAnomalyEventsRequest generates requests for RuntimeSecurityAPIGetAnomalyEvents +func NewRuntimeSecurityAPIGetAnomalyEventsRequest(server string, id string, params *RuntimeSecurityAPIGetAnomalyEventsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/%s/events", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -11946,9 +12239,9 @@ func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string if params != nil { queryValues := queryURL.Query() - if params.Search != nil { + if params.PageLimit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11962,9 +12255,9 @@ func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string } - if params.StartTime != nil { + if params.PageCursor != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11978,9 +12271,9 @@ func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string } - if params.EndTime != nil { + if params.SortField != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11994,9 +12287,9 @@ func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string } - if params.GroupSourceBy != nil { + if params.SortOrder != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupSourceBy", runtime.ParamLocationQuery, *params.GroupSourceBy); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12010,9 +12303,9 @@ func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string } - if params.GroupDestinationBy != nil { + if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupDestinationBy", runtime.ParamLocationQuery, *params.GroupDestinationBy); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12037,13 +12330,24 @@ func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string return req, nil } -// NewRuntimeSecurityAPIGetNetflowListRequest generates requests for RuntimeSecurityAPIGetNetflowList -func NewRuntimeSecurityAPIGetNetflowListRequest(server string, clusterId string, params *RuntimeSecurityAPIGetNetflowListParams) (*http.Request, error) { +// NewRuntimeSecurityAPITriggerAnomalyWebhookRequest calls the generic RuntimeSecurityAPITriggerAnomalyWebhook builder with application/json body +func NewRuntimeSecurityAPITriggerAnomalyWebhookRequest(server string, id string, body RuntimeSecurityAPITriggerAnomalyWebhookJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRuntimeSecurityAPITriggerAnomalyWebhookRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewRuntimeSecurityAPITriggerAnomalyWebhookRequestWithBody generates requests for RuntimeSecurityAPITriggerAnomalyWebhook with any type of body +func NewRuntimeSecurityAPITriggerAnomalyWebhookRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -12053,7 +12357,7 @@ func NewRuntimeSecurityAPIGetNetflowListRequest(server string, clusterId string, return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/netflow/%s/list", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/anomalies/%s/trigger-webhook", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12063,12 +12367,41 @@ func NewRuntimeSecurityAPIGetNetflowListRequest(server string, clusterId string, return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.GroupSourceBy != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupSourceBy", runtime.ParamLocationQuery, *params.GroupSourceBy); err != nil { + return req, nil +} + +// NewRuntimeSecurityAPIGetRuntimeEventsRequest generates requests for RuntimeSecurityAPIGetRuntimeEvents +func NewRuntimeSecurityAPIGetRuntimeEventsRequest(server string, params *RuntimeSecurityAPIGetRuntimeEventsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/security/runtime/events") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ClusterIds != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12082,9 +12415,25 @@ func NewRuntimeSecurityAPIGetNetflowListRequest(server string, clusterId string, } - if params.GroupDestinationBy != nil { + if params.Types != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupDestinationBy", runtime.ParamLocationQuery, *params.GroupDestinationBy); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "types", runtime.ParamLocationQuery, *params.Types); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GroupSelectors != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupSelectors", runtime.ParamLocationQuery, *params.GroupSelectors); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12221,23 +12570,16 @@ func NewRuntimeSecurityAPIGetNetflowListRequest(server string, clusterId string, return req, nil } -// NewRuntimeSecurityAPIGetNetflowTrendRequest generates requests for RuntimeSecurityAPIGetNetflowTrend -func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string, params *RuntimeSecurityAPIGetNetflowTrendParams) (*http.Request, error) { +// NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest generates requests for RuntimeSecurityAPIGetRuntimeEventGroups +func NewRuntimeSecurityAPIGetRuntimeEventGroupsRequest(server string, params *RuntimeSecurityAPIGetRuntimeEventGroupsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/netflow/%s/trend", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/events/groups") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12250,9 +12592,9 @@ func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string if params != nil { queryValues := queryURL.Query() - if params.StartTime != nil { + if params.ClusterIds != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterIds", runtime.ParamLocationQuery, *params.ClusterIds); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12266,9 +12608,9 @@ func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string } - if params.EndTime != nil { + if params.Types != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "types", runtime.ParamLocationQuery, *params.Types); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12282,9 +12624,9 @@ func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string } - if params.StepSeconds != nil { + if params.GroupBy != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stepSeconds", runtime.ParamLocationQuery, *params.StepSeconds); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupBy", runtime.ParamLocationQuery, *params.GroupBy); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12298,9 +12640,9 @@ func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string } - if params.Limit != nil { + if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12314,9 +12656,9 @@ func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string } - if params.GroupSourceBy != nil { + if params.StartTime != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupSourceBy", runtime.ParamLocationQuery, *params.GroupSourceBy); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12330,9 +12672,9 @@ func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string } - if params.GroupDestinationBy != nil { + if params.EndTime != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupDestinationBy", runtime.ParamLocationQuery, *params.GroupDestinationBy); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12346,9 +12688,9 @@ func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string } - if params.Search != nil { + if params.PageLimit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12362,34 +12704,55 @@ func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string } - queryURL.RawQuery = queryValues.Encode() - } + if params.PageCursor != nil { - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - return req, nil -} + } -// NewRuntimeSecurityAPIGetAnomaliesOverviewRequest generates requests for RuntimeSecurityAPIGetAnomaliesOverview -func NewRuntimeSecurityAPIGetAnomaliesOverviewRequest(server string) (*http.Request, error) { - var err error + if params.SortField != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/security/runtime/overview/anomalies") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + if params.SortOrder != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -12400,16 +12763,23 @@ func NewRuntimeSecurityAPIGetAnomaliesOverviewRequest(server string) (*http.Requ return req, nil } -// NewRuntimeSecurityAPIGetRulesRequest generates requests for RuntimeSecurityAPIGetRules -func NewRuntimeSecurityAPIGetRulesRequest(server string, params *RuntimeSecurityAPIGetRulesParams) (*http.Request, error) { +// NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest generates requests for RuntimeSecurityAPIGetRuntimeEventsProcessTree +func NewRuntimeSecurityAPIGetRuntimeEventsProcessTreeRequest(server string, clusterId string, params *RuntimeSecurityAPIGetRuntimeEventsProcessTreeParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/rules") + operationPath := fmt.Sprintf("/v1/security/runtime/events/process-tree/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12422,9 +12792,9 @@ func NewRuntimeSecurityAPIGetRulesRequest(server string, params *RuntimeSecurity if params != nil { queryValues := queryURL.Query() - if params.Enabled != nil { + if params.ContainerId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "enabled", runtime.ParamLocationQuery, *params.Enabled); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "containerId", runtime.ParamLocationQuery, *params.ContainerId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12438,9 +12808,9 @@ func NewRuntimeSecurityAPIGetRulesRequest(server string, params *RuntimeSecurity } - if params.Category != nil { + if params.ProcessPid != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "category", runtime.ParamLocationQuery, *params.Category); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "processPid", runtime.ParamLocationQuery, *params.ProcessPid); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12454,9 +12824,25 @@ func NewRuntimeSecurityAPIGetRulesRequest(server string, params *RuntimeSecurity } - if params.Severity != nil { + if params.ProcessStartTime != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "severity", runtime.ParamLocationQuery, *params.Severity); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "processStartTime", runtime.ParamLocationQuery, *params.ProcessStartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndTime != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12470,6 +12856,39 @@ func NewRuntimeSecurityAPIGetRulesRequest(server string, params *RuntimeSecurity } + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewRuntimeSecurityAPIGetListsRequest generates requests for RuntimeSecurityAPIGetLists +func NewRuntimeSecurityAPIGetListsRequest(server string, params *RuntimeSecurityAPIGetListsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/security/runtime/list") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + if params.Search != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { @@ -12561,19 +12980,19 @@ func NewRuntimeSecurityAPIGetRulesRequest(server string, params *RuntimeSecurity return req, nil } -// NewRuntimeSecurityAPICreateRuleRequest calls the generic RuntimeSecurityAPICreateRule builder with application/json body -func NewRuntimeSecurityAPICreateRuleRequest(server string, body RuntimeSecurityAPICreateRuleJSONRequestBody) (*http.Request, error) { +// NewRuntimeSecurityAPICreateListRequest calls the generic RuntimeSecurityAPICreateList builder with application/json body +func NewRuntimeSecurityAPICreateListRequest(server string, body RuntimeSecurityAPICreateListJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPICreateRuleRequestWithBody(server, "application/json", bodyReader) + return NewRuntimeSecurityAPICreateListRequestWithBody(server, "application/json", bodyReader) } -// NewRuntimeSecurityAPICreateRuleRequestWithBody generates requests for RuntimeSecurityAPICreateRule with any type of body -func NewRuntimeSecurityAPICreateRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewRuntimeSecurityAPICreateListRequestWithBody generates requests for RuntimeSecurityAPICreateList with any type of body +func NewRuntimeSecurityAPICreateListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -12581,7 +13000,7 @@ func NewRuntimeSecurityAPICreateRuleRequestWithBody(server string, contentType s return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/rules") + operationPath := fmt.Sprintf("/v1/security/runtime/list") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12601,19 +13020,19 @@ func NewRuntimeSecurityAPICreateRuleRequestWithBody(server string, contentType s return req, nil } -// NewRuntimeSecurityAPIDeleteRulesRequest calls the generic RuntimeSecurityAPIDeleteRules builder with application/json body -func NewRuntimeSecurityAPIDeleteRulesRequest(server string, body RuntimeSecurityAPIDeleteRulesJSONRequestBody) (*http.Request, error) { +// NewRuntimeSecurityAPIDeleteListsRequest calls the generic RuntimeSecurityAPIDeleteLists builder with application/json body +func NewRuntimeSecurityAPIDeleteListsRequest(server string, body RuntimeSecurityAPIDeleteListsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPIDeleteRulesRequestWithBody(server, "application/json", bodyReader) + return NewRuntimeSecurityAPIDeleteListsRequestWithBody(server, "application/json", bodyReader) } -// NewRuntimeSecurityAPIDeleteRulesRequestWithBody generates requests for RuntimeSecurityAPIDeleteRules with any type of body -func NewRuntimeSecurityAPIDeleteRulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewRuntimeSecurityAPIDeleteListsRequestWithBody generates requests for RuntimeSecurityAPIDeleteLists with any type of body +func NewRuntimeSecurityAPIDeleteListsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -12621,7 +13040,7 @@ func NewRuntimeSecurityAPIDeleteRulesRequestWithBody(server string, contentType return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/rules/delete") + operationPath := fmt.Sprintf("/v1/security/runtime/list/delete") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12641,27 +13060,23 @@ func NewRuntimeSecurityAPIDeleteRulesRequestWithBody(server string, contentType return req, nil } -// NewRuntimeSecurityAPIToggleRulesRequest calls the generic RuntimeSecurityAPIToggleRules builder with application/json body -func NewRuntimeSecurityAPIToggleRulesRequest(server string, body RuntimeSecurityAPIToggleRulesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewRuntimeSecurityAPIGetListRequest generates requests for RuntimeSecurityAPIGetList +func NewRuntimeSecurityAPIGetListRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPIToggleRulesRequestWithBody(server, "application/json", bodyReader) -} - -// NewRuntimeSecurityAPIToggleRulesRequestWithBody generates requests for RuntimeSecurityAPIToggleRules with any type of body -func NewRuntimeSecurityAPIToggleRulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/rules/toggle") + operationPath := fmt.Sprintf("/v1/security/runtime/list/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12671,37 +13086,42 @@ func NewRuntimeSecurityAPIToggleRulesRequestWithBody(server string, contentType return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewRuntimeSecurityAPIValidateRequest calls the generic RuntimeSecurityAPIValidate builder with application/json body -func NewRuntimeSecurityAPIValidateRequest(server string, body RuntimeSecurityAPIValidateJSONRequestBody) (*http.Request, error) { +// NewRuntimeSecurityAPIAddListEntriesRequest calls the generic RuntimeSecurityAPIAddListEntries builder with application/json body +func NewRuntimeSecurityAPIAddListEntriesRequest(server string, id string, body RuntimeSecurityAPIAddListEntriesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPIValidateRequestWithBody(server, "application/json", bodyReader) + return NewRuntimeSecurityAPIAddListEntriesRequestWithBody(server, id, "application/json", bodyReader) } -// NewRuntimeSecurityAPIValidateRequestWithBody generates requests for RuntimeSecurityAPIValidate with any type of body -func NewRuntimeSecurityAPIValidateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewRuntimeSecurityAPIAddListEntriesRequestWithBody generates requests for RuntimeSecurityAPIAddListEntries with any type of body +func NewRuntimeSecurityAPIAddListEntriesRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/rules/validate") + operationPath := fmt.Sprintf("/v1/security/runtime/list/%s/add", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12721,8 +13141,8 @@ func NewRuntimeSecurityAPIValidateRequestWithBody(server string, contentType str return req, nil } -// NewRuntimeSecurityAPIGetRuleRequest generates requests for RuntimeSecurityAPIGetRule -func NewRuntimeSecurityAPIGetRuleRequest(server string, id string) (*http.Request, error) { +// NewRuntimeSecurityAPIGetListEntriesRequest generates requests for RuntimeSecurityAPIGetListEntries +func NewRuntimeSecurityAPIGetListEntriesRequest(server string, id string, params *RuntimeSecurityAPIGetListEntriesParams) (*http.Request, error) { var err error var pathParam0 string @@ -12737,7 +13157,7 @@ func NewRuntimeSecurityAPIGetRuleRequest(server string, id string) (*http.Reques return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/rules/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/list/%s/entries", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12747,6 +13167,92 @@ func NewRuntimeSecurityAPIGetRuleRequest(server string, id string) (*http.Reques return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.Search != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageLimit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageCursor != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortField != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortOrder != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -12755,19 +13261,19 @@ func NewRuntimeSecurityAPIGetRuleRequest(server string, id string) (*http.Reques return req, nil } -// NewRuntimeSecurityAPIEditRuleRequest calls the generic RuntimeSecurityAPIEditRule builder with application/json body -func NewRuntimeSecurityAPIEditRuleRequest(server string, id string, body RuntimeSecurityAPIEditRuleJSONRequestBody) (*http.Request, error) { +// NewRuntimeSecurityAPIRemoveListEntriesRequest calls the generic RuntimeSecurityAPIRemoveListEntries builder with application/json body +func NewRuntimeSecurityAPIRemoveListEntriesRequest(server string, id string, body RuntimeSecurityAPIRemoveListEntriesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRuntimeSecurityAPIEditRuleRequestWithBody(server, id, "application/json", bodyReader) + return NewRuntimeSecurityAPIRemoveListEntriesRequestWithBody(server, id, "application/json", bodyReader) } -// NewRuntimeSecurityAPIEditRuleRequestWithBody generates requests for RuntimeSecurityAPIEditRule with any type of body -func NewRuntimeSecurityAPIEditRuleRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewRuntimeSecurityAPIRemoveListEntriesRequestWithBody generates requests for RuntimeSecurityAPIRemoveListEntries with any type of body +func NewRuntimeSecurityAPIRemoveListEntriesRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -12782,7 +13288,7 @@ func NewRuntimeSecurityAPIEditRuleRequestWithBody(server string, id string, cont return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/rules/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/list/%s/remove", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12792,7 +13298,7 @@ func NewRuntimeSecurityAPIEditRuleRequestWithBody(server string, id string, cont return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -12802,8 +13308,8 @@ func NewRuntimeSecurityAPIEditRuleRequestWithBody(server string, id string, cont return req, nil } -// NewRuntimeSecurityAPIGetClusterWorkloadsNetflowRequest generates requests for RuntimeSecurityAPIGetClusterWorkloadsNetflow -func NewRuntimeSecurityAPIGetClusterWorkloadsNetflowRequest(server string, clusterId string, params *RuntimeSecurityAPIGetClusterWorkloadsNetflowParams) (*http.Request, error) { +// NewRuntimeSecurityAPIGetNetflowGraphRequest generates requests for RuntimeSecurityAPIGetNetflowGraph +func NewRuntimeSecurityAPIGetNetflowGraphRequest(server string, clusterId string, params *RuntimeSecurityAPIGetNetflowGraphParams) (*http.Request, error) { var err error var pathParam0 string @@ -12818,7 +13324,7 @@ func NewRuntimeSecurityAPIGetClusterWorkloadsNetflowRequest(server string, clust return nil, err } - operationPath := fmt.Sprintf("/v1/security/runtime/workloads-netflow/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/netflow/%s/graph", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12831,6 +13337,22 @@ func NewRuntimeSecurityAPIGetClusterWorkloadsNetflowRequest(server string, clust if params != nil { queryValues := queryURL.Query() + if params.Search != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.StartTime != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { @@ -12863,9 +13385,25 @@ func NewRuntimeSecurityAPIGetClusterWorkloadsNetflowRequest(server string, clust } - if params.UsePodDetails != nil { + if params.GroupSourceBy != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "usePodDetails", runtime.ParamLocationQuery, *params.UsePodDetails); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupSourceBy", runtime.ParamLocationQuery, *params.GroupSourceBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GroupDestinationBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupDestinationBy", runtime.ParamLocationQuery, *params.GroupDestinationBy); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -12890,54 +13428,23 @@ func NewRuntimeSecurityAPIGetClusterWorkloadsNetflowRequest(server string, clust return req, nil } -// NewSSOAPIListSSOConnectionsRequest generates requests for SSOAPIListSSOConnections -func NewSSOAPIListSSOConnectionsRequest(server string) (*http.Request, error) { +// NewRuntimeSecurityAPIGetNetflowListRequest generates requests for RuntimeSecurityAPIGetNetflowList +func NewRuntimeSecurityAPIGetNetflowListRequest(server string, clusterId string, params *RuntimeSecurityAPIGetNetflowListParams) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/sso-connections") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} + var pathParam0 string -// NewSSOAPICreateSSOConnectionRequest calls the generic SSOAPICreateSSOConnection builder with application/json body -func NewSSOAPICreateSSOConnectionRequest(server string, body SSOAPICreateSSOConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewSSOAPICreateSSOConnectionRequestWithBody(server, "application/json", bodyReader) -} - -// NewSSOAPICreateSSOConnectionRequestWithBody generates requests for SSOAPICreateSSOConnection with any type of body -func NewSSOAPICreateSSOConnectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/sso-connections") + operationPath := fmt.Sprintf("/v1/security/runtime/netflow/%s/list", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -12947,149 +13454,171 @@ func NewSSOAPICreateSSOConnectionRequestWithBody(server string, contentType stri return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - req.Header.Add("Content-Type", contentType) + if params.GroupSourceBy != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupSourceBy", runtime.ParamLocationQuery, *params.GroupSourceBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewSSOAPIDeleteSSOConnectionRequest generates requests for SSOAPIDeleteSSOConnection -func NewSSOAPIDeleteSSOConnectionRequest(server string, id string) (*http.Request, error) { - var err error + } - var pathParam0 string + if params.GroupDestinationBy != nil { - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupDestinationBy", runtime.ParamLocationQuery, *params.GroupDestinationBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + } - operationPath := fmt.Sprintf("/v1/sso-connections/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.Search != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } + } - return req, nil -} + if params.StartTime != nil { -// NewSSOAPIGetSSOConnectionRequest generates requests for SSOAPIGetSSOConnection -func NewSSOAPIGetSSOConnectionRequest(server string, id string) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam0 string + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } + if params.EndTime != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/sso-connections/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if params.PageLimit != nil { - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - return req, nil -} + } -// NewSSOAPIUpdateSSOConnectionRequest calls the generic SSOAPIUpdateSSOConnection builder with application/json body -func NewSSOAPIUpdateSSOConnectionRequest(server string, id string, body SSOAPIUpdateSSOConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSSOAPIUpdateSSOConnectionRequestWithBody(server, id, "application/json", bodyReader) -} + if params.PageCursor != nil { -// NewSSOAPIUpdateSSOConnectionRequestWithBody generates requests for SSOAPIUpdateSSOConnection with any type of body -func NewSSOAPIUpdateSSOConnectionRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam0 string + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } + if params.SortField != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/sso-connections/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if params.SortOrder != nil { - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - req.Header.Add("Content-Type", contentType) + } - return req, nil -} + queryURL.RawQuery = queryValues.Encode() + } -// NewSSOAPISetSyncForSSOConnectionRequest calls the generic SSOAPISetSyncForSSOConnection builder with application/json body -func NewSSOAPISetSyncForSSOConnectionRequest(server string, id string, body SSOAPISetSyncForSSOConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewSSOAPISetSyncForSSOConnectionRequestWithBody(server, id, "application/json", bodyReader) + + return req, nil } -// NewSSOAPISetSyncForSSOConnectionRequestWithBody generates requests for SSOAPISetSyncForSSOConnection with any type of body -func NewSSOAPISetSyncForSSOConnectionRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewRuntimeSecurityAPIGetNetflowTrendRequest generates requests for RuntimeSecurityAPIGetNetflowTrend +func NewRuntimeSecurityAPIGetNetflowTrendRequest(server string, clusterId string, params *RuntimeSecurityAPIGetNetflowTrendParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } @@ -13099,7 +13628,7 @@ func NewSSOAPISetSyncForSSOConnectionRequestWithBody(server string, id string, c return nil, err } - operationPath := fmt.Sprintf("/v1/sso-connections/%s/sync", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/netflow/%s/trend", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13109,101 +13638,122 @@ func NewSSOAPISetSyncForSSOConnectionRequestWithBody(server string, id string, c return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - req.Header.Add("Content-Type", contentType) + if params.StartTime != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewScheduledRebalancingAPIListAvailableRebalancingTZRequest generates requests for ScheduledRebalancingAPIListAvailableRebalancingTZ -func NewScheduledRebalancingAPIListAvailableRebalancingTZRequest(server string) (*http.Request, error) { - var err error + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params.EndTime != nil { - operationPath := fmt.Sprintf("/v1/time-zones") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + } - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + if params.StepSeconds != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "stepSeconds", runtime.ParamLocationQuery, *params.StepSeconds); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewWorkloadOptimizationAPIGetAgentStatusRequest generates requests for WorkloadOptimizationAPIGetAgentStatus -func NewWorkloadOptimizationAPIGetAgentStatusRequest(server string, clusterId string) (*http.Request, error) { - var err error + } - var pathParam0 string + if params.Limit != nil { - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/components/workload-autoscaler", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.GroupSourceBy != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupSourceBy", runtime.ParamLocationQuery, *params.GroupSourceBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + } - return req, nil -} + if params.GroupDestinationBy != nil { -// NewWorkloadOptimizationAPIListLimitRangesRequest generates requests for WorkloadOptimizationAPIListLimitRanges -func NewWorkloadOptimizationAPIListLimitRangesRequest(server string, clusterId string) (*http.Request, error) { - var err error + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupDestinationBy", runtime.ParamLocationQuery, *params.GroupDestinationBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - var pathParam0 string + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + if params.Search != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/limit-ranges", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -13214,23 +13764,16 @@ func NewWorkloadOptimizationAPIListLimitRangesRequest(server string, clusterId s return req, nil } -// NewWorkloadOptimizationAPIListWorkloadScalingPoliciesRequest generates requests for WorkloadOptimizationAPIListWorkloadScalingPolicies -func NewWorkloadOptimizationAPIListWorkloadScalingPoliciesRequest(server string, clusterId string) (*http.Request, error) { +// NewRuntimeSecurityAPIGetAnomaliesOverviewRequest generates requests for RuntimeSecurityAPIGetAnomaliesOverview +func NewRuntimeSecurityAPIGetAnomaliesOverviewRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/overview/anomalies") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13248,34 +13791,16 @@ func NewWorkloadOptimizationAPIListWorkloadScalingPoliciesRequest(server string, return req, nil } -// NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequest calls the generic WorkloadOptimizationAPICreateWorkloadScalingPolicy builder with application/json body -func NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequest(server string, clusterId string, body WorkloadOptimizationAPICreateWorkloadScalingPolicyJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequestWithBody(server, clusterId, "application/json", bodyReader) -} - -// NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequestWithBody generates requests for WorkloadOptimizationAPICreateWorkloadScalingPolicy with any type of body -func NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { +// NewRuntimeSecurityAPIGetRulesRequest generates requests for RuntimeSecurityAPIGetRules +func NewRuntimeSecurityAPIGetRulesRequest(server string, params *RuntimeSecurityAPIGetRulesParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/rules") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13285,87 +13810,169 @@ func NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequestWithBody(server return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - req.Header.Add("Content-Type", contentType) + if params.Enabled != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "enabled", runtime.ParamLocationQuery, *params.Enabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewWorkloadOptimizationAPISetScalingPoliciesOrderRequest calls the generic WorkloadOptimizationAPISetScalingPoliciesOrder builder with application/json body -func NewWorkloadOptimizationAPISetScalingPoliciesOrderRequest(server string, clusterId string, body WorkloadOptimizationAPISetScalingPoliciesOrderJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewWorkloadOptimizationAPISetScalingPoliciesOrderRequestWithBody(server, clusterId, "application/json", bodyReader) -} + } -// NewWorkloadOptimizationAPISetScalingPoliciesOrderRequestWithBody generates requests for WorkloadOptimizationAPISetScalingPoliciesOrder with any type of body -func NewWorkloadOptimizationAPISetScalingPoliciesOrderRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { - var err error + if params.Category != nil { - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "category", runtime.ParamLocationQuery, *params.Category); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params.Severity != nil { - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/order", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "severity", runtime.ParamLocationQuery, *params.Severity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + } - req, err := http.NewRequest("PUT", queryURL.String(), body) - if err != nil { - return nil, err - } + if params.Search != nil { - req.Header.Add("Content-Type", contentType) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - return req, nil -} + } -// NewWorkloadOptimizationAPIDeleteWorkloadScalingPolicyRequest generates requests for WorkloadOptimizationAPIDeleteWorkloadScalingPolicy -func NewWorkloadOptimizationAPIDeleteWorkloadScalingPolicyRequest(server string, clusterId string, policyId string) (*http.Request, error) { - var err error + if params.PageLimit != nil { - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + } + + if params.PageCursor != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortField != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.field", runtime.ParamLocationQuery, *params.SortField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortOrder != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort.order", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - var pathParam1 string + return req, nil +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "policyId", runtime.ParamLocationPath, policyId) +// NewRuntimeSecurityAPICreateRuleRequest calls the generic RuntimeSecurityAPICreateRule builder with application/json body +func NewRuntimeSecurityAPICreateRuleRequest(server string, body RuntimeSecurityAPICreateRuleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewRuntimeSecurityAPICreateRuleRequestWithBody(server, "application/json", bodyReader) +} + +// NewRuntimeSecurityAPICreateRuleRequestWithBody generates requests for RuntimeSecurityAPICreateRule with any type of body +func NewRuntimeSecurityAPICreateRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/security/runtime/rules") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13375,38 +13982,37 @@ func NewWorkloadOptimizationAPIDeleteWorkloadScalingPolicyRequest(server string, return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewWorkloadOptimizationAPIGetWorkloadScalingPolicyRequest generates requests for WorkloadOptimizationAPIGetWorkloadScalingPolicy -func NewWorkloadOptimizationAPIGetWorkloadScalingPolicyRequest(server string, clusterId string, policyId string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) +// NewRuntimeSecurityAPIDeleteRulesRequest calls the generic RuntimeSecurityAPIDeleteRules builder with application/json body +func NewRuntimeSecurityAPIDeleteRulesRequest(server string, body RuntimeSecurityAPIDeleteRulesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewRuntimeSecurityAPIDeleteRulesRequestWithBody(server, "application/json", bodyReader) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "policyId", runtime.ParamLocationPath, policyId) - if err != nil { - return nil, err - } +// NewRuntimeSecurityAPIDeleteRulesRequestWithBody generates requests for RuntimeSecurityAPIDeleteRules with any type of body +func NewRuntimeSecurityAPIDeleteRulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/security/runtime/rules/delete") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13416,49 +14022,37 @@ func NewWorkloadOptimizationAPIGetWorkloadScalingPolicyRequest(server string, cl return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequest calls the generic WorkloadOptimizationAPIUpdateWorkloadScalingPolicy builder with application/json body -func NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequest(server string, clusterId string, policyId string, body WorkloadOptimizationAPIUpdateWorkloadScalingPolicyJSONRequestBody) (*http.Request, error) { +// NewRuntimeSecurityAPIToggleRulesRequest calls the generic RuntimeSecurityAPIToggleRules builder with application/json body +func NewRuntimeSecurityAPIToggleRulesRequest(server string, body RuntimeSecurityAPIToggleRulesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequestWithBody(server, clusterId, policyId, "application/json", bodyReader) + return NewRuntimeSecurityAPIToggleRulesRequestWithBody(server, "application/json", bodyReader) } -// NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequestWithBody generates requests for WorkloadOptimizationAPIUpdateWorkloadScalingPolicy with any type of body -func NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequestWithBody(server string, clusterId string, policyId string, contentType string, body io.Reader) (*http.Request, error) { +// NewRuntimeSecurityAPIToggleRulesRequestWithBody generates requests for RuntimeSecurityAPIToggleRules with any type of body +func NewRuntimeSecurityAPIToggleRulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "policyId", runtime.ParamLocationPath, policyId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/security/runtime/rules/toggle") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13468,7 +14062,7 @@ func NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequestWithBody(server return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -13478,31 +14072,53 @@ func NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequestWithBody(server return req, nil } -// NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequest calls the generic WorkloadOptimizationAPIAssignScalingPolicyWorkloads builder with application/json body -func NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequest(server string, clusterId string, policyId string, body WorkloadOptimizationAPIAssignScalingPolicyWorkloadsJSONRequestBody) (*http.Request, error) { +// NewRuntimeSecurityAPIValidateRequest calls the generic RuntimeSecurityAPIValidate builder with application/json body +func NewRuntimeSecurityAPIValidateRequest(server string, body RuntimeSecurityAPIValidateJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequestWithBody(server, clusterId, policyId, "application/json", bodyReader) + return NewRuntimeSecurityAPIValidateRequestWithBody(server, "application/json", bodyReader) } -// NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequestWithBody generates requests for WorkloadOptimizationAPIAssignScalingPolicyWorkloads with any type of body -func NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequestWithBody(server string, clusterId string, policyId string, contentType string, body io.Reader) (*http.Request, error) { +// NewRuntimeSecurityAPIValidateRequestWithBody generates requests for RuntimeSecurityAPIValidate with any type of body +func NewRuntimeSecurityAPIValidateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + operationPath := fmt.Sprintf("/v1/security/runtime/rules/validate") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam1 string + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "policyId", runtime.ParamLocationPath, policyId) + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewRuntimeSecurityAPIGetRuleRequest generates requests for RuntimeSecurityAPIGetRule +func NewRuntimeSecurityAPIGetRuleRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -13512,7 +14128,7 @@ func NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequestWithBody(serve return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/%s/workloads", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/security/runtime/rules/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13522,23 +14138,32 @@ func NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequestWithBody(serve return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewWorkloadOptimizationAPIListResourceQuotasRequest generates requests for WorkloadOptimizationAPIListResourceQuotas -func NewWorkloadOptimizationAPIListResourceQuotasRequest(server string, clusterId string) (*http.Request, error) { +// NewRuntimeSecurityAPIEditRuleRequest calls the generic RuntimeSecurityAPIEditRule builder with application/json body +func NewRuntimeSecurityAPIEditRuleRequest(server string, id string, body RuntimeSecurityAPIEditRuleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRuntimeSecurityAPIEditRuleRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewRuntimeSecurityAPIEditRuleRequestWithBody generates requests for RuntimeSecurityAPIEditRule with any type of body +func NewRuntimeSecurityAPIEditRuleRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -13548,7 +14173,7 @@ func NewWorkloadOptimizationAPIListResourceQuotasRequest(server string, clusterI return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/resource-quotas", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/rules/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13558,16 +14183,18 @@ func NewWorkloadOptimizationAPIListResourceQuotasRequest(server string, clusterI return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewWorkloadOptimizationAPIListWorkloadEventsRequest generates requests for WorkloadOptimizationAPIListWorkloadEvents -func NewWorkloadOptimizationAPIListWorkloadEventsRequest(server string, clusterId string, params *WorkloadOptimizationAPIListWorkloadEventsParams) (*http.Request, error) { +// NewRuntimeSecurityAPIGetClusterWorkloadsNetflowRequest generates requests for RuntimeSecurityAPIGetClusterWorkloadsNetflow +func NewRuntimeSecurityAPIGetClusterWorkloadsNetflowRequest(server string, clusterId string, params *RuntimeSecurityAPIGetClusterWorkloadsNetflowParams) (*http.Request, error) { var err error var pathParam0 string @@ -13582,7 +14209,7 @@ func NewWorkloadOptimizationAPIListWorkloadEventsRequest(server string, clusterI return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workload-events", pathParam0) + operationPath := fmt.Sprintf("/v1/security/runtime/workloads-netflow/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13595,9 +14222,9 @@ func NewWorkloadOptimizationAPIListWorkloadEventsRequest(server string, clusterI if params != nil { queryValues := queryURL.Query() - if params.PageLimit != nil { + if params.StartTime != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startTime", runtime.ParamLocationQuery, *params.StartTime); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -13611,9 +14238,9 @@ func NewWorkloadOptimizationAPIListWorkloadEventsRequest(server string, clusterI } - if params.PageCursor != nil { + if params.EndTime != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endTime", runtime.ParamLocationQuery, *params.EndTime); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -13627,9 +14254,9 @@ func NewWorkloadOptimizationAPIListWorkloadEventsRequest(server string, clusterI } - if params.FromDate != nil { + if params.UsePodDetails != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fromDate", runtime.ParamLocationQuery, *params.FromDate); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "usePodDetails", runtime.ParamLocationQuery, *params.UsePodDetails); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -13643,103 +14270,34 @@ func NewWorkloadOptimizationAPIListWorkloadEventsRequest(server string, clusterI } - if params.ToDate != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "toDate", runtime.ParamLocationQuery, *params.ToDate); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.WorkloadId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workloadId", runtime.ParamLocationQuery, *params.WorkloadId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.WorkloadName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workloadName", runtime.ParamLocationQuery, *params.WorkloadName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.WorkloadNamespace != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workloadNamespace", runtime.ParamLocationQuery, *params.WorkloadNamespace); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.WorkloadKind != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workloadKind", runtime.ParamLocationQuery, *params.WorkloadKind); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Type != nil { +// NewSSOAPIListSSOConnectionsRequest generates requests for SSOAPIListSSOConnections +func NewSSOAPIListSSOConnectionsRequest(server string) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/v1/sso-connections") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - queryURL.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -13750,30 +14308,27 @@ func NewWorkloadOptimizationAPIListWorkloadEventsRequest(server string, clusterI return req, nil } -// NewWorkloadOptimizationAPIGetWorkloadEventRequest generates requests for WorkloadOptimizationAPIGetWorkloadEvent -func NewWorkloadOptimizationAPIGetWorkloadEventRequest(server string, clusterId string, eventId string, params *WorkloadOptimizationAPIGetWorkloadEventParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) +// NewSSOAPICreateSSOConnectionRequest calls the generic SSOAPICreateSSOConnection builder with application/json body +func NewSSOAPICreateSSOConnectionRequest(server string, body SSOAPICreateSSOConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewSSOAPICreateSSOConnectionRequestWithBody(server, "application/json", bodyReader) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "eventId", runtime.ParamLocationPath, eventId) - if err != nil { - return nil, err - } +// NewSSOAPICreateSSOConnectionRequestWithBody generates requests for SSOAPICreateSSOConnection with any type of body +func NewSSOAPICreateSSOConnectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workload-events/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/sso-connections") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13783,39 +14338,23 @@ func NewWorkloadOptimizationAPIGetWorkloadEventRequest(server string, clusterId return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "createdAt", runtime.ParamLocationQuery, params.CreatedAt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewWorkloadOptimizationAPIListWorkloadsRequest generates requests for WorkloadOptimizationAPIListWorkloads -func NewWorkloadOptimizationAPIListWorkloadsRequest(server string, clusterId string) (*http.Request, error) { +// NewSSOAPIDeleteSSOConnectionRequest generates requests for SSOAPIDeleteSSOConnection +func NewSSOAPIDeleteSSOConnectionRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -13825,7 +14364,7 @@ func NewWorkloadOptimizationAPIListWorkloadsRequest(server string, clusterId str return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workloads", pathParam0) + operationPath := fmt.Sprintf("/v1/sso-connections/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13835,7 +14374,7 @@ func NewWorkloadOptimizationAPIListWorkloadsRequest(server string, clusterId str return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -13843,13 +14382,13 @@ func NewWorkloadOptimizationAPIListWorkloadsRequest(server string, clusterId str return req, nil } -// NewWorkloadOptimizationAPIGetWorkloadsSummaryRequest generates requests for WorkloadOptimizationAPIGetWorkloadsSummary -func NewWorkloadOptimizationAPIGetWorkloadsSummaryRequest(server string, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryParams) (*http.Request, error) { +// NewSSOAPIGetSSOConnectionRequest generates requests for SSOAPIGetSSOConnection +func NewSSOAPIGetSSOConnectionRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -13859,7 +14398,7 @@ func NewWorkloadOptimizationAPIGetWorkloadsSummaryRequest(server string, cluster return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workloads-summary", pathParam0) + operationPath := fmt.Sprintf("/v1/sso-connections/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13869,28 +14408,6 @@ func NewWorkloadOptimizationAPIGetWorkloadsSummaryRequest(server string, cluster return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.IncludeCosts != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeCosts", runtime.ParamLocationQuery, *params.IncludeCosts); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -13899,13 +14416,24 @@ func NewWorkloadOptimizationAPIGetWorkloadsSummaryRequest(server string, cluster return req, nil } -// NewWorkloadOptimizationAPIGetWorkloadsSummaryMetricsRequest generates requests for WorkloadOptimizationAPIGetWorkloadsSummaryMetrics -func NewWorkloadOptimizationAPIGetWorkloadsSummaryMetricsRequest(server string, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryMetricsParams) (*http.Request, error) { +// NewSSOAPIUpdateSSOConnectionRequest calls the generic SSOAPIUpdateSSOConnection builder with application/json body +func NewSSOAPIUpdateSSOConnectionRequest(server string, id string, body SSOAPIUpdateSSOConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSSOAPIUpdateSSOConnectionRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewSSOAPIUpdateSSOConnectionRequestWithBody generates requests for SSOAPIUpdateSSOConnection with any type of body +func NewSSOAPIUpdateSSOConnectionRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -13915,7 +14443,7 @@ func NewWorkloadOptimizationAPIGetWorkloadsSummaryMetricsRequest(server string, return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workloads-summary-metrics", pathParam0) + operationPath := fmt.Sprintf("/v1/sso-connections/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -13925,66 +14453,34 @@ func NewWorkloadOptimizationAPIGetWorkloadsSummaryMetricsRequest(server string, return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.FromTime != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fromTime", runtime.ParamLocationQuery, *params.FromTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ToTime != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "toTime", runtime.ParamLocationQuery, *params.ToTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - } + req.Header.Add("Content-Type", contentType) - queryURL.RawQuery = queryValues.Encode() - } + return req, nil +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +// NewSSOAPISetSyncForSSOConnectionRequest calls the generic SSOAPISetSyncForSSOConnection builder with application/json body +func NewSSOAPISetSyncForSSOConnectionRequest(server string, id string, body SSOAPISetSyncForSSOConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - - return req, nil + bodyReader = bytes.NewReader(buf) + return NewSSOAPISetSyncForSSOConnectionRequestWithBody(server, id, "application/json", bodyReader) } -// NewWorkloadOptimizationAPIGetWorkloadRequest generates requests for WorkloadOptimizationAPIGetWorkload -func NewWorkloadOptimizationAPIGetWorkloadRequest(server string, clusterId string, workloadId string, params *WorkloadOptimizationAPIGetWorkloadParams) (*http.Request, error) { +// NewSSOAPISetSyncForSSOConnectionRequestWithBody generates requests for SSOAPISetSyncForSSOConnection with any type of body +func NewSSOAPISetSyncForSSOConnectionRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workloadId", runtime.ParamLocationPath, workloadId) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -13994,7 +14490,7 @@ func NewWorkloadOptimizationAPIGetWorkloadRequest(server string, clusterId strin return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workloads/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/sso-connections/%s/sync", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -14004,70 +14500,18 @@ func NewWorkloadOptimizationAPIGetWorkloadRequest(server string, clusterId strin return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.IncludeMetrics != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeMetrics", runtime.ParamLocationQuery, *params.IncludeMetrics); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.FromTime != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fromTime", runtime.ParamLocationQuery, *params.FromTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ToTime != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "toTime", runtime.ParamLocationQuery, *params.ToTime); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewWorkloadOptimizationAPIGetInstallCmdRequest generates requests for WorkloadOptimizationAPIGetInstallCmd -func NewWorkloadOptimizationAPIGetInstallCmdRequest(server string, params *WorkloadOptimizationAPIGetInstallCmdParams) (*http.Request, error) { +// NewScheduledRebalancingAPIListAvailableRebalancingTZRequest generates requests for ScheduledRebalancingAPIListAvailableRebalancingTZ +func NewScheduledRebalancingAPIListAvailableRebalancingTZRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -14075,7 +14519,7 @@ func NewWorkloadOptimizationAPIGetInstallCmdRequest(server string, params *Workl return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/scripts/workload-autoscaler-install") + operationPath := fmt.Sprintf("/v1/time-zones") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -14085,56 +14529,6 @@ func NewWorkloadOptimizationAPIGetInstallCmdRequest(server string, params *Workl return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterId", runtime.ParamLocationQuery, params.ClusterId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if params.CmeDsUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cmeDsUrl", runtime.ParamLocationQuery, *params.CmeDsUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CmePresets != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cmePresets", runtime.ParamLocationQuery, *params.CmePresets); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -14143,16 +14537,23 @@ func NewWorkloadOptimizationAPIGetInstallCmdRequest(server string, params *Workl return req, nil } -// NewWorkloadOptimizationAPIGetInstallScriptRequest generates requests for WorkloadOptimizationAPIGetInstallScript -func NewWorkloadOptimizationAPIGetInstallScriptRequest(server string, params *WorkloadOptimizationAPIGetInstallScriptParams) (*http.Request, error) { +// NewWorkloadOptimizationAPIGetAgentStatusRequest generates requests for WorkloadOptimizationAPIGetAgentStatus +func NewWorkloadOptimizationAPIGetAgentStatusRequest(server string, clusterId string) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/workload-autoscaling/scripts/workload-autoscaler-install.sh") + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/components/workload-autoscaler", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -14162,44 +14563,6 @@ func NewWorkloadOptimizationAPIGetInstallScriptRequest(server string, params *Wo return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.CmeDsUrl != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cmeDsUrl", runtime.ParamLocationQuery, *params.CmeDsUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CmePresets != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cmePresets", runtime.ParamLocationQuery, *params.CmePresets); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -14208,16 +14571,23 @@ func NewWorkloadOptimizationAPIGetInstallScriptRequest(server string, params *Wo return req, nil } -// NewInventoryAPIListZonesRequest generates requests for InventoryAPIListZones -func NewInventoryAPIListZonesRequest(server string, params *InventoryAPIListZonesParams) (*http.Request, error) { +// NewWorkloadOptimizationAPIListLimitRangesRequest generates requests for WorkloadOptimizationAPIListLimitRanges +func NewWorkloadOptimizationAPIListLimitRangesRequest(server string, clusterId string) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/zones") + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/limit-ranges", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -14227,44 +14597,6 @@ func NewInventoryAPIListZonesRequest(server string, params *InventoryAPIListZone return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.PageSize != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PageToken != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageToken", runtime.ParamLocationQuery, *params.PageToken); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -14273,19 +14605,8 @@ func NewInventoryAPIListZonesRequest(server string, params *InventoryAPIListZone return req, nil } -// NewWorkloadOptimizationAPIPatchWorkloadV2Request calls the generic WorkloadOptimizationAPIPatchWorkloadV2 builder with application/json body -func NewWorkloadOptimizationAPIPatchWorkloadV2Request(server string, clusterId string, workloadId string, body WorkloadOptimizationAPIPatchWorkloadV2JSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewWorkloadOptimizationAPIPatchWorkloadV2RequestWithBody(server, clusterId, workloadId, "application/json", bodyReader) -} - -// NewWorkloadOptimizationAPIPatchWorkloadV2RequestWithBody generates requests for WorkloadOptimizationAPIPatchWorkloadV2 with any type of body -func NewWorkloadOptimizationAPIPatchWorkloadV2RequestWithBody(server string, clusterId string, workloadId string, contentType string, body io.Reader) (*http.Request, error) { +// NewWorkloadOptimizationAPIListWorkloadScalingPoliciesRequest generates requests for WorkloadOptimizationAPIListWorkloadScalingPolicies +func NewWorkloadOptimizationAPIListWorkloadScalingPoliciesRequest(server string, clusterId string) (*http.Request, error) { var err error var pathParam0 string @@ -14295,19 +14616,12 @@ func NewWorkloadOptimizationAPIPatchWorkloadV2RequestWithBody(server string, clu return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workloadId", runtime.ParamLocationPath, workloadId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v2/workload-autoscaling/clusters/%s/workloads/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -14317,29 +14631,27 @@ func NewWorkloadOptimizationAPIPatchWorkloadV2RequestWithBody(server string, clu return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewWorkloadOptimizationAPIUpdateWorkloadV2Request calls the generic WorkloadOptimizationAPIUpdateWorkloadV2 builder with application/json body -func NewWorkloadOptimizationAPIUpdateWorkloadV2Request(server string, clusterId string, workloadId string, body WorkloadOptimizationAPIUpdateWorkloadV2JSONRequestBody) (*http.Request, error) { +// NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequest calls the generic WorkloadOptimizationAPICreateWorkloadScalingPolicy builder with application/json body +func NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequest(server string, clusterId string, body WorkloadOptimizationAPICreateWorkloadScalingPolicyJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody(server, clusterId, workloadId, "application/json", bodyReader) + return NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequestWithBody(server, clusterId, "application/json", bodyReader) } -// NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody generates requests for WorkloadOptimizationAPIUpdateWorkloadV2 with any type of body -func NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody(server string, clusterId string, workloadId string, contentType string, body io.Reader) (*http.Request, error) { +// NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequestWithBody generates requests for WorkloadOptimizationAPICreateWorkloadScalingPolicy with any type of body +func NewWorkloadOptimizationAPICreateWorkloadScalingPolicyRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -14349,19 +14661,12 @@ func NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody(server string, cl return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workloadId", runtime.ParamLocationPath, workloadId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v2/workload-autoscaling/clusters/%s/workloads/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -14371,7 +14676,7 @@ func NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody(server string, cl return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -14381,778 +14686,2362 @@ func NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody(server string, cl return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } +// NewWorkloadOptimizationAPISetScalingPoliciesOrderRequest calls the generic WorkloadOptimizationAPISetScalingPoliciesOrder builder with application/json body +func NewWorkloadOptimizationAPISetScalingPoliciesOrderRequest(server string, clusterId string, body WorkloadOptimizationAPISetScalingPoliciesOrderJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return nil + bodyReader = bytes.NewReader(buf) + return NewWorkloadOptimizationAPISetScalingPoliciesOrderRequestWithBody(server, clusterId, "application/json", bodyReader) } -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} +// NewWorkloadOptimizationAPISetScalingPoliciesOrderRequestWithBody generates requests for WorkloadOptimizationAPISetScalingPoliciesOrder with any type of body +func NewWorkloadOptimizationAPISetScalingPoliciesOrderRequestWithBody(server string, clusterId string, contentType string, body io.Reader) (*http.Request, error) { + var err error -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } -} -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - ClientInterface - // CommitmentsAPIBatchDeleteCommitments request with any body - CommitmentsAPIBatchDeleteCommitmentsWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*CommitmentsAPIBatchDeleteCommitmentsResponse, error) - - CommitmentsAPIBatchDeleteCommitmentsWithResponse(ctx context.Context, organizationId string, body CommitmentsAPIBatchDeleteCommitmentsJSONRequestBody) (*CommitmentsAPIBatchDeleteCommitmentsResponse, error) - - // CommitmentsAPIBatchUpdateCommitments request with any body - CommitmentsAPIBatchUpdateCommitmentsWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*CommitmentsAPIBatchUpdateCommitmentsResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/order", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CommitmentsAPIBatchUpdateCommitmentsWithResponse(ctx context.Context, organizationId string, body CommitmentsAPIBatchUpdateCommitmentsJSONRequestBody) (*CommitmentsAPIBatchUpdateCommitmentsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CommitmentsAPIGetCommitmentUsageHistory request - CommitmentsAPIGetCommitmentUsageHistoryWithResponse(ctx context.Context, organizationId string, commitmentId string, params *CommitmentsAPIGetCommitmentUsageHistoryParams) (*CommitmentsAPIGetCommitmentUsageHistoryResponse, error) + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } - // CommitmentsAPIGetAWSReservedInstancesImportCMD request - CommitmentsAPIGetAWSReservedInstancesImportCMDWithResponse(ctx context.Context, organizationId string, params *CommitmentsAPIGetAWSReservedInstancesImportCMDParams) (*CommitmentsAPIGetAWSReservedInstancesImportCMDResponse, error) + req.Header.Add("Content-Type", contentType) - // CommitmentsAPIGetAWSReservedInstancesImportScript request - CommitmentsAPIGetAWSReservedInstancesImportScriptWithResponse(ctx context.Context, organizationId string) (*CommitmentsAPIGetAWSReservedInstancesImportScriptResponse, error) + return req, nil +} - // CommitmentsAPIImportAWSReservedInstances request with any body - CommitmentsAPIImportAWSReservedInstancesWithBodyWithResponse(ctx context.Context, organizationId string, params *CommitmentsAPIImportAWSReservedInstancesParams, contentType string, body io.Reader) (*CommitmentsAPIImportAWSReservedInstancesResponse, error) +// NewWorkloadOptimizationAPIDeleteWorkloadScalingPolicyRequest generates requests for WorkloadOptimizationAPIDeleteWorkloadScalingPolicy +func NewWorkloadOptimizationAPIDeleteWorkloadScalingPolicyRequest(server string, clusterId string, policyId string) (*http.Request, error) { + var err error - CommitmentsAPIImportAWSReservedInstancesWithResponse(ctx context.Context, organizationId string, params *CommitmentsAPIImportAWSReservedInstancesParams, body CommitmentsAPIImportAWSReservedInstancesJSONRequestBody) (*CommitmentsAPIImportAWSReservedInstancesResponse, error) + var pathParam0 string - // AuthTokenAPIListAuthTokens request - AuthTokenAPIListAuthTokensWithResponse(ctx context.Context, params *AuthTokenAPIListAuthTokensParams) (*AuthTokenAPIListAuthTokensResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // AuthTokenAPICreateAuthToken request with any body - AuthTokenAPICreateAuthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*AuthTokenAPICreateAuthTokenResponse, error) + var pathParam1 string - AuthTokenAPICreateAuthTokenWithResponse(ctx context.Context, body AuthTokenAPICreateAuthTokenJSONRequestBody) (*AuthTokenAPICreateAuthTokenResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "policyId", runtime.ParamLocationPath, policyId) + if err != nil { + return nil, err + } - // AuthTokenAPIDeleteAuthToken request - AuthTokenAPIDeleteAuthTokenWithResponse(ctx context.Context, id string) (*AuthTokenAPIDeleteAuthTokenResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // AuthTokenAPIGetAuthToken request - AuthTokenAPIGetAuthTokenWithResponse(ctx context.Context, id string) (*AuthTokenAPIGetAuthTokenResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // AuthTokenAPIUpdateAuthToken request with any body - AuthTokenAPIUpdateAuthTokenWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*AuthTokenAPIUpdateAuthTokenResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - AuthTokenAPIUpdateAuthTokenWithResponse(ctx context.Context, id string, body AuthTokenAPIUpdateAuthTokenJSONRequestBody) (*AuthTokenAPIUpdateAuthTokenResponse, error) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - // InventoryAPIListInstanceTypeNames request - InventoryAPIListInstanceTypeNamesWithResponse(ctx context.Context, params *InventoryAPIListInstanceTypeNamesParams) (*InventoryAPIListInstanceTypeNamesResponse, error) + return req, nil +} - // UsersAPIListInvitations request - UsersAPIListInvitationsWithResponse(ctx context.Context, params *UsersAPIListInvitationsParams) (*UsersAPIListInvitationsResponse, error) +// NewWorkloadOptimizationAPIGetWorkloadScalingPolicyRequest generates requests for WorkloadOptimizationAPIGetWorkloadScalingPolicy +func NewWorkloadOptimizationAPIGetWorkloadScalingPolicyRequest(server string, clusterId string, policyId string) (*http.Request, error) { + var err error - // UsersAPICreateInvitations request with any body - UsersAPICreateInvitationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*UsersAPICreateInvitationsResponse, error) + var pathParam0 string - UsersAPICreateInvitationsWithResponse(ctx context.Context, body UsersAPICreateInvitationsJSONRequestBody) (*UsersAPICreateInvitationsResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // UsersAPIDeleteInvitation request - UsersAPIDeleteInvitationWithResponse(ctx context.Context, id string) (*UsersAPIDeleteInvitationResponse, error) + var pathParam1 string - // UsersAPIClaimInvitation request with any body - UsersAPIClaimInvitationWithBodyWithResponse(ctx context.Context, invitationId string, contentType string, body io.Reader) (*UsersAPIClaimInvitationResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "policyId", runtime.ParamLocationPath, policyId) + if err != nil { + return nil, err + } - UsersAPIClaimInvitationWithResponse(ctx context.Context, invitationId string, body UsersAPIClaimInvitationJSONRequestBody) (*UsersAPIClaimInvitationResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // EvictorAPIGetAdvancedConfig request - EvictorAPIGetAdvancedConfigWithResponse(ctx context.Context, clusterId string) (*EvictorAPIGetAdvancedConfigResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // EvictorAPIUpsertAdvancedConfig request with any body - EvictorAPIUpsertAdvancedConfigWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*EvictorAPIUpsertAdvancedConfigResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - EvictorAPIUpsertAdvancedConfigWithResponse(ctx context.Context, clusterId string, body EvictorAPIUpsertAdvancedConfigJSONRequestBody) (*EvictorAPIUpsertAdvancedConfigResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // NodeTemplatesAPIFilterInstanceTypes request with any body - NodeTemplatesAPIFilterInstanceTypesWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*NodeTemplatesAPIFilterInstanceTypesResponse, error) + return req, nil +} - NodeTemplatesAPIFilterInstanceTypesWithResponse(ctx context.Context, clusterId string, body NodeTemplatesAPIFilterInstanceTypesJSONRequestBody) (*NodeTemplatesAPIFilterInstanceTypesResponse, error) +// NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequest calls the generic WorkloadOptimizationAPIUpdateWorkloadScalingPolicy builder with application/json body +func NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequest(server string, clusterId string, policyId string, body WorkloadOptimizationAPIUpdateWorkloadScalingPolicyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequestWithBody(server, clusterId, policyId, "application/json", bodyReader) +} - // NodeTemplatesAPIGenerateNodeTemplates request - NodeTemplatesAPIGenerateNodeTemplatesWithResponse(ctx context.Context, clusterId string) (*NodeTemplatesAPIGenerateNodeTemplatesResponse, error) +// NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequestWithBody generates requests for WorkloadOptimizationAPIUpdateWorkloadScalingPolicy with any type of body +func NewWorkloadOptimizationAPIUpdateWorkloadScalingPolicyRequestWithBody(server string, clusterId string, policyId string, contentType string, body io.Reader) (*http.Request, error) { + var err error - // NodeConfigurationAPIListConfigurations request - NodeConfigurationAPIListConfigurationsWithResponse(ctx context.Context, clusterId string) (*NodeConfigurationAPIListConfigurationsResponse, error) + var pathParam0 string - // NodeConfigurationAPICreateConfiguration request with any body - NodeConfigurationAPICreateConfigurationWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*NodeConfigurationAPICreateConfigurationResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - NodeConfigurationAPICreateConfigurationWithResponse(ctx context.Context, clusterId string, body NodeConfigurationAPICreateConfigurationJSONRequestBody) (*NodeConfigurationAPICreateConfigurationResponse, error) + var pathParam1 string - // NodeConfigurationAPIGetSuggestedConfiguration request - NodeConfigurationAPIGetSuggestedConfigurationWithResponse(ctx context.Context, clusterId string) (*NodeConfigurationAPIGetSuggestedConfigurationResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "policyId", runtime.ParamLocationPath, policyId) + if err != nil { + return nil, err + } - // NodeConfigurationAPIDeleteConfiguration request - NodeConfigurationAPIDeleteConfigurationWithResponse(ctx context.Context, clusterId string, id string) (*NodeConfigurationAPIDeleteConfigurationResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // NodeConfigurationAPIGetConfiguration request - NodeConfigurationAPIGetConfigurationWithResponse(ctx context.Context, clusterId string, id string) (*NodeConfigurationAPIGetConfigurationResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // NodeConfigurationAPIUpdateConfiguration request with any body - NodeConfigurationAPIUpdateConfigurationWithBodyWithResponse(ctx context.Context, clusterId string, id string, contentType string, body io.Reader) (*NodeConfigurationAPIUpdateConfigurationResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - NodeConfigurationAPIUpdateConfigurationWithResponse(ctx context.Context, clusterId string, id string, body NodeConfigurationAPIUpdateConfigurationJSONRequestBody) (*NodeConfigurationAPIUpdateConfigurationResponse, error) + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } - // NodeConfigurationAPISetDefault request - NodeConfigurationAPISetDefaultWithResponse(ctx context.Context, clusterId string, id string) (*NodeConfigurationAPISetDefaultResponse, error) + req.Header.Add("Content-Type", contentType) - // PoliciesAPIGetClusterNodeConstraints request - PoliciesAPIGetClusterNodeConstraintsWithResponse(ctx context.Context, clusterId string) (*PoliciesAPIGetClusterNodeConstraintsResponse, error) + return req, nil +} - // NodeTemplatesAPIListNodeTemplates request - NodeTemplatesAPIListNodeTemplatesWithResponse(ctx context.Context, clusterId string, params *NodeTemplatesAPIListNodeTemplatesParams) (*NodeTemplatesAPIListNodeTemplatesResponse, error) - - // NodeTemplatesAPICreateNodeTemplate request with any body - NodeTemplatesAPICreateNodeTemplateWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*NodeTemplatesAPICreateNodeTemplateResponse, error) - - NodeTemplatesAPICreateNodeTemplateWithResponse(ctx context.Context, clusterId string, body NodeTemplatesAPICreateNodeTemplateJSONRequestBody) (*NodeTemplatesAPICreateNodeTemplateResponse, error) - - // NodeTemplatesAPIDeleteNodeTemplate request - NodeTemplatesAPIDeleteNodeTemplateWithResponse(ctx context.Context, clusterId string, nodeTemplateName string) (*NodeTemplatesAPIDeleteNodeTemplateResponse, error) +// NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequest calls the generic WorkloadOptimizationAPIAssignScalingPolicyWorkloads builder with application/json body +func NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequest(server string, clusterId string, policyId string, body WorkloadOptimizationAPIAssignScalingPolicyWorkloadsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequestWithBody(server, clusterId, policyId, "application/json", bodyReader) +} - // NodeTemplatesAPIUpdateNodeTemplate request with any body - NodeTemplatesAPIUpdateNodeTemplateWithBodyWithResponse(ctx context.Context, clusterId string, nodeTemplateName string, contentType string, body io.Reader) (*NodeTemplatesAPIUpdateNodeTemplateResponse, error) +// NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequestWithBody generates requests for WorkloadOptimizationAPIAssignScalingPolicyWorkloads with any type of body +func NewWorkloadOptimizationAPIAssignScalingPolicyWorkloadsRequestWithBody(server string, clusterId string, policyId string, contentType string, body io.Reader) (*http.Request, error) { + var err error - NodeTemplatesAPIUpdateNodeTemplateWithResponse(ctx context.Context, clusterId string, nodeTemplateName string, body NodeTemplatesAPIUpdateNodeTemplateJSONRequestBody) (*NodeTemplatesAPIUpdateNodeTemplateResponse, error) + var pathParam0 string - // PoliciesAPIGetClusterPolicies request - PoliciesAPIGetClusterPoliciesWithResponse(ctx context.Context, clusterId string) (*PoliciesAPIGetClusterPoliciesResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // PoliciesAPIUpsertClusterPolicies request with any body - PoliciesAPIUpsertClusterPoliciesWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*PoliciesAPIUpsertClusterPoliciesResponse, error) + var pathParam1 string - PoliciesAPIUpsertClusterPoliciesWithResponse(ctx context.Context, clusterId string, body PoliciesAPIUpsertClusterPoliciesJSONRequestBody) (*PoliciesAPIUpsertClusterPoliciesResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "policyId", runtime.ParamLocationPath, policyId) + if err != nil { + return nil, err + } - // ScheduledRebalancingAPIListRebalancingJobs request - ScheduledRebalancingAPIListRebalancingJobsWithResponse(ctx context.Context, clusterId string, params *ScheduledRebalancingAPIListRebalancingJobsParams) (*ScheduledRebalancingAPIListRebalancingJobsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ScheduledRebalancingAPICreateRebalancingJob request with any body - ScheduledRebalancingAPICreateRebalancingJobWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ScheduledRebalancingAPICreateRebalancingJobResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/policies/%s/workloads", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - ScheduledRebalancingAPICreateRebalancingJobWithResponse(ctx context.Context, clusterId string, body ScheduledRebalancingAPICreateRebalancingJobJSONRequestBody) (*ScheduledRebalancingAPICreateRebalancingJobResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ScheduledRebalancingAPIDeleteRebalancingJob request - ScheduledRebalancingAPIDeleteRebalancingJobWithResponse(ctx context.Context, clusterId string, id string) (*ScheduledRebalancingAPIDeleteRebalancingJobResponse, error) + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } - // ScheduledRebalancingAPIGetRebalancingJob request - ScheduledRebalancingAPIGetRebalancingJobWithResponse(ctx context.Context, clusterId string, id string) (*ScheduledRebalancingAPIGetRebalancingJobResponse, error) + req.Header.Add("Content-Type", contentType) - // ScheduledRebalancingAPIUpdateRebalancingJob request with any body - ScheduledRebalancingAPIUpdateRebalancingJobWithBodyWithResponse(ctx context.Context, clusterId string, id string, contentType string, body io.Reader) (*ScheduledRebalancingAPIUpdateRebalancingJobResponse, error) + return req, nil +} - ScheduledRebalancingAPIUpdateRebalancingJobWithResponse(ctx context.Context, clusterId string, id string, body ScheduledRebalancingAPIUpdateRebalancingJobJSONRequestBody) (*ScheduledRebalancingAPIUpdateRebalancingJobResponse, error) +// NewWorkloadOptimizationAPIListResourceQuotasRequest generates requests for WorkloadOptimizationAPIListResourceQuotas +func NewWorkloadOptimizationAPIListResourceQuotasRequest(server string, clusterId string) (*http.Request, error) { + var err error - // ScheduledRebalancingAPIPreviewRebalancingSchedule request with any body - ScheduledRebalancingAPIPreviewRebalancingScheduleWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ScheduledRebalancingAPIPreviewRebalancingScheduleResponse, error) + var pathParam0 string - ScheduledRebalancingAPIPreviewRebalancingScheduleWithResponse(ctx context.Context, clusterId string, body ScheduledRebalancingAPIPreviewRebalancingScheduleJSONRequestBody) (*ScheduledRebalancingAPIPreviewRebalancingScheduleResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // ExternalClusterAPIListClusters request - ExternalClusterAPIListClustersWithResponse(ctx context.Context) (*ExternalClusterAPIListClustersResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ExternalClusterAPIRegisterCluster request with any body - ExternalClusterAPIRegisterClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*ExternalClusterAPIRegisterClusterResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/resource-quotas", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - ExternalClusterAPIRegisterClusterWithResponse(ctx context.Context, body ExternalClusterAPIRegisterClusterJSONRequestBody) (*ExternalClusterAPIRegisterClusterResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ExternalClusterAPIGetListNodesFilters request - ExternalClusterAPIGetListNodesFiltersWithResponse(ctx context.Context) (*ExternalClusterAPIGetListNodesFiltersResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // OperationsAPIGetOperation request - OperationsAPIGetOperationWithResponse(ctx context.Context, id string) (*OperationsAPIGetOperationResponse, error) + return req, nil +} - // ExternalClusterAPIDeleteCluster request - ExternalClusterAPIDeleteClusterWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIDeleteClusterResponse, error) +// NewWorkloadOptimizationAPIListWorkloadEventsRequest generates requests for WorkloadOptimizationAPIListWorkloadEvents +func NewWorkloadOptimizationAPIListWorkloadEventsRequest(server string, clusterId string, params *WorkloadOptimizationAPIListWorkloadEventsParams) (*http.Request, error) { + var err error - // ExternalClusterAPIGetCluster request - ExternalClusterAPIGetClusterWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIGetClusterResponse, error) + var pathParam0 string - // ExternalClusterAPIUpdateCluster request with any body - ExternalClusterAPIUpdateClusterWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIUpdateClusterResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - ExternalClusterAPIUpdateClusterWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIUpdateClusterJSONRequestBody) (*ExternalClusterAPIUpdateClusterResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ExternalClusterAPIDeleteAssumeRolePrincipal request - ExternalClusterAPIDeleteAssumeRolePrincipalWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIDeleteAssumeRolePrincipalResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workload-events", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ExternalClusterAPIGetAssumeRolePrincipal request - ExternalClusterAPIGetAssumeRolePrincipalWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIGetAssumeRolePrincipalResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ExternalClusterAPICreateAssumeRolePrincipal request - ExternalClusterAPICreateAssumeRolePrincipalWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPICreateAssumeRolePrincipalResponse, error) + if params != nil { + queryValues := queryURL.Query() - // ExternalClusterAPIGetAssumeRoleUser request - ExternalClusterAPIGetAssumeRoleUserWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIGetAssumeRoleUserResponse, error) + if params.PageLimit != nil { - // ExternalClusterAPIGetCleanupScript request - ExternalClusterAPIGetCleanupScriptWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIGetCleanupScriptResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.limit", runtime.ParamLocationQuery, *params.PageLimit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ExternalClusterAPIGetCredentialsScript request - ExternalClusterAPIGetCredentialsScriptWithResponse(ctx context.Context, clusterId string, params *ExternalClusterAPIGetCredentialsScriptParams) (*ExternalClusterAPIGetCredentialsScriptResponse, error) + } - // ExternalClusterAPIDisconnectCluster request with any body - ExternalClusterAPIDisconnectClusterWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIDisconnectClusterResponse, error) + if params.PageCursor != nil { - ExternalClusterAPIDisconnectClusterWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIDisconnectClusterJSONRequestBody) (*ExternalClusterAPIDisconnectClusterResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page.cursor", runtime.ParamLocationQuery, *params.PageCursor); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ExternalClusterAPIHandleCloudEvent request with any body - ExternalClusterAPIHandleCloudEventWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIHandleCloudEventResponse, error) + } - ExternalClusterAPIHandleCloudEventWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIHandleCloudEventJSONRequestBody) (*ExternalClusterAPIHandleCloudEventResponse, error) + if params.FromDate != nil { - // ExternalClusterAPIGCPCreateSA request with any body - ExternalClusterAPIGCPCreateSAWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIGCPCreateSAResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fromDate", runtime.ParamLocationQuery, *params.FromDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - ExternalClusterAPIGCPCreateSAWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIGCPCreateSAJSONRequestBody) (*ExternalClusterAPIGCPCreateSAResponse, error) + } - // ExternalClusterAPIDisableGCPSA request - ExternalClusterAPIDisableGCPSAWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIDisableGCPSAResponse, error) + if params.ToDate != nil { - // ExternalClusterAPIGKECreateSA request with any body - ExternalClusterAPIGKECreateSAWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIGKECreateSAResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "toDate", runtime.ParamLocationQuery, *params.ToDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - ExternalClusterAPIGKECreateSAWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIGKECreateSAJSONRequestBody) (*ExternalClusterAPIGKECreateSAResponse, error) + } - // ExternalClusterAPIDisableGKESA request - ExternalClusterAPIDisableGKESAWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIDisableGKESAResponse, error) + if params.WorkloadId != nil { - // ExternalClusterAPITriggerHibernateCluster request - ExternalClusterAPITriggerHibernateClusterWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPITriggerHibernateClusterResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workloadId", runtime.ParamLocationQuery, *params.WorkloadId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ExternalClusterAPIListNodes request - ExternalClusterAPIListNodesWithResponse(ctx context.Context, clusterId string, params *ExternalClusterAPIListNodesParams) (*ExternalClusterAPIListNodesResponse, error) + } - // ExternalClusterAPIAddNode request with any body - ExternalClusterAPIAddNodeWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIAddNodeResponse, error) + if params.WorkloadName != nil { - ExternalClusterAPIAddNodeWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIAddNodeJSONRequestBody) (*ExternalClusterAPIAddNodeResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workloadName", runtime.ParamLocationQuery, *params.WorkloadName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ExternalClusterAPIDeleteNode request - ExternalClusterAPIDeleteNodeWithResponse(ctx context.Context, clusterId string, nodeId string, params *ExternalClusterAPIDeleteNodeParams) (*ExternalClusterAPIDeleteNodeResponse, error) + } - // ExternalClusterAPIGetNode request - ExternalClusterAPIGetNodeWithResponse(ctx context.Context, clusterId string, nodeId string) (*ExternalClusterAPIGetNodeResponse, error) + if params.WorkloadNamespace != nil { - // ExternalClusterAPIDrainNode request with any body - ExternalClusterAPIDrainNodeWithBodyWithResponse(ctx context.Context, clusterId string, nodeId string, contentType string, body io.Reader) (*ExternalClusterAPIDrainNodeResponse, error) - - ExternalClusterAPIDrainNodeWithResponse(ctx context.Context, clusterId string, nodeId string, body ExternalClusterAPIDrainNodeJSONRequestBody) (*ExternalClusterAPIDrainNodeResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workloadNamespace", runtime.ParamLocationQuery, *params.WorkloadNamespace); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ExternalClusterAPIReconcileCluster request - ExternalClusterAPIReconcileClusterWithResponse(ctx context.Context, clusterId string, params *ExternalClusterAPIReconcileClusterParams) (*ExternalClusterAPIReconcileClusterResponse, error) + } - // ExternalClusterAPITriggerResumeCluster request with any body - ExternalClusterAPITriggerResumeClusterWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPITriggerResumeClusterResponse, error) + if params.WorkloadKind != nil { - ExternalClusterAPITriggerResumeClusterWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPITriggerResumeClusterJSONRequestBody) (*ExternalClusterAPITriggerResumeClusterResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "workloadKind", runtime.ParamLocationQuery, *params.WorkloadKind); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ExternalClusterAPIUpdateClusterTags request with any body - ExternalClusterAPIUpdateClusterTagsWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIUpdateClusterTagsResponse, error) + } - ExternalClusterAPIUpdateClusterTagsWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIUpdateClusterTagsJSONRequestBody) (*ExternalClusterAPIUpdateClusterTagsResponse, error) + if params.Type != nil { - // ExternalClusterAPICreateClusterToken request - ExternalClusterAPICreateClusterTokenWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPICreateClusterTokenResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // NodeConfigurationAPIListMaxPodsPresets request - NodeConfigurationAPIListMaxPodsPresetsWithResponse(ctx context.Context) (*NodeConfigurationAPIListMaxPodsPresetsResponse, error) + } - // UsersAPICurrentUserProfile request - UsersAPICurrentUserProfileWithResponse(ctx context.Context) (*UsersAPICurrentUserProfileResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // UsersAPIUpdateCurrentUserProfile request with any body - UsersAPIUpdateCurrentUserProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*UsersAPIUpdateCurrentUserProfileResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - UsersAPIUpdateCurrentUserProfileWithResponse(ctx context.Context, body UsersAPIUpdateCurrentUserProfileJSONRequestBody) (*UsersAPIUpdateCurrentUserProfileResponse, error) + return req, nil +} - // UsersAPIListOrganizations request - UsersAPIListOrganizationsWithResponse(ctx context.Context) (*UsersAPIListOrganizationsResponse, error) +// NewWorkloadOptimizationAPIGetWorkloadEventRequest generates requests for WorkloadOptimizationAPIGetWorkloadEvent +func NewWorkloadOptimizationAPIGetWorkloadEventRequest(server string, clusterId string, eventId string, params *WorkloadOptimizationAPIGetWorkloadEventParams) (*http.Request, error) { + var err error - // UsersAPICreateOrganization request with any body - UsersAPICreateOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*UsersAPICreateOrganizationResponse, error) + var pathParam0 string - UsersAPICreateOrganizationWithResponse(ctx context.Context, body UsersAPICreateOrganizationJSONRequestBody) (*UsersAPICreateOrganizationResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // InventoryAPIGetOrganizationReservationsBalance request - InventoryAPIGetOrganizationReservationsBalanceWithResponse(ctx context.Context) (*InventoryAPIGetOrganizationReservationsBalanceResponse, error) + var pathParam1 string - // InventoryAPIGetOrganizationResourceUsage request - InventoryAPIGetOrganizationResourceUsageWithResponse(ctx context.Context) (*InventoryAPIGetOrganizationResourceUsageResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "eventId", runtime.ParamLocationPath, eventId) + if err != nil { + return nil, err + } - // UsersAPIDeleteOrganization request - UsersAPIDeleteOrganizationWithResponse(ctx context.Context, id string) (*UsersAPIDeleteOrganizationResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // UsersAPIGetOrganization request - UsersAPIGetOrganizationWithResponse(ctx context.Context, id string) (*UsersAPIGetOrganizationResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workload-events/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // UsersAPIEditOrganization request with any body - UsersAPIEditOrganizationWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*UsersAPIEditOrganizationResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - UsersAPIEditOrganizationWithResponse(ctx context.Context, id string, body UsersAPIEditOrganizationJSONRequestBody) (*UsersAPIEditOrganizationResponse, error) + if params != nil { + queryValues := queryURL.Query() - // InventoryAPISyncClusterResources request - InventoryAPISyncClusterResourcesWithResponse(ctx context.Context, organizationId string, clusterId string) (*InventoryAPISyncClusterResourcesResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "createdAt", runtime.ParamLocationQuery, params.CreatedAt); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // RbacServiceAPICreateGroup request with any body - RbacServiceAPICreateGroupWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*RbacServiceAPICreateGroupResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - RbacServiceAPICreateGroupWithResponse(ctx context.Context, organizationId string, body RbacServiceAPICreateGroupJSONRequestBody) (*RbacServiceAPICreateGroupResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // RbacServiceAPIUpdateGroup request with any body - RbacServiceAPIUpdateGroupWithBodyWithResponse(ctx context.Context, organizationId string, groupId string, contentType string, body io.Reader) (*RbacServiceAPIUpdateGroupResponse, error) + return req, nil +} - RbacServiceAPIUpdateGroupWithResponse(ctx context.Context, organizationId string, groupId string, body RbacServiceAPIUpdateGroupJSONRequestBody) (*RbacServiceAPIUpdateGroupResponse, error) +// NewWorkloadOptimizationAPIListWorkloadsRequest generates requests for WorkloadOptimizationAPIListWorkloads +func NewWorkloadOptimizationAPIListWorkloadsRequest(server string, clusterId string) (*http.Request, error) { + var err error - // RbacServiceAPIDeleteGroup request - RbacServiceAPIDeleteGroupWithResponse(ctx context.Context, organizationId string, id string) (*RbacServiceAPIDeleteGroupResponse, error) + var pathParam0 string - // RbacServiceAPIGetGroup request - RbacServiceAPIGetGroupWithResponse(ctx context.Context, organizationId string, id string) (*RbacServiceAPIGetGroupResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // InventoryAPIGetReservations request - InventoryAPIGetReservationsWithResponse(ctx context.Context, organizationId string) (*InventoryAPIGetReservationsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // InventoryAPIAddReservation request with any body - InventoryAPIAddReservationWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*InventoryAPIAddReservationResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workloads", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - InventoryAPIAddReservationWithResponse(ctx context.Context, organizationId string, body InventoryAPIAddReservationJSONRequestBody) (*InventoryAPIAddReservationResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // InventoryAPIGetReservationsBalance request - InventoryAPIGetReservationsBalanceWithResponse(ctx context.Context, organizationId string) (*InventoryAPIGetReservationsBalanceResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // InventoryAPIOverwriteReservations request with any body - InventoryAPIOverwriteReservationsWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*InventoryAPIOverwriteReservationsResponse, error) + return req, nil +} - InventoryAPIOverwriteReservationsWithResponse(ctx context.Context, organizationId string, body InventoryAPIOverwriteReservationsJSONRequestBody) (*InventoryAPIOverwriteReservationsResponse, error) +// NewWorkloadOptimizationAPIGetWorkloadsSummaryRequest generates requests for WorkloadOptimizationAPIGetWorkloadsSummary +func NewWorkloadOptimizationAPIGetWorkloadsSummaryRequest(server string, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryParams) (*http.Request, error) { + var err error - // InventoryAPIDeleteReservation request - InventoryAPIDeleteReservationWithResponse(ctx context.Context, organizationId string, reservationId string) (*InventoryAPIDeleteReservationResponse, error) + var pathParam0 string - // RbacServiceAPIListRoleBindings request - RbacServiceAPIListRoleBindingsWithResponse(ctx context.Context, organizationId string, params *RbacServiceAPIListRoleBindingsParams) (*RbacServiceAPIListRoleBindingsResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // RbacServiceAPICreateRoleBindings request with any body - RbacServiceAPICreateRoleBindingsWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*RbacServiceAPICreateRoleBindingsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - RbacServiceAPICreateRoleBindingsWithResponse(ctx context.Context, organizationId string, body RbacServiceAPICreateRoleBindingsJSONRequestBody) (*RbacServiceAPICreateRoleBindingsResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workloads-summary", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // RbacServiceAPIDeleteRoleBinding request - RbacServiceAPIDeleteRoleBindingWithResponse(ctx context.Context, organizationId string, id string) (*RbacServiceAPIDeleteRoleBindingResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // RbacServiceAPIGetRoleBinding request - RbacServiceAPIGetRoleBindingWithResponse(ctx context.Context, organizationId string, id string) (*RbacServiceAPIGetRoleBindingResponse, error) + if params != nil { + queryValues := queryURL.Query() - // RbacServiceAPIUpdateRoleBinding request with any body - RbacServiceAPIUpdateRoleBindingWithBodyWithResponse(ctx context.Context, organizationId string, roleBindingId string, contentType string, body io.Reader) (*RbacServiceAPIUpdateRoleBindingResponse, error) + if params.IncludeCosts != nil { - RbacServiceAPIUpdateRoleBindingWithResponse(ctx context.Context, organizationId string, roleBindingId string, body RbacServiceAPIUpdateRoleBindingJSONRequestBody) (*RbacServiceAPIUpdateRoleBindingResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeCosts", runtime.ParamLocationQuery, *params.IncludeCosts); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // RbacServiceAPIListRoles request - RbacServiceAPIListRolesWithResponse(ctx context.Context, organizationId string, params *RbacServiceAPIListRolesParams) (*RbacServiceAPIListRolesResponse, error) + } - // ServiceAccountsAPIDeleteServiceAccounts request - ServiceAccountsAPIDeleteServiceAccountsWithResponse(ctx context.Context, organizationId string, params *ServiceAccountsAPIDeleteServiceAccountsParams) (*ServiceAccountsAPIDeleteServiceAccountsResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // ServiceAccountsAPIListServiceAccounts request - ServiceAccountsAPIListServiceAccountsWithResponse(ctx context.Context, organizationId string, params *ServiceAccountsAPIListServiceAccountsParams) (*ServiceAccountsAPIListServiceAccountsResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // ServiceAccountsAPICreateServiceAccount request with any body - ServiceAccountsAPICreateServiceAccountWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*ServiceAccountsAPICreateServiceAccountResponse, error) + return req, nil +} - ServiceAccountsAPICreateServiceAccountWithResponse(ctx context.Context, organizationId string, body ServiceAccountsAPICreateServiceAccountJSONRequestBody) (*ServiceAccountsAPICreateServiceAccountResponse, error) +// NewWorkloadOptimizationAPIGetWorkloadsSummaryMetricsRequest generates requests for WorkloadOptimizationAPIGetWorkloadsSummaryMetrics +func NewWorkloadOptimizationAPIGetWorkloadsSummaryMetricsRequest(server string, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryMetricsParams) (*http.Request, error) { + var err error - // ServiceAccountsAPIDeleteServiceAccount request - ServiceAccountsAPIDeleteServiceAccountWithResponse(ctx context.Context, organizationId string, serviceAccountId string) (*ServiceAccountsAPIDeleteServiceAccountResponse, error) + var pathParam0 string - // ServiceAccountsAPIGetServiceAccount request - ServiceAccountsAPIGetServiceAccountWithResponse(ctx context.Context, organizationId string, serviceAccountId string) (*ServiceAccountsAPIGetServiceAccountResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // ServiceAccountsAPIUpdateServiceAccount request with any body - ServiceAccountsAPIUpdateServiceAccountWithBodyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, contentType string, body io.Reader) (*ServiceAccountsAPIUpdateServiceAccountResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - ServiceAccountsAPIUpdateServiceAccountWithResponse(ctx context.Context, organizationId string, serviceAccountId string, body ServiceAccountsAPIUpdateServiceAccountJSONRequestBody) (*ServiceAccountsAPIUpdateServiceAccountResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workloads-summary-metrics", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ServiceAccountsAPICreateServiceAccountKey request with any body - ServiceAccountsAPICreateServiceAccountKeyWithBodyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, contentType string, body io.Reader) (*ServiceAccountsAPICreateServiceAccountKeyResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - ServiceAccountsAPICreateServiceAccountKeyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, body ServiceAccountsAPICreateServiceAccountKeyJSONRequestBody) (*ServiceAccountsAPICreateServiceAccountKeyResponse, error) + if params != nil { + queryValues := queryURL.Query() - // ServiceAccountsAPIUpdateServiceAccountKey request with any body - ServiceAccountsAPIUpdateServiceAccountKeyWithBodyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, keyId string, contentType string, body io.Reader) (*ServiceAccountsAPIUpdateServiceAccountKeyResponse, error) + if params.FromTime != nil { - ServiceAccountsAPIUpdateServiceAccountKeyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, keyId string, body ServiceAccountsAPIUpdateServiceAccountKeyJSONRequestBody) (*ServiceAccountsAPIUpdateServiceAccountKeyResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fromTime", runtime.ParamLocationQuery, *params.FromTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ServiceAccountsAPIDeleteServiceAccountKey request - ServiceAccountsAPIDeleteServiceAccountKeyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, keyId string) (*ServiceAccountsAPIDeleteServiceAccountKeyResponse, error) + } - // ServiceAccountsAPIGetServiceAccountKey request - ServiceAccountsAPIGetServiceAccountKeyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, keyId string) (*ServiceAccountsAPIGetServiceAccountKeyResponse, error) + if params.ToTime != nil { - // UsersAPIRemoveOrganizationUsers request - UsersAPIRemoveOrganizationUsersWithResponse(ctx context.Context, organizationId string, params *UsersAPIRemoveOrganizationUsersParams) (*UsersAPIRemoveOrganizationUsersResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "toTime", runtime.ParamLocationQuery, *params.ToTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // UsersAPIListOrganizationUsers request - UsersAPIListOrganizationUsersWithResponse(ctx context.Context, organizationId string, params *UsersAPIListOrganizationUsersParams) (*UsersAPIListOrganizationUsersResponse, error) + } - // UsersAPIAddUserToOrganization request with any body - UsersAPIAddUserToOrganizationWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*UsersAPIAddUserToOrganizationResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - UsersAPIAddUserToOrganizationWithResponse(ctx context.Context, organizationId string, body UsersAPIAddUserToOrganizationJSONRequestBody) (*UsersAPIAddUserToOrganizationResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // UsersAPIRemoveUserFromOrganization request - UsersAPIRemoveUserFromOrganizationWithResponse(ctx context.Context, organizationId string, userId string) (*UsersAPIRemoveUserFromOrganizationResponse, error) + return req, nil +} - // UsersAPIUpdateOrganizationUser request with any body - UsersAPIUpdateOrganizationUserWithBodyWithResponse(ctx context.Context, organizationId string, userId string, contentType string, body io.Reader) (*UsersAPIUpdateOrganizationUserResponse, error) +// NewWorkloadOptimizationAPIGetWorkloadRequest generates requests for WorkloadOptimizationAPIGetWorkload +func NewWorkloadOptimizationAPIGetWorkloadRequest(server string, clusterId string, workloadId string, params *WorkloadOptimizationAPIGetWorkloadParams) (*http.Request, error) { + var err error - UsersAPIUpdateOrganizationUserWithResponse(ctx context.Context, organizationId string, userId string, body UsersAPIUpdateOrganizationUserJSONRequestBody) (*UsersAPIUpdateOrganizationUserResponse, error) + var pathParam0 string - // UsersAPIListUserGroups request - UsersAPIListUserGroupsWithResponse(ctx context.Context, organizationId string, userId string) (*UsersAPIListUserGroupsResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // ScheduledRebalancingAPIListRebalancingSchedules request - ScheduledRebalancingAPIListRebalancingSchedulesWithResponse(ctx context.Context) (*ScheduledRebalancingAPIListRebalancingSchedulesResponse, error) + var pathParam1 string - // ScheduledRebalancingAPICreateRebalancingSchedule request with any body - ScheduledRebalancingAPICreateRebalancingScheduleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*ScheduledRebalancingAPICreateRebalancingScheduleResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workloadId", runtime.ParamLocationPath, workloadId) + if err != nil { + return nil, err + } - ScheduledRebalancingAPICreateRebalancingScheduleWithResponse(ctx context.Context, body ScheduledRebalancingAPICreateRebalancingScheduleJSONRequestBody) (*ScheduledRebalancingAPICreateRebalancingScheduleResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ScheduledRebalancingAPIUpdateRebalancingSchedule request with any body - ScheduledRebalancingAPIUpdateRebalancingScheduleWithBodyWithResponse(ctx context.Context, params *ScheduledRebalancingAPIUpdateRebalancingScheduleParams, contentType string, body io.Reader) (*ScheduledRebalancingAPIUpdateRebalancingScheduleResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/clusters/%s/workloads/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - ScheduledRebalancingAPIUpdateRebalancingScheduleWithResponse(ctx context.Context, params *ScheduledRebalancingAPIUpdateRebalancingScheduleParams, body ScheduledRebalancingAPIUpdateRebalancingScheduleJSONRequestBody) (*ScheduledRebalancingAPIUpdateRebalancingScheduleResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ScheduledRebalancingAPIDeleteRebalancingSchedule request - ScheduledRebalancingAPIDeleteRebalancingScheduleWithResponse(ctx context.Context, id string) (*ScheduledRebalancingAPIDeleteRebalancingScheduleResponse, error) + if params != nil { + queryValues := queryURL.Query() - // ScheduledRebalancingAPIGetRebalancingSchedule request - ScheduledRebalancingAPIGetRebalancingScheduleWithResponse(ctx context.Context, id string) (*ScheduledRebalancingAPIGetRebalancingScheduleResponse, error) + if params.IncludeMetrics != nil { - // InventoryAPIListRegions request - InventoryAPIListRegionsWithResponse(ctx context.Context, params *InventoryAPIListRegionsParams) (*InventoryAPIListRegionsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeMetrics", runtime.ParamLocationQuery, *params.IncludeMetrics); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // CommitmentsAPIGetCommitmentsAssignments request - CommitmentsAPIGetCommitmentsAssignmentsWithResponse(ctx context.Context) (*CommitmentsAPIGetCommitmentsAssignmentsResponse, error) + } - // CommitmentsAPICreateCommitmentAssignment request - CommitmentsAPICreateCommitmentAssignmentWithResponse(ctx context.Context, params *CommitmentsAPICreateCommitmentAssignmentParams) (*CommitmentsAPICreateCommitmentAssignmentResponse, error) + if params.FromTime != nil { - // CommitmentsAPIDeleteCommitmentAssignment request - CommitmentsAPIDeleteCommitmentAssignmentWithResponse(ctx context.Context, assignmentId string) (*CommitmentsAPIDeleteCommitmentAssignmentResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "fromTime", runtime.ParamLocationQuery, *params.FromTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // CommitmentsAPIGetCommitments request - CommitmentsAPIGetCommitmentsWithResponse(ctx context.Context, params *CommitmentsAPIGetCommitmentsParams) (*CommitmentsAPIGetCommitmentsResponse, error) + } - // CommitmentsAPIGetCommitmentsDiscountedPrices request - CommitmentsAPIGetCommitmentsDiscountedPricesWithResponse(ctx context.Context, params *CommitmentsAPIGetCommitmentsDiscountedPricesParams) (*CommitmentsAPIGetCommitmentsDiscountedPricesResponse, error) + if params.ToTime != nil { - // CommitmentsAPIImportAzureReservations request with any body - CommitmentsAPIImportAzureReservationsWithBodyWithResponse(ctx context.Context, params *CommitmentsAPIImportAzureReservationsParams, contentType string, body io.Reader) (*CommitmentsAPIImportAzureReservationsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "toTime", runtime.ParamLocationQuery, *params.ToTime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - CommitmentsAPIImportAzureReservationsWithResponse(ctx context.Context, params *CommitmentsAPIImportAzureReservationsParams, body CommitmentsAPIImportAzureReservationsJSONRequestBody) (*CommitmentsAPIImportAzureReservationsResponse, error) + } - // CommitmentsAPIImportGCPCommitments request with any body - CommitmentsAPIImportGCPCommitmentsWithBodyWithResponse(ctx context.Context, params *CommitmentsAPIImportGCPCommitmentsParams, contentType string, body io.Reader) (*CommitmentsAPIImportGCPCommitmentsResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - CommitmentsAPIImportGCPCommitmentsWithResponse(ctx context.Context, params *CommitmentsAPIImportGCPCommitmentsParams, body CommitmentsAPIImportGCPCommitmentsJSONRequestBody) (*CommitmentsAPIImportGCPCommitmentsResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // CommitmentsAPIGetGCPCommitmentsImportScript request - CommitmentsAPIGetGCPCommitmentsImportScriptWithResponse(ctx context.Context, params *CommitmentsAPIGetGCPCommitmentsImportScriptParams) (*CommitmentsAPIGetGCPCommitmentsImportScriptResponse, error) + return req, nil +} - // CommitmentsAPIDeleteCommitment request - CommitmentsAPIDeleteCommitmentWithResponse(ctx context.Context, commitmentId string) (*CommitmentsAPIDeleteCommitmentResponse, error) +// NewWorkloadOptimizationAPIGetInstallCmdRequest generates requests for WorkloadOptimizationAPIGetInstallCmd +func NewWorkloadOptimizationAPIGetInstallCmdRequest(server string, params *WorkloadOptimizationAPIGetInstallCmdParams) (*http.Request, error) { + var err error - // CommitmentsAPIGetCommitment request - CommitmentsAPIGetCommitmentWithResponse(ctx context.Context, commitmentId string, params *CommitmentsAPIGetCommitmentParams) (*CommitmentsAPIGetCommitmentResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CommitmentsAPIUpdateCommitment request with any body - CommitmentsAPIUpdateCommitmentWithBodyWithResponse(ctx context.Context, commitmentId string, contentType string, body io.Reader) (*CommitmentsAPIUpdateCommitmentResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/scripts/workload-autoscaler-install") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CommitmentsAPIUpdateCommitmentWithResponse(ctx context.Context, commitmentId string, body CommitmentsAPIUpdateCommitmentJSONRequestBody) (*CommitmentsAPIUpdateCommitmentResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CommitmentsAPIGetCommitmentAssignments request - CommitmentsAPIGetCommitmentAssignmentsWithResponse(ctx context.Context, commitmentId string) (*CommitmentsAPIGetCommitmentAssignmentsResponse, error) + if params != nil { + queryValues := queryURL.Query() - // CommitmentsAPIReplaceCommitmentAssignments request with any body - CommitmentsAPIReplaceCommitmentAssignmentsWithBodyWithResponse(ctx context.Context, commitmentId string, contentType string, body io.Reader) (*CommitmentsAPIReplaceCommitmentAssignmentsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clusterId", runtime.ParamLocationQuery, params.ClusterId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - CommitmentsAPIReplaceCommitmentAssignmentsWithResponse(ctx context.Context, commitmentId string, body CommitmentsAPIReplaceCommitmentAssignmentsJSONRequestBody) (*CommitmentsAPIReplaceCommitmentAssignmentsResponse, error) + if params.CmeDsUrl != nil { - // CommitmentsAPIGetGCPCommitmentsScriptTemplate request - CommitmentsAPIGetGCPCommitmentsScriptTemplateWithResponse(ctx context.Context) (*CommitmentsAPIGetGCPCommitmentsScriptTemplateResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cmeDsUrl", runtime.ParamLocationQuery, *params.CmeDsUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ExternalClusterAPIGetCleanupScriptTemplate request - ExternalClusterAPIGetCleanupScriptTemplateWithResponse(ctx context.Context, provider string) (*ExternalClusterAPIGetCleanupScriptTemplateResponse, error) + } - // ExternalClusterAPIGetCredentialsScriptTemplate request - ExternalClusterAPIGetCredentialsScriptTemplateWithResponse(ctx context.Context, provider string, params *ExternalClusterAPIGetCredentialsScriptTemplateParams) (*ExternalClusterAPIGetCredentialsScriptTemplateResponse, error) + if params.CmePresets != nil { - // RuntimeSecurityAPIGetAnomalies request - RuntimeSecurityAPIGetAnomaliesWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetAnomaliesParams) (*RuntimeSecurityAPIGetAnomaliesResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cmePresets", runtime.ParamLocationQuery, *params.CmePresets); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // RuntimeSecurityAPIAckAnomalies request with any body - RuntimeSecurityAPIAckAnomaliesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIAckAnomaliesResponse, error) + } - RuntimeSecurityAPIAckAnomaliesWithResponse(ctx context.Context, body RuntimeSecurityAPIAckAnomaliesJSONRequestBody) (*RuntimeSecurityAPIAckAnomaliesResponse, error) - - // RuntimeSecurityAPICloseAnomalies request with any body - RuntimeSecurityAPICloseAnomaliesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPICloseAnomaliesResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - RuntimeSecurityAPICloseAnomaliesWithResponse(ctx context.Context, body RuntimeSecurityAPICloseAnomaliesJSONRequestBody) (*RuntimeSecurityAPICloseAnomaliesResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // RuntimeSecurityAPITriggerAnomaliesWebhook request with any body - RuntimeSecurityAPITriggerAnomaliesWebhookWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPITriggerAnomaliesWebhookResponse, error) + return req, nil +} - RuntimeSecurityAPITriggerAnomaliesWebhookWithResponse(ctx context.Context, body RuntimeSecurityAPITriggerAnomaliesWebhookJSONRequestBody) (*RuntimeSecurityAPITriggerAnomaliesWebhookResponse, error) +// NewWorkloadOptimizationAPIGetInstallScriptRequest generates requests for WorkloadOptimizationAPIGetInstallScript +func NewWorkloadOptimizationAPIGetInstallScriptRequest(server string, params *WorkloadOptimizationAPIGetInstallScriptParams) (*http.Request, error) { + var err error - // RuntimeSecurityAPIGetAnomaly request - RuntimeSecurityAPIGetAnomalyWithResponse(ctx context.Context, id string) (*RuntimeSecurityAPIGetAnomalyResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // RuntimeSecurityAPIGetAnomalyEvents request - RuntimeSecurityAPIGetAnomalyEventsWithResponse(ctx context.Context, id string, params *RuntimeSecurityAPIGetAnomalyEventsParams) (*RuntimeSecurityAPIGetAnomalyEventsResponse, error) + operationPath := fmt.Sprintf("/v1/workload-autoscaling/scripts/workload-autoscaler-install.sh") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // RuntimeSecurityAPITriggerAnomalyWebhook request with any body - RuntimeSecurityAPITriggerAnomalyWebhookWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*RuntimeSecurityAPITriggerAnomalyWebhookResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - RuntimeSecurityAPITriggerAnomalyWebhookWithResponse(ctx context.Context, id string, body RuntimeSecurityAPITriggerAnomalyWebhookJSONRequestBody) (*RuntimeSecurityAPITriggerAnomalyWebhookResponse, error) + if params != nil { + queryValues := queryURL.Query() - // RuntimeSecurityAPIGetRuntimeEvents request - RuntimeSecurityAPIGetRuntimeEventsWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetRuntimeEventsParams) (*RuntimeSecurityAPIGetRuntimeEventsResponse, error) + if params.CmeDsUrl != nil { - // RuntimeSecurityAPIGetRuntimeEventGroups request - RuntimeSecurityAPIGetRuntimeEventGroupsWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetRuntimeEventGroupsParams) (*RuntimeSecurityAPIGetRuntimeEventGroupsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cmeDsUrl", runtime.ParamLocationQuery, *params.CmeDsUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // RuntimeSecurityAPIGetRuntimeEventsProcessTree request - RuntimeSecurityAPIGetRuntimeEventsProcessTreeWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetRuntimeEventsProcessTreeParams) (*RuntimeSecurityAPIGetRuntimeEventsProcessTreeResponse, error) + } - // RuntimeSecurityAPIGetLists request - RuntimeSecurityAPIGetListsWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetListsParams) (*RuntimeSecurityAPIGetListsResponse, error) + if params.CmePresets != nil { - // RuntimeSecurityAPICreateList request with any body - RuntimeSecurityAPICreateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPICreateListResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cmePresets", runtime.ParamLocationQuery, *params.CmePresets); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - RuntimeSecurityAPICreateListWithResponse(ctx context.Context, body RuntimeSecurityAPICreateListJSONRequestBody) (*RuntimeSecurityAPICreateListResponse, error) + } - // RuntimeSecurityAPIDeleteLists request with any body - RuntimeSecurityAPIDeleteListsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIDeleteListsResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - RuntimeSecurityAPIDeleteListsWithResponse(ctx context.Context, body RuntimeSecurityAPIDeleteListsJSONRequestBody) (*RuntimeSecurityAPIDeleteListsResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // RuntimeSecurityAPIGetList request - RuntimeSecurityAPIGetListWithResponse(ctx context.Context, id string) (*RuntimeSecurityAPIGetListResponse, error) + return req, nil +} - // RuntimeSecurityAPIAddListEntries request with any body - RuntimeSecurityAPIAddListEntriesWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*RuntimeSecurityAPIAddListEntriesResponse, error) +// NewInventoryAPIListZonesRequest generates requests for InventoryAPIListZones +func NewInventoryAPIListZonesRequest(server string, params *InventoryAPIListZonesParams) (*http.Request, error) { + var err error - RuntimeSecurityAPIAddListEntriesWithResponse(ctx context.Context, id string, body RuntimeSecurityAPIAddListEntriesJSONRequestBody) (*RuntimeSecurityAPIAddListEntriesResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // RuntimeSecurityAPIGetListEntries request - RuntimeSecurityAPIGetListEntriesWithResponse(ctx context.Context, id string, params *RuntimeSecurityAPIGetListEntriesParams) (*RuntimeSecurityAPIGetListEntriesResponse, error) + operationPath := fmt.Sprintf("/v1/zones") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // RuntimeSecurityAPIRemoveListEntries request with any body - RuntimeSecurityAPIRemoveListEntriesWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*RuntimeSecurityAPIRemoveListEntriesResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - RuntimeSecurityAPIRemoveListEntriesWithResponse(ctx context.Context, id string, body RuntimeSecurityAPIRemoveListEntriesJSONRequestBody) (*RuntimeSecurityAPIRemoveListEntriesResponse, error) + if params != nil { + queryValues := queryURL.Query() - // RuntimeSecurityAPIGetNetflowGraph request - RuntimeSecurityAPIGetNetflowGraphWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetNetflowGraphParams) (*RuntimeSecurityAPIGetNetflowGraphResponse, error) + if params.PageSize != nil { - // RuntimeSecurityAPIGetNetflowList request - RuntimeSecurityAPIGetNetflowListWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetNetflowListParams) (*RuntimeSecurityAPIGetNetflowListResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // RuntimeSecurityAPIGetNetflowTrend request - RuntimeSecurityAPIGetNetflowTrendWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetNetflowTrendParams) (*RuntimeSecurityAPIGetNetflowTrendResponse, error) + } - // RuntimeSecurityAPIGetAnomaliesOverview request - RuntimeSecurityAPIGetAnomaliesOverviewWithResponse(ctx context.Context) (*RuntimeSecurityAPIGetAnomaliesOverviewResponse, error) + if params.PageToken != nil { - // RuntimeSecurityAPIGetRules request - RuntimeSecurityAPIGetRulesWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetRulesParams) (*RuntimeSecurityAPIGetRulesResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageToken", runtime.ParamLocationQuery, *params.PageToken); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // RuntimeSecurityAPICreateRule request with any body - RuntimeSecurityAPICreateRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPICreateRuleResponse, error) + } - RuntimeSecurityAPICreateRuleWithResponse(ctx context.Context, body RuntimeSecurityAPICreateRuleJSONRequestBody) (*RuntimeSecurityAPICreateRuleResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // RuntimeSecurityAPIDeleteRules request with any body - RuntimeSecurityAPIDeleteRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIDeleteRulesResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - RuntimeSecurityAPIDeleteRulesWithResponse(ctx context.Context, body RuntimeSecurityAPIDeleteRulesJSONRequestBody) (*RuntimeSecurityAPIDeleteRulesResponse, error) + return req, nil +} - // RuntimeSecurityAPIToggleRules request with any body - RuntimeSecurityAPIToggleRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIToggleRulesResponse, error) +// NewWorkloadOptimizationAPIPatchWorkloadV2Request calls the generic WorkloadOptimizationAPIPatchWorkloadV2 builder with application/json body +func NewWorkloadOptimizationAPIPatchWorkloadV2Request(server string, clusterId string, workloadId string, body WorkloadOptimizationAPIPatchWorkloadV2JSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWorkloadOptimizationAPIPatchWorkloadV2RequestWithBody(server, clusterId, workloadId, "application/json", bodyReader) +} - RuntimeSecurityAPIToggleRulesWithResponse(ctx context.Context, body RuntimeSecurityAPIToggleRulesJSONRequestBody) (*RuntimeSecurityAPIToggleRulesResponse, error) +// NewWorkloadOptimizationAPIPatchWorkloadV2RequestWithBody generates requests for WorkloadOptimizationAPIPatchWorkloadV2 with any type of body +func NewWorkloadOptimizationAPIPatchWorkloadV2RequestWithBody(server string, clusterId string, workloadId string, contentType string, body io.Reader) (*http.Request, error) { + var err error - // RuntimeSecurityAPIValidate request with any body - RuntimeSecurityAPIValidateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIValidateResponse, error) + var pathParam0 string - RuntimeSecurityAPIValidateWithResponse(ctx context.Context, body RuntimeSecurityAPIValidateJSONRequestBody) (*RuntimeSecurityAPIValidateResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - // RuntimeSecurityAPIGetRule request - RuntimeSecurityAPIGetRuleWithResponse(ctx context.Context, id string) (*RuntimeSecurityAPIGetRuleResponse, error) + var pathParam1 string - // RuntimeSecurityAPIEditRule request with any body - RuntimeSecurityAPIEditRuleWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*RuntimeSecurityAPIEditRuleResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workloadId", runtime.ParamLocationPath, workloadId) + if err != nil { + return nil, err + } - RuntimeSecurityAPIEditRuleWithResponse(ctx context.Context, id string, body RuntimeSecurityAPIEditRuleJSONRequestBody) (*RuntimeSecurityAPIEditRuleResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // RuntimeSecurityAPIGetClusterWorkloadsNetflow request - RuntimeSecurityAPIGetClusterWorkloadsNetflowWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetClusterWorkloadsNetflowParams) (*RuntimeSecurityAPIGetClusterWorkloadsNetflowResponse, error) + operationPath := fmt.Sprintf("/v2/workload-autoscaling/clusters/%s/workloads/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // SSOAPIListSSOConnections request - SSOAPIListSSOConnectionsWithResponse(ctx context.Context) (*SSOAPIListSSOConnectionsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // SSOAPICreateSSOConnection request with any body - SSOAPICreateSSOConnectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SSOAPICreateSSOConnectionResponse, error) + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } - SSOAPICreateSSOConnectionWithResponse(ctx context.Context, body SSOAPICreateSSOConnectionJSONRequestBody) (*SSOAPICreateSSOConnectionResponse, error) + req.Header.Add("Content-Type", contentType) - // SSOAPIDeleteSSOConnection request - SSOAPIDeleteSSOConnectionWithResponse(ctx context.Context, id string) (*SSOAPIDeleteSSOConnectionResponse, error) + return req, nil +} - // SSOAPIGetSSOConnection request - SSOAPIGetSSOConnectionWithResponse(ctx context.Context, id string) (*SSOAPIGetSSOConnectionResponse, error) +// NewWorkloadOptimizationAPIUpdateWorkloadV2Request calls the generic WorkloadOptimizationAPIUpdateWorkloadV2 builder with application/json body +func NewWorkloadOptimizationAPIUpdateWorkloadV2Request(server string, clusterId string, workloadId string, body WorkloadOptimizationAPIUpdateWorkloadV2JSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody(server, clusterId, workloadId, "application/json", bodyReader) +} - // SSOAPIUpdateSSOConnection request with any body - SSOAPIUpdateSSOConnectionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*SSOAPIUpdateSSOConnectionResponse, error) +// NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody generates requests for WorkloadOptimizationAPIUpdateWorkloadV2 with any type of body +func NewWorkloadOptimizationAPIUpdateWorkloadV2RequestWithBody(server string, clusterId string, workloadId string, contentType string, body io.Reader) (*http.Request, error) { + var err error - SSOAPIUpdateSSOConnectionWithResponse(ctx context.Context, id string, body SSOAPIUpdateSSOConnectionJSONRequestBody) (*SSOAPIUpdateSSOConnectionResponse, error) + var pathParam0 string - // SSOAPISetSyncForSSOConnection request with any body - SSOAPISetSyncForSSOConnectionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*SSOAPISetSyncForSSOConnectionResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "clusterId", runtime.ParamLocationPath, clusterId) + if err != nil { + return nil, err + } - SSOAPISetSyncForSSOConnectionWithResponse(ctx context.Context, id string, body SSOAPISetSyncForSSOConnectionJSONRequestBody) (*SSOAPISetSyncForSSOConnectionResponse, error) + var pathParam1 string - // ScheduledRebalancingAPIListAvailableRebalancingTZ request - ScheduledRebalancingAPIListAvailableRebalancingTZWithResponse(ctx context.Context) (*ScheduledRebalancingAPIListAvailableRebalancingTZResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "workloadId", runtime.ParamLocationPath, workloadId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v2/workload-autoscaling/clusters/%s/workloads/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + ClientInterface + // CommitmentsAPIBatchDeleteCommitments request with any body + CommitmentsAPIBatchDeleteCommitmentsWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*CommitmentsAPIBatchDeleteCommitmentsResponse, error) + + CommitmentsAPIBatchDeleteCommitmentsWithResponse(ctx context.Context, organizationId string, body CommitmentsAPIBatchDeleteCommitmentsJSONRequestBody) (*CommitmentsAPIBatchDeleteCommitmentsResponse, error) + + // CommitmentsAPIBatchUpdateCommitments request with any body + CommitmentsAPIBatchUpdateCommitmentsWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*CommitmentsAPIBatchUpdateCommitmentsResponse, error) + + CommitmentsAPIBatchUpdateCommitmentsWithResponse(ctx context.Context, organizationId string, body CommitmentsAPIBatchUpdateCommitmentsJSONRequestBody) (*CommitmentsAPIBatchUpdateCommitmentsResponse, error) + + // CommitmentsAPIGetCommitmentUsageHistory request + CommitmentsAPIGetCommitmentUsageHistoryWithResponse(ctx context.Context, organizationId string, commitmentId string, params *CommitmentsAPIGetCommitmentUsageHistoryParams) (*CommitmentsAPIGetCommitmentUsageHistoryResponse, error) + + // CommitmentsAPIGetAWSReservedInstancesImportCMD request + CommitmentsAPIGetAWSReservedInstancesImportCMDWithResponse(ctx context.Context, organizationId string, params *CommitmentsAPIGetAWSReservedInstancesImportCMDParams) (*CommitmentsAPIGetAWSReservedInstancesImportCMDResponse, error) + + // CommitmentsAPIGetAWSReservedInstancesImportScript request + CommitmentsAPIGetAWSReservedInstancesImportScriptWithResponse(ctx context.Context, organizationId string) (*CommitmentsAPIGetAWSReservedInstancesImportScriptResponse, error) + + // CommitmentsAPIImportAWSReservedInstances request with any body + CommitmentsAPIImportAWSReservedInstancesWithBodyWithResponse(ctx context.Context, organizationId string, params *CommitmentsAPIImportAWSReservedInstancesParams, contentType string, body io.Reader) (*CommitmentsAPIImportAWSReservedInstancesResponse, error) + + CommitmentsAPIImportAWSReservedInstancesWithResponse(ctx context.Context, organizationId string, params *CommitmentsAPIImportAWSReservedInstancesParams, body CommitmentsAPIImportAWSReservedInstancesJSONRequestBody) (*CommitmentsAPIImportAWSReservedInstancesResponse, error) + + // AuthTokenAPIListAuthTokens request + AuthTokenAPIListAuthTokensWithResponse(ctx context.Context, params *AuthTokenAPIListAuthTokensParams) (*AuthTokenAPIListAuthTokensResponse, error) + + // AuthTokenAPICreateAuthToken request with any body + AuthTokenAPICreateAuthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*AuthTokenAPICreateAuthTokenResponse, error) + + AuthTokenAPICreateAuthTokenWithResponse(ctx context.Context, body AuthTokenAPICreateAuthTokenJSONRequestBody) (*AuthTokenAPICreateAuthTokenResponse, error) + + // AuthTokenAPIDeleteAuthToken request + AuthTokenAPIDeleteAuthTokenWithResponse(ctx context.Context, id string) (*AuthTokenAPIDeleteAuthTokenResponse, error) + + // AuthTokenAPIGetAuthToken request + AuthTokenAPIGetAuthTokenWithResponse(ctx context.Context, id string) (*AuthTokenAPIGetAuthTokenResponse, error) + + // AuthTokenAPIUpdateAuthToken request with any body + AuthTokenAPIUpdateAuthTokenWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*AuthTokenAPIUpdateAuthTokenResponse, error) + + AuthTokenAPIUpdateAuthTokenWithResponse(ctx context.Context, id string, body AuthTokenAPIUpdateAuthTokenJSONRequestBody) (*AuthTokenAPIUpdateAuthTokenResponse, error) + + // AllocationGroupAPIGetAllocationGroupCostTimedSummaries request + AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams) (*AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse, error) + + // AllocationGroupAPIGetAllocationGroupCostSummaries request + AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupCostSummariesParams) (*AllocationGroupAPIGetAllocationGroupCostSummariesResponse, error) + + // AllocationGroupAPIGetAllocationGroupTotalCostTimed request + AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupTotalCostTimedParams) (*AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse, error) + + // AllocationGroupAPIListAllocationGroups request + AllocationGroupAPIListAllocationGroupsWithResponse(ctx context.Context, params *AllocationGroupAPIListAllocationGroupsParams) (*AllocationGroupAPIListAllocationGroupsResponse, error) + + // AllocationGroupAPICreateAllocationGroup request with any body + AllocationGroupAPICreateAllocationGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*AllocationGroupAPICreateAllocationGroupResponse, error) + + AllocationGroupAPICreateAllocationGroupWithResponse(ctx context.Context, body AllocationGroupAPICreateAllocationGroupJSONRequestBody) (*AllocationGroupAPICreateAllocationGroupResponse, error) + + // AllocationGroupAPIGetCostAllocationGroupDataTransferSummary request + AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse(ctx context.Context, params *AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams) (*AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse, error) + + // AllocationGroupAPIGetAllocationGroupEfficiencySummary request + AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams) (*AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse, error) + + // AllocationGroupAPIGetCostAllocationGroupSummary request + AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse(ctx context.Context, params *AllocationGroupAPIGetCostAllocationGroupSummaryParams) (*AllocationGroupAPIGetCostAllocationGroupSummaryResponse, error) + + // AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads request + AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse(ctx context.Context, groupId string, params *AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams) (*AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse, error) + + // AllocationGroupAPIGetAllocationGroupWorkloadCosts request + AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse(ctx context.Context, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadCostsParams) (*AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse, error) + + // AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency request + AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse(ctx context.Context, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams) (*AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse, error) + + // AllocationGroupAPIGetCostAllocationGroupWorkloads request + AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse(ctx context.Context, groupId string, params *AllocationGroupAPIGetCostAllocationGroupWorkloadsParams) (*AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse, error) + + // AllocationGroupAPIDeleteAllocationGroup request + AllocationGroupAPIDeleteAllocationGroupWithResponse(ctx context.Context, id string) (*AllocationGroupAPIDeleteAllocationGroupResponse, error) + + // AllocationGroupAPIGetAllocationGroup request + AllocationGroupAPIGetAllocationGroupWithResponse(ctx context.Context, id string) (*AllocationGroupAPIGetAllocationGroupResponse, error) + + // AllocationGroupAPIUpdateAllocationGroup request with any body + AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*AllocationGroupAPIUpdateAllocationGroupResponse, error) + + AllocationGroupAPIUpdateAllocationGroupWithResponse(ctx context.Context, id string, body AllocationGroupAPIUpdateAllocationGroupJSONRequestBody) (*AllocationGroupAPIUpdateAllocationGroupResponse, error) + + // InventoryAPIListInstanceTypeNames request + InventoryAPIListInstanceTypeNamesWithResponse(ctx context.Context, params *InventoryAPIListInstanceTypeNamesParams) (*InventoryAPIListInstanceTypeNamesResponse, error) + + // UsersAPIListInvitations request + UsersAPIListInvitationsWithResponse(ctx context.Context, params *UsersAPIListInvitationsParams) (*UsersAPIListInvitationsResponse, error) + + // UsersAPICreateInvitations request with any body + UsersAPICreateInvitationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*UsersAPICreateInvitationsResponse, error) + + UsersAPICreateInvitationsWithResponse(ctx context.Context, body UsersAPICreateInvitationsJSONRequestBody) (*UsersAPICreateInvitationsResponse, error) + + // UsersAPIDeleteInvitation request + UsersAPIDeleteInvitationWithResponse(ctx context.Context, id string) (*UsersAPIDeleteInvitationResponse, error) + + // UsersAPIClaimInvitation request with any body + UsersAPIClaimInvitationWithBodyWithResponse(ctx context.Context, invitationId string, contentType string, body io.Reader) (*UsersAPIClaimInvitationResponse, error) + + UsersAPIClaimInvitationWithResponse(ctx context.Context, invitationId string, body UsersAPIClaimInvitationJSONRequestBody) (*UsersAPIClaimInvitationResponse, error) + + // EvictorAPIGetAdvancedConfig request + EvictorAPIGetAdvancedConfigWithResponse(ctx context.Context, clusterId string) (*EvictorAPIGetAdvancedConfigResponse, error) + + // EvictorAPIUpsertAdvancedConfig request with any body + EvictorAPIUpsertAdvancedConfigWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*EvictorAPIUpsertAdvancedConfigResponse, error) + + EvictorAPIUpsertAdvancedConfigWithResponse(ctx context.Context, clusterId string, body EvictorAPIUpsertAdvancedConfigJSONRequestBody) (*EvictorAPIUpsertAdvancedConfigResponse, error) + + // NodeTemplatesAPIFilterInstanceTypes request with any body + NodeTemplatesAPIFilterInstanceTypesWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*NodeTemplatesAPIFilterInstanceTypesResponse, error) + + NodeTemplatesAPIFilterInstanceTypesWithResponse(ctx context.Context, clusterId string, body NodeTemplatesAPIFilterInstanceTypesJSONRequestBody) (*NodeTemplatesAPIFilterInstanceTypesResponse, error) + + // NodeTemplatesAPIGenerateNodeTemplates request + NodeTemplatesAPIGenerateNodeTemplatesWithResponse(ctx context.Context, clusterId string) (*NodeTemplatesAPIGenerateNodeTemplatesResponse, error) + + // NodeConfigurationAPIListConfigurations request + NodeConfigurationAPIListConfigurationsWithResponse(ctx context.Context, clusterId string) (*NodeConfigurationAPIListConfigurationsResponse, error) + + // NodeConfigurationAPICreateConfiguration request with any body + NodeConfigurationAPICreateConfigurationWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*NodeConfigurationAPICreateConfigurationResponse, error) + + NodeConfigurationAPICreateConfigurationWithResponse(ctx context.Context, clusterId string, body NodeConfigurationAPICreateConfigurationJSONRequestBody) (*NodeConfigurationAPICreateConfigurationResponse, error) + + // NodeConfigurationAPIGetSuggestedConfiguration request + NodeConfigurationAPIGetSuggestedConfigurationWithResponse(ctx context.Context, clusterId string) (*NodeConfigurationAPIGetSuggestedConfigurationResponse, error) + + // NodeConfigurationAPIDeleteConfiguration request + NodeConfigurationAPIDeleteConfigurationWithResponse(ctx context.Context, clusterId string, id string) (*NodeConfigurationAPIDeleteConfigurationResponse, error) + + // NodeConfigurationAPIGetConfiguration request + NodeConfigurationAPIGetConfigurationWithResponse(ctx context.Context, clusterId string, id string) (*NodeConfigurationAPIGetConfigurationResponse, error) + + // NodeConfigurationAPIUpdateConfiguration request with any body + NodeConfigurationAPIUpdateConfigurationWithBodyWithResponse(ctx context.Context, clusterId string, id string, contentType string, body io.Reader) (*NodeConfigurationAPIUpdateConfigurationResponse, error) + + NodeConfigurationAPIUpdateConfigurationWithResponse(ctx context.Context, clusterId string, id string, body NodeConfigurationAPIUpdateConfigurationJSONRequestBody) (*NodeConfigurationAPIUpdateConfigurationResponse, error) + + // NodeConfigurationAPISetDefault request + NodeConfigurationAPISetDefaultWithResponse(ctx context.Context, clusterId string, id string) (*NodeConfigurationAPISetDefaultResponse, error) + + // PoliciesAPIGetClusterNodeConstraints request + PoliciesAPIGetClusterNodeConstraintsWithResponse(ctx context.Context, clusterId string) (*PoliciesAPIGetClusterNodeConstraintsResponse, error) + + // NodeTemplatesAPIListNodeTemplates request + NodeTemplatesAPIListNodeTemplatesWithResponse(ctx context.Context, clusterId string, params *NodeTemplatesAPIListNodeTemplatesParams) (*NodeTemplatesAPIListNodeTemplatesResponse, error) + + // NodeTemplatesAPICreateNodeTemplate request with any body + NodeTemplatesAPICreateNodeTemplateWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*NodeTemplatesAPICreateNodeTemplateResponse, error) + + NodeTemplatesAPICreateNodeTemplateWithResponse(ctx context.Context, clusterId string, body NodeTemplatesAPICreateNodeTemplateJSONRequestBody) (*NodeTemplatesAPICreateNodeTemplateResponse, error) + + // NodeTemplatesAPIDeleteNodeTemplate request + NodeTemplatesAPIDeleteNodeTemplateWithResponse(ctx context.Context, clusterId string, nodeTemplateName string) (*NodeTemplatesAPIDeleteNodeTemplateResponse, error) + + // NodeTemplatesAPIUpdateNodeTemplate request with any body + NodeTemplatesAPIUpdateNodeTemplateWithBodyWithResponse(ctx context.Context, clusterId string, nodeTemplateName string, contentType string, body io.Reader) (*NodeTemplatesAPIUpdateNodeTemplateResponse, error) + + NodeTemplatesAPIUpdateNodeTemplateWithResponse(ctx context.Context, clusterId string, nodeTemplateName string, body NodeTemplatesAPIUpdateNodeTemplateJSONRequestBody) (*NodeTemplatesAPIUpdateNodeTemplateResponse, error) + + // PoliciesAPIGetClusterPolicies request + PoliciesAPIGetClusterPoliciesWithResponse(ctx context.Context, clusterId string) (*PoliciesAPIGetClusterPoliciesResponse, error) + + // PoliciesAPIUpsertClusterPolicies request with any body + PoliciesAPIUpsertClusterPoliciesWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*PoliciesAPIUpsertClusterPoliciesResponse, error) + + PoliciesAPIUpsertClusterPoliciesWithResponse(ctx context.Context, clusterId string, body PoliciesAPIUpsertClusterPoliciesJSONRequestBody) (*PoliciesAPIUpsertClusterPoliciesResponse, error) + + // ScheduledRebalancingAPIListRebalancingJobs request + ScheduledRebalancingAPIListRebalancingJobsWithResponse(ctx context.Context, clusterId string, params *ScheduledRebalancingAPIListRebalancingJobsParams) (*ScheduledRebalancingAPIListRebalancingJobsResponse, error) + + // ScheduledRebalancingAPICreateRebalancingJob request with any body + ScheduledRebalancingAPICreateRebalancingJobWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ScheduledRebalancingAPICreateRebalancingJobResponse, error) + + ScheduledRebalancingAPICreateRebalancingJobWithResponse(ctx context.Context, clusterId string, body ScheduledRebalancingAPICreateRebalancingJobJSONRequestBody) (*ScheduledRebalancingAPICreateRebalancingJobResponse, error) + + // ScheduledRebalancingAPIDeleteRebalancingJob request + ScheduledRebalancingAPIDeleteRebalancingJobWithResponse(ctx context.Context, clusterId string, id string) (*ScheduledRebalancingAPIDeleteRebalancingJobResponse, error) + + // ScheduledRebalancingAPIGetRebalancingJob request + ScheduledRebalancingAPIGetRebalancingJobWithResponse(ctx context.Context, clusterId string, id string) (*ScheduledRebalancingAPIGetRebalancingJobResponse, error) + + // ScheduledRebalancingAPIUpdateRebalancingJob request with any body + ScheduledRebalancingAPIUpdateRebalancingJobWithBodyWithResponse(ctx context.Context, clusterId string, id string, contentType string, body io.Reader) (*ScheduledRebalancingAPIUpdateRebalancingJobResponse, error) + + ScheduledRebalancingAPIUpdateRebalancingJobWithResponse(ctx context.Context, clusterId string, id string, body ScheduledRebalancingAPIUpdateRebalancingJobJSONRequestBody) (*ScheduledRebalancingAPIUpdateRebalancingJobResponse, error) + + // ScheduledRebalancingAPIPreviewRebalancingSchedule request with any body + ScheduledRebalancingAPIPreviewRebalancingScheduleWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ScheduledRebalancingAPIPreviewRebalancingScheduleResponse, error) + + ScheduledRebalancingAPIPreviewRebalancingScheduleWithResponse(ctx context.Context, clusterId string, body ScheduledRebalancingAPIPreviewRebalancingScheduleJSONRequestBody) (*ScheduledRebalancingAPIPreviewRebalancingScheduleResponse, error) + + // ExternalClusterAPIListClusters request + ExternalClusterAPIListClustersWithResponse(ctx context.Context) (*ExternalClusterAPIListClustersResponse, error) + + // ExternalClusterAPIRegisterCluster request with any body + ExternalClusterAPIRegisterClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*ExternalClusterAPIRegisterClusterResponse, error) + + ExternalClusterAPIRegisterClusterWithResponse(ctx context.Context, body ExternalClusterAPIRegisterClusterJSONRequestBody) (*ExternalClusterAPIRegisterClusterResponse, error) + + // ExternalClusterAPIGetListNodesFilters request + ExternalClusterAPIGetListNodesFiltersWithResponse(ctx context.Context) (*ExternalClusterAPIGetListNodesFiltersResponse, error) + + // OperationsAPIGetOperation request + OperationsAPIGetOperationWithResponse(ctx context.Context, id string) (*OperationsAPIGetOperationResponse, error) + + // ExternalClusterAPIDeleteCluster request + ExternalClusterAPIDeleteClusterWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIDeleteClusterResponse, error) + + // ExternalClusterAPIGetCluster request + ExternalClusterAPIGetClusterWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIGetClusterResponse, error) + + // ExternalClusterAPIUpdateCluster request with any body + ExternalClusterAPIUpdateClusterWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIUpdateClusterResponse, error) + + ExternalClusterAPIUpdateClusterWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIUpdateClusterJSONRequestBody) (*ExternalClusterAPIUpdateClusterResponse, error) + + // ExternalClusterAPIDeleteAssumeRolePrincipal request + ExternalClusterAPIDeleteAssumeRolePrincipalWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIDeleteAssumeRolePrincipalResponse, error) + + // ExternalClusterAPIGetAssumeRolePrincipal request + ExternalClusterAPIGetAssumeRolePrincipalWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIGetAssumeRolePrincipalResponse, error) + + // ExternalClusterAPICreateAssumeRolePrincipal request + ExternalClusterAPICreateAssumeRolePrincipalWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPICreateAssumeRolePrincipalResponse, error) + + // ExternalClusterAPIGetAssumeRoleUser request + ExternalClusterAPIGetAssumeRoleUserWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIGetAssumeRoleUserResponse, error) + + // ExternalClusterAPIGetCleanupScript request + ExternalClusterAPIGetCleanupScriptWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIGetCleanupScriptResponse, error) + + // ExternalClusterAPIGetCredentialsScript request + ExternalClusterAPIGetCredentialsScriptWithResponse(ctx context.Context, clusterId string, params *ExternalClusterAPIGetCredentialsScriptParams) (*ExternalClusterAPIGetCredentialsScriptResponse, error) + + // ExternalClusterAPIDisconnectCluster request with any body + ExternalClusterAPIDisconnectClusterWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIDisconnectClusterResponse, error) + + ExternalClusterAPIDisconnectClusterWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIDisconnectClusterJSONRequestBody) (*ExternalClusterAPIDisconnectClusterResponse, error) + + // ExternalClusterAPIHandleCloudEvent request with any body + ExternalClusterAPIHandleCloudEventWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIHandleCloudEventResponse, error) + + ExternalClusterAPIHandleCloudEventWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIHandleCloudEventJSONRequestBody) (*ExternalClusterAPIHandleCloudEventResponse, error) + + // ExternalClusterAPIGCPCreateSA request with any body + ExternalClusterAPIGCPCreateSAWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIGCPCreateSAResponse, error) + + ExternalClusterAPIGCPCreateSAWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIGCPCreateSAJSONRequestBody) (*ExternalClusterAPIGCPCreateSAResponse, error) + + // ExternalClusterAPIDisableGCPSA request + ExternalClusterAPIDisableGCPSAWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIDisableGCPSAResponse, error) + + // ExternalClusterAPIGKECreateSA request with any body + ExternalClusterAPIGKECreateSAWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIGKECreateSAResponse, error) + + ExternalClusterAPIGKECreateSAWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIGKECreateSAJSONRequestBody) (*ExternalClusterAPIGKECreateSAResponse, error) + + // ExternalClusterAPIDisableGKESA request + ExternalClusterAPIDisableGKESAWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPIDisableGKESAResponse, error) + + // ExternalClusterAPITriggerHibernateCluster request + ExternalClusterAPITriggerHibernateClusterWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPITriggerHibernateClusterResponse, error) + + // ExternalClusterAPIListNodes request + ExternalClusterAPIListNodesWithResponse(ctx context.Context, clusterId string, params *ExternalClusterAPIListNodesParams) (*ExternalClusterAPIListNodesResponse, error) + + // ExternalClusterAPIAddNode request with any body + ExternalClusterAPIAddNodeWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIAddNodeResponse, error) + + ExternalClusterAPIAddNodeWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIAddNodeJSONRequestBody) (*ExternalClusterAPIAddNodeResponse, error) + + // ExternalClusterAPIDeleteNode request + ExternalClusterAPIDeleteNodeWithResponse(ctx context.Context, clusterId string, nodeId string, params *ExternalClusterAPIDeleteNodeParams) (*ExternalClusterAPIDeleteNodeResponse, error) + + // ExternalClusterAPIGetNode request + ExternalClusterAPIGetNodeWithResponse(ctx context.Context, clusterId string, nodeId string) (*ExternalClusterAPIGetNodeResponse, error) + + // ExternalClusterAPIDrainNode request with any body + ExternalClusterAPIDrainNodeWithBodyWithResponse(ctx context.Context, clusterId string, nodeId string, contentType string, body io.Reader) (*ExternalClusterAPIDrainNodeResponse, error) + + ExternalClusterAPIDrainNodeWithResponse(ctx context.Context, clusterId string, nodeId string, body ExternalClusterAPIDrainNodeJSONRequestBody) (*ExternalClusterAPIDrainNodeResponse, error) + + // ExternalClusterAPIReconcileCluster request + ExternalClusterAPIReconcileClusterWithResponse(ctx context.Context, clusterId string, params *ExternalClusterAPIReconcileClusterParams) (*ExternalClusterAPIReconcileClusterResponse, error) + + // ExternalClusterAPITriggerResumeCluster request with any body + ExternalClusterAPITriggerResumeClusterWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPITriggerResumeClusterResponse, error) + + ExternalClusterAPITriggerResumeClusterWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPITriggerResumeClusterJSONRequestBody) (*ExternalClusterAPITriggerResumeClusterResponse, error) + + // ExternalClusterAPIUpdateClusterTags request with any body + ExternalClusterAPIUpdateClusterTagsWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*ExternalClusterAPIUpdateClusterTagsResponse, error) + + ExternalClusterAPIUpdateClusterTagsWithResponse(ctx context.Context, clusterId string, body ExternalClusterAPIUpdateClusterTagsJSONRequestBody) (*ExternalClusterAPIUpdateClusterTagsResponse, error) + + // ExternalClusterAPICreateClusterToken request + ExternalClusterAPICreateClusterTokenWithResponse(ctx context.Context, clusterId string) (*ExternalClusterAPICreateClusterTokenResponse, error) + + // NodeConfigurationAPIListMaxPodsPresets request + NodeConfigurationAPIListMaxPodsPresetsWithResponse(ctx context.Context) (*NodeConfigurationAPIListMaxPodsPresetsResponse, error) + + // UsersAPICurrentUserProfile request + UsersAPICurrentUserProfileWithResponse(ctx context.Context) (*UsersAPICurrentUserProfileResponse, error) + + // UsersAPIUpdateCurrentUserProfile request with any body + UsersAPIUpdateCurrentUserProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*UsersAPIUpdateCurrentUserProfileResponse, error) + + UsersAPIUpdateCurrentUserProfileWithResponse(ctx context.Context, body UsersAPIUpdateCurrentUserProfileJSONRequestBody) (*UsersAPIUpdateCurrentUserProfileResponse, error) + + // UsersAPIListOrganizations request + UsersAPIListOrganizationsWithResponse(ctx context.Context) (*UsersAPIListOrganizationsResponse, error) + + // UsersAPICreateOrganization request with any body + UsersAPICreateOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*UsersAPICreateOrganizationResponse, error) + + UsersAPICreateOrganizationWithResponse(ctx context.Context, body UsersAPICreateOrganizationJSONRequestBody) (*UsersAPICreateOrganizationResponse, error) + + // InventoryAPIGetOrganizationReservationsBalance request + InventoryAPIGetOrganizationReservationsBalanceWithResponse(ctx context.Context) (*InventoryAPIGetOrganizationReservationsBalanceResponse, error) + + // InventoryAPIGetOrganizationResourceUsage request + InventoryAPIGetOrganizationResourceUsageWithResponse(ctx context.Context) (*InventoryAPIGetOrganizationResourceUsageResponse, error) + + // UsersAPIDeleteOrganization request + UsersAPIDeleteOrganizationWithResponse(ctx context.Context, id string) (*UsersAPIDeleteOrganizationResponse, error) + + // UsersAPIGetOrganization request + UsersAPIGetOrganizationWithResponse(ctx context.Context, id string) (*UsersAPIGetOrganizationResponse, error) + + // UsersAPIEditOrganization request with any body + UsersAPIEditOrganizationWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*UsersAPIEditOrganizationResponse, error) + + UsersAPIEditOrganizationWithResponse(ctx context.Context, id string, body UsersAPIEditOrganizationJSONRequestBody) (*UsersAPIEditOrganizationResponse, error) + + // InventoryAPISyncClusterResources request + InventoryAPISyncClusterResourcesWithResponse(ctx context.Context, organizationId string, clusterId string) (*InventoryAPISyncClusterResourcesResponse, error) + + // RbacServiceAPICreateGroup request with any body + RbacServiceAPICreateGroupWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*RbacServiceAPICreateGroupResponse, error) + + RbacServiceAPICreateGroupWithResponse(ctx context.Context, organizationId string, body RbacServiceAPICreateGroupJSONRequestBody) (*RbacServiceAPICreateGroupResponse, error) + + // RbacServiceAPIUpdateGroup request with any body + RbacServiceAPIUpdateGroupWithBodyWithResponse(ctx context.Context, organizationId string, groupId string, contentType string, body io.Reader) (*RbacServiceAPIUpdateGroupResponse, error) + + RbacServiceAPIUpdateGroupWithResponse(ctx context.Context, organizationId string, groupId string, body RbacServiceAPIUpdateGroupJSONRequestBody) (*RbacServiceAPIUpdateGroupResponse, error) + + // RbacServiceAPIDeleteGroup request + RbacServiceAPIDeleteGroupWithResponse(ctx context.Context, organizationId string, id string) (*RbacServiceAPIDeleteGroupResponse, error) + + // RbacServiceAPIGetGroup request + RbacServiceAPIGetGroupWithResponse(ctx context.Context, organizationId string, id string) (*RbacServiceAPIGetGroupResponse, error) + + // InventoryAPIGetReservations request + InventoryAPIGetReservationsWithResponse(ctx context.Context, organizationId string) (*InventoryAPIGetReservationsResponse, error) + + // InventoryAPIAddReservation request with any body + InventoryAPIAddReservationWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*InventoryAPIAddReservationResponse, error) + + InventoryAPIAddReservationWithResponse(ctx context.Context, organizationId string, body InventoryAPIAddReservationJSONRequestBody) (*InventoryAPIAddReservationResponse, error) + + // InventoryAPIGetReservationsBalance request + InventoryAPIGetReservationsBalanceWithResponse(ctx context.Context, organizationId string) (*InventoryAPIGetReservationsBalanceResponse, error) + + // InventoryAPIOverwriteReservations request with any body + InventoryAPIOverwriteReservationsWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*InventoryAPIOverwriteReservationsResponse, error) + + InventoryAPIOverwriteReservationsWithResponse(ctx context.Context, organizationId string, body InventoryAPIOverwriteReservationsJSONRequestBody) (*InventoryAPIOverwriteReservationsResponse, error) + + // InventoryAPIDeleteReservation request + InventoryAPIDeleteReservationWithResponse(ctx context.Context, organizationId string, reservationId string) (*InventoryAPIDeleteReservationResponse, error) + + // RbacServiceAPIListRoleBindings request + RbacServiceAPIListRoleBindingsWithResponse(ctx context.Context, organizationId string, params *RbacServiceAPIListRoleBindingsParams) (*RbacServiceAPIListRoleBindingsResponse, error) + + // RbacServiceAPICreateRoleBindings request with any body + RbacServiceAPICreateRoleBindingsWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*RbacServiceAPICreateRoleBindingsResponse, error) + + RbacServiceAPICreateRoleBindingsWithResponse(ctx context.Context, organizationId string, body RbacServiceAPICreateRoleBindingsJSONRequestBody) (*RbacServiceAPICreateRoleBindingsResponse, error) + + // RbacServiceAPIDeleteRoleBinding request + RbacServiceAPIDeleteRoleBindingWithResponse(ctx context.Context, organizationId string, id string) (*RbacServiceAPIDeleteRoleBindingResponse, error) + + // RbacServiceAPIGetRoleBinding request + RbacServiceAPIGetRoleBindingWithResponse(ctx context.Context, organizationId string, id string) (*RbacServiceAPIGetRoleBindingResponse, error) + + // RbacServiceAPIUpdateRoleBinding request with any body + RbacServiceAPIUpdateRoleBindingWithBodyWithResponse(ctx context.Context, organizationId string, roleBindingId string, contentType string, body io.Reader) (*RbacServiceAPIUpdateRoleBindingResponse, error) + + RbacServiceAPIUpdateRoleBindingWithResponse(ctx context.Context, organizationId string, roleBindingId string, body RbacServiceAPIUpdateRoleBindingJSONRequestBody) (*RbacServiceAPIUpdateRoleBindingResponse, error) + + // RbacServiceAPIListRoles request + RbacServiceAPIListRolesWithResponse(ctx context.Context, organizationId string, params *RbacServiceAPIListRolesParams) (*RbacServiceAPIListRolesResponse, error) + + // ServiceAccountsAPIDeleteServiceAccounts request + ServiceAccountsAPIDeleteServiceAccountsWithResponse(ctx context.Context, organizationId string, params *ServiceAccountsAPIDeleteServiceAccountsParams) (*ServiceAccountsAPIDeleteServiceAccountsResponse, error) + + // ServiceAccountsAPIListServiceAccounts request + ServiceAccountsAPIListServiceAccountsWithResponse(ctx context.Context, organizationId string, params *ServiceAccountsAPIListServiceAccountsParams) (*ServiceAccountsAPIListServiceAccountsResponse, error) + + // ServiceAccountsAPICreateServiceAccount request with any body + ServiceAccountsAPICreateServiceAccountWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*ServiceAccountsAPICreateServiceAccountResponse, error) + + ServiceAccountsAPICreateServiceAccountWithResponse(ctx context.Context, organizationId string, body ServiceAccountsAPICreateServiceAccountJSONRequestBody) (*ServiceAccountsAPICreateServiceAccountResponse, error) + + // ServiceAccountsAPIDeleteServiceAccount request + ServiceAccountsAPIDeleteServiceAccountWithResponse(ctx context.Context, organizationId string, serviceAccountId string) (*ServiceAccountsAPIDeleteServiceAccountResponse, error) + + // ServiceAccountsAPIGetServiceAccount request + ServiceAccountsAPIGetServiceAccountWithResponse(ctx context.Context, organizationId string, serviceAccountId string) (*ServiceAccountsAPIGetServiceAccountResponse, error) + + // ServiceAccountsAPIUpdateServiceAccount request with any body + ServiceAccountsAPIUpdateServiceAccountWithBodyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, contentType string, body io.Reader) (*ServiceAccountsAPIUpdateServiceAccountResponse, error) + + ServiceAccountsAPIUpdateServiceAccountWithResponse(ctx context.Context, organizationId string, serviceAccountId string, body ServiceAccountsAPIUpdateServiceAccountJSONRequestBody) (*ServiceAccountsAPIUpdateServiceAccountResponse, error) + + // ServiceAccountsAPICreateServiceAccountKey request with any body + ServiceAccountsAPICreateServiceAccountKeyWithBodyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, contentType string, body io.Reader) (*ServiceAccountsAPICreateServiceAccountKeyResponse, error) + + ServiceAccountsAPICreateServiceAccountKeyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, body ServiceAccountsAPICreateServiceAccountKeyJSONRequestBody) (*ServiceAccountsAPICreateServiceAccountKeyResponse, error) + + // ServiceAccountsAPIUpdateServiceAccountKey request with any body + ServiceAccountsAPIUpdateServiceAccountKeyWithBodyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, keyId string, contentType string, body io.Reader) (*ServiceAccountsAPIUpdateServiceAccountKeyResponse, error) + + ServiceAccountsAPIUpdateServiceAccountKeyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, keyId string, body ServiceAccountsAPIUpdateServiceAccountKeyJSONRequestBody) (*ServiceAccountsAPIUpdateServiceAccountKeyResponse, error) + + // ServiceAccountsAPIDeleteServiceAccountKey request + ServiceAccountsAPIDeleteServiceAccountKeyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, keyId string) (*ServiceAccountsAPIDeleteServiceAccountKeyResponse, error) + + // ServiceAccountsAPIGetServiceAccountKey request + ServiceAccountsAPIGetServiceAccountKeyWithResponse(ctx context.Context, organizationId string, serviceAccountId string, keyId string) (*ServiceAccountsAPIGetServiceAccountKeyResponse, error) + + // UsersAPIRemoveOrganizationUsers request + UsersAPIRemoveOrganizationUsersWithResponse(ctx context.Context, organizationId string, params *UsersAPIRemoveOrganizationUsersParams) (*UsersAPIRemoveOrganizationUsersResponse, error) + + // UsersAPIListOrganizationUsers request + UsersAPIListOrganizationUsersWithResponse(ctx context.Context, organizationId string, params *UsersAPIListOrganizationUsersParams) (*UsersAPIListOrganizationUsersResponse, error) + + // UsersAPIAddUserToOrganization request with any body + UsersAPIAddUserToOrganizationWithBodyWithResponse(ctx context.Context, organizationId string, contentType string, body io.Reader) (*UsersAPIAddUserToOrganizationResponse, error) + + UsersAPIAddUserToOrganizationWithResponse(ctx context.Context, organizationId string, body UsersAPIAddUserToOrganizationJSONRequestBody) (*UsersAPIAddUserToOrganizationResponse, error) + + // UsersAPIRemoveUserFromOrganization request + UsersAPIRemoveUserFromOrganizationWithResponse(ctx context.Context, organizationId string, userId string) (*UsersAPIRemoveUserFromOrganizationResponse, error) + + // UsersAPIUpdateOrganizationUser request with any body + UsersAPIUpdateOrganizationUserWithBodyWithResponse(ctx context.Context, organizationId string, userId string, contentType string, body io.Reader) (*UsersAPIUpdateOrganizationUserResponse, error) + + UsersAPIUpdateOrganizationUserWithResponse(ctx context.Context, organizationId string, userId string, body UsersAPIUpdateOrganizationUserJSONRequestBody) (*UsersAPIUpdateOrganizationUserResponse, error) + + // UsersAPIListUserGroups request + UsersAPIListUserGroupsWithResponse(ctx context.Context, organizationId string, userId string) (*UsersAPIListUserGroupsResponse, error) + + // ScheduledRebalancingAPIListRebalancingSchedules request + ScheduledRebalancingAPIListRebalancingSchedulesWithResponse(ctx context.Context) (*ScheduledRebalancingAPIListRebalancingSchedulesResponse, error) + + // ScheduledRebalancingAPICreateRebalancingSchedule request with any body + ScheduledRebalancingAPICreateRebalancingScheduleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*ScheduledRebalancingAPICreateRebalancingScheduleResponse, error) + + ScheduledRebalancingAPICreateRebalancingScheduleWithResponse(ctx context.Context, body ScheduledRebalancingAPICreateRebalancingScheduleJSONRequestBody) (*ScheduledRebalancingAPICreateRebalancingScheduleResponse, error) + + // ScheduledRebalancingAPIUpdateRebalancingSchedule request with any body + ScheduledRebalancingAPIUpdateRebalancingScheduleWithBodyWithResponse(ctx context.Context, params *ScheduledRebalancingAPIUpdateRebalancingScheduleParams, contentType string, body io.Reader) (*ScheduledRebalancingAPIUpdateRebalancingScheduleResponse, error) + + ScheduledRebalancingAPIUpdateRebalancingScheduleWithResponse(ctx context.Context, params *ScheduledRebalancingAPIUpdateRebalancingScheduleParams, body ScheduledRebalancingAPIUpdateRebalancingScheduleJSONRequestBody) (*ScheduledRebalancingAPIUpdateRebalancingScheduleResponse, error) + + // ScheduledRebalancingAPIDeleteRebalancingSchedule request + ScheduledRebalancingAPIDeleteRebalancingScheduleWithResponse(ctx context.Context, id string) (*ScheduledRebalancingAPIDeleteRebalancingScheduleResponse, error) + + // ScheduledRebalancingAPIGetRebalancingSchedule request + ScheduledRebalancingAPIGetRebalancingScheduleWithResponse(ctx context.Context, id string) (*ScheduledRebalancingAPIGetRebalancingScheduleResponse, error) + + // InventoryAPIListRegions request + InventoryAPIListRegionsWithResponse(ctx context.Context, params *InventoryAPIListRegionsParams) (*InventoryAPIListRegionsResponse, error) + + // CommitmentsAPIGetCommitmentsAssignments request + CommitmentsAPIGetCommitmentsAssignmentsWithResponse(ctx context.Context) (*CommitmentsAPIGetCommitmentsAssignmentsResponse, error) + + // CommitmentsAPICreateCommitmentAssignment request + CommitmentsAPICreateCommitmentAssignmentWithResponse(ctx context.Context, params *CommitmentsAPICreateCommitmentAssignmentParams) (*CommitmentsAPICreateCommitmentAssignmentResponse, error) + + // CommitmentsAPIDeleteCommitmentAssignment request + CommitmentsAPIDeleteCommitmentAssignmentWithResponse(ctx context.Context, assignmentId string) (*CommitmentsAPIDeleteCommitmentAssignmentResponse, error) + + // CommitmentsAPIGetCommitments request + CommitmentsAPIGetCommitmentsWithResponse(ctx context.Context, params *CommitmentsAPIGetCommitmentsParams) (*CommitmentsAPIGetCommitmentsResponse, error) + + // CommitmentsAPIGetCommitmentsDiscountedPrices request + CommitmentsAPIGetCommitmentsDiscountedPricesWithResponse(ctx context.Context, params *CommitmentsAPIGetCommitmentsDiscountedPricesParams) (*CommitmentsAPIGetCommitmentsDiscountedPricesResponse, error) + + // CommitmentsAPIImportAzureReservations request with any body + CommitmentsAPIImportAzureReservationsWithBodyWithResponse(ctx context.Context, params *CommitmentsAPIImportAzureReservationsParams, contentType string, body io.Reader) (*CommitmentsAPIImportAzureReservationsResponse, error) + + CommitmentsAPIImportAzureReservationsWithResponse(ctx context.Context, params *CommitmentsAPIImportAzureReservationsParams, body CommitmentsAPIImportAzureReservationsJSONRequestBody) (*CommitmentsAPIImportAzureReservationsResponse, error) + + // CommitmentsAPIImportGCPCommitments request with any body + CommitmentsAPIImportGCPCommitmentsWithBodyWithResponse(ctx context.Context, params *CommitmentsAPIImportGCPCommitmentsParams, contentType string, body io.Reader) (*CommitmentsAPIImportGCPCommitmentsResponse, error) + + CommitmentsAPIImportGCPCommitmentsWithResponse(ctx context.Context, params *CommitmentsAPIImportGCPCommitmentsParams, body CommitmentsAPIImportGCPCommitmentsJSONRequestBody) (*CommitmentsAPIImportGCPCommitmentsResponse, error) + + // CommitmentsAPIGetGCPCommitmentsImportScript request + CommitmentsAPIGetGCPCommitmentsImportScriptWithResponse(ctx context.Context, params *CommitmentsAPIGetGCPCommitmentsImportScriptParams) (*CommitmentsAPIGetGCPCommitmentsImportScriptResponse, error) + + // CommitmentsAPIDeleteCommitment request + CommitmentsAPIDeleteCommitmentWithResponse(ctx context.Context, commitmentId string) (*CommitmentsAPIDeleteCommitmentResponse, error) + + // CommitmentsAPIGetCommitment request + CommitmentsAPIGetCommitmentWithResponse(ctx context.Context, commitmentId string, params *CommitmentsAPIGetCommitmentParams) (*CommitmentsAPIGetCommitmentResponse, error) + + // CommitmentsAPIUpdateCommitment request with any body + CommitmentsAPIUpdateCommitmentWithBodyWithResponse(ctx context.Context, commitmentId string, contentType string, body io.Reader) (*CommitmentsAPIUpdateCommitmentResponse, error) + + CommitmentsAPIUpdateCommitmentWithResponse(ctx context.Context, commitmentId string, body CommitmentsAPIUpdateCommitmentJSONRequestBody) (*CommitmentsAPIUpdateCommitmentResponse, error) + + // CommitmentsAPIGetCommitmentAssignments request + CommitmentsAPIGetCommitmentAssignmentsWithResponse(ctx context.Context, commitmentId string) (*CommitmentsAPIGetCommitmentAssignmentsResponse, error) + + // CommitmentsAPIReplaceCommitmentAssignments request with any body + CommitmentsAPIReplaceCommitmentAssignmentsWithBodyWithResponse(ctx context.Context, commitmentId string, contentType string, body io.Reader) (*CommitmentsAPIReplaceCommitmentAssignmentsResponse, error) + + CommitmentsAPIReplaceCommitmentAssignmentsWithResponse(ctx context.Context, commitmentId string, body CommitmentsAPIReplaceCommitmentAssignmentsJSONRequestBody) (*CommitmentsAPIReplaceCommitmentAssignmentsResponse, error) + + // CommitmentsAPIGetGCPCommitmentsScriptTemplate request + CommitmentsAPIGetGCPCommitmentsScriptTemplateWithResponse(ctx context.Context) (*CommitmentsAPIGetGCPCommitmentsScriptTemplateResponse, error) + + // ExternalClusterAPIGetCleanupScriptTemplate request + ExternalClusterAPIGetCleanupScriptTemplateWithResponse(ctx context.Context, provider string) (*ExternalClusterAPIGetCleanupScriptTemplateResponse, error) + + // ExternalClusterAPIGetCredentialsScriptTemplate request + ExternalClusterAPIGetCredentialsScriptTemplateWithResponse(ctx context.Context, provider string, params *ExternalClusterAPIGetCredentialsScriptTemplateParams) (*ExternalClusterAPIGetCredentialsScriptTemplateResponse, error) + + // RuntimeSecurityAPIGetAnomalies request + RuntimeSecurityAPIGetAnomaliesWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetAnomaliesParams) (*RuntimeSecurityAPIGetAnomaliesResponse, error) + + // RuntimeSecurityAPIAckAnomalies request with any body + RuntimeSecurityAPIAckAnomaliesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIAckAnomaliesResponse, error) + + RuntimeSecurityAPIAckAnomaliesWithResponse(ctx context.Context, body RuntimeSecurityAPIAckAnomaliesJSONRequestBody) (*RuntimeSecurityAPIAckAnomaliesResponse, error) + + // RuntimeSecurityAPICloseAnomalies request with any body + RuntimeSecurityAPICloseAnomaliesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPICloseAnomaliesResponse, error) + + RuntimeSecurityAPICloseAnomaliesWithResponse(ctx context.Context, body RuntimeSecurityAPICloseAnomaliesJSONRequestBody) (*RuntimeSecurityAPICloseAnomaliesResponse, error) + + // RuntimeSecurityAPITriggerAnomaliesWebhook request with any body + RuntimeSecurityAPITriggerAnomaliesWebhookWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPITriggerAnomaliesWebhookResponse, error) + + RuntimeSecurityAPITriggerAnomaliesWebhookWithResponse(ctx context.Context, body RuntimeSecurityAPITriggerAnomaliesWebhookJSONRequestBody) (*RuntimeSecurityAPITriggerAnomaliesWebhookResponse, error) + + // RuntimeSecurityAPIGetAnomaly request + RuntimeSecurityAPIGetAnomalyWithResponse(ctx context.Context, id string) (*RuntimeSecurityAPIGetAnomalyResponse, error) + + // RuntimeSecurityAPIGetAnomalyEvents request + RuntimeSecurityAPIGetAnomalyEventsWithResponse(ctx context.Context, id string, params *RuntimeSecurityAPIGetAnomalyEventsParams) (*RuntimeSecurityAPIGetAnomalyEventsResponse, error) + + // RuntimeSecurityAPITriggerAnomalyWebhook request with any body + RuntimeSecurityAPITriggerAnomalyWebhookWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*RuntimeSecurityAPITriggerAnomalyWebhookResponse, error) + + RuntimeSecurityAPITriggerAnomalyWebhookWithResponse(ctx context.Context, id string, body RuntimeSecurityAPITriggerAnomalyWebhookJSONRequestBody) (*RuntimeSecurityAPITriggerAnomalyWebhookResponse, error) + + // RuntimeSecurityAPIGetRuntimeEvents request + RuntimeSecurityAPIGetRuntimeEventsWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetRuntimeEventsParams) (*RuntimeSecurityAPIGetRuntimeEventsResponse, error) + + // RuntimeSecurityAPIGetRuntimeEventGroups request + RuntimeSecurityAPIGetRuntimeEventGroupsWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetRuntimeEventGroupsParams) (*RuntimeSecurityAPIGetRuntimeEventGroupsResponse, error) + + // RuntimeSecurityAPIGetRuntimeEventsProcessTree request + RuntimeSecurityAPIGetRuntimeEventsProcessTreeWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetRuntimeEventsProcessTreeParams) (*RuntimeSecurityAPIGetRuntimeEventsProcessTreeResponse, error) + + // RuntimeSecurityAPIGetLists request + RuntimeSecurityAPIGetListsWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetListsParams) (*RuntimeSecurityAPIGetListsResponse, error) + + // RuntimeSecurityAPICreateList request with any body + RuntimeSecurityAPICreateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPICreateListResponse, error) + + RuntimeSecurityAPICreateListWithResponse(ctx context.Context, body RuntimeSecurityAPICreateListJSONRequestBody) (*RuntimeSecurityAPICreateListResponse, error) + + // RuntimeSecurityAPIDeleteLists request with any body + RuntimeSecurityAPIDeleteListsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIDeleteListsResponse, error) + + RuntimeSecurityAPIDeleteListsWithResponse(ctx context.Context, body RuntimeSecurityAPIDeleteListsJSONRequestBody) (*RuntimeSecurityAPIDeleteListsResponse, error) + + // RuntimeSecurityAPIGetList request + RuntimeSecurityAPIGetListWithResponse(ctx context.Context, id string) (*RuntimeSecurityAPIGetListResponse, error) + + // RuntimeSecurityAPIAddListEntries request with any body + RuntimeSecurityAPIAddListEntriesWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*RuntimeSecurityAPIAddListEntriesResponse, error) + + RuntimeSecurityAPIAddListEntriesWithResponse(ctx context.Context, id string, body RuntimeSecurityAPIAddListEntriesJSONRequestBody) (*RuntimeSecurityAPIAddListEntriesResponse, error) + + // RuntimeSecurityAPIGetListEntries request + RuntimeSecurityAPIGetListEntriesWithResponse(ctx context.Context, id string, params *RuntimeSecurityAPIGetListEntriesParams) (*RuntimeSecurityAPIGetListEntriesResponse, error) + + // RuntimeSecurityAPIRemoveListEntries request with any body + RuntimeSecurityAPIRemoveListEntriesWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*RuntimeSecurityAPIRemoveListEntriesResponse, error) + + RuntimeSecurityAPIRemoveListEntriesWithResponse(ctx context.Context, id string, body RuntimeSecurityAPIRemoveListEntriesJSONRequestBody) (*RuntimeSecurityAPIRemoveListEntriesResponse, error) + + // RuntimeSecurityAPIGetNetflowGraph request + RuntimeSecurityAPIGetNetflowGraphWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetNetflowGraphParams) (*RuntimeSecurityAPIGetNetflowGraphResponse, error) + + // RuntimeSecurityAPIGetNetflowList request + RuntimeSecurityAPIGetNetflowListWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetNetflowListParams) (*RuntimeSecurityAPIGetNetflowListResponse, error) + + // RuntimeSecurityAPIGetNetflowTrend request + RuntimeSecurityAPIGetNetflowTrendWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetNetflowTrendParams) (*RuntimeSecurityAPIGetNetflowTrendResponse, error) + + // RuntimeSecurityAPIGetAnomaliesOverview request + RuntimeSecurityAPIGetAnomaliesOverviewWithResponse(ctx context.Context) (*RuntimeSecurityAPIGetAnomaliesOverviewResponse, error) + + // RuntimeSecurityAPIGetRules request + RuntimeSecurityAPIGetRulesWithResponse(ctx context.Context, params *RuntimeSecurityAPIGetRulesParams) (*RuntimeSecurityAPIGetRulesResponse, error) + + // RuntimeSecurityAPICreateRule request with any body + RuntimeSecurityAPICreateRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPICreateRuleResponse, error) + + RuntimeSecurityAPICreateRuleWithResponse(ctx context.Context, body RuntimeSecurityAPICreateRuleJSONRequestBody) (*RuntimeSecurityAPICreateRuleResponse, error) + + // RuntimeSecurityAPIDeleteRules request with any body + RuntimeSecurityAPIDeleteRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIDeleteRulesResponse, error) + + RuntimeSecurityAPIDeleteRulesWithResponse(ctx context.Context, body RuntimeSecurityAPIDeleteRulesJSONRequestBody) (*RuntimeSecurityAPIDeleteRulesResponse, error) + + // RuntimeSecurityAPIToggleRules request with any body + RuntimeSecurityAPIToggleRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIToggleRulesResponse, error) + + RuntimeSecurityAPIToggleRulesWithResponse(ctx context.Context, body RuntimeSecurityAPIToggleRulesJSONRequestBody) (*RuntimeSecurityAPIToggleRulesResponse, error) + + // RuntimeSecurityAPIValidate request with any body + RuntimeSecurityAPIValidateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RuntimeSecurityAPIValidateResponse, error) + + RuntimeSecurityAPIValidateWithResponse(ctx context.Context, body RuntimeSecurityAPIValidateJSONRequestBody) (*RuntimeSecurityAPIValidateResponse, error) + + // RuntimeSecurityAPIGetRule request + RuntimeSecurityAPIGetRuleWithResponse(ctx context.Context, id string) (*RuntimeSecurityAPIGetRuleResponse, error) + + // RuntimeSecurityAPIEditRule request with any body + RuntimeSecurityAPIEditRuleWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*RuntimeSecurityAPIEditRuleResponse, error) + + RuntimeSecurityAPIEditRuleWithResponse(ctx context.Context, id string, body RuntimeSecurityAPIEditRuleJSONRequestBody) (*RuntimeSecurityAPIEditRuleResponse, error) + + // RuntimeSecurityAPIGetClusterWorkloadsNetflow request + RuntimeSecurityAPIGetClusterWorkloadsNetflowWithResponse(ctx context.Context, clusterId string, params *RuntimeSecurityAPIGetClusterWorkloadsNetflowParams) (*RuntimeSecurityAPIGetClusterWorkloadsNetflowResponse, error) + + // SSOAPIListSSOConnections request + SSOAPIListSSOConnectionsWithResponse(ctx context.Context) (*SSOAPIListSSOConnectionsResponse, error) + + // SSOAPICreateSSOConnection request with any body + SSOAPICreateSSOConnectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SSOAPICreateSSOConnectionResponse, error) + + SSOAPICreateSSOConnectionWithResponse(ctx context.Context, body SSOAPICreateSSOConnectionJSONRequestBody) (*SSOAPICreateSSOConnectionResponse, error) + + // SSOAPIDeleteSSOConnection request + SSOAPIDeleteSSOConnectionWithResponse(ctx context.Context, id string) (*SSOAPIDeleteSSOConnectionResponse, error) + + // SSOAPIGetSSOConnection request + SSOAPIGetSSOConnectionWithResponse(ctx context.Context, id string) (*SSOAPIGetSSOConnectionResponse, error) + + // SSOAPIUpdateSSOConnection request with any body + SSOAPIUpdateSSOConnectionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*SSOAPIUpdateSSOConnectionResponse, error) + + SSOAPIUpdateSSOConnectionWithResponse(ctx context.Context, id string, body SSOAPIUpdateSSOConnectionJSONRequestBody) (*SSOAPIUpdateSSOConnectionResponse, error) + + // SSOAPISetSyncForSSOConnection request with any body + SSOAPISetSyncForSSOConnectionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*SSOAPISetSyncForSSOConnectionResponse, error) + + SSOAPISetSyncForSSOConnectionWithResponse(ctx context.Context, id string, body SSOAPISetSyncForSSOConnectionJSONRequestBody) (*SSOAPISetSyncForSSOConnectionResponse, error) + + // ScheduledRebalancingAPIListAvailableRebalancingTZ request + ScheduledRebalancingAPIListAvailableRebalancingTZWithResponse(ctx context.Context) (*ScheduledRebalancingAPIListAvailableRebalancingTZResponse, error) + + // WorkloadOptimizationAPIGetAgentStatus request + WorkloadOptimizationAPIGetAgentStatusWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIGetAgentStatusResponse, error) + + // WorkloadOptimizationAPIListLimitRanges request + WorkloadOptimizationAPIListLimitRangesWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListLimitRangesResponse, error) + + // WorkloadOptimizationAPIListWorkloadScalingPolicies request + WorkloadOptimizationAPIListWorkloadScalingPoliciesWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListWorkloadScalingPoliciesResponse, error) + + // WorkloadOptimizationAPICreateWorkloadScalingPolicy request with any body + WorkloadOptimizationAPICreateWorkloadScalingPolicyWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse, error) + + WorkloadOptimizationAPICreateWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, body WorkloadOptimizationAPICreateWorkloadScalingPolicyJSONRequestBody) (*WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse, error) + + // WorkloadOptimizationAPISetScalingPoliciesOrder request with any body + WorkloadOptimizationAPISetScalingPoliciesOrderWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*WorkloadOptimizationAPISetScalingPoliciesOrderResponse, error) + + WorkloadOptimizationAPISetScalingPoliciesOrderWithResponse(ctx context.Context, clusterId string, body WorkloadOptimizationAPISetScalingPoliciesOrderJSONRequestBody) (*WorkloadOptimizationAPISetScalingPoliciesOrderResponse, error) + + // WorkloadOptimizationAPIDeleteWorkloadScalingPolicy request + WorkloadOptimizationAPIDeleteWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string) (*WorkloadOptimizationAPIDeleteWorkloadScalingPolicyResponse, error) + + // WorkloadOptimizationAPIGetWorkloadScalingPolicy request + WorkloadOptimizationAPIGetWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string) (*WorkloadOptimizationAPIGetWorkloadScalingPolicyResponse, error) + + // WorkloadOptimizationAPIUpdateWorkloadScalingPolicy request with any body + WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithBodyWithResponse(ctx context.Context, clusterId string, policyId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse, error) + + WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string, body WorkloadOptimizationAPIUpdateWorkloadScalingPolicyJSONRequestBody) (*WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse, error) + + // WorkloadOptimizationAPIAssignScalingPolicyWorkloads request with any body + WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithBodyWithResponse(ctx context.Context, clusterId string, policyId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse, error) + + WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithResponse(ctx context.Context, clusterId string, policyId string, body WorkloadOptimizationAPIAssignScalingPolicyWorkloadsJSONRequestBody) (*WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse, error) + + // WorkloadOptimizationAPIListResourceQuotas request + WorkloadOptimizationAPIListResourceQuotasWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListResourceQuotasResponse, error) + + // WorkloadOptimizationAPIListWorkloadEvents request + WorkloadOptimizationAPIListWorkloadEventsWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIListWorkloadEventsParams) (*WorkloadOptimizationAPIListWorkloadEventsResponse, error) + + // WorkloadOptimizationAPIGetWorkloadEvent request + WorkloadOptimizationAPIGetWorkloadEventWithResponse(ctx context.Context, clusterId string, eventId string, params *WorkloadOptimizationAPIGetWorkloadEventParams) (*WorkloadOptimizationAPIGetWorkloadEventResponse, error) + + // WorkloadOptimizationAPIListWorkloads request + WorkloadOptimizationAPIListWorkloadsWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListWorkloadsResponse, error) + + // WorkloadOptimizationAPIGetWorkloadsSummary request + WorkloadOptimizationAPIGetWorkloadsSummaryWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryParams) (*WorkloadOptimizationAPIGetWorkloadsSummaryResponse, error) + + // WorkloadOptimizationAPIGetWorkloadsSummaryMetrics request + WorkloadOptimizationAPIGetWorkloadsSummaryMetricsWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryMetricsParams) (*WorkloadOptimizationAPIGetWorkloadsSummaryMetricsResponse, error) + + // WorkloadOptimizationAPIGetWorkload request + WorkloadOptimizationAPIGetWorkloadWithResponse(ctx context.Context, clusterId string, workloadId string, params *WorkloadOptimizationAPIGetWorkloadParams) (*WorkloadOptimizationAPIGetWorkloadResponse, error) + + // WorkloadOptimizationAPIGetInstallCmd request + WorkloadOptimizationAPIGetInstallCmdWithResponse(ctx context.Context, params *WorkloadOptimizationAPIGetInstallCmdParams) (*WorkloadOptimizationAPIGetInstallCmdResponse, error) + + // WorkloadOptimizationAPIGetInstallScript request + WorkloadOptimizationAPIGetInstallScriptWithResponse(ctx context.Context, params *WorkloadOptimizationAPIGetInstallScriptParams) (*WorkloadOptimizationAPIGetInstallScriptResponse, error) + + // InventoryAPIListZones request + InventoryAPIListZonesWithResponse(ctx context.Context, params *InventoryAPIListZonesParams) (*InventoryAPIListZonesResponse, error) + + // WorkloadOptimizationAPIPatchWorkloadV2 request with any body + WorkloadOptimizationAPIPatchWorkloadV2WithBodyWithResponse(ctx context.Context, clusterId string, workloadId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIPatchWorkloadV2Response, error) + + WorkloadOptimizationAPIPatchWorkloadV2WithResponse(ctx context.Context, clusterId string, workloadId string, body WorkloadOptimizationAPIPatchWorkloadV2JSONRequestBody) (*WorkloadOptimizationAPIPatchWorkloadV2Response, error) + + // WorkloadOptimizationAPIUpdateWorkloadV2 request with any body + WorkloadOptimizationAPIUpdateWorkloadV2WithBodyWithResponse(ctx context.Context, clusterId string, workloadId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIUpdateWorkloadV2Response, error) + + WorkloadOptimizationAPIUpdateWorkloadV2WithResponse(ctx context.Context, clusterId string, workloadId string, body WorkloadOptimizationAPIUpdateWorkloadV2JSONRequestBody) (*WorkloadOptimizationAPIUpdateWorkloadV2Response, error) +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +type Response interface { + Status() string + StatusCode() int + GetBody() []byte +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type CommitmentsAPIBatchDeleteCommitmentsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]interface{} +} + +// Status returns HTTPResponse.Status +func (r CommitmentsAPIBatchDeleteCommitmentsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CommitmentsAPIBatchDeleteCommitmentsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r CommitmentsAPIBatchDeleteCommitmentsResponse) GetBody() []byte { + return r.Body +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type CommitmentsAPIBatchUpdateCommitmentsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CastaiInventoryV1beta1BatchUpdateCommitmentsResponse +} + +// Status returns HTTPResponse.Status +func (r CommitmentsAPIBatchUpdateCommitmentsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CommitmentsAPIBatchUpdateCommitmentsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r CommitmentsAPIBatchUpdateCommitmentsResponse) GetBody() []byte { + return r.Body +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type CommitmentsAPIGetCommitmentUsageHistoryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CastaiInventoryV1beta1GetCommitmentUsageHistoryResponse +} + +// Status returns HTTPResponse.Status +func (r CommitmentsAPIGetCommitmentUsageHistoryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CommitmentsAPIGetCommitmentUsageHistoryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r CommitmentsAPIGetCommitmentUsageHistoryResponse) GetBody() []byte { + return r.Body +} - // WorkloadOptimizationAPIGetAgentStatus request - WorkloadOptimizationAPIGetAgentStatusWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIGetAgentStatusResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 - // WorkloadOptimizationAPIListLimitRanges request - WorkloadOptimizationAPIListLimitRangesWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListLimitRangesResponse, error) +type CommitmentsAPIGetAWSReservedInstancesImportCMDResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CastaiInventoryV1beta1GetAWSReservedInstancesImportCMDResponse +} - // WorkloadOptimizationAPIListWorkloadScalingPolicies request - WorkloadOptimizationAPIListWorkloadScalingPoliciesWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListWorkloadScalingPoliciesResponse, error) +// Status returns HTTPResponse.Status +func (r CommitmentsAPIGetAWSReservedInstancesImportCMDResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // WorkloadOptimizationAPICreateWorkloadScalingPolicy request with any body - WorkloadOptimizationAPICreateWorkloadScalingPolicyWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r CommitmentsAPIGetAWSReservedInstancesImportCMDResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - WorkloadOptimizationAPICreateWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, body WorkloadOptimizationAPICreateWorkloadScalingPolicyJSONRequestBody) (*WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r CommitmentsAPIGetAWSReservedInstancesImportCMDResponse) GetBody() []byte { + return r.Body +} - // WorkloadOptimizationAPISetScalingPoliciesOrder request with any body - WorkloadOptimizationAPISetScalingPoliciesOrderWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*WorkloadOptimizationAPISetScalingPoliciesOrderResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 - WorkloadOptimizationAPISetScalingPoliciesOrderWithResponse(ctx context.Context, clusterId string, body WorkloadOptimizationAPISetScalingPoliciesOrderJSONRequestBody) (*WorkloadOptimizationAPISetScalingPoliciesOrderResponse, error) +type CommitmentsAPIGetAWSReservedInstancesImportScriptResponse struct { + Body []byte + HTTPResponse *http.Response +} - // WorkloadOptimizationAPIDeleteWorkloadScalingPolicy request - WorkloadOptimizationAPIDeleteWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string) (*WorkloadOptimizationAPIDeleteWorkloadScalingPolicyResponse, error) +// Status returns HTTPResponse.Status +func (r CommitmentsAPIGetAWSReservedInstancesImportScriptResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // WorkloadOptimizationAPIGetWorkloadScalingPolicy request - WorkloadOptimizationAPIGetWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string) (*WorkloadOptimizationAPIGetWorkloadScalingPolicyResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r CommitmentsAPIGetAWSReservedInstancesImportScriptResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // WorkloadOptimizationAPIUpdateWorkloadScalingPolicy request with any body - WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithBodyWithResponse(ctx context.Context, clusterId string, policyId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r CommitmentsAPIGetAWSReservedInstancesImportScriptResponse) GetBody() []byte { + return r.Body +} - WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string, body WorkloadOptimizationAPIUpdateWorkloadScalingPolicyJSONRequestBody) (*WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type CommitmentsAPIImportAWSReservedInstancesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]interface{} +} + +// Status returns HTTPResponse.Status +func (r CommitmentsAPIImportAWSReservedInstancesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CommitmentsAPIImportAWSReservedInstancesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r CommitmentsAPIImportAWSReservedInstancesResponse) GetBody() []byte { + return r.Body +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type AuthTokenAPIListAuthTokensResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CastaiAuthtokenV1beta1ListAuthTokensResponse +} + +// Status returns HTTPResponse.Status +func (r AuthTokenAPIListAuthTokensResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthTokenAPIListAuthTokensResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r AuthTokenAPIListAuthTokensResponse) GetBody() []byte { + return r.Body +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type AuthTokenAPICreateAuthTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CastaiAuthtokenV1beta1AuthToken +} + +// Status returns HTTPResponse.Status +func (r AuthTokenAPICreateAuthTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthTokenAPICreateAuthTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r AuthTokenAPICreateAuthTokenResponse) GetBody() []byte { + return r.Body +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type AuthTokenAPIDeleteAuthTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CastaiAuthtokenV1beta1DeleteAuthTokenResponse +} + +// Status returns HTTPResponse.Status +func (r AuthTokenAPIDeleteAuthTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthTokenAPIDeleteAuthTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r AuthTokenAPIDeleteAuthTokenResponse) GetBody() []byte { + return r.Body +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type AuthTokenAPIGetAuthTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CastaiAuthtokenV1beta1AuthToken +} + +// Status returns HTTPResponse.Status +func (r AuthTokenAPIGetAuthTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthTokenAPIGetAuthTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r AuthTokenAPIGetAuthTokenResponse) GetBody() []byte { + return r.Body +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type AuthTokenAPIUpdateAuthTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CastaiAuthtokenV1beta1AuthToken +} + +// Status returns HTTPResponse.Status +func (r AuthTokenAPIUpdateAuthTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthTokenAPIUpdateAuthTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r AuthTokenAPIUpdateAuthTokenResponse) GetBody() []byte { + return r.Body +} + +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 + +type AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CostreportV1beta1GetAllocationGroupCostTimedSummariesResponse +} + +// Status returns HTTPResponse.Status +func (r AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // WorkloadOptimizationAPIAssignScalingPolicyWorkloads request with any body - WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithBodyWithResponse(ctx context.Context, clusterId string, policyId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithResponse(ctx context.Context, clusterId string, policyId string, body WorkloadOptimizationAPIAssignScalingPolicyWorkloadsJSONRequestBody) (*WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse) GetBody() []byte { + return r.Body +} - // WorkloadOptimizationAPIListResourceQuotas request - WorkloadOptimizationAPIListResourceQuotasWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListResourceQuotasResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 - // WorkloadOptimizationAPIListWorkloadEvents request - WorkloadOptimizationAPIListWorkloadEventsWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIListWorkloadEventsParams) (*WorkloadOptimizationAPIListWorkloadEventsResponse, error) +type AllocationGroupAPIGetAllocationGroupCostSummariesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CostreportV1beta1GetAllocationGroupCostSummariesResponse +} - // WorkloadOptimizationAPIGetWorkloadEvent request - WorkloadOptimizationAPIGetWorkloadEventWithResponse(ctx context.Context, clusterId string, eventId string, params *WorkloadOptimizationAPIGetWorkloadEventParams) (*WorkloadOptimizationAPIGetWorkloadEventResponse, error) +// Status returns HTTPResponse.Status +func (r AllocationGroupAPIGetAllocationGroupCostSummariesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // WorkloadOptimizationAPIListWorkloads request - WorkloadOptimizationAPIListWorkloadsWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListWorkloadsResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r AllocationGroupAPIGetAllocationGroupCostSummariesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // WorkloadOptimizationAPIGetWorkloadsSummary request - WorkloadOptimizationAPIGetWorkloadsSummaryWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryParams) (*WorkloadOptimizationAPIGetWorkloadsSummaryResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r AllocationGroupAPIGetAllocationGroupCostSummariesResponse) GetBody() []byte { + return r.Body +} - // WorkloadOptimizationAPIGetWorkloadsSummaryMetrics request - WorkloadOptimizationAPIGetWorkloadsSummaryMetricsWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryMetricsParams) (*WorkloadOptimizationAPIGetWorkloadsSummaryMetricsResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 - // WorkloadOptimizationAPIGetWorkload request - WorkloadOptimizationAPIGetWorkloadWithResponse(ctx context.Context, clusterId string, workloadId string, params *WorkloadOptimizationAPIGetWorkloadParams) (*WorkloadOptimizationAPIGetWorkloadResponse, error) +type AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CostreportV1beta1GetAllocationGroupTotalCostTimedResponse +} - // WorkloadOptimizationAPIGetInstallCmd request - WorkloadOptimizationAPIGetInstallCmdWithResponse(ctx context.Context, params *WorkloadOptimizationAPIGetInstallCmdParams) (*WorkloadOptimizationAPIGetInstallCmdResponse, error) +// Status returns HTTPResponse.Status +func (r AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // WorkloadOptimizationAPIGetInstallScript request - WorkloadOptimizationAPIGetInstallScriptWithResponse(ctx context.Context, params *WorkloadOptimizationAPIGetInstallScriptParams) (*WorkloadOptimizationAPIGetInstallScriptResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // InventoryAPIListZones request - InventoryAPIListZonesWithResponse(ctx context.Context, params *InventoryAPIListZonesParams) (*InventoryAPIListZonesResponse, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 +// Body returns body of byte array +func (r AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse) GetBody() []byte { + return r.Body +} - // WorkloadOptimizationAPIPatchWorkloadV2 request with any body - WorkloadOptimizationAPIPatchWorkloadV2WithBodyWithResponse(ctx context.Context, clusterId string, workloadId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIPatchWorkloadV2Response, error) +// TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 - WorkloadOptimizationAPIPatchWorkloadV2WithResponse(ctx context.Context, clusterId string, workloadId string, body WorkloadOptimizationAPIPatchWorkloadV2JSONRequestBody) (*WorkloadOptimizationAPIPatchWorkloadV2Response, error) +type AllocationGroupAPIListAllocationGroupsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CostreportV1beta1ListAllocationGroupsResponse +} - // WorkloadOptimizationAPIUpdateWorkloadV2 request with any body - WorkloadOptimizationAPIUpdateWorkloadV2WithBodyWithResponse(ctx context.Context, clusterId string, workloadId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIUpdateWorkloadV2Response, error) +// Status returns HTTPResponse.Status +func (r AllocationGroupAPIListAllocationGroupsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - WorkloadOptimizationAPIUpdateWorkloadV2WithResponse(ctx context.Context, clusterId string, workloadId string, body WorkloadOptimizationAPIUpdateWorkloadV2JSONRequestBody) (*WorkloadOptimizationAPIUpdateWorkloadV2Response, error) +// StatusCode returns HTTPResponse.StatusCode +func (r AllocationGroupAPIListAllocationGroupsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type Response interface { - Status() string - StatusCode() int - GetBody() []byte +// Body returns body of byte array +func (r AllocationGroupAPIListAllocationGroupsResponse) GetBody() []byte { + return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type CommitmentsAPIBatchDeleteCommitmentsResponse struct { +type AllocationGroupAPICreateAllocationGroupResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *map[string]interface{} + JSON200 *CostreportV1beta1AllocationGroup } // Status returns HTTPResponse.Status -func (r CommitmentsAPIBatchDeleteCommitmentsResponse) Status() string { +func (r AllocationGroupAPICreateAllocationGroupResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15160,7 +17049,7 @@ func (r CommitmentsAPIBatchDeleteCommitmentsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CommitmentsAPIBatchDeleteCommitmentsResponse) StatusCode() int { +func (r AllocationGroupAPICreateAllocationGroupResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15169,20 +17058,20 @@ func (r CommitmentsAPIBatchDeleteCommitmentsResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r CommitmentsAPIBatchDeleteCommitmentsResponse) GetBody() []byte { +func (r AllocationGroupAPICreateAllocationGroupResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type CommitmentsAPIBatchUpdateCommitmentsResponse struct { +type AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CastaiInventoryV1beta1BatchUpdateCommitmentsResponse + JSON200 *CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponse } // Status returns HTTPResponse.Status -func (r CommitmentsAPIBatchUpdateCommitmentsResponse) Status() string { +func (r AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15190,7 +17079,7 @@ func (r CommitmentsAPIBatchUpdateCommitmentsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CommitmentsAPIBatchUpdateCommitmentsResponse) StatusCode() int { +func (r AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15199,20 +17088,20 @@ func (r CommitmentsAPIBatchUpdateCommitmentsResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r CommitmentsAPIBatchUpdateCommitmentsResponse) GetBody() []byte { +func (r AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type CommitmentsAPIGetCommitmentUsageHistoryResponse struct { +type AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CastaiInventoryV1beta1GetCommitmentUsageHistoryResponse + JSON200 *CostreportV1beta1GetAllocationGroupEfficiencySummaryResponse } // Status returns HTTPResponse.Status -func (r CommitmentsAPIGetCommitmentUsageHistoryResponse) Status() string { +func (r AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15220,7 +17109,7 @@ func (r CommitmentsAPIGetCommitmentUsageHistoryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CommitmentsAPIGetCommitmentUsageHistoryResponse) StatusCode() int { +func (r AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15229,20 +17118,20 @@ func (r CommitmentsAPIGetCommitmentUsageHistoryResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r CommitmentsAPIGetCommitmentUsageHistoryResponse) GetBody() []byte { +func (r AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type CommitmentsAPIGetAWSReservedInstancesImportCMDResponse struct { +type AllocationGroupAPIGetCostAllocationGroupSummaryResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CastaiInventoryV1beta1GetAWSReservedInstancesImportCMDResponse + JSON200 *CostreportV1beta1GetCostAllocationGroupSummaryResponse } // Status returns HTTPResponse.Status -func (r CommitmentsAPIGetAWSReservedInstancesImportCMDResponse) Status() string { +func (r AllocationGroupAPIGetCostAllocationGroupSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15250,7 +17139,7 @@ func (r CommitmentsAPIGetAWSReservedInstancesImportCMDResponse) Status() string } // StatusCode returns HTTPResponse.StatusCode -func (r CommitmentsAPIGetAWSReservedInstancesImportCMDResponse) StatusCode() int { +func (r AllocationGroupAPIGetCostAllocationGroupSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15259,19 +17148,20 @@ func (r CommitmentsAPIGetAWSReservedInstancesImportCMDResponse) StatusCode() int // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r CommitmentsAPIGetAWSReservedInstancesImportCMDResponse) GetBody() []byte { +func (r AllocationGroupAPIGetCostAllocationGroupSummaryResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type CommitmentsAPIGetAWSReservedInstancesImportScriptResponse struct { +type AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponse } // Status returns HTTPResponse.Status -func (r CommitmentsAPIGetAWSReservedInstancesImportScriptResponse) Status() string { +func (r AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15279,7 +17169,7 @@ func (r CommitmentsAPIGetAWSReservedInstancesImportScriptResponse) Status() stri } // StatusCode returns HTTPResponse.StatusCode -func (r CommitmentsAPIGetAWSReservedInstancesImportScriptResponse) StatusCode() int { +func (r AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15288,20 +17178,20 @@ func (r CommitmentsAPIGetAWSReservedInstancesImportScriptResponse) StatusCode() // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r CommitmentsAPIGetAWSReservedInstancesImportScriptResponse) GetBody() []byte { +func (r AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type CommitmentsAPIImportAWSReservedInstancesResponse struct { +type AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *map[string]interface{} + JSON200 *CostreportV1beta1GetAllocationGroupWorkloadCostsResponse } // Status returns HTTPResponse.Status -func (r CommitmentsAPIImportAWSReservedInstancesResponse) Status() string { +func (r AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15309,7 +17199,7 @@ func (r CommitmentsAPIImportAWSReservedInstancesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CommitmentsAPIImportAWSReservedInstancesResponse) StatusCode() int { +func (r AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15318,20 +17208,20 @@ func (r CommitmentsAPIImportAWSReservedInstancesResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r CommitmentsAPIImportAWSReservedInstancesResponse) GetBody() []byte { +func (r AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type AuthTokenAPIListAuthTokensResponse struct { +type AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CastaiAuthtokenV1beta1ListAuthTokensResponse + JSON200 *CostreportV1beta1GetAllocationGroupWorkloadsEfficiencyResponse } // Status returns HTTPResponse.Status -func (r AuthTokenAPIListAuthTokensResponse) Status() string { +func (r AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15339,7 +17229,7 @@ func (r AuthTokenAPIListAuthTokensResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AuthTokenAPIListAuthTokensResponse) StatusCode() int { +func (r AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15348,20 +17238,20 @@ func (r AuthTokenAPIListAuthTokensResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r AuthTokenAPIListAuthTokensResponse) GetBody() []byte { +func (r AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type AuthTokenAPICreateAuthTokenResponse struct { +type AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CastaiAuthtokenV1beta1AuthToken + JSON200 *CostreportV1beta1GetCostAllocationGroupWorkloadsResponse } // Status returns HTTPResponse.Status -func (r AuthTokenAPICreateAuthTokenResponse) Status() string { +func (r AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15369,7 +17259,7 @@ func (r AuthTokenAPICreateAuthTokenResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AuthTokenAPICreateAuthTokenResponse) StatusCode() int { +func (r AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15378,20 +17268,20 @@ func (r AuthTokenAPICreateAuthTokenResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r AuthTokenAPICreateAuthTokenResponse) GetBody() []byte { +func (r AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type AuthTokenAPIDeleteAuthTokenResponse struct { +type AllocationGroupAPIDeleteAllocationGroupResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CastaiAuthtokenV1beta1DeleteAuthTokenResponse + JSON200 *CostreportV1beta1DeleteAllocationGroupResponse } // Status returns HTTPResponse.Status -func (r AuthTokenAPIDeleteAuthTokenResponse) Status() string { +func (r AllocationGroupAPIDeleteAllocationGroupResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15399,7 +17289,7 @@ func (r AuthTokenAPIDeleteAuthTokenResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AuthTokenAPIDeleteAuthTokenResponse) StatusCode() int { +func (r AllocationGroupAPIDeleteAllocationGroupResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15408,20 +17298,20 @@ func (r AuthTokenAPIDeleteAuthTokenResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r AuthTokenAPIDeleteAuthTokenResponse) GetBody() []byte { +func (r AllocationGroupAPIDeleteAllocationGroupResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type AuthTokenAPIGetAuthTokenResponse struct { +type AllocationGroupAPIGetAllocationGroupResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CastaiAuthtokenV1beta1AuthToken + JSON200 *CostreportV1beta1AllocationGroup } // Status returns HTTPResponse.Status -func (r AuthTokenAPIGetAuthTokenResponse) Status() string { +func (r AllocationGroupAPIGetAllocationGroupResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15429,7 +17319,7 @@ func (r AuthTokenAPIGetAuthTokenResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AuthTokenAPIGetAuthTokenResponse) StatusCode() int { +func (r AllocationGroupAPIGetAllocationGroupResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15438,20 +17328,20 @@ func (r AuthTokenAPIGetAuthTokenResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r AuthTokenAPIGetAuthTokenResponse) GetBody() []byte { +func (r AllocationGroupAPIGetAllocationGroupResponse) GetBody() []byte { return r.Body } // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 -type AuthTokenAPIUpdateAuthTokenResponse struct { +type AllocationGroupAPIUpdateAllocationGroupResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CastaiAuthtokenV1beta1AuthToken + JSON200 *CostreportV1beta1AllocationGroup } // Status returns HTTPResponse.Status -func (r AuthTokenAPIUpdateAuthTokenResponse) Status() string { +func (r AllocationGroupAPIUpdateAllocationGroupResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15459,7 +17349,7 @@ func (r AuthTokenAPIUpdateAuthTokenResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AuthTokenAPIUpdateAuthTokenResponse) StatusCode() int { +func (r AllocationGroupAPIUpdateAllocationGroupResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -15468,7 +17358,7 @@ func (r AuthTokenAPIUpdateAuthTokenResponse) StatusCode() int { // TODO: to have common interface. https://github.com/deepmap/oapi-codegen/issues/240 // Body returns body of byte array -func (r AuthTokenAPIUpdateAuthTokenResponse) GetBody() []byte { +func (r AllocationGroupAPIUpdateAllocationGroupResponse) GetBody() []byte { return r.Body } @@ -20952,33 +22842,184 @@ func (c *ClientWithResponses) AuthTokenAPIDeleteAuthTokenWithResponse(ctx contex if err != nil { return nil, err } - return ParseAuthTokenAPIDeleteAuthTokenResponse(rsp) + return ParseAuthTokenAPIDeleteAuthTokenResponse(rsp) +} + +// AuthTokenAPIGetAuthTokenWithResponse request returning *AuthTokenAPIGetAuthTokenResponse +func (c *ClientWithResponses) AuthTokenAPIGetAuthTokenWithResponse(ctx context.Context, id string) (*AuthTokenAPIGetAuthTokenResponse, error) { + rsp, err := c.AuthTokenAPIGetAuthToken(ctx, id) + if err != nil { + return nil, err + } + return ParseAuthTokenAPIGetAuthTokenResponse(rsp) +} + +// AuthTokenAPIUpdateAuthTokenWithBodyWithResponse request with arbitrary body returning *AuthTokenAPIUpdateAuthTokenResponse +func (c *ClientWithResponses) AuthTokenAPIUpdateAuthTokenWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*AuthTokenAPIUpdateAuthTokenResponse, error) { + rsp, err := c.AuthTokenAPIUpdateAuthTokenWithBody(ctx, id, contentType, body) + if err != nil { + return nil, err + } + return ParseAuthTokenAPIUpdateAuthTokenResponse(rsp) +} + +func (c *ClientWithResponses) AuthTokenAPIUpdateAuthTokenWithResponse(ctx context.Context, id string, body AuthTokenAPIUpdateAuthTokenJSONRequestBody) (*AuthTokenAPIUpdateAuthTokenResponse, error) { + rsp, err := c.AuthTokenAPIUpdateAuthToken(ctx, id, body) + if err != nil { + return nil, err + } + return ParseAuthTokenAPIUpdateAuthTokenResponse(rsp) +} + +// AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse request returning *AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse +func (c *ClientWithResponses) AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams) (*AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse, error) { + rsp, err := c.AllocationGroupAPIGetAllocationGroupCostTimedSummaries(ctx, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse(rsp) +} + +// AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse request returning *AllocationGroupAPIGetAllocationGroupCostSummariesResponse +func (c *ClientWithResponses) AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupCostSummariesParams) (*AllocationGroupAPIGetAllocationGroupCostSummariesResponse, error) { + rsp, err := c.AllocationGroupAPIGetAllocationGroupCostSummaries(ctx, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetAllocationGroupCostSummariesResponse(rsp) +} + +// AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse request returning *AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse +func (c *ClientWithResponses) AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupTotalCostTimedParams) (*AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse, error) { + rsp, err := c.AllocationGroupAPIGetAllocationGroupTotalCostTimed(ctx, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetAllocationGroupTotalCostTimedResponse(rsp) +} + +// AllocationGroupAPIListAllocationGroupsWithResponse request returning *AllocationGroupAPIListAllocationGroupsResponse +func (c *ClientWithResponses) AllocationGroupAPIListAllocationGroupsWithResponse(ctx context.Context, params *AllocationGroupAPIListAllocationGroupsParams) (*AllocationGroupAPIListAllocationGroupsResponse, error) { + rsp, err := c.AllocationGroupAPIListAllocationGroups(ctx, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIListAllocationGroupsResponse(rsp) +} + +// AllocationGroupAPICreateAllocationGroupWithBodyWithResponse request with arbitrary body returning *AllocationGroupAPICreateAllocationGroupResponse +func (c *ClientWithResponses) AllocationGroupAPICreateAllocationGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*AllocationGroupAPICreateAllocationGroupResponse, error) { + rsp, err := c.AllocationGroupAPICreateAllocationGroupWithBody(ctx, contentType, body) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPICreateAllocationGroupResponse(rsp) +} + +func (c *ClientWithResponses) AllocationGroupAPICreateAllocationGroupWithResponse(ctx context.Context, body AllocationGroupAPICreateAllocationGroupJSONRequestBody) (*AllocationGroupAPICreateAllocationGroupResponse, error) { + rsp, err := c.AllocationGroupAPICreateAllocationGroup(ctx, body) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPICreateAllocationGroupResponse(rsp) +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse request returning *AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse +func (c *ClientWithResponses) AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse(ctx context.Context, params *AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams) (*AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse, error) { + rsp, err := c.AllocationGroupAPIGetCostAllocationGroupDataTransferSummary(ctx, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse(rsp) +} + +// AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse request returning *AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse +func (c *ClientWithResponses) AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse(ctx context.Context, params *AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams) (*AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse, error) { + rsp, err := c.AllocationGroupAPIGetAllocationGroupEfficiencySummary(ctx, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse(rsp) +} + +// AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse request returning *AllocationGroupAPIGetCostAllocationGroupSummaryResponse +func (c *ClientWithResponses) AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse(ctx context.Context, params *AllocationGroupAPIGetCostAllocationGroupSummaryParams) (*AllocationGroupAPIGetCostAllocationGroupSummaryResponse, error) { + rsp, err := c.AllocationGroupAPIGetCostAllocationGroupSummary(ctx, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetCostAllocationGroupSummaryResponse(rsp) +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse request returning *AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse +func (c *ClientWithResponses) AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse(ctx context.Context, groupId string, params *AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams) (*AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse, error) { + rsp, err := c.AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads(ctx, groupId, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse(rsp) +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse request returning *AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse +func (c *ClientWithResponses) AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse(ctx context.Context, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadCostsParams) (*AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse, error) { + rsp, err := c.AllocationGroupAPIGetAllocationGroupWorkloadCosts(ctx, groupId, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetAllocationGroupWorkloadCostsResponse(rsp) +} + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse request returning *AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse +func (c *ClientWithResponses) AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse(ctx context.Context, groupId string, params *AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams) (*AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse, error) { + rsp, err := c.AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency(ctx, groupId, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse(rsp) +} + +// AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse request returning *AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse +func (c *ClientWithResponses) AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse(ctx context.Context, groupId string, params *AllocationGroupAPIGetCostAllocationGroupWorkloadsParams) (*AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse, error) { + rsp, err := c.AllocationGroupAPIGetCostAllocationGroupWorkloads(ctx, groupId, params) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIGetCostAllocationGroupWorkloadsResponse(rsp) +} + +// AllocationGroupAPIDeleteAllocationGroupWithResponse request returning *AllocationGroupAPIDeleteAllocationGroupResponse +func (c *ClientWithResponses) AllocationGroupAPIDeleteAllocationGroupWithResponse(ctx context.Context, id string) (*AllocationGroupAPIDeleteAllocationGroupResponse, error) { + rsp, err := c.AllocationGroupAPIDeleteAllocationGroup(ctx, id) + if err != nil { + return nil, err + } + return ParseAllocationGroupAPIDeleteAllocationGroupResponse(rsp) } -// AuthTokenAPIGetAuthTokenWithResponse request returning *AuthTokenAPIGetAuthTokenResponse -func (c *ClientWithResponses) AuthTokenAPIGetAuthTokenWithResponse(ctx context.Context, id string) (*AuthTokenAPIGetAuthTokenResponse, error) { - rsp, err := c.AuthTokenAPIGetAuthToken(ctx, id) +// AllocationGroupAPIGetAllocationGroupWithResponse request returning *AllocationGroupAPIGetAllocationGroupResponse +func (c *ClientWithResponses) AllocationGroupAPIGetAllocationGroupWithResponse(ctx context.Context, id string) (*AllocationGroupAPIGetAllocationGroupResponse, error) { + rsp, err := c.AllocationGroupAPIGetAllocationGroup(ctx, id) if err != nil { return nil, err } - return ParseAuthTokenAPIGetAuthTokenResponse(rsp) + return ParseAllocationGroupAPIGetAllocationGroupResponse(rsp) } -// AuthTokenAPIUpdateAuthTokenWithBodyWithResponse request with arbitrary body returning *AuthTokenAPIUpdateAuthTokenResponse -func (c *ClientWithResponses) AuthTokenAPIUpdateAuthTokenWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*AuthTokenAPIUpdateAuthTokenResponse, error) { - rsp, err := c.AuthTokenAPIUpdateAuthTokenWithBody(ctx, id, contentType, body) +// AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse request with arbitrary body returning *AllocationGroupAPIUpdateAllocationGroupResponse +func (c *ClientWithResponses) AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*AllocationGroupAPIUpdateAllocationGroupResponse, error) { + rsp, err := c.AllocationGroupAPIUpdateAllocationGroupWithBody(ctx, id, contentType, body) if err != nil { return nil, err } - return ParseAuthTokenAPIUpdateAuthTokenResponse(rsp) + return ParseAllocationGroupAPIUpdateAllocationGroupResponse(rsp) } -func (c *ClientWithResponses) AuthTokenAPIUpdateAuthTokenWithResponse(ctx context.Context, id string, body AuthTokenAPIUpdateAuthTokenJSONRequestBody) (*AuthTokenAPIUpdateAuthTokenResponse, error) { - rsp, err := c.AuthTokenAPIUpdateAuthToken(ctx, id, body) +func (c *ClientWithResponses) AllocationGroupAPIUpdateAllocationGroupWithResponse(ctx context.Context, id string, body AllocationGroupAPIUpdateAllocationGroupJSONRequestBody) (*AllocationGroupAPIUpdateAllocationGroupResponse, error) { + rsp, err := c.AllocationGroupAPIUpdateAllocationGroup(ctx, id, body) if err != nil { return nil, err } - return ParseAuthTokenAPIUpdateAuthTokenResponse(rsp) + return ParseAllocationGroupAPIUpdateAllocationGroupResponse(rsp) } // InventoryAPIListInstanceTypeNamesWithResponse request returning *InventoryAPIListInstanceTypeNamesResponse @@ -22806,328 +24847,708 @@ func (c *ClientWithResponses) SSOAPICreateSSOConnectionWithBodyWithResponse(ctx return ParseSSOAPICreateSSOConnectionResponse(rsp) } -func (c *ClientWithResponses) SSOAPICreateSSOConnectionWithResponse(ctx context.Context, body SSOAPICreateSSOConnectionJSONRequestBody) (*SSOAPICreateSSOConnectionResponse, error) { - rsp, err := c.SSOAPICreateSSOConnection(ctx, body) +func (c *ClientWithResponses) SSOAPICreateSSOConnectionWithResponse(ctx context.Context, body SSOAPICreateSSOConnectionJSONRequestBody) (*SSOAPICreateSSOConnectionResponse, error) { + rsp, err := c.SSOAPICreateSSOConnection(ctx, body) + if err != nil { + return nil, err + } + return ParseSSOAPICreateSSOConnectionResponse(rsp) +} + +// SSOAPIDeleteSSOConnectionWithResponse request returning *SSOAPIDeleteSSOConnectionResponse +func (c *ClientWithResponses) SSOAPIDeleteSSOConnectionWithResponse(ctx context.Context, id string) (*SSOAPIDeleteSSOConnectionResponse, error) { + rsp, err := c.SSOAPIDeleteSSOConnection(ctx, id) + if err != nil { + return nil, err + } + return ParseSSOAPIDeleteSSOConnectionResponse(rsp) +} + +// SSOAPIGetSSOConnectionWithResponse request returning *SSOAPIGetSSOConnectionResponse +func (c *ClientWithResponses) SSOAPIGetSSOConnectionWithResponse(ctx context.Context, id string) (*SSOAPIGetSSOConnectionResponse, error) { + rsp, err := c.SSOAPIGetSSOConnection(ctx, id) + if err != nil { + return nil, err + } + return ParseSSOAPIGetSSOConnectionResponse(rsp) +} + +// SSOAPIUpdateSSOConnectionWithBodyWithResponse request with arbitrary body returning *SSOAPIUpdateSSOConnectionResponse +func (c *ClientWithResponses) SSOAPIUpdateSSOConnectionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*SSOAPIUpdateSSOConnectionResponse, error) { + rsp, err := c.SSOAPIUpdateSSOConnectionWithBody(ctx, id, contentType, body) + if err != nil { + return nil, err + } + return ParseSSOAPIUpdateSSOConnectionResponse(rsp) +} + +func (c *ClientWithResponses) SSOAPIUpdateSSOConnectionWithResponse(ctx context.Context, id string, body SSOAPIUpdateSSOConnectionJSONRequestBody) (*SSOAPIUpdateSSOConnectionResponse, error) { + rsp, err := c.SSOAPIUpdateSSOConnection(ctx, id, body) + if err != nil { + return nil, err + } + return ParseSSOAPIUpdateSSOConnectionResponse(rsp) +} + +// SSOAPISetSyncForSSOConnectionWithBodyWithResponse request with arbitrary body returning *SSOAPISetSyncForSSOConnectionResponse +func (c *ClientWithResponses) SSOAPISetSyncForSSOConnectionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*SSOAPISetSyncForSSOConnectionResponse, error) { + rsp, err := c.SSOAPISetSyncForSSOConnectionWithBody(ctx, id, contentType, body) + if err != nil { + return nil, err + } + return ParseSSOAPISetSyncForSSOConnectionResponse(rsp) +} + +func (c *ClientWithResponses) SSOAPISetSyncForSSOConnectionWithResponse(ctx context.Context, id string, body SSOAPISetSyncForSSOConnectionJSONRequestBody) (*SSOAPISetSyncForSSOConnectionResponse, error) { + rsp, err := c.SSOAPISetSyncForSSOConnection(ctx, id, body) + if err != nil { + return nil, err + } + return ParseSSOAPISetSyncForSSOConnectionResponse(rsp) +} + +// ScheduledRebalancingAPIListAvailableRebalancingTZWithResponse request returning *ScheduledRebalancingAPIListAvailableRebalancingTZResponse +func (c *ClientWithResponses) ScheduledRebalancingAPIListAvailableRebalancingTZWithResponse(ctx context.Context) (*ScheduledRebalancingAPIListAvailableRebalancingTZResponse, error) { + rsp, err := c.ScheduledRebalancingAPIListAvailableRebalancingTZ(ctx) + if err != nil { + return nil, err + } + return ParseScheduledRebalancingAPIListAvailableRebalancingTZResponse(rsp) +} + +// WorkloadOptimizationAPIGetAgentStatusWithResponse request returning *WorkloadOptimizationAPIGetAgentStatusResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIGetAgentStatusWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIGetAgentStatusResponse, error) { + rsp, err := c.WorkloadOptimizationAPIGetAgentStatus(ctx, clusterId) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIGetAgentStatusResponse(rsp) +} + +// WorkloadOptimizationAPIListLimitRangesWithResponse request returning *WorkloadOptimizationAPIListLimitRangesResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIListLimitRangesWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListLimitRangesResponse, error) { + rsp, err := c.WorkloadOptimizationAPIListLimitRanges(ctx, clusterId) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIListLimitRangesResponse(rsp) +} + +// WorkloadOptimizationAPIListWorkloadScalingPoliciesWithResponse request returning *WorkloadOptimizationAPIListWorkloadScalingPoliciesResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIListWorkloadScalingPoliciesWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListWorkloadScalingPoliciesResponse, error) { + rsp, err := c.WorkloadOptimizationAPIListWorkloadScalingPolicies(ctx, clusterId) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIListWorkloadScalingPoliciesResponse(rsp) +} + +// WorkloadOptimizationAPICreateWorkloadScalingPolicyWithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse +func (c *ClientWithResponses) WorkloadOptimizationAPICreateWorkloadScalingPolicyWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse, error) { + rsp, err := c.WorkloadOptimizationAPICreateWorkloadScalingPolicyWithBody(ctx, clusterId, contentType, body) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPICreateWorkloadScalingPolicyResponse(rsp) +} + +func (c *ClientWithResponses) WorkloadOptimizationAPICreateWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, body WorkloadOptimizationAPICreateWorkloadScalingPolicyJSONRequestBody) (*WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse, error) { + rsp, err := c.WorkloadOptimizationAPICreateWorkloadScalingPolicy(ctx, clusterId, body) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPICreateWorkloadScalingPolicyResponse(rsp) +} + +// WorkloadOptimizationAPISetScalingPoliciesOrderWithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPISetScalingPoliciesOrderResponse +func (c *ClientWithResponses) WorkloadOptimizationAPISetScalingPoliciesOrderWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*WorkloadOptimizationAPISetScalingPoliciesOrderResponse, error) { + rsp, err := c.WorkloadOptimizationAPISetScalingPoliciesOrderWithBody(ctx, clusterId, contentType, body) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPISetScalingPoliciesOrderResponse(rsp) +} + +func (c *ClientWithResponses) WorkloadOptimizationAPISetScalingPoliciesOrderWithResponse(ctx context.Context, clusterId string, body WorkloadOptimizationAPISetScalingPoliciesOrderJSONRequestBody) (*WorkloadOptimizationAPISetScalingPoliciesOrderResponse, error) { + rsp, err := c.WorkloadOptimizationAPISetScalingPoliciesOrder(ctx, clusterId, body) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPISetScalingPoliciesOrderResponse(rsp) +} + +// WorkloadOptimizationAPIDeleteWorkloadScalingPolicyWithResponse request returning *WorkloadOptimizationAPIDeleteWorkloadScalingPolicyResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIDeleteWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string) (*WorkloadOptimizationAPIDeleteWorkloadScalingPolicyResponse, error) { + rsp, err := c.WorkloadOptimizationAPIDeleteWorkloadScalingPolicy(ctx, clusterId, policyId) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIDeleteWorkloadScalingPolicyResponse(rsp) +} + +// WorkloadOptimizationAPIGetWorkloadScalingPolicyWithResponse request returning *WorkloadOptimizationAPIGetWorkloadScalingPolicyResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string) (*WorkloadOptimizationAPIGetWorkloadScalingPolicyResponse, error) { + rsp, err := c.WorkloadOptimizationAPIGetWorkloadScalingPolicy(ctx, clusterId, policyId) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIGetWorkloadScalingPolicyResponse(rsp) +} + +// WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithBodyWithResponse(ctx context.Context, clusterId string, policyId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse, error) { + rsp, err := c.WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithBody(ctx, clusterId, policyId, contentType, body) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse(rsp) +} + +func (c *ClientWithResponses) WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string, body WorkloadOptimizationAPIUpdateWorkloadScalingPolicyJSONRequestBody) (*WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse, error) { + rsp, err := c.WorkloadOptimizationAPIUpdateWorkloadScalingPolicy(ctx, clusterId, policyId, body) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse(rsp) +} + +// WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithBodyWithResponse(ctx context.Context, clusterId string, policyId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse, error) { + rsp, err := c.WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithBody(ctx, clusterId, policyId, contentType, body) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse(rsp) +} + +func (c *ClientWithResponses) WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithResponse(ctx context.Context, clusterId string, policyId string, body WorkloadOptimizationAPIAssignScalingPolicyWorkloadsJSONRequestBody) (*WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse, error) { + rsp, err := c.WorkloadOptimizationAPIAssignScalingPolicyWorkloads(ctx, clusterId, policyId, body) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse(rsp) +} + +// WorkloadOptimizationAPIListResourceQuotasWithResponse request returning *WorkloadOptimizationAPIListResourceQuotasResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIListResourceQuotasWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListResourceQuotasResponse, error) { + rsp, err := c.WorkloadOptimizationAPIListResourceQuotas(ctx, clusterId) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIListResourceQuotasResponse(rsp) +} + +// WorkloadOptimizationAPIListWorkloadEventsWithResponse request returning *WorkloadOptimizationAPIListWorkloadEventsResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIListWorkloadEventsWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIListWorkloadEventsParams) (*WorkloadOptimizationAPIListWorkloadEventsResponse, error) { + rsp, err := c.WorkloadOptimizationAPIListWorkloadEvents(ctx, clusterId, params) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIListWorkloadEventsResponse(rsp) +} + +// WorkloadOptimizationAPIGetWorkloadEventWithResponse request returning *WorkloadOptimizationAPIGetWorkloadEventResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadEventWithResponse(ctx context.Context, clusterId string, eventId string, params *WorkloadOptimizationAPIGetWorkloadEventParams) (*WorkloadOptimizationAPIGetWorkloadEventResponse, error) { + rsp, err := c.WorkloadOptimizationAPIGetWorkloadEvent(ctx, clusterId, eventId, params) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIGetWorkloadEventResponse(rsp) +} + +// WorkloadOptimizationAPIListWorkloadsWithResponse request returning *WorkloadOptimizationAPIListWorkloadsResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIListWorkloadsWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListWorkloadsResponse, error) { + rsp, err := c.WorkloadOptimizationAPIListWorkloads(ctx, clusterId) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIListWorkloadsResponse(rsp) +} + +// WorkloadOptimizationAPIGetWorkloadsSummaryWithResponse request returning *WorkloadOptimizationAPIGetWorkloadsSummaryResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadsSummaryWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryParams) (*WorkloadOptimizationAPIGetWorkloadsSummaryResponse, error) { + rsp, err := c.WorkloadOptimizationAPIGetWorkloadsSummary(ctx, clusterId, params) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIGetWorkloadsSummaryResponse(rsp) +} + +// WorkloadOptimizationAPIGetWorkloadsSummaryMetricsWithResponse request returning *WorkloadOptimizationAPIGetWorkloadsSummaryMetricsResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadsSummaryMetricsWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryMetricsParams) (*WorkloadOptimizationAPIGetWorkloadsSummaryMetricsResponse, error) { + rsp, err := c.WorkloadOptimizationAPIGetWorkloadsSummaryMetrics(ctx, clusterId, params) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIGetWorkloadsSummaryMetricsResponse(rsp) +} + +// WorkloadOptimizationAPIGetWorkloadWithResponse request returning *WorkloadOptimizationAPIGetWorkloadResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadWithResponse(ctx context.Context, clusterId string, workloadId string, params *WorkloadOptimizationAPIGetWorkloadParams) (*WorkloadOptimizationAPIGetWorkloadResponse, error) { + rsp, err := c.WorkloadOptimizationAPIGetWorkload(ctx, clusterId, workloadId, params) + if err != nil { + return nil, err + } + return ParseWorkloadOptimizationAPIGetWorkloadResponse(rsp) +} + +// WorkloadOptimizationAPIGetInstallCmdWithResponse request returning *WorkloadOptimizationAPIGetInstallCmdResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIGetInstallCmdWithResponse(ctx context.Context, params *WorkloadOptimizationAPIGetInstallCmdParams) (*WorkloadOptimizationAPIGetInstallCmdResponse, error) { + rsp, err := c.WorkloadOptimizationAPIGetInstallCmd(ctx, params) if err != nil { return nil, err } - return ParseSSOAPICreateSSOConnectionResponse(rsp) + return ParseWorkloadOptimizationAPIGetInstallCmdResponse(rsp) } -// SSOAPIDeleteSSOConnectionWithResponse request returning *SSOAPIDeleteSSOConnectionResponse -func (c *ClientWithResponses) SSOAPIDeleteSSOConnectionWithResponse(ctx context.Context, id string) (*SSOAPIDeleteSSOConnectionResponse, error) { - rsp, err := c.SSOAPIDeleteSSOConnection(ctx, id) +// WorkloadOptimizationAPIGetInstallScriptWithResponse request returning *WorkloadOptimizationAPIGetInstallScriptResponse +func (c *ClientWithResponses) WorkloadOptimizationAPIGetInstallScriptWithResponse(ctx context.Context, params *WorkloadOptimizationAPIGetInstallScriptParams) (*WorkloadOptimizationAPIGetInstallScriptResponse, error) { + rsp, err := c.WorkloadOptimizationAPIGetInstallScript(ctx, params) if err != nil { return nil, err } - return ParseSSOAPIDeleteSSOConnectionResponse(rsp) + return ParseWorkloadOptimizationAPIGetInstallScriptResponse(rsp) } -// SSOAPIGetSSOConnectionWithResponse request returning *SSOAPIGetSSOConnectionResponse -func (c *ClientWithResponses) SSOAPIGetSSOConnectionWithResponse(ctx context.Context, id string) (*SSOAPIGetSSOConnectionResponse, error) { - rsp, err := c.SSOAPIGetSSOConnection(ctx, id) +// InventoryAPIListZonesWithResponse request returning *InventoryAPIListZonesResponse +func (c *ClientWithResponses) InventoryAPIListZonesWithResponse(ctx context.Context, params *InventoryAPIListZonesParams) (*InventoryAPIListZonesResponse, error) { + rsp, err := c.InventoryAPIListZones(ctx, params) if err != nil { return nil, err } - return ParseSSOAPIGetSSOConnectionResponse(rsp) + return ParseInventoryAPIListZonesResponse(rsp) } -// SSOAPIUpdateSSOConnectionWithBodyWithResponse request with arbitrary body returning *SSOAPIUpdateSSOConnectionResponse -func (c *ClientWithResponses) SSOAPIUpdateSSOConnectionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*SSOAPIUpdateSSOConnectionResponse, error) { - rsp, err := c.SSOAPIUpdateSSOConnectionWithBody(ctx, id, contentType, body) +// WorkloadOptimizationAPIPatchWorkloadV2WithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPIPatchWorkloadV2Response +func (c *ClientWithResponses) WorkloadOptimizationAPIPatchWorkloadV2WithBodyWithResponse(ctx context.Context, clusterId string, workloadId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIPatchWorkloadV2Response, error) { + rsp, err := c.WorkloadOptimizationAPIPatchWorkloadV2WithBody(ctx, clusterId, workloadId, contentType, body) if err != nil { return nil, err } - return ParseSSOAPIUpdateSSOConnectionResponse(rsp) + return ParseWorkloadOptimizationAPIPatchWorkloadV2Response(rsp) } -func (c *ClientWithResponses) SSOAPIUpdateSSOConnectionWithResponse(ctx context.Context, id string, body SSOAPIUpdateSSOConnectionJSONRequestBody) (*SSOAPIUpdateSSOConnectionResponse, error) { - rsp, err := c.SSOAPIUpdateSSOConnection(ctx, id, body) +func (c *ClientWithResponses) WorkloadOptimizationAPIPatchWorkloadV2WithResponse(ctx context.Context, clusterId string, workloadId string, body WorkloadOptimizationAPIPatchWorkloadV2JSONRequestBody) (*WorkloadOptimizationAPIPatchWorkloadV2Response, error) { + rsp, err := c.WorkloadOptimizationAPIPatchWorkloadV2(ctx, clusterId, workloadId, body) if err != nil { return nil, err } - return ParseSSOAPIUpdateSSOConnectionResponse(rsp) + return ParseWorkloadOptimizationAPIPatchWorkloadV2Response(rsp) } -// SSOAPISetSyncForSSOConnectionWithBodyWithResponse request with arbitrary body returning *SSOAPISetSyncForSSOConnectionResponse -func (c *ClientWithResponses) SSOAPISetSyncForSSOConnectionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader) (*SSOAPISetSyncForSSOConnectionResponse, error) { - rsp, err := c.SSOAPISetSyncForSSOConnectionWithBody(ctx, id, contentType, body) +// WorkloadOptimizationAPIUpdateWorkloadV2WithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPIUpdateWorkloadV2Response +func (c *ClientWithResponses) WorkloadOptimizationAPIUpdateWorkloadV2WithBodyWithResponse(ctx context.Context, clusterId string, workloadId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIUpdateWorkloadV2Response, error) { + rsp, err := c.WorkloadOptimizationAPIUpdateWorkloadV2WithBody(ctx, clusterId, workloadId, contentType, body) if err != nil { return nil, err } - return ParseSSOAPISetSyncForSSOConnectionResponse(rsp) + return ParseWorkloadOptimizationAPIUpdateWorkloadV2Response(rsp) } -func (c *ClientWithResponses) SSOAPISetSyncForSSOConnectionWithResponse(ctx context.Context, id string, body SSOAPISetSyncForSSOConnectionJSONRequestBody) (*SSOAPISetSyncForSSOConnectionResponse, error) { - rsp, err := c.SSOAPISetSyncForSSOConnection(ctx, id, body) +func (c *ClientWithResponses) WorkloadOptimizationAPIUpdateWorkloadV2WithResponse(ctx context.Context, clusterId string, workloadId string, body WorkloadOptimizationAPIUpdateWorkloadV2JSONRequestBody) (*WorkloadOptimizationAPIUpdateWorkloadV2Response, error) { + rsp, err := c.WorkloadOptimizationAPIUpdateWorkloadV2(ctx, clusterId, workloadId, body) if err != nil { return nil, err } - return ParseSSOAPISetSyncForSSOConnectionResponse(rsp) + return ParseWorkloadOptimizationAPIUpdateWorkloadV2Response(rsp) } -// ScheduledRebalancingAPIListAvailableRebalancingTZWithResponse request returning *ScheduledRebalancingAPIListAvailableRebalancingTZResponse -func (c *ClientWithResponses) ScheduledRebalancingAPIListAvailableRebalancingTZWithResponse(ctx context.Context) (*ScheduledRebalancingAPIListAvailableRebalancingTZResponse, error) { - rsp, err := c.ScheduledRebalancingAPIListAvailableRebalancingTZ(ctx) +// ParseCommitmentsAPIBatchDeleteCommitmentsResponse parses an HTTP response from a CommitmentsAPIBatchDeleteCommitmentsWithResponse call +func ParseCommitmentsAPIBatchDeleteCommitmentsResponse(rsp *http.Response) (*CommitmentsAPIBatchDeleteCommitmentsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseScheduledRebalancingAPIListAvailableRebalancingTZResponse(rsp) + + response := &CommitmentsAPIBatchDeleteCommitmentsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// WorkloadOptimizationAPIGetAgentStatusWithResponse request returning *WorkloadOptimizationAPIGetAgentStatusResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIGetAgentStatusWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIGetAgentStatusResponse, error) { - rsp, err := c.WorkloadOptimizationAPIGetAgentStatus(ctx, clusterId) +// ParseCommitmentsAPIBatchUpdateCommitmentsResponse parses an HTTP response from a CommitmentsAPIBatchUpdateCommitmentsWithResponse call +func ParseCommitmentsAPIBatchUpdateCommitmentsResponse(rsp *http.Response) (*CommitmentsAPIBatchUpdateCommitmentsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIGetAgentStatusResponse(rsp) + + response := &CommitmentsAPIBatchUpdateCommitmentsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CastaiInventoryV1beta1BatchUpdateCommitmentsResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// WorkloadOptimizationAPIListLimitRangesWithResponse request returning *WorkloadOptimizationAPIListLimitRangesResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIListLimitRangesWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListLimitRangesResponse, error) { - rsp, err := c.WorkloadOptimizationAPIListLimitRanges(ctx, clusterId) +// ParseCommitmentsAPIGetCommitmentUsageHistoryResponse parses an HTTP response from a CommitmentsAPIGetCommitmentUsageHistoryWithResponse call +func ParseCommitmentsAPIGetCommitmentUsageHistoryResponse(rsp *http.Response) (*CommitmentsAPIGetCommitmentUsageHistoryResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIListLimitRangesResponse(rsp) + + response := &CommitmentsAPIGetCommitmentUsageHistoryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CastaiInventoryV1beta1GetCommitmentUsageHistoryResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// WorkloadOptimizationAPIListWorkloadScalingPoliciesWithResponse request returning *WorkloadOptimizationAPIListWorkloadScalingPoliciesResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIListWorkloadScalingPoliciesWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListWorkloadScalingPoliciesResponse, error) { - rsp, err := c.WorkloadOptimizationAPIListWorkloadScalingPolicies(ctx, clusterId) +// ParseCommitmentsAPIGetAWSReservedInstancesImportCMDResponse parses an HTTP response from a CommitmentsAPIGetAWSReservedInstancesImportCMDWithResponse call +func ParseCommitmentsAPIGetAWSReservedInstancesImportCMDResponse(rsp *http.Response) (*CommitmentsAPIGetAWSReservedInstancesImportCMDResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIListWorkloadScalingPoliciesResponse(rsp) + + response := &CommitmentsAPIGetAWSReservedInstancesImportCMDResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CastaiInventoryV1beta1GetAWSReservedInstancesImportCMDResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// WorkloadOptimizationAPICreateWorkloadScalingPolicyWithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse -func (c *ClientWithResponses) WorkloadOptimizationAPICreateWorkloadScalingPolicyWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse, error) { - rsp, err := c.WorkloadOptimizationAPICreateWorkloadScalingPolicyWithBody(ctx, clusterId, contentType, body) +// ParseCommitmentsAPIGetAWSReservedInstancesImportScriptResponse parses an HTTP response from a CommitmentsAPIGetAWSReservedInstancesImportScriptWithResponse call +func ParseCommitmentsAPIGetAWSReservedInstancesImportScriptResponse(rsp *http.Response) (*CommitmentsAPIGetAWSReservedInstancesImportScriptResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPICreateWorkloadScalingPolicyResponse(rsp) + + response := &CommitmentsAPIGetAWSReservedInstancesImportScriptResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -func (c *ClientWithResponses) WorkloadOptimizationAPICreateWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, body WorkloadOptimizationAPICreateWorkloadScalingPolicyJSONRequestBody) (*WorkloadOptimizationAPICreateWorkloadScalingPolicyResponse, error) { - rsp, err := c.WorkloadOptimizationAPICreateWorkloadScalingPolicy(ctx, clusterId, body) +// ParseCommitmentsAPIImportAWSReservedInstancesResponse parses an HTTP response from a CommitmentsAPIImportAWSReservedInstancesWithResponse call +func ParseCommitmentsAPIImportAWSReservedInstancesResponse(rsp *http.Response) (*CommitmentsAPIImportAWSReservedInstancesResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPICreateWorkloadScalingPolicyResponse(rsp) + + response := &CommitmentsAPIImportAWSReservedInstancesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// WorkloadOptimizationAPISetScalingPoliciesOrderWithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPISetScalingPoliciesOrderResponse -func (c *ClientWithResponses) WorkloadOptimizationAPISetScalingPoliciesOrderWithBodyWithResponse(ctx context.Context, clusterId string, contentType string, body io.Reader) (*WorkloadOptimizationAPISetScalingPoliciesOrderResponse, error) { - rsp, err := c.WorkloadOptimizationAPISetScalingPoliciesOrderWithBody(ctx, clusterId, contentType, body) +// ParseAuthTokenAPIListAuthTokensResponse parses an HTTP response from a AuthTokenAPIListAuthTokensWithResponse call +func ParseAuthTokenAPIListAuthTokensResponse(rsp *http.Response) (*AuthTokenAPIListAuthTokensResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPISetScalingPoliciesOrderResponse(rsp) + + response := &AuthTokenAPIListAuthTokensResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CastaiAuthtokenV1beta1ListAuthTokensResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -func (c *ClientWithResponses) WorkloadOptimizationAPISetScalingPoliciesOrderWithResponse(ctx context.Context, clusterId string, body WorkloadOptimizationAPISetScalingPoliciesOrderJSONRequestBody) (*WorkloadOptimizationAPISetScalingPoliciesOrderResponse, error) { - rsp, err := c.WorkloadOptimizationAPISetScalingPoliciesOrder(ctx, clusterId, body) +// ParseAuthTokenAPICreateAuthTokenResponse parses an HTTP response from a AuthTokenAPICreateAuthTokenWithResponse call +func ParseAuthTokenAPICreateAuthTokenResponse(rsp *http.Response) (*AuthTokenAPICreateAuthTokenResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPISetScalingPoliciesOrderResponse(rsp) + + response := &AuthTokenAPICreateAuthTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CastaiAuthtokenV1beta1AuthToken + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil } -// WorkloadOptimizationAPIDeleteWorkloadScalingPolicyWithResponse request returning *WorkloadOptimizationAPIDeleteWorkloadScalingPolicyResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIDeleteWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string) (*WorkloadOptimizationAPIDeleteWorkloadScalingPolicyResponse, error) { - rsp, err := c.WorkloadOptimizationAPIDeleteWorkloadScalingPolicy(ctx, clusterId, policyId) +// ParseAuthTokenAPIDeleteAuthTokenResponse parses an HTTP response from a AuthTokenAPIDeleteAuthTokenWithResponse call +func ParseAuthTokenAPIDeleteAuthTokenResponse(rsp *http.Response) (*AuthTokenAPIDeleteAuthTokenResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIDeleteWorkloadScalingPolicyResponse(rsp) -} -// WorkloadOptimizationAPIGetWorkloadScalingPolicyWithResponse request returning *WorkloadOptimizationAPIGetWorkloadScalingPolicyResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string) (*WorkloadOptimizationAPIGetWorkloadScalingPolicyResponse, error) { - rsp, err := c.WorkloadOptimizationAPIGetWorkloadScalingPolicy(ctx, clusterId, policyId) - if err != nil { - return nil, err + response := &AuthTokenAPIDeleteAuthTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CastaiAuthtokenV1beta1DeleteAuthTokenResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseWorkloadOptimizationAPIGetWorkloadScalingPolicyResponse(rsp) + + return response, nil } -// WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithBodyWithResponse(ctx context.Context, clusterId string, policyId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse, error) { - rsp, err := c.WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithBody(ctx, clusterId, policyId, contentType, body) +// ParseAuthTokenAPIGetAuthTokenResponse parses an HTTP response from a AuthTokenAPIGetAuthTokenWithResponse call +func ParseAuthTokenAPIGetAuthTokenResponse(rsp *http.Response) (*AuthTokenAPIGetAuthTokenResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse(rsp) -} -func (c *ClientWithResponses) WorkloadOptimizationAPIUpdateWorkloadScalingPolicyWithResponse(ctx context.Context, clusterId string, policyId string, body WorkloadOptimizationAPIUpdateWorkloadScalingPolicyJSONRequestBody) (*WorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse, error) { - rsp, err := c.WorkloadOptimizationAPIUpdateWorkloadScalingPolicy(ctx, clusterId, policyId, body) - if err != nil { - return nil, err + response := &AuthTokenAPIGetAuthTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseWorkloadOptimizationAPIUpdateWorkloadScalingPolicyResponse(rsp) -} -// WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithBodyWithResponse(ctx context.Context, clusterId string, policyId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse, error) { - rsp, err := c.WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithBody(ctx, clusterId, policyId, contentType, body) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CastaiAuthtokenV1beta1AuthToken + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseWorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) WorkloadOptimizationAPIAssignScalingPolicyWorkloadsWithResponse(ctx context.Context, clusterId string, policyId string, body WorkloadOptimizationAPIAssignScalingPolicyWorkloadsJSONRequestBody) (*WorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse, error) { - rsp, err := c.WorkloadOptimizationAPIAssignScalingPolicyWorkloads(ctx, clusterId, policyId, body) +// ParseAuthTokenAPIUpdateAuthTokenResponse parses an HTTP response from a AuthTokenAPIUpdateAuthTokenWithResponse call +func ParseAuthTokenAPIUpdateAuthTokenResponse(rsp *http.Response) (*AuthTokenAPIUpdateAuthTokenResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIAssignScalingPolicyWorkloadsResponse(rsp) -} -// WorkloadOptimizationAPIListResourceQuotasWithResponse request returning *WorkloadOptimizationAPIListResourceQuotasResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIListResourceQuotasWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListResourceQuotasResponse, error) { - rsp, err := c.WorkloadOptimizationAPIListResourceQuotas(ctx, clusterId) - if err != nil { - return nil, err + response := &AuthTokenAPIUpdateAuthTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseWorkloadOptimizationAPIListResourceQuotasResponse(rsp) -} -// WorkloadOptimizationAPIListWorkloadEventsWithResponse request returning *WorkloadOptimizationAPIListWorkloadEventsResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIListWorkloadEventsWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIListWorkloadEventsParams) (*WorkloadOptimizationAPIListWorkloadEventsResponse, error) { - rsp, err := c.WorkloadOptimizationAPIListWorkloadEvents(ctx, clusterId, params) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CastaiAuthtokenV1beta1AuthToken + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseWorkloadOptimizationAPIListWorkloadEventsResponse(rsp) + + return response, nil } -// WorkloadOptimizationAPIGetWorkloadEventWithResponse request returning *WorkloadOptimizationAPIGetWorkloadEventResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadEventWithResponse(ctx context.Context, clusterId string, eventId string, params *WorkloadOptimizationAPIGetWorkloadEventParams) (*WorkloadOptimizationAPIGetWorkloadEventResponse, error) { - rsp, err := c.WorkloadOptimizationAPIGetWorkloadEvent(ctx, clusterId, eventId, params) +// ParseAllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse parses an HTTP response from a AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse call +func ParseAllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse(rsp *http.Response) (*AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIGetWorkloadEventResponse(rsp) -} -// WorkloadOptimizationAPIListWorkloadsWithResponse request returning *WorkloadOptimizationAPIListWorkloadsResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIListWorkloadsWithResponse(ctx context.Context, clusterId string) (*WorkloadOptimizationAPIListWorkloadsResponse, error) { - rsp, err := c.WorkloadOptimizationAPIListWorkloads(ctx, clusterId) - if err != nil { - return nil, err + response := &AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseWorkloadOptimizationAPIListWorkloadsResponse(rsp) -} -// WorkloadOptimizationAPIGetWorkloadsSummaryWithResponse request returning *WorkloadOptimizationAPIGetWorkloadsSummaryResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadsSummaryWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryParams) (*WorkloadOptimizationAPIGetWorkloadsSummaryResponse, error) { - rsp, err := c.WorkloadOptimizationAPIGetWorkloadsSummary(ctx, clusterId, params) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CostreportV1beta1GetAllocationGroupCostTimedSummariesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseWorkloadOptimizationAPIGetWorkloadsSummaryResponse(rsp) + + return response, nil } -// WorkloadOptimizationAPIGetWorkloadsSummaryMetricsWithResponse request returning *WorkloadOptimizationAPIGetWorkloadsSummaryMetricsResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadsSummaryMetricsWithResponse(ctx context.Context, clusterId string, params *WorkloadOptimizationAPIGetWorkloadsSummaryMetricsParams) (*WorkloadOptimizationAPIGetWorkloadsSummaryMetricsResponse, error) { - rsp, err := c.WorkloadOptimizationAPIGetWorkloadsSummaryMetrics(ctx, clusterId, params) +// ParseAllocationGroupAPIGetAllocationGroupCostSummariesResponse parses an HTTP response from a AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse call +func ParseAllocationGroupAPIGetAllocationGroupCostSummariesResponse(rsp *http.Response) (*AllocationGroupAPIGetAllocationGroupCostSummariesResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIGetWorkloadsSummaryMetricsResponse(rsp) -} -// WorkloadOptimizationAPIGetWorkloadWithResponse request returning *WorkloadOptimizationAPIGetWorkloadResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIGetWorkloadWithResponse(ctx context.Context, clusterId string, workloadId string, params *WorkloadOptimizationAPIGetWorkloadParams) (*WorkloadOptimizationAPIGetWorkloadResponse, error) { - rsp, err := c.WorkloadOptimizationAPIGetWorkload(ctx, clusterId, workloadId, params) - if err != nil { - return nil, err + response := &AllocationGroupAPIGetAllocationGroupCostSummariesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseWorkloadOptimizationAPIGetWorkloadResponse(rsp) -} -// WorkloadOptimizationAPIGetInstallCmdWithResponse request returning *WorkloadOptimizationAPIGetInstallCmdResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIGetInstallCmdWithResponse(ctx context.Context, params *WorkloadOptimizationAPIGetInstallCmdParams) (*WorkloadOptimizationAPIGetInstallCmdResponse, error) { - rsp, err := c.WorkloadOptimizationAPIGetInstallCmd(ctx, params) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CostreportV1beta1GetAllocationGroupCostSummariesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseWorkloadOptimizationAPIGetInstallCmdResponse(rsp) + + return response, nil } -// WorkloadOptimizationAPIGetInstallScriptWithResponse request returning *WorkloadOptimizationAPIGetInstallScriptResponse -func (c *ClientWithResponses) WorkloadOptimizationAPIGetInstallScriptWithResponse(ctx context.Context, params *WorkloadOptimizationAPIGetInstallScriptParams) (*WorkloadOptimizationAPIGetInstallScriptResponse, error) { - rsp, err := c.WorkloadOptimizationAPIGetInstallScript(ctx, params) +// ParseAllocationGroupAPIGetAllocationGroupTotalCostTimedResponse parses an HTTP response from a AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse call +func ParseAllocationGroupAPIGetAllocationGroupTotalCostTimedResponse(rsp *http.Response) (*AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIGetInstallScriptResponse(rsp) -} -// InventoryAPIListZonesWithResponse request returning *InventoryAPIListZonesResponse -func (c *ClientWithResponses) InventoryAPIListZonesWithResponse(ctx context.Context, params *InventoryAPIListZonesParams) (*InventoryAPIListZonesResponse, error) { - rsp, err := c.InventoryAPIListZones(ctx, params) - if err != nil { - return nil, err + response := &AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseInventoryAPIListZonesResponse(rsp) -} -// WorkloadOptimizationAPIPatchWorkloadV2WithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPIPatchWorkloadV2Response -func (c *ClientWithResponses) WorkloadOptimizationAPIPatchWorkloadV2WithBodyWithResponse(ctx context.Context, clusterId string, workloadId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIPatchWorkloadV2Response, error) { - rsp, err := c.WorkloadOptimizationAPIPatchWorkloadV2WithBody(ctx, clusterId, workloadId, contentType, body) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CostreportV1beta1GetAllocationGroupTotalCostTimedResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseWorkloadOptimizationAPIPatchWorkloadV2Response(rsp) + + return response, nil } -func (c *ClientWithResponses) WorkloadOptimizationAPIPatchWorkloadV2WithResponse(ctx context.Context, clusterId string, workloadId string, body WorkloadOptimizationAPIPatchWorkloadV2JSONRequestBody) (*WorkloadOptimizationAPIPatchWorkloadV2Response, error) { - rsp, err := c.WorkloadOptimizationAPIPatchWorkloadV2(ctx, clusterId, workloadId, body) +// ParseAllocationGroupAPIListAllocationGroupsResponse parses an HTTP response from a AllocationGroupAPIListAllocationGroupsWithResponse call +func ParseAllocationGroupAPIListAllocationGroupsResponse(rsp *http.Response) (*AllocationGroupAPIListAllocationGroupsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer rsp.Body.Close() if err != nil { return nil, err } - return ParseWorkloadOptimizationAPIPatchWorkloadV2Response(rsp) -} -// WorkloadOptimizationAPIUpdateWorkloadV2WithBodyWithResponse request with arbitrary body returning *WorkloadOptimizationAPIUpdateWorkloadV2Response -func (c *ClientWithResponses) WorkloadOptimizationAPIUpdateWorkloadV2WithBodyWithResponse(ctx context.Context, clusterId string, workloadId string, contentType string, body io.Reader) (*WorkloadOptimizationAPIUpdateWorkloadV2Response, error) { - rsp, err := c.WorkloadOptimizationAPIUpdateWorkloadV2WithBody(ctx, clusterId, workloadId, contentType, body) - if err != nil { - return nil, err + response := &AllocationGroupAPIListAllocationGroupsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseWorkloadOptimizationAPIUpdateWorkloadV2Response(rsp) -} -func (c *ClientWithResponses) WorkloadOptimizationAPIUpdateWorkloadV2WithResponse(ctx context.Context, clusterId string, workloadId string, body WorkloadOptimizationAPIUpdateWorkloadV2JSONRequestBody) (*WorkloadOptimizationAPIUpdateWorkloadV2Response, error) { - rsp, err := c.WorkloadOptimizationAPIUpdateWorkloadV2(ctx, clusterId, workloadId, body) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CostreportV1beta1ListAllocationGroupsResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + } - return ParseWorkloadOptimizationAPIUpdateWorkloadV2Response(rsp) + + return response, nil } -// ParseCommitmentsAPIBatchDeleteCommitmentsResponse parses an HTTP response from a CommitmentsAPIBatchDeleteCommitmentsWithResponse call -func ParseCommitmentsAPIBatchDeleteCommitmentsResponse(rsp *http.Response) (*CommitmentsAPIBatchDeleteCommitmentsResponse, error) { +// ParseAllocationGroupAPICreateAllocationGroupResponse parses an HTTP response from a AllocationGroupAPICreateAllocationGroupWithResponse call +func ParseAllocationGroupAPICreateAllocationGroupResponse(rsp *http.Response) (*AllocationGroupAPICreateAllocationGroupResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &CommitmentsAPIBatchDeleteCommitmentsResponse{ + response := &AllocationGroupAPICreateAllocationGroupResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest map[string]interface{} + var dest CostreportV1beta1AllocationGroup if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23138,22 +25559,22 @@ func ParseCommitmentsAPIBatchDeleteCommitmentsResponse(rsp *http.Response) (*Com return response, nil } -// ParseCommitmentsAPIBatchUpdateCommitmentsResponse parses an HTTP response from a CommitmentsAPIBatchUpdateCommitmentsWithResponse call -func ParseCommitmentsAPIBatchUpdateCommitmentsResponse(rsp *http.Response) (*CommitmentsAPIBatchUpdateCommitmentsResponse, error) { +// ParseAllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse parses an HTTP response from a AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse call +func ParseAllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse(rsp *http.Response) (*AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &CommitmentsAPIBatchUpdateCommitmentsResponse{ + response := &AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CastaiInventoryV1beta1BatchUpdateCommitmentsResponse + var dest CostreportV1beta1GetCostAllocationGroupDataTransferSummaryResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23164,22 +25585,22 @@ func ParseCommitmentsAPIBatchUpdateCommitmentsResponse(rsp *http.Response) (*Com return response, nil } -// ParseCommitmentsAPIGetCommitmentUsageHistoryResponse parses an HTTP response from a CommitmentsAPIGetCommitmentUsageHistoryWithResponse call -func ParseCommitmentsAPIGetCommitmentUsageHistoryResponse(rsp *http.Response) (*CommitmentsAPIGetCommitmentUsageHistoryResponse, error) { +// ParseAllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse parses an HTTP response from a AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse call +func ParseAllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse(rsp *http.Response) (*AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &CommitmentsAPIGetCommitmentUsageHistoryResponse{ + response := &AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CastaiInventoryV1beta1GetCommitmentUsageHistoryResponse + var dest CostreportV1beta1GetAllocationGroupEfficiencySummaryResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23190,22 +25611,22 @@ func ParseCommitmentsAPIGetCommitmentUsageHistoryResponse(rsp *http.Response) (* return response, nil } -// ParseCommitmentsAPIGetAWSReservedInstancesImportCMDResponse parses an HTTP response from a CommitmentsAPIGetAWSReservedInstancesImportCMDWithResponse call -func ParseCommitmentsAPIGetAWSReservedInstancesImportCMDResponse(rsp *http.Response) (*CommitmentsAPIGetAWSReservedInstancesImportCMDResponse, error) { +// ParseAllocationGroupAPIGetCostAllocationGroupSummaryResponse parses an HTTP response from a AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse call +func ParseAllocationGroupAPIGetCostAllocationGroupSummaryResponse(rsp *http.Response) (*AllocationGroupAPIGetCostAllocationGroupSummaryResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &CommitmentsAPIGetAWSReservedInstancesImportCMDResponse{ + response := &AllocationGroupAPIGetCostAllocationGroupSummaryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CastaiInventoryV1beta1GetAWSReservedInstancesImportCMDResponse + var dest CostreportV1beta1GetCostAllocationGroupSummaryResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23216,38 +25637,48 @@ func ParseCommitmentsAPIGetAWSReservedInstancesImportCMDResponse(rsp *http.Respo return response, nil } -// ParseCommitmentsAPIGetAWSReservedInstancesImportScriptResponse parses an HTTP response from a CommitmentsAPIGetAWSReservedInstancesImportScriptWithResponse call -func ParseCommitmentsAPIGetAWSReservedInstancesImportScriptResponse(rsp *http.Response) (*CommitmentsAPIGetAWSReservedInstancesImportScriptResponse, error) { +// ParseAllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse parses an HTTP response from a AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse call +func ParseAllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse(rsp *http.Response) (*AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &CommitmentsAPIGetAWSReservedInstancesImportScriptResponse{ + response := &AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CostreportV1beta1GetCostAllocationGroupDataTransferWorkloadsResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + return response, nil } -// ParseCommitmentsAPIImportAWSReservedInstancesResponse parses an HTTP response from a CommitmentsAPIImportAWSReservedInstancesWithResponse call -func ParseCommitmentsAPIImportAWSReservedInstancesResponse(rsp *http.Response) (*CommitmentsAPIImportAWSReservedInstancesResponse, error) { +// ParseAllocationGroupAPIGetAllocationGroupWorkloadCostsResponse parses an HTTP response from a AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse call +func ParseAllocationGroupAPIGetAllocationGroupWorkloadCostsResponse(rsp *http.Response) (*AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &CommitmentsAPIImportAWSReservedInstancesResponse{ + response := &AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest map[string]interface{} + var dest CostreportV1beta1GetAllocationGroupWorkloadCostsResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23258,22 +25689,22 @@ func ParseCommitmentsAPIImportAWSReservedInstancesResponse(rsp *http.Response) ( return response, nil } -// ParseAuthTokenAPIListAuthTokensResponse parses an HTTP response from a AuthTokenAPIListAuthTokensWithResponse call -func ParseAuthTokenAPIListAuthTokensResponse(rsp *http.Response) (*AuthTokenAPIListAuthTokensResponse, error) { +// ParseAllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse parses an HTTP response from a AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse call +func ParseAllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse(rsp *http.Response) (*AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &AuthTokenAPIListAuthTokensResponse{ + response := &AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CastaiAuthtokenV1beta1ListAuthTokensResponse + var dest CostreportV1beta1GetAllocationGroupWorkloadsEfficiencyResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23284,22 +25715,22 @@ func ParseAuthTokenAPIListAuthTokensResponse(rsp *http.Response) (*AuthTokenAPIL return response, nil } -// ParseAuthTokenAPICreateAuthTokenResponse parses an HTTP response from a AuthTokenAPICreateAuthTokenWithResponse call -func ParseAuthTokenAPICreateAuthTokenResponse(rsp *http.Response) (*AuthTokenAPICreateAuthTokenResponse, error) { +// ParseAllocationGroupAPIGetCostAllocationGroupWorkloadsResponse parses an HTTP response from a AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse call +func ParseAllocationGroupAPIGetCostAllocationGroupWorkloadsResponse(rsp *http.Response) (*AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &AuthTokenAPICreateAuthTokenResponse{ + response := &AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CastaiAuthtokenV1beta1AuthToken + var dest CostreportV1beta1GetCostAllocationGroupWorkloadsResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23310,22 +25741,22 @@ func ParseAuthTokenAPICreateAuthTokenResponse(rsp *http.Response) (*AuthTokenAPI return response, nil } -// ParseAuthTokenAPIDeleteAuthTokenResponse parses an HTTP response from a AuthTokenAPIDeleteAuthTokenWithResponse call -func ParseAuthTokenAPIDeleteAuthTokenResponse(rsp *http.Response) (*AuthTokenAPIDeleteAuthTokenResponse, error) { +// ParseAllocationGroupAPIDeleteAllocationGroupResponse parses an HTTP response from a AllocationGroupAPIDeleteAllocationGroupWithResponse call +func ParseAllocationGroupAPIDeleteAllocationGroupResponse(rsp *http.Response) (*AllocationGroupAPIDeleteAllocationGroupResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &AuthTokenAPIDeleteAuthTokenResponse{ + response := &AllocationGroupAPIDeleteAllocationGroupResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CastaiAuthtokenV1beta1DeleteAuthTokenResponse + var dest CostreportV1beta1DeleteAllocationGroupResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23336,22 +25767,22 @@ func ParseAuthTokenAPIDeleteAuthTokenResponse(rsp *http.Response) (*AuthTokenAPI return response, nil } -// ParseAuthTokenAPIGetAuthTokenResponse parses an HTTP response from a AuthTokenAPIGetAuthTokenWithResponse call -func ParseAuthTokenAPIGetAuthTokenResponse(rsp *http.Response) (*AuthTokenAPIGetAuthTokenResponse, error) { +// ParseAllocationGroupAPIGetAllocationGroupResponse parses an HTTP response from a AllocationGroupAPIGetAllocationGroupWithResponse call +func ParseAllocationGroupAPIGetAllocationGroupResponse(rsp *http.Response) (*AllocationGroupAPIGetAllocationGroupResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &AuthTokenAPIGetAuthTokenResponse{ + response := &AllocationGroupAPIGetAllocationGroupResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CastaiAuthtokenV1beta1AuthToken + var dest CostreportV1beta1AllocationGroup if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23362,22 +25793,22 @@ func ParseAuthTokenAPIGetAuthTokenResponse(rsp *http.Response) (*AuthTokenAPIGet return response, nil } -// ParseAuthTokenAPIUpdateAuthTokenResponse parses an HTTP response from a AuthTokenAPIUpdateAuthTokenWithResponse call -func ParseAuthTokenAPIUpdateAuthTokenResponse(rsp *http.Response) (*AuthTokenAPIUpdateAuthTokenResponse, error) { +// ParseAllocationGroupAPIUpdateAllocationGroupResponse parses an HTTP response from a AllocationGroupAPIUpdateAllocationGroupWithResponse call +func ParseAllocationGroupAPIUpdateAllocationGroupResponse(rsp *http.Response) (*AllocationGroupAPIUpdateAllocationGroupResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) defer rsp.Body.Close() if err != nil { return nil, err } - response := &AuthTokenAPIUpdateAuthTokenResponse{ + response := &AllocationGroupAPIUpdateAllocationGroupResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CastaiAuthtokenV1beta1AuthToken + var dest CostreportV1beta1AllocationGroup if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/castai/sdk/mock/client.go b/castai/sdk/mock/client.go index 7ad074d0b..f669061bf 100644 --- a/castai/sdk/mock/client.go +++ b/castai/sdk/mock/client.go @@ -75,6 +75,346 @@ func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder { return m.recorder } +// AllocationGroupAPICreateAllocationGroup mocks base method. +func (m *MockClientInterface) AllocationGroupAPICreateAllocationGroup(ctx context.Context, body sdk.AllocationGroupAPICreateAllocationGroupJSONRequestBody, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPICreateAllocationGroup", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPICreateAllocationGroup indicates an expected call of AllocationGroupAPICreateAllocationGroup. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPICreateAllocationGroup(ctx, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPICreateAllocationGroup", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPICreateAllocationGroup), varargs...) +} + +// AllocationGroupAPICreateAllocationGroupWithBody mocks base method. +func (m *MockClientInterface) AllocationGroupAPICreateAllocationGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, contentType, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPICreateAllocationGroupWithBody", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPICreateAllocationGroupWithBody indicates an expected call of AllocationGroupAPICreateAllocationGroupWithBody. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPICreateAllocationGroupWithBody(ctx, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, contentType, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPICreateAllocationGroupWithBody", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPICreateAllocationGroupWithBody), varargs...) +} + +// AllocationGroupAPIDeleteAllocationGroup mocks base method. +func (m *MockClientInterface) AllocationGroupAPIDeleteAllocationGroup(ctx context.Context, id string, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, id} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIDeleteAllocationGroup", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIDeleteAllocationGroup indicates an expected call of AllocationGroupAPIDeleteAllocationGroup. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIDeleteAllocationGroup(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, id}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIDeleteAllocationGroup", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIDeleteAllocationGroup), varargs...) +} + +// AllocationGroupAPIGetAllocationGroup mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetAllocationGroup(ctx context.Context, id string, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, id} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroup", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroup indicates an expected call of AllocationGroupAPIGetAllocationGroup. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroup(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, id}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroup", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetAllocationGroup), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupCostSummaries mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetAllocationGroupCostSummaries(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupCostSummariesParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupCostSummaries", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupCostSummaries indicates an expected call of AllocationGroupAPIGetAllocationGroupCostSummaries. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupCostSummaries(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupCostSummaries", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetAllocationGroupCostSummaries), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupCostTimedSummaries mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetAllocationGroupCostTimedSummaries(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupCostTimedSummaries", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupCostTimedSummaries indicates an expected call of AllocationGroupAPIGetAllocationGroupCostTimedSummaries. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupCostTimedSummaries(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupCostTimedSummaries", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetAllocationGroupCostTimedSummaries), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupEfficiencySummary mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetAllocationGroupEfficiencySummary(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupEfficiencySummary", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupEfficiencySummary indicates an expected call of AllocationGroupAPIGetAllocationGroupEfficiencySummary. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupEfficiencySummary(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupEfficiencySummary", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetAllocationGroupEfficiencySummary), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupTotalCostTimed mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetAllocationGroupTotalCostTimed(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupTotalCostTimedParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupTotalCostTimed", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupTotalCostTimed indicates an expected call of AllocationGroupAPIGetAllocationGroupTotalCostTimed. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupTotalCostTimed(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupTotalCostTimed", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetAllocationGroupTotalCostTimed), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCosts mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetAllocationGroupWorkloadCosts(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetAllocationGroupWorkloadCostsParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, groupId, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupWorkloadCosts", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCosts indicates an expected call of AllocationGroupAPIGetAllocationGroupWorkloadCosts. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupWorkloadCosts(ctx, groupId, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, groupId, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupWorkloadCosts", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetAllocationGroupWorkloadCosts), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, groupId, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency indicates an expected call of AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency(ctx, groupId, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, groupId, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency), varargs...) +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferSummary mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetCostAllocationGroupDataTransferSummary(ctx context.Context, params *sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupDataTransferSummary", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferSummary indicates an expected call of AllocationGroupAPIGetCostAllocationGroupDataTransferSummary. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupDataTransferSummary(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupDataTransferSummary", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetCostAllocationGroupDataTransferSummary), varargs...) +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, groupId, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads indicates an expected call of AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads(ctx, groupId, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, groupId, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads), varargs...) +} + +// AllocationGroupAPIGetCostAllocationGroupSummary mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetCostAllocationGroupSummary(ctx context.Context, params *sdk.AllocationGroupAPIGetCostAllocationGroupSummaryParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupSummary", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupSummary indicates an expected call of AllocationGroupAPIGetCostAllocationGroupSummary. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupSummary(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupSummary", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetCostAllocationGroupSummary), varargs...) +} + +// AllocationGroupAPIGetCostAllocationGroupWorkloads mocks base method. +func (m *MockClientInterface) AllocationGroupAPIGetCostAllocationGroupWorkloads(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetCostAllocationGroupWorkloadsParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, groupId, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupWorkloads", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupWorkloads indicates an expected call of AllocationGroupAPIGetCostAllocationGroupWorkloads. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupWorkloads(ctx, groupId, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, groupId, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupWorkloads", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIGetCostAllocationGroupWorkloads), varargs...) +} + +// AllocationGroupAPIListAllocationGroups mocks base method. +func (m *MockClientInterface) AllocationGroupAPIListAllocationGroups(ctx context.Context, params *sdk.AllocationGroupAPIListAllocationGroupsParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIListAllocationGroups", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIListAllocationGroups indicates an expected call of AllocationGroupAPIListAllocationGroups. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIListAllocationGroups(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIListAllocationGroups", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIListAllocationGroups), varargs...) +} + +// AllocationGroupAPIUpdateAllocationGroup mocks base method. +func (m *MockClientInterface) AllocationGroupAPIUpdateAllocationGroup(ctx context.Context, id string, body sdk.AllocationGroupAPIUpdateAllocationGroupJSONRequestBody, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, id, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIUpdateAllocationGroup", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIUpdateAllocationGroup indicates an expected call of AllocationGroupAPIUpdateAllocationGroup. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIUpdateAllocationGroup(ctx, id, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, id, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIUpdateAllocationGroup", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIUpdateAllocationGroup), varargs...) +} + +// AllocationGroupAPIUpdateAllocationGroupWithBody mocks base method. +func (m *MockClientInterface) AllocationGroupAPIUpdateAllocationGroupWithBody(ctx context.Context, id, contentType string, body io.Reader, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, id, contentType, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIUpdateAllocationGroupWithBody", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIUpdateAllocationGroupWithBody indicates an expected call of AllocationGroupAPIUpdateAllocationGroupWithBody. +func (mr *MockClientInterfaceMockRecorder) AllocationGroupAPIUpdateAllocationGroupWithBody(ctx, id, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, id, contentType, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIUpdateAllocationGroupWithBody", reflect.TypeOf((*MockClientInterface)(nil).AllocationGroupAPIUpdateAllocationGroupWithBody), varargs...) +} + // AuthTokenAPICreateAuthToken mocks base method. func (m *MockClientInterface) AuthTokenAPICreateAuthToken(ctx context.Context, body sdk.AuthTokenAPICreateAuthTokenJSONRequestBody, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { m.ctrl.T.Helper() @@ -5298,6 +5638,601 @@ func (m *MockClientWithResponsesInterface) EXPECT() *MockClientWithResponsesInte return m.recorder } +// AllocationGroupAPICreateAllocationGroup mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPICreateAllocationGroup(ctx context.Context, body sdk.AllocationGroupAPICreateAllocationGroupJSONRequestBody, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPICreateAllocationGroup", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPICreateAllocationGroup indicates an expected call of AllocationGroupAPICreateAllocationGroup. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPICreateAllocationGroup(ctx, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPICreateAllocationGroup", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPICreateAllocationGroup), varargs...) +} + +// AllocationGroupAPICreateAllocationGroupWithBody mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPICreateAllocationGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, contentType, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPICreateAllocationGroupWithBody", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPICreateAllocationGroupWithBody indicates an expected call of AllocationGroupAPICreateAllocationGroupWithBody. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPICreateAllocationGroupWithBody(ctx, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, contentType, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPICreateAllocationGroupWithBody", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPICreateAllocationGroupWithBody), varargs...) +} + +// AllocationGroupAPICreateAllocationGroupWithBodyWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPICreateAllocationGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*sdk.AllocationGroupAPICreateAllocationGroupResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPICreateAllocationGroupWithBodyWithResponse", ctx, contentType, body) + ret0, _ := ret[0].(*sdk.AllocationGroupAPICreateAllocationGroupResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPICreateAllocationGroupWithBodyWithResponse indicates an expected call of AllocationGroupAPICreateAllocationGroupWithBodyWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPICreateAllocationGroupWithBodyWithResponse(ctx, contentType, body interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPICreateAllocationGroupWithBodyWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPICreateAllocationGroupWithBodyWithResponse), ctx, contentType, body) +} + +// AllocationGroupAPICreateAllocationGroupWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPICreateAllocationGroupWithResponse(ctx context.Context, body sdk.AllocationGroupAPICreateAllocationGroupJSONRequestBody) (*sdk.AllocationGroupAPICreateAllocationGroupResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPICreateAllocationGroupWithResponse", ctx, body) + ret0, _ := ret[0].(*sdk.AllocationGroupAPICreateAllocationGroupResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPICreateAllocationGroupWithResponse indicates an expected call of AllocationGroupAPICreateAllocationGroupWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPICreateAllocationGroupWithResponse(ctx, body interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPICreateAllocationGroupWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPICreateAllocationGroupWithResponse), ctx, body) +} + +// AllocationGroupAPIDeleteAllocationGroup mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIDeleteAllocationGroup(ctx context.Context, id string, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, id} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIDeleteAllocationGroup", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIDeleteAllocationGroup indicates an expected call of AllocationGroupAPIDeleteAllocationGroup. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIDeleteAllocationGroup(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, id}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIDeleteAllocationGroup", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIDeleteAllocationGroup), varargs...) +} + +// AllocationGroupAPIDeleteAllocationGroupWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIDeleteAllocationGroupWithResponse(ctx context.Context, id string) (*sdk.AllocationGroupAPIDeleteAllocationGroupResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIDeleteAllocationGroupWithResponse", ctx, id) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIDeleteAllocationGroupResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIDeleteAllocationGroupWithResponse indicates an expected call of AllocationGroupAPIDeleteAllocationGroupWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIDeleteAllocationGroupWithResponse(ctx, id interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIDeleteAllocationGroupWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIDeleteAllocationGroupWithResponse), ctx, id) +} + +// AllocationGroupAPIGetAllocationGroup mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroup(ctx context.Context, id string, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, id} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroup", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroup indicates an expected call of AllocationGroupAPIGetAllocationGroup. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroup(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, id}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroup", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroup), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupCostSummaries mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupCostSummaries(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupCostSummariesParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupCostSummaries", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupCostSummaries indicates an expected call of AllocationGroupAPIGetAllocationGroupCostSummaries. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupCostSummaries(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupCostSummaries", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupCostSummaries), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupCostSummariesParams) (*sdk.AllocationGroupAPIGetAllocationGroupCostSummariesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse", ctx, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetAllocationGroupCostSummariesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse indicates an expected call of AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse(ctx, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupCostSummariesWithResponse), ctx, params) +} + +// AllocationGroupAPIGetAllocationGroupCostTimedSummaries mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupCostTimedSummaries(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupCostTimedSummaries", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupCostTimedSummaries indicates an expected call of AllocationGroupAPIGetAllocationGroupCostTimedSummaries. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupCostTimedSummaries(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupCostTimedSummaries", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupCostTimedSummaries), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupCostTimedSummariesParams) (*sdk.AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse", ctx, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetAllocationGroupCostTimedSummariesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse indicates an expected call of AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse(ctx, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupCostTimedSummariesWithResponse), ctx, params) +} + +// AllocationGroupAPIGetAllocationGroupEfficiencySummary mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupEfficiencySummary(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupEfficiencySummary", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupEfficiencySummary indicates an expected call of AllocationGroupAPIGetAllocationGroupEfficiencySummary. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupEfficiencySummary(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupEfficiencySummary", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupEfficiencySummary), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupEfficiencySummaryParams) (*sdk.AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse", ctx, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetAllocationGroupEfficiencySummaryResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse indicates an expected call of AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse(ctx, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupEfficiencySummaryWithResponse), ctx, params) +} + +// AllocationGroupAPIGetAllocationGroupTotalCostTimed mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupTotalCostTimed(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupTotalCostTimedParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupTotalCostTimed", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupTotalCostTimed indicates an expected call of AllocationGroupAPIGetAllocationGroupTotalCostTimed. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupTotalCostTimed(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupTotalCostTimed", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupTotalCostTimed), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse(ctx context.Context, params *sdk.AllocationGroupAPIGetAllocationGroupTotalCostTimedParams) (*sdk.AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse", ctx, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetAllocationGroupTotalCostTimedResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse indicates an expected call of AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse(ctx, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupTotalCostTimedWithResponse), ctx, params) +} + +// AllocationGroupAPIGetAllocationGroupWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupWithResponse(ctx context.Context, id string) (*sdk.AllocationGroupAPIGetAllocationGroupResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupWithResponse", ctx, id) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetAllocationGroupResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupWithResponse indicates an expected call of AllocationGroupAPIGetAllocationGroupWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupWithResponse(ctx, id interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupWithResponse), ctx, id) +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCosts mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupWorkloadCosts(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetAllocationGroupWorkloadCostsParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, groupId, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupWorkloadCosts", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCosts indicates an expected call of AllocationGroupAPIGetAllocationGroupWorkloadCosts. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupWorkloadCosts(ctx, groupId, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, groupId, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupWorkloadCosts", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupWorkloadCosts), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetAllocationGroupWorkloadCostsParams) (*sdk.AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse", ctx, groupId, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetAllocationGroupWorkloadCostsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse indicates an expected call of AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse(ctx, groupId, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupWorkloadCostsWithResponse), ctx, groupId, params) +} + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, groupId, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency indicates an expected call of AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency(ctx, groupId, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, groupId, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupWorkloadsEfficiency), varargs...) +} + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyParams) (*sdk.AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse", ctx, groupId, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse indicates an expected call of AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse(ctx, groupId, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetAllocationGroupWorkloadsEfficiencyWithResponse), ctx, groupId, params) +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferSummary mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetCostAllocationGroupDataTransferSummary(ctx context.Context, params *sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupDataTransferSummary", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferSummary indicates an expected call of AllocationGroupAPIGetCostAllocationGroupDataTransferSummary. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupDataTransferSummary(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupDataTransferSummary", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetCostAllocationGroupDataTransferSummary), varargs...) +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse(ctx context.Context, params *sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryParams) (*sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse", ctx, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse indicates an expected call of AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse(ctx, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetCostAllocationGroupDataTransferSummaryWithResponse), ctx, params) +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, groupId, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads indicates an expected call of AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads(ctx, groupId, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, groupId, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloads), varargs...) +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsParams) (*sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse", ctx, groupId, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse indicates an expected call of AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse(ctx, groupId, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetCostAllocationGroupDataTransferWorkloadsWithResponse), ctx, groupId, params) +} + +// AllocationGroupAPIGetCostAllocationGroupSummary mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetCostAllocationGroupSummary(ctx context.Context, params *sdk.AllocationGroupAPIGetCostAllocationGroupSummaryParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupSummary", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupSummary indicates an expected call of AllocationGroupAPIGetCostAllocationGroupSummary. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupSummary(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupSummary", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetCostAllocationGroupSummary), varargs...) +} + +// AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse(ctx context.Context, params *sdk.AllocationGroupAPIGetCostAllocationGroupSummaryParams) (*sdk.AllocationGroupAPIGetCostAllocationGroupSummaryResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse", ctx, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetCostAllocationGroupSummaryResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse indicates an expected call of AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse(ctx, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetCostAllocationGroupSummaryWithResponse), ctx, params) +} + +// AllocationGroupAPIGetCostAllocationGroupWorkloads mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetCostAllocationGroupWorkloads(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetCostAllocationGroupWorkloadsParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, groupId, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupWorkloads", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupWorkloads indicates an expected call of AllocationGroupAPIGetCostAllocationGroupWorkloads. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupWorkloads(ctx, groupId, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, groupId, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupWorkloads", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetCostAllocationGroupWorkloads), varargs...) +} + +// AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse(ctx context.Context, groupId string, params *sdk.AllocationGroupAPIGetCostAllocationGroupWorkloadsParams) (*sdk.AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse", ctx, groupId, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIGetCostAllocationGroupWorkloadsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse indicates an expected call of AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse(ctx, groupId, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIGetCostAllocationGroupWorkloadsWithResponse), ctx, groupId, params) +} + +// AllocationGroupAPIListAllocationGroups mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIListAllocationGroups(ctx context.Context, params *sdk.AllocationGroupAPIListAllocationGroupsParams, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, params} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIListAllocationGroups", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIListAllocationGroups indicates an expected call of AllocationGroupAPIListAllocationGroups. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIListAllocationGroups(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, params}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIListAllocationGroups", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIListAllocationGroups), varargs...) +} + +// AllocationGroupAPIListAllocationGroupsWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIListAllocationGroupsWithResponse(ctx context.Context, params *sdk.AllocationGroupAPIListAllocationGroupsParams) (*sdk.AllocationGroupAPIListAllocationGroupsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIListAllocationGroupsWithResponse", ctx, params) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIListAllocationGroupsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIListAllocationGroupsWithResponse indicates an expected call of AllocationGroupAPIListAllocationGroupsWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIListAllocationGroupsWithResponse(ctx, params interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIListAllocationGroupsWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIListAllocationGroupsWithResponse), ctx, params) +} + +// AllocationGroupAPIUpdateAllocationGroup mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIUpdateAllocationGroup(ctx context.Context, id string, body sdk.AllocationGroupAPIUpdateAllocationGroupJSONRequestBody, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, id, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIUpdateAllocationGroup", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIUpdateAllocationGroup indicates an expected call of AllocationGroupAPIUpdateAllocationGroup. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIUpdateAllocationGroup(ctx, id, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, id, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIUpdateAllocationGroup", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIUpdateAllocationGroup), varargs...) +} + +// AllocationGroupAPIUpdateAllocationGroupWithBody mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIUpdateAllocationGroupWithBody(ctx context.Context, id, contentType string, body io.Reader, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, id, contentType, body} + for _, a := range reqEditors { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocationGroupAPIUpdateAllocationGroupWithBody", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIUpdateAllocationGroupWithBody indicates an expected call of AllocationGroupAPIUpdateAllocationGroupWithBody. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIUpdateAllocationGroupWithBody(ctx, id, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, id, contentType, body}, reqEditors...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIUpdateAllocationGroupWithBody", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIUpdateAllocationGroupWithBody), varargs...) +} + +// AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse(ctx context.Context, id, contentType string, body io.Reader) (*sdk.AllocationGroupAPIUpdateAllocationGroupResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse", ctx, id, contentType, body) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIUpdateAllocationGroupResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse indicates an expected call of AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse(ctx, id, contentType, body interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIUpdateAllocationGroupWithBodyWithResponse), ctx, id, contentType, body) +} + +// AllocationGroupAPIUpdateAllocationGroupWithResponse mocks base method. +func (m *MockClientWithResponsesInterface) AllocationGroupAPIUpdateAllocationGroupWithResponse(ctx context.Context, id string, body sdk.AllocationGroupAPIUpdateAllocationGroupJSONRequestBody) (*sdk.AllocationGroupAPIUpdateAllocationGroupResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AllocationGroupAPIUpdateAllocationGroupWithResponse", ctx, id, body) + ret0, _ := ret[0].(*sdk.AllocationGroupAPIUpdateAllocationGroupResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocationGroupAPIUpdateAllocationGroupWithResponse indicates an expected call of AllocationGroupAPIUpdateAllocationGroupWithResponse. +func (mr *MockClientWithResponsesInterfaceMockRecorder) AllocationGroupAPIUpdateAllocationGroupWithResponse(ctx, id, body interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocationGroupAPIUpdateAllocationGroupWithResponse", reflect.TypeOf((*MockClientWithResponsesInterface)(nil).AllocationGroupAPIUpdateAllocationGroupWithResponse), ctx, id, body) +} + // AuthTokenAPICreateAuthToken mocks base method. func (m *MockClientWithResponsesInterface) AuthTokenAPICreateAuthToken(ctx context.Context, body sdk.AuthTokenAPICreateAuthTokenJSONRequestBody, reqEditors ...sdk.RequestEditorFn) (*http.Response, error) { m.ctrl.T.Helper() diff --git a/docs/resources/allocation_group.md b/docs/resources/allocation_group.md new file mode 100644 index 000000000..d82eae324 --- /dev/null +++ b/docs/resources/allocation_group.md @@ -0,0 +1,66 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "castai_allocation_group Resource - terraform-provider-castai" +subcategory: "" +description: |- + Manage allocation group. Allocation group reference https://docs.cast.ai/docs/allocation-groups +--- + +# castai_allocation_group (Resource) + +Manage allocation group. Allocation group [reference](https://docs.cast.ai/docs/allocation-groups) + +## Example Usage + +```terraform +resource "castai_allocation_group" "ag_example" { + name = "ag_example" + cluster_ids = [ + "1a58d6b4-bc0e-4417-b9c7-31d15c313f3f", + "d204b988-5db5-472e-a258-bf763a0f4a93" + ] + + namespaces = [ + "namespace-a", + "namespace-b" + ] + + labels = { + environment = "production", + team = "my-team", + "app.kubernetes.io/name" = "app-name" + } + + labels_operator = "AND" +} +``` + + +## Schema + +### Required + +- `name` (String) Allocation group name + +### Optional + +- `cluster_ids` (Set of String) List of CAST AI cluster ids +- `labels` (Map of String) Labels used to select workloads to track +- `labels_operator` (String) Operator with which to connect the labels + OR (default) - workload needs to have at least one label to be included + AND - workload needs to have all the labels to be included +- `namespaces` (List of String) List of cluster namespaces to track + +### Read-Only + +- `id` (String) The ID of this resource. + +## Import + +Import is supported using the following syntax: + +```shell +# Importing via direct allocation group ID is also possible. +# Will use the default organization ID, that is associated with the API token. +terraform import 'castai_allocation_group.my_allocation_group' e5ee784d-2c4b-4820-ab4e-16e4b81534a4 +``` diff --git a/examples/resources/castai_allocation_group/import.sh b/examples/resources/castai_allocation_group/import.sh new file mode 100644 index 000000000..e104220a0 --- /dev/null +++ b/examples/resources/castai_allocation_group/import.sh @@ -0,0 +1,3 @@ +# Importing via direct allocation group ID is also possible. +# Will use the default organization ID, that is associated with the API token. +terraform import 'castai_allocation_group.my_allocation_group' e5ee784d-2c4b-4820-ab4e-16e4b81534a4 diff --git a/examples/resources/castai_allocation_group/resource.tf b/examples/resources/castai_allocation_group/resource.tf new file mode 100644 index 000000000..bf3fac725 --- /dev/null +++ b/examples/resources/castai_allocation_group/resource.tf @@ -0,0 +1,20 @@ +resource "castai_allocation_group" "ag_example" { + name = "ag_example" + cluster_ids = [ + "1a58d6b4-bc0e-4417-b9c7-31d15c313f3f", + "d204b988-5db5-472e-a258-bf763a0f4a93" + ] + + namespaces = [ + "namespace-a", + "namespace-b" + ] + + labels = { + environment = "production", + team = "my-team", + "app.kubernetes.io/name" = "app-name" + } + + labels_operator = "AND" +}