diff --git a/go.mod b/go.mod index 20fed51f3..3f0e460a7 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/redhat-developer/app-services-sdk-go/accountmgmt v0.3.0 github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.10.0 github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.11.0 - github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.15.0 + github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.19.0 github.com/redhat-developer/app-services-sdk-go/registryinstance v0.8.2 github.com/redhat-developer/app-services-sdk-go/registrymgmt v0.11.1 github.com/redhat-developer/app-services-sdk-go/serviceaccountmgmt v0.9.0 diff --git a/go.sum b/go.sum index da04b1548..ed234145c 100644 --- a/go.sum +++ b/go.sum @@ -700,8 +700,8 @@ github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.10.0 h1:CURbTHI github.com/redhat-developer/app-services-sdk-go/connectormgmt v0.10.0/go.mod h1:t3IV0eKUPgCQjoInv2l8B/NMm2OVemCxGFO/z91wsCU= github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.11.0 h1:WdwVjneugUC898RSHuc2vLwlcNgPh3oF7/fuxEEGGPg= github.com/redhat-developer/app-services-sdk-go/kafkainstance v0.11.0/go.mod h1:yazwUm4IHuIWrQ0CCsqN0h7rHZx51nlFbYWKnUn7B84= -github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.15.0 h1:0kNYXkZHEtoAfXJuydT5LgDjulP/3ePWI626lPfDSm0= -github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.15.0/go.mod h1:ILvcakLEXMLZyRdO//WJZNk9fdFbnU+cM3XrBvubE64= +github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.19.0 h1:RVDEeUfBgMzAK+BCnlhfHGHp2YYW6GH6jgYOv2jwYVY= +github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.19.0/go.mod h1:ILvcakLEXMLZyRdO//WJZNk9fdFbnU+cM3XrBvubE64= github.com/redhat-developer/app-services-sdk-go/registryinstance v0.8.2 h1:U2je87d/DIeOaQIycg2Y7TLiESmGu0/0rQC5n64Od0Y= github.com/redhat-developer/app-services-sdk-go/registryinstance v0.8.2/go.mod h1:HkNzOWHTW/SomobQ4343+yR4oTmiyvm85BIWlsh0qbA= github.com/redhat-developer/app-services-sdk-go/registrymgmt v0.11.1 h1:VOv3wcodQ6EpKp2RRntMMTMuQSnNv1sqLezdbv18mjs= diff --git a/pkg/cmd/kafka/create/api_validators.go b/pkg/cmd/kafka/create/api_validators.go index b52055f43..b9c42da73 100644 --- a/pkg/cmd/kafka/create/api_validators.go +++ b/pkg/cmd/kafka/create/api_validators.go @@ -26,7 +26,7 @@ type ValidatorInput struct { conn connection.Connection } -var validBillingModels []string = []string{accountmgmtutil.QuotaMarketplaceType, accountmgmtutil.QuotaStandardType} +var validBillingModels []string = []string{accountmgmtutil.QuotaMarketplaceType, accountmgmtutil.QuotaStandardType, accountmgmtutil.QuotaEvalType} func (input *ValidatorInput) ValidateProviderAndRegion() error { f := input.f diff --git a/pkg/cmd/kafka/create/create.go b/pkg/cmd/kafka/create/create.go index 7d77e1ced..53fae2591 100644 --- a/pkg/cmd/kafka/create/create.go +++ b/pkg/cmd/kafka/create/create.go @@ -110,6 +110,10 @@ func NewCreateCommand(f *factory.Factory) *cobra.Command { return f.Localizer.MustLocalizeError("kafka.create.error.standard.invalidFlags") } + if opts.billingModel == accountmgmtutil.QuotaEvalType && (opts.marketplaceAcctId != "" || opts.marketplace != "") { + return f.Localizer.MustLocalizeError("kafka.create.error.eval.invalidFlags") + } + if !f.IOStreams.CanPrompt() && opts.name == "" { return f.Localizer.MustLocalizeError("kafka.create.argument.name.error.requiredWhenNonInteractive") } else if opts.name == "" { @@ -135,13 +139,13 @@ func NewCreateCommand(f *factory.Factory) *cobra.Command { flags.StringVar(&opts.provider, FlagProvider, "", f.Localizer.MustLocalize("kafka.create.flag.cloudProvider.description")) flags.StringVar(&opts.region, FlagRegion, "", f.Localizer.MustLocalize("kafka.create.flag.cloudRegion.description")) flags.StringVar(&opts.size, FlagSize, "", f.Localizer.MustLocalize("kafka.create.flag.size.description")) - flags.StringVar(&opts.marketplaceAcctId, FlagMarketPlaceAcctID, "", f.Localizer.MustLocalize("kafka.create.flag.marketplaceId.description")) - flags.StringVar(&opts.marketplace, FlagMarketPlace, "", f.Localizer.MustLocalize("kafka.create.flag.marketplaceType.description")) + flags.StringVar(&opts.marketplaceAcctId, FlagMarketPlaceAcctID, "", f.Localizer.MustLocalize("kafka.common.flag.marketplaceId.description")) + flags.StringVar(&opts.marketplace, FlagMarketPlace, "", f.Localizer.MustLocalize("kafka.common.flag.marketplaceType.description")) flags.AddOutput(&opts.outputFormat) flags.BoolVar(&opts.autoUse, "use", true, f.Localizer.MustLocalize("kafka.create.flag.autoUse.description")) flags.BoolVarP(&opts.wait, "wait", "w", false, f.Localizer.MustLocalize("kafka.create.flag.wait.description")) flags.BoolVarP(&opts.dryRun, "dry-run", "", false, f.Localizer.MustLocalize("kafka.create.flag.dryrun.description")) - flags.StringVar(&opts.billingModel, FlagBillingModel, "", f.Localizer.MustLocalize("kafka.create.flag.billingModel.description")) + flags.StringVar(&opts.billingModel, FlagBillingModel, "", f.Localizer.MustLocalize("kafka.common.flag.billingModel.description")) flags.AddBypassTermsCheck(&opts.bypassChecks) _ = cmd.RegisterFlagCompletionFunc(FlagProvider, func(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) { diff --git a/pkg/cmd/kafka/create/data.go b/pkg/cmd/kafka/create/data.go index 9d9a3c47e..818f3e783 100644 --- a/pkg/cmd/kafka/create/data.go +++ b/pkg/cmd/kafka/create/data.go @@ -27,6 +27,8 @@ func mapAmsTypeToBackendType(amsType *accountmgmtutil.QuotaSpec) CloudProviderId switch amsType.Name { case accountmgmtutil.QuotaStandardType: return StandardType + case accountmgmtutil.QuotaEvalType: + return StandardType case accountmgmtutil.QuotaMarketplaceType: return StandardType case accountmgmtutil.QuotaTrialType: @@ -63,6 +65,10 @@ func FetchSupportedBillingModels(userQuotas *accountmgmtutil.OrgQuotas, provider billingModels = append(billingModels, accountmgmtutil.QuotaStandardType) } + if len(userQuotas.EvalQuotas) > 0 { + billingModels = append(billingModels, accountmgmtutil.QuotaEvalType) + } + if len(userQuotas.MarketplaceQuotas) > 0 { if provider != "" { for _, quota := range userQuotas.MarketplaceQuotas { diff --git a/pkg/cmd/kafka/kafka.go b/pkg/cmd/kafka/kafka.go index 5d51d73f6..d50c0567a 100644 --- a/pkg/cmd/kafka/kafka.go +++ b/pkg/cmd/kafka/kafka.go @@ -11,6 +11,7 @@ import ( "github.com/redhat-developer/app-services-cli/pkg/cmd/kafka/delete" "github.com/redhat-developer/app-services-cli/pkg/cmd/kafka/describe" "github.com/redhat-developer/app-services-cli/pkg/cmd/kafka/list" + "github.com/redhat-developer/app-services-cli/pkg/cmd/kafka/promote" "github.com/redhat-developer/app-services-cli/pkg/cmd/kafka/providers" "github.com/redhat-developer/app-services-cli/pkg/cmd/kafka/topic" "github.com/redhat-developer/app-services-cli/pkg/cmd/kafka/update" @@ -42,6 +43,7 @@ func NewKafkaCommand(f *factory.Factory) *cobra.Command { acl.NewAclCommand(f), billing.NewBillingCommand(f), providers.NewProviderCommand(f), + promote.NewPromoteCommand(f), ) return cmd diff --git a/pkg/cmd/kafka/promote/promote.go b/pkg/cmd/kafka/promote/promote.go new file mode 100644 index 000000000..ae1d354b7 --- /dev/null +++ b/pkg/cmd/kafka/promote/promote.go @@ -0,0 +1,136 @@ +package promote + +import ( + "github.com/redhat-developer/app-services-cli/pkg/cmd/kafka/flagutil" + "github.com/redhat-developer/app-services-cli/pkg/core/localize" + "github.com/redhat-developer/app-services-cli/pkg/shared/contextutil" + "github.com/redhat-developer/app-services-cli/pkg/shared/factory" + "github.com/redhat-developer/app-services-cli/pkg/shared/kafkautil" + "github.com/spf13/cobra" + + kafkamgmtclient "github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client" + kafkamgmtv1errors "github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/error" +) + +type options struct { + id string + name string + marketplaceAcctId string + marketplace string + desiredBillingModel string + + f *factory.Factory +} + +func NewPromoteCommand(f *factory.Factory) *cobra.Command { + + opts := &options{ + f: f, + } + + cmd := &cobra.Command{ + Use: "promote", + Short: opts.f.Localizer.MustLocalize("kafka.promote.cmd.shortDescription"), + Long: opts.f.Localizer.MustLocalize("kafka.promote.cmd.longDescription"), + Example: opts.f.Localizer.MustLocalize("kafka.promote.cmd.example"), + Args: cobra.NoArgs, + Hidden: true, + RunE: func(cmd *cobra.Command, args []string) error { + + if opts.name != "" && opts.id != "" { + return opts.f.Localizer.MustLocalizeError("service.error.idAndNameCannotBeUsed") + } + + if opts.id != "" || opts.name != "" { + return runPromote(opts) + } + + kafkaInstance, err := contextutil.GetCurrentKafkaInstance(f) + if err != nil { + return err + } + + opts.id = kafkaInstance.GetId() + + return runPromote(opts) + }, + } + + flags := flagutil.NewFlagSet(cmd, opts.f.Localizer) + + flags.StringVar(&opts.id, "id", "", opts.f.Localizer.MustLocalize("kafka.promote.flag.id")) + flags.StringVar(&opts.name, "name", "", opts.f.Localizer.MustLocalize("kafka.promote.flag.name")) + + flags.StringVar(&opts.marketplaceAcctId, "marketplace-account-id", "", f.Localizer.MustLocalize("kafka.common.flag.marketplaceId.description")) + flags.StringVar(&opts.marketplace, "marketplace", "", f.Localizer.MustLocalize("kafka.common.flag.marketplaceType.description")) + flags.StringVar(&opts.desiredBillingModel, "billing-model", "", f.Localizer.MustLocalize("kafka.common.flag.billingModel.description")) + + _ = cmd.MarkFlagRequired("billing-model") + + return cmd + +} + +func runPromote(opts *options) error { + + conn, err := opts.f.Connection() + if err != nil { + return err + } + + api := conn.API() + + if opts.name != "" { + response, _, newErr := kafkautil.GetKafkaByName(opts.f.Context, api.KafkaMgmt(), opts.name) + if newErr != nil { + return newErr + } + + opts.id = response.GetId() + } + + a := api.KafkaMgmt().PromoteKafka(opts.f.Context, opts.id) + + var promoteOptions kafkamgmtclient.KafkaPromoteRequest + + promoteOptions.SetDesiredKafkaBillingModel(opts.desiredBillingModel) + + if opts.marketplace != "" { + promoteOptions.SetDesiredMarketplace(opts.marketplace) + } + + if opts.marketplaceAcctId != "" { + promoteOptions.SetDesiredKafkaBillingModel(opts.marketplaceAcctId) + } + + a = a.KafkaPromoteRequest(promoteOptions) + a = a.Async(true) + + httpRes, err := a.Execute() + if httpRes != nil { + defer httpRes.Body.Close() + } + + if apiErr := kafkamgmtv1errors.GetAPIError(err); apiErr != nil { + switch apiErr.GetCode() { + case kafkamgmtv1errors.ERROR_120: + // For standard instances + return opts.f.Localizer.MustLocalizeError("kafka.create.error.quota.exceeded") + case kafkamgmtv1errors.ERROR_24: + // For dev instances + return opts.f.Localizer.MustLocalizeError("kafka.create.error.instance.limit") + case kafkamgmtv1errors.ERROR_9: + return opts.f.Localizer.MustLocalizeError("kafka.create.error.standard.promote") + case kafkamgmtv1errors.ERROR_43: + return opts.f.Localizer.MustLocalizeError("kafka.create.error.billing.invalid", localize.NewEntry("Billing", opts.marketplaceAcctId)) + } + } + + if err != nil { + return err + } + + opts.f.Logger.Info(opts.f.Localizer.MustLocalize("kafka.promote.info.successAsync")) + + return nil +} diff --git a/pkg/core/localize/locales/en/cmd/kafka.en.toml b/pkg/core/localize/locales/en/cmd/kafka.en.toml index 308021514..c182c1789 100644 --- a/pkg/core/localize/locales/en/cmd/kafka.en.toml +++ b/pkg/core/localize/locales/en/cmd/kafka.en.toml @@ -54,6 +54,15 @@ one = 'Kafka instance ID. Uses the current instance if not set' [kafkas.common.flag.output.description] one = 'Format in which to display the Kafka instances (choose from: "json", "yml", "yaml")' +[kafka.common.flag.marketplaceId.description] +one = 'Cloud Account ID for the marketplace' + +[kafka.common.flag.billingModel.description] +one = 'Billing model to be used' + +[kafka.common.flag.marketplaceType.description] +one = 'Name of the marketplace where the instance is purchased on' + [kafka.common.input.instanceName.message] one = 'Select Kafka instance:' @@ -286,15 +295,6 @@ one = 'Wait until the Kafka instance is created' [kafka.create.flag.dryrun.description] one = 'Validate all user provided arguments without creating the Kafka instance' -[kafka.create.flag.marketplaceId.description] -one = 'Cloud Account ID for the marketplace' - -[kafka.create.flag.billingModel.description] -one = 'Billing model to be used' - -[kafka.create.flag.marketplaceType.description] -one = 'Name of the marketplace where the instance is purchased on' - [kafka.create.log.info.creatingKafka] description = 'Message when Kafka instance is being created' one = 'Creating Kafka instance "{{.Name}}"...' @@ -370,7 +370,10 @@ one = '"--billing-model", "--marketplace", "--marketplace-account-id" flags are one = '"--marketplace" and "--marketplace-account-id" flags should be supplied together' [kafka.create.error.standard.invalidFlags] -one = 'billing model cannot be standard if "--marketplace-account-id" or "--marketplace" are set' +one = 'billing model can not be standard if "--marketplace-account-id" or "--marketplace" are set' + +[kafka.create.error.eval.invalidFlags] +one = 'billing model can not be eval if "--marketplace-account-id" or "--marketplace" are set' [kafka.create.error.conflictError] one = 'Kafka instance "{{.Name}}" already exists' @@ -393,6 +396,9 @@ one = 'unable to create new Kafka instance at this time in specified cloud provi [kafka.create.error.instance.limit] one = 'maximum number of allowed kafka instances has been reached. Please review all instances that your user has access to and delete one or more instances before creating a new one' +[kafka.create.error.standard.promote] +one = 'only Kafka instances with billing model "eval" can be promoted' + [kafka.create.region.error.invalidRegion] one = ''' the region "{{.Region}}" is not available for the cloud provider "{{.Provider}}". @@ -437,6 +443,9 @@ one = "only trial quotas are available, don't specify billing model details" [kafka.create.quota.error.noMarketplace] one = "no marketplace quotas are available" +[kafka.create.quota.error.noEval] +one = "no evaluation quotas are available" + [kafka.create.quota.error.noStandard] one = "no standard quotas are available" @@ -585,6 +594,26 @@ $ rhoas kafka billing [kafka.billing.log.info.noStandardInstancesAvailable] one = "Only developer instances are available" +[kafka.promote.cmd.shortDescription] +one = 'Promote eval Kafka instance' + +[kafka.promote.cmd.longDescription] +one = 'Promote an evaluation Kafka instance to billing model "standard" or "marketplace"' + +[kafka.promote.cmd.example] +one = ''' +# Promote eval instance to standard +$ rhoas kafka promote --billing-model standard --id 1iSY6RQ3JKI8Q0OTmjQFd3ocFRg +''' + +[kafka.promote.flag.id] +one = 'ID of the Kafka instance' + +[kafka.promote.flag.name] +one = 'Name of the Kafka instance' + +[kafka.promote.info.successAsync] +one = 'Kafka instance is being promoted. To monitor its status run "rhoas kafka describe".' [kafka.list.cmd.shortDescription] description = "Short description for command" diff --git a/pkg/shared/accountmgmtutil/ams.go b/pkg/shared/accountmgmtutil/ams.go index 5809ef976..ca084b68e 100644 --- a/pkg/shared/accountmgmtutil/ams.go +++ b/pkg/shared/accountmgmtutil/ams.go @@ -56,6 +56,7 @@ type OrgQuotas struct { StandardQuotas []QuotaSpec MarketplaceQuotas []QuotaSpec TrialQuotas []QuotaSpec + EvalQuotas []QuotaSpec } func fetchOrgQuotaCost(ctx context.Context, conn connection.Connection) (*amsclient.QuotaCostList, error) { @@ -86,27 +87,31 @@ func GetOrgQuotas(f *factory.Factory, spec *remote.AmsConfig) (*OrgQuotas, error return nil, err } - var standardQuotas, marketplaceQuotas, trialQuotas []QuotaSpec + var standardQuotas, marketplaceQuotas, trialQuotas, evalQuotas []QuotaSpec for _, quota := range quotaCostGet.GetItems() { quotaResources := quota.GetRelatedResources() for i := range quotaResources { quotaResource := quotaResources[i] if quotaResource.GetResourceName() == spec.ResourceName { - if quotaResource.GetProduct() == spec.TrialProductQuotaID { + switch quotaResource.GetProduct() { + case spec.TrialProductQuotaID: trialQuotas = append(trialQuotas, QuotaSpec{QuotaTrialType, 0, quotaResource.BillingModel, nil}) - } else if quotaResource.GetProduct() == spec.InstanceQuotaID { + case spec.InstanceQuotaID: remainingQuota := int(quota.GetAllowed() - quota.GetConsumed()) if quotaResource.BillingModel == QuotaStandardType { standardQuotas = append(standardQuotas, QuotaSpec{QuotaStandardType, remainingQuota, quotaResource.BillingModel, nil}) } else if quotaResource.BillingModel == QuotaMarketplaceType { marketplaceQuotas = append(marketplaceQuotas, QuotaSpec{QuotaMarketplaceType, remainingQuota, quotaResource.BillingModel, quota.CloudAccounts}) } + case "RHOSAKEval": + remainingQuota := int(quota.GetAllowed() - quota.GetConsumed()) + evalQuotas = append(evalQuotas, QuotaSpec{QuotaEvalType, remainingQuota, quotaResource.BillingModel, quota.CloudAccounts}) } } } } - availableOrgQuotas := &OrgQuotas{standardQuotas, marketplaceQuotas, trialQuotas} + availableOrgQuotas := &OrgQuotas{standardQuotas, marketplaceQuotas, trialQuotas, evalQuotas} return availableOrgQuotas, nil } @@ -114,7 +119,7 @@ func GetOrgQuotas(f *factory.Factory, spec *remote.AmsConfig) (*OrgQuotas, error // nolint:funlen func SelectQuotaForUser(f *factory.Factory, orgQuota *OrgQuotas, marketplaceInfo MarketplaceInfo, provider string) (*QuotaSpec, error) { - if len(orgQuota.StandardQuotas) == 0 && len(orgQuota.MarketplaceQuotas) == 0 { + if len(orgQuota.StandardQuotas) == 0 && len(orgQuota.MarketplaceQuotas) == 0 && len(orgQuota.EvalQuotas) == 0 { if marketplaceInfo.BillingModel != "" || marketplaceInfo.Provider != "" { return nil, f.Localizer.MustLocalizeError("kafka.create.quota.error.onlyTrialAvailable") } @@ -122,20 +127,40 @@ func SelectQuotaForUser(f *factory.Factory, orgQuota *OrgQuotas, marketplaceInfo return &orgQuota.TrialQuotas[0], nil } - if len(orgQuota.MarketplaceQuotas) == 0 && len(orgQuota.StandardQuotas) > 0 { + if len(orgQuota.MarketplaceQuotas) == 0 && len(orgQuota.StandardQuotas) > 0 && len(orgQuota.EvalQuotas) == 0 { if marketplaceInfo.BillingModel == QuotaMarketplaceType || marketplaceInfo.Provider != "" || marketplaceInfo.CloudAccountID != "" { return nil, f.Localizer.MustLocalizeError("kafka.create.quota.error.noMarketplace") } + + if marketplaceInfo.BillingModel == QuotaEvalType { + return nil, f.Localizer.MustLocalizeError("kafka.create.quota.error.noEval") + } // select a standard quota return &orgQuota.StandardQuotas[0], nil } - if len(orgQuota.StandardQuotas) == 0 && len(orgQuota.MarketplaceQuotas) > 0 { + if len(orgQuota.MarketplaceQuotas) == 0 && len(orgQuota.StandardQuotas) == 0 && len(orgQuota.EvalQuotas) > 0 { + if marketplaceInfo.BillingModel == QuotaMarketplaceType || marketplaceInfo.Provider != "" || marketplaceInfo.CloudAccountID != "" { + return nil, f.Localizer.MustLocalizeError("kafka.create.quota.error.noMarketplace") + } + + if marketplaceInfo.BillingModel == QuotaStandardType { + return nil, f.Localizer.MustLocalizeError("kafka.create.quota.error.noStandard") + } + + return &orgQuota.EvalQuotas[0], nil + } + + if len(orgQuota.StandardQuotas) == 0 && len(orgQuota.MarketplaceQuotas) > 0 && len(orgQuota.EvalQuotas) == 0 { if marketplaceInfo.BillingModel == QuotaStandardType { return nil, f.Localizer.MustLocalizeError("kafka.create.quota.error.noStandard") } + if marketplaceInfo.BillingModel == QuotaEvalType { + return nil, f.Localizer.MustLocalizeError("kafka.create.quota.error.noEval") + } + var filteredMarketPlaceQuotas []QuotaSpec if provider != "" { @@ -168,11 +193,28 @@ func SelectQuotaForUser(f *factory.Factory, orgQuota *OrgQuotas, marketplaceInfo return marketplaceQuota, nil } - if len(orgQuota.StandardQuotas) > 0 && len(orgQuota.MarketplaceQuotas) > 0 { + quotaTypeCount := 0 - if marketplaceInfo.BillingModel == QuotaStandardType { + if len(orgQuota.StandardQuotas) > 0 { + quotaTypeCount++ + } + if len(orgQuota.MarketplaceQuotas) > 0 { + quotaTypeCount++ + } + if len(orgQuota.EvalQuotas) > 0 { + quotaTypeCount++ + } + + if quotaTypeCount > 1 { + + switch marketplaceInfo.BillingModel { + case QuotaStandardType: return &orgQuota.StandardQuotas[0], nil - } else if marketplaceInfo.BillingModel == QuotaMarketplaceType || marketplaceInfo.Provider != "" || marketplaceInfo.CloudAccountID != "" { + case QuotaEvalType: + return &orgQuota.EvalQuotas[0], nil + } + + if marketplaceInfo.BillingModel == QuotaMarketplaceType || marketplaceInfo.Provider != "" || marketplaceInfo.CloudAccountID != "" { var filteredMarketPlaceQuotas []QuotaSpec diff --git a/pkg/shared/accountmgmtutil/api.go b/pkg/shared/accountmgmtutil/api.go index 2ca6ec5d7..39822569b 100644 --- a/pkg/shared/accountmgmtutil/api.go +++ b/pkg/shared/accountmgmtutil/api.go @@ -7,4 +7,5 @@ const ( QuotaTrialType QuotaType = "trial" QuotaStandardType QuotaType = "standard" QuotaMarketplaceType QuotaType = "marketplace" + QuotaEvalType QuotaType = "eval" ) diff --git a/pkg/shared/remote/DynamicServiceConstants.go b/pkg/shared/remote/DynamicServiceConstants.go index 0bf1707f4..ff1b3b3e5 100644 --- a/pkg/shared/remote/DynamicServiceConstants.go +++ b/pkg/shared/remote/DynamicServiceConstants.go @@ -17,5 +17,6 @@ type AmsConfig struct { TermsAndConditionsSiteCode string `json:"termsAndConditionsSiteCode"` InstanceQuotaID string `json:"quotaProductId"` TrialProductQuotaID string `json:"trialQuotaProductId"` + LongLivedQuotaProductID string `json:"longLivedQuotaProductId"` ResourceName string `json:"resourceName"` } diff --git a/pkg/shared/remote/service-constants.json b/pkg/shared/remote/service-constants.json index ea05a5167..f19469808 100644 --- a/pkg/shared/remote/service-constants.json +++ b/pkg/shared/remote/service-constants.json @@ -8,6 +8,7 @@ "trialQuotaId": "cluster|rhinfra|rhosaktrial|standard", "quotaProductId": "RHOSAK", "trialQuotaProductId": "RHOSAKTrial", + "longLivedQuotaProductId": "RHOSAKEval", "resourceName": "rhosak" } }, diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/README.md b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/README.md index 4f3cf81be..1521c280a 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/README.md +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/README.md @@ -5,7 +5,7 @@ Kafka Management API is a REST API to manage Kafka instances ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -- API version: 1.14.0 +- API version: 1.15.0 - Package version: 1.0.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen @@ -89,7 +89,13 @@ Class | Method | HTTP request | Description *DefaultApi* | [**GetMetricsByInstantQuery**](docs/DefaultApi.md#getmetricsbyinstantquery) | **Get** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query | *DefaultApi* | [**GetMetricsByRangeQuery**](docs/DefaultApi.md#getmetricsbyrangequery) | **Get** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query_range | *DefaultApi* | [**GetVersionMetadata**](docs/DefaultApi.md#getversionmetadata) | **Get** /api/kafkas_mgmt/v1 | +*DefaultApi* | [**PromoteKafka**](docs/DefaultApi.md#promotekafka) | **Post** /api/kafkas_mgmt/v1/kafkas/{id}/promote | *DefaultApi* | [**UpdateKafkaById**](docs/DefaultApi.md#updatekafkabyid) | **Patch** /api/kafkas_mgmt/v1/kafkas/{id} | +*EnterpriseDataplaneClustersApi* | [**DeleteEnterpriseClusterById**](docs/EnterpriseDataplaneClustersApi.md#deleteenterpriseclusterbyid) | **Delete** /api/kafkas_mgmt/v1/clusters/{id} | +*EnterpriseDataplaneClustersApi* | [**GetEnterpriseClusterById**](docs/EnterpriseDataplaneClustersApi.md#getenterpriseclusterbyid) | **Get** /api/kafkas_mgmt/v1/clusters/{id} | +*EnterpriseDataplaneClustersApi* | [**GetEnterpriseClusterWithAddonParameters**](docs/EnterpriseDataplaneClustersApi.md#getenterpriseclusterwithaddonparameters) | **Get** /api/kafkas_mgmt/v1/clusters/{id}/addon_parameters | +*EnterpriseDataplaneClustersApi* | [**GetEnterpriseOsdClusters**](docs/EnterpriseDataplaneClustersApi.md#getenterpriseosdclusters) | **Get** /api/kafkas_mgmt/v1/clusters | +*EnterpriseDataplaneClustersApi* | [**RegisterEnterpriseOsdCluster**](docs/EnterpriseDataplaneClustersApi.md#registerenterpriseosdcluster) | **Post** /api/kafkas_mgmt/v1/clusters | *ErrorsApi* | [**GetErrorById**](docs/ErrorsApi.md#geterrorbyid) | **Get** /api/kafkas_mgmt/v1/errors/{id} | *ErrorsApi* | [**GetErrors**](docs/ErrorsApi.md#geterrors) | **Get** /api/kafkas_mgmt/v1/errors | *SecurityApi* | [**CreateServiceAccount**](docs/SecurityApi.md#createserviceaccount) | **Post** /api/kafkas_mgmt/v1/service_accounts | @@ -108,10 +114,19 @@ Class | Method | HTTP request | Description - [CloudRegion](docs/CloudRegion.md) - [CloudRegionList](docs/CloudRegionList.md) - [CloudRegionListAllOf](docs/CloudRegionListAllOf.md) + - [EnterpriseCluster](docs/EnterpriseCluster.md) + - [EnterpriseClusterAllOf](docs/EnterpriseClusterAllOf.md) + - [EnterpriseClusterList](docs/EnterpriseClusterList.md) + - [EnterpriseClusterListAllOf](docs/EnterpriseClusterListAllOf.md) + - [EnterpriseClusterWithAddonParameters](docs/EnterpriseClusterWithAddonParameters.md) + - [EnterpriseClusterWithAddonParametersAllOf](docs/EnterpriseClusterWithAddonParametersAllOf.md) + - [EnterpriseOsdClusterPayload](docs/EnterpriseOsdClusterPayload.md) - [Error](docs/Error.md) - [ErrorList](docs/ErrorList.md) - [ErrorListAllOf](docs/ErrorListAllOf.md) + - [FleetshardParameter](docs/FleetshardParameter.md) - [InstantQuery](docs/InstantQuery.md) + - [KafkaPromoteRequest](docs/KafkaPromoteRequest.md) - [KafkaRequest](docs/KafkaRequest.md) - [KafkaRequestAllOf](docs/KafkaRequestAllOf.md) - [KafkaRequestList](docs/KafkaRequestList.md) diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_default.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_default.go index 9906608fe..33dc2d739 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_default.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_default.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -190,6 +190,20 @@ type DefaultApi interface { */ GetVersionMetadataExecute(r ApiGetVersionMetadataRequest) (VersionMetadata, *_nethttp.Response, error) + /* + * PromoteKafka Method for PromoteKafka + * Promote a Kafka instance. Promotion is performed asynchronously. The `async` query parameter has to be set to `true`. Only kafka instances with an `eval` billing_model are supported + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id The ID of record + * @return ApiPromoteKafkaRequest + */ + PromoteKafka(ctx _context.Context, id string) ApiPromoteKafkaRequest + + /* + * PromoteKafkaExecute executes the request + */ + PromoteKafkaExecute(r ApiPromoteKafkaRequest) (*_nethttp.Response, error) + /* * UpdateKafkaById Method for UpdateKafkaById * Update a Kafka instance by id @@ -1847,6 +1861,179 @@ func (a *DefaultApiService) GetVersionMetadataExecute(r ApiGetVersionMetadataReq return localVarReturnValue, localVarHTTPResponse, nil } +type ApiPromoteKafkaRequest struct { + ctx _context.Context + ApiService DefaultApi + id string + async *bool + kafkaPromoteRequest *KafkaPromoteRequest +} + +func (r ApiPromoteKafkaRequest) Async(async bool) ApiPromoteKafkaRequest { + r.async = &async + return r +} +func (r ApiPromoteKafkaRequest) KafkaPromoteRequest(kafkaPromoteRequest KafkaPromoteRequest) ApiPromoteKafkaRequest { + r.kafkaPromoteRequest = &kafkaPromoteRequest + return r +} + +func (r ApiPromoteKafkaRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.PromoteKafkaExecute(r) +} + +/* + * PromoteKafka Method for PromoteKafka + * Promote a Kafka instance. Promotion is performed asynchronously. The `async` query parameter has to be set to `true`. Only kafka instances with an `eval` billing_model are supported + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id The ID of record + * @return ApiPromoteKafkaRequest + */ +func (a *DefaultApiService) PromoteKafka(ctx _context.Context, id string) ApiPromoteKafkaRequest { + return ApiPromoteKafkaRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +/* + * Execute executes the request + */ +func (a *DefaultApiService) PromoteKafkaExecute(r ApiPromoteKafkaRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PromoteKafka") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/kafkas_mgmt/v1/kafkas/{id}/promote" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.async == nil { + return nil, reportError("async is required and must be specified") + } + if r.kafkaPromoteRequest == nil { + return nil, reportError("kafkaPromoteRequest is required and must be specified") + } + + localVarQueryParams.Add("async", parameterToString(*r.async, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.kafkaPromoteRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type ApiUpdateKafkaByIdRequest struct { ctx _context.Context ApiService DefaultApi diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_enterprise_dataplane_clusters.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_enterprise_dataplane_clusters.go new file mode 100644 index 000000000..3ee851d38 --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_enterprise_dataplane_clusters.go @@ -0,0 +1,859 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +type EnterpriseDataplaneClustersApi interface { + + /* + * DeleteEnterpriseClusterById Method for DeleteEnterpriseClusterById + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the enterprise data plane cluster + * @return ApiDeleteEnterpriseClusterByIdRequest + */ + DeleteEnterpriseClusterById(ctx _context.Context, id string) ApiDeleteEnterpriseClusterByIdRequest + + /* + * DeleteEnterpriseClusterByIdExecute executes the request + * @return Error + */ + DeleteEnterpriseClusterByIdExecute(r ApiDeleteEnterpriseClusterByIdRequest) (Error, *_nethttp.Response, error) + + /* + * GetEnterpriseClusterById Method for GetEnterpriseClusterById + * Returns enterprise data plane cluster by ID + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the enterprise data plane cluster + * @return ApiGetEnterpriseClusterByIdRequest + */ + GetEnterpriseClusterById(ctx _context.Context, id string) ApiGetEnterpriseClusterByIdRequest + + /* + * GetEnterpriseClusterByIdExecute executes the request + * @return EnterpriseCluster + */ + GetEnterpriseClusterByIdExecute(r ApiGetEnterpriseClusterByIdRequest) (EnterpriseCluster, *_nethttp.Response, error) + + /* + * GetEnterpriseClusterWithAddonParameters Method for GetEnterpriseClusterWithAddonParameters + * Returns enterprise data plane cluster by ID along with its addon parameters + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the enterprise data plane cluster + * @return ApiGetEnterpriseClusterWithAddonParametersRequest + */ + GetEnterpriseClusterWithAddonParameters(ctx _context.Context, id string) ApiGetEnterpriseClusterWithAddonParametersRequest + + /* + * GetEnterpriseClusterWithAddonParametersExecute executes the request + * @return EnterpriseClusterWithAddonParameters + */ + GetEnterpriseClusterWithAddonParametersExecute(r ApiGetEnterpriseClusterWithAddonParametersRequest) (EnterpriseClusterWithAddonParameters, *_nethttp.Response, error) + + /* + * GetEnterpriseOsdClusters Method for GetEnterpriseOsdClusters + * List all Enterprise data plane clusters + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiGetEnterpriseOsdClustersRequest + */ + GetEnterpriseOsdClusters(ctx _context.Context) ApiGetEnterpriseOsdClustersRequest + + /* + * GetEnterpriseOsdClustersExecute executes the request + * @return EnterpriseClusterList + */ + GetEnterpriseOsdClustersExecute(r ApiGetEnterpriseOsdClustersRequest) (EnterpriseClusterList, *_nethttp.Response, error) + + /* + * RegisterEnterpriseOsdCluster Method for RegisterEnterpriseOsdCluster + * Register enterprise data plane cluster + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiRegisterEnterpriseOsdClusterRequest + */ + RegisterEnterpriseOsdCluster(ctx _context.Context) ApiRegisterEnterpriseOsdClusterRequest + + /* + * RegisterEnterpriseOsdClusterExecute executes the request + * @return EnterpriseClusterWithAddonParameters + */ + RegisterEnterpriseOsdClusterExecute(r ApiRegisterEnterpriseOsdClusterRequest) (EnterpriseClusterWithAddonParameters, *_nethttp.Response, error) +} + +// EnterpriseDataplaneClustersApiService EnterpriseDataplaneClustersApi service +type EnterpriseDataplaneClustersApiService service + +type ApiDeleteEnterpriseClusterByIdRequest struct { + ctx _context.Context + ApiService EnterpriseDataplaneClustersApi + async *bool + id string +} + +func (r ApiDeleteEnterpriseClusterByIdRequest) Async(async bool) ApiDeleteEnterpriseClusterByIdRequest { + r.async = &async + return r +} + +func (r ApiDeleteEnterpriseClusterByIdRequest) Execute() (Error, *_nethttp.Response, error) { + return r.ApiService.DeleteEnterpriseClusterByIdExecute(r) +} + +/* + * DeleteEnterpriseClusterById Method for DeleteEnterpriseClusterById + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the enterprise data plane cluster + * @return ApiDeleteEnterpriseClusterByIdRequest + */ +func (a *EnterpriseDataplaneClustersApiService) DeleteEnterpriseClusterById(ctx _context.Context, id string) ApiDeleteEnterpriseClusterByIdRequest { + return ApiDeleteEnterpriseClusterByIdRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +/* + * Execute executes the request + * @return Error + */ +func (a *EnterpriseDataplaneClustersApiService) DeleteEnterpriseClusterByIdExecute(r ApiDeleteEnterpriseClusterByIdRequest) (Error, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnterpriseDataplaneClustersApiService.DeleteEnterpriseClusterById") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/kafkas_mgmt/v1/clusters/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.async == nil { + return localVarReturnValue, nil, reportError("async is required and must be specified") + } + + localVarQueryParams.Add("async", parameterToString(*r.async, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEnterpriseClusterByIdRequest struct { + ctx _context.Context + ApiService EnterpriseDataplaneClustersApi + id string +} + + +func (r ApiGetEnterpriseClusterByIdRequest) Execute() (EnterpriseCluster, *_nethttp.Response, error) { + return r.ApiService.GetEnterpriseClusterByIdExecute(r) +} + +/* + * GetEnterpriseClusterById Method for GetEnterpriseClusterById + * Returns enterprise data plane cluster by ID + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the enterprise data plane cluster + * @return ApiGetEnterpriseClusterByIdRequest + */ +func (a *EnterpriseDataplaneClustersApiService) GetEnterpriseClusterById(ctx _context.Context, id string) ApiGetEnterpriseClusterByIdRequest { + return ApiGetEnterpriseClusterByIdRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +/* + * Execute executes the request + * @return EnterpriseCluster + */ +func (a *EnterpriseDataplaneClustersApiService) GetEnterpriseClusterByIdExecute(r ApiGetEnterpriseClusterByIdRequest) (EnterpriseCluster, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue EnterpriseCluster + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnterpriseDataplaneClustersApiService.GetEnterpriseClusterById") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/kafkas_mgmt/v1/clusters/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEnterpriseClusterWithAddonParametersRequest struct { + ctx _context.Context + ApiService EnterpriseDataplaneClustersApi + id string +} + + +func (r ApiGetEnterpriseClusterWithAddonParametersRequest) Execute() (EnterpriseClusterWithAddonParameters, *_nethttp.Response, error) { + return r.ApiService.GetEnterpriseClusterWithAddonParametersExecute(r) +} + +/* + * GetEnterpriseClusterWithAddonParameters Method for GetEnterpriseClusterWithAddonParameters + * Returns enterprise data plane cluster by ID along with its addon parameters + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id ID of the enterprise data plane cluster + * @return ApiGetEnterpriseClusterWithAddonParametersRequest + */ +func (a *EnterpriseDataplaneClustersApiService) GetEnterpriseClusterWithAddonParameters(ctx _context.Context, id string) ApiGetEnterpriseClusterWithAddonParametersRequest { + return ApiGetEnterpriseClusterWithAddonParametersRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +/* + * Execute executes the request + * @return EnterpriseClusterWithAddonParameters + */ +func (a *EnterpriseDataplaneClustersApiService) GetEnterpriseClusterWithAddonParametersExecute(r ApiGetEnterpriseClusterWithAddonParametersRequest) (EnterpriseClusterWithAddonParameters, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue EnterpriseClusterWithAddonParameters + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnterpriseDataplaneClustersApiService.GetEnterpriseClusterWithAddonParameters") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/kafkas_mgmt/v1/clusters/{id}/addon_parameters" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEnterpriseOsdClustersRequest struct { + ctx _context.Context + ApiService EnterpriseDataplaneClustersApi +} + + +func (r ApiGetEnterpriseOsdClustersRequest) Execute() (EnterpriseClusterList, *_nethttp.Response, error) { + return r.ApiService.GetEnterpriseOsdClustersExecute(r) +} + +/* + * GetEnterpriseOsdClusters Method for GetEnterpriseOsdClusters + * List all Enterprise data plane clusters + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiGetEnterpriseOsdClustersRequest + */ +func (a *EnterpriseDataplaneClustersApiService) GetEnterpriseOsdClusters(ctx _context.Context) ApiGetEnterpriseOsdClustersRequest { + return ApiGetEnterpriseOsdClustersRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return EnterpriseClusterList + */ +func (a *EnterpriseDataplaneClustersApiService) GetEnterpriseOsdClustersExecute(r ApiGetEnterpriseOsdClustersRequest) (EnterpriseClusterList, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue EnterpriseClusterList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnterpriseDataplaneClustersApiService.GetEnterpriseOsdClusters") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/kafkas_mgmt/v1/clusters" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRegisterEnterpriseOsdClusterRequest struct { + ctx _context.Context + ApiService EnterpriseDataplaneClustersApi + enterpriseOsdClusterPayload *EnterpriseOsdClusterPayload +} + +func (r ApiRegisterEnterpriseOsdClusterRequest) EnterpriseOsdClusterPayload(enterpriseOsdClusterPayload EnterpriseOsdClusterPayload) ApiRegisterEnterpriseOsdClusterRequest { + r.enterpriseOsdClusterPayload = &enterpriseOsdClusterPayload + return r +} + +func (r ApiRegisterEnterpriseOsdClusterRequest) Execute() (EnterpriseClusterWithAddonParameters, *_nethttp.Response, error) { + return r.ApiService.RegisterEnterpriseOsdClusterExecute(r) +} + +/* + * RegisterEnterpriseOsdCluster Method for RegisterEnterpriseOsdCluster + * Register enterprise data plane cluster + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiRegisterEnterpriseOsdClusterRequest + */ +func (a *EnterpriseDataplaneClustersApiService) RegisterEnterpriseOsdCluster(ctx _context.Context) ApiRegisterEnterpriseOsdClusterRequest { + return ApiRegisterEnterpriseOsdClusterRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return EnterpriseClusterWithAddonParameters + */ +func (a *EnterpriseDataplaneClustersApiService) RegisterEnterpriseOsdClusterExecute(r ApiRegisterEnterpriseOsdClusterRequest) (EnterpriseClusterWithAddonParameters, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue EnterpriseClusterWithAddonParameters + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnterpriseDataplaneClustersApiService.RegisterEnterpriseOsdCluster") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/kafkas_mgmt/v1/clusters" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.enterpriseOsdClusterPayload == nil { + return localVarReturnValue, nil, reportError("enterpriseOsdClusterPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.enterpriseOsdClusterPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_errors.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_errors.go index 76e1fa01d..8ce0024b6 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_errors.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_errors.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_security.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_security.go index 2c477f9f0..0664ccffb 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_security.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/api_security.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/client.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/client.go index d60862e60..7c451d5eb 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/client.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/client.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -42,7 +42,7 @@ var ( xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) ) -// APIClient manages communication with the Kafka Management API API v1.14.0 +// APIClient manages communication with the Kafka Management API API v1.15.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -52,6 +52,8 @@ type APIClient struct { DefaultApi DefaultApi + EnterpriseDataplaneClustersApi EnterpriseDataplaneClustersApi + ErrorsApi ErrorsApi SecurityApi SecurityApi @@ -74,6 +76,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.DefaultApi = (*DefaultApiService)(&c.common) + c.EnterpriseDataplaneClustersApi = (*EnterpriseDataplaneClustersApiService)(&c.common) c.ErrorsApi = (*ErrorsApiService)(&c.common) c.SecurityApi = (*SecurityApiService)(&c.common) diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/configuration.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/configuration.go index 97f52e9ba..c8fd23f44 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/configuration.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/configuration.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider.go index bd9f82852..0c68a57fe 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider_list.go index f798809b7..2dce5f4e4 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider_list_all_of.go index 6e166645b..b184a4982 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider_list_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_provider_list_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -17,15 +17,16 @@ import ( // CloudProviderListAllOf struct for CloudProviderListAllOf type CloudProviderListAllOf struct { - Items *[]CloudProvider `json:"items,omitempty"` + Items []CloudProvider `json:"items"` } // NewCloudProviderListAllOf instantiates a new CloudProviderListAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCloudProviderListAllOf() *CloudProviderListAllOf { +func NewCloudProviderListAllOf(items []CloudProvider) *CloudProviderListAllOf { this := CloudProviderListAllOf{} + this.Items = items return &this } @@ -37,41 +38,33 @@ func NewCloudProviderListAllOfWithDefaults() *CloudProviderListAllOf { return &this } -// GetItems returns the Items field value if set, zero value otherwise. +// GetItems returns the Items field value func (o *CloudProviderListAllOf) GetItems() []CloudProvider { - if o == nil || o.Items == nil { + if o == nil { var ret []CloudProvider return ret } - return *o.Items + + return o.Items } -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. func (o *CloudProviderListAllOf) GetItemsOk() (*[]CloudProvider, bool) { - if o == nil || o.Items == nil { + if o == nil { return nil, false } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *CloudProviderListAllOf) HasItems() bool { - if o != nil && o.Items != nil { - return true - } - - return false + return &o.Items, true } -// SetItems gets a reference to the given []CloudProvider and assigns it to the Items field. +// SetItems sets field value func (o *CloudProviderListAllOf) SetItems(v []CloudProvider) { - o.Items = &v + o.Items = v } func (o CloudProviderListAllOf) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Items != nil { + if true { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region.go index 254d38bbb..4e2aa66da 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region_list.go index 8092bc1f1..6c58356d6 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region_list_all_of.go index b99cc0c5c..7af551701 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region_list_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_cloud_region_list_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -17,15 +17,16 @@ import ( // CloudRegionListAllOf struct for CloudRegionListAllOf type CloudRegionListAllOf struct { - Items *[]CloudRegion `json:"items,omitempty"` + Items []CloudRegion `json:"items"` } // NewCloudRegionListAllOf instantiates a new CloudRegionListAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCloudRegionListAllOf() *CloudRegionListAllOf { +func NewCloudRegionListAllOf(items []CloudRegion) *CloudRegionListAllOf { this := CloudRegionListAllOf{} + this.Items = items return &this } @@ -37,41 +38,33 @@ func NewCloudRegionListAllOfWithDefaults() *CloudRegionListAllOf { return &this } -// GetItems returns the Items field value if set, zero value otherwise. +// GetItems returns the Items field value func (o *CloudRegionListAllOf) GetItems() []CloudRegion { - if o == nil || o.Items == nil { + if o == nil { var ret []CloudRegion return ret } - return *o.Items + + return o.Items } -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. func (o *CloudRegionListAllOf) GetItemsOk() (*[]CloudRegion, bool) { - if o == nil || o.Items == nil { + if o == nil { return nil, false } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *CloudRegionListAllOf) HasItems() bool { - if o != nil && o.Items != nil { - return true - } - - return false + return &o.Items, true } -// SetItems gets a reference to the given []CloudRegion and assigns it to the Items field. +// SetItems sets field value func (o *CloudRegionListAllOf) SetItems(v []CloudRegion) { - o.Items = &v + o.Items = v } func (o CloudRegionListAllOf) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Items != nil { + if true { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster.go new file mode 100644 index 000000000..813ada980 --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster.go @@ -0,0 +1,271 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// EnterpriseCluster struct for EnterpriseCluster +type EnterpriseCluster struct { + Id string `json:"id"` + Kind string `json:"kind"` + Href string `json:"href"` + // Indicates whether Kafkas created on this data plane cluster have to be accessed via private network + AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"` + // ocm cluster id of the registered Enterprise cluster + ClusterId *string `json:"cluster_id,omitempty"` + // status of registered Enterprise cluster + Status *string `json:"status,omitempty"` +} + +// NewEnterpriseCluster instantiates a new EnterpriseCluster object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnterpriseCluster(id string, kind string, href string, accessKafkasViaPrivateNetwork bool) *EnterpriseCluster { + this := EnterpriseCluster{} + this.Id = id + this.Kind = kind + this.Href = href + this.AccessKafkasViaPrivateNetwork = accessKafkasViaPrivateNetwork + return &this +} + +// NewEnterpriseClusterWithDefaults instantiates a new EnterpriseCluster object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnterpriseClusterWithDefaults() *EnterpriseCluster { + this := EnterpriseCluster{} + return &this +} + +// GetId returns the Id field value +func (o *EnterpriseCluster) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EnterpriseCluster) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EnterpriseCluster) SetId(v string) { + o.Id = v +} + +// GetKind returns the Kind field value +func (o *EnterpriseCluster) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *EnterpriseCluster) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *EnterpriseCluster) SetKind(v string) { + o.Kind = v +} + +// GetHref returns the Href field value +func (o *EnterpriseCluster) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *EnterpriseCluster) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *EnterpriseCluster) SetHref(v string) { + o.Href = v +} + +// GetAccessKafkasViaPrivateNetwork returns the AccessKafkasViaPrivateNetwork field value +func (o *EnterpriseCluster) GetAccessKafkasViaPrivateNetwork() bool { + if o == nil { + var ret bool + return ret + } + + return o.AccessKafkasViaPrivateNetwork +} + +// GetAccessKafkasViaPrivateNetworkOk returns a tuple with the AccessKafkasViaPrivateNetwork field value +// and a boolean to check if the value has been set. +func (o *EnterpriseCluster) GetAccessKafkasViaPrivateNetworkOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AccessKafkasViaPrivateNetwork, true +} + +// SetAccessKafkasViaPrivateNetwork sets field value +func (o *EnterpriseCluster) SetAccessKafkasViaPrivateNetwork(v bool) { + o.AccessKafkasViaPrivateNetwork = v +} + +// GetClusterId returns the ClusterId field value if set, zero value otherwise. +func (o *EnterpriseCluster) GetClusterId() string { + if o == nil || o.ClusterId == nil { + var ret string + return ret + } + return *o.ClusterId +} + +// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseCluster) GetClusterIdOk() (*string, bool) { + if o == nil || o.ClusterId == nil { + return nil, false + } + return o.ClusterId, true +} + +// HasClusterId returns a boolean if a field has been set. +func (o *EnterpriseCluster) HasClusterId() bool { + if o != nil && o.ClusterId != nil { + return true + } + + return false +} + +// SetClusterId gets a reference to the given string and assigns it to the ClusterId field. +func (o *EnterpriseCluster) SetClusterId(v string) { + o.ClusterId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EnterpriseCluster) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseCluster) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EnterpriseCluster) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *EnterpriseCluster) SetStatus(v string) { + o.Status = &v +} + +func (o EnterpriseCluster) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["href"] = o.Href + } + if true { + toSerialize["access_kafkas_via_private_network"] = o.AccessKafkasViaPrivateNetwork + } + if o.ClusterId != nil { + toSerialize["cluster_id"] = o.ClusterId + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableEnterpriseCluster struct { + value *EnterpriseCluster + isSet bool +} + +func (v NullableEnterpriseCluster) Get() *EnterpriseCluster { + return v.value +} + +func (v *NullableEnterpriseCluster) Set(val *EnterpriseCluster) { + v.value = val + v.isSet = true +} + +func (v NullableEnterpriseCluster) IsSet() bool { + return v.isSet +} + +func (v *NullableEnterpriseCluster) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnterpriseCluster(val *EnterpriseCluster) *NullableEnterpriseCluster { + return &NullableEnterpriseCluster{value: val, isSet: true} +} + +func (v NullableEnterpriseCluster) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnterpriseCluster) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_all_of.go new file mode 100644 index 000000000..335858668 --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_all_of.go @@ -0,0 +1,184 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// EnterpriseClusterAllOf struct for EnterpriseClusterAllOf +type EnterpriseClusterAllOf struct { + // Indicates whether Kafkas created on this data plane cluster have to be accessed via private network + AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"` + // ocm cluster id of the registered Enterprise cluster + ClusterId *string `json:"cluster_id,omitempty"` + // status of registered Enterprise cluster + Status *string `json:"status,omitempty"` +} + +// NewEnterpriseClusterAllOf instantiates a new EnterpriseClusterAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnterpriseClusterAllOf(accessKafkasViaPrivateNetwork bool) *EnterpriseClusterAllOf { + this := EnterpriseClusterAllOf{} + this.AccessKafkasViaPrivateNetwork = accessKafkasViaPrivateNetwork + return &this +} + +// NewEnterpriseClusterAllOfWithDefaults instantiates a new EnterpriseClusterAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnterpriseClusterAllOfWithDefaults() *EnterpriseClusterAllOf { + this := EnterpriseClusterAllOf{} + return &this +} + +// GetAccessKafkasViaPrivateNetwork returns the AccessKafkasViaPrivateNetwork field value +func (o *EnterpriseClusterAllOf) GetAccessKafkasViaPrivateNetwork() bool { + if o == nil { + var ret bool + return ret + } + + return o.AccessKafkasViaPrivateNetwork +} + +// GetAccessKafkasViaPrivateNetworkOk returns a tuple with the AccessKafkasViaPrivateNetwork field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterAllOf) GetAccessKafkasViaPrivateNetworkOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AccessKafkasViaPrivateNetwork, true +} + +// SetAccessKafkasViaPrivateNetwork sets field value +func (o *EnterpriseClusterAllOf) SetAccessKafkasViaPrivateNetwork(v bool) { + o.AccessKafkasViaPrivateNetwork = v +} + +// GetClusterId returns the ClusterId field value if set, zero value otherwise. +func (o *EnterpriseClusterAllOf) GetClusterId() string { + if o == nil || o.ClusterId == nil { + var ret string + return ret + } + return *o.ClusterId +} + +// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterAllOf) GetClusterIdOk() (*string, bool) { + if o == nil || o.ClusterId == nil { + return nil, false + } + return o.ClusterId, true +} + +// HasClusterId returns a boolean if a field has been set. +func (o *EnterpriseClusterAllOf) HasClusterId() bool { + if o != nil && o.ClusterId != nil { + return true + } + + return false +} + +// SetClusterId gets a reference to the given string and assigns it to the ClusterId field. +func (o *EnterpriseClusterAllOf) SetClusterId(v string) { + o.ClusterId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EnterpriseClusterAllOf) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterAllOf) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EnterpriseClusterAllOf) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *EnterpriseClusterAllOf) SetStatus(v string) { + o.Status = &v +} + +func (o EnterpriseClusterAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["access_kafkas_via_private_network"] = o.AccessKafkasViaPrivateNetwork + } + if o.ClusterId != nil { + toSerialize["cluster_id"] = o.ClusterId + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableEnterpriseClusterAllOf struct { + value *EnterpriseClusterAllOf + isSet bool +} + +func (v NullableEnterpriseClusterAllOf) Get() *EnterpriseClusterAllOf { + return v.value +} + +func (v *NullableEnterpriseClusterAllOf) Set(val *EnterpriseClusterAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableEnterpriseClusterAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableEnterpriseClusterAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnterpriseClusterAllOf(val *EnterpriseClusterAllOf) *NullableEnterpriseClusterAllOf { + return &NullableEnterpriseClusterAllOf{value: val, isSet: true} +} + +func (v NullableEnterpriseClusterAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnterpriseClusterAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_list.go new file mode 100644 index 000000000..da1d297b8 --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_list.go @@ -0,0 +1,225 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// EnterpriseClusterList struct for EnterpriseClusterList +type EnterpriseClusterList struct { + Kind string `json:"kind"` + Page int32 `json:"page"` + Size int32 `json:"size"` + Total int32 `json:"total"` + Items []EnterpriseCluster `json:"items"` +} + +// NewEnterpriseClusterList instantiates a new EnterpriseClusterList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnterpriseClusterList(kind string, page int32, size int32, total int32, items []EnterpriseCluster) *EnterpriseClusterList { + this := EnterpriseClusterList{} + this.Kind = kind + this.Page = page + this.Size = size + this.Total = total + this.Items = items + return &this +} + +// NewEnterpriseClusterListWithDefaults instantiates a new EnterpriseClusterList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnterpriseClusterListWithDefaults() *EnterpriseClusterList { + this := EnterpriseClusterList{} + return &this +} + +// GetKind returns the Kind field value +func (o *EnterpriseClusterList) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterList) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *EnterpriseClusterList) SetKind(v string) { + o.Kind = v +} + +// GetPage returns the Page field value +func (o *EnterpriseClusterList) GetPage() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterList) GetPageOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *EnterpriseClusterList) SetPage(v int32) { + o.Page = v +} + +// GetSize returns the Size field value +func (o *EnterpriseClusterList) GetSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterList) GetSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *EnterpriseClusterList) SetSize(v int32) { + o.Size = v +} + +// GetTotal returns the Total field value +func (o *EnterpriseClusterList) GetTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterList) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *EnterpriseClusterList) SetTotal(v int32) { + o.Total = v +} + +// GetItems returns the Items field value +func (o *EnterpriseClusterList) GetItems() []EnterpriseCluster { + if o == nil { + var ret []EnterpriseCluster + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterList) GetItemsOk() (*[]EnterpriseCluster, bool) { + if o == nil { + return nil, false + } + return &o.Items, true +} + +// SetItems sets field value +func (o *EnterpriseClusterList) SetItems(v []EnterpriseCluster) { + o.Items = v +} + +func (o EnterpriseClusterList) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["page"] = o.Page + } + if true { + toSerialize["size"] = o.Size + } + if true { + toSerialize["total"] = o.Total + } + if true { + toSerialize["items"] = o.Items + } + return json.Marshal(toSerialize) +} + +type NullableEnterpriseClusterList struct { + value *EnterpriseClusterList + isSet bool +} + +func (v NullableEnterpriseClusterList) Get() *EnterpriseClusterList { + return v.value +} + +func (v *NullableEnterpriseClusterList) Set(val *EnterpriseClusterList) { + v.value = val + v.isSet = true +} + +func (v NullableEnterpriseClusterList) IsSet() bool { + return v.isSet +} + +func (v *NullableEnterpriseClusterList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnterpriseClusterList(val *EnterpriseClusterList) *NullableEnterpriseClusterList { + return &NullableEnterpriseClusterList{value: val, isSet: true} +} + +func (v NullableEnterpriseClusterList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnterpriseClusterList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_list_all_of.go new file mode 100644 index 000000000..6d461fe82 --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_list_all_of.go @@ -0,0 +1,109 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// EnterpriseClusterListAllOf struct for EnterpriseClusterListAllOf +type EnterpriseClusterListAllOf struct { + Items []EnterpriseCluster `json:"items"` +} + +// NewEnterpriseClusterListAllOf instantiates a new EnterpriseClusterListAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnterpriseClusterListAllOf(items []EnterpriseCluster) *EnterpriseClusterListAllOf { + this := EnterpriseClusterListAllOf{} + this.Items = items + return &this +} + +// NewEnterpriseClusterListAllOfWithDefaults instantiates a new EnterpriseClusterListAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnterpriseClusterListAllOfWithDefaults() *EnterpriseClusterListAllOf { + this := EnterpriseClusterListAllOf{} + return &this +} + +// GetItems returns the Items field value +func (o *EnterpriseClusterListAllOf) GetItems() []EnterpriseCluster { + if o == nil { + var ret []EnterpriseCluster + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterListAllOf) GetItemsOk() (*[]EnterpriseCluster, bool) { + if o == nil { + return nil, false + } + return &o.Items, true +} + +// SetItems sets field value +func (o *EnterpriseClusterListAllOf) SetItems(v []EnterpriseCluster) { + o.Items = v +} + +func (o EnterpriseClusterListAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["items"] = o.Items + } + return json.Marshal(toSerialize) +} + +type NullableEnterpriseClusterListAllOf struct { + value *EnterpriseClusterListAllOf + isSet bool +} + +func (v NullableEnterpriseClusterListAllOf) Get() *EnterpriseClusterListAllOf { + return v.value +} + +func (v *NullableEnterpriseClusterListAllOf) Set(val *EnterpriseClusterListAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableEnterpriseClusterListAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableEnterpriseClusterListAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnterpriseClusterListAllOf(val *EnterpriseClusterListAllOf) *NullableEnterpriseClusterListAllOf { + return &NullableEnterpriseClusterListAllOf{value: val, isSet: true} +} + +func (v NullableEnterpriseClusterListAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnterpriseClusterListAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_with_addon_parameters.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_with_addon_parameters.go new file mode 100644 index 000000000..84c168f9e --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_with_addon_parameters.go @@ -0,0 +1,307 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// EnterpriseClusterWithAddonParameters Enterprise cluster with addon parameters +type EnterpriseClusterWithAddonParameters struct { + Id string `json:"id"` + Kind string `json:"kind"` + Href string `json:"href"` + // Indicates whether Kafkas created on this data plane cluster have to be accessed via private network + AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"` + // OCM cluster id of the registered Enterprise cluster + ClusterId *string `json:"cluster_id,omitempty"` + // status of registered Enterprise cluster + Status *string `json:"status,omitempty"` + FleetshardParameters *[]FleetshardParameter `json:"fleetshard_parameters,omitempty"` +} + +// NewEnterpriseClusterWithAddonParameters instantiates a new EnterpriseClusterWithAddonParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnterpriseClusterWithAddonParameters(id string, kind string, href string, accessKafkasViaPrivateNetwork bool) *EnterpriseClusterWithAddonParameters { + this := EnterpriseClusterWithAddonParameters{} + this.Id = id + this.Kind = kind + this.Href = href + this.AccessKafkasViaPrivateNetwork = accessKafkasViaPrivateNetwork + return &this +} + +// NewEnterpriseClusterWithAddonParametersWithDefaults instantiates a new EnterpriseClusterWithAddonParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnterpriseClusterWithAddonParametersWithDefaults() *EnterpriseClusterWithAddonParameters { + this := EnterpriseClusterWithAddonParameters{} + return &this +} + +// GetId returns the Id field value +func (o *EnterpriseClusterWithAddonParameters) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParameters) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *EnterpriseClusterWithAddonParameters) SetId(v string) { + o.Id = v +} + +// GetKind returns the Kind field value +func (o *EnterpriseClusterWithAddonParameters) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParameters) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *EnterpriseClusterWithAddonParameters) SetKind(v string) { + o.Kind = v +} + +// GetHref returns the Href field value +func (o *EnterpriseClusterWithAddonParameters) GetHref() string { + if o == nil { + var ret string + return ret + } + + return o.Href +} + +// GetHrefOk returns a tuple with the Href field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParameters) GetHrefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Href, true +} + +// SetHref sets field value +func (o *EnterpriseClusterWithAddonParameters) SetHref(v string) { + o.Href = v +} + +// GetAccessKafkasViaPrivateNetwork returns the AccessKafkasViaPrivateNetwork field value +func (o *EnterpriseClusterWithAddonParameters) GetAccessKafkasViaPrivateNetwork() bool { + if o == nil { + var ret bool + return ret + } + + return o.AccessKafkasViaPrivateNetwork +} + +// GetAccessKafkasViaPrivateNetworkOk returns a tuple with the AccessKafkasViaPrivateNetwork field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParameters) GetAccessKafkasViaPrivateNetworkOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AccessKafkasViaPrivateNetwork, true +} + +// SetAccessKafkasViaPrivateNetwork sets field value +func (o *EnterpriseClusterWithAddonParameters) SetAccessKafkasViaPrivateNetwork(v bool) { + o.AccessKafkasViaPrivateNetwork = v +} + +// GetClusterId returns the ClusterId field value if set, zero value otherwise. +func (o *EnterpriseClusterWithAddonParameters) GetClusterId() string { + if o == nil || o.ClusterId == nil { + var ret string + return ret + } + return *o.ClusterId +} + +// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParameters) GetClusterIdOk() (*string, bool) { + if o == nil || o.ClusterId == nil { + return nil, false + } + return o.ClusterId, true +} + +// HasClusterId returns a boolean if a field has been set. +func (o *EnterpriseClusterWithAddonParameters) HasClusterId() bool { + if o != nil && o.ClusterId != nil { + return true + } + + return false +} + +// SetClusterId gets a reference to the given string and assigns it to the ClusterId field. +func (o *EnterpriseClusterWithAddonParameters) SetClusterId(v string) { + o.ClusterId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EnterpriseClusterWithAddonParameters) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParameters) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EnterpriseClusterWithAddonParameters) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *EnterpriseClusterWithAddonParameters) SetStatus(v string) { + o.Status = &v +} + +// GetFleetshardParameters returns the FleetshardParameters field value if set, zero value otherwise. +func (o *EnterpriseClusterWithAddonParameters) GetFleetshardParameters() []FleetshardParameter { + if o == nil || o.FleetshardParameters == nil { + var ret []FleetshardParameter + return ret + } + return *o.FleetshardParameters +} + +// GetFleetshardParametersOk returns a tuple with the FleetshardParameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParameters) GetFleetshardParametersOk() (*[]FleetshardParameter, bool) { + if o == nil || o.FleetshardParameters == nil { + return nil, false + } + return o.FleetshardParameters, true +} + +// HasFleetshardParameters returns a boolean if a field has been set. +func (o *EnterpriseClusterWithAddonParameters) HasFleetshardParameters() bool { + if o != nil && o.FleetshardParameters != nil { + return true + } + + return false +} + +// SetFleetshardParameters gets a reference to the given []FleetshardParameter and assigns it to the FleetshardParameters field. +func (o *EnterpriseClusterWithAddonParameters) SetFleetshardParameters(v []FleetshardParameter) { + o.FleetshardParameters = &v +} + +func (o EnterpriseClusterWithAddonParameters) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["href"] = o.Href + } + if true { + toSerialize["access_kafkas_via_private_network"] = o.AccessKafkasViaPrivateNetwork + } + if o.ClusterId != nil { + toSerialize["cluster_id"] = o.ClusterId + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.FleetshardParameters != nil { + toSerialize["fleetshard_parameters"] = o.FleetshardParameters + } + return json.Marshal(toSerialize) +} + +type NullableEnterpriseClusterWithAddonParameters struct { + value *EnterpriseClusterWithAddonParameters + isSet bool +} + +func (v NullableEnterpriseClusterWithAddonParameters) Get() *EnterpriseClusterWithAddonParameters { + return v.value +} + +func (v *NullableEnterpriseClusterWithAddonParameters) Set(val *EnterpriseClusterWithAddonParameters) { + v.value = val + v.isSet = true +} + +func (v NullableEnterpriseClusterWithAddonParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableEnterpriseClusterWithAddonParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnterpriseClusterWithAddonParameters(val *EnterpriseClusterWithAddonParameters) *NullableEnterpriseClusterWithAddonParameters { + return &NullableEnterpriseClusterWithAddonParameters{value: val, isSet: true} +} + +func (v NullableEnterpriseClusterWithAddonParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnterpriseClusterWithAddonParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_with_addon_parameters_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_with_addon_parameters_all_of.go new file mode 100644 index 000000000..03b9088fe --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_cluster_with_addon_parameters_all_of.go @@ -0,0 +1,220 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// EnterpriseClusterWithAddonParametersAllOf struct for EnterpriseClusterWithAddonParametersAllOf +type EnterpriseClusterWithAddonParametersAllOf struct { + // Indicates whether Kafkas created on this data plane cluster have to be accessed via private network + AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"` + // OCM cluster id of the registered Enterprise cluster + ClusterId *string `json:"cluster_id,omitempty"` + // status of registered Enterprise cluster + Status *string `json:"status,omitempty"` + FleetshardParameters *[]FleetshardParameter `json:"fleetshard_parameters,omitempty"` +} + +// NewEnterpriseClusterWithAddonParametersAllOf instantiates a new EnterpriseClusterWithAddonParametersAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnterpriseClusterWithAddonParametersAllOf(accessKafkasViaPrivateNetwork bool) *EnterpriseClusterWithAddonParametersAllOf { + this := EnterpriseClusterWithAddonParametersAllOf{} + this.AccessKafkasViaPrivateNetwork = accessKafkasViaPrivateNetwork + return &this +} + +// NewEnterpriseClusterWithAddonParametersAllOfWithDefaults instantiates a new EnterpriseClusterWithAddonParametersAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnterpriseClusterWithAddonParametersAllOfWithDefaults() *EnterpriseClusterWithAddonParametersAllOf { + this := EnterpriseClusterWithAddonParametersAllOf{} + return &this +} + +// GetAccessKafkasViaPrivateNetwork returns the AccessKafkasViaPrivateNetwork field value +func (o *EnterpriseClusterWithAddonParametersAllOf) GetAccessKafkasViaPrivateNetwork() bool { + if o == nil { + var ret bool + return ret + } + + return o.AccessKafkasViaPrivateNetwork +} + +// GetAccessKafkasViaPrivateNetworkOk returns a tuple with the AccessKafkasViaPrivateNetwork field value +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParametersAllOf) GetAccessKafkasViaPrivateNetworkOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AccessKafkasViaPrivateNetwork, true +} + +// SetAccessKafkasViaPrivateNetwork sets field value +func (o *EnterpriseClusterWithAddonParametersAllOf) SetAccessKafkasViaPrivateNetwork(v bool) { + o.AccessKafkasViaPrivateNetwork = v +} + +// GetClusterId returns the ClusterId field value if set, zero value otherwise. +func (o *EnterpriseClusterWithAddonParametersAllOf) GetClusterId() string { + if o == nil || o.ClusterId == nil { + var ret string + return ret + } + return *o.ClusterId +} + +// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParametersAllOf) GetClusterIdOk() (*string, bool) { + if o == nil || o.ClusterId == nil { + return nil, false + } + return o.ClusterId, true +} + +// HasClusterId returns a boolean if a field has been set. +func (o *EnterpriseClusterWithAddonParametersAllOf) HasClusterId() bool { + if o != nil && o.ClusterId != nil { + return true + } + + return false +} + +// SetClusterId gets a reference to the given string and assigns it to the ClusterId field. +func (o *EnterpriseClusterWithAddonParametersAllOf) SetClusterId(v string) { + o.ClusterId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EnterpriseClusterWithAddonParametersAllOf) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParametersAllOf) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EnterpriseClusterWithAddonParametersAllOf) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *EnterpriseClusterWithAddonParametersAllOf) SetStatus(v string) { + o.Status = &v +} + +// GetFleetshardParameters returns the FleetshardParameters field value if set, zero value otherwise. +func (o *EnterpriseClusterWithAddonParametersAllOf) GetFleetshardParameters() []FleetshardParameter { + if o == nil || o.FleetshardParameters == nil { + var ret []FleetshardParameter + return ret + } + return *o.FleetshardParameters +} + +// GetFleetshardParametersOk returns a tuple with the FleetshardParameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnterpriseClusterWithAddonParametersAllOf) GetFleetshardParametersOk() (*[]FleetshardParameter, bool) { + if o == nil || o.FleetshardParameters == nil { + return nil, false + } + return o.FleetshardParameters, true +} + +// HasFleetshardParameters returns a boolean if a field has been set. +func (o *EnterpriseClusterWithAddonParametersAllOf) HasFleetshardParameters() bool { + if o != nil && o.FleetshardParameters != nil { + return true + } + + return false +} + +// SetFleetshardParameters gets a reference to the given []FleetshardParameter and assigns it to the FleetshardParameters field. +func (o *EnterpriseClusterWithAddonParametersAllOf) SetFleetshardParameters(v []FleetshardParameter) { + o.FleetshardParameters = &v +} + +func (o EnterpriseClusterWithAddonParametersAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["access_kafkas_via_private_network"] = o.AccessKafkasViaPrivateNetwork + } + if o.ClusterId != nil { + toSerialize["cluster_id"] = o.ClusterId + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.FleetshardParameters != nil { + toSerialize["fleetshard_parameters"] = o.FleetshardParameters + } + return json.Marshal(toSerialize) +} + +type NullableEnterpriseClusterWithAddonParametersAllOf struct { + value *EnterpriseClusterWithAddonParametersAllOf + isSet bool +} + +func (v NullableEnterpriseClusterWithAddonParametersAllOf) Get() *EnterpriseClusterWithAddonParametersAllOf { + return v.value +} + +func (v *NullableEnterpriseClusterWithAddonParametersAllOf) Set(val *EnterpriseClusterWithAddonParametersAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableEnterpriseClusterWithAddonParametersAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableEnterpriseClusterWithAddonParametersAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnterpriseClusterWithAddonParametersAllOf(val *EnterpriseClusterWithAddonParametersAllOf) *NullableEnterpriseClusterWithAddonParametersAllOf { + return &NullableEnterpriseClusterWithAddonParametersAllOf{value: val, isSet: true} +} + +func (v NullableEnterpriseClusterWithAddonParametersAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnterpriseClusterWithAddonParametersAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_osd_cluster_payload.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_osd_cluster_payload.go new file mode 100644 index 000000000..74ecf2296 --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_enterprise_osd_cluster_payload.go @@ -0,0 +1,230 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// EnterpriseOsdClusterPayload Schema for the request body sent to /clusters POST +type EnterpriseOsdClusterPayload struct { + // Sets whether Kafkas created on this data plane cluster have to be accessed via private network + AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"` + // The data plane cluster ID. This is the ID of the cluster obtained from OpenShift Cluster Manager (OCM) API + ClusterId string `json:"cluster_id"` + // external cluster ID. Can be obtained from the response JSON of OCM get /api/clusters_mgmt/v1/clusters/ + ClusterExternalId string `json:"cluster_external_id"` + // dns name of the cluster. Can be obtained from the response JSON of the /api/clusters_mgmt/v1/clusters//ingresses (dns_name) + ClusterIngressDnsName string `json:"cluster_ingress_dns_name"` + // The node count given to the created kafka machine pool. The machine pool must be created via /api/clusters_mgmt/v1/clusters//machine_pools prior to passing this value. The created machine pool must have a `bf2.org/kafkaInstanceProfileType=standard` label and a `bf2.org/kafkaInstanceProfileType=standard:NoExecute` taint. The name of the machine pool must be `kafka-standard` The node count value has to be a multiple of 3 with a minimum of 3 nodes. + KafkaMachinePoolNodeCount int32 `json:"kafka_machine_pool_node_count"` +} + +// NewEnterpriseOsdClusterPayload instantiates a new EnterpriseOsdClusterPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnterpriseOsdClusterPayload(accessKafkasViaPrivateNetwork bool, clusterId string, clusterExternalId string, clusterIngressDnsName string, kafkaMachinePoolNodeCount int32) *EnterpriseOsdClusterPayload { + this := EnterpriseOsdClusterPayload{} + this.AccessKafkasViaPrivateNetwork = accessKafkasViaPrivateNetwork + this.ClusterId = clusterId + this.ClusterExternalId = clusterExternalId + this.ClusterIngressDnsName = clusterIngressDnsName + this.KafkaMachinePoolNodeCount = kafkaMachinePoolNodeCount + return &this +} + +// NewEnterpriseOsdClusterPayloadWithDefaults instantiates a new EnterpriseOsdClusterPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnterpriseOsdClusterPayloadWithDefaults() *EnterpriseOsdClusterPayload { + this := EnterpriseOsdClusterPayload{} + return &this +} + +// GetAccessKafkasViaPrivateNetwork returns the AccessKafkasViaPrivateNetwork field value +func (o *EnterpriseOsdClusterPayload) GetAccessKafkasViaPrivateNetwork() bool { + if o == nil { + var ret bool + return ret + } + + return o.AccessKafkasViaPrivateNetwork +} + +// GetAccessKafkasViaPrivateNetworkOk returns a tuple with the AccessKafkasViaPrivateNetwork field value +// and a boolean to check if the value has been set. +func (o *EnterpriseOsdClusterPayload) GetAccessKafkasViaPrivateNetworkOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AccessKafkasViaPrivateNetwork, true +} + +// SetAccessKafkasViaPrivateNetwork sets field value +func (o *EnterpriseOsdClusterPayload) SetAccessKafkasViaPrivateNetwork(v bool) { + o.AccessKafkasViaPrivateNetwork = v +} + +// GetClusterId returns the ClusterId field value +func (o *EnterpriseOsdClusterPayload) GetClusterId() string { + if o == nil { + var ret string + return ret + } + + return o.ClusterId +} + +// GetClusterIdOk returns a tuple with the ClusterId field value +// and a boolean to check if the value has been set. +func (o *EnterpriseOsdClusterPayload) GetClusterIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClusterId, true +} + +// SetClusterId sets field value +func (o *EnterpriseOsdClusterPayload) SetClusterId(v string) { + o.ClusterId = v +} + +// GetClusterExternalId returns the ClusterExternalId field value +func (o *EnterpriseOsdClusterPayload) GetClusterExternalId() string { + if o == nil { + var ret string + return ret + } + + return o.ClusterExternalId +} + +// GetClusterExternalIdOk returns a tuple with the ClusterExternalId field value +// and a boolean to check if the value has been set. +func (o *EnterpriseOsdClusterPayload) GetClusterExternalIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClusterExternalId, true +} + +// SetClusterExternalId sets field value +func (o *EnterpriseOsdClusterPayload) SetClusterExternalId(v string) { + o.ClusterExternalId = v +} + +// GetClusterIngressDnsName returns the ClusterIngressDnsName field value +func (o *EnterpriseOsdClusterPayload) GetClusterIngressDnsName() string { + if o == nil { + var ret string + return ret + } + + return o.ClusterIngressDnsName +} + +// GetClusterIngressDnsNameOk returns a tuple with the ClusterIngressDnsName field value +// and a boolean to check if the value has been set. +func (o *EnterpriseOsdClusterPayload) GetClusterIngressDnsNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClusterIngressDnsName, true +} + +// SetClusterIngressDnsName sets field value +func (o *EnterpriseOsdClusterPayload) SetClusterIngressDnsName(v string) { + o.ClusterIngressDnsName = v +} + +// GetKafkaMachinePoolNodeCount returns the KafkaMachinePoolNodeCount field value +func (o *EnterpriseOsdClusterPayload) GetKafkaMachinePoolNodeCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.KafkaMachinePoolNodeCount +} + +// GetKafkaMachinePoolNodeCountOk returns a tuple with the KafkaMachinePoolNodeCount field value +// and a boolean to check if the value has been set. +func (o *EnterpriseOsdClusterPayload) GetKafkaMachinePoolNodeCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.KafkaMachinePoolNodeCount, true +} + +// SetKafkaMachinePoolNodeCount sets field value +func (o *EnterpriseOsdClusterPayload) SetKafkaMachinePoolNodeCount(v int32) { + o.KafkaMachinePoolNodeCount = v +} + +func (o EnterpriseOsdClusterPayload) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["access_kafkas_via_private_network"] = o.AccessKafkasViaPrivateNetwork + } + if true { + toSerialize["cluster_id"] = o.ClusterId + } + if true { + toSerialize["cluster_external_id"] = o.ClusterExternalId + } + if true { + toSerialize["cluster_ingress_dns_name"] = o.ClusterIngressDnsName + } + if true { + toSerialize["kafka_machine_pool_node_count"] = o.KafkaMachinePoolNodeCount + } + return json.Marshal(toSerialize) +} + +type NullableEnterpriseOsdClusterPayload struct { + value *EnterpriseOsdClusterPayload + isSet bool +} + +func (v NullableEnterpriseOsdClusterPayload) Get() *EnterpriseOsdClusterPayload { + return v.value +} + +func (v *NullableEnterpriseOsdClusterPayload) Set(val *EnterpriseOsdClusterPayload) { + v.value = val + v.isSet = true +} + +func (v NullableEnterpriseOsdClusterPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableEnterpriseOsdClusterPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnterpriseOsdClusterPayload(val *EnterpriseOsdClusterPayload) *NullableEnterpriseOsdClusterPayload { + return &NullableEnterpriseOsdClusterPayload{value: val, isSet: true} +} + +func (v NullableEnterpriseOsdClusterPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnterpriseOsdClusterPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error.go index 3158f5ee5..af56f673e 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error_list.go index 954888dd6..99a630eac 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error_list_all_of.go index 2fd81a08d..556211053 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error_list_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_error_list_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -17,15 +17,16 @@ import ( // ErrorListAllOf struct for ErrorListAllOf type ErrorListAllOf struct { - Items *[]Error `json:"items,omitempty"` + Items []Error `json:"items"` } // NewErrorListAllOf instantiates a new ErrorListAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewErrorListAllOf() *ErrorListAllOf { +func NewErrorListAllOf(items []Error) *ErrorListAllOf { this := ErrorListAllOf{} + this.Items = items return &this } @@ -37,41 +38,33 @@ func NewErrorListAllOfWithDefaults() *ErrorListAllOf { return &this } -// GetItems returns the Items field value if set, zero value otherwise. +// GetItems returns the Items field value func (o *ErrorListAllOf) GetItems() []Error { - if o == nil || o.Items == nil { + if o == nil { var ret []Error return ret } - return *o.Items + + return o.Items } -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. func (o *ErrorListAllOf) GetItemsOk() (*[]Error, bool) { - if o == nil || o.Items == nil { + if o == nil { return nil, false } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ErrorListAllOf) HasItems() bool { - if o != nil && o.Items != nil { - return true - } - - return false + return &o.Items, true } -// SetItems gets a reference to the given []Error and assigns it to the Items field. +// SetItems sets field value func (o *ErrorListAllOf) SetItems(v []Error) { - o.Items = &v + o.Items = v } func (o ErrorListAllOf) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Items != nil { + if true { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_fleetshard_parameter.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_fleetshard_parameter.go new file mode 100644 index 000000000..e4fd69509 --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_fleetshard_parameter.go @@ -0,0 +1,152 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// FleetshardParameter Fleetshard parameter consumed by enterprise cluster +type FleetshardParameter struct { + Id *string `json:"id,omitempty"` + Value *string `json:"value,omitempty"` +} + +// NewFleetshardParameter instantiates a new FleetshardParameter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFleetshardParameter() *FleetshardParameter { + this := FleetshardParameter{} + return &this +} + +// NewFleetshardParameterWithDefaults instantiates a new FleetshardParameter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFleetshardParameterWithDefaults() *FleetshardParameter { + this := FleetshardParameter{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FleetshardParameter) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FleetshardParameter) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FleetshardParameter) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FleetshardParameter) SetId(v string) { + o.Id = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *FleetshardParameter) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FleetshardParameter) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *FleetshardParameter) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *FleetshardParameter) SetValue(v string) { + o.Value = &v +} + +func (o FleetshardParameter) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableFleetshardParameter struct { + value *FleetshardParameter + isSet bool +} + +func (v NullableFleetshardParameter) Get() *FleetshardParameter { + return v.value +} + +func (v *NullableFleetshardParameter) Set(val *FleetshardParameter) { + v.value = val + v.isSet = true +} + +func (v NullableFleetshardParameter) IsSet() bool { + return v.isSet +} + +func (v *NullableFleetshardParameter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFleetshardParameter(val *FleetshardParameter) *NullableFleetshardParameter { + return &NullableFleetshardParameter{value: val, isSet: true} +} + +func (v NullableFleetshardParameter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFleetshardParameter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_instant_query.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_instant_query.go index 7f5ba5c25..13cc5a5e9 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_instant_query.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_instant_query.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_promote_request.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_promote_request.go new file mode 100644 index 000000000..b0036e784 --- /dev/null +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_promote_request.go @@ -0,0 +1,184 @@ +/* + * Kafka Management API + * + * Kafka Management API is a REST API to manage Kafka instances + * + * API version: 1.15.0 + * Contact: rhosak-support@redhat.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkamgmtclient + +import ( + "encoding/json" +) + +// KafkaPromoteRequest struct for KafkaPromoteRequest +type KafkaPromoteRequest struct { + // The desired Kafka billing model to promote the kafka instance to. Promotion is performed asynchronously. Accepted values: ['marketplace', 'standard'] + DesiredKafkaBillingModel string `json:"desired_kafka_billing_model"` + // The desired billing marketplace to promote the kafka instance to. Accepted values: ['aws', 'rhm']. Only considered when desired_kafka_billing_model is 'marketplace' + DesiredMarketplace *string `json:"desired_marketplace,omitempty"` + // The desired Kafka billing cloud account ID to promote the kafka instance to. Only considered when desired_kafka_billing_model is 'marketplace' + DesiredBillingCloudAccountId *string `json:"desired_billing_cloud_account_id,omitempty"` +} + +// NewKafkaPromoteRequest instantiates a new KafkaPromoteRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKafkaPromoteRequest(desiredKafkaBillingModel string) *KafkaPromoteRequest { + this := KafkaPromoteRequest{} + this.DesiredKafkaBillingModel = desiredKafkaBillingModel + return &this +} + +// NewKafkaPromoteRequestWithDefaults instantiates a new KafkaPromoteRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKafkaPromoteRequestWithDefaults() *KafkaPromoteRequest { + this := KafkaPromoteRequest{} + return &this +} + +// GetDesiredKafkaBillingModel returns the DesiredKafkaBillingModel field value +func (o *KafkaPromoteRequest) GetDesiredKafkaBillingModel() string { + if o == nil { + var ret string + return ret + } + + return o.DesiredKafkaBillingModel +} + +// GetDesiredKafkaBillingModelOk returns a tuple with the DesiredKafkaBillingModel field value +// and a boolean to check if the value has been set. +func (o *KafkaPromoteRequest) GetDesiredKafkaBillingModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DesiredKafkaBillingModel, true +} + +// SetDesiredKafkaBillingModel sets field value +func (o *KafkaPromoteRequest) SetDesiredKafkaBillingModel(v string) { + o.DesiredKafkaBillingModel = v +} + +// GetDesiredMarketplace returns the DesiredMarketplace field value if set, zero value otherwise. +func (o *KafkaPromoteRequest) GetDesiredMarketplace() string { + if o == nil || o.DesiredMarketplace == nil { + var ret string + return ret + } + return *o.DesiredMarketplace +} + +// GetDesiredMarketplaceOk returns a tuple with the DesiredMarketplace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KafkaPromoteRequest) GetDesiredMarketplaceOk() (*string, bool) { + if o == nil || o.DesiredMarketplace == nil { + return nil, false + } + return o.DesiredMarketplace, true +} + +// HasDesiredMarketplace returns a boolean if a field has been set. +func (o *KafkaPromoteRequest) HasDesiredMarketplace() bool { + if o != nil && o.DesiredMarketplace != nil { + return true + } + + return false +} + +// SetDesiredMarketplace gets a reference to the given string and assigns it to the DesiredMarketplace field. +func (o *KafkaPromoteRequest) SetDesiredMarketplace(v string) { + o.DesiredMarketplace = &v +} + +// GetDesiredBillingCloudAccountId returns the DesiredBillingCloudAccountId field value if set, zero value otherwise. +func (o *KafkaPromoteRequest) GetDesiredBillingCloudAccountId() string { + if o == nil || o.DesiredBillingCloudAccountId == nil { + var ret string + return ret + } + return *o.DesiredBillingCloudAccountId +} + +// GetDesiredBillingCloudAccountIdOk returns a tuple with the DesiredBillingCloudAccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KafkaPromoteRequest) GetDesiredBillingCloudAccountIdOk() (*string, bool) { + if o == nil || o.DesiredBillingCloudAccountId == nil { + return nil, false + } + return o.DesiredBillingCloudAccountId, true +} + +// HasDesiredBillingCloudAccountId returns a boolean if a field has been set. +func (o *KafkaPromoteRequest) HasDesiredBillingCloudAccountId() bool { + if o != nil && o.DesiredBillingCloudAccountId != nil { + return true + } + + return false +} + +// SetDesiredBillingCloudAccountId gets a reference to the given string and assigns it to the DesiredBillingCloudAccountId field. +func (o *KafkaPromoteRequest) SetDesiredBillingCloudAccountId(v string) { + o.DesiredBillingCloudAccountId = &v +} + +func (o KafkaPromoteRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["desired_kafka_billing_model"] = o.DesiredKafkaBillingModel + } + if o.DesiredMarketplace != nil { + toSerialize["desired_marketplace"] = o.DesiredMarketplace + } + if o.DesiredBillingCloudAccountId != nil { + toSerialize["desired_billing_cloud_account_id"] = o.DesiredBillingCloudAccountId + } + return json.Marshal(toSerialize) +} + +type NullableKafkaPromoteRequest struct { + value *KafkaPromoteRequest + isSet bool +} + +func (v NullableKafkaPromoteRequest) Get() *KafkaPromoteRequest { + return v.value +} + +func (v *NullableKafkaPromoteRequest) Set(val *KafkaPromoteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableKafkaPromoteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableKafkaPromoteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKafkaPromoteRequest(val *KafkaPromoteRequest) *NullableKafkaPromoteRequest { + return &NullableKafkaPromoteRequest{value: val, isSet: true} +} + +func (v NullableKafkaPromoteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKafkaPromoteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request.go index 39dd924af..821c50adc 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -21,7 +21,7 @@ type KafkaRequest struct { Id string `json:"id"` Kind string `json:"kind"` Href string `json:"href"` - // Values: [accepted, preparing, provisioning, ready, failed, deprovision, deleting] + // Values: [accepted, preparing, provisioning, ready, failed, deprovision, deleting, suspending, suspended, resuming] Status *string `json:"status,omitempty"` // Name of Cloud used to deploy. For example AWS CloudProvider *string `json:"cloud_provider,omitempty"` @@ -62,6 +62,12 @@ type KafkaRequest struct { BillingCloudAccountId *string `json:"billing_cloud_account_id,omitempty"` Marketplace *string `json:"marketplace,omitempty"` BillingModel *string `json:"billing_model,omitempty"` + // Status of the Kafka request promotion. Possible values: ['promoting', 'failed']. If unset it means no promotion is in progress. + PromotionStatus *string `json:"promotion_status,omitempty"` + // The ID of the data plane where Kafka is deployed on. This information is only returned for kafka whose billing model is enterprise + ClusterId NullableString `json:"cluster_id,omitempty"` + // Details of the Kafka request promotion. It can be set when a Kafka request promotion is in progress or has failed + PromotionDetails *string `json:"promotion_details,omitempty"` } // NewKafkaRequest instantiates a new KafkaRequest object @@ -1080,6 +1086,112 @@ func (o *KafkaRequest) SetBillingModel(v string) { o.BillingModel = &v } +// GetPromotionStatus returns the PromotionStatus field value if set, zero value otherwise. +func (o *KafkaRequest) GetPromotionStatus() string { + if o == nil || o.PromotionStatus == nil { + var ret string + return ret + } + return *o.PromotionStatus +} + +// GetPromotionStatusOk returns a tuple with the PromotionStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KafkaRequest) GetPromotionStatusOk() (*string, bool) { + if o == nil || o.PromotionStatus == nil { + return nil, false + } + return o.PromotionStatus, true +} + +// HasPromotionStatus returns a boolean if a field has been set. +func (o *KafkaRequest) HasPromotionStatus() bool { + if o != nil && o.PromotionStatus != nil { + return true + } + + return false +} + +// SetPromotionStatus gets a reference to the given string and assigns it to the PromotionStatus field. +func (o *KafkaRequest) SetPromotionStatus(v string) { + o.PromotionStatus = &v +} + +// GetClusterId returns the ClusterId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *KafkaRequest) GetClusterId() string { + if o == nil || o.ClusterId.Get() == nil { + var ret string + return ret + } + return *o.ClusterId.Get() +} + +// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KafkaRequest) GetClusterIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClusterId.Get(), o.ClusterId.IsSet() +} + +// HasClusterId returns a boolean if a field has been set. +func (o *KafkaRequest) HasClusterId() bool { + if o != nil && o.ClusterId.IsSet() { + return true + } + + return false +} + +// SetClusterId gets a reference to the given NullableString and assigns it to the ClusterId field. +func (o *KafkaRequest) SetClusterId(v string) { + o.ClusterId.Set(&v) +} +// SetClusterIdNil sets the value for ClusterId to be an explicit nil +func (o *KafkaRequest) SetClusterIdNil() { + o.ClusterId.Set(nil) +} + +// UnsetClusterId ensures that no value is present for ClusterId, not even an explicit nil +func (o *KafkaRequest) UnsetClusterId() { + o.ClusterId.Unset() +} + +// GetPromotionDetails returns the PromotionDetails field value if set, zero value otherwise. +func (o *KafkaRequest) GetPromotionDetails() string { + if o == nil || o.PromotionDetails == nil { + var ret string + return ret + } + return *o.PromotionDetails +} + +// GetPromotionDetailsOk returns a tuple with the PromotionDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KafkaRequest) GetPromotionDetailsOk() (*string, bool) { + if o == nil || o.PromotionDetails == nil { + return nil, false + } + return o.PromotionDetails, true +} + +// HasPromotionDetails returns a boolean if a field has been set. +func (o *KafkaRequest) HasPromotionDetails() bool { + if o != nil && o.PromotionDetails != nil { + return true + } + + return false +} + +// SetPromotionDetails gets a reference to the given string and assigns it to the PromotionDetails field. +func (o *KafkaRequest) SetPromotionDetails(v string) { + o.PromotionDetails = &v +} + func (o KafkaRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { @@ -1178,6 +1290,15 @@ func (o KafkaRequest) MarshalJSON() ([]byte, error) { if o.BillingModel != nil { toSerialize["billing_model"] = o.BillingModel } + if o.PromotionStatus != nil { + toSerialize["promotion_status"] = o.PromotionStatus + } + if o.ClusterId.IsSet() { + toSerialize["cluster_id"] = o.ClusterId.Get() + } + if o.PromotionDetails != nil { + toSerialize["promotion_details"] = o.PromotionDetails + } return json.Marshal(toSerialize) } diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_all_of.go index 6ea2c6a7c..1d4777145 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -18,7 +18,7 @@ import ( // KafkaRequestAllOf struct for KafkaRequestAllOf type KafkaRequestAllOf struct { - // Values: [accepted, preparing, provisioning, ready, failed, deprovision, deleting] + // Values: [accepted, preparing, provisioning, ready, failed, deprovision, deleting, suspending, suspended, resuming] Status *string `json:"status,omitempty"` // Name of Cloud used to deploy. For example AWS CloudProvider *string `json:"cloud_provider,omitempty"` @@ -59,6 +59,12 @@ type KafkaRequestAllOf struct { BillingCloudAccountId *string `json:"billing_cloud_account_id,omitempty"` Marketplace *string `json:"marketplace,omitempty"` BillingModel *string `json:"billing_model,omitempty"` + // Status of the Kafka request promotion. Possible values: ['promoting', 'failed']. If unset it means no promotion is in progress. + PromotionStatus *string `json:"promotion_status,omitempty"` + // The ID of the data plane where Kafka is deployed on. This information is only returned for kafka whose billing model is enterprise + ClusterId NullableString `json:"cluster_id,omitempty"` + // Details of the Kafka request promotion. It can be set when a Kafka request promotion is in progress or has failed + PromotionDetails *string `json:"promotion_details,omitempty"` } // NewKafkaRequestAllOf instantiates a new KafkaRequestAllOf object @@ -1002,6 +1008,112 @@ func (o *KafkaRequestAllOf) SetBillingModel(v string) { o.BillingModel = &v } +// GetPromotionStatus returns the PromotionStatus field value if set, zero value otherwise. +func (o *KafkaRequestAllOf) GetPromotionStatus() string { + if o == nil || o.PromotionStatus == nil { + var ret string + return ret + } + return *o.PromotionStatus +} + +// GetPromotionStatusOk returns a tuple with the PromotionStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KafkaRequestAllOf) GetPromotionStatusOk() (*string, bool) { + if o == nil || o.PromotionStatus == nil { + return nil, false + } + return o.PromotionStatus, true +} + +// HasPromotionStatus returns a boolean if a field has been set. +func (o *KafkaRequestAllOf) HasPromotionStatus() bool { + if o != nil && o.PromotionStatus != nil { + return true + } + + return false +} + +// SetPromotionStatus gets a reference to the given string and assigns it to the PromotionStatus field. +func (o *KafkaRequestAllOf) SetPromotionStatus(v string) { + o.PromotionStatus = &v +} + +// GetClusterId returns the ClusterId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *KafkaRequestAllOf) GetClusterId() string { + if o == nil || o.ClusterId.Get() == nil { + var ret string + return ret + } + return *o.ClusterId.Get() +} + +// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KafkaRequestAllOf) GetClusterIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClusterId.Get(), o.ClusterId.IsSet() +} + +// HasClusterId returns a boolean if a field has been set. +func (o *KafkaRequestAllOf) HasClusterId() bool { + if o != nil && o.ClusterId.IsSet() { + return true + } + + return false +} + +// SetClusterId gets a reference to the given NullableString and assigns it to the ClusterId field. +func (o *KafkaRequestAllOf) SetClusterId(v string) { + o.ClusterId.Set(&v) +} +// SetClusterIdNil sets the value for ClusterId to be an explicit nil +func (o *KafkaRequestAllOf) SetClusterIdNil() { + o.ClusterId.Set(nil) +} + +// UnsetClusterId ensures that no value is present for ClusterId, not even an explicit nil +func (o *KafkaRequestAllOf) UnsetClusterId() { + o.ClusterId.Unset() +} + +// GetPromotionDetails returns the PromotionDetails field value if set, zero value otherwise. +func (o *KafkaRequestAllOf) GetPromotionDetails() string { + if o == nil || o.PromotionDetails == nil { + var ret string + return ret + } + return *o.PromotionDetails +} + +// GetPromotionDetailsOk returns a tuple with the PromotionDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KafkaRequestAllOf) GetPromotionDetailsOk() (*string, bool) { + if o == nil || o.PromotionDetails == nil { + return nil, false + } + return o.PromotionDetails, true +} + +// HasPromotionDetails returns a boolean if a field has been set. +func (o *KafkaRequestAllOf) HasPromotionDetails() bool { + if o != nil && o.PromotionDetails != nil { + return true + } + + return false +} + +// SetPromotionDetails gets a reference to the given string and assigns it to the PromotionDetails field. +func (o *KafkaRequestAllOf) SetPromotionDetails(v string) { + o.PromotionDetails = &v +} + func (o KafkaRequestAllOf) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Status != nil { @@ -1091,6 +1203,15 @@ func (o KafkaRequestAllOf) MarshalJSON() ([]byte, error) { if o.BillingModel != nil { toSerialize["billing_model"] = o.BillingModel } + if o.PromotionStatus != nil { + toSerialize["promotion_status"] = o.PromotionStatus + } + if o.ClusterId.IsSet() { + toSerialize["cluster_id"] = o.ClusterId.Get() + } + if o.PromotionDetails != nil { + toSerialize["promotion_details"] = o.PromotionDetails + } return json.Marshal(toSerialize) } diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_list.go index 7b911149d..a2f2f7354 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_list_all_of.go index d713a3544..91a65ea0f 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_list_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_list_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -17,15 +17,16 @@ import ( // KafkaRequestListAllOf struct for KafkaRequestListAllOf type KafkaRequestListAllOf struct { - Items *[]KafkaRequest `json:"items,omitempty"` + Items []KafkaRequest `json:"items"` } // NewKafkaRequestListAllOf instantiates a new KafkaRequestListAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewKafkaRequestListAllOf() *KafkaRequestListAllOf { +func NewKafkaRequestListAllOf(items []KafkaRequest) *KafkaRequestListAllOf { this := KafkaRequestListAllOf{} + this.Items = items return &this } @@ -37,41 +38,33 @@ func NewKafkaRequestListAllOfWithDefaults() *KafkaRequestListAllOf { return &this } -// GetItems returns the Items field value if set, zero value otherwise. +// GetItems returns the Items field value func (o *KafkaRequestListAllOf) GetItems() []KafkaRequest { - if o == nil || o.Items == nil { + if o == nil { var ret []KafkaRequest return ret } - return *o.Items + + return o.Items } -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. func (o *KafkaRequestListAllOf) GetItemsOk() (*[]KafkaRequest, bool) { - if o == nil || o.Items == nil { + if o == nil { return nil, false } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *KafkaRequestListAllOf) HasItems() bool { - if o != nil && o.Items != nil { - return true - } - - return false + return &o.Items, true } -// SetItems gets a reference to the given []KafkaRequest and assigns it to the Items field. +// SetItems sets field value func (o *KafkaRequestListAllOf) SetItems(v []KafkaRequest) { - o.Items = &v + o.Items = v } func (o KafkaRequestListAllOf) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Items != nil { + if true { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_payload.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_payload.go index 63140d5ec..04250534a 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_payload.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_request_payload.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -33,6 +33,8 @@ type KafkaRequestPayload struct { Marketplace NullableString `json:"marketplace,omitempty"` // billing model to use BillingModel NullableString `json:"billing_model,omitempty"` + // enterprise OSD cluster ID to be used for kafka creation + ClusterId NullableString `json:"cluster_id,omitempty"` } // NewKafkaRequestPayload instantiates a new KafkaRequestPayload object @@ -341,6 +343,48 @@ func (o *KafkaRequestPayload) UnsetBillingModel() { o.BillingModel.Unset() } +// GetClusterId returns the ClusterId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *KafkaRequestPayload) GetClusterId() string { + if o == nil || o.ClusterId.Get() == nil { + var ret string + return ret + } + return *o.ClusterId.Get() +} + +// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KafkaRequestPayload) GetClusterIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClusterId.Get(), o.ClusterId.IsSet() +} + +// HasClusterId returns a boolean if a field has been set. +func (o *KafkaRequestPayload) HasClusterId() bool { + if o != nil && o.ClusterId.IsSet() { + return true + } + + return false +} + +// SetClusterId gets a reference to the given NullableString and assigns it to the ClusterId field. +func (o *KafkaRequestPayload) SetClusterId(v string) { + o.ClusterId.Set(&v) +} +// SetClusterIdNil sets the value for ClusterId to be an explicit nil +func (o *KafkaRequestPayload) SetClusterIdNil() { + o.ClusterId.Set(nil) +} + +// UnsetClusterId ensures that no value is present for ClusterId, not even an explicit nil +func (o *KafkaRequestPayload) UnsetClusterId() { + o.ClusterId.Unset() +} + func (o KafkaRequestPayload) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CloudProvider != nil { @@ -367,6 +411,9 @@ func (o KafkaRequestPayload) MarshalJSON() ([]byte, error) { if o.BillingModel.IsSet() { toSerialize["billing_model"] = o.BillingModel.Get() } + if o.ClusterId.IsSet() { + toSerialize["cluster_id"] = o.ClusterId.Get() + } return json.Marshal(toSerialize) } diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_update_request.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_update_request.go index 547b17631..7ab0cbcc7 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_update_request.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_kafka_update_request.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_list.go index 0980b2786..385945d4b 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -21,20 +21,18 @@ type List struct { Page int32 `json:"page"` Size int32 `json:"size"` Total int32 `json:"total"` - Items []ObjectReference `json:"items"` } // NewList instantiates a new List object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewList(kind string, page int32, size int32, total int32, items []ObjectReference) *List { +func NewList(kind string, page int32, size int32, total int32) *List { this := List{} this.Kind = kind this.Page = page this.Size = size this.Total = total - this.Items = items return &this } @@ -142,30 +140,6 @@ func (o *List) SetTotal(v int32) { o.Total = v } -// GetItems returns the Items field value -func (o *List) GetItems() []ObjectReference { - if o == nil { - var ret []ObjectReference - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *List) GetItemsOk() (*[]ObjectReference, bool) { - if o == nil { - return nil, false - } - return &o.Items, true -} - -// SetItems sets field value -func (o *List) SetItems(v []ObjectReference) { - o.Items = v -} - func (o List) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { @@ -180,9 +154,6 @@ func (o List) MarshalJSON() ([]byte, error) { if true { toSerialize["total"] = o.Total } - if true { - toSerialize["items"] = o.Items - } return json.Marshal(toSerialize) } diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_instant_query_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_instant_query_list.go index 5a080c2b2..971a35e95 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_instant_query_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_instant_query_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_instant_query_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_instant_query_list_all_of.go index 06976d807..d3c4dbc7d 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_instant_query_list_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_instant_query_list_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_range_query_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_range_query_list.go index 9175ed7ec..594aa2149 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_range_query_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_range_query_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_range_query_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_range_query_list_all_of.go index c90ae08d0..c9812b8c2 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_range_query_list_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_metrics_range_query_list_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_object_reference.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_object_reference.go index d96e9350e..02494e6c3 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_object_reference.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_object_reference.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_range_query.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_range_query.go index 431551c91..6198be62a 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_range_query.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_range_query.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_region_capacity_list_item.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_region_capacity_list_item.go index 05645b0f1..f13297a00 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_region_capacity_list_item.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_region_capacity_list_item.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account.go index ce3a4b428..0792dab3c 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_all_of.go index 402577dc0..dfb12751b 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list.go index 13bfb1145..4b335f2b2 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_all_of.go index 0a70f21c5..f64943f07 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_item.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_item.go index b0105b1d4..b3fff12e2 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_item.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_item.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_item_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_item_all_of.go index c05fbe523..70faf2270 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_item_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_list_item_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_request.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_request.go index 4abef1bbd..79cd4069f 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_request.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_service_account_request.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_sso_provider.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_sso_provider.go index 5046e9176..d484226cb 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_sso_provider.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_sso_provider.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_sso_provider_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_sso_provider_all_of.go index 9a6d727dc..8aa3a1923 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_sso_provider_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_sso_provider_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_billing_model.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_billing_model.go index e449a6114..db2e99fd7 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_billing_model.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_billing_model.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ @@ -21,7 +21,7 @@ type SupportedKafkaBillingModel struct { Id string `json:"id"` // AMS resource to be used. Accepted values: ['rhosak'] AmsResource string `json:"ams_resource"` - // AMS product to be used. Accepted values: ['RHOSAK', 'RHOSAKTrial', 'RHOSAKEval'] + // AMS product to be used. Accepted values: ['RHOSAK', 'RHOSAKTrial', 'RHOSAKEval', 'RHOSAKCC'] AmsProduct string `json:"ams_product"` // List of AMS available billing models: Accepted values: ['marketplace', 'marketplace-rhm', 'marketplace-aws'] AmsBillingModels []string `json:"ams_billing_models"` diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_type.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_type.go index e48aa387d..037ecd543 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_type.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_type.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_types_list.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_types_list.go index f766a9248..169ab61c3 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_types_list.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_types_list.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_types_list_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_types_list_all_of.go index 201899b8f..440eaa684 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_types_list_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_instance_types_list_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_size.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_size.go index fed113704..9ff711bd9 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_size.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_size.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_size_bytes_value_item.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_size_bytes_value_item.go index 1262ccc61..c8dc0ae2f 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_size_bytes_value_item.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_supported_kafka_size_bytes_value_item.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_values.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_values.go index b427ad8fa..8a4516e09 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_values.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_values.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_version_metadata.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_version_metadata.go index 4d06459af..55f8cfdda 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_version_metadata.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_version_metadata.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_version_metadata_all_of.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_version_metadata_all_of.go index 73e3cac7e..c893ab641 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_version_metadata_all_of.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/model_version_metadata_all_of.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/response.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/response.go index 7b7b77903..06c631433 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/response.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/response.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/utils.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/utils.go index 329949fb6..0582f1275 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/utils.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client/utils.go @@ -3,7 +3,7 @@ * * Kafka Management API is a REST API to manage Kafka instances * - * API version: 1.14.0 + * API version: 1.15.0 * Contact: rhosak-support@redhat.com */ diff --git a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/error/errors.go b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/error/errors.go index 3f7a70d4a..2082ad6d7 100644 --- a/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/error/errors.go +++ b/vendor/github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/error/errors.go @@ -92,6 +92,18 @@ const ( // Billing account id missing or invalid ERROR_43 string = "KAFKAS-MGMT-43" + // Enterprise cluster ID is already used + ERROR_44 string = "KAFKAS-MGMT-44" + + // Enterprise cluster ID is invalid + ERROR_45 string = "KAFKAS-MGMT-45" + + // Enterprise external cluster ID is invalid + ERROR_46 string = "KAFKAS-MGMT-46" + + // Dns name is invalid + ERROR_47 string = "KAFKAS-MGMT-47" + // Synchronous action is not supported, use async=true parameter ERROR_103 string = "KAFKAS-MGMT-103" diff --git a/vendor/modules.txt b/vendor/modules.txt index 4e7435d5e..2c9b29dcb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -236,7 +236,7 @@ github.com/redhat-developer/app-services-sdk-go/connectormgmt/apiv1/error ## explicit; go 1.15 github.com/redhat-developer/app-services-sdk-go/kafkainstance/apiv1 github.com/redhat-developer/app-services-sdk-go/kafkainstance/apiv1/client -# github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.15.0 +# github.com/redhat-developer/app-services-sdk-go/kafkamgmt v0.19.0 ## explicit; go 1.15 github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1 github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client