diff --git a/generator/main.go b/generator/main.go index 68df916..f999d11 100644 --- a/generator/main.go +++ b/generator/main.go @@ -645,7 +645,10 @@ func readConfig(path string) (map[string][]string, error) { var reComment = regexp.MustCompile(`\.?[\r\n]+\s*?`) func fmtComment(c string) string { - return html.UnescapeString(reComment.ReplaceAllString(c, ". ")) + d := html.UnescapeString(reComment.ReplaceAllString(c, ". ")) + // "[DEPRECATED]" is not recognized by IDE. + // Uses conventional identifier instead https://go.dev/wiki/Deprecated. + return strings.ReplaceAll(d, "[DEPRECATED]", "Deprecated:") } // fmtQueryParam returns a query param diff --git a/handler/organizationprojects/organizationprojects.go b/handler/organizationprojects/organizationprojects.go index affecf6..71561df 100644 --- a/handler/organizationprojects/organizationprojects.go +++ b/handler/organizationprojects/organizationprojects.go @@ -125,7 +125,7 @@ type OrganizationProjectsCreateIn struct { // OrganizationProjectsCreateOut OrganizationProjectsCreateResponse type OrganizationProjectsCreateOut struct { - AccountId *string `json:"account_id,omitempty"` // [DEPRECATED] Account ID to where the project belongs + AccountId *string `json:"account_id,omitempty"` // Deprecated: Account ID to where the project belongs BasePort *int `json:"base_port,omitempty"` // Valid port number (1-65535) BillingGroupId *string `json:"billing_group_id,omitempty"` // Billing group ID EndOfLifeExtension map[string]EndOfLifeExtension `json:"end_of_life_extension"` // End of life extension information @@ -139,7 +139,7 @@ type OrganizationProjectsCreateOut struct { // OrganizationProjectsGetOut OrganizationProjectsGetResponse type OrganizationProjectsGetOut struct { - AccountId *string `json:"account_id,omitempty"` // [DEPRECATED] Account ID to where the project belongs + AccountId *string `json:"account_id,omitempty"` // Deprecated: Account ID to where the project belongs BasePort *int `json:"base_port,omitempty"` // Valid port number (1-65535) BillingGroupId *string `json:"billing_group_id,omitempty"` // Billing group ID EndOfLifeExtension map[string]EndOfLifeExtension `json:"end_of_life_extension"` // End of life extension information @@ -169,7 +169,7 @@ type OrganizationProjectsUpdateIn struct { // OrganizationProjectsUpdateOut OrganizationProjectsUpdateResponse type OrganizationProjectsUpdateOut struct { - AccountId *string `json:"account_id,omitempty"` // [DEPRECATED] Account ID to where the project belongs + AccountId *string `json:"account_id,omitempty"` // Deprecated: Account ID to where the project belongs BasePort *int `json:"base_port,omitempty"` // Valid port number (1-65535) BillingGroupId *string `json:"billing_group_id,omitempty"` // Billing group ID EndOfLifeExtension map[string]EndOfLifeExtension `json:"end_of_life_extension"` // End of life extension information @@ -181,7 +181,7 @@ type OrganizationProjectsUpdateOut struct { TechEmails []TechEmailOut `json:"tech_emails"` // List of project technical email addresses } type ProjectOut struct { - AccountId *string `json:"account_id,omitempty"` // [DEPRECATED] Account ID to where the project belongs + AccountId *string `json:"account_id,omitempty"` // Deprecated: Account ID to where the project belongs BasePort *int `json:"base_port,omitempty"` // Valid port number (1-65535) BillingGroupId *string `json:"billing_group_id,omitempty"` // Billing group ID EndOfLifeExtension map[string]EndOfLifeExtension `json:"end_of_life_extension"` // End of life extension information diff --git a/handler/project/project.go b/handler/project/project.go index 2dfea1f..e4e4b9b 100644 --- a/handler/project/project.go +++ b/handler/project/project.go @@ -677,28 +677,28 @@ type PrivatelinkAvailabilityOut struct { // ProjectCreateIn ProjectCreateRequestBody type ProjectCreateIn struct { AccountId *string `json:"account_id,omitempty"` // Account ID - AddAccountOwnersAdminAccess *bool `json:"add_account_owners_admin_access,omitempty"` // [DEPRECATED] If account_id is set, grant account owner team admin access to the new project. This flag is ignored, and assumed true. - AddressLines *[]string `json:"address_lines,omitempty"` // [DEPRECATED] Address lines + AddAccountOwnersAdminAccess *bool `json:"add_account_owners_admin_access,omitempty"` // Deprecated: If account_id is set, grant account owner team admin access to the new project. This flag is ignored, and assumed true. + AddressLines *[]string `json:"address_lines,omitempty"` // Deprecated: Address lines BasePort *int `json:"base_port,omitempty"` // New services in this project will use this value as a base when deriving their service port numbers. This allows new services to allocate predictable and specific service ports. If not provided during project creation a random base port is used. BillingAddress *string `json:"billing_address,omitempty"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // [DEPRECATED] Billing currency - BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` // [DEPRECATED] Billing emails - BillingExtraText *string `json:"billing_extra_text,omitempty"` // [DEPRECATED] Extra text to be included in all project invoices + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Deprecated: Billing currency + BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` // Deprecated: Billing emails + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Deprecated: Extra text to be included in all project invoices BillingGroupId *string `json:"billing_group_id,omitempty"` // Billing group ID - CardId *string `json:"card_id,omitempty"` // [DEPRECATED] Credit card ID - City *string `json:"city,omitempty"` // [DEPRECATED] Address city + CardId *string `json:"card_id,omitempty"` // Deprecated: Credit card ID + City *string `json:"city,omitempty"` // Deprecated: Address city Cloud *string `json:"cloud,omitempty"` // Target cloud Company *string `json:"company,omitempty"` // Name of a company CopyFromProject *string `json:"copy_from_project,omitempty"` // Project name from which to copy settings to the new project CopyTags *bool `json:"copy_tags,omitempty"` // Copy tags from the source project. If request contains additional tags, the tags copied from source are updated with them. - CountryCode *string `json:"country_code,omitempty"` // [DEPRECATED] Two letter country code for billing country + CountryCode *string `json:"country_code,omitempty"` // Deprecated: Two letter country code for billing country Project string `json:"project"` // Project name - State *string `json:"state,omitempty"` // [DEPRECATED] Address state + State *string `json:"state,omitempty"` // Deprecated: Address state Tags *map[string]string `json:"tags,omitempty"` // Set of resource tags TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` // List of project tech email addresses UseSourceProjectBillingGroup *bool `json:"use_source_project_billing_group,omitempty"` // If set to true, use the same billing group that is used in source project. If set to false, create a copy of the billing group used in the source project with the same information. If new project is not being copied from existing one this option has no effect - VatId *string `json:"vat_id,omitempty"` // [DEPRECATED] EU VAT identification - ZipCode *string `json:"zip_code,omitempty"` // [DEPRECATED] Address zip code + VatId *string `json:"vat_id,omitempty"` // Deprecated: EU VAT identification + ZipCode *string `json:"zip_code,omitempty"` // Deprecated: Address zip code } // ProjectCreateOut Project information @@ -934,24 +934,24 @@ type ProjectTagsUpdateIn struct { // ProjectUpdateIn ProjectUpdateRequestBody type ProjectUpdateIn struct { AccountId *string `json:"account_id,omitempty"` // Account ID - AddAccountOwnersAdminAccess *bool `json:"add_account_owners_admin_access,omitempty"` // [DEPRECATED] If account_id is set, grant account owner team admin access to this project. This flag is ignored and assumed true. - AddressLines *[]string `json:"address_lines,omitempty"` // [DEPRECATED] Address lines + AddAccountOwnersAdminAccess *bool `json:"add_account_owners_admin_access,omitempty"` // Deprecated: If account_id is set, grant account owner team admin access to this project. This flag is ignored and assumed true. + AddressLines *[]string `json:"address_lines,omitempty"` // Deprecated: Address lines BillingAddress *string `json:"billing_address,omitempty"` // DEPRECATED: use split address fields like company, address_lines, zip_code, city and state instead - BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // [DEPRECATED] Billing currency - BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` // [DEPRECATED] List of project billing email addresses - BillingExtraText *string `json:"billing_extra_text,omitempty"` // [DEPRECATED] Extra text to be included in all project invoices, e.g. purchase order or cost center number + BillingCurrency BillingCurrencyType `json:"billing_currency,omitempty"` // Deprecated: Billing currency + BillingEmails *[]BillingEmailIn `json:"billing_emails,omitempty"` // Deprecated: List of project billing email addresses + BillingExtraText *string `json:"billing_extra_text,omitempty"` // Deprecated: Extra text to be included in all project invoices, e.g. purchase order or cost center number BillingGroupId *string `json:"billing_group_id,omitempty"` // Billing group ID - CardId *string `json:"card_id,omitempty"` // [DEPRECATED] Credit card ID - City *string `json:"city,omitempty"` // [DEPRECATED] Address city + CardId *string `json:"card_id,omitempty"` // Deprecated: Credit card ID + City *string `json:"city,omitempty"` // Deprecated: Address city Cloud *string `json:"cloud,omitempty"` // Target cloud Company *string `json:"company,omitempty"` // Name of a company - CountryCode *string `json:"country_code,omitempty"` // [DEPRECATED] Two letter country code for billing country + CountryCode *string `json:"country_code,omitempty"` // Deprecated: Two letter country code for billing country ProjectName *string `json:"project_name,omitempty"` // Project name - State *string `json:"state,omitempty"` // [DEPRECATED] Address state + State *string `json:"state,omitempty"` // Deprecated: Address state Tags *map[string]string `json:"tags,omitempty"` // Set of resource tags TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` // List of project tech email addresses - VatId *string `json:"vat_id,omitempty"` // [DEPRECATED] EU VAT Identification Number - ZipCode *string `json:"zip_code,omitempty"` // [DEPRECATED] Address zip code + VatId *string `json:"vat_id,omitempty"` // Deprecated: EU VAT Identification Number + ZipCode *string `json:"zip_code,omitempty"` // Deprecated: Address zip code } // ProjectUpdateOut Project information diff --git a/handler/service/service.go b/handler/service/service.go index e40da0f..3518b8e 100644 --- a/handler/service/service.go +++ b/handler/service/service.go @@ -1819,7 +1819,8 @@ type ServerGroupOut struct { // ServiceBackupToAnotherRegionReportIn ServiceBackupToAnotherRegionReportRequestBody type ServiceBackupToAnotherRegionReportIn struct { - Period PeriodType `json:"period,omitempty"` // Metrics time period + KafkaTopicName *string `json:"kafka_topic_name,omitempty"` // Metrics at Kafka service topic level + Period PeriodType `json:"period,omitempty"` // Metrics time period } // ServiceBackupsGetOut ServiceBackupsGetResponse @@ -2113,7 +2114,8 @@ type ServiceKmsGetKeypairOut struct { // ServiceMetricsFetchIn ServiceMetricsFetchRequestBody type ServiceMetricsFetchIn struct { - Period PeriodType `json:"period,omitempty"` // Metrics time period + KafkaTopicName *string `json:"kafka_topic_name,omitempty"` // Metrics at Kafka service topic level + Period PeriodType `json:"period,omitempty"` // Metrics time period } type ServiceNotificationOut struct { Level LevelType `json:"level"` // Notification level