Skip to content

Commit 6140d56

Browse files
authored
feat(webhosting): add public v1 offer name and quota warning (scaleway#2376)
1 parent 37a0577 commit 6140d56

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

api/webhosting/v1/webhosting_sdk.go

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -562,14 +562,16 @@ func (enum *NameserverStatus) UnmarshalJSON(data []byte) error {
562562
type OfferOptionName string
563563

564564
const (
565-
OfferOptionNameUnknownName = OfferOptionName("unknown_name")
566-
OfferOptionNameDomainCount = OfferOptionName("domain_count")
567-
OfferOptionNameEmailCount = OfferOptionName("email_count")
568-
OfferOptionNameStorageGb = OfferOptionName("storage_gb")
569-
OfferOptionNameVcpuCount = OfferOptionName("vcpu_count")
570-
OfferOptionNameRAMGb = OfferOptionName("ram_gb")
571-
OfferOptionNameBackup = OfferOptionName("backup")
572-
OfferOptionNameDedicatedIP = OfferOptionName("dedicated_ip")
565+
OfferOptionNameUnknownName = OfferOptionName("unknown_name")
566+
OfferOptionNameDomainCount = OfferOptionName("domain_count")
567+
OfferOptionNameEmailCount = OfferOptionName("email_count")
568+
OfferOptionNameStorageGb = OfferOptionName("storage_gb")
569+
OfferOptionNameVcpuCount = OfferOptionName("vcpu_count")
570+
OfferOptionNameRAMGb = OfferOptionName("ram_gb")
571+
OfferOptionNameBackup = OfferOptionName("backup")
572+
OfferOptionNameDedicatedIP = OfferOptionName("dedicated_ip")
573+
OfferOptionNameEmailStorageGb = OfferOptionName("email_storage_gb")
574+
OfferOptionNameDatabaseCount = OfferOptionName("database_count")
573575
)
574576

575577
func (enum OfferOptionName) String() string {
@@ -590,6 +592,8 @@ func (enum OfferOptionName) Values() []OfferOptionName {
590592
"ram_gb",
591593
"backup",
592594
"dedicated_ip",
595+
"email_storage_gb",
596+
"database_count",
593597
}
594598
}
595599

@@ -613,6 +617,7 @@ type OfferOptionWarning string
613617
const (
614618
OfferOptionWarningUnknownWarning = OfferOptionWarning("unknown_warning")
615619
OfferOptionWarningQuotaExceededWarning = OfferOptionWarning("quota_exceeded_warning")
620+
OfferOptionWarningUsageLowWarning = OfferOptionWarning("usage_low_warning")
616621
)
617622

618623
func (enum OfferOptionWarning) String() string {
@@ -627,6 +632,7 @@ func (enum OfferOptionWarning) Values() []OfferOptionWarning {
627632
return []OfferOptionWarning{
628633
"unknown_warning",
629634
"quota_exceeded_warning",
635+
"usage_low_warning",
630636
}
631637
}
632638

@@ -819,6 +825,9 @@ type Offer struct {
819825
// ID: offer ID.
820826
ID string `json:"id"`
821827

828+
// Name: offer name.
829+
Name string `json:"name"`
830+
822831
// BillingOperationPath: unique identifier used for billing.
823832
BillingOperationPath string `json:"billing_operation_path"`
824833

@@ -836,6 +845,10 @@ type Offer struct {
836845

837846
// EndOfLife: indicates if the offer has reached its end of life.
838847
EndOfLife bool `json:"end_of_life"`
848+
849+
// QuotaWarning: defines a warning if the maximum value for an option in the offer is exceeded.
850+
// Default value: unknown_warning
851+
QuotaWarning OfferOptionWarning `json:"quota_warning"`
839852
}
840853

841854
// Platform: platform.

0 commit comments

Comments
 (0)